password encryption
This commit is contained in:
parent
15694ecde1
commit
2a41601026
@ -100,6 +100,38 @@ export class CustomersListComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
this._cus.getCustomersListDetails().subscribe(res => {
|
||||||
|
if (res.status == 200) {
|
||||||
|
this.isLoading = false
|
||||||
|
this.customersList = res.data;
|
||||||
|
console.log(this.customersList)
|
||||||
|
this.customersListLength = res.data.length;
|
||||||
|
console.log(this.customersListLength)
|
||||||
|
this.customersListSource['data'] = this.customersList;
|
||||||
|
console.log(this.customersListSource)
|
||||||
|
this.recordStatus=false;
|
||||||
|
|
||||||
|
console.log(this.customersList,this.appoinmentsIds)
|
||||||
|
let user_role = localStorage.getItem('user_role');
|
||||||
|
if(user_role == 'PRACTITIONER'){
|
||||||
|
const activeIds = this.appoinmentsIds
|
||||||
|
const serviceList = this.customersList
|
||||||
|
console.log(activeIds,serviceList)
|
||||||
|
|
||||||
|
const result = serviceList.filter(({id}) => activeIds.includes(id));
|
||||||
|
console.log(result)
|
||||||
|
this.customersList = result
|
||||||
|
this.customersListSource['data'] = this.customersList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
this.customersList=[];
|
||||||
|
this.customersListLength= null;
|
||||||
|
this.recordStatus=true;
|
||||||
|
}
|
||||||
|
}, error => this.isLoading = false);
|
||||||
|
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
@ -107,37 +139,7 @@ export class CustomersListComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this._cus.getCustomersListDetails().subscribe(res => {
|
|
||||||
if (res.status == 200) {
|
|
||||||
this.isLoading = false
|
|
||||||
this.customersList = res.data;
|
|
||||||
console.log(this.customersList)
|
|
||||||
this.customersListLength = res.data.length;
|
|
||||||
console.log(this.customersListLength)
|
|
||||||
this.customersListSource['data'] = this.customersList;
|
|
||||||
console.log(this.customersListSource)
|
|
||||||
this.recordStatus=false;
|
|
||||||
|
|
||||||
console.log(this.customersList,this.appoinmentsIds)
|
|
||||||
let user_role = localStorage.getItem('user_role');
|
|
||||||
if(user_role == 'PRACTITIONER'){
|
|
||||||
const activeIds = this.appoinmentsIds
|
|
||||||
const serviceList = this.customersList
|
|
||||||
|
|
||||||
const result = serviceList.filter(({id}) => activeIds.includes(id));
|
|
||||||
console.log(result)
|
|
||||||
this.customersList = result
|
|
||||||
this.customersListSource['data'] = this.customersList;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
this.customersList=[];
|
|
||||||
this.customersListLength= null;
|
|
||||||
this.recordStatus=true;
|
|
||||||
}
|
|
||||||
}, error => this.isLoading = false);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -67,7 +67,7 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="Password">
|
<ng-container matColumnDef="Password">
|
||||||
<th mat-header-cell *matHeaderCellDef class="font-color"> Password </th>
|
<th mat-header-cell *matHeaderCellDef class="font-color"> Password </th>
|
||||||
<td mat-cell *matCellDef="let element" class="element-spc"> {{element.password}} </td>
|
<td mat-cell *matCellDef="let element" class="element-spc"> {{hashPassword(element.password)}} </td>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container matColumnDef="mobile_no">
|
<ng-container matColumnDef="mobile_no">
|
||||||
|
|||||||
@ -107,7 +107,9 @@ export class UserListComponent implements OnInit {
|
|||||||
// alert(error.html_format);
|
// alert(error.html_format);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
hashPassword(password: string){
|
||||||
|
return "*".repeat(password.length)
|
||||||
|
}
|
||||||
ngAfterViewInit() {
|
ngAfterViewInit() {
|
||||||
console.log(this.usersList,this.paginator)
|
console.log(this.usersList,this.paginator)
|
||||||
this.usersList.paginator = this.paginator;
|
this.usersList.paginator = this.paginator;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user