From 720ff5246fd19ac1c0461982d74703706c0bf6b6 Mon Sep 17 00:00:00 2001 From: Surendiran Date: Mon, 29 May 2023 18:08:23 +0530 Subject: [PATCH] copy link and dashboard changes done --- ng-seed/src/app/app.routing.ts | 2 +- .../consultant-setting.component.ts | 2 +- .../app/dashboard/dashboard.component.html | 60 ++++++++++++++++--- .../app/dashboard/dashboard.component.scss | 12 ++++ .../src/app/dashboard/dashboard.component.ts | 26 +++++++- .../src/app/dashboard/dashboard.service.ts | 21 +++---- .../booking-summary.component.ts | 4 +- .../consultants-list.component.html | 2 +- .../consultants/consultants-list.component.ts | 2 +- .../customer-info/customer-info.component.ts | 2 +- .../doctor-profile.component.html | 2 +- .../doctor-profile.component.ts | 8 +-- .../app/end-user/payment/payment.component.ts | 8 +-- .../service-list.component.ts | 4 +- .../slot-booking-details.component.ts | 10 ++-- ng-seed/src/environments/environment.prod.ts | 5 +- ng-seed/src/environments/environment.ts | 6 +- 17 files changed, 129 insertions(+), 47 deletions(-) diff --git a/ng-seed/src/app/app.routing.ts b/ng-seed/src/app/app.routing.ts index 9f88f02..3e59e14 100644 --- a/ng-seed/src/app/app.routing.ts +++ b/ng-seed/src/app/app.routing.ts @@ -62,7 +62,7 @@ export const AppRoutes: Routes = [{ //component: AuthLayoutComponent, children: [ { - path: 'customer', + path: 'booking', loadChildren: () => import('./end-user/end-user.module').then(m => m.EndUserModule) } 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 8323209..b7b3e90 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 @@ -395,7 +395,7 @@ unavailability(action,obj) { console.log(this.practitionerdetails) if(this.userRole == 'PRACTITIONER' || this.userRole == 'FRONTDESK'){ - this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr+"/details" + this.endUserURL = this.end_User_Url+'practitioner/'+this.usersList.randStr } else if (this.userRole == 'BIZADMIN'){ this.endUserURL = this.end_User_Url+'business/'+this.usersList['BusinessDetails'][0].randStr } diff --git a/ng-seed/src/app/dashboard/dashboard.component.html b/ng-seed/src/app/dashboard/dashboard.component.html index 52a1cef..780dc61 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.html +++ b/ng-seed/src/app/dashboard/dashboard.component.html @@ -7,8 +7,8 @@
- -
190
+ +
{{count.user_count}}
@@ -21,8 +21,9 @@
- -
987
+ calendar_today + +
{{count.total_appoinments_count}}
@@ -30,18 +31,61 @@
-
-
Users
+
+
Appointment Earnings
- -
236
+ +
20000
+
+ +
+
Customer
+ +
+
+ +
15
+
+
+
+
+
+
+ +
+
Services
+ +
+
+ + +
{{count.service_count}}
+
+
+
+
+
+
+ +
+
Service Earnings
+ +
+
+ +
150
+
+
+
+
+
diff --git a/ng-seed/src/app/dashboard/dashboard.component.scss b/ng-seed/src/app/dashboard/dashboard.component.scss index 1a667cf..3e274ee 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.scss +++ b/ng-seed/src/app/dashboard/dashboard.component.scss @@ -540,3 +540,15 @@ a.link { font-size: 50px; display: inline-block; } +mat-icon{ + height: unset !important; + // width: 0px !important; + align-self: center !important; + font-size: 3em !important; +} + +.svg{ + width: 50px !important; + align-self: unset !important; + font-size: unset !important; +} diff --git a/ng-seed/src/app/dashboard/dashboard.component.ts b/ng-seed/src/app/dashboard/dashboard.component.ts index c4e8131..ec7cf9f 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.ts +++ b/ng-seed/src/app/dashboard/dashboard.component.ts @@ -1,5 +1,8 @@ import { Component } from '@angular/core'; import { single, multi } from './charts.data'; +import { DashboardService } from './dashboard.service'; +import { MatIconRegistry } from '@angular/material/icon'; +import { DomSanitizer } from '@angular/platform-browser'; @Component({ selector: 'app-dashboard', templateUrl: './dashboard.component.html', @@ -20,10 +23,31 @@ export class DashboardComponent { domain: ['#673ab7', '#f44336', '#009688 ', '#2196f3'] }; public autoScale = true; - constructor() { + count: any = []; + constructor(public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) { // this.fetch((data) => { this.rows = data; }); Object.assign(this, {single, multi}) + this.matIconRegistry.addSvgIcon( + 'service', + this.domSanitizer.bypassSecurityTrustResourceUrl('assets/images/service_icon.svg') + ); } + + ngOnInit() { + let buiId = {'busId':localStorage.getItem('busId')} + this.getCount(buiId) + } + + getCount(param){ + this._dash.getCountDetails(param).subscribe(res => { + if (res.status == 200) { + console.log(res) + this.count = res['data'] + } + }) + } + + onSelect(event) { console.log(event); } diff --git a/ng-seed/src/app/dashboard/dashboard.service.ts b/ng-seed/src/app/dashboard/dashboard.service.ts index 8eecc32..8e037e6 100644 --- a/ng-seed/src/app/dashboard/dashboard.service.ts +++ b/ng-seed/src/app/dashboard/dashboard.service.ts @@ -1,22 +1,23 @@ import { HttpClient } from '@angular/common/http'; import { Injectable } from '@angular/core'; +import { environment } from 'environments/environment'; import { Observable } from 'rxjs'; @Injectable({ providedIn: 'root' }) export class DashboardService { - apiUrl: string; - - constructor(private _http: HttpClient - ) { } - - generateotp(email): Observable { + private apiUrl = environment.apiEndpoint; + constructor(private _http: HttpClient) { } + // generateotp(email): Observable { - return this._http.post(this.apiUrl + 'generateOTP', { "records":{ "email":email}}) - // .pipe( - // catchError(this.handleError('role', [])) - // ) + // return this._http.post(this.apiUrl + 'getcount', { "records":{ "email":email}}) + // // .pipe( + // // catchError(this.handleError('role', [])) + // // ) + // } + getCountDetails(param): Observable { + return this._http.post(this.apiUrl + 'getcount', param) } } 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 97fd11f..fbd343f 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 @@ -233,10 +233,10 @@ html2pdf().from(element).set(opt).save(); console.log(URL_AS_LIST); if(URL_AS_LIST[2] == 'practitioner'){ - this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]+'/details']) + this.router.navigate(['booking/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]]) console.log('practitioner') }else{ - this.router.navigate(['customer/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]]) + this.router.navigate(['booking/'+URL_AS_LIST[2]+'/'+URL_AS_LIST[3]]) console.log('Business') } } 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 4718e7e..68ced2a 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 @@ -75,7 +75,7 @@
- +