From 52b7a95ae3c9c02e0ea744db2f9abef96aa578ee Mon Sep 17 00:00:00 2001 From: amahdysancsoft Date: Thu, 17 Oct 2024 11:35:38 -0400 Subject: [PATCH] added a condition on points edit to make it show for any role other than staff --- .../planning-points.component.html | 15 ++++++++++++--- .../planning-points/planning-points.component.ts | 5 +++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/src/angular/hq/src/app/planning/planning-points/planning-points.component.html b/src/angular/hq/src/app/planning/planning-points/planning-points.component.html index 104cf270..f5f6f717 100644 --- a/src/angular/hq/src/app/planning/planning-points/planning-points.component.html +++ b/src/angular/hq/src/app/planning/planning-points/planning-points.component.html @@ -82,9 +82,18 @@

Planning Points

> - + @if ( + [HQRole.Manager, HQRole.Partner, HQRole.Administrator] + | inRole + | async + ) { + + } @for (point of staff.points; track point.id) { diff --git a/src/angular/hq/src/app/planning/planning-points/planning-points.component.ts b/src/angular/hq/src/app/planning/planning-points/planning-points.component.ts index 35c99ef5..da200f8e 100644 --- a/src/angular/hq/src/app/planning/planning-points/planning-points.component.ts +++ b/src/angular/hq/src/app/planning/planning-points/planning-points.component.ts @@ -26,6 +26,8 @@ import { formControlChanges } from '../../core/functions/form-control-changes'; import { PlanningPointsModalComponent } from '../planning-points-modal/planning-points-modal.component'; import { Dialog } from '@angular/cdk/dialog'; import { SelectInputComponent } from '../../core/components/select-input/select-input.component'; +import { HQRole } from '../../enums/hqrole'; +import { InRolePipe } from '../../pipes/in-role.pipe'; @Component({ selector: 'hq-planning-points', @@ -34,6 +36,7 @@ import { SelectInputComponent } from '../../core/components/select-input/select- CommonModule, CoreModule, RouterLink, + InRolePipe, FormsModule, ReactiveFormsModule, SelectInputComponent, @@ -56,6 +59,8 @@ export class PlanningPointsComponent implements OnDestroy { chargeCodeToColor = chargeCodeToColor; private destroyed$: ReplaySubject = new ReplaySubject(1); + HQRole = HQRole; + summary$: Observable; constructor(