doctor profile page changes
This commit is contained in:
parent
76c21dc25e
commit
6b08fb776a
@ -214,7 +214,7 @@ unavailability(action,obj) {
|
||||
console.log(this.practitionerdetails)
|
||||
|
||||
if(this.userRole == 'PRACTITIONER'){
|
||||
this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr
|
||||
this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr+"/details"
|
||||
} else if (this.userRole == 'BADMIN'){
|
||||
this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr
|
||||
}
|
||||
|
||||
@ -16,9 +16,11 @@ export class DoctorProfileComponent implements OnInit {
|
||||
busName: any=[];
|
||||
profileDetails: any;
|
||||
skillsDetails: any = [];
|
||||
|
||||
consultants:any =[];
|
||||
ServicesMapDetailsList:any=[];
|
||||
constructor(private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) {
|
||||
// this.spinner.show()
|
||||
this.getpractitionerList()
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
@ -74,4 +76,70 @@ export class DoctorProfileComponent implements OnInit {
|
||||
return this.apiUrl+'imageViewer?img_name='+image;
|
||||
}
|
||||
|
||||
getpractitionerList() {
|
||||
|
||||
let URL = this.router.url;
|
||||
console.log(URL);
|
||||
let URL_AS_LIST = URL.split('/');
|
||||
console.log(URL_AS_LIST);
|
||||
//this._pd.getTabStatusPdDetails(this.tabStatus)
|
||||
let params = {
|
||||
"randStr":URL_AS_LIST[3],
|
||||
"queryName":URL_AS_LIST[2]
|
||||
|
||||
}
|
||||
console.log(params);
|
||||
|
||||
this.end_user.getcusServicesMapDetails(params).subscribe(res => {
|
||||
if (res.status == 200) {
|
||||
console.log(res)
|
||||
let tmp =[]
|
||||
let arr_val =res['data'];
|
||||
this.ServicesMapDetailsList = arr_val
|
||||
arr_val.forEach(element => {
|
||||
tmp.push(element.user[0] )
|
||||
|
||||
});
|
||||
|
||||
|
||||
let filter = tmp.filter(arr=>{return arr.role == "PRACTITIONER"})
|
||||
console.log(tmp,filter)
|
||||
|
||||
|
||||
let result = filter.filter((obj, index, self) =>
|
||||
|
||||
index === self.findIndex((t) => (
|
||||
|
||||
t.id=== obj.id
|
||||
|
||||
|
||||
|
||||
|
||||
))
|
||||
);
|
||||
this.consultants = result;
|
||||
setTimeout(() => {
|
||||
/** spinner ends after 5 seconds */
|
||||
this.spinner.hide();
|
||||
}, 1000);
|
||||
console.log(this.consultants)
|
||||
|
||||
// let filter2 = this.consultants.filter(arr=>{return arr.userId == param.id && arr.busId ==param.busId})
|
||||
// console.log(filter)
|
||||
localStorage.setItem('workingHrs',this.consultants[0].practitionerInfos
|
||||
[0].workingHours)
|
||||
this.end_user.appointmentBooked.next(this.ServicesMapDetailsList)
|
||||
|
||||
this.bookedAppointment = this.ServicesMapDetailsList[0].user[0]
|
||||
this.dp = this.apiUrl+'imageViewer?img_name='+ this.bookedAppointment.logo
|
||||
console.log(this.dp)
|
||||
this.profileDetails = this.bookedAppointment.practitionerInfos[0]
|
||||
console.log(this.profileDetails)
|
||||
this.skillsDetails = JSON.parse(this.profileDetails.skills)
|
||||
// this.skillsDetails = JSON.parse(this.skillsDetails)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -49,10 +49,10 @@ const routes: Routes = [{
|
||||
path: 'business/:randstr',
|
||||
component: ServiceListComponent
|
||||
},
|
||||
{
|
||||
path: 'practitioner/:randstr',
|
||||
component: ConsultantsListComponent
|
||||
},
|
||||
// {
|
||||
// path: 'practitioner/:randstr',
|
||||
// component: ConsultantsListComponent
|
||||
// },
|
||||
{
|
||||
path: 'practitioner/:randstr/details',
|
||||
component: DoctorProfileComponent
|
||||
|
||||
Loading…
Reference in New Issue
Block a user