🎨 🧹📝 remove todos, document typing

This commit is contained in:
Timur Ercan
2023-03-01 14:58:31 +01:00
parent 035371bc0b
commit 53094dd9e4
8 changed files with 7 additions and 18 deletions

View File

@ -120,9 +120,6 @@ export async function getServerSideProps(context: any) {
context.res
);
// todo optimize querys
// todo no intersection groups
return {
props: {
document: JSON.parse(JSON.stringify({ ...document, document: "" })),

View File

@ -67,8 +67,6 @@ const SignPage: NextPageWithLayout = (props: any) => {
export async function getServerSideProps(context: any) {
const recipientToken: string = context.query["token"];
// todo redirect to sigend of all already signed
await prisma.recipient.updateMany({
where: {
token: recipientToken,
@ -87,7 +85,7 @@ export async function getServerSideProps(context: any) {
},
});
// Document was already signed
// Document is already signed
if (recipient.Document.status === DocumentStatus.COMPLETED) {
return {
redirect: {
@ -97,8 +95,7 @@ export async function getServerSideProps(context: any) {
};
}
// Clean up unsigned free place fields from UI from previous page visits
// todo refactor free sign fields to be client side only
// Clean up potential unsigned free place fields from UI from previous page visits
await prisma.field.deleteMany({
where: {
type: { in: [FieldType.FREE_SIGNATURE] },