From dab98cd79c68ab8531fcf4d67d9674d5278ec7a1 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Sat, 27 May 2023 17:30:15 +0530 Subject: [PATCH] consult error and customer validation added --- .../consultant-setting.component.html | 6 +-- .../consultant-setting.component.ts | 6 +-- .../service-list/service-list.component.html | 34 ++++++++++------- .../service-list/service-list.component.ts | 23 +++++++++--- .../user/user-list/user-list.component.ts | 4 +- .../booking-summary.component.ts | 3 ++ .../customer-info.component.html | 37 +++++++++++++------ .../customer-info.component.scss | 7 ++++ .../customer-info/customer-info.component.ts | 29 ++++++++++++--- .../doctor-profile.component.ts | 8 +++- .../layouts/admin/admin-layout.component.html | 2 +- .../menu-items/horizontal-menu-items.ts | 2 +- .../src/app/shared/menu-items/menu-items.ts | 2 +- ng-seed/src/environments/environment.ts | 4 +- 14 files changed, 118 insertions(+), 49 deletions(-) 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 7f42d4b..6657fbb 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 @@ -585,15 +585,15 @@
-

Here's your personal booking page. Edit and share this link with customers so they can book your Services directly.

- Appoinment booking domain +

Here's your personal booking page. share this link with customers so they can book your Services directly.

+ Appointment booking URL
- +
diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.scss b/ng-seed/src/app/end-user/customer-info/customer-info.component.scss index 7befee1..72ec69e 100644 --- a/ng-seed/src/app/end-user/customer-info/customer-info.component.scss +++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.scss @@ -159,4 +159,11 @@ footer { width: 100%; position: absolute; bottom: 0; +} + +.mat-green:disabled { + /* Styles for the button when it's disabled */ + background-color: gray !important; /* Change the background color to gray */ + color: white !important; /* Change the text color to white */ + /* Add any other styling as desired */ } \ No newline at end of file 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 02b8ca8..ab1d0e5 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 @@ -71,9 +71,11 @@ export class CustomerInfoComponent implements OnInit { hash:new FormControl('', []), amount: new FormControl('', []), name: new FormControl('', [Validators.required]), - email: new FormControl('', [Validators.required]), + email: new FormControl('', [Validators.required, Validators.email,Validators.pattern( + '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$', + ),]), phone: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]), - address_line_1: new FormControl('', [Validators.required]), + address_line_1: new FormControl('', [Validators.required,Validators.maxLength(100)]), address_line_2:new FormControl('', []), order_id: new FormControl('', []), description: new FormControl('', []), @@ -81,9 +83,9 @@ export class CustomerInfoComponent implements OnInit { return_url: new FormControl('', []), currency: new FormControl('', []), country: new FormControl('', []), - zip_code: new FormControl('', []), - state: new FormControl('', []), - city: new FormControl('', []), + zip_code: new FormControl('', [Validators.required]), + state: new FormControl('', [Validators.required]), + city: new FormControl('', [Validators.required]), udf1: new FormControl('', []), udf2: new FormControl('', []), udf3: new FormControl('', []), @@ -279,7 +281,7 @@ export class CustomerInfoComponent implements OnInit { getOTP(event) { - this.phoneNumber = this.form.value.phoneNo + this.phoneNumber = this.form.value.phone if( this.phoneNumber.length!=10){ alert("invalid Phone No...!") }else{ @@ -341,6 +343,8 @@ export class CustomerInfoComponent implements OnInit { onclickfun(){ + + console.log("worked") let row_obj = this.form.value function generateRandomString() { @@ -348,6 +352,15 @@ export class CustomerInfoComponent implements OnInit { const randomNum = (Math.random() + 1).toString(36).substring(7); return prefix + randomNum; } + if(this.verifyOTP == 0){ + this.getOTP(1) + } + + if(!this.form.valid ){ + + return + }else { + if(this.verifyOTP == 1){ let payment = { api_key: "4cb964d4-9ef4-4a25-8f85-a2a13f43cbba", hash: '', @@ -427,5 +440,9 @@ this.paymentform = payment; ) // } +} + +} + } 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 ee4e421..083b048 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 @@ -48,7 +48,6 @@ export class DoctorProfileComponent implements OnInit { console.log('booked', res); if(res.length>0){ - localStorage.setItem('busId',res[0].business[0].busId) localStorage.setItem('busName',res[0].business[0].busName) localStorage.setItem('logo',res[0].business[0].logo) this.bookedAppointment = res[0].user[0] @@ -58,6 +57,10 @@ export class DoctorProfileComponent implements OnInit { this.profileDetails = this.bookedAppointment.practitionerInfos[0] console.log(this.profileDetails) this.skillsDetails = JSON.parse(this.profileDetails.skills) + + this.busName = res[0].business[0].busName + this.currency = localStorage.getItem('currency') + this.logo = res[0].business[0].logo // this.skillsDetails = JSON.parse(this.skillsDetails) }else{ @@ -147,6 +150,9 @@ export class DoctorProfileComponent implements OnInit { // console.log(filter) localStorage.setItem('workingHrs',this.consultants[0].practitionerInfos [0].workingHours) + + localStorage.setItem('busName',this.ServicesMapDetailsList[0].business[0].busName) + localStorage.setItem('logo',this.ServicesMapDetailsList[0].business[0].logo) this.end_user.appointmentBooked.next(this.ServicesMapDetailsList) this.bookedAppointment = this.ServicesMapDetailsList[0].user[0] 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 d139319..e200ee7 100644 --- a/ng-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng-seed/src/app/layouts/admin/admin-layout.component.html @@ -30,7 +30,7 @@
{{getUserData.userName}}
-
- {{roleName}}
+
{{roleName}}