diff --git a/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html b/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html index 54990b4..9fe4215 100644 --- a/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html +++ b/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.html @@ -1,7 +1,7 @@

Appointment Details

Filter - +
@@ -16,31 +16,36 @@
- - - + + + + + + + + + + + + + - - + + - - - - - - - - - + + + + + - + @@ -72,11 +77,17 @@
BusId {{element.busId}} Profile
Client Name
{{element.customer[0].cusName || null }}
Appointment Date
{{element.appoinmentDate | date:'dd-MMM-YYYY' }}
+
Time
{{element.appoinmentDate | date:'mediumDate'}}

{{element.appoinmentTime}}
Appointment Time
{{element.appoinmentSlots }}
Slots
{{element.appoinmentSlots}}
Booking ID
{{element.booking}}
Status
{{element.status}}

{{element.status == 0 ? 'Booked':'Cancelled'}}
Action
+
+
- +
diff --git a/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.ts b/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.ts index efc1481..2c87f65 100644 --- a/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.ts +++ b/ng-seed/src/app/appoinment/appoinments/appoinments-list/appoinments-list.component.ts @@ -41,16 +41,17 @@ const ELEMENT_DATA: UsersData[] = [ export class AppoinmentsListComponent implements OnInit { push: any; - displayedColumns: string[] = ['busId', 'time', 'slots', 'action']; + displayedColumns: string[] = ['Profile', 'ClientName','date','time','status', 'action']; // dataSource: any; public appoinmentsList:any = new MatTableDataSource(); // dataSource: any = new MatTableDataSource(ELEMENT_DATA); @ViewChild(MatTable,{static:true}) table: MatTable; - @ViewChild(MatPaginator) paginator: MatPaginator; + // @ViewChild(MatPaginator) paginator: MatPaginator; recordStatus: boolean; addFormData: any; - - + @ViewChild('paginator') paginator: MatPaginator; + @ViewChild('paginatorPageSize') paginatorPageSize: MatPaginator; + pageSizes = [3, 5, 7]; constructor(public dialog: MatDialog, public _app:AppointmentsService) { } ngOnInit(): void { @@ -62,28 +63,33 @@ export class AppoinmentsListComponent implements OnInit { this._app.getAppoinmentsListDetails().subscribe(res => { if (res.status == 200) { this.appoinmentsList = res.data; - // console.log(this.appoinmentsList) - // this.dataSource = res.data.length; - // console.log(this.dataSource) - // this.dataSource.data = this.appoinmentsList; - // console.log(this.dataSource.data) - // this.recordStatus=false; + console.log(this.appoinmentsList) + } else{ - // this.appoinmentsList=[]; - // this.dataSource = null; - // this.recordStatus=true; + } - } - ,error => { - // this.errorMessage.push(error); - // this.notifier.notify('error', 'Something Went Wrong Try Again.! \t\"' + (error.error_type == 2 ? error.error_status + ' ( ' + error.error_text + ' ) ' : ' ( ' + error.error_text + ' ) ') +'\" Error Occur.!'); - // alert(error.html_format); - }); + }) + // let param ={'userId':"5" + // } + // this._app.getServicesMapDetails(param).subscribe(res => { + // if (res.status == 200) { + // console.log(res) + // this.appoinmentsList = res.data; + // console.log(this.appoinmentsList) + + // } + // else{ + + // } + // }) + } ngAfterViewInit() { this.appoinmentsList.paginator = this.paginator; + this.appoinmentsList.paginator = this.paginatorPageSize; + } applyFilter(event: Event) { const filterValue = (event.target as HTMLInputElement).value; diff --git a/ng-seed/src/app/appoinment/appoinments/appointments-service/appointments.service.ts b/ng-seed/src/app/appoinment/appoinments/appointments-service/appointments.service.ts index a05dcb4..f947001 100644 --- a/ng-seed/src/app/appoinment/appoinments/appointments-service/appointments.service.ts +++ b/ng-seed/src/app/appoinment/appoinments/appointments-service/appointments.service.ts @@ -26,7 +26,14 @@ export class AppointmentsService { // catchError(this.handleError('role', [])) // ) } - + + getServicesMapDetails(addParams): Observable { + return this._http.post(this.apiUrl + 'getServicesMapDetails', addParams) + // .pipe( + // catchError(this.handleError('role', [])) + // ) + } + handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable) => import("rxjs").ObservableInput { throw new Error('Method not implemented.'); diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-service/consultant.service.spec.ts b/ng-seed/src/app/appoinment/consultant-setting/consultant-service/consultant.service.spec.ts new file mode 100644 index 0000000..1f4a0ea --- /dev/null +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-service/consultant.service.spec.ts @@ -0,0 +1,16 @@ +import { TestBed } from '@angular/core/testing'; + +import { ConsultantService } from './consultant.service'; + +describe('ConsultantService', () => { + let service: ConsultantService; + + beforeEach(() => { + TestBed.configureTestingModule({}); + service = TestBed.inject(ConsultantService); + }); + + it('should be created', () => { + expect(service).toBeTruthy(); + }); +}); diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-service/consultant.service.ts b/ng-seed/src/app/appoinment/consultant-setting/consultant-service/consultant.service.ts new file mode 100644 index 0000000..d14ce17 --- /dev/null +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-service/consultant.service.ts @@ -0,0 +1,33 @@ +import { HttpClient } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { environment } from 'environments/environment'; +import { Observable } from 'rxjs'; +import { catchError } from 'rxjs/operators'; + +@Injectable({ + providedIn: 'root' +}) +export class ConsultantService { + + private apiUrl = environment.apiEndpoint; + constructor(private _http: HttpClient) { } + + getUsersListDetails(id): Observable { + console.log('IN') + return this._http.post(this.apiUrl + 'getPractitionerInfo', {id:id}) + // .pipe( + // catchError(this.handleError('role', [])) + // ) + } + getServicesListDetails(userId,busId): Observable { + console.log('IN') + return this._http.post(this.apiUrl + 'getServicesMapDetails', {busId:busId, userId:userId}) + // .pipe( + // catchError(this.handleError('role', [])) + // ) + } + + handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable) => import("rxjs").ObservableInput { + throw new Error('Method not implemented.'); + } +} diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts index 35c105d..66e4dd7 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting.module.ts @@ -6,12 +6,14 @@ import { ConsultantSettingComponent } from './consultant-setting/consultant-sett import { DemoMaterialModule } from 'app/shared/demo.module'; import { NgScrollbarModule } from 'ngx-scrollbar'; import { EditWorkingHoursComponent } from './edit-working-hours/edit-working-hours.component'; +import { ExtraWorkingHoursComponent } from './extra-working-hours/extra-working-hours.component'; @NgModule({ declarations: [ ConsultantSettingComponent, - EditWorkingHoursComponent + EditWorkingHoursComponent, + ExtraWorkingHoursComponent ], imports: [ CommonModule, diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html index 9066ae0..b1472d9 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.html @@ -12,12 +12,12 @@ - - Staff Information + + My Profile
- Set Up Staff Profile + Profile
@@ -25,75 +25,81 @@
- -
-
Name is required
-
+ {{usersList.userName}}
- -
-
Email is required
-
Email must be a valid email address
-
+ {{usersList.email}}
+ + {{usersList.role}} +
+
+ + {{usersList.password}} +
+ +
+ + {{practitionerdetails.dob}} +
+ + + +
+ + {{practitionerdetails.exp}} +
+ + + + + + + @@ -104,7 +110,7 @@ - + Working Hours
@@ -118,11 +124,12 @@
- Working Hours + + Working Hours
-
+
@@ -130,32 +137,112 @@
-
- 10:00 am +
+ 09:00am
- -
- 01:00 pm +
+ 06:00pm
-
+
Monday
-
- 10:00 am -
- - -
- 01:00 pm -
-
-
+
+ 09:00am +
+ - +
+ 06:00pm +
+
+
+
+ + Tuesday + +
+
+
+ 09:00am +
+ - +
+ 06:00pm +
+
+
+
+
+ + Wednesday + +
+
+
+ 09:00am +
+ - +
+ 06:00pm +
+
+
+
+
+ + Thursday + +
+
+
+ 09:00am +
+ - +
+ 06:00pm +
+
+
+
+
+ + Friday + +
+
+
+ 09:00am +
+ - +
+ 06:00pm +
+
+
+
+
+ + Saturday + +
+
+
+ 09:00am +
+ - +
+ 06:00pm +
+
+
+
Special Working Hours - +

Workings on weekends or compensating for time off? Add them here to let customers know when you're available.

Unavailability - +

Workings on weekends or compensating for time off? Add them here to let customers know when you're available.

@@ -187,43 +274,35 @@ - Assigned Services + Assigned Services
Define Your Services - - - - None - Option 1 - Option 2 - Option 3 - - -
-
- - - -

{{message.name}}

-

{{message.time}} | ₹ {{message.amount}}

-

+ Customize the price of a service.

-
-
-
- {{message.username}} -
-
- {{message.status}} -
+
+ + + + {{details.servicesName}} + {{details.duration}} Minutes + +
- Staff Booking URL + Staff Booking URL
@@ -239,7 +318,7 @@
transcribe - {{consultant.language || "English"}} + {{consultant.practitionerInfos[0].languages || ""}} location_on @@ -55,7 +56,7 @@ -
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 31f33e8..4d1e038 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 @@ -27,10 +27,21 @@ export class ConsultantsListComponent implements OnInit { }); }); - - let filter = arr_val.filter(arr=>{return arr.role == "PRACTITIONER" && arr.busId =="abc123"}) + let service = localStorage.getItem("servicedetails") + let serviceDetails = JSON.parse(service) + console.log(serviceDetails) + let filter = arr_val.filter(arr=>{return arr.role == "PRACTITIONER" && arr.busId ==serviceDetails.busId}) console.log(arr_val,filter) - this.consultants = filter; + + + let result = filter.filter((obj, index, self) => + index === self.findIndex((t) => ( + t.id === obj.id + + + )) + ); + this.consultants = result; // this.consultants = [{ // name: 'Dr. Suganya', // specialist: 'ENT', @@ -103,9 +114,14 @@ export class ConsultantsListComponent implements OnInit { } - goToSlotBooking(){ + goToSlotBooking(param){ let URL = this.router.url; - console.log(URL) + console.log(URL,param) + let service = localStorage.getItem("servicedetails") + let serviceDetails = JSON.parse(service) + serviceDetails.userId = ""+param.id+"" + + localStorage.setItem("servicedetails",JSON.stringify(serviceDetails)) // console.log(URL+"/"+data.randStr+"/practitioner") this.router.navigate([URL+"/slot"]) diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.ts b/ng-seed/src/app/end-user/customer-info/customer-info.component.ts index 0eab10c..2feb9d0 100644 --- a/ng-seed/src/app/end-user/customer-info/customer-info.component.ts +++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.ts @@ -53,9 +53,10 @@ export class CustomerInfoComponent implements OnInit { this._cus.addCusDetails(addFormData).subscribe(res => { if (res.status == 200) { console.log(res) + let URL = this.router.url; console.log(URL) - this.router.navigate([URL+"/pt"]) + this.router.navigate([URL+"/"+res['data'].id+"/pt"]) } }); 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 3b17276..13eb8e3 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 @@ -40,27 +40,27 @@ const routes: Routes = [ component: ConsultantsListComponent }, { - path: 'busniness/:randstr', + path: 'business/:randstr', component: ServiceListComponent }, { - path: 'busniness/:randstr/:randstrs/practitioner', + path: 'business/:randstr/:randstrs/practitioner', component: ConsultantsListComponent }, { - path: 'busniness/:randstr/:randstrs/practitioner/slot', + path: 'business/:randstr/:randstrs/practitioner/slot', component: SlotBookingDetailsComponent }, { - path: 'busniness/:randstr/:randstrs/practitioner/slot/cus', + path: 'business/:randstr/:randstrs/practitioner/slot/cus', component: CustomerInfoComponent }, { - path: 'busniness/:randstr/:randstrs/practitioner/slot/cus/pt', + path: 'business/:randstr/:randstrs/practitioner/slot/cus/:cusId/pt', component: PaymentComponent }, { - path: 'busniness/:randstr/:randstrs/practitioner/slot/cus/pt/bts', + path: 'business/:randstr/:randstrs/practitioner/slot/cus/pt/bts', component: BookingSummaryComponent }, diff --git a/ng-seed/src/app/end-user/end-user.service.ts b/ng-seed/src/app/end-user/end-user.service.ts index 4785160..770cb59 100644 --- a/ng-seed/src/app/end-user/end-user.service.ts +++ b/ng-seed/src/app/end-user/end-user.service.ts @@ -50,7 +50,20 @@ private apiUrl = environment.apiEndpoint; // catchError(this.handleError('role', [])) // ) } - + CreateAppoinmentsCus(addParams): Observable { + return this._http.post(this.apiUrl + 'CreateAppoinmentsCus', addParams) + // .pipe( + // catchError(this.handleError('role', [])) + // ) + } + CreatecusServicesMapDetails(addParams): Observable { + return this._http.post(this.apiUrl + 'CreatecusServicesMapDetails', addParams) + // .pipe( + // catchError(this.handleError('role', [])) + // ) + } + + handleError(arg0: string, arg1: undefined[]): (err: any, caught: Observable) => import("rxjs").ObservableInput { throw new Error('Method not implemented.'); } diff --git a/ng-seed/src/app/end-user/payment/payment.component.ts b/ng-seed/src/app/end-user/payment/payment.component.ts index 4497246..f172c2a 100644 --- a/ng-seed/src/app/end-user/payment/payment.component.ts +++ b/ng-seed/src/app/end-user/payment/payment.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { FormControl, FormGroup, Validators } from '@angular/forms'; import { Router } from '@angular/router'; +import { EndUserService } from '../end-user.service'; @Component({ selector: 'app-payment', @@ -9,7 +10,7 @@ import { Router } from '@angular/router'; }) export class PaymentComponent implements OnInit { form: FormGroup; - constructor(private router:Router) { } + constructor(private router:Router,public enduser:EndUserService, ) { } ngOnInit(): void { this.form = new FormGroup({ @@ -26,10 +27,49 @@ export class PaymentComponent implements OnInit { submit(){ console.log(this.form.value) + let slot_array = JSON.parse(localStorage.getItem("slotData")) + let service = localStorage.getItem("servicedetails") + let serviceDetails = JSON.parse(service) + console.log(serviceDetails) + let URL = this.router.url; - console.log(URL) - this.router.navigate([URL+"/bts"]) + console.log(URL,slot_array) + let URL_AS_LIST = URL.split('/'); + console.log(URL_AS_LIST); + let paramsmap= { + "serviceId": ""+serviceDetails.serviceId+"", + "userId": serviceDetails.userId, + "busId": serviceDetails.busId +} + this.enduser.CreatecusServicesMapDetails(paramsmap).subscribe(res => { + if (res.status == 200) { + console.log(res) + let serviceMap = res['data'].id + let time = new Date().toLocaleTimeString() + let params= { + "busId": serviceDetails.busId, + "cusId": URL_AS_LIST[8], + "appoinmentDate": slot_array[0].date, + "appoinmentTime": time, + "serviceMap": serviceMap, + "appoinmentSlots": slot_array[0].slots, + } + console.log(params) + this.enduser.CreateAppoinmentsCus(params).subscribe(res => { + if (res.status == 200) { + console.log(res) + this.router.navigate([URL+"/bts"]) + } + }) + + + + } + }) + + + } } diff --git a/ng-seed/src/app/end-user/service-list-details/service-list.component.html b/ng-seed/src/app/end-user/service-list-details/service-list.component.html index 0c037c3..df5d186 100644 --- a/ng-seed/src/app/end-user/service-list-details/service-list.component.html +++ b/ng-seed/src/app/end-user/service-list-details/service-list.component.html @@ -41,10 +41,11 @@
+

