FIX Routing Kundenalage

This commit is contained in:
Lorenz Hilpert
2022-10-11 10:41:25 +02:00
parent fdd5373aaf
commit 4050e9605d

View File

@@ -12,14 +12,16 @@ export class CustomerCreateGuard implements CanActivateChild, CanActivate {
return true;
}
const processId = this.getProcessId(route);
const canActivateCustomerType = await this.canActivateCustomerType(processId, 'store');
let customerType = 'store';
if (canActivateCustomerType === true) {
return true;
const processId = this.getProcessId(route);
const canActivateCustomerType = await this.canActivateCustomerType(processId, customerType);
if (canActivateCustomerType !== true) {
customerType = canActivateCustomerType[0];
}
await this.navigate(processId, canActivateCustomerType[0]);
await this.navigate(processId, customerType);
return true;
}