refresh issue fix
This commit is contained in:
parent
af86f4a33b
commit
f033848bc7
@ -69,9 +69,13 @@ export class LoginComponent implements OnInit {
|
||||
localStorage.setItem('email',JSON.stringify(auth))
|
||||
this.disable= true
|
||||
this.showToast('success', 'Login Successfully', 'Welcome..!');
|
||||
setTimeout(() => {
|
||||
this.router.navigate(['/home'])
|
||||
}, 500);
|
||||
|
||||
if(res.role == 'FRONT-OFFICE'){
|
||||
this.router.navigate(['/home'])
|
||||
}else{
|
||||
this.router.navigate(['/pages/dashboard'])
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@
|
||||
<nb-option value="Out For Delivery" >Out For Delivery</nb-option>
|
||||
|
||||
<!-- <nb-option value="Delivered" >Delivered</nb-option> -->
|
||||
<nb-option value="Cancelled" >Cancelled</nb-option>
|
||||
<!-- <nb-option value="Cancelled" >Cancelled</nb-option> -->
|
||||
|
||||
</nb-select>
|
||||
<!-- <label for="subject">Drivers:</label> <br /> -->
|
||||
|
||||
@ -19,22 +19,16 @@ export class PagesComponent {
|
||||
|
||||
menu = MENU_ITEMS;
|
||||
|
||||
constructor(private router: Router){
|
||||
let role = localStorage.getItem('user_role')
|
||||
console.log(role)
|
||||
constructor(private router: Router){}
|
||||
|
||||
ngOnInit() {
|
||||
const role = localStorage.getItem('user_role');
|
||||
console.log(role);
|
||||
|
||||
if(role == "FRONT-OFFICE"){
|
||||
this.menu = this.menu.filter(arr=>{return arr.title != 'Users'})
|
||||
if (role === 'FRONT-OFFICE') {
|
||||
this.menu = this.menu.filter((item) => item.title !== 'Users');
|
||||
}
|
||||
|
||||
|
||||
console.log(this.menu)
|
||||
|
||||
this.router.navigate(['/pages/dashboard']);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
console.log(this.menu);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user