mirror of
https://github.com/documenso/documenso.git
synced 2025-11-20 19:51:32 +10:00
Merge branch "main"
This commit is contained in:
@ -1,7 +1,7 @@
|
||||
import type { MessageDescriptor } from '@lingui/core';
|
||||
import { msg } from '@lingui/macro';
|
||||
|
||||
import { DocumentStatus } from '@documenso/prisma/client';
|
||||
import { DocumentDistributionMethod, DocumentStatus } from '@documenso/prisma/client';
|
||||
|
||||
export const DOCUMENT_STATUS: {
|
||||
[status in DocumentStatus]: { description: MessageDescriptor };
|
||||
@ -16,3 +16,19 @@ export const DOCUMENT_STATUS: {
|
||||
description: msg`Pending`,
|
||||
},
|
||||
};
|
||||
|
||||
type DocumentDistributionMethodTypeData = {
|
||||
value: DocumentDistributionMethod;
|
||||
description: MessageDescriptor;
|
||||
};
|
||||
|
||||
export const DOCUMENT_DISTRIBUTION_METHODS: Record<string, DocumentDistributionMethodTypeData> = {
|
||||
[DocumentDistributionMethod.EMAIL]: {
|
||||
value: DocumentDistributionMethod.EMAIL,
|
||||
description: msg`Email`,
|
||||
},
|
||||
[DocumentDistributionMethod.NONE]: {
|
||||
value: DocumentDistributionMethod.NONE,
|
||||
description: msg`None`,
|
||||
},
|
||||
} satisfies Record<DocumentDistributionMethod, DocumentDistributionMethodTypeData>;
|
||||
|
||||
@ -9,59 +9,27 @@ export const RECIPIENT_ROLES_DESCRIPTION = {
|
||||
actioned: msg`Approved`,
|
||||
progressiveVerb: msg`Approving`,
|
||||
roleName: msg`Approver`,
|
||||
roleNamePlural: msg`Approvers`,
|
||||
},
|
||||
[RecipientRole.CC]: {
|
||||
actionVerb: msg`CC`,
|
||||
actioned: msg`CC'd`,
|
||||
progressiveVerb: msg`CC`,
|
||||
roleName: msg`Cc`,
|
||||
roleNamePlural: msg`Ccers`,
|
||||
},
|
||||
[RecipientRole.SIGNER]: {
|
||||
actionVerb: msg`Sign`,
|
||||
actioned: msg`Signed`,
|
||||
progressiveVerb: msg`Signing`,
|
||||
roleName: msg`Signer`,
|
||||
roleNamePlural: msg`Signers`,
|
||||
},
|
||||
[RecipientRole.VIEWER]: {
|
||||
actionVerb: msg`View`,
|
||||
actioned: msg`Viewed`,
|
||||
progressiveVerb: msg`Viewing`,
|
||||
roleName: msg`Viewer`,
|
||||
},
|
||||
} satisfies Record<keyof typeof RecipientRole, unknown>;
|
||||
|
||||
/**
|
||||
* Raw english descriptions for emails.
|
||||
*
|
||||
* Todo: Handle i18n for emails.
|
||||
*/
|
||||
export const RECIPIENT_ROLES_DESCRIPTION_ENG = {
|
||||
[RecipientRole.APPROVER]: {
|
||||
actionVerb: `Approve`,
|
||||
actioned: `Approved`,
|
||||
progressiveVerb: `Approving`,
|
||||
roleName: `Approver`,
|
||||
roleNamePlural: msg`Approvers`,
|
||||
},
|
||||
[RecipientRole.CC]: {
|
||||
actionVerb: `CC`,
|
||||
actioned: `CC'd`,
|
||||
progressiveVerb: `CC`,
|
||||
roleName: `Cc`,
|
||||
roleNamePlural: msg`Ccers`,
|
||||
},
|
||||
[RecipientRole.SIGNER]: {
|
||||
actionVerb: `Sign`,
|
||||
actioned: `Signed`,
|
||||
progressiveVerb: `Signing`,
|
||||
roleName: `Signer`,
|
||||
roleNamePlural: msg`Signers`,
|
||||
},
|
||||
[RecipientRole.VIEWER]: {
|
||||
actionVerb: `View`,
|
||||
actioned: `Viewed`,
|
||||
progressiveVerb: `Viewing`,
|
||||
roleName: `Viewer`,
|
||||
roleNamePlural: msg`Viewers`,
|
||||
},
|
||||
} satisfies Record<keyof typeof RecipientRole, unknown>;
|
||||
|
||||
Reference in New Issue
Block a user