Skip to content

Commit

Permalink
make review.reviewDate non-nullable (#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
bill-moj authored Nov 6, 2024
1 parent 981ec76 commit 436b305
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions server/@types/csip/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ export interface components {
* @description The date of the review.
* @example 2021-09-27
*/
reviewDate?: string
reviewDate: string
/** @description The username of the person who recorded the review. */
recordedBy: string
/** @description The displayable name of the person who recorded the review. */
Expand Down Expand Up @@ -1250,7 +1250,7 @@ export interface components {
* @description The date of the review.
* @example 2021-09-27
*/
reviewDate?: string
reviewDate: string
/** @description The username of the person who recorded the review. */
recordedBy: string
/** @description The displayable name of the person who recorded the review. */
Expand Down Expand Up @@ -1400,7 +1400,7 @@ export interface components {
* @description The date of the review.
* @example 2021-09-27
*/
reviewDate?: string
reviewDate: string
/** @description The username of the person who recorded the review. */
recordedBy: string
/** @description The displayable name of the person who recorded the review. */
Expand Down Expand Up @@ -1530,7 +1530,7 @@ export interface components {
* @description The date of the review.
* @example 2021-09-27
*/
reviewDate?: string
reviewDate: string
/** @description The username of the person who recorded the review. */
recordedBy: string
/** @description The displayable name of the person who recorded the review. */
Expand Down
2 changes: 1 addition & 1 deletion server/routes/csip-records/components/reviews.njk
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
text: 'Review date'
},
value: {
text: (review.reviewDate | formatDisplayDate) or 'Not provided'
text: review.reviewDate | formatDisplayDate
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion server/routes/journeys/base/patchReviewController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class PatchReviewController extends BaseJourneyController {
const payload = {
recordedBy: review.recordedBy,
recordedByDisplayName: review.recordedByDisplayName,
...getNonUndefinedProp(review, 'reviewDate'),
reviewDate: review.reviewDate,
...getNonUndefinedProp(review, 'nextReviewDate'),
...getNonUndefinedProp(review, 'summary'),
...getNonUndefinedProp(review, 'csipClosedDate'),
Expand Down
2 changes: 1 addition & 1 deletion server/routes/journeys/update-review/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class UpdateReviewController extends BaseJourneyController {

req.journeyData.review = {
reviewUuid: review.reviewUuid,
...getNonUndefinedProp(review, 'reviewDate'),
reviewDate: review.reviewDate,
...getNonUndefinedProp(review, 'nextReviewDate'),
...getNonUndefinedProp(review, 'summary'),
outcome: review.csipClosedDate ? 'CLOSE_CSIP' : 'REMAIN_ON_CSIP',
Expand Down
2 changes: 1 addition & 1 deletion server/routes/journeys/update-review/view.njk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
text: "Review date"
},
value: {
html: (review.reviewDate | formatDisplayDate) or 'Not provided'
html: review.reviewDate | formatDisplayDate
}
},
{
Expand Down

0 comments on commit 436b305

Please sign in to comment.