diff --git a/ng-seed/Appointment_Frontend_Build.zip b/ng-seed/Appointmnet_Frontend_Build.zip similarity index 94% rename from ng-seed/Appointment_Frontend_Build.zip rename to ng-seed/Appointmnet_Frontend_Build.zip index 1b7ceb9..9c88825 100644 Binary files a/ng-seed/Appointment_Frontend_Build.zip and b/ng-seed/Appointmnet_Frontend_Build.zip differ diff --git a/ng-seed/src/app/app.module.ts b/ng-seed/src/app/app.module.ts index 9578516..29dd2d7 100644 --- a/ng-seed/src/app/app.module.ts +++ b/ng-seed/src/app/app.module.ts @@ -154,7 +154,8 @@ const DEFAULT_PERFECT_SCROLLBAR_CONFIG: PerfectScrollbarConfigInterface = { provide: HTTP_INTERCEPTORS, useClass: TokenInterceptor, multi: true - },{provide: LocationStrategy, useClass: HashLocationStrategy} + }, + {provide: LocationStrategy, useClass: HashLocationStrategy} ], entryComponents: [], bootstrap: [AppComponent], 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 3506e3f..9f350c4 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 @@ -103,7 +103,7 @@ export class DialogBoxComponent implements OnInit { ServiceId: any; user_role: string; consultants: any = []; - Status:any = [{id:1,value:"Consult"},{id:2,value:"Attend"},{id:1,value:"No Show"},{id:1,value:"Cancel"}] + Status:any = [{id:1,value:"consultant"},{id:2,value:"Booked"},{id:1,value:"No Show"},{id:1,value:"cancelled"}] advanced_slot_days: any=7; slotIndex: any; findSlotIndex: any; @@ -117,11 +117,11 @@ export class DialogBoxComponent implements OnInit { constructor(private notifierService: NotifierService,private router: Router,private formBuilder: FormBuilder, public _cus:CustomersService, public dialogRef: MatDialogRef,public _api:ConsultantService, public _con:ConsultantService, @Inject(MAT_DIALOG_DATA) public data: UsersData,public _app:AppointmentsService,public end_user:EndUserService) { - console.log(data); + // // console.log(data); this.local_data = {...data}; this.action = this.local_data.action; this.frontDeskChoosedPractiID = this.local_data['ServicesMapDetail.userId'] - console.log(this.frontDeskChoosedPractiID) + // // console.log(this.frontDeskChoosedPractiID) } get f(){ return this.form.controls; @@ -140,7 +140,7 @@ export class DialogBoxComponent implements OnInit { } } close() { - // console.log(this.form.value); + // // console.log(this.form.value); this.dialogRef.close(); } @@ -157,16 +157,16 @@ export class DialogBoxComponent implements OnInit { ngOnInit() { let advanceDays = localStorage.getItem('advanced_slot_days') - console.log(this.advanced_slot_days,advanceDays) + // // console.log(this.advanced_slot_days,advanceDays) if(advanceDays == 'null' || advanceDays == null){ this.advanced_slot_days = 7 - console.log(this.advanced_slot_days) + // // console.log(this.advanced_slot_days) }else{ this.advanced_slot_days = parseInt(localStorage.getItem('advanced_slot_days'))-1 - console.log(this.advanced_slot_days) + // // console.log(this.advanced_slot_days) } // this._app.customerlist_observable$.subscribe((res) => { - // console.log('cus', res); + // // console.log('cus', res); // if(res){ @@ -177,17 +177,17 @@ export class DialogBoxComponent implements OnInit { this.user_role = localStorage.getItem('user_role'); let tmp=[] - console.log(this.advanced_slot_days) + // // console.log(this.advanced_slot_days) for(let i=0;i<=this.advanced_slot_days;i++){ var someDate = new Date(); someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days var dateFormated = someDate.toISOString().substr(0,10); - console.log(dateFormated); + // // console.log(dateFormated); tmp.push(dateFormated) } - console.log(tmp) + // // console.log(tmp) this.days= tmp - console.log(this.days) + // // console.log(this.days) if(this.user_role != 'FRONTDESK'){ let userId = localStorage.getItem('user_id') @@ -222,7 +222,7 @@ export class DialogBoxComponent implements OnInit { fees: new FormControl('',null), appoinmentSlots: new FormControl(''), }); - console.log(this.local_data, this.selects) + // // console.log(this.local_data, this.selects) // this.findSlotIndex = this.local_data.appoinmentSlots // this.local_data.forEach(element => { if(this.local_data.hasOwnProperty('action')){ @@ -236,7 +236,7 @@ export class DialogBoxComponent implements OnInit { this.customerId = this.local_data.customer this.slotsResult =this.local_data.appoinmentSlots this.local_data.appoinmentTime = new DatePipe('en-US').transform(this.local_data['appoinmentSlots'][0], 'shortTime') - console.log(this.servicesList_array) + // // console.log(this.servicesList_array) this.local_data.paymentStatus = ""+this.local_data.paymentStatus+"" } @@ -249,10 +249,10 @@ export class DialogBoxComponent implements OnInit { this.form.patchValue(this.local_data) let id = localStorage.getItem('user_id') - console.log(id) + // // console.log(id) this._con.getUsersListDetails(id).subscribe(res => { if (res.status == 200) { - console.log(res) + // // console.log(res) this.userData = res.data[0] this.form.controls['busname'].setValue( this.userData.BusinessDetails[0].busName @@ -272,10 +272,10 @@ export class DialogBoxComponent implements OnInit { let findAppointmentDate = this.local_data.appoinmentDate this.days.forEach(element => { - console.log(element) + // // console.log(element) if(element == findAppointmentDate){ this.days.indexOf(element) - console.log(this.days.indexOf(element)) + // // console.log(this.days.indexOf(element)) this.clicks = this.days.indexOf(element) } }); @@ -283,7 +283,7 @@ export class DialogBoxComponent implements OnInit { let options:any = { weekday: 'long'}; var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options); var formatDate = prnDt.split(" ") - console.log(formatDate) + // // console.log(formatDate) this.dayName = formatDate[0] let userId @@ -291,14 +291,14 @@ export class DialogBoxComponent implements OnInit { userId = localStorage.getItem('user_id') }else{ userId = frontDeskPractiUserid - console.log(frontDeskPractiUserid) + // // console.log(frontDeskPractiUserid) } - console.log(userId) + // // console.log(userId) let params ={"id":userId ,"day": this.dayName ,"addcount": this.clicks} this.end_user.getSlots(params).subscribe(res => { if (res.status == 200) { - console.log(res) + // // console.log(res) let data = res['data']; this.slots = data let len =[] @@ -306,12 +306,12 @@ export class DialogBoxComponent implements OnInit { len.push( element.length) }) - console.log(len) + // // console.log(len) // this.slots.forEach(element => { - // console.log(element) + // // console.log(element) // if(element == this.findSlotIndex[0]){ // this.slots.indexOf(element) - // console.log(this.slots.indexOf(element)) + // // console.log(this.slots.indexOf(element)) // this.slotIndex = this.slots.indexOf(element) // } @@ -323,15 +323,15 @@ export class DialogBoxComponent implements OnInit { getCosultantList() { let param ={"busId": localStorage.getItem('busId')} - console.log(param) + // // console.log(param) this._app.getCosultantListDetails(param).subscribe(res => { if (res.status == 200) { - console.log(res.data) + // // console.log(res.data) let consultantsList = res.data; this.consultants = consultantsList.filter(val => val.role == 'PRACTITIONER') - console.log(this.consultants) + // // console.log(this.consultants) if(this.user_role == 'FRONTDESK'){ - console.log(this.local_data['ServicesMapDetail.userId']) + // // console.log(this.local_data['ServicesMapDetail.userId']) this.practiId = this.local_data['ServicesMapDetail.userId'] setTimeout(() => { this.form.controls['practitioner'].setValue(this.practiId); @@ -349,7 +349,7 @@ export class DialogBoxComponent implements OnInit { } getConsultServices(selectedPractititoner){ - console.log(selectedPractititoner) + // // console.log(selectedPractititoner) let userId = selectedPractititoner.id let busId = localStorage.getItem('busId') this.getServicesList(userId, busId) @@ -360,47 +360,47 @@ export class DialogBoxComponent implements OnInit { getPractitionerDetails(userId){ // let id = localStorage.getItem('user_id') - console.log(userId) + // // console.log(userId) this.frontDeskChoosedPractiID = userId this._app.getPractitionerData(userId).subscribe(res => { if (res.status == 200) { - console.log(res) + // // console.log(res) let usersList = res.data[0]; localStorage.setItem('practitioner',JSON.stringify(usersList)) - console.log(usersList) + // // console.log(usersList) let dataDays = usersList['practitionerInfos'][0].days localStorage.setItem('advanced_slot_days',dataDays) this.advanced_slot_days = dataDays - console.log(this.advanced_slot_days) + // // console.log(this.advanced_slot_days) let tmp=[] - console.log(this.advanced_slot_days) + // // console.log(this.advanced_slot_days) for(let i=0;i<=this.advanced_slot_days;i++){ var someDate = new Date(); someDate.setDate(someDate.getDate() + i); //number of days to add, e.x. 15 days var dateFormated = someDate.toISOString().substr(0,10); - console.log(dateFormated); + // // console.log(dateFormated); tmp.push(dateFormated) } - console.log(tmp) + // // console.log(tmp) this.days= tmp } }) } checkSlotDur(param:any,i:any,slots){ - //console.log(param,i) + //// console.log(param,i) // this.slot_array =[]; // debugger; // event.preventDefault(); // this.slotIndex = i // this.slotTime = param - // console.log(this.date,param) + // // console.log(this.date,param) let thirtyMinutes = this.duration * 60000; // convert 30 minutes to milliseconds let date1 = new Date(param); let date2 = new Date(date1.getTime() + thirtyMinutes); - // console.log(date1); - // console.log(date2); + // // console.log(date1); + // // console.log(date2); const currentTime = new Date(); // Get the current time //const filteredTimes = this.slots.filter(time => new Date(time) > date1); @@ -415,7 +415,7 @@ export class DialogBoxComponent implements OnInit { const lastSlt = new Date( resultArray[0]); const filteredTimes = slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt); - // console.log(resultArray,filteredTimes); + // // console.log(resultArray,filteredTimes); if(filteredTimes.length>0){ return 1 @@ -424,10 +424,10 @@ export class DialogBoxComponent implements OnInit { return 0 } // let result = filteredTimes.pop(); - // console.log(result); + // // console.log(result); // this.slots.forEach(element => { // if(element { if (res.status == 200) { if(this.local_data.hasOwnProperty('action')){ @@ -516,18 +516,18 @@ export class DialogBoxComponent implements OnInit { goToSlotBooking(i){ - console.log(i) + // console.log(i) // this.days[] if(this.clicks { if (res.status == 200) { - console.log(res) + // console.log(res) let data = res['data']; this.slots = data // this.slots.forEach(element => { - // console.log(element) + // // console.log(element) // if(element == this.findSlotIndex[0]){ // this.slots.indexOf(element) - // console.log(this.slots.indexOf(element)) + // // console.log(this.slots.indexOf(element)) // this.slotIndex = this.slots.indexOf(element) // } @@ -563,13 +563,13 @@ export class DialogBoxComponent implements OnInit { if(this.clicks >0){ this.clicks -= 1; } - console.log( this.clicks) - console.log(this.days,this.days[ this.clicks], this.clicks) + // console.log( this.clicks) + // console.log(this.days,this.days[ this.clicks], this.clicks) let options:any = { weekday: 'long'}; var prnDt = new Date(this.days[ this.clicks]).toLocaleTimeString('en-us', options); var formatDate = prnDt.split(" ") - console.log(formatDate) + // console.log(formatDate) this.dayName = formatDate[0] let userId @@ -579,15 +579,15 @@ export class DialogBoxComponent implements OnInit { userId = this.frontDeskChoosedPractiID } let params ={"id":userId , "day": this.dayName , "addcount": this.clicks} -console.log(params) +// console.log(params) this.end_user.getSlots(params).subscribe(res => { if (res.status == 200) { - console.log(res) + // console.log(res) let data = res['data']; this.slots = data } }) - console.log( this.clicks) + // console.log( this.clicks) this.form.controls['appoinmentDate'].setValue(this.days[ this.clicks]) } check(param){ @@ -611,21 +611,21 @@ console.log(params) let params ={"id": userId,'addcount':0} this._app.getSlots(params).subscribe((res:any) => { if (res.status == 200) { - console.log(res) + // console.log(res) let data = res['data']; this.slots = data let len =[]; this.slots.forEach(element => { len.push( element.length) }) - console.log(len) + // console.log(len) this.slotslength = len.reduce((a, b) => a + b, 0) } }) } toggleActive(event:any,param:any,i:any,slots,j){ - console.log(event,param,i) + // console.log(event,param,i) this.slot_array =[]; this.slotIndex_group=j // debugger; @@ -636,12 +636,12 @@ console.log(params) this.form.controls['appoinmentTime'].setValue(resultDate) this.date= param - console.log(this.date,param,this.duration, this.ServiceId) + // console.log(this.date,param,this.duration, this.ServiceId) let thirtyMinutes = this.duration*60000; // convert 30 minutes to milliseconds let date1 = new Date(param); let date2 = new Date(date1.getTime() + thirtyMinutes); - console.log(date1); - console.log(date2,thirtyMinutes); + // console.log(date1); + // console.log(date2,thirtyMinutes); const currentTime = new Date(); // Get the current time //const filteredTimes = this.slots.filter(time => new Date(time) > date1); @@ -656,17 +656,17 @@ console.log(params) const lastSlt = new Date( resultArray[0]); const filteredTimes = slots.filter(time => new Date(time) >= firstSlt && new Date(time) <= lastSlt); - console.log(resultArray,filteredTimes); + // console.log(resultArray,filteredTimes); // if(filteredTimes.length > 1){ // let result = filteredTimes.pop(); - // console.log(result); + // // console.log(result); // } this.slotsResult = filteredTimes // this.show = false; // this.slots.forEach(element => { // if(element { if (res.status == 200) { this.servicesList_data = res.data; - console.log(this.servicesList_data) + // console.log(this.servicesList_data) res['data'].forEach(element => { // tmp.push(element.service) element.service.forEach(e => { - console.log(e) + // console.log(e) this.servicesList_array.push(e) this.assignService.push(e.servicesName) }); @@ -697,10 +697,10 @@ console.log(params) // duration = this.serviceMapdetails[0].service[0].duration // fees = this.serviceMapdetails[0].service[0].fees // } - console.log(this.servicesList_array,this.form.value) + // console.log(this.servicesList_array,this.form.value) this.servicesList_array.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']}) let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == this.local_data['ServicesMapDetail.serviceId']}) - console.log(serviceDetails,this.local_data['ServicesMapDetail.serviceId']) + // console.log(serviceDetails,this.local_data['ServicesMapDetail.serviceId']) if(serviceDetails[0].duration.length>0 ){ this.duration = serviceDetails[0].duration[0].durationNew } else{ @@ -714,19 +714,23 @@ console.log(params) // this.assignService = this.checkedArray } serviceData(data){ - console.log(data) + // console.log(data) this.ServiceId = data.serviceId this.duration = data.duration - + this.fees =[]; let serviceDetails = this.servicesList_data.filter(arr=>{return arr.serviceId == data.serviceId}) - console.log(serviceDetails) + // console.log(serviceDetails) if(serviceDetails[0].duration.length>0 ){ this.duration = serviceDetails[0].duration[0].durationNew this.fees = serviceDetails[0].duration[0].fees + // console.log(this.fees) } else{ - this.duration = this.servicesList_array[0].duration - this.fees = this.servicesList_array[0].fees + this.duration = serviceDetails[0].service[0].duration + this.fees = serviceDetails[0].service[0].fees + // console.log(this.fees) } + // console.log(this.fees) + // this.form.controls['fees'].setValue([]) this.form.controls['fees'].setValue(this.fees) this.clicks = 0 this.getSlots() @@ -740,11 +744,11 @@ console.log(params) if (res.status == 200) { let appoinmentsList = res.data; let id = localStorage.getItem('user_id') - console.log(id) - console.log(appoinmentsList) + // console.log(id) + // console.log(appoinmentsList) let filter = appoinmentsList.filter(arr=>{return arr["ServicesMapDetail.userId"] == id}) - console.log(filter) + // console.log(filter) filter.forEach(element => { this.appoinmentsIds.push( element.customer[0].id) }); @@ -757,15 +761,15 @@ console.log(params) this._cus.getCustomersListDetails(param).subscribe(res => { if (res.status == 200) { this.customersList = res.data; - console.log(this.customersList,this.appoinmentsIds) + // console.log(this.customersList,this.appoinmentsIds) let user_role = localStorage.getItem('user_role'); if(user_role == 'PRACTITIONER'){ const activeIds = this.appoinmentsIds const serviceList = this.customersList - console.log(activeIds,serviceList) + // console.log(activeIds,serviceList) const result = serviceList.filter(({id}) => activeIds.includes(id)); - console.log(result) + // console.log(result) this.customersList = result } @@ -781,7 +785,7 @@ receivedMessageHandler(res){ if(res == 0){ this.customerCard = 0 }else{ - console.log(res) + // console.log(res) this.customersList.push(res.data) this.customerId = res.data.id this.form.controls['customer'].setValue( res.data.id); @@ -790,10 +794,10 @@ receivedMessageHandler(res){ } receiveAutoMsgHandler(p) { - console.log(p) + // console.log(p) } customerIdvalue(id){ - console.log(id) + // console.log(id) this.customerId = id } diff --git a/ng-seed/src/app/appoinment/business/add-business/add-business.component.html b/ng-seed/src/app/appoinment/business/add-business/add-business.component.html index 2811a3e..906a667 100644 --- a/ng-seed/src/app/appoinment/business/add-business/add-business.component.html +++ b/ng-seed/src/app/appoinment/business/add-business/add-business.component.html @@ -49,8 +49,10 @@ - Select Country + formControlName="country" noEntriesFoundLabel="'no matching country found'"> + + + {{ country.flag }}   {{ country.name }} Invalid option diff --git a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html index d7b2873..8a87af9 100644 --- a/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html +++ b/ng-seed/src/app/appoinment/service-list-details/add-service/add-service.component.html @@ -21,7 +21,7 @@ --> Duration - +
Mins
diff --git a/ng-seed/src/app/dashboard/dashboard.component.html b/ng-seed/src/app/dashboard/dashboard.component.html index 6593b28..51108b1 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.html +++ b/ng-seed/src/app/dashboard/dashboard.component.html @@ -1,8 +1,41 @@
- -
+ + +
+
+ calendar_today +
+
+
Appointment
+
+
+
+
+
+
+
+
+

{{count.today_appoinments_count}}

+

Today

+
+
+
+
+
+
+
+
+

{{count.monthly_appoinments_count}}

+

Monthly

+
+
+
+
+
+
+
- + + +
+
+ + +
+
+
Revenue
+
+
+
+
+
+
+
+
+

{{count.today_earning_count | currency:currency:true:'2.0'}}

+

Today

+
+
+
+
+
+
+
+
+

{{count.monthly_earning_count | currency:currency:true:'2.0'}}

+

Monthly

+
+
+
+
+
+
+
+
- + + +
+
+ supervisor_account +
+
+
Customer
+
+
+
+
+
+
+
+
+

{{count.customer_count}}

+

Total

+
+
+
+
+
+
+
+
-
  • - Email: - {{bookedAppointment.email}} -
  • -
  • - Social : - -
  • - -
    - - +
    @@ -148,12 +103,56 @@
    +
    +
    +
    + +
    +
    +

    {{bookedAppointment.userName}}

    + {{bookedAppointment.practitionerInfos[0].designtion}} + {{bookedAppointment.contactNo}}
    + {{bookedAppointment.email}}
    + +
    +
    + + +

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