From 4015985aa7489e3c4c55ccecbe7fee2da82c3eb2 Mon Sep 17 00:00:00 2001 From: Pierre Narcisi Date: Thu, 14 Sep 2023 15:54:59 +0200 Subject: [PATCH 1/2] fix(synthese) changed required permissions to change report --- frontend/src/app/shared/alertInfoModule/alert-Info.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts index f7de01cf3c..048c7b7c0e 100644 --- a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts +++ b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts @@ -51,7 +51,7 @@ export class AlertInfoComponent implements OnInit, OnChanges { }); } ngOnChanges() { - this.canChangeAlert = this.userCruved?.V && this.userCruved?.V > 0 && !isEmpty(this.alert); + this.canChangeAlert = this.userCruved?.R && this.userCruved?.R > 0 && !isEmpty(this.alert); } /** * Create new alert with /reports GET service From 90d0921615b4e6343f05503587c82cc82e11ee7c Mon Sep 17 00:00:00 2001 From: Pierre Narcisi Date: Fri, 15 Sep 2023 11:18:28 +0200 Subject: [PATCH 2/2] fix(validation) change the permission to validation R --- .../src/app/shared/alertInfoModule/alert-Info.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts index 048c7b7c0e..9f78949edc 100644 --- a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts +++ b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts @@ -51,7 +51,10 @@ export class AlertInfoComponent implements OnInit, OnChanges { }); } ngOnChanges() { - this.canChangeAlert = this.userCruved?.R && this.userCruved?.R > 0 && !isEmpty(this.alert); + let moduleValidation = this.moduleService.getModule('VALIDATION'); + + this.canChangeAlert = + moduleValidation?.cruved?.R && moduleValidation?.cruved?.R > 0 && !isEmpty(this.alert); } /** * Create new alert with /reports GET service