From d3386f669225dbf33a58d7418c28873c5160f387 Mon Sep 17 00:00:00 2001 From: Landris18 Date: Fri, 1 Mar 2024 01:17:46 +0300 Subject: [PATCH] Show stats smoothly --- .../dashboards/project/project.component.html | 15 +++++++-------- .../admin/dashboards/project/project.component.ts | 5 ++++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app/modules/admin/dashboards/project/project.component.html b/src/app/modules/admin/dashboards/project/project.component.html index 5482051..c4c5d31 100644 --- a/src/app/modules/admin/dashboards/project/project.component.html +++ b/src/app/modules/admin/dashboards/project/project.component.html @@ -1,5 +1,4 @@
-
@@ -35,7 +34,7 @@ -
+
@@ -55,13 +54,13 @@
-->
-
+
{{formatNumberWithSpaceSeparator(stats?.revenue.profit)}}
Dépense:
{{stats?.revenue.expenses}}
-
+
Revenu:
{{stats?.revenue.income}}
@@ -86,17 +85,17 @@
-->
-
+
{{stats?.appointments.total}}
Placé:
{{stats?.appointments.ready}}
-
+
En cours:
{{stats?.appointments.inProgress}}
-
+
Effectué:
{{stats?.appointments.finished}}
@@ -121,7 +120,7 @@
-->
-
+
{{formatNumberWithSpaceSeparator(stats?.commission.amount)}}
Nombre:
diff --git a/src/app/modules/admin/dashboards/project/project.component.ts b/src/app/modules/admin/dashboards/project/project.component.ts index 9415341..ee450ab 100644 --- a/src/app/modules/admin/dashboards/project/project.component.ts +++ b/src/app/modules/admin/dashboards/project/project.component.ts @@ -14,7 +14,8 @@ import { FuseConfirmationService } from '@fuse/services/confirmation/confirmatio @Component({ selector: 'project', templateUrl: './project.component.html', - encapsulation: ViewEncapsulation.None + encapsulation: ViewEncapsulation.None, + }) export class ProjectComponent implements OnInit, OnDestroy { chartGithubIssues: ApexOptions = {}; @@ -47,6 +48,7 @@ export class ProjectComponent implements OnInit, OnDestroy { searchInputControl: FormControl = new FormControl(); filteredEmployes: any; stats: any; + isLoading: boolean; /** * Constructor @@ -174,6 +176,7 @@ export class ProjectComponent implements OnInit, OnDestroy { } getAllStats() { + this.isLoading = true; const { startDate, endDate } = this.getStartAndEndDate(); const queryParams = `?startDate=${startDate}&endDate=${endDate}` this._projectService.getStats(queryParams).subscribe((res: any) => {