Skip to content
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

Merged
merged 9 commits into from
Aug 9, 2023
Merged

Insert Rate #1865

merged 9 commits into from
Aug 9, 2023

Conversation

macrael
Copy link
Contributor

@macrael macrael commented Aug 8, 2023

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

Copy link
Contributor

@JasonLin0991 JasonLin0991 left a 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,
Copy link
Contributor

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
Copy link
Contributor

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: [],
Copy link
Contributor

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',
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants