PSP-11387 remove the notice of claim if the noc comment/date are not specified.#5286
PSP-11387 remove the notice of claim if the noc comment/date are not specified.#5286devinleighsmith merged 3 commits intobcgov:devfrom
Conversation
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5286 |
asanchezr
left a comment
There was a problem hiding this comment.
Looks good. See comments
| product: null, | ||
| project: null, | ||
| noticeOfClaim: exists(this.noticeOfClaim) ? [this.noticeOfClaim] : [], | ||
| noticeOfClaim: hasNoticeOfClaim && noticeOfClaim ? [noticeOfClaim] : [], |
There was a problem hiding this comment.
nit:
| noticeOfClaim: hasNoticeOfClaim && noticeOfClaim ? [noticeOfClaim] : [], | |
| noticeOfClaim: hasNoticeOfClaim && exists(noticeOfClaim) ? [noticeOfClaim] : [], |
| toApi(): ApiGen_Concepts_AcquisitionFile { | ||
| const fileProperties = this.properties.map(x => this.toPropertyApi(x)); | ||
| const sortedProperties = applyDisplayOrder(fileProperties); | ||
| const noticeOfClaim: ApiGen_Concepts_NoticeOfClaim | null = this.noticeOfClaim |
| noticeOfClaim: ApiGen_Concepts_NoticeOfClaim; | ||
|
|
||
| toApi(): ApiGen_Concepts_AcquisitionFile { | ||
| const noticeOfClaim: ApiGen_Concepts_NoticeOfClaim | null = this.noticeOfClaim |
There was a problem hiding this comment.
nit: same comments regarding exists()
| comment: yup.string().max(4000, 'Notice of claim comment must be at most ${max} characters'), | ||
| comment: yup | ||
| .string() | ||
| .nullable() |
There was a problem hiding this comment.
I think this nullable validation should be added to AddAcquisitionFileYupSchema.ts as well - right?
| const sortedProperties = applyDisplayOrder(fileProperties); | ||
| const personId = this.responsiblePayer?.personId ?? null; | ||
| const organizationId = !personId ? this.responsiblePayer?.organizationId ?? null : null; | ||
| const noticeOfClaim: ApiGen_Concepts_NoticeOfClaim | null = this.noticeOfClaim |
There was a problem hiding this comment.
same comments re: exists()
There was a problem hiding this comment.
Also AddManagementFormYupSchema needs to be updated with nullable comment field
|
|
See CodeCov Report Here: https://app.codecov.io/github/bcgov/psp/pull/5286 |



No description provided.