fix: update types from code review

This commit is contained in:
Ephraim Atta-Duncan
2023-06-30 23:49:34 +00:00
committed by Mythie
parent a94f447e9e
commit 0de4fe5883
6 changed files with 19 additions and 14 deletions

View File

@ -1,8 +1,13 @@
import { Recipient } from '@documenso/prisma/client';
export const type = (recipient: Recipient) =>
recipient.sendStatus === 'SENT' && recipient.signingStatus === 'SIGNED'
? 'completed'
: recipient.sendStatus === 'SENT' && recipient.signingStatus === 'NOT_SIGNED'
? 'waiting'
: 'unsigned';
export const getRecipientType = (recipient: Recipient) => {
if (recipient.sendStatus === 'SENT' && recipient.signingStatus === 'SIGNED') {
return 'completed';
}
if (recipient.sendStatus === 'SENT' && recipient.signingStatus === 'NOT_SIGNED') {
return 'waiting';
}
return 'unsigned';
};