password encryption

This commit is contained in:
surendar.m@watermelon.us 2023-04-11 13:10:41 +05:30
parent 15694ecde1
commit 2a41601026
3 changed files with 36 additions and 32 deletions

View File

@ -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{
@ -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);
}

View File

@ -67,7 +67,7 @@
<ng-container matColumnDef="Password">
<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 matColumnDef="mobile_no">

View File

@ -107,7 +107,9 @@ export class UserListComponent implements OnInit {
// alert(error.html_format);
})
}
hashPassword(password: string){
return "*".repeat(password.length)
}
ngAfterViewInit() {
console.log(this.usersList,this.paginator)
this.usersList.paginator = this.paginator;