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 414b785..6c55de0 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 @@ -547,7 +547,7 @@
{{details.servicesName}}
-
{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | {{(servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : details.fees) | currency: currencySymbol}}
+
{{servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].durationNew : details.duration}} Mins | {{(servicesList_data[i].duration.length>0 ? servicesList_data[i].duration[0].fees : details.fees) | currency: currencySymbol:true:'2.0'}}
+ Customize the price and duration of a service.
diff --git a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html index 40d21b8..f7c9369 100644 --- a/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html +++ b/ng-seed/src/app/appoinment/service-list-details/service-list/service-list.component.html @@ -53,7 +53,7 @@ Fees - {{row.fees | currency: currencySymbol}} + {{row.fees | currency: currencySymbol:true:'2.0'}} diff --git a/ng-seed/src/app/dashboard/dashboard.component.html b/ng-seed/src/app/dashboard/dashboard.component.html index 240acee..6593b28 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.html +++ b/ng-seed/src/app/dashboard/dashboard.component.html @@ -44,12 +44,12 @@
-

{{count.monthly_earning_count | currency:currency}}

+

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

Monthly


-

{{count.today_earning_count | currency:currency}}

+

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

Today

@@ -205,7 +205,7 @@
- Practitioner wise Revenue  + Practitioner wise Revenue ({{currencyHtmlCode}})
@@ -241,7 +241,7 @@
- Service Wise Revenue   + Service Wise Revenue  ({{currencyHtmlCode}})
@@ -276,7 +276,7 @@ - +
diff --git a/ng-seed/src/app/dashboard/dashboard.component.ts b/ng-seed/src/app/dashboard/dashboard.component.ts index 75d5063..8555b7c 100644 --- a/ng-seed/src/app/dashboard/dashboard.component.ts +++ b/ng-seed/src/app/dashboard/dashboard.component.ts @@ -263,7 +263,7 @@ ComboChartData: Array = [{ ]; ComboChartData2: Array = [{ data: [], - label: 'Revenue', + label: '', borderWidth: 1, type: 'line', fill: false @@ -329,6 +329,8 @@ messages: Object[] = [{ user_role: any; currency: any; countAndRevenue: boolean = false; + currencyHtmlCode: any; + constructor(private currencySymbol: CurrencyPipe,public _dash:DashboardService,private matIconRegistry: MatIconRegistry,private domSanitizer: DomSanitizer) { // this.fetch((data) => { this.rows = data; }); Object.assign(this, {single, multi}) @@ -340,6 +342,9 @@ messages: Object[] = [{ this.currency = localStorage.getItem('currency') console.log(this.currency) + // Usage example + // const currencyName = 'INR'; + this.currencyHtmlCode = this.getCurrencyHtmlCode(this.currency); } ngOnInit() { @@ -490,6 +495,7 @@ messages: Object[] = [{ console.log(this.ComboChartData) this.ComboChartData[0].data = linecount this.ComboChartData2[0].data = lineFees + this.ComboChartData2[0].label = 'Revenue ' + this.currencyHtmlCode // this.ComboChartData.forEach(element => { // console.log(element) // if(element.type == 'line'){ @@ -597,4 +603,22 @@ messages: Object[] = [{ console.log(event) this.countAndRevenue = event } + + getCurrencyHtmlCode(currencyName) { + const formatter = new Intl.NumberFormat('en-US', { + style: 'currency', + currency: currencyName, + }); + + const sampleValue = 123; // Use a sample value to retrieve the currency symbol + const formattedValue = formatter.format(sampleValue); + + const match = formattedValue.match(/(\D+)/); // Extract the non-numeric part (currency symbol) + const currencySymbol = match ? match[0] : ''; + + const spanElement = document.createElement('span'); + spanElement.textContent = currencySymbol; + + return spanElement.innerHTML; + } } 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..a8c054e 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}} + : {{busCurrency}} {{(serviceMapDetails.duration.length>0 ? serviceMapDetails.duration[0].fees : serviceMapDetails.service[0].fees) | currency: currency:true:'2.0'}}
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 d2926db..b97e218 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 @@ -272,7 +272,7 @@

AvatarTime

{{bookedDetails.time | date:'shortTime'}}

AvatarAmount

- {{bookedDetails.amount | currency: currency}} + {{bookedDetails.amount | currency: currency:true:'2.0'}}
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 bfad978..92958a3 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 @@ -219,7 +219,7 @@

AvatarTime :

{{slotTime | date:'shortTime'}}

AvatarAmount :

- {{(serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].fees:serviceMapdetails[0].service[0].fees) | currency: currency}} + {{(serviceMapdetails[0].duration.length>0 ? serviceMapdetails[0].duration[0].fees:serviceMapdetails[0].service[0].fees) | currency: currency:true:'2.0'}}

diff --git a/ng-seed/src/environments/environment.prod.ts b/ng-seed/src/environments/environment.prod.ts index 0b2882a..b1cb3ef 100644 --- a/ng-seed/src/environments/environment.prod.ts +++ b/ng-seed/src/environments/environment.prod.ts @@ -4,7 +4,7 @@ export const environment = { // apiEndpoint:'http://venbainfotech.com:5000/', // apiEndpoint:'https://192.168.159.24:8080/api/', // apiEndpoint:'https://api.venbait.in/api/', - apiEndpoint:'https://dev.venbait.in/appointment/api/', + apiEndpoint:'https://dev.venbait.in/appointments/api/', //EndUser URL endUserUrl: window.location.origin+'/#/booking/', diff --git a/ng-seed/src/environments/environment.ts b/ng-seed/src/environments/environment.ts index 0aaf211..84be1f6 100644 --- a/ng-seed/src/environments/environment.ts +++ b/ng-seed/src/environments/environment.ts @@ -7,8 +7,8 @@ export const environment = { production: false, environmentName: 'Testing Environment',//Localhost Environment. // apiEndpoint:'http://venbainfotech.com:5000/api/', - apiEndpoint:'http://192.168.1.32:8080/api/', - // apiEndpoint:'https://dev.venbait.in/appointments/api/', + // apiEndpoint:'http://192.168.1.32:8080/api/', + apiEndpoint:'https://dev.venbait.in/appointments/api/', //EndUser URL endUserUrl: window.location.origin+'/#/booking/',