diff --git a/ng-seed/package-lock.json b/ng-seed/package-lock.json index 3c2e5f4..0e7ba00 100644 --- a/ng-seed/package-lock.json +++ b/ng-seed/package-lock.json @@ -30279,6 +30279,14 @@ } } }, + "ngx-bootstrap": { + "version": "10.2.0", + "resolved": "https://registry.npmjs.org/ngx-bootstrap/-/ngx-bootstrap-10.2.0.tgz", + "integrity": "sha512-bn5wdvH6QQ2JGu4TgUbozdULBFMxZNPNTgO7dRiosx9FRrFvKcgxkGSgU/xoj+4kP1vgh8zwzaiDfvH/Bfb+Aw==", + "requires": { + "tslib": "^2.3.0" + } + }, "ngx-color-picker": { "version": "11.0.0", "resolved": "https://registry.npmjs.org/ngx-color-picker/-/ngx-color-picker-11.0.0.tgz", diff --git a/ng-seed/package.json b/ng-seed/package.json index 6b37d18..42ec93d 100644 --- a/ng-seed/package.json +++ b/ng-seed/package.json @@ -49,6 +49,7 @@ "ng2-charts": "^2.4.2", "ng2-dragula": "^2.1.1", "ng2-file-upload": "^1.4.0", + "ngx-bootstrap": "^10.2.0", "ngx-color-picker": "^11.0.0", "ngx-perfect-scrollbar": "10.1.0", "ngx-scrollbar": "^7.5.6", diff --git a/ng-seed/src/app/end-user/consultants/consultants-list.component.html b/ng-seed/src/app/end-user/consultants/consultants-list.component.html index c6c1074..c65bd42 100644 --- a/ng-seed/src/app/end-user/consultants/consultants-list.component.html +++ b/ng-seed/src/app/end-user/consultants/consultants-list.component.html @@ -1,6 +1,7 @@
Appointment +

{{busName}}

@@ -29,7 +30,7 @@
- user list image + user list image
@@ -103,4 +104,4 @@
-

Please Wait......

\ No newline at end of file +

Please Wait......

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 ab05328..9db4364 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 @@ -3,6 +3,7 @@ import { MatDialog } from '@angular/material/dialog'; import { Router } from '@angular/router'; import { NgxSpinnerService } from 'ngx-spinner'; import { EndUserService } from '../end-user.service'; +import { environment } from 'environments/environment'; @Component({ selector: 'app-consultants-list', @@ -16,13 +17,16 @@ export class ConsultantsListComponent implements OnInit { consultants:any =[]; public filterdata = null; bgColorPast: any=[]; + + busName:any=[] + private apiUrl = environment.apiEndpoint; constructor(private router:Router,public dialog: MatDialog,public end_user:EndUserService,private spinner:NgxSpinnerService) { this.spinner.show(); } ngOnInit(): void { - + this.busName = localStorage.getItem('busName') let tmp = localStorage.getItem('cusServiceData') let practitioner = JSON.parse(tmp) console.log(practitioner) @@ -55,6 +59,26 @@ export class ConsultantsListComponent implements OnInit { }, 1000); console.log(this.consultants) let workinghrs = [] + this.consultants.forEach(element => { + console.log(element) + element.practitionerInfos + if( element.practitionerInfos.length ==0){ + + element.practitionerInfos.push( { + + "exp":null, + "qualification":null, + "days": null, + "languages": null, + "workingHours": '[{"sunday":{"hours":[{"startTime":"09:30 am","endTime":"09:30 am","day":"sunday","value":null}],"breaks":[]}},{"monday":{"hours":[{"startTime":"09:00 am","endTime":"09:30 am","day":"monday","value":null}],"breaks":[]}},{"tuesday":{"hours":[{"startTime":"09:00 am","endTime":"12:00 am","day":"tuesday","value":null},{"startTime":"01:00 pm","endTime":"04:00 pm","day":null},{"startTime":"05:00 pm","endTime":"09:00 pm","day":null}],"breaks":[]}},{"wednesday":{"hours":[{"startTime":"09:00 am","endTime":"09:30 am","day":"wednesday","value":null}],"breaks":[]}},{"thursday":{"hours":[{"startTime":"09:00 am","endTime":"09:30 am","day":"thursday","value":null}],"breaks":[]}},{"friday":{"hours":[{"startTime":"09:00 am","endTime":"09:30 am","day":"friday","value":null}],"breaks":[]}},{"saturday":{"hours":[{"startTime":"09:00 am","endTime":"09:30 am","day":"saturday","value":null}],"breaks":[]}}]', + "dob": null, + "designtion": null, + "gender": null, + "isActive": "1", + + }) + } + }) this.consultants.forEach(element => { console.log(element) element.practitionerInfos.forEach(e => { @@ -100,4 +124,8 @@ export class ConsultantsListComponent implements OnInit { this.router.navigate([URL+"/details"]) } + image_view(image){ + + return this.apiUrl+'imageViewer?img_name='+image; + } } 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 cbae3d8..f7fb0e1 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 @@ -2,6 +2,7 @@ Appointment +

{{busName}}

@@ -90,6 +91,11 @@
+ + + Appointment +

{{busName}}

+
@@ -49,10 +53,10 @@
- +
-

{{bookedAppointment.userName}}

+

Dr.{{bookedAppointment.userName}}

{{bookedAppointment.practitionerInfos[0].designtion }}
@@ -203,4 +207,9 @@
- \ No newline at end of file + +
+

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

+
diff --git a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.scss b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.scss index 845a078..a3bf497 100644 --- a/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.scss +++ b/ng-seed/src/app/end-user/doctor-profile/doctor-profile.component.scss @@ -124,6 +124,7 @@ //01/04.23 .scrollHV { height: calc(100vh - 0px); + zoom: 90%; } .doctor-profile{ font-family: sans-serif; @@ -145,13 +146,15 @@ max-width: 100%; vertical-align: middle; border-radius: 45px; - width: 100%; + width: 65%; + height: 180px; } .images{ border-radius: 100%; - width: 50%; - height: 40%; - margin-left: 5rem; + text-align: center; + // width: 50%; + // height: 40%; + // margin-left: 5rem; } .img{ width: 30px; @@ -273,4 +276,15 @@ padding-left: 0.5rem; } } -} \ No newline at end of file +} +mat-toolbar{ + background-color: #227f6e; + color:#fff; +} +footer { + background-color: #d1d1d1; + height:50px; + width: 100%; + position: absolute; + bottom: 0; + } 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 1362978..0c113cc 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 @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { EndUserService } from '../end-user.service'; +import { environment } from 'environments/environment'; @Component({ selector: 'app-doctor-profile', @@ -9,10 +10,14 @@ import { EndUserService } from '../end-user.service'; }) export class DoctorProfileComponent implements OnInit { bookedAppointment: any=[]; - + private apiUrl = environment.apiEndpoint; + dp: any =[]; + busName: any=[]; + constructor(private router:Router,public end_user:EndUserService) { } ngOnInit(): void { + this.busName = localStorage.getItem('busName') let service = localStorage.getItem("servicedetails") let serviceDetails = JSON.parse(service) console.log(serviceDetails) @@ -21,6 +26,8 @@ export class DoctorProfileComponent implements OnInit { console.log('booked', res); if(res.length>0){ this.bookedAppointment=res[0].user[0] + this.dp = this.apiUrl+'imageViewer?img_name='+ this.bookedAppointment.logo + console.log(this.dp) }else{ let URL = this.router.url; @@ -42,4 +49,9 @@ export class DoctorProfileComponent implements OnInit { this.router.navigate([URL+"/slot"]) } + image_view(image){ + + return this.apiUrl+'imageViewer?img_name='+image; + } + } 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 85af81c..1361db4 100644 --- a/ng-seed/src/app/end-user/end-user.service.ts +++ b/ng-seed/src/app/end-user/end-user.service.ts @@ -54,6 +54,12 @@ private apiUrl = environment.apiEndpoint; // catchError(this.handleError('role', [])) // ) } + getSlots(Params): Observable { + return this._http.post(this.apiUrl + 'getSlots', Params) + // .pipe( + // catchError(this.handleError('role', [])) + // ) + } CreateAppoinmentsCus(addParams): Observable { return this._http.post(this.apiUrl + 'CreateAppoinmentsCus', addParams) // .pipe( diff --git a/ng-seed/src/app/end-user/payment/payment.component.html b/ng-seed/src/app/end-user/payment/payment.component.html index 25b7acc..9c4c5c3 100644 --- a/ng-seed/src/app/end-user/payment/payment.component.html +++ b/ng-seed/src/app/end-user/payment/payment.component.html @@ -1,5 +1,6 @@ Appointment +

{{busName}}

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 796b615..6a5f5bf 100644 --- a/ng-seed/src/app/end-user/payment/payment.component.ts +++ b/ng-seed/src/app/end-user/payment/payment.component.ts @@ -11,6 +11,7 @@ import { EndUserService } from '../end-user.service'; export class PaymentComponent implements OnInit { form: FormGroup; bookedAppointment_servicemap: any; + busName: string; constructor(private router:Router,public enduser:EndUserService, private route: ActivatedRoute, ) { this.enduser.appointmentBooked_observable$.subscribe((res) => { console.log('booked', res); @@ -30,6 +31,7 @@ export class PaymentComponent implements OnInit { } ngOnInit(): void { + this.busName = localStorage.getItem('busName') this.form = new FormGroup({ cardName: new FormControl('', [Validators.required]), cardNo: new FormControl('', [Validators.required, Validators.maxLength(16)]), 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 fd64360..ac59aed 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 @@ -72,6 +72,8 @@ export class ServiceListComponent implements OnInit { console.log(res) this.full_data = res['data'] + this.full_data[0].business[0].busName + localStorage.setItem('busName',this.full_data[0].business[0].busName) let tmp =[]; res['data'].forEach(element => { 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 f750e6e..ba56c8b 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 @@ -46,10 +46,11 @@ Appointment +

{{busName}}

-
+
@@ -66,42 +67,55 @@ Avatar --> -

AvatarOostelijk Handelskade 879

- 1020BD - Amsterdam, Netherlands -

AvatarChristain Wicks

- christain@teero.com +

AvatarBusiness

+ {{busName}} +

Avatar Practitioner

+ Dr. {{doctor}} +

Avatar Service

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

Avatar - This is an on-site interview. Please bring your CV and any other document required for work contract.

+ Date:{{date | date:'longDate'}}
+ Time :{{slotTime | date:'shortTime'}} +

-
+ + + +
+ +
+
+ + +
+ +
-
- +
+ +
-
-
+
--> + +
@@ -112,9 +126,7 @@ Wednesday April05
- +
@@ -125,9 +137,7 @@ Thursday April05
- +
@@ -138,14 +148,12 @@ Friday April05
- +
-
+
-->
- +
+ 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 25dcfaa..8a72161 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 @@ -372,5 +372,30 @@ h4{ // // color: #7a7a7a; // } +p { + font-family: Lato; + } + .main-part { + background-color: #fff; + margin:20px; + padding:10px; + vertical-align: middle; + display: table-cell; + } + +.mat-tab-group .mat-tab-label { + min-width: 209px !important; +} +.mat-tab-group { + margin-bottom: 48px; + } + +footer { + background-color: #d1d1d1; + height:50px; + width: 100%; + position: absolute; + bottom: 0; + } \ 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 8156300..a051a78 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 @@ -45,10 +45,19 @@ export class SlotBookingDetailsComponent implements OnInit { slotIndex: any; bookedAppointment:any=[]; bookedAppointmentSlot: any=[]; + days: any=[]; + busName: any =[]; + doctor: any=[]; + servicesName: any=[]; + user: any=[]; constructor(private router:Router,private datepipe:DatePipe,public end_user:EndUserService) { this.end_user.appointmentBooked_observable$.subscribe((res) => { console.log('booked', res); if(res.length>0){ + this.servicesName = res[0].service[0] + this.user = res[0].user[0] + this.doctor = res[0].user[0].userName + this.getApiData() this.bookedAppointment=res[0].appoinment }else{ @@ -85,6 +94,7 @@ export class SlotBookingDetailsComponent implements OnInit { this.workingHours = JSON.parse(this.workingHours) this.workingHours.forEach((value,index) => { + console.log(value) console.log(value[findDate],index) if(value[findDate] != undefined){ this.getHours = value[findDate]['hours'] @@ -154,10 +164,11 @@ export class SlotBookingDetailsComponent implements OnInit { // Output the intervals console.log(intervals); - this.slots = intervals + //this.slots = intervals } - ngOnInit(): void { + ngOnInit() { + this.form = new FormGroup({ workspace: new FormControl('', [Validators.required]), }); @@ -182,12 +193,19 @@ export class SlotBookingDetailsComponent implements OnInit { // event.preventDefault(); this.slotIndex = i this.slotTime = param - // if(this.element !== undefined){ - // this.element.style.backgroundColor = "#658f9b"; - // } - // var target = event.currentTarget; - // target.style.backgroundColor = "#0c8f00"; + console.log(this.date,param) + let thirtyMinutes = this.servicesName.duration * 60 * 1000; // convert 30 minutes to milliseconds + let date1 = new Date(param); + let date2 = new Date(date1.getTime() + thirtyMinutes); + console.log(date1); + console.log(date2); + this.slots.forEach(element => { + if(element { - console.log( param, new DatePipe('en-US').transform(element.appoinmentSlots, 'shortTime')) + // console.log( param, new DatePipe('en-US').transform(element.appoinmentSlots, 'shortTime')) //new DatePipe('en-US').transform(element.appoinmentSlots, 'shortTime'); // this.bookedAppointmentSlot.push(new DatePipe('en-US').transform(element.appoinmentSlots, 'shortTime')) param = param.toString() if(new DatePipe('en-US').transform(element.appoinmentSlots, 'shortTime').trim() == param.trim()){ - console.log("sksjfjdhkfhsdfcgdjsh") + // console.log("sksjfjdhkfhsdfcgdjsh") return true; }else{ return false; @@ -218,4 +236,27 @@ export class SlotBookingDetailsComponent implements OnInit { } + getApiData(){ + this.busName = localStorage.getItem('busName') + let tmp=[] + for(let i=0;i<=5;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); + tmp.push(dateFormated) + } + console.log(tmp) + this.days= tmp + let params ={"id":this.user.id} + this.end_user.getSlots(params).subscribe(res => { + if (res.status == 200) { + console.log(res) + let data = res['data']; + this.slots = data + } + }) + + } + } diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 2dff068..7870972 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -7,7 +7,7 @@ export const environment = { production: false, environmentName: 'Testing Environment',//Localhost Environment. // apiEndpoint:'http://venbainfotech.com:5000/api/', -// apiEndpoint:'http://192.168.1.20:8080/api/', +// 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/',