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> {
Deposit((short) 0),
Export((short) 1);
Export((short) 1),
Evaluate((short) 2);
private final Short value;

View File

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

View File

@ -83,6 +83,7 @@ export class EnumUtils {
switch (status) {
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.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 {
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) {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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