-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Insert Rate #1865
Insert Rate #1865
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks awesome!
revisionFormData: z.string(), | ||
createdAt: z.date(), | ||
updatedAt: z.date(), | ||
revisionFormData: rateFormDataSchema, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also change contractRevisionSchema.formData
to contractRevisionSchema.revisionFormData
. Just to keep revision fields similar.
revisions: allRevisions.reverse(), | ||
} | ||
|
||
return finalRate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will be doing the validation using Zod in a later ticket? Makes sense to me if we are, but just confirming here.
revisionFormData: rr.rateRevision.name, | ||
}) | ||
), | ||
rateRevisions: [], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is rateRevisions
still needed here? It could be confusing that these contractRevisions
have an empty array of rateRevisions
. This empty string could also mean no relationships in the DB. I rather we are explicit and not include it in finalRate
.
id: rate.id, | ||
status: 'DRAFT', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you mentioned using getContractStatus
here instead of hard coding the status.
Summary
I started from scratch and copied over rate work from Hana's branch to get insertRate working.
There's still a decent amount of type cleanup to work through but this is working
Related issues
Screenshots
Test cases covered
QA guidance