mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
fix: update types from code review
This commit is contained in:
committed by
Mythie
parent
a94f447e9e
commit
0de4fe5883
@ -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';
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user