@opencrvs/toolkit 2.0.0-rc.ff777d6 → 2.0.0-rc.ff8df64
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/events/index.js
CHANGED
|
@@ -10623,18 +10623,19 @@ var ACTION_FILTERS = {
|
|
|
10623
10623
|
function filterActionsByFlags(actions, flags) {
|
|
10624
10624
|
return actions.filter((action) => ACTION_FILTERS[action]?.(flags) ?? true);
|
|
10625
10625
|
}
|
|
10626
|
+
var REJECTED_ACTIONS = [
|
|
10627
|
+
ActionType.READ,
|
|
10628
|
+
ActionType.NOTIFY,
|
|
10629
|
+
ActionType.CUSTOM,
|
|
10630
|
+
ActionType.EDIT,
|
|
10631
|
+
ActionType.ARCHIVE
|
|
10632
|
+
];
|
|
10626
10633
|
function getAvailableActionsWithoutFlagFilters(status2, flags) {
|
|
10627
10634
|
if (flags.includes(InherentFlags.EDIT_IN_PROGRESS)) {
|
|
10628
10635
|
return [ActionType.NOTIFY, ActionType.DECLARE, ActionType.REGISTER];
|
|
10629
10636
|
}
|
|
10630
|
-
if (flags.includes(InherentFlags.REJECTED)) {
|
|
10631
|
-
return
|
|
10632
|
-
ActionType.READ,
|
|
10633
|
-
ActionType.NOTIFY,
|
|
10634
|
-
ActionType.CUSTOM,
|
|
10635
|
-
ActionType.EDIT,
|
|
10636
|
-
ActionType.ARCHIVE
|
|
10637
|
-
];
|
|
10637
|
+
if (flags.includes(InherentFlags.REJECTED) && status2 !== EventStatus.enum.ARCHIVED) {
|
|
10638
|
+
return REJECTED_ACTIONS;
|
|
10638
10639
|
}
|
|
10639
10640
|
return AVAILABLE_ACTIONS_BY_EVENT_STATUS[status2];
|
|
10640
10641
|
}
|
|
@@ -7241,6 +7241,13 @@ var ACTION_FILTERS = {
|
|
|
7241
7241
|
[ActionType.UNASSIGN]: (flags) => !flags.some((flag) => flag.endsWith(":requested")),
|
|
7242
7242
|
[ActionType.CUSTOM]: (flags) => !flags.some((flag) => flag.endsWith(":requested"))
|
|
7243
7243
|
};
|
|
7244
|
+
var REJECTED_ACTIONS = [
|
|
7245
|
+
ActionType.READ,
|
|
7246
|
+
ActionType.NOTIFY,
|
|
7247
|
+
ActionType.CUSTOM,
|
|
7248
|
+
ActionType.EDIT,
|
|
7249
|
+
ActionType.ARCHIVE
|
|
7250
|
+
];
|
|
7244
7251
|
|
|
7245
7252
|
// ../commons/src/events/FileUtils.ts
|
|
7246
7253
|
var import_lodash7 = require("lodash");
|
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|