mirror of
https://github.com/documenso/documenso.git
synced 2026-07-26 09:54:51 +10:00
fix: add hipaa flag (#2603)
This commit is contained in:
@@ -57,7 +57,7 @@ export const ClaimCreateDialog = ({ licenseFlags }: ClaimCreateDialogProps) => {
|
|||||||
</Button>
|
</Button>
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
|
|
||||||
<DialogContent className="sm:max-w-md">
|
<DialogContent className="scrollbar-hidden max-h-[90vh] overflow-y-auto sm:max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<Trans>Create Subscription Claim</Trans>
|
<Trans>Create Subscription Claim</Trans>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ export const ClaimUpdateDialog = ({ claim, trigger, licenseFlags }: ClaimUpdateD
|
|||||||
{trigger}
|
{trigger}
|
||||||
</DialogTrigger>
|
</DialogTrigger>
|
||||||
|
|
||||||
<DialogContent className="sm:max-w-md">
|
<DialogContent className="scrollbar-hidden max-h-[90vh] overflow-y-auto sm:max-w-md">
|
||||||
<DialogHeader>
|
<DialogHeader>
|
||||||
<DialogTitle>
|
<DialogTitle>
|
||||||
<Trans>Update Subscription Claim</Trans>
|
<Trans>Update Subscription Claim</Trans>
|
||||||
|
|||||||
@@ -1,7 +1,11 @@
|
|||||||
|
import { useState } from 'react';
|
||||||
|
|
||||||
import { Trans, useLingui } from '@lingui/react/macro';
|
import { Trans, useLingui } from '@lingui/react/macro';
|
||||||
import {
|
import {
|
||||||
ArrowRightIcon,
|
ArrowRightIcon,
|
||||||
CheckCircle2Icon,
|
CheckCircle2Icon,
|
||||||
|
EyeIcon,
|
||||||
|
EyeOffIcon,
|
||||||
KeyRoundIcon,
|
KeyRoundIcon,
|
||||||
Loader2Icon,
|
Loader2Icon,
|
||||||
RefreshCwIcon,
|
RefreshCwIcon,
|
||||||
@@ -32,6 +36,7 @@ type AdminLicenseCardProps = {
|
|||||||
|
|
||||||
export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
|
export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
|
||||||
const { t, i18n } = useLingui();
|
const { t, i18n } = useLingui();
|
||||||
|
const [isLicenseKeyVisible, setIsLicenseKeyVisible] = useState(false);
|
||||||
|
|
||||||
const { license } = licenseData || {};
|
const { license } = licenseData || {};
|
||||||
|
|
||||||
@@ -53,6 +58,7 @@ export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
|
|||||||
<p className="text-sm font-medium text-destructive">
|
<p className="text-sm font-medium text-destructive">
|
||||||
<Trans>Invalid License Key</Trans>
|
<Trans>Invalid License Key</Trans>
|
||||||
</p>
|
</p>
|
||||||
|
{/* Don't need to hide invalid license keys. */}
|
||||||
<p className="text-xs text-muted-foreground">{licenseData.requestedLicenseKey}</p>
|
<p className="text-xs text-muted-foreground">{licenseData.requestedLicenseKey}</p>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
@@ -135,7 +141,26 @@ export const AdminLicenseCard = ({ licenseData }: AdminLicenseCardProps) => {
|
|||||||
<p className="text-sm font-medium text-foreground">
|
<p className="text-sm font-medium text-foreground">
|
||||||
<Trans>License Key</Trans>
|
<Trans>License Key</Trans>
|
||||||
</p>
|
</p>
|
||||||
<p className="mt-0.5 text-xs text-muted-foreground">{license.licenseKey}</p>
|
<div className="mt-0.5 flex items-center gap-1">
|
||||||
|
<p className="min-w-0 break-all text-xs text-muted-foreground">
|
||||||
|
{isLicenseKeyVisible ? license.licenseKey : '•'.repeat(license.licenseKey.length)}
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
type="button"
|
||||||
|
variant="ghost"
|
||||||
|
size="sm"
|
||||||
|
className="h-6 w-6 p-0 text-muted-foreground"
|
||||||
|
aria-label={isLicenseKeyVisible ? t`Hide license key` : t`Show license key`}
|
||||||
|
onClick={() => setIsLicenseKeyVisible((prevState) => !prevState)}
|
||||||
|
>
|
||||||
|
{isLicenseKeyVisible ? (
|
||||||
|
<EyeOffIcon className="h-3.5 w-3.5" />
|
||||||
|
) : (
|
||||||
|
<EyeIcon className="h-3.5 w-3.5" />
|
||||||
|
)}
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ const BACKPORT_SUBSCRIPTION_CLAIM_JOB_DEFINITION_SCHEMA = z.object({
|
|||||||
embedSigning: z.literal(true).optional(),
|
embedSigning: z.literal(true).optional(),
|
||||||
embedSigningWhiteLabel: z.literal(true).optional(),
|
embedSigningWhiteLabel: z.literal(true).optional(),
|
||||||
cfr21: z.literal(true).optional(),
|
cfr21: z.literal(true).optional(),
|
||||||
|
hipaa: z.literal(true).optional(),
|
||||||
// Todo: Envelopes - Do we need to check?
|
// Todo: Envelopes - Do we need to check?
|
||||||
// authenticationPortal & emailDomains missing here.
|
// authenticationPortal & emailDomains missing here.
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ export const ZLicenseClaimSchema = z.object({
|
|||||||
embedAuthoring: z.boolean().optional(),
|
embedAuthoring: z.boolean().optional(),
|
||||||
embedAuthoringWhiteLabel: z.boolean().optional(),
|
embedAuthoringWhiteLabel: z.boolean().optional(),
|
||||||
cfr21: z.boolean().optional(),
|
cfr21: z.boolean().optional(),
|
||||||
|
hipaa: z.boolean().optional(),
|
||||||
authenticationPortal: z.boolean().optional(),
|
authenticationPortal: z.boolean().optional(),
|
||||||
billing: z.boolean().optional(),
|
billing: z.boolean().optional(),
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ export const ZClaimFlagsSchema = z.object({
|
|||||||
|
|
||||||
cfr21: z.boolean().optional(),
|
cfr21: z.boolean().optional(),
|
||||||
|
|
||||||
|
hipaa: z.boolean().optional(),
|
||||||
|
|
||||||
authenticationPortal: z.boolean().optional(),
|
authenticationPortal: z.boolean().optional(),
|
||||||
|
|
||||||
allowLegacyEnvelopes: z.boolean().optional(),
|
allowLegacyEnvelopes: z.boolean().optional(),
|
||||||
@@ -85,6 +87,11 @@ export const SUBSCRIPTION_CLAIM_FEATURE_FLAGS: Record<
|
|||||||
label: '21 CFR',
|
label: '21 CFR',
|
||||||
isEnterprise: true,
|
isEnterprise: true,
|
||||||
},
|
},
|
||||||
|
hipaa: {
|
||||||
|
key: 'hipaa',
|
||||||
|
label: 'HIPAA',
|
||||||
|
isEnterprise: true,
|
||||||
|
},
|
||||||
authenticationPortal: {
|
authenticationPortal: {
|
||||||
key: 'authenticationPortal',
|
key: 'authenticationPortal',
|
||||||
label: 'Authentication portal',
|
label: 'Authentication portal',
|
||||||
|
|||||||
Reference in New Issue
Block a user