- © 2021 Venba Information Technology Pvt Ltd. All Rights Reserved + © 2023 Venba Information Technology Pvt Ltd. All Rights Reserved

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 ebfe868..9e45d1f 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 @@ -212,6 +212,7 @@ let updatevalue = { serviceId: row_obj.serviceId, goto(data){ let URL = this.router.url; console.log(URL,data) + localStorage.setItem("servicedetails",JSON.stringify(data)) console.log(URL+"/"+data.randStr+"/practitioner") this.router.navigate([URL+"/"+data.randStr+"/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 00db1e7..e582b71 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 @@ -16,7 +16,7 @@
- +
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 1494404..12310c4 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 @@ -36,7 +36,13 @@ export class SlotBookingDetailsComponent implements OnInit { workspace: new FormControl('', [Validators.required]), }); -console.log(this.local_data, this.selects) + + + let service = localStorage.getItem("servicedetails") + let serviceDetails = JSON.parse(service) + console.log(serviceDetails) + + // this.form.controls['note'].setValue('Sample') this.form.patchValue(this.local_data) } @@ -54,13 +60,14 @@ console.log(this.local_data, this.selects) } var target = event.currentTarget; target.style.backgroundColor = "#0c8f00"; - console.log(param) - this.slot_array.push(param) + console.log(this.date,param) + this.slot_array.push({date:this.date,slots:param}) } submit(){ console.log( this.slot_array) + localStorage.setItem("slotData",JSON.stringify(this.slot_array)) let URL = this.router.url; console.log(URL) this.router.navigate([URL+"/cus"]) diff --git a/ng-seed/src/app/session/login/login.component.ts b/ng-seed/src/app/session/login/login.component.ts index 0575d29..85f3bb9 100644 --- a/ng-seed/src/app/session/login/login.component.ts +++ b/ng-seed/src/app/session/login/login.component.ts @@ -47,6 +47,7 @@ export class LoginComponent { localStorage.setItem('user_token',res.token); localStorage.setItem('user_role',res.role); localStorage.setItem('email',JSON.stringify(auth)) + localStorage.setItem('user_id',res.roleId) this.router.navigate(['/home']) } } diff --git a/ng-seed/src/assets/images/profile.jpg b/ng-seed/src/assets/images/profile.jpg new file mode 100644 index 0000000..38f833a Binary files /dev/null and b/ng-seed/src/assets/images/profile.jpg differ