end user doctor routing
This commit is contained in:
parent
ba7cd1b284
commit
ad71378d13
@ -157,7 +157,7 @@ export class AddUserComponent implements OnInit {
|
||||
}
|
||||
let tmp = this.form.value
|
||||
tmp.id = this.local_data.id
|
||||
console.log(this.formData.getAll('image'));
|
||||
console.log(tmp,this.formData.getAll('image'));
|
||||
if(this.busId == null){
|
||||
this.busId = localStorage.getItem('busNameID') || null
|
||||
}
|
||||
|
||||
@ -20,14 +20,24 @@ export class ConsultantsListComponent implements OnInit {
|
||||
|
||||
busName:any=[]
|
||||
private apiUrl = environment.apiEndpoint;
|
||||
ServicesMapDetailsList: any=[];
|
||||
constructor(private router:Router,public dialog: MatDialog,public end_user:EndUserService,private spinner:NgxSpinnerService) {
|
||||
this.spinner.show();
|
||||
}
|
||||
|
||||
|
||||
ngOnInit(): void {
|
||||
|
||||
this.busName = localStorage.getItem('busName')
|
||||
let tmp = localStorage.getItem('cusServiceData')
|
||||
let tmp = localStorage.getItem('cusServiceData')
|
||||
let URL = this.router.url;
|
||||
console.log(URL);
|
||||
let URL_AS_LIST = URL.split('/');
|
||||
console.log(URL_AS_LIST);
|
||||
if(URL_AS_LIST[2] == 'business'){
|
||||
|
||||
|
||||
|
||||
let practitioner = JSON.parse(tmp)
|
||||
console.log(practitioner)
|
||||
let arr_val=[]
|
||||
@ -87,7 +97,9 @@ export class ConsultantsListComponent implements OnInit {
|
||||
|
||||
});
|
||||
console.log(workinghrs)
|
||||
|
||||
}else{
|
||||
this.getpractitionerList()
|
||||
}
|
||||
}
|
||||
random_ng_past()
|
||||
{
|
||||
@ -103,6 +115,11 @@ export class ConsultantsListComponent implements OnInit {
|
||||
goToSlotBooking(param){
|
||||
let URL = this.router.url;
|
||||
console.log(URL,param)
|
||||
let URL_AS_LIST = URL.split('/');
|
||||
console.log(URL_AS_LIST);
|
||||
if(URL_AS_LIST[2] == 'business'){
|
||||
|
||||
|
||||
let tmp = localStorage.getItem('cusServiceData')
|
||||
let practitioner = JSON.parse(tmp)
|
||||
console.log(practitioner)
|
||||
@ -122,10 +139,76 @@ export class ConsultantsListComponent implements OnInit {
|
||||
// console.log(URL+"/"+data.randStr+"/practitioner")
|
||||
// this.router.navigate([URL+"/slot"])
|
||||
this.router.navigate([URL+"/details"])
|
||||
}else{
|
||||
console.log(URL,param,this.ServicesMapDetailsList)
|
||||
|
||||
let filter = this.ServicesMapDetailsList.filter(arr=>{return arr.userId == param.id && arr.busId ==param.busId})
|
||||
console.log(filter)
|
||||
localStorage.setItem('workingHrs',param.practitionerInfos
|
||||
[0].workingHours)
|
||||
this.end_user.appointmentBooked.next(filter)
|
||||
|
||||
this.router.navigate([URL+"/details"])
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
image_view(image){
|
||||
|
||||
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)
|
||||
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -58,8 +58,14 @@ export class DoctorProfileComponent implements OnInit {
|
||||
let URL = this.router.url;
|
||||
console.log(URL)
|
||||
|
||||
// this.router.navigate([URL+"/slot"])
|
||||
this.router.navigate([URL+"/slot"])
|
||||
let URL_AS_LIST = URL.split('/');
|
||||
console.log(URL_AS_LIST);
|
||||
if(URL_AS_LIST[2] == 'business'){
|
||||
this.router.navigate([URL+"/slot"])
|
||||
}else{
|
||||
this.router.navigate([URL+"/services"])
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
image_view(image){
|
||||
|
||||
@ -49,6 +49,24 @@ const routes: Routes = [{
|
||||
path: 'business/:randstr',
|
||||
component: ServiceListComponent
|
||||
},
|
||||
{
|
||||
path: 'practitioner/:randstr',
|
||||
component: ConsultantsListComponent
|
||||
},
|
||||
{
|
||||
path: 'practitioner/:randstr/details',
|
||||
component: DoctorProfileComponent
|
||||
},
|
||||
{
|
||||
path: 'practitioner/:randstr/details/services',
|
||||
component: ServiceListComponent
|
||||
},
|
||||
|
||||
{
|
||||
path: 'practitioner/:randstr/details/services/slots/list',
|
||||
component: SlotBookingDetailsComponent
|
||||
},
|
||||
|
||||
{
|
||||
path: 'business/:randstr/:randstrs/practitioner',
|
||||
component: ConsultantsListComponent
|
||||
@ -69,6 +87,19 @@ const routes: Routes = [{
|
||||
path: 'business/:randstr/:randstrs/practitioner/details/slot/cus/:cusId/pt/bts',
|
||||
component: BookingSummaryComponent
|
||||
},
|
||||
///
|
||||
{
|
||||
path: 'practitioner/:randstr/details/services/slots/list/cus',
|
||||
component: CustomerInfoComponent
|
||||
},
|
||||
{
|
||||
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt',
|
||||
component: PaymentComponent
|
||||
},
|
||||
{
|
||||
path: 'practitioner/:randstr/details/services/slots/list/cus/:cusId/pt/bts',
|
||||
component: BookingSummaryComponent
|
||||
},
|
||||
{
|
||||
path: 'business/:randstr/:randstrs/practitioner/details',
|
||||
component: DoctorProfileComponent
|
||||
|
||||
@ -209,6 +209,12 @@ let updatevalue = { serviceId: row_obj.serviceId,
|
||||
}
|
||||
goto(data){
|
||||
let URL = this.router.url;
|
||||
|
||||
let URL_AS_LIST = URL.split('/');
|
||||
console.log(URL_AS_LIST);
|
||||
if(URL_AS_LIST[2] == 'business'){
|
||||
|
||||
|
||||
console.log(URL,data,this.full_data)
|
||||
let filter = this.full_data.filter(arr=>{return arr.serviceId == data.serviceId && arr.busId ==data.busId})
|
||||
console.log(filter)
|
||||
@ -216,6 +222,9 @@ let updatevalue = { serviceId: row_obj.serviceId,
|
||||
localStorage.setItem("servicedetails",JSON.stringify(data))
|
||||
console.log(URL+"/"+data.randStr+"/practitioner")
|
||||
this.router.navigate([URL+"/"+data.randStr+"/practitioner"])
|
||||
}else{
|
||||
this.router.navigate([URL+"/slots/list"])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ footer {
|
||||
}
|
||||
|
||||
.scrollHV {
|
||||
height: calc(100vh - 150px);
|
||||
//height: calc(100vh - 150px);
|
||||
// zoom: 90%;
|
||||
}
|
||||
|
||||
|
||||
@ -188,7 +188,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="vertical-menu w-100">
|
||||
<div class="vertical-menu w-100 " >
|
||||
<!-- <button (click)="menuToggleFunc()" mat-icon-button class="lines-btn">
|
||||
<mat-icon>menu</mat-icon>
|
||||
</button> -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user