From ad71378d13b7b4a2f0893da099aa7f64506760c9 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Mon, 17 Apr 2023 17:14:52 +0530 Subject: [PATCH 1/4] end user doctor routing --- .../user/add-user/add-user.component.ts | 2 +- .../consultants/consultants-list.component.ts | 87 ++++++++++++++++++- .../doctor-profile.component.ts | 10 ++- .../app/end-user/end-user-routing.module.ts | 31 +++++++ .../service-list.component.ts | 9 ++ .../slot-booking-details.component.scss | 2 +- .../layouts/admin/admin-layout.component.html | 2 +- 7 files changed, 136 insertions(+), 7 deletions(-) diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts b/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts index d948338..fbc2ed1 100644 --- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts +++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.ts @@ -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 } diff --git a/ng-seed/src/app/end-user/consultants/consultants-list.component.ts b/ng-seed/src/app/end-user/consultants/consultants-list.component.ts index 9db4364..c6fd1e0 100644 --- a/ng-seed/src/app/end-user/consultants/consultants-list.component.ts +++ b/ng-seed/src/app/end-user/consultants/consultants-list.component.ts @@ -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) + + } + }) + } + } diff --git a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts index a2d6c93..b9cd563 100644 --- a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts +++ b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.ts @@ -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){ diff --git a/ng-seed/src/app/end-user/end-user-routing.module.ts b/ng-seed/src/app/end-user/end-user-routing.module.ts index bd5b514..4afd11e 100644 --- a/ng-seed/src/app/end-user/end-user-routing.module.ts +++ b/ng-seed/src/app/end-user/end-user-routing.module.ts @@ -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 diff --git a/ng-seed/src/app/end-user/service-list-details/service-list.component.ts b/ng-seed/src/app/end-user/service-list-details/service-list.component.ts index ac59aed..26ef11d 100644 --- a/ng-seed/src/app/end-user/service-list-details/service-list.component.ts +++ b/ng-seed/src/app/end-user/service-list-details/service-list.component.ts @@ -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"]) + } } diff --git a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.scss b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.scss index 866e390..9a6534b 100644 --- a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.scss +++ b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.scss @@ -275,7 +275,7 @@ footer { } .scrollHV { - height: calc(100vh - 150px); + //height: calc(100vh - 150px); // zoom: 90%; } diff --git a/ng-seed/src/app/layouts/admin/admin-layout.component.html b/ng-seed/src/app/layouts/admin/admin-layout.component.html index 096b866..628dda0 100644 --- a/ng-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng-seed/src/app/layouts/admin/admin-layout.component.html @@ -188,7 +188,7 @@ -
+
From 50b5a5e5116a6fe8e1fa644e2b5618b8d30881c2 Mon Sep 17 00:00:00 2001 From: "surendar.m@watermelon.us" Date: Mon, 17 Apr 2023 17:23:09 +0530 Subject: [PATCH 2/4] mobile number validation --- .../appointment-addcustomer.component.html | 6 +- .../appointment-addcustomer.component.ts | 5 +- .../add-business/add-business.component.html | 4 +- .../add-business/add-business.component.ts | 4 +- .../appoinment/business/business.module.ts | 4 +- .../add-customers.component.html | 2 +- .../add-customers/add-customers.component.ts | 12 +- .../customers-list.component.ts | 2 +- .../add-service/add-service.component.ts | 2 +- .../user/add-user/add-user.component.html | 9 +- .../user/add-user/add-user.component.ts | 3 +- .../src/app/appoinment/user/user.module.ts | 3 +- .../customer-info.component.html | 2 +- .../customer-info/customer-info.component.ts | 12 +- .../session/register/register.component.ts | 8 +- ng-seed/src/app/shared/demo.module.ts | 185 +++++++++++++----- .../mobile-number-pattern.directive.spec.ts | 8 + .../mobile-number-pattern.directive.ts | 18 ++ 18 files changed, 205 insertions(+), 84 deletions(-) create mode 100644 ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.spec.ts create mode 100644 ng-seed/src/app/shared/mobile_number_pattern/mobile-number-pattern.directive.ts diff --git a/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html b/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html index 84ed95f..092fd3c 100644 --- a/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html +++ b/ng-seed/src/app/appoinment/appoinments/appointment-addcustomer/appointment-addcustomer.component.html @@ -23,11 +23,11 @@ Phone - - + Limit exceed
Add Admin diff --git a/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts b/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts index 19cd671..a0521c7 100644 --- a/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts +++ b/ng-seed/src/app/appoinment/business/add-business/add-business.component.ts @@ -97,7 +97,7 @@ export class AddBusinessComponent implements OnInit { email: new FormControl('', [Validators.required, Validators.email,Validators.pattern( '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$', ),]), - contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10),Validators.pattern('^[0-9]{10}$')]), + contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]), createdBy:new FormControl(userrole,[Validators.required]), }); @@ -107,7 +107,7 @@ export class AddBusinessComponent implements OnInit { public myError = (controlName: string, errorName: string) =>{ return this.form.controls[controlName].hasError(errorName); } - + submit(){ let tmp = this.form.value tmp.id = this.local_data.id diff --git a/ng-seed/src/app/appoinment/business/business.module.ts b/ng-seed/src/app/appoinment/business/business.module.ts index e9b3af3..6404b91 100644 --- a/ng-seed/src/app/appoinment/business/business.module.ts +++ b/ng-seed/src/app/appoinment/business/business.module.ts @@ -56,8 +56,8 @@ const customNotifierOptions: NotifierOptions = { @NgModule({ declarations: [ BusinessListComponent, - AddBusinessComponent - + AddBusinessComponent, + ], imports: [ DemoMaterialModule, diff --git a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html index 5205346..d4a0377 100644 --- a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html +++ b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.html @@ -23,7 +23,7 @@ - + Contact No is required Invalid Contact No Contact No must be at least 10 characters diff --git a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts index 432507d..d87e84d 100644 --- a/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts +++ b/ng-seed/src/app/appoinment/customers/add-customers/add-customers.component.ts @@ -52,15 +52,15 @@ export class AddCustomersComponent implements OnInit { this.form = new FormGroup({ // businessselect: new FormControl('', [Validators.required]), // image: new FormControl('', null), - cusName: new FormControl('', [Validators.required, Validators.maxLength(20)]), - address_1: new FormControl('', [Validators.required, Validators.maxLength(50)]), - city: new FormControl('', [Validators.required, Validators.maxLength(10)]), - state: new FormControl('', [Validators.required, Validators.maxLength(10)]), - pincode: new FormControl('', [Validators.required, Validators.maxLength(10)]), + cusName: new FormControl('', [Validators.required]), + address_1: new FormControl('', [Validators.required, Validators.maxLength(100)]), + city: new FormControl('', [Validators.required]), + state: new FormControl('', [Validators.required]), + pincode: new FormControl('', [Validators.required, Validators.maxLength(6)]), email: new FormControl('', [Validators.required, Validators.email,Validators.pattern( '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$', ),]), - phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]), + phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]), }); this.form.patchValue(this.local_data) diff --git a/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts b/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts index 80b4331..7281b1a 100644 --- a/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts +++ b/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts @@ -87,7 +87,7 @@ export class CustomersListComponent implements OnInit { this._app.getAppoinmentsListDetails(param).subscribe(res => { if (res.status == 200) { this.appoinmentsList = res.data; - this.recordStatus=true; + // this.recordStatus=true; let id = localStorage.getItem('user_id') console.log(id) console.log(this.appoinmentsList) diff --git a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts index 6fc765b..57f01f1 100644 --- a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts +++ b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts @@ -38,7 +38,7 @@ closeDialog(){ ngOnInit() { this.form = new FormGroup({ - servicesName: new FormControl('', [Validators.required, Validators.maxLength(20)]), + servicesName: new FormControl('', [Validators.required]), duration: new FormControl('',[Validators.required]), description: new FormControl('',[Validators.required]), fees:new FormControl('',[Validators.required]) diff --git a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html index 5145396..52b9e1c 100644 --- a/ng-seed/src/app/appoinment/user/add-user/add-user.component.html +++ b/ng-seed/src/app/appoinment/user/add-user/add-user.component.html @@ -20,8 +20,7 @@ {{business.busName}} - business is required - + business is required Role @@ -31,7 +30,7 @@ {{roleNmae.name}} - role is required + role is required @@ -52,7 +51,7 @@ Phone No - + Contact No is required Invalid Contact No Contact No must be at least 10 characters @@ -80,7 +79,7 @@

- Upload Below 2MB
Supported File (jpg,jpeg anf png)
+ Upload Below 2MB
Supported File (jpg,jpeg and png)
diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 75d19cb..3587fea 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -10,7 +10,7 @@ export const environment = { // apiEndpoint:'http://192.168.1.20:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', // apiEndpoint:'http://venbainfotech.com:5000/api/', - apiEndpoint:'http://192.168.1.4:8080/api/', + apiEndpoint:'http://192.168.1.8:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', //EndUser URL From 9791d6390c1f8db603b7ae1a0825910995cc79d4 Mon Sep 17 00:00:00 2001 From: "surendar.m@watermelon.us" Date: Tue, 18 Apr 2023 10:55:14 +0530 Subject: [PATCH 4/4] Url Setup --- .../consultant-setting.component.ts | 12 ++++-- .../add-service/add-service.component.ts | 2 + .../service-list/service-list.component.html | 2 +- .../user/user-list/user-list.component.ts | 43 +++++++++++-------- .../user/user-service/user.service.ts | 13 ++++-- .../search-category.component.ts | 2 +- .../slot-booking-details.component.html | 2 +- .../slot-booking-details.component.ts | 4 ++ ng-seed/src/environments/environment.ts | 4 +- 9 files changed, 55 insertions(+), 29 deletions(-) diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts index c3ec73c..acbac35 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.ts @@ -194,7 +194,13 @@ unavailability(action,obj) { console.log( this.practitionerdetails) this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']); console.log(this.practitionerdetails) - this.endUserURL = this.end_User_Url+this.usersList['BusinessDetails'][0].randStr + + if(this.userRole == 'PRACTITIONER'){ + this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr + } else if (this.userRole == 'BADMIN'){ + this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr + } + this.workinghours = JSON.parse(this.practitionerdetails.workingHours) this.skills= JSON.parse(this.practitionerdetails.skills) this.id=this.practitionerdetails.id @@ -356,7 +362,7 @@ unavailability(action,obj) { save(){ this.isEditable = false; let userid = localStorage.getItem('user_id') - let param: any = { "exp": this.exp, + let param: any = { "exp": this.exp, // "id": this.id, "qualification": this.qualification, "fees": "800", @@ -366,7 +372,7 @@ unavailability(action,obj) { "gender": this.gender, "workingHours": JSON.stringify([{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"06:00 pm","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"tuesday","value":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"06:00 pm","day":"saturday","value":null}],"breaks":[]}}]), "description": this.description, - "skills": this.skills, + "skills": JSON.stringify(this.skills), "caption": this.caption, "userName": this.userName, "practitionerId":userid diff --git a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts index 57f01f1..bff7e21 100644 --- a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts +++ b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.ts @@ -43,6 +43,8 @@ ngOnInit() { description: new FormControl('',[Validators.required]), fees:new FormControl('',[Validators.required]) }); + console.log(this.local_data) + this.local_data.duration = JSON.stringify(this.local_data.duration) this.form.patchValue(this.local_data) } diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html index dcb60be..894843e 100644 --- a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html +++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html @@ -32,7 +32,7 @@ Duration - {{row.duration}} + {{row.duration}} Mins Fees diff --git a/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts b/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts index 8ad5c6e..7c07159 100644 --- a/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts +++ b/ng-seed/src/app/appoinment/user/user-list/user-list.component.ts @@ -76,24 +76,31 @@ export class UserListComponent implements OnInit { this.getBusinessList() } getUsersList() { - //this._pd.getTabStatusPdDetails(this.tabStatus) - this._use.getUsersListDetails().subscribe(res => { - if (res.status == 200) { - this.isLoading = false - let usersList = res.data - usersList.sort((a: any, b: any) => { - return b.id - a.id; - }); - this.usersList['data'] = usersList; - this.usersListLength = res.data.length; - this.recordStatus=false; - } - else{ - // this.usersList=[]; - // this.dataSource = null; - this.recordStatus=true; - } - },error => this.isLoading = false); + let userRole = localStorage.getItem('user_role') + let param; + if(userRole == 'BADMIN'){ + param ={"busId": localStorage.getItem('busId')} + }else { + param = {} + } + this._use.getUsersListDetails(param).subscribe(res => { + if (res.status == 200) { + this.isLoading = false + let usersList = res.data + usersList.sort((a: any, b: any) => { + return b.id - a.id; + }); + this.usersList['data'] = usersList; + this.usersListLength = res.data.length; + this.recordStatus=false; + } + else{ + // this.usersList=[]; + // this.dataSource = null; + this.recordStatus=true; + } + },error => this.isLoading = false); + } getBusinessList() { //this._pd.getTabStatusPdDetails(this.tabStatus) diff --git a/ng-seed/src/app/appoinment/user/user-service/user.service.ts b/ng-seed/src/app/appoinment/user/user-service/user.service.ts index 6df9ad4..8d9ec72 100644 --- a/ng-seed/src/app/appoinment/user/user-service/user.service.ts +++ b/ng-seed/src/app/appoinment/user/user-service/user.service.ts @@ -11,10 +11,17 @@ export class UserService { private apiUrl = environment.apiEndpoint; constructor(private _http: HttpClient) { } - - getUsersListDetails(): Observable { + getUsersListDetails2(): Observable { console.log('IN') - return this._http.get(this.apiUrl + "getusers") + return this._http.post(this.apiUrl + "getusers",{}) + // .pipe( + // catchError(this.handleError('role', [])) + // ) + } + + getUsersListDetails(param): Observable { + console.log('IN') + return this._http.post(this.apiUrl + "getusers",param) // .pipe( // catchError(this.handleError('role', [])) // ) diff --git a/ng-seed/src/app/end-user/search-category/search-category.component.ts b/ng-seed/src/app/end-user/search-category/search-category.component.ts index 5221884..6fbdd62 100644 --- a/ng-seed/src/app/end-user/search-category/search-category.component.ts +++ b/ng-seed/src/app/end-user/search-category/search-category.component.ts @@ -123,7 +123,7 @@ export class SearchCategoryComponent implements OnInit { } }); } else if(this.eventData == 'consultants'){ - this._use.getUsersListDetails().subscribe(res => { + this._use.getUsersListDetails2().subscribe(res => { if (res.status == 200) { console.log(res) // let data = res['data'].filter(val => val.role == 'PRACTITIONER') diff --git a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html index 0f8e68f..ffcdb49 100644 --- a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html +++ b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.html @@ -81,7 +81,7 @@

AvatarTime :

{{slotTime | date:'shortTime'}}

AvatarAmount :

- {{user.practitionerInfos[0].days}} + {{durationArray.length>0 ? durationArray.fees : servicesName.fees}}
diff --git a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts index 2b3e958..b100347 100644 --- a/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts +++ b/ng-seed/src/app/end-user/slot-booking/slot-booking-details.component.ts @@ -51,11 +51,15 @@ export class SlotBookingDetailsComponent implements OnInit { doctor: any=[]; servicesName: any=[]; user: any=[]; + durationArray: any; constructor(private router:Router,private datepipe:DatePipe,public end_user:EndUserService) { this.end_user.appointmentBooked_observable$.subscribe((res) => { console.log('booked', res); if(res.length>0){ + console.log(res[0]) + this.durationArray = res[0] this.servicesName = res[0].service[0] + console.log(this.servicesName) this.user = res[0].user[0] this.doctor = res[0].user[0].userName this.getApiData() diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 75d19cb..5d1e46d 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -10,11 +10,11 @@ export const environment = { // apiEndpoint:'http://192.168.1.20:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', // apiEndpoint:'http://venbainfotech.com:5000/api/', - apiEndpoint:'http://192.168.1.4:8080/api/', + apiEndpoint:'http://192.168.1.8:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', //EndUser URL - endUserUrl:'https://venbainfotech.com/appointment/#/customer/business/', + endUserUrl:'https://venbainfotech.com/appointment/#/customer/', firebase: { apiKey: "AIzaSyCKbfDJ5Qf0rDP3WKppa94u9xuVaVabaDw",