Skip to content
Snippets Groups Projects
Commit f78ccbc3 authored by Guillaume Heurtier's avatar Guillaume Heurtier
Browse files

FIX #15392 TIME 1:10 fix update current user in visa circuit in signature book with privilege

parent a98dfe2c
No related branches found
No related tags found
No related merge requests found
...@@ -12,6 +12,7 @@ import { MatDialog } from '@angular/material/dialog'; ...@@ -12,6 +12,7 @@ import { MatDialog } from '@angular/material/dialog';
import { AddVisaModelModalComponent } from './addVisaModel/add-visa-model-modal.component'; import { AddVisaModelModalComponent } from './addVisaModel/add-visa-model-modal.component';
import { ConfirmComponent } from '../../plugins/modal/confirm.component'; import { ConfirmComponent } from '../../plugins/modal/confirm.component';
import {ActivatedRoute} from "@angular/router"; import {ActivatedRoute} from "@angular/router";
import {PrivilegeService} from '@service/privileges.service';
@Component({ @Component({
selector: 'app-visa-workflow', selector: 'app-visa-workflow',
...@@ -66,7 +67,8 @@ export class VisaWorkflowComponent implements OnInit { ...@@ -66,7 +67,8 @@ export class VisaWorkflowComponent implements OnInit {
private latinisePipe: LatinisePipe, private latinisePipe: LatinisePipe,
public dialog: MatDialog, public dialog: MatDialog,
private scanPipe: ScanPipe, private scanPipe: ScanPipe,
private route: ActivatedRoute private route: ActivatedRoute,
private privilegeService: PrivilegeService
) { ) {
// ngOnInit is not called if navigating in the same component : must be in constructor for this case // ngOnInit is not called if navigating in the same component : must be in constructor for this case
this.route.params.subscribe(params => { this.route.params.subscribe(params => {
...@@ -627,8 +629,10 @@ export class VisaWorkflowComponent implements OnInit { ...@@ -627,8 +629,10 @@ export class VisaWorkflowComponent implements OnInit {
canManageUser(item: any, i: number) { canManageUser(item: any, i: number) {
if (this.adminMode) { if (this.adminMode) {
if (!this.functions.empty(item.process_date) || (this.target === 'signatureBook' && this.getCurrentVisaUserIndex() === i)) { if (!this.functions.empty(item.process_date)) {
return false; return false;
} else if (this.target === 'signatureBook' && this.getCurrentVisaUserIndex() === i) {
return this.privilegeService.hasCurrentUserPrivilege('modify_visa_in_signatureBook');
} else { } else {
return true; return true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment