Skip to content

Commit a0e354f

Browse files
committed
Fix(WEB-114): Implement modern empty state for Group list
Signed-off-by: Harsh Deep <deepkashyapharsh@gmail.com>
1 parent abf9bac commit a0e354f

File tree

4 files changed

+51
-3
lines changed

4 files changed

+51
-3
lines changed

src/app/groups/groups.component.html

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,18 @@
2525
</button>
2626
</div>
2727
</div>
28+
<div *ngIf="(dataSource?.records$ | async) === 0" class="empty-state-container">
29+
<div class="m-t-40 m-b-40 text-center">
30+
<fa-icon icon="users" size="6x" class="gray-text m-b-20"></fa-icon>
31+
<h2 class="mat-h2">{{ 'labels.text.No Groups Found' | translate }}</h2>
32+
<p class="gray-text">{{ 'labels.text.No Groups Found Description' | translate }}</p>
33+
<button mat-raised-button color="primary" [routerLink]="['create']">
34+
<fa-icon icon="plus" class="m-r-10"></fa-icon> {{ 'labels.buttons.Create Your First Group' | translate }}
35+
</button>
36+
</div>
37+
</div>
2838

29-
<table mat-table [dataSource]="dataSource" matSort class="bordered-table">
39+
<table *ngIf="(dataSource?.records$ | async) > 0" mat-table [dataSource]="dataSource" matSort class="bordered-table">
3040
<ng-container matColumnDef="name">
3141
<th mat-header-cell *matHeaderCellDef mat-sort-header>{{ 'labels.inputs.name' | translate }}</th>
3242
<td mat-cell *matCellDef="let group">{{ group.name }}</td>

src/app/groups/groups.component.scss

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,31 @@
77
*/
88

99
@use '../shared/styles/list-layout' as *;
10+
@use '../../assets/styles/colours' as *; // This imports the official Mifos colors
11+
12+
.empty-state-container {
13+
display: flex;
14+
flex-direction: column;
15+
align-items: center;
16+
justify-content: center;
17+
padding: 80px 24px; // 24 is a multiple of 8
18+
background-color: $light-grey; // Uses official variable instead of #f9f9f9
19+
border: 2px dashed $silver; // Uses official variable instead of #e0e0e0
20+
border-radius: 8px; // 8 is a multiple of 8
21+
margin: 24px 0;
22+
23+
.gray-text {
24+
color: $asbestos; // Uses official variable instead of #757575
25+
font-size: 1.1rem;
26+
margin-bottom: 24px;
27+
}
28+
29+
fa-icon {
30+
color: $silver;
31+
}
32+
33+
h2 {
34+
margin-top: 8px;
35+
font-weight: 500;
36+
}
37+
}

src/assets/translations/en-US.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@
351351
"Home": "Home"
352352
},
353353
"buttons": {
354+
"Create Your First Group": "Create Your First Group",
354355
"Accept Transfer": "Accept Transfer",
355356
"Actions": "Actions",
356357
"Activate": "Activate",
@@ -3059,6 +3060,8 @@
30593060
"the Transaction Type": "the Transaction Type"
30603061
},
30613062
"text": {
3063+
"No Groups Found": "No Groups Found",
3064+
"No Groups Found Description": "We couldn't find any groups. Try a different search or create one now.",
30623065
"About Us": "About Us",
30633066
"A": "A",
30643067
"Account Transfers": "Account Transfers",

src/environments/.env.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
/**
2+
* Copyright since 2025 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
7+
*/
18
// IMPORTANT: THIS FILE IS AUTO GENERATED! DO NOT MANUALLY EDIT OR CHECKIN!
29
/* tslint:disable */
310
export default {
411
'mifos_x': {
5-
'version': '260108',
6-
'hash': 'g5af11fe75'
12+
'version': '260311',
13+
'hash': 'abf9bac6'
714
},
815
'allow_switching_backend_instance': true
916
};

0 commit comments

Comments
 (0)