-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(j-s): Notifications to advocates in civil claims cases (#16264)
* fix(j-s): Civil claimant view for courts * feat(j-s): Judge can add and remove advocates * Update civilClaimant.controller.ts * Fixed key on Box * Change DEFENDER_ASSIGNED to ADVOCATE_ASSIGNED * Checkpoint * Checkpoint * Update string * Add tests * Rename defender -- advocate * Rename defender -- advocate * Fix typo: hmtl -- html * Refactor tests * Add promise handling to email sending * Rename parameters * Fix tests * Reorder imports * Fix texts * Fix texts * Fix texts * Fix tests * Use correct types * Use correct types --------- Co-authored-by: unakb <[email protected]> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
- Loading branch information
1 parent
4309e6f
commit db83d3f
Showing
17 changed files
with
353 additions
and
124 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
apps/judicial-system/backend/migrations/20241003213354-update-notification.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
'use strict' | ||
const replaceEnum = require('sequelize-replace-enum-postgres').default | ||
|
||
module.exports = { | ||
up: (queryInterface) => { | ||
// replaceEnum does not support transactions | ||
return replaceEnum({ | ||
queryInterface, | ||
tableName: 'notification', | ||
columnName: 'type', | ||
newValues: [ | ||
'HEADS_UP', | ||
'READY_FOR_COURT', | ||
'RECEIVED_BY_COURT', | ||
'COURT_DATE', | ||
'RULING', | ||
'MODIFIED', | ||
'REVOKED', | ||
'ADVOCATE_ASSIGNED', // Changed value | ||
'DEFENDANTS_NOT_UPDATED_AT_COURT', | ||
'APPEAL_TO_COURT_OF_APPEALS', | ||
'APPEAL_RECEIVED_BY_COURT', | ||
'APPEAL_STATEMENT', | ||
'APPEAL_COMPLETED', | ||
'APPEAL_JUDGES_ASSIGNED', | ||
'APPEAL_CASE_FILES_UPDATED', | ||
'APPEAL_WITHDRAWN', | ||
'INDICTMENT_DENIED', | ||
'INDICTMENT_RETURNED', | ||
'INDICTMENTS_WAITING_FOR_CONFIRMATION', | ||
], | ||
enumName: 'enum_notification_type', | ||
}) | ||
}, | ||
|
||
down: (queryInterface) => { | ||
// replaceEnum does not support transactions | ||
return replaceEnum({ | ||
queryInterface, | ||
tableName: 'notification', | ||
columnName: 'type', | ||
newValues: [ | ||
'HEADS_UP', | ||
'READY_FOR_COURT', | ||
'RECEIVED_BY_COURT', | ||
'COURT_DATE', | ||
'RULING', | ||
'MODIFIED', | ||
'REVOKED', | ||
'DEFENDER_ASSIGNED', | ||
'DEFENDANTS_NOT_UPDATED_AT_COURT', | ||
'APPEAL_TO_COURT_OF_APPEALS', | ||
'APPEAL_RECEIVED_BY_COURT', | ||
'APPEAL_STATEMENT', | ||
'APPEAL_COMPLETED', | ||
'APPEAL_JUDGES_ASSIGNED', | ||
'APPEAL_CASE_FILES_UPDATED', | ||
'APPEAL_WITHDRAWN', | ||
'INDICTMENT_DENIED', | ||
'INDICTMENT_RETURNED', | ||
'INDICTMENTS_WAITING_FOR_CONFIRMATION', | ||
], | ||
enumName: 'enum_notification_type', | ||
}) | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.