From fcffc51a83a1d5c1a725fe8a8f5a44f14feadea0 Mon Sep 17 00:00:00 2001 From: "surendar.m@watermelon.us" Date: Thu, 13 Apr 2023 18:44:42 +0530 Subject: [PATCH 1/4] appointment --- .../appoinments-list.component.ts | 2 +- .../dialog-box/dialog-box.component.html | 337 +++++++----------- .../dialog-box/dialog-box.component.scss | 123 ++++++- .../dialog-box/dialog-box.component.ts | 99 +++-- .../consultant-setting.component.html | 2 +- .../consultant-setting.component.scss | 8 +- .../consultant-setting.component.ts | 2 +- .../edit-working-hours.component.html | 5 +- .../edit-working-hours.component.scss | 16 +- .../consultants-list.component.html | 8 +- .../doctor-profile.component.html | 17 +- .../doctor-profile.component.ts | 11 +- .../service-list.component.html | 7 +- .../slot-booking-details.component.scss | 142 -------- ng-seed/src/environments/environment.ts | 2 +- 15 files changed, 364 insertions(+), 417 deletions(-) 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 e0596a3..13f7074 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 @@ -161,7 +161,7 @@ export class AppoinmentsListComponent implements OnInit { openDialog(action,obj) { obj.action = action; const dialogRef = this.dialog.open(DialogBoxComponent, { - width: '55%', + width: '40%', height: '100%', // maxWidth: '38vw', position: { right: '0' }, diff --git a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.html b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.html index 5c37321..11c18ec 100644 --- a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.html +++ b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.html @@ -1,225 +1,144 @@ - -
- {{action}} Appoinment + +
{{action}} Appoinment -
- -
+ >close
+ +
-
- - - - -- - - {{business.busname}} - - - Please choose an Business - Please choose any other - -
+ + Business + + + {{business.busname}} + + + Please choose an Business + Please choose any other + -
- - - - -- - - {{business.service}} - - - Please choose an Service - Please choose any other - -
+ + Service + + -- + + {{business.service}} + + + Please choose an Service + Please choose any other + -
- - - - -- - - {{business.practitioner}} - - - Please choose an Practitioner - Please choose any other - -
+ + Practitioner + + -- + + {{business.practitioner}} + + + Please choose an Practitioner + Please choose any other + -
- - - - - - - - - - - - -
-
- Wed, 12 Apr 2023 -
-
-
+ + Choose a date + + + + + + Choose a Time + + -
-
- MORNING -
-
- - - -
+ + -
-
- AFTERNOON -
-
- - -
+
+ + + + + + + + + + + +
+ + + + Customer + + + + New Customer + + {{business.customer}} + + + Please choose an Customer + Please choose any other + + + +
+
+ New Customer
+ + Name + + + + + Email + + + + + Phone + + +
-
-
- EVENING -
-
- - -
+ -
-
- NIGHT -
-
- -
-
-
-
-
-
+ - - -
- - - - - Add customer - - {{business.customer}} - - - Please choose an Customer - Please choose any other - -
- - - -
- - -
+ + Customer + Description + +
- - - - - - - - -
- - - Sure to delete {{local_data.name}}? - -
-
- - -
- \ No newline at end of file + + + + Sure to delete {{local_data.cusName}}? + +
+ +
+ + +
+ \ No newline at end of file diff --git a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss index 07a69a4..254055f 100644 --- a/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss +++ b/ng-seed/src/app/appoinment/appoinments/dialog-box/dialog-box.component.scss @@ -1,8 +1,13 @@ -// ::ng-deep .cdk-overlay-pane{ -// width: 60%!important; -// } +$color_red_orange_approx: #107c14; +$white: #fff; +$black_10: rgba(0, 0, 0, 0.1); +$black_30: rgba(0, 0, 0, 0.3); +$icon-size: 3rem; +$icon-color: #D8D8D8; +$main-color: #f44336; +$tem-color : #217e69; .mat-pane{ - width: 20rem; + width: 27rem; } .button{ margin-bottom: 1rem; @@ -72,7 +77,7 @@ // width: 175%!important; // } .mate{ - width: 22% !important; + width: 43% !important; } .date-marge{ margin-left: 1.5rem; @@ -138,4 +143,110 @@ padding: 5px; font-size: 12px; color: #666; -} \ No newline at end of file +} + +.navStyle{ + width: 100%; + height: 3rem; + background-color: #227f6e; + color: #fff; +} +.innerdivs{ + width:100%; + // float:left; +} +.innerdivs2{ + width:100%; + // float:left; + text-align: center; + margin-bottom: 1rem !important; +} +.cardDesign{ + border: 1px solid #e8edef; + width: 89%; + background-color: #227f6e21; + box-shadow: 0 2px 0 rgb(0 0 0 / 3%) +} +.hoverButton{ + background: $white; + // box-shadow: 0 2px 6px $tem-color; + transition: all 0.1s ease-in-out 0s; + &:hover { + box-shadow: 0 0 8px $tem-color; + + transform: scale(1.05); + } +} +.primary{ + background-color: #00866e00; + color: brown; + width: auto; + border: 1px solid brown; + cursor: pointer; +} +.clickedSlot{ + color: white !important; + background-color: brown !important; + cursor: pointer !important; + width: auto; +} +.bookedSlot{ + background-color: darkgrey; + color: white; + width: 6rem; + cursor: no-drop !important; +} +.newCustomer{ + color: #227f6e; + text-align: center; + border: 1px solid #e8edef; +} + +.cardDesign2{ + border: 1px dashed #227f6e; + width: 75%; + height: 348px; + margin-left: 3rem; + background-color: #fcfcfc; + margin-bottom: 2rem; +} +.card-mat-pane{ + width: 20rem; +} +.new{ + color: #227f6e; + margin-top: 0px !important; +} +.popup-button { + // margin-top: 2rem; + width: 100%; + } + .cancel { + background: #F5F5F5; + color: #111; + float: left; + cursor: pointer; + } + .buttons { + width: 50%; + background: #FFF; + color: #111; + font-size: 15px; + // font-family: zohopuvi-medium; + text-align: center; + border-top: 1px solid #E2E2E2; + padding: 10px; + -webkit-transition: all .2s ease-in; + -moz-transition: all .2s ease-in; + transition: all .2s ease-in; + } + .add { + background-color: #4caf50; + color: #FFF; + border-top: 1px solid #4caf50; + float: left; + cursor: pointer; +} +.pad{ + padding: 20px !important; +} \ No newline at end of file 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 46d3426..1ae66a5 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 @@ -92,7 +92,8 @@ export class DialogBoxComponent implements OnInit { {appoinmentSlots: '07PM - 07.30PM'}, ]; - + clicks:any = 0; + customerCard: any; constructor(private router: Router,private formBuilder: FormBuilder, public dialogRef: MatDialogRef, @Optional() @Inject(MAT_DIALOG_DATA) public data: UsersData) { @@ -127,41 +128,65 @@ export class DialogBoxComponent implements OnInit { this.dialogRef.close(); } -toggle() { - this.show = !this.show; + toggle() { + this.show = !this.show; + // Change the name of the button. + if(this.show) + this.buttonName = "Hide"; + else + this.buttonName = "Show"; + } - // Change the name of the button. - if(this.show) - this.buttonName = "Hide"; - else - this.buttonName = "Show"; -} - - - ngOnInit() { - this.form = new FormGroup({ - busname: new FormControl('', [Validators.required]), - service: new FormControl('', [Validators.required]), - practitioner: new FormControl('', [Validators.required]), - appoinmentDate: new FormControl('', [Validators.required]), - appoinmentTime: new FormControl('', [Validators.required]), - customer: new FormControl('', [Validators.required]), - note: new FormControl('', [Validators.required]), - - workspace: new FormControl('', [Validators.required]), - staff: new FormControl('', [Validators.required]), - slot: new FormControl('', [Validators.required]), - appoinmentSlots: new FormControl('', [Validators.required]), - - }); -console.log(this.local_data, this.selects) -// this.form.controls['note'].setValue('Sample') - this.form.patchValue(this.local_data) -} - public myError = (controlName: string, errorName: string) =>{ - return this.form.controls[controlName].hasError(errorName); - } - submit(){ - console.log(this.form.value); - } + + ngOnInit() { + this.form = new FormGroup({ + busname: new FormControl('', [Validators.required]), + service: new FormControl('', [Validators.required]), + practitioner: new FormControl('', [Validators.required]), + appoinmentDate: new FormControl('', [Validators.required]), + appoinmentTime: new FormControl('', [Validators.required]), + customer: new FormControl('', [Validators.required]), + note: new FormControl('', [Validators.required]), + + workspace: new FormControl('', [Validators.required]), + staff: new FormControl('', [Validators.required]), + slot: new FormControl('', [Validators.required]), + appoinmentSlots: new FormControl('', [Validators.required]), + + }); + console.log(this.local_data, this.selects) + // this.form.controls['note'].setValue('Sample') + this.form.patchValue(this.local_data) + } + public myError = (controlName: string, errorName: string) =>{ + return this.form.controls[controlName].hasError(errorName); + } + submit(){ + console.log(this.form.value); + } + + + goToSlotBooking(){ + // this.days[] + if(this.clicks <5){ + this.clicks += 1; + } + } + goToSlotBooking2(){ + // this.days[] + if( this.clicks >0){ + this.clicks -= 1; + } + console.log( this.clicks) + } + check(param){ + return param[this.clicks]; + } + + addCustomerList(param){ + this.customerCard = param + } + save(){ + + } } 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 129ed75..51fa978 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 @@ -115,7 +115,7 @@
{{practitionerdetails.description}} - + Description 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 629349f..451a0c5 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 @@ -384,7 +384,7 @@ box-sizing: border-box; line-height: 15px; } .scrollHV { -height: calc(100vh - 190px); +height: calc(100vh - 200px); } ::ng-deep .mat-form-field-infix { height: 50px!important; @@ -405,9 +405,9 @@ margin-left: 1rem; ::ng-deep .mat-card .mat-card-title:nth-child(2) { margin-top: -33px!important; } -::ng-deep .mat-select-panel .mat-option{ -height: 5em !important; -} +// ::ng-deep .mat-select-panel .mat-option{ +// height: 5em !important; +// } // css example .indianSymbol { content: "\20B9"; 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 d726b5a..646104a 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 @@ -240,7 +240,7 @@ unavailability(action,obj) { //if(this.working_customize == false){ // obj.action = action; const dialogRef = this.dialog.open(EditWorkingHoursComponent, { - width: '48%', + width: '45%', height: '100%', // maxWidth: '38vw', position: { right: '0' }, diff --git a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html index dc8fe95..b479dd9 100644 --- a/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html +++ b/ng-seed/src/app/appoinment/consultant-setting/edit-working-hours/edit-working-hours.component.html @@ -1,13 +1,14 @@
+
@@ -521,7 +522,7 @@ -->
- + -
+

© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved

+ +

Please Wait......

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 0c113cc..f177497 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 @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { EndUserService } from '../end-user.service'; import { environment } from 'environments/environment'; +import { NgxSpinnerService } from 'ngx-spinner'; @Component({ selector: 'app-doctor-profile', @@ -14,7 +15,9 @@ export class DoctorProfileComponent implements OnInit { dp: any =[]; busName: any=[]; - constructor(private router:Router,public end_user:EndUserService) { } + constructor(private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) { + this.spinner.show() + } ngOnInit(): void { this.busName = localStorage.getItem('busName') @@ -23,6 +26,7 @@ export class DoctorProfileComponent implements OnInit { console.log(serviceDetails) this.end_user.appointmentBooked_observable$.subscribe((res) => { + console.log('booked', res); if(res.length>0){ this.bookedAppointment=res[0].user[0] @@ -36,7 +40,10 @@ export class DoctorProfileComponent implements OnInit { console.log(URL_AS_LIST); // this.router.navigate(['customer/business/'+URL_AS_LIST[3]]) } - + setTimeout(() => { + /** spinner ends after 5 seconds */ + this.spinner.hide(); + }, 1000); }) } 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 af9f3ea..ff1e0c5 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 @@ -1,10 +1,11 @@ -
+ Appointment

{{full_data[0].business[0].busName}}

+

Service List

@@ -17,6 +18,7 @@
+
@@ -45,12 +47,13 @@
-->
+

© 2023 Venba Information Technology Pvt Ltd. All Rights Reserved

-
+
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 87ef4a7..692a24f 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 @@ -1,145 +1,3 @@ -// $color_red_orange_approx: #107c14; -// $white: #fff; -// $black_10: rgba(0, 0, 0, 0.1); -// $black_30: rgba(0, 0, 0, 0.3); -// $icon-size: 3rem; -// $icon-color: #D8D8D8; -// $main-color: #f44336; -// $tem-color : #217e69; -// .toggleSize{ -// width: 12rem; -// height: 4rem; -// border-radius: 5px !important; -// } -// [mat-raised-button][mat-button-sm] { -// font-size: 15px; -// line-height: 45px; -// padding: 0 20px; -// } -// .hoverButton{ -// background: $white; -// // box-shadow: 0 2px 6px $tem-color; -// transition: all 0.1s ease-in-out 0s; -// &:hover { -// box-shadow: 0 0 21px $tem-color; - -// transform: scale(1.05); -// } -// } -// .button{ -// margin-bottom: 1rem; -// background-color: #ffff !important; -// margin-top: -3rem; -// float: right; -// } -// .calender{ -// margin-left: -1rem; -// padding-right: 6rem; -// } -// .cardCalender{ -// width: 140%; -// } -// ::ng-deep .mat-tab-label { -// margin-left: -3rem!important; -// } -// .img{ -// width: 50px; -// } -// .btn-red { -// // background-color: #4caf50 !important; -// color: $white; -// // border: 1px solid $color_red_orange_approx; -// float: right; -// } -// .clickedSlot{ -// color: white !important; -// background-color: brown !important; -// cursor: pointer !important; -// width: 6rem; -// } -// .bookedSlot{ -// background-color: darkgrey; -// color: white; -// width: 6rem; -// cursor: no-drop !important; -// } -// .primary{ -// background-color: #00866e00; -// color: brown; -// width: 6rem; -// border: 1px solid brown; -// cursor: pointer; -// } -// ::ng-deep .mat-tab-group.mat-primary .mat-ink-bar, .mat-tab-nav-bar.mat-primary .mat-ink-bar { -// background-color: #658F9B!important; -// } -// // ::ng-deep .mat-form-field-appearance-legacy .mat-form-field-wrapper { -// // width: 250%; -// // } -// .success { -// background: #fff; -// box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2); -// padding: 5px; -// color: #0087ba; -// font-weight: 600; -// border-radius: 10px; -// } - -// mat-toolbar{ -// background-color: #227f6e; -// color:#fff; -// } -// .container{ -// max-width: 1217px; -// min-width: 375px; -// margin: 0 auto; -// // margin-right: 0rem; -// } -// .flx{ -// flex: 1 1 0%!important; -// display: initial!important; -// } -// .card-mat{ -// // max-width: 100%; -// min-width: -webkit-fill-available; -// padding: 1rem !important; -// } -// @media only screen and (max-width: 600px) { -// h3{ -// font-size: 20px; -// margin-top: 2rem; -// } -// .card-mat{ -// max-width: 95%; -// } -// .container{ -// display: flow-root!important; -// } -// .img { -// margin-right: 2rem; -// margin-left: 1rem; -// } -// .img-sun{ -// margin-right: 2rem; -// } -// .img-set{ -// margin-right: 2rem; -// } -// } -// ::ng-deep body{ -// background-color: #f7f8f5 !important; -// } -// .dateTime{ -// margin:0 !important; -// color: #0087ba; -// font-weight: 600; -// } -// .datecolor{ -// color: black !important; -// font-weight: 500 !important; -// } - - $color_red_orange_approx: #107c14; $white: #fff; $black_10: rgba(0, 0, 0, 0.1); diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 7870972..f80d912 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -10,7 +10,7 @@ export const environment = { // apiEndpoint:'http://192.168.1.20:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', // apiEndpoint:'http://venbainfotech.com:5000/api/', - apiEndpoint:'http://192.168.1.17:8080/api/', + apiEndpoint:'http://192.168.1.15:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', //EndUser URL From 08fd5c08366def8455751c0d2ce431b642103e58 Mon Sep 17 00:00:00 2001 From: bitbucket Date: Sat, 15 Apr 2023 11:18:49 +0530 Subject: [PATCH 2/4] slot ui and customer validation --- .../consultant-setting.component.ts | 2 ++ .../booking-summary.component.html | 4 +-- .../booking-summary.component.ts | 1 + .../customer-info.component.html | 10 +++---- .../customer-info/customer-info.component.ts | 16 ++++++----- .../app/end-user/payment/payment.component.ts | 2 +- .../slot-booking-details.component.html | 27 ++++++++++++------- .../slot-booking-details.component.scss | 5 ++++ .../slot-booking-details.component.ts | 7 ++--- ng-seed/src/environments/environment.ts | 2 +- 10 files changed, 48 insertions(+), 28 deletions(-) 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 d726b5a..05340c4 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 @@ -167,6 +167,8 @@ unavailability(action,obj) { }] } this.practitionerdetails = this.usersList['practitionerInfos'][0] + this.practitionerdetails.skills = JSON.parse(this.practitionerdetails.skills) + console.log( this.practitionerdetails) this._con.getPractitionerInfo.next( this.usersList['practitionerInfos']); console.log(this.practitionerdetails) this.id=this.practitionerdetails.id diff --git a/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html b/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html index 5d66f11..f244959 100644 --- a/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html +++ b/ng-seed/src/app/end-user/booking-summary/booking-summary.component.html @@ -71,7 +71,7 @@ Practitioner
- : {{serviceMapDetails.user[0].userName}} + : Dr.{{serviceMapDetails.user[0].userName}}
@@ -79,7 +79,7 @@ Date & Time
- : {{bookingSummary.appoinmentDate | date:'fullDate'}}({{bookingSummary.appoinmentSlots | date:'shortTime'}}) + : {{bookingSummary.appoinmentDate | date:'fullDate'}}({{bookingSummary.appoinmentSlots[0] | date:'shortTime'}})
diff --git a/ng-seed/src/app/end-user/booking-summary/booking-summary.component.ts b/ng-seed/src/app/end-user/booking-summary/booking-summary.component.ts index 3669b6f..dfedad0 100644 --- a/ng-seed/src/app/end-user/booking-summary/booking-summary.component.ts +++ b/ng-seed/src/app/end-user/booking-summary/booking-summary.component.ts @@ -33,6 +33,7 @@ export class BookingSummaryComponent implements OnInit { this.end_user.summmarylist_observable$.subscribe((res) => { console.log('booked2', res); this.bookingSummary = res[0] + this.bookingSummary.appoinmentSlots =JSON.parse( this.bookingSummary.appoinmentSlots) // this.end_user.getcusServicesMapDetails() let param ={id:this.bookingSummary.serviceMap} diff --git a/ng-seed/src/app/end-user/customer-info/customer-info.component.html b/ng-seed/src/app/end-user/customer-info/customer-info.component.html index f7fb0e1..c7f09ba 100644 --- a/ng-seed/src/app/end-user/customer-info/customer-info.component.html +++ b/ng-seed/src/app/end-user/customer-info/customer-info.component.html @@ -30,7 +30,7 @@
- + Contact No is required Invalid Contact No Contact No must be at least 10 characters @@ -40,7 +40,7 @@
- +
verified @@ -53,12 +53,12 @@
- +
- - + +
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 bcd82eb..4d8f6c0 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 @@ -45,11 +45,11 @@ export class CustomerInfoComponent implements OnInit { '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+.[a-zA-Z]{2,63}$', ),]), phoneNo: new FormControl('', [Validators.required, Validators.minLength(10),Validators.maxLength(10), Validators.pattern('^[0-9]{10}$')]), - address_1: new FormControl('', [Validators.maxLength(50)]), - city: new FormControl('', [Validators.maxLength(10)]), - state: new FormControl('', [Validators.maxLength(10)]), - otp: new FormControl('', [Validators.maxLength(10)]), - pincode: new FormControl('',[Validators.maxLength(6)]), + address_1: new FormControl('', [ Validators.maxLength(50)]), + city: new FormControl('', [ Validators.maxLength(10)]), + state: new FormControl('', [ Validators.maxLength(10)]), + otp: new FormControl('', [ Validators.maxLength(10)]), + pincode: new FormControl('',[ Validators.maxLength(6)]), }); } @@ -60,17 +60,21 @@ export class CustomerInfoComponent implements OnInit { submit(){ console.log(this.form.value) console.log('add') + if(!this.form.valid){ + return + } let row_obj = this.form.value console.log(row_obj) let addFormData = { cusName: row_obj.cusName, email: row_obj.email, address_1: row_obj.address_1, - phoneNo: row_obj.phoneNo, + phoneNo: this.phoneNumber.substring(3) , pincode: row_obj.pincode, state: row_obj.state, city: row_obj.city, }; + console.log(addFormData) this._cus.addCusDetails(addFormData).subscribe(res => { if (res.status == 200) { 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 6a5f5bf..6a59e38 100644 --- a/ng-seed/src/app/end-user/payment/payment.component.ts +++ b/ng-seed/src/app/end-user/payment/payment.component.ts @@ -68,7 +68,7 @@ export class PaymentComponent implements OnInit { let time = new Date().toLocaleTimeString() let params= { "busId": serviceDetails.busId, - "cusId": URL_AS_LIST[8], + "cusId": URL_AS_LIST[9], "appoinmentDate": slot_array[0].date, "appoinmentTime": time, "serviceMap": serviceMap, 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 ebbe0bc..b0ad617 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 @@ -51,7 +51,7 @@
- +

Slot Availability

@@ -74,21 +74,30 @@

Avatar Service

{{servicesName.servicesName}} ({{servicesName.duration }} Mins) -

+ +

AvatarDate :

+ {{date | date:'longDate'}} +

AvatarTime :

+ {{slotTime | date:'shortTime'}} +

AvatarAmount :

+ {{user.practitionerInfos[0].days}}
-
+
-
{{check(days) | date:'longDate'}}
+
{{check(days) | date:'fullDate'}}
+ +
+ +
@@ -184,10 +193,8 @@
-->
-
- -
- + +
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 87ef4a7..bc543cd 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 @@ -414,4 +414,9 @@ footer { float:left; } + .scrollHV { + height: calc(100vh - 150px); + // zoom: 90%; + } + \ No newline at end of file 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 3e6e43a..2b3e958 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 @@ -190,6 +190,7 @@ export class SlotBookingDetailsComponent implements OnInit { toggleActive(event:any,param:any,i:any){ console.log(event,param,i) + this.slot_array =[]; // debugger; // event.preventDefault(); this.slotIndex = i @@ -224,7 +225,7 @@ export class SlotBookingDetailsComponent implements OnInit { } }); - this.slot_array.push({date:this.date,slots:param}) + this.slot_array.push({date:this.date,slots:filteredTimes}) } @@ -232,8 +233,8 @@ export class SlotBookingDetailsComponent implements OnInit { 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"]) + console.log( JSON.parse(localStorage.getItem("slotData"))) + this.router.navigate([URL+"/cus"]) } checkBooked(param){ // console.log(param, this.bookedAppointment) diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 7870972..13643e6 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -10,7 +10,7 @@ export const environment = { // apiEndpoint:'http://192.168.1.20:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', // apiEndpoint:'http://venbainfotech.com:5000/api/', - apiEndpoint:'http://192.168.1.17:8080/api/', + apiEndpoint:'http://192.168.1.3:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', //EndUser URL From 5aa6508f0e003b155f6d952b6b9da61b164db484 Mon Sep 17 00:00:00 2001 From: "surendar.m@watermelon.us" Date: Sat, 15 Apr 2023 17:25:29 +0530 Subject: [PATCH 3/4] sorting and doctor profile --- .../appoinments-list.component.html | 2 +- .../appoinments-list.component.ts | 34 +++++-- .../business-list/business-list.component.ts | 3 + .../consultant-setting.component.html | 14 ++- .../consultant-setting.component.ts | 6 +- .../customers-list.component.html | 2 +- .../customers-list.component.ts | 39 +++++--- .../service-list/service-list.component.ts | 3 + .../user/user-list/user-list.component.ts | 3 + .../doctor-profile.component.html | 98 +++---------------- .../doctor-profile.component.ts | 8 +- .../slot-booking-details.component.html | 43 +++++--- .../slot-booking-details.component.scss | 6 +- .../layouts/admin/admin-layout.component.html | 9 +- .../layouts/admin/admin-layout.component.ts | 40 ++++++-- ng-seed/src/environments/environment.ts | 2 +- 16 files changed, 170 insertions(+), 142 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 38cae88..042e1bc 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 @@ -38,7 +38,7 @@ Date and Time - {{row.appoinmentDate | date:'dd-MMM-YYYY'}}, {{row.appoinmentSlots | date:'shortTime'}} + {{row.appoinmentDate | date:'dd-MMM-YYYY'}}, {{row.appoinmentSlots[0] | date:'shortTime'}} 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 13f7074..f362874 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 @@ -76,30 +76,50 @@ export class AppoinmentsListComponent implements OnInit { } getAppoinmentsList() { + let user_role = localStorage.getItem('user_role'); //this._pd.getTabStatusPdDetails(this.tabStatus) this._app.getAppoinmentsListDetails().subscribe(res => { if (res.status == 200) { this.isLoading = false this.appoinmentsList = res.data; - console.log(this.appoinmentsList) - this.appointmentListLength = res.data.length; - console.log(this.appointmentListLength) - this.appointmentListSource['data'] = this.appoinmentsList; - console.log(this.appointmentListSource) - this.recordStatus=false; + console.log(this.appoinmentsList) - let user_role = localStorage.getItem('user_role'); + this.appoinmentsList.forEach(element => { + console.log(element) + element.appoinmentSlots = JSON.parse(element.appoinmentSlots) + }); + console.log(this.appoinmentsList) + + if(user_role == 'PRACTITIONER'){ + console.log('if ') let id = localStorage.getItem('user_id') console.log(id) + this.appointmentListSource['data'] = this.appoinmentsList; this.appointmentListSource console.log(this.appointmentListSource) let filter = this.appointmentListSource['data'].filter(arr=>{return arr["ServicesMapDetail.userId"] == id}) console.log(filter) + filter.sort((a: any, b: any) => { + return b.id - a.id; + }); this.appointmentListSource['data'] = filter this.appointmentListLength = filter.length; + console.log(this.appointmentListSource) + + } else { + console.log('else') + this.appointmentListLength = res.data.length; + console.log(this.appointmentListLength) + this.appoinmentsList.sort((a: any, b: any) => { + return b.id - a.id; + }); + this.appointmentListSource['data'] = this.appoinmentsList; + console.log(this.appointmentListSource) + } + this.recordStatus=false; } else{ this.appoinmentsList=[]; diff --git a/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts b/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts index f9e7d16..0e6db2a 100644 --- a/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts +++ b/ng-seed/src/app/appoinment/business/business-list/business-list.component.ts @@ -64,6 +64,9 @@ export class BusinessListComponent implements OnInit { console.log(this.businessList) this.businessListLength = res.data.length; console.log(this.businessListLength) + this.businessList.sort((a: any, b: any) => { + return b.id - a.id; + }); this.businessListSource['data'] = this.businessList; console.log(this.businessListSource) this.recordStatus=false; 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 51fa978..fd68ce0 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 @@ -112,10 +112,18 @@
+
+ + {{practitionerdetails.caption}} + + Caption + + +
{{practitionerdetails.description}} - + Description @@ -371,7 +379,7 @@
--> -
+
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 646104a..5296ea8 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 @@ -46,6 +46,7 @@ export class ConsultantSettingComponent implements OnInit { gender: any=[]; description:any=[]; skills:any = []; + caption:any = []; dob: any=[]; languages: any=[]; designtion: any=[]; @@ -162,6 +163,7 @@ unavailability(action,obj) { "gender": null, "description":null, "skills": null, + "caption": null, "isActive": "1", }] @@ -173,7 +175,8 @@ unavailability(action,obj) { this.userName = this.usersList.userName this.gender=this.practitionerdetails.gender this.description=this.practitionerdetails.description - this.skills=this.practitionerdetails.skills + this.skills= JSON.parse(this.practitionerdetails.skills) + this.caption = this.practitionerdetails.caption this.dob=this.practitionerdetails.dob this.exp=this.practitionerdetails.exp this.languages=this.practitionerdetails.languages @@ -337,6 +340,7 @@ unavailability(action,obj) { "gender": this.gender, "description": this.description, "skills": this.skills, + "caption": this.caption, "userName": this.userName, "userId":userid } diff --git a/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.html b/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.html index 05e9c29..34e9944 100644 --- a/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.html +++ b/ng-seed/src/app/appoinment/customers/customers-list/customers-list.component.html @@ -7,7 +7,7 @@ - + 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 10c6231..7c856ba 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 @@ -98,7 +98,7 @@ export class CustomersListComponent implements OnInit { } }) } - this.getCustomerDetails() + // this.getCustomerDetails() } getCustomerDetails(){ @@ -106,25 +106,32 @@ export class CustomersListComponent implements OnInit { if (res.status == 200) { this.isLoading = false this.customersList = res.data; - console.log(this.customersList) - this.customersListLength = res.data.length; - console.log(this.customersListLength) - this.customersListSource['data'] = this.customersList; - console.log(this.customersListSource) - this.recordStatus=false; - + console.log(this.customersList) 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) + 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 - this.customersListSource['data'] = this.customersList; - } + const result = serviceList.filter(({id}) => activeIds.includes(id)); + console.log(result) + this.customersList = result + this.customersListLength = this.customersList.length; + this.customersList.sort((a: any, b: any) => { + return b.id - a.id; + }); + this.customersListSource['data'] = this.customersList; + } else{ + this.customersListLength = res.data.length; + console.log(this.customersListLength) + this.customersList.sort((a: any, b: any) => { + return b.id - a.id; + }); + this.customersListSource['data'] = this.customersList; + console.log(this.customersListSource) + this.recordStatus=false; + } } else{ diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts index 6301518..c585533 100644 --- a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts +++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.ts @@ -66,6 +66,9 @@ export class ServiceListComponent implements OnInit { console.log(this.servicesList) this.servicesListLength = res.data.length; console.log(this.servicesListLength) + this.servicesList.sort((a: any, b: any) => { + return b.serviceId - a.serviceId; + }); this.servicesListSource['data'] = this.servicesList; console.log(this.servicesListSource) this.recordStatus=false; 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 4fb231f..62ccc29 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 @@ -81,6 +81,9 @@ export class UserListComponent implements OnInit { if (res.status == 200) { this.isLoading = false let usersList = res.data + usersList.sort((a: any, b: any) => { + return b.id - a.id; + }); this.usersList['data'] = usersList; this.usersListLength = res.data.length; this.recordStatus=false; 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 41cf114..8375d8e 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 @@ -71,10 +71,10 @@ Phone : {{bookedAppointment.contactNo}} -
  • +
  • Email: {{bookedAppointment.email}} @@ -92,115 +92,49 @@
  • -
    +
    -

    “I highly appreciate your help for my family in our most difficult time. We owed everyone at @dr.changes a big thank you and our life.”

    +

    “{{profileDetails.caption}}”

    - More than 15 years ago, a small group of families, community activists, and civil servants in New York came together to form an organization called Dr.Changes. They provide services for those struggling to care for a loved one who did not “fit” into traditional health systems: stroke, Parkinson’s, Alzheimer’s disease, traumatic brain injury, debilitating disorders, etc. The diagnoses were different, but the families shared common challenges: few community resources, isolation, lack of information, and drastic changes in family roles. + {{profileDetails.description}}

    -

    SKILLS

    -
    -
    -
      -
    • +

      SKILLS

      +
      +
      beenhere - Assisting with walking from bed to wheelchair -
    • -
    • - - beenhere - - - Bathing, dressing and grooming assistance -
    • -
    • - - beenhere - - Medication reminders -
    • -
    • - - beenhere - - Safety and fall prevention -
    • -
    • - - beenhere - - Status reporting to family -
    • -
    -
    -
    -
      -
    • - - beenhere - - Assisting with walking from bed to wheelchair -
    • -
    • - - beenhere - - - Bathing, dressing and grooming assistance -
    • -
    • - - beenhere - - Medication reminders -
    • -
    • - - beenhere - - Safety and fall prevention -
    • -
    • - - beenhere - - Status reporting to family -
    • -
    -
    -
    + {{skillsList}} +
    +
    -
    +

    LANGUAGE

    -

    English

    -

    French

    +

    {{profileDetails.languages}}

    QUALIFICATIONS

    -

    Master of Science

    -

    University Limerick

    +

    {{profileDetails.qualification}}

    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 f177497..a2d6c93 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 @@ -14,6 +14,8 @@ export class DoctorProfileComponent implements OnInit { private apiUrl = environment.apiEndpoint; dp: any =[]; busName: any=[]; + profileDetails: any; + skillsDetails: any = []; constructor(private router:Router,public end_user:EndUserService,private spinner:NgxSpinnerService) { this.spinner.show() @@ -29,9 +31,13 @@ export class DoctorProfileComponent implements OnInit { console.log('booked', res); if(res.length>0){ - this.bookedAppointment=res[0].user[0] + this.bookedAppointment = res[0].user[0] this.dp = this.apiUrl+'imageViewer?img_name='+ this.bookedAppointment.logo console.log(this.dp) + this.profileDetails = this.bookedAppointment.practitionerInfos[0] + console.log(this.profileDetails) + this.skillsDetails = JSON.parse(this.profileDetails.skills) + console.log(this.skillsDetails) }else{ let URL = this.router.url; 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 ebbe0bc..b9ae4e6 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 @@ -51,6 +51,7 @@
    +
    @@ -63,10 +64,6 @@

    Teero would like to schedule an interview with you! Pick a time & date.

    - - -

    AvatarBusiness

    {{busName}}

    Avatar Practitioner

    @@ -74,25 +71,42 @@

    Avatar Service

    {{servicesName.servicesName}} ({{servicesName.duration }} Mins) -

    + +

    AvatarDate :

    + {{date | date:'longDate'}} +

    AvatarTime :

    + {{slotTime | date:'shortTime'}} +

    AvatarAmount :

    + {{user.practitionerInfos[0].days}}
    -
    -
    -
    {{check(days) | date:'longDate'}}
    +
    +
    +
    + {{check(days) | date:'longDate'}} +
    +
    + + + +
    +
    + +
    + +
    -
    -
    - -
    +
    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 692a24f..30302e4 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 @@ -104,6 +104,7 @@ margin-left: -3rem!important; // max-width: 100%; min-width: -webkit-fill-available; padding: 1rem !important; + } @media only screen and (max-width: 600px) { h3{ @@ -162,10 +163,11 @@ margin-left: -3rem!important; color: #7a7a7a; } h4{ - color: #227f6e;; + color: #227f6e; + margin: 0; } .scrollHV { - height: calc(100vh - 105px); + height: calc(100vh - 338px); } .flexxx{ flex-direction: column; 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 1f02a65..096b866 100644 --- a/ng-seed/src/app/layouts/admin/admin-layout.component.html +++ b/ng-seed/src/app/layouts/admin/admin-layout.component.html @@ -6,11 +6,11 @@
    -