Commit ba87b117 authored by hasan khaddour's avatar hasan khaddour

fix s

parent 2a9661cd
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
</div> <!-- .row --> </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 shadow mb-4">
<div class="card-body file-list"> <div class="card-body file-list">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
......
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Project } from '../../../models/responses/project'; import { Project } from '../../../models/responses/project';
import { UserService } from '../../../../core/services/authentication/user.service';
import { ROLES } from '../../../../core/constants/roles';
@Component({ @Component({
selector: 'plan-controll', selector: 'plan-controll',
...@@ -10,8 +12,18 @@ export class PlanControllComponent { ...@@ -10,8 +12,18 @@ export class PlanControllComponent {
@Input() project : Project @Input() project : Project
@Output() toProgress = new EventEmitter<void>() @Output() toProgress = new EventEmitter<void>()
constructor(
private userService : UserService
){}
onMoveToProgress() { onMoveToProgress() {
this.toProgress.emit(); this.toProgress.emit();
} }
canSee(): boolean {
return this.userService.hasRole(ROLES.SCIENTIFIC_DEPUTY)
}
} }
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
</div> <!-- .card-body --> </div> <!-- .card-body -->
</div> <!-- .card --> </div> <!-- .card -->
</div> </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 shadow mb-4">
<div class="card-body file-list"> <div class="card-body file-list">
<div class="d-flex align-items-center"> <div class="d-flex align-items-center">
......
import { Component, EventEmitter, Input, Output } from '@angular/core'; import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Project } from '../../../models/responses/project'; import { Project } from '../../../models/responses/project';
import { UserService } from '../../../../core/services/authentication/user.service';
import { ROLES } from '../../../../core/constants/roles';
@Component({ @Component({
selector: 'track-controll', selector: 'track-controll',
...@@ -13,6 +15,11 @@ export class TrackControllComponent { ...@@ -13,6 +15,11 @@ export class TrackControllComponent {
@Output() replan = new EventEmitter(); @Output() replan = new EventEmitter();
constructor(
private userService :UserService
){}
onComplete(){ onComplete(){
this.complete.emit(); this.complete.emit();
} }
...@@ -21,4 +28,10 @@ export class TrackControllComponent { ...@@ -21,4 +28,10 @@ export class TrackControllComponent {
this.replan.emit(); this.replan.emit();
} }
canSee(): boolean {
return this.userService.hasRole(ROLES.SCIENTIFIC_DEPUTY)
}
} }
...@@ -80,7 +80,8 @@ export class StepListComponent { ...@@ -80,7 +80,8 @@ export class StepListComponent {
modalRef.result.then((result) => { modalRef.result.then((result) => {
if (result) { if (result) {
// Add the new project to the list // Add the new project to the list
step.weight=result.weight step.weight=result
this.selectedItem={...step}
} }
}, (reason) => { }, (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