From 9546fb481838294287a503835f7faac243e3f996 Mon Sep 17 00:00:00 2001 From: Surendiran Date: Mon, 15 May 2023 09:58:45 +0530 Subject: [PATCH] all bug fix --- .../appoinments-list.component.html | 4 +- .../appointment-addcustomer.component.html | 6 +-- .../dialog-box/dialog-box.component.html | 10 ++-- .../dialog-box/dialog-box.component.ts | 10 ++-- .../add-business/add-business.component.html | 19 ++++--- .../add-business/add-business.component.ts | 25 +++++++++- .../consultant-setting.component.html | 30 +++++------ .../consultant-setting.component.scss | 34 +++++++------ .../consultant-setting.component.ts | 4 +- .../edit-working-hours.component.ts | 50 ++++++++++++++++++- .../add-customers.component.html | 2 +- .../customers-list.component.ts | 11 ++-- .../customers-service/customers.service.ts | 7 +-- .../consultant-list.component.html | 4 +- .../add-service/add-service.component.html | 4 +- .../add-service/add-service.component.ts | 2 +- .../service-list/service-list.component.html | 4 +- .../service-list/service-list.component.ts | 1 + .../user/add-user/add-user.component.html | 7 ++- .../user/add-user/add-user.component.ts | 41 +++++++++++++-- .../pract-assign-service.component.html | 4 +- .../user/user-list/user-list.component.ts | 2 +- .../booking-summary.component.html | 4 +- .../booking-summary.component.ts | 2 +- .../centers-list.component.html | 4 +- .../consultants-list.component.html | 4 +- .../customer-info.component.html | 23 +++++---- .../customer-info/customer-info.component.ts | 5 +- .../doctor-profile.component.html | 12 ++--- .../slot-booking-details.component.html | 2 +- .../src/app/layouts/role-menu-items.pipe.ts | 6 +-- .../src/app/session/otp/otp.component.html | 2 +- .../session/register/register-component.html | 2 +- 33 files changed, 229 insertions(+), 118 deletions(-) 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 453d80f..2d62815 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 @@ -7,10 +7,10 @@ Practitioner - + All - Dr. {{details.userName}} + {{details.userName}} 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 8fae7eb..19afc7e 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 @@ -6,13 +6,13 @@ Name - + Email - + 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 78714fc..0a2422b 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 @@ -1,3 +1,4 @@ +import { HttpClient } from '@angular/common/http'; import { Component, Inject, OnInit, Optional } from '@angular/core'; import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; import { MatCheckboxChange } from '@angular/material/checkbox'; @@ -5,6 +6,7 @@ import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { NotifierService } from 'angular-notifier'; import { environment } from 'environments/environment'; +import { map } from 'rxjs/internal/operators/map'; export interface UsersData { name: string; id: number; @@ -28,7 +30,7 @@ export class AddBusinessComponent implements OnInit { selectedFiles: any; currentFileUpload: any; private apiUrl = environment.apiEndpoint; - constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, + constructor(private http: HttpClient,private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public dialogRef: MatDialogRef, @Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData) { console.log(data); @@ -97,7 +99,7 @@ export class AddBusinessComponent implements OnInit { state: 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}$', - ),]), + ),],[this.validateUsernameAvailability.bind(this)]), contactNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10)]), createdBy:new FormControl(userrole,[Validators.required]), }); @@ -109,6 +111,25 @@ export class AddBusinessComponent implements OnInit { return this.form.controls[controlName].hasError(errorName); } + validateUsernameAvailability(control: FormControl) { + + return this.http.get(this.apiUrl + "businessDetailList") + .pipe( + map((response:any) => { + + console.log(response) + + let tmp=[]; + response.data.forEach(element => { + tmp.push(element.email) + }); + console.log(tmp,`${control.value}`); + return !tmp.includes(`${control.value}`) ? null : { usernameTaken: true }; + }) + ); + } + + submit(){ let tmp = this.form.value tmp.id = this.local_data.id 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 c015948..be48474 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 @@ -10,7 +10,7 @@
Search practitioner - + search
@@ -34,7 +34,7 @@
-
Dr.{{consultant.userName}}
+
{{consultant.userName}}
- -
+ +
+
@@ -286,8 +287,9 @@
--> +
- + @@ -297,12 +299,12 @@
- Working Hours + Working Hours - ({{usersList.userName}})
- +
@@ -511,11 +513,11 @@
- Define Your Services + Define Your Services - ({{usersList.userName}}) Assign Service - +
@@ -537,7 +539,7 @@
- +
@@ -571,16 +573,16 @@ - Staff Booking URL + Appointment Booking Link
- Share Booking Page + Share Appointment Booking Link - ({{usersList.userName}})

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

- Default booking domain + Appoinment booking domain
diff --git a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss index fc3a782..2fb464e 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss +++ b/ng-seed/src/app/appoinment/consultant-setting/consultant-setting/consultant-setting.component.scss @@ -28,8 +28,8 @@ h5{ display: flex !important; } -.scrollHV { - height: calc(100vh - 105px); +.scrollHVtab1 { + height: calc(100vh - 200px); } .consultant-list-card { border-radius: 10px; @@ -338,8 +338,8 @@ margin: 30px 25px 30px 30px; margin-top: 4px; margin-left: 10px; } - .scrollHV { - height: calc(100vh - 190px); + .scrollHVtab2 { + height: calc(100vh - 205px); } .add-button{ border: 1px solid #50497F; @@ -354,10 +354,7 @@ margin: 30px 25px 30px 30px; .dis-font{ font-size: 15px; } - .mat-tab-body-content { - height: 100%; - overflow: hidden!important; - } + .margin{ margin-bottom: 10rem; } @@ -382,11 +379,9 @@ margin: 30px 25px 30px 30px; // } //mat-tab3start -.assignService{ - .scrollHV { - height: calc(100vh - 461px) !important; - } -} + + + .p-1{ padding: 1rem !important; .flexCard{ @@ -584,9 +579,7 @@ padding-top: 13px; box-sizing: border-box; line-height: 15px; } -.scrollHV { -height: calc(100vh - 240px); -} + ::ng-deep .mat-form-field-infix { height: 50px!important; } @@ -640,4 +633,13 @@ content: "\20B9"; .scrollHV2{ height: calc(100vh - 305px); +} + +::ng-deep .mat-tab-body-content { + height: 100%; + overflow:hidden !important; +} + +.scrollHVtab3 { + height: calc(100vh - 190px) !important; } \ No newline at end of file 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 947a4b3..3f19dce 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 @@ -268,9 +268,9 @@ unavailability(action,obj) { this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']); console.log(this.practitionerdetails) - if(this.userRole == 'PRACTITIONER'){ + if(this.userRole == 'PRACTITIONER' || this.userRole == 'FRONTDESK'){ this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr+"/details" - } else if (this.userRole == 'BADMIN' || this.userRole == 'FRONTDESK' ){ + } else if (this.userRole == 'BADMIN'){ this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr } 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 846eddc..d91461e 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 @@ -12,6 +12,24 @@ import { ConsultantService } from "../consultant-service/consultant.service"; }) export class EditWorkingHoursComponent implements OnInit { startTimes:any = [ + "12:00 am", + "12:30 am", + "01:00 am", + "01:30 am", + "02:00 am", + "02:30 am", + "03:00 am", + "03:30 am", + "04:00 am", + "04:30 am", + "05:00 am", + "05:30 am", + "06:00 am", + "06:30 am", + "07:00 am", + "07:30 am", + "08:00 am", + "08:30 am", "09:00 am", "09:30 am", "10:00 am", @@ -37,8 +55,31 @@ export class EditWorkingHoursComponent implements OnInit { "08:00 pm", "08:30 pm", "09:00 pm", + "09:30 pm", + "10:00 pm", + "10:30 pm", + "11:00 pm", + "11:30 pm", ]; endTimes = [ + "12:00 am", + "12:30 am", + "01:00 am", + "01:30 am", + "02:00 am", + "02:30 am", + "03:00 am", + "03:30 am", + "04:00 am", + "04:30 am", + "05:00 am", + "05:30 am", + "06:00 am", + "06:30 am", + "07:00 am", + "07:30 am", + "08:00 am", + "08:30 am", "09:00 am", "09:30 am", "10:00 am", @@ -46,8 +87,8 @@ export class EditWorkingHoursComponent implements OnInit { "11:00 am", "11:30 am", "12:00 pm", - "12:30 pm", - "01:00 pm", + "12:30 pm", + "01:00 pm", "01:30 pm", "02:00 pm", "02:30 pm", @@ -64,6 +105,11 @@ export class EditWorkingHoursComponent implements OnInit { "08:00 pm", "08:30 pm", "09:00 pm", + "09:30 pm", + "10:00 pm", + "10:30 pm", + "11:00 pm", + "11:30 pm", ]; days = [ "Sunday", 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 ebda3f3..8d88fd0 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/customers-list/customers-list.component.ts b/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.ts index 4bef798..701ba16 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 @@ -8,6 +8,7 @@ import { AppointmentsService } from 'app/appoinment/appoinments/appointments-ser import Swal from 'sweetalert2'; import { AddCustomersComponent } from '../add-customers/add-customers.component'; import { CustomersService } from '../customers-service/customers.service'; +import { local } from 'd3'; export interface UsersData { @@ -111,8 +112,8 @@ export class CustomersListComponent implements OnInit { } getCustomerDetails(){ - - this._cus.getCustomersListDetails().subscribe(res => { + let param = {"busId": localStorage.getItem('busId')} + this._cus.getCustomersListDetails(param).subscribe(res => { if (res.status == 200) { this.isLoading = false this.customersList = res.data; @@ -123,7 +124,6 @@ export class CustomersListComponent implements OnInit { const activeIds = this.appoinmentsIds const serviceList = this.customersList console.log(activeIds,serviceList) - const result = serviceList.filter(({id}) => activeIds.includes(id)); console.log(result) this.customersList = result @@ -132,8 +132,7 @@ export class CustomersListComponent implements OnInit { return b.id - a.id; }); this.customersList.forEach((element, index) => { - element.index = index - + element.index = index }); this.customersListSource['data'] = this.customersList; @@ -145,8 +144,6 @@ export class CustomersListComponent implements OnInit { }); this.customersList.forEach((element, index) => { element.index = index - - }); this.customersListSource['data'] = this.customersList; console.log(this.customersListSource) diff --git a/ng-seed/src/app/appoinment/customers/customers-service/customers.service.ts b/ng-seed/src/app/appoinment/customers/customers-service/customers.service.ts index 061e98f..a747b9a 100644 --- a/ng-seed/src/app/appoinment/customers/customers-service/customers.service.ts +++ b/ng-seed/src/app/appoinment/customers/customers-service/customers.service.ts @@ -12,14 +12,15 @@ export class CustomersService { private apiUrl = environment.apiEndpoint; constructor(private _http: HttpClient) { } - getCustomersListDetails(): Observable { - console.log('IN') - return this._http.get(this.apiUrl + "getCustomersDetails") + getCustomersListDetails(param): Observable { + return this._http.post(this.apiUrl + "getCustomersDetails",param) // .pipe( // catchError(this.handleError('role', [])) // ) } + + addFormDetails(addParams): Observable { return this._http.post(this.apiUrl + 'CreateCustomers', addParams) // .pipe( diff --git a/ng-seed/src/app/appoinment/front-desk/consultant-list/consultant-list.component.html b/ng-seed/src/app/appoinment/front-desk/consultant-list/consultant-list.component.html index b9f6c0e..6171277 100644 --- a/ng-seed/src/app/appoinment/front-desk/consultant-list/consultant-list.component.html +++ b/ng-seed/src/app/appoinment/front-desk/consultant-list/consultant-list.component.html @@ -9,7 +9,7 @@
Search practitioner - + search
@@ -30,7 +30,7 @@
-
Dr.{{consultant.userName}}
+
{{consultant.userName}}

AvatarPractitioner

- Dr. {{bookedDetails.doctor}} + {{bookedDetails.doctor}}

Avatar Service

{{bookedDetails.service}} ({{bookedDetails.duration}}Mins)

AvatarDate

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 ff3e9f5..d58fffc 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 @@ -10,6 +10,7 @@ import { OptVerifyComponent } from './opt-verify/opt-verify.component'; import { event } from 'jquery'; import { environment } from 'environments/environment'; import {Location} from '@angular/common'; +import { local } from 'd3'; var config = { apiKey: "AIzaSyBVPQ6C7cg5l8I-o7WSmmXdioMa4C0ZKNM", @@ -80,7 +81,9 @@ export class CustomerInfoComponent implements OnInit { if(this.verifyOTP == 1){ let row_obj = this.form.value console.log(row_obj) - let addFormData = { + let busId = localStorage.getItem('busId') + let addFormData = { + busId: busId, cusName: row_obj.cusName, email: row_obj.email, address_1: row_obj.address_1, diff --git a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.html b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.html index a25b6cc..53d31ee 100644 --- a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.html +++ b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.html @@ -7,7 +7,7 @@
Pro -
Dr. Suganya
+
Suganya

ENT | 8 YRS

@@ -30,11 +30,11 @@
-
About Dr. Suganya
-

Dr Suganya is a well-known surgeon and one of the best ENT specialists in Chennai. She is trained to treat medical and surgical conditions affecting the ear, nose and throat. ENT specialists are also called otolaryngologists.

+
About Suganya
+

Suganya is a well-known surgeon and one of the best ENT specialists in Chennai. She is trained to treat medical and surgical conditions affecting the ear, nose and throat. ENT specialists are also called otolaryngologists.

-
Clinic Address
+
Clinic Address

No. 320, Padma Complex, Anna Salai,TeynampetChennai

@@ -66,7 +66,7 @@
-

Dr.{{bookedAppointment.userName}}

+

{{bookedAppointment.userName}}

{{bookedAppointment.practitionerInfos[0].designtion}}
@@ -130,7 +130,7 @@
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 5bd90cf..da4a1fc 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 @@ -200,7 +200,7 @@

Avatar Practitioner

- Dr. {{doctor}} + {{doctor}}

Avatar Service

{{servicesName.servicesName}} ({{serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].durationNew:serviceMapdetails[0].service[0].duration }} Mins) diff --git a/ng-seed/src/app/layouts/role-menu-items.pipe.ts b/ng-seed/src/app/layouts/role-menu-items.pipe.ts index 6c28eb7..ca93662 100644 --- a/ng-seed/src/app/layouts/role-menu-items.pipe.ts +++ b/ng-seed/src/app/layouts/role-menu-items.pipe.ts @@ -10,10 +10,10 @@ export class RoleMenuItemsPipe implements PipeTransform { // // this is for horizontal menu filter // if(type=="1"){ switch(localStorage.getItem('user_role')){ - case 'SADMIN': return value.filter(val=>val.state!="appoinments" && val.state!="customers" && val.state != "consultant-setting" && val.state!="consultants" && val.state!="services" && val.state!= "consultant-list"); + case 'SADMIN': return value.filter(val=>val.state!="appoinments" && val.state!="customers" && val.state != "consultant-setting" && val.state!="consultants" && val.state!="services" && val.state!= "consultant-list" && val.state!= "mail-log"); case 'BADMIN': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="appoinments" && val.state!= "consultant-list"); - case 'PRACTITIONER': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services" && val.state!= "consultant-list"); - case 'FRONTDESK': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state != "home" && val.state!="customers" && val.state!= "consultant-list"); + case 'PRACTITIONER': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state!="services" && val.state!= "consultant-list" && val.state!= "mail-log"); + case 'FRONTDESK': return value.filter(val=>val.state !="business" && val.state!="consultants" && val.state!="users" && val.state != "home" && val.state!="customers" && val.state!= "consultant-list" && val.state!= "mail-log"); // case 'PRACTITIONER': // case '3': return value.filter(val=>val.state!="settings"); // case '4': return value.filter(val=>val.state!="settings" && val.state!="quality_check_discussion" && val.state!="reports" && val.state!="sales-pd-list"); diff --git a/ng-seed/src/app/session/otp/otp.component.html b/ng-seed/src/app/session/otp/otp.component.html index 5156ba2..4f8b147 100644 --- a/ng-seed/src/app/session/otp/otp.component.html +++ b/ng-seed/src/app/session/otp/otp.component.html @@ -31,7 +31,7 @@
- + OTP will be sent to this number by SMS and whatsapp.
diff --git a/ng-seed/src/app/session/register/register-component.html b/ng-seed/src/app/session/register/register-component.html index 1cf7f9f..1daff2f 100644 --- a/ng-seed/src/app/session/register/register-component.html +++ b/ng-seed/src/app/session/register/register-component.html @@ -102,7 +102,7 @@ --> - + Contact No is required Limit exceed