From c018a8ac7c38d6119214255b1c6ccbe891418a15 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Mon, 17 Apr 2023 15:19:13 +0530 Subject: [PATCH 1/3] working hrs dynamic set value and add user changes --- .../dialog-box/dialog-box.component.ts | 2 +- .../edit-working-hours.component.ts | 95 ++++++++++++++----- .../user/add-user/add-user.component.html | 2 +- .../user/add-user/add-user.component.ts | 4 + .../user/user-list/user-list.component.ts | 3 + 5 files changed, 78 insertions(+), 28 deletions(-) diff --git a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts index 585ec04..f2d38a7 100644 --- a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts +++ b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.ts @@ -96,7 +96,7 @@ export class DialogBoxComponent implements OnInit { duration: any; userData: any; appoinmentsIds: any=[]; - customersList: any; + customersList: any=[]; customerId: any; slotsResult: any; ServiceId: any; diff --git a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts index 0a9ada9..723928e 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts +++ b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.ts @@ -167,52 +167,95 @@ export class EditWorkingHoursComponent implements OnInit { this.seedFiltersFormArray5(); this.seedFiltersFormArray6(); this.seedFiltersFormArray7(); - setTimeout(() => { + //setInterval(() => { + let sunday ={filters :this.data[0].sunday.hours } - if(this.data[0].sunday.hours.length>1){ + for(let i=0;i<=this.data[0].sunday.hours.length-2;i++){ this.addFilterToFiltersFormArray() } + // if(this.data[0].sunday.hours.length>1){ + + // } this.dynamicForm.patchValue(sunday) - let monday ={filters :this.data[1].monday.hours } - if(this.data[1].monday.hours.length>1){ + // this.data[1].monday.hours.forEach(element => { + // element.value = null + + // }); + let monday ={filters2 :this.data[1].monday.hours } + for(let i=0;i<=this.data[1].monday.hours.length-2;i++){ + console.log(monday) this.addFilterToFiltersFormArray2() + this.dynamicForm2.patchValue(monday) } + // if(this.data[1].monday.hours.length>1){ + // this.addFilterToFiltersFormArray2() + // } - this.dynamicForm2.patchValue(monday) - let tuesday ={filters :this.data[2].tuesday.hours } - if(this.data[2].tuesday.hours.length>1){ + + let tuesday ={filters3 :this.data[2].tuesday.hours } + // if(this.data[2].tuesday.hours.length>1){ + // this.addFilterToFiltersFormArray3() + // } + for(let i=0;i<=this.data[2].tuesday.hours.length-2;i++){ + // console.log(monday) this.addFilterToFiltersFormArray3() + this.dynamicForm3.patchValue(tuesday) } - this.dynamicForm3.patchValue(tuesday) - let wednesday ={filters :this.data[3].wednesday.hours } - if(this.data[3].wednesday.hours.length>1){ - this.addFilterToFiltersFormArray4() - } - + + let wednesday ={filters4 :this.data[3].wednesday.hours } + // if(this.data[3].wednesday.hours.length>1){ + // this.addFilterToFiltersFormArray4() + // } + for(let i=0;i<=this.data[3].wednesday.hours.length-2;i++){ + // console.log(monday) + this.addFilterToFiltersFormArray4() + this.dynamicForm4.patchValue(wednesday) - let thursday ={filters :this.data[4].thursday.hours } - if(this.data[4].thursday.hours.length>1){ - this.addFilterToFiltersFormArray5() - } + } + let thursday ={filters5 :this.data[4].thursday.hours } + // if(this.data[4].thursday.hours.length>1){ + // this.addFilterToFiltersFormArray5() + // } + for(let i=0;i<=this.data[4].thursday.hours.length-2;i++){ + // console.log(monday) + this.addFilterToFiltersFormArray5() + this.dynamicForm5.patchValue(thursday) - let friday ={filters :this.data[5].friday.hours } - if(this.data[5].friday.hours.length>1){ - this.addFilterToFiltersFormArray6() - } + } + // this.dynamicForm5.patchValue(thursday) + let friday ={filters6 :this.data[5].friday.hours } + // if(this.data[5].friday.hours.length>1){ + // this.addFilterToFiltersFormArray6() + // } + for(let i=0;i<=this.data[5].friday.hours.length-2;i++){ + // console.log(monday) + this.addFilterToFiltersFormArray6() + + this.dynamicForm6.patchValue(friday) - let saturday ={filters :this.data[6].saturday.hours } - if(this.data[6].saturday.hours.length>1){ - this.addFilterToFiltersFormArray7() - } + } + + let saturday ={filters7 :this.data[6].saturday.hours } + // if(this.data[6].saturday.hours.length>1){ + // this.addFilterToFiltersFormArray7() + // } + for(let i=0;i<=this.data[6].saturday.hours.length-2;i++){ + // console.log(monday) + this.addFilterToFiltersFormArray7() + + this.dynamicForm7.patchValue(saturday) + } - }, 2000); + // this.dynamicForm7.patchValue(saturday) + + // }, 2000); } 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 b062322..4d8b907 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 @@ -25,7 +25,7 @@ Role - + -- {{roleNmae.name}} 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 b61d4ca..502a15f 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 @@ -115,6 +115,10 @@ export class AddUserComponent implements OnInit { // if( localStorage.getItem('go_admin') =='0'){ this.local_data.businessselect = localStorage.getItem('busNameID') this.form.controls['businessselect'].setValue(localStorage.getItem('busNameID')) + if( this.disableBus == 0){ + this.form.controls['role'].setValue('BADMIN') + } + // } //localStorage.setItem('busNameID',getData.busId) 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 63c227c..8ad5c6e 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 @@ -169,8 +169,11 @@ export class UserListComponent implements OnInit { } openDialog(action,obj) { + + if(action == 'Update' || action == 'Delete'){ localStorage.setItem('busNameID',obj.busId ) + } obj.action = action; const dialogRef = this.dialog.open(AddUserComponent, { // width: '30%', From ee70bc3724923a8b401531bc09e331f16acf3259 Mon Sep 17 00:00:00 2001 From: Smart Date: Mon, 17 Apr 2023 16:05:50 +0530 Subject: [PATCH 2/3] dashboard --- .../app/dashboard/dashboard.component.html | 65 ++++++++++++++++++- .../src/app/dashboard/dashboard.component.ts | 22 ++++++- 2 files changed, 84 insertions(+), 3 deletions(-) diff --git a/ng-seed/src/app/dashboard/dashboard.component.html b/ng-seed/src/app/dashboard/dashboard.component.html index 1a03b16..e074976 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.html +++ b/ng-seed/src/app/dashboard/dashboard.component.html @@ -1 +1,64 @@ -

welcome

\ No newline at end of file +
+
+ +
+
New Orders
+
This Week
+
+
+ +
190
+
+
+
+
+
+
+ +
+
Total Profit
+
This Week
+
+
+ +
987
+
+
+
+
+
+
+ +
+
Email
+
This Week
+
+
+ +
236
+
+
+
+
+
+
+
+
+ + + Total Sales   + + + +
+ +
+ + +
+
+
+
+
\ No newline at end of file diff --git a/ng-seed/src/app/dashboard/dashboard.component.ts b/ng-seed/src/app/dashboard/dashboard.component.ts index 7622415..c4e8131 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.ts +++ b/ng-seed/src/app/dashboard/dashboard.component.ts @@ -1,12 +1,30 @@ import { Component } from '@angular/core'; - +import { single, multi } from './charts.data'; @Component({ selector: 'app-dashboard', templateUrl: './dashboard.component.html', styleUrls: ['./dashboard.component.scss'] }) export class DashboardComponent { - + public single: any[]; + public multi: any[]; + public showXAxis = true; + public showYAxis = true; + public gradient = false; + public showLegend = false; + public showXAxisLabel = false; + public xAxisLabel = 'Year'; + public showYAxisLabel = false; + public yAxisLabel = 'Population'; + public colorScheme = { + domain: ['#673ab7', '#f44336', '#009688 ', '#2196f3'] + }; + public autoScale = true; constructor() { + // this.fetch((data) => { this.rows = data; }); + Object.assign(this, {single, multi}) + } + onSelect(event) { + console.log(event); } } From ad71378d13b7b4a2f0893da099aa7f64506760c9 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Mon, 17 Apr 2023 17:14:52 +0530 Subject: [PATCH 3/3] 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 @@ -
+