-
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.
Merge branch 'main' of github.com:island-is/island.is into j-s/case-f…
…iles-added-notification
- Loading branch information
Showing
169 changed files
with
4,556 additions
and
1,523 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
for c in kubectx kubectl aws; do | ||
if ! command -v "$c" >/dev/null; then | ||
echo "$c not installed" | ||
return | ||
fi | ||
done | ||
|
||
set-kubectx() { | ||
: "${AWS_PROFILE:=}" | ||
if kubectx | grep -q "${AWS_PROFILE##islandis-}"; then | ||
return | ||
fi | ||
echo "Setting kube context..." >&2 | ||
AWS_ACCOUNT_ID="$(aws sts get-caller-identity | jq -r '.Account')" | ||
kubectx "$(kubectx | grep "${AWS_ACCOUNT_ID}")" | ||
CLUSTER="$(kubectl config current-context | sed 's/.*\///')" | ||
export CLUSTER | ||
} | ||
|
||
set-kubectx |
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
Validating CODEOWNERS rules …
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,8 +29,7 @@ TODO | |
*.todo | ||
.env | ||
.env.* | ||
!.env.podman | ||
.envrc.* | ||
.envrc.private | ||
.nvmrc | ||
.node-version | ||
# IDE - VSCode | ||
|
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
70 changes: 70 additions & 0 deletions
70
apps/judicial-system/backend/migrations/20241015105921-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,70 @@ | ||
'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', | ||
'DEFENDER_ASSIGNED', | ||
'ADVOCATE_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', | ||
'SERVICE_SUCCESSFUL', // New value | ||
'SERVICE_FAILED', // New value | ||
'DEFENDANT_SELECTED_DEFENDER', // New value | ||
], | ||
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
Oops, something went wrong.