Skip to content

Commit fa4898b

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 fa4898b

File tree

15 files changed

+78
-1
lines changed

15 files changed

+78
-1
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 *;
11+
12+
.empty-state-container {
13+
display: flex;
14+
flex-direction: column;
15+
align-items: center;
16+
justify-content: center;
17+
padding: 80px 24px;
18+
background-color: $light-grey;
19+
border: 2px dashed $silver;
20+
border-radius: 8px;
21+
margin: 24px 0;
22+
23+
.gray-text {
24+
color: $asbestos;
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/cs-CS.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
"Home": "Domov"
351351
},
352352
"buttons": {
353+
"Create Your First Group": "Create Your First Group",
353354
"Accept Transfer": "Přijmout převod",
354355
"Actions": "Akce",
355356
"Activate": "aktivovat",
@@ -3025,6 +3026,8 @@
30253026
"the Transaction Type": "typ transakce"
30263027
},
30273028
"text": {
3029+
"No Groups Found": "No Groups Found",
3030+
"No Groups Found Description": "We couldn't find any groups. Try a different search or create one now.",
30283031
"Loading data": "Načítání dat",
30293032
"No repayment schedule available": "Není k dispozici žádný splátkový kalendář",
30303033
"About Us": "O Nás",

src/assets/translations/de-DE.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
"Home": "Heim"
351351
},
352352
"buttons": {
353+
"Create Your First Group": "Erstellen Sie Ihre erste Gruppe",
353354
"Accept Transfer": "Akzeptieren Sie die Übertragung",
354355
"Actions": "Aktionen",
355356
"Activate": "aktivieren Sie",
@@ -3026,6 +3027,8 @@
30263027
"the Transaction Type": "der Transaktionstyp"
30273028
},
30283029
"text": {
3030+
"No Groups Found": "Keine Gruppen gefunden",
3031+
"No Groups Found Description": "Wir konnten keine Gruppen finden. Versuchen Sie eine andere Suche oder erstellen Sie jetzt eine.",
30293032
"Loading data": "Daten werden geladen",
30303033
"No repayment schedule available": "Kein Rückzahlungsplan verfügbar",
30313034
"About Us": "Über Uns",

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/assets/translations/es-CL.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
"Home": "Inicio"
351351
},
352352
"buttons": {
353+
"Create Your First Group": "Crea tu primer grupo",
353354
"Accept Transfer": "Aceptar transferencia",
354355
"Actions": "Acciones",
355356
"Activate": "Activar",
@@ -3025,6 +3026,8 @@
30253026
"the Transaction Type": "el tipo de transacción"
30263027
},
30273028
"text": {
3029+
"No Groups Found": "No se encontraron grupos",
3030+
"No Groups Found Description": "No pudimos encontrar ningún grupo. Intente una búsqueda diferente o cree uno ahora.",
30283031
"Loading data": "Cargando datos",
30293032
"No repayment schedule available": "No hay cronograma de pagos disponible",
30303033
"About Us": "Sobre Nosotros",

src/assets/translations/es-MX.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
"Home": "Inicio"
351351
},
352352
"buttons": {
353+
"Create Your First Group": "Crea tu primer grupo",
353354
"Accept Transfer": "Aceptar transferencia",
354355
"Actions": "Acciones",
355356
"Activate": "Activar",
@@ -3040,6 +3041,8 @@
30403041
"the Transaction Type": "el tipo de transacción"
30413042
},
30423043
"text": {
3044+
"No Groups Found": "No se encontraron grupos",
3045+
"No Groups Found Description": "No pudimos encontrar ningún grupo. Intente una búsqueda diferente o cree uno ahora.",
30433046
"Unable to load vendors. Please check your connection and try again.": "No se pudieron cargar los proveedores. Verifique su conexión e intente de nuevo.",
30443047
"This remittance has a terminal status and cannot be processed further.": "Esta remesa tiene un estado terminal y no puede ser procesada.",
30453048
"This remittance has already been paid successfully.": "Esta remesa ya ha sido pagada exitosamente.",

src/assets/translations/fr-FR.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
"Home": "Maison"
351351
},
352352
"buttons": {
353+
"Create Your First Group": "Créez votre premier groupe",
353354
"Accept Transfer": "Accepter le transfert",
354355
"Actions": "Actions",
355356
"Activate": "Activer",
@@ -3027,6 +3028,8 @@
30273028
"the Transaction Type": "le type de transaction"
30283029
},
30293030
"text": {
3031+
"No Groups Found": "Aucun groupe trouvé",
3032+
"No Groups Found Description": "Nous n'avons trouvé aucun groupe. Essayez une autre recherche ou créez-en un maintenant.",
30303033
"Loading data": "Chargement des données",
30313034
"No repayment schedule available": "Aucun calendrier de remboursement disponible",
30323035
"About Us": "À Propos de Nous",

src/assets/translations/it-IT.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
"Home": "Casa"
351351
},
352352
"buttons": {
353+
"Create Your First Group": "Crea il tuo primo gruppo",
353354
"Accept Transfer": "Accetta trasferimento",
354355
"Actions": "Azioni",
355356
"Activate": "Attivare",
@@ -3023,6 +3024,8 @@
30233024
"the Transaction Type": "il tipo di transazione"
30243025
},
30253026
"text": {
3027+
"No Groups Found": "Nessun gruppo trovato",
3028+
"No Groups Found Description": "Non siamo riusciti a trovare alcun gruppo. Prova una ricerca diversa o creane uno ora.",
30263029
"Loading data": "Caricamento dati",
30273030
"No repayment schedule available": "Nessun piano di rimborso disponibile",
30283031
"About Us": "Chi Siamo",

src/assets/translations/ko-KO.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@
350350
"Home": ""
351351
},
352352
"buttons": {
353+
"Create Your First Group": "첫 번째 그룹 생성",
353354
"Accept Transfer": "전송 수락",
354355
"Actions": "행위",
355356
"Activate": "활성화",
@@ -3023,6 +3024,8 @@
30233024
"the Transaction Type": "거래 유형"
30243025
},
30253026
"text": {
3027+
"No Groups Found": "그룹을 찾을 수 없습니다",
3028+
"No Groups Found Description": "그룹을 찾을 수 없습니다. 다른 검색을 시도하거나 지금 하나를 생성하십시오.",
30263029
"Loading data": "데이터 로딩 중",
30273030
"No repayment schedule available": "상환 일정을 사용할 수 없습니다",
30283031
"About Us": "회사 소개",

0 commit comments

Comments
 (0)