From 856fce27c305fc0d972b1eeb78c10bff91d6d59d Mon Sep 17 00:00:00 2001 From: Surendiran Date: Wed, 7 Jun 2023 18:31:05 +0530 Subject: [PATCH 1/2] payment error fixed --- .../app/dashboard/dashboard.component.html | 167 +++++++++++++++- .../app/dashboard/dashboard.component.scss | 179 +++++++++++++++++- .../booking-summary.component.html | 4 +- .../booking-summary.component.ts | 55 +++--- .../customer-info/customer-info.component.ts | 2 +- .../app/end-user/end-user-routing.module.ts | 1 + 6 files changed, 376 insertions(+), 32 deletions(-) diff --git a/ng-seed/src/app/dashboard/dashboard.component.html b/ng-seed/src/app/dashboard/dashboard.component.html index 240acee..4d22b0a 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.html +++ b/ng-seed/src/app/dashboard/dashboard.component.html @@ -295,4 +295,169 @@ --> - \ No newline at end of file + + + + + + \ No newline at end of file diff --git a/ng-seed/src/app/dashboard/dashboard.component.scss b/ng-seed/src/app/dashboard/dashboard.component.scss index f38edd8..bb10581 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.scss +++ b/ng-seed/src/app/dashboard/dashboard.component.scss @@ -589,4 +589,181 @@ mat-icon{ } ::ng-deep .md-drppicker.double { width: 640px !important; -} \ No newline at end of file +} + + +@import url('https://fonts.googleapis.com/css?family=Montserrat:600|Open+Sans'); + +*, *:before, *:after { + -webkit-box-sizing: inherit; + -moz-box-sizing: inherit; + box-sizing: inherit; +} + +html { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +body { + font-family: 'Open Sans', sans-serif; + margin: 0; + background: #fff; + color: #999; +} + +a { + text-decoration: none; + margin: 1rem 0; + font-weight: 600; + text-transform: uppercase; + font-size: 0.8125rem; + letter-spacing: 1px; +} + +p { + font-size: 0.9rem; + margin: 1rem 0; + line-height: 1.5; +} + +section { + max-width: 1000px; + margin: 0 auto; + text-align: center; + +} + +h3 { + font-family: 'Montserrat', sans-serif; + font-weight: 600; + color: #333; + font-size: 1.825rem; + margin: 1.3rem 0; +} + +.section-lead { + max-width: 600px; + margin: 1rem auto 1.5rem; +} + +.service a { + color: #5b7abb; + display: block; +} + +.service h4 { + font-family: 'Montserrat', sans-serif; + font-weight: 600; + color: #56ceba; + font-size: 1.3rem; + margin: 1rem 0 0.6rem; +} + +.services-grid { + display: -webkit-box; + display: flex; + -webkit-box-align: center; + align-items: center; +} + +.service { + background: #fff; + margin: 20px; + padding: 20px; + border-radius: 4px; + text-align: center; + -webkit-box-flex: 1; + flex: 1; + display: -webkit-box; + display: flex; + flex-wrap: wrap; + border: 2px solid #e7e7e7; + -webkit-transition: all 0.3s ease; + -moz-transition: all 0.3s ease; + transition: all 0.3s ease; +} + +.service:hover { + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.08); +} + +.service i { + font-size: 3.45rem; + margin: 1rem 0; +} + +.service1 i, +.service1 h4, +.service1 .cta { + color: #42b7ca; +} + +.service1:hover { + border: 2px solid #42b7ca; +} + +.service2 i, +.service2 h4, +.service2 .cta { + color: #425fca; +} + +.service2:hover { + border: 2px solid #425fca; +} + +.service3 i, +.service3 h4, +.service3 .cta { + color: #9c42ca; +} + +.service3:hover { + border: 2px solid #9c42ca; +} + +.service .cta span { + font-size: 0.6rem; +} + +.service > * { + flex: 1 1 100%; +} + +.service .cta { + align-self: flex-end; +} + +@media all and (max-width:900px) { + .services-grid { + display: -webkit-box; + display: flex; + -webkit-box-orient: vertical; + -webkit-box-direction: normal; + flex-direction: column; + } +} + + + .contct-img { + width: 36px; + height: 36px; + border-radius: 50%; + border: 1px solid var(--color-divider); + background-color: var(--default-bg-color); +} + +.teammember{ + margin: 0px 10px; + padding: 12px 10px; + position: relative; + border-radius: 5px; + display: flex; + align-items: center; +} + + 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 30c0d14..6f2bbe4 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 @@ -111,7 +111,7 @@ Fees
- : {{busCurrency}} {{(serviceMapDetails.duration.length>0 ? serviceMapDetails.duration[0].fees : serviceMapDetails.service[0].fees) | currency: currency}} + : {{(serviceMapDetails.duration.length>0 ? serviceMapDetails.duration[0].fees : serviceMapDetails.service[0].fees) | currency: busCurrency}}
@@ -120,7 +120,7 @@ Payment Status
- : {{(bookingSummary.paymentStatus== 0 ? 'Not Paid' : 'Paid') }} + : {{(bookingSummary.paymentStatus== 1 ? 'Not Paid' : 'Paid') }}
- - - +

Appointments

- - -
-
-
Gopi
-
7896541230
+

Today

+ + + +
+ +
+
{{appoinment.customer[0].cusName}}
+
{{appoinment.customer[0].phoneNo}}
-
-
30/12/2023, 3:00pm
-
Status
+
+
{{appoinment.status}}
+
{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}
+
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
+
- - -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
+

Tomorrow

+ + +
+
+
{{appoinment.customer[0].cusName}}
+
{{appoinment.customer[0].phoneNo}}
+
+
+
{{appoinment.status}}
+
{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}
+ +
+
+
-
- - -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
-
- -
-

hello

-
+
+ +

Later

+ + +
+
+
{{appoinment.customer[0].cusName}}
+
{{appoinment.customer[0].phoneNo}}
+
+
+
{{appoinment.status}}
+
{{appoinment.appoinmentSlots[0] | date:'dd/MM/yyyy h:mm a'}}
+ +
+
+
-
--> + - \ No newline at end of file + \ No newline at end of file diff --git a/ng-seed/src/app/dashboard/dashboard.component.scss b/ng-seed/src/app/dashboard/dashboard.component.scss index bb10581..cb63dbc 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.scss +++ b/ng-seed/src/app/dashboard/dashboard.component.scss @@ -669,9 +669,9 @@ h3 { } .service { - background: #fff; - margin: 20px; - padding: 20px; + background: #f1f1f1; + margin: 10px; + // padding: 20px; border-radius: 4px; text-align: center; -webkit-box-flex: 1; @@ -765,5 +765,10 @@ h3 { display: flex; align-items: center; } - - +section mat-card{ + background: linear-gradient(58deg, #009688, #673ab7); + color: #fff; + border-radius: 4px 4px; + font-size: 14px; +} + diff --git a/ng-seed/src/app/dashboard/dashboard.component.ts b/ng-seed/src/app/dashboard/dashboard.component.ts index b530a9d..1eb7e79 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.ts +++ b/ng-seed/src/app/dashboard/dashboard.component.ts @@ -5,6 +5,7 @@ import { MatIconRegistry } from '@angular/material/icon'; import { DomSanitizer } from '@angular/platform-browser'; import * as moment from 'moment'; import { CurrencyPipe, DatePipe } from '@angular/common'; +import { AppointmentsService } from 'app/appoinment/appoinments/appointments-service/appointments.service'; @Component({ selector: 'app-dashboard', templateUrl: './dashboard.component.html', @@ -13,7 +14,7 @@ import { CurrencyPipe, DatePipe } from '@angular/common'; }) export class DashboardComponent { private currencyPipe1:CurrencyPipe - + public single: any[]; public multi: any[]; public showXAxis = true; @@ -330,8 +331,12 @@ messages: Object[] = [{ currency: any = 'INR'; countAndRevenue: boolean = false; currencyHtmlCode: any; - - constructor(private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) { + appoinmentsList:any =[]; + appointmentListLength:any =[] + appoinmentsListToday:any=[]; + appoinmentsListTomorrow:any =[]; + appoinmentsListLater:any =[]; + constructor(public _app:AppointmentsService,private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) { // this.fetch((data) => { this.rows = data; }); Object.assign(this, {single, multi}) this.matIconRegistry.addSvgIcon( @@ -354,6 +359,7 @@ messages: Object[] = [{ let user_role = localStorage.getItem('user_role') let param if(user_role == 'PRACTITIONER'){ + this.getAppoinmentsList() param = {'user_id':localStorage.getItem('user_id'),'busId':localStorage.getItem('busId')} }else{ param = {'busId':localStorage.getItem('busId')} @@ -652,4 +658,61 @@ messages: Object[] = [{ return spanElement.innerHTML; } + + + getAppoinmentsList() { + this.appoinmentsList=[] + let user_role = localStorage.getItem('user_role'); + let param = {"busId": localStorage.getItem('busId'),"userId":localStorage.getItem('user_id')} + console.log(param) + this._app.getAppoinmentsListDetails(param).subscribe(res => { + + if (res.status == 200) { + + this.appoinmentsList = res.data; + this.appoinmentsList.forEach(element => { + console.log(element) + element.appoinmentSlots = JSON.parse(element.appoinmentSlots) + }); + var startDate:any = new Date(); + startDate = startDate.toISOString().slice(0, 10); + this.appoinmentsList.forEach(element => { + + if(element.appoinmentDate == startDate){ + this.appoinmentsListToday.push(element) + } + + }); + // this.appoinmentsListToday = this.appoinmentsList.filter(val => val.appoinmentDate == startDate ) + // this.appoinmentsList = appoinmentsListToday + localStorage.setItem('busId', res.data[0].busId + ) + var startDate1:any = new Date(); + startDate1.setDate(startDate1.getDate() + 1); + let Tomorrow = startDate1.toISOString().slice(0, 10) + console.log(Tomorrow) + this.appoinmentsList.forEach(element => { + + if(element.appoinmentDate == Tomorrow){ + this.appoinmentsListTomorrow.push(element) + } + + }); + + this.appoinmentsList.forEach(element => { + + if(element.appoinmentDate != Tomorrow && element.appoinmentDate != startDate ){ + this.appoinmentsListLater.push(element) + } + + }); + console.log(this.appoinmentsListLater) + + // this.appoinmentsListTomorrow= this.appoinmentsList.filter(val => val.appoinmentDate == Yesterday ) + this.appointmentListLength = res.data.length; + console.log(this.appointmentListLength) + } + }) + +} }