mirror of
https://github.com/documenso/documenso.git
synced 2026-07-24 00:43:40 +10:00
chore: code changes based of review
This commit is contained in:
@@ -15,7 +15,7 @@ export const ZAddSignerSchema = z.object({
|
||||
.min(1),
|
||||
name: z.string(),
|
||||
role: z.nativeEnum(RecipientRole),
|
||||
expiry: z.date().optional(),
|
||||
expiry: z.date().min(new Date(), { message: 'Expiry date must be in the future' }).optional(),
|
||||
signingOrder: z.number().optional(),
|
||||
actionAuth: ZMapNegativeOneToUndefinedSchema.pipe(ZRecipientActionAuthTypesSchema.optional()),
|
||||
});
|
||||
|
||||
@@ -164,6 +164,8 @@ export function DocumentExpiryDialog({
|
||||
case 'months':
|
||||
expiryDate = addMonths(now, values.amount);
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Invalid unit: ${values.unit}`);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -173,10 +175,10 @@ export function DocumentExpiryDialog({
|
||||
expiry: expiryDate,
|
||||
});
|
||||
|
||||
// TODO: Implement logic to update expiry when resending document
|
||||
// TODO: Duncan => Implement logic to update expiry when resending document
|
||||
// This should be handled on the server-side when a document is resent
|
||||
|
||||
// TODO: Implement logic to mark recipients as expired
|
||||
// TODO: Duncan => Implement logic to mark recipients as expired
|
||||
// This should be a scheduled task or part of the completion process on the server
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user