Skip to content

Commit 652d042

Browse files
committed
Small UI correction on accounts page: no more pagination if filters are applied and results < pagination thresold.
1 parent edd56c5 commit 652d042

File tree

2 files changed

+8
-30
lines changed

2 files changed

+8
-30
lines changed

src/Ubik.Accounting.WebApp.Client/Components/Accounts/Accounts.razor

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
public bool IsAuthorizedToModify { get; set; } = false;
8989

9090
private IQueryable<AccountModel>? _accounts;
91-
private int _numberOfAccounts = -1;
91+
9292
private List<CurrencyStandardResult>? _currencies;
9393

9494
private bool _isLoading = true;
@@ -105,6 +105,13 @@
105105
private AccountFilters _filters = default!;
106106
private string _searchValue = string.Empty;
107107

108+
private int _numberOfAccounts
109+
{
110+
get{
111+
return _filteredAccounts?.Count() ?? -1;
112+
}
113+
}
114+
108115
private IQueryable<AccountModel>? _filteredAccounts
109116
{
110117
get
@@ -216,7 +223,6 @@
216223
{
217224
var result = (await response.Content.ReadFromJsonAsync<IEnumerable<AccountStandardResult>>() ?? []).ToAccountModel();
218225
_accounts = result.AsQueryable();
219-
_numberOfAccounts = _accounts.Count();
220226
}
221227
else
222228
{

src/Ubik.Accounting.WebApp/Styles/app.output.css

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,34 +1140,10 @@ p:is(.dark *) {
11401140
width: 100%;
11411141
}
11421142

1143-
.w-56 {
1144-
width: 14rem;
1145-
}
1146-
11471143
.min-w-\[70px\] {
11481144
min-width: 70px;
11491145
}
11501146

1151-
.min-w-\[150px\] {
1152-
min-width: 150px;
1153-
}
1154-
1155-
.max-w-20 {
1156-
max-width: 5rem;
1157-
}
1158-
1159-
.max-w-24 {
1160-
max-width: 6rem;
1161-
}
1162-
1163-
.max-w-28 {
1164-
max-width: 7rem;
1165-
}
1166-
1167-
.max-w-32 {
1168-
max-width: 8rem;
1169-
}
1170-
11711147
.max-w-full {
11721148
max-width: 100%;
11731149
}
@@ -2470,10 +2446,6 @@ p:is(.dark *) {
24702446
width: 1024px;
24712447
}
24722448

2473-
.lg\:min-w-\[800px\] {
2474-
min-width: 800px;
2475-
}
2476-
24772449
.lg\:table-fixed {
24782450
table-layout: fixed;
24792451
}

0 commit comments

Comments
 (0)