-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [admin/dashboard] ajoute les cards qui décompte les jobs et les…
… utilisateurs (#309)
- Loading branch information
1 parent
522f2b7
commit 525fb24
Showing
27 changed files
with
186 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
frontend-implicaction/src/app/admin/components/counter-card/counter-card.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<div class="card info-card revenue-card"> | ||
|
||
<div class="card-body"> | ||
|
||
<div class="d-flex align-items-center"> | ||
<div class="card-icon rounded-circle d-flex align-items-center justify-content-center"> | ||
<i [ngClass]="icon" style="font-size: 2rem"></i> | ||
</div> | ||
<div class="ps-3"> | ||
<h4>{{value ?? 0}}</h4> | ||
<span class="text-muted small pt-2 ps-1">{{title}}</span> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</div> |
31 changes: 31 additions & 0 deletions
31
frontend-implicaction/src/app/admin/components/counter-card/counter-card.component.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
@import "src/assets/variables"; | ||
|
||
.card-icon { | ||
font-size: 32px; | ||
line-height: 0; | ||
width: 64px; | ||
height: 64px; | ||
flex-shrink: 0; | ||
flex-grow: 0; | ||
background-color: $secondary; | ||
} | ||
|
||
.card { | ||
margin: 0 0 30px !important; | ||
padding: 10px 0 !important; | ||
|
||
.card-body { | ||
padding: 20px; | ||
|
||
.card-title { | ||
margin: 0 0 8px; | ||
padding: 20px 0 15px; | ||
} | ||
|
||
h4 { | ||
color: $primary; | ||
font-size: 28px; | ||
font-weight: 700; | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
frontend-implicaction/src/app/admin/components/counter-card/counter-card.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import {ChangeDetectionStrategy, Component, Input} from '@angular/core'; | ||
|
||
@Component({ | ||
selector: 'app-counter-card', | ||
templateUrl: './counter-card.component.html', | ||
styleUrls: ['./counter-card.component.scss'], | ||
changeDetection: ChangeDetectionStrategy.OnPush | ||
}) | ||
export class CounterCardComponent { | ||
|
||
@Input() title: string | ||
@Input() icon: string; | ||
@Input() value: number; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 0 additions & 51 deletions
51
...icaction/src/app/admin/widgets/admin-overview-widget/admin-overview-widget.component.html
This file was deleted.
Oops, something went wrong.
Empty file.
9 changes: 0 additions & 9 deletions
9
...plicaction/src/app/admin/widgets/admin-overview-widget/admin-overview-widget.component.ts
This file was deleted.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...d-implicaction/src/app/admin/widgets/job-counter-widget/job-counter-widget.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<app-counter-card | ||
icon="pi pi-briefcase" | ||
[value]="jobCounter$ | async" | ||
[title]="'Offres d\'emplois'" | ||
></app-counter-card> |
19 changes: 19 additions & 0 deletions
19
...end-implicaction/src/app/admin/widgets/job-counter-widget/job-counter-widget.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { Component, OnInit } from '@angular/core'; | ||
import {JobService} from "../../../job/services/job.service"; | ||
import {Observable} from "rxjs"; | ||
|
||
@Component({ | ||
selector: 'app-job-counter-widget', | ||
templateUrl: './job-counter-widget.component.html', | ||
}) | ||
export class JobCounterWidgetComponent implements OnInit { | ||
|
||
jobCounter$: Observable<number> | ||
|
||
constructor(private jobService: JobService) { } | ||
|
||
ngOnInit(): void { | ||
this.jobCounter$ = this.jobService.getEnabledJobsCount(); | ||
} | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
...implicaction/src/app/admin/widgets/user-counter-widget/user-counter-widget.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<app-counter-card | ||
icon="pi pi-users" | ||
[value]="userCount$ | async" | ||
[title]="'Utilisateurs activés'" | ||
></app-counter-card> |
20 changes: 20 additions & 0 deletions
20
...d-implicaction/src/app/admin/widgets/user-counter-widget/user-counter-widget.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import {Component, OnInit} from '@angular/core'; | ||
import {UserService} from "../../../community/services/profile/user.service"; | ||
import {Observable} from "rxjs"; | ||
|
||
@Component({ | ||
selector: 'app-user-counter-widget', | ||
templateUrl: './user-counter-widget.component.html', | ||
}) | ||
export class UserCounterWidgetComponent implements OnInit { | ||
|
||
userCount$: Observable<number>; | ||
|
||
constructor(private userService: UserService) { | ||
} | ||
|
||
ngOnInit(): void { | ||
this.userCount$ = this.userService.getEnabledUsersCount(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.