add evaluate to plan status available actions
This commit is contained in:
parent
1babd34802
commit
bd72ca9139
|
@ -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;
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
export enum PlanStatusAvailableActionType {
|
export enum PlanStatusAvailableActionType {
|
||||||
Deposit = 0,
|
Deposit = 0,
|
||||||
Export = 1
|
Export = 1,
|
||||||
|
Evaluate = 2
|
||||||
}
|
}
|
|
@ -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');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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": "Δημοσιευμένο"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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é"
|
||||||
|
|
|
@ -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"
|
||||||
|
|
|
@ -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ı"
|
||||||
|
|
Loading…
Reference in New Issue