add evaluate to plan status available actions

This commit is contained in:
CITE\amentis 2024-10-15 12:19:35 +03:00
parent 1babd34802
commit bd72ca9139
15 changed files with 29 additions and 14 deletions

View File

@ -8,7 +8,8 @@ import java.util.Map;
public enum PlanStatusAvailableActionType implements DatabaseEnum<Short> { public enum PlanStatusAvailableActionType implements DatabaseEnum<Short> {
Deposit((short) 0), Deposit((short) 0),
Export((short) 1); Export((short) 1),
Evaluate((short) 2);
private final Short value; private final Short value;

View File

@ -1,4 +1,5 @@
export enum PlanStatusAvailableActionType { export enum PlanStatusAvailableActionType {
Deposit = 0, Deposit = 0,
Export = 1 Export = 1,
Evaluate = 2
} }

View File

@ -83,6 +83,7 @@ export class EnumUtils {
switch (status) { switch (status) {
case PlanStatusAvailableActionType.Deposit: return this.language.instant('TYPES.PLAN-STATUS-AVAILABLE-ACTION-TYPE.DEPOSIT'); case PlanStatusAvailableActionType.Deposit: return this.language.instant('TYPES.PLAN-STATUS-AVAILABLE-ACTION-TYPE.DEPOSIT');
case PlanStatusAvailableActionType.Export: return this.language.instant('TYPES.PLAN-STATUS-AVAILABLE-ACTION-TYPE.EXPORT'); case PlanStatusAvailableActionType.Export: return this.language.instant('TYPES.PLAN-STATUS-AVAILABLE-ACTION-TYPE.EXPORT');
case PlanStatusAvailableActionType.Evaluate: return this.language.instant('TYPES.PLAN-STATUS-AVAILABLE-ACTION-TYPE.EVALUATE');
} }
} }

View File

@ -322,7 +322,8 @@ export class PlanOverviewComponent extends BaseComponent implements OnInit {
canEvaluatePlan(): boolean { canEvaluatePlan(): boolean {
const authorizationFlags = !this.isPublicView ? (this.plan as Plan).authorizationFlags : []; const authorizationFlags = !this.isPublicView ? (this.plan as Plan).authorizationFlags : [];
return (authorizationFlags?.some(x => x === AppPermission.EvaluatePlan) || this.authentication.hasPermission(AppPermission.EvaluatePlan)); return (authorizationFlags?.some(x => x === AppPermission.EvaluatePlan) || this.authentication.hasPermission(AppPermission.EvaluatePlan)) &&
this.plan?.status?.definition?.availableActions?.filter(x => x === PlanStatusAvailableActionType.Evaluate).length > 0;
} }
onEvaluatePlan(planId: Guid, evaluatorId: string, format: string, rankConfig: RankConfig ,isPublicView: boolean) { onEvaluatePlan(planId: Guid, evaluatorId: string, format: string, rankConfig: RankConfig ,isPublicView: boolean) {

View File

@ -2159,7 +2159,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Argitaratuta" "PUBLIC": "Argitaratuta"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Veröffentlicht" "PUBLIC": "Veröffentlicht"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Published" "PUBLIC": "Published"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Publicado" "PUBLIC": "Publicado"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Δημοσιευμένο" "PUBLIC": "Δημοσιευμένο"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Objavljeno" "PUBLIC": "Objavljeno"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Opublikowane" "PUBLIC": "Opublikowane"

View File

@ -2161,7 +2161,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Publicado" "PUBLIC": "Publicado"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Publikované" "PUBLIC": "Publikované"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Objavljeno" "PUBLIC": "Objavljeno"

View File

@ -2162,7 +2162,8 @@
}, },
"PLAN-STATUS-AVAILABLE-ACTION-TYPE": { "PLAN-STATUS-AVAILABLE-ACTION-TYPE": {
"DEPOSIT": "Deposit", "DEPOSIT": "Deposit",
"EXPORT": "Export" "EXPORT": "Export",
"EVALUATE": "Evaluate"
}, },
"PLAN-VISIBILITY": { "PLAN-VISIBILITY": {
"PUBLIC": "Yayınlandı" "PUBLIC": "Yayınlandı"