Commit ba87b117 authored by hasan khaddour's avatar hasan khaddour

fix s

parent 2a9661cd
......@@ -57,7 +57,7 @@
</div> <!-- .row -->
<div class="col-md-6 col-lg-4" (click)="onMoveToProgress()">
<div class="col-md-6 col-lg-4" *ngIf="canSee()" (click)="onMoveToProgress()">
<div class="card shadow mb-4">
<div class="card-body file-list">
<div class="d-flex align-items-center">
......
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Project } from '../../../models/responses/project';
import { UserService } from '../../../../core/services/authentication/user.service';
import { ROLES } from '../../../../core/constants/roles';
@Component({
selector: 'plan-controll',
......@@ -10,8 +12,18 @@ export class PlanControllComponent {
@Input() project : Project
@Output() toProgress = new EventEmitter<void>()
constructor(
private userService : UserService
){}
onMoveToProgress() {
this.toProgress.emit();
}
canSee(): boolean {
return this.userService.hasRole(ROLES.SCIENTIFIC_DEPUTY)
}
}
......@@ -32,7 +32,7 @@
</div> <!-- .card-body -->
</div> <!-- .card -->
</div>
<div class="col-md-6 col-lg-4" (click)="onReplan()">
<div class="col-md-6 col-lg-4" *ngIf="canSee()" (click)="onReplan()">
<div class="card shadow mb-4">
<div class="card-body file-list">
<div class="d-flex align-items-center">
......
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Project } from '../../../models/responses/project';
import { UserService } from '../../../../core/services/authentication/user.service';
import { ROLES } from '../../../../core/constants/roles';
@Component({
selector: 'track-controll',
......@@ -13,6 +15,11 @@ export class TrackControllComponent {
@Output() replan = new EventEmitter();
constructor(
private userService :UserService
){}
onComplete(){
this.complete.emit();
}
......@@ -21,4 +28,10 @@ export class TrackControllComponent {
this.replan.emit();
}
canSee(): boolean {
return this.userService.hasRole(ROLES.SCIENTIFIC_DEPUTY)
}
}
......@@ -80,7 +80,8 @@ export class StepListComponent {
modalRef.result.then((result) => {
if (result) {
// Add the new project to the list
step.weight=result.weight
step.weight=result
this.selectedItem={...step}
}
}, (reason) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment