Skip to content

Commit c6e541f

Browse files
Fix Blazor Server merchant list table structure for integration tests
Co-authored-by: StuartFerguson <16325469+StuartFerguson@users.noreply.github.com>
1 parent 2eca42f commit c6e541f

1 file changed

Lines changed: 11 additions & 21 deletions

File tree

  • EstateManagementUI.BlazorServer/Components/Pages/Merchants

EstateManagementUI.BlazorServer/Components/Pages/Merchants/Index.razor

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@
2727
{
2828
<!-- Merchants Table -->
2929
<div class="bg-white rounded-lg shadow-md overflow-hidden">
30-
<table class="table">
30+
<table id="merchantList" class="table">
3131
<thead>
3232
<tr>
3333
<th>Merchant Name</th>
34-
<th>Reference</th>
35-
<th>Balance</th>
36-
<th>Available Balance</th>
3734
<th>Settlement Schedule</th>
35+
<th>Contact Name</th>
36+
<th>Address Line 1</th>
37+
<th>Town</th>
3838
<th class="text-right">Actions</th>
3939
</tr>
4040
</thead>
@@ -52,14 +52,14 @@
5252
</div>
5353
</div>
5454
</td>
55-
<td class="font-mono text-sm">@merchant.MerchantReference</td>
56-
<td class="font-semibold text-green-600">@(merchant.Balance?.ToString("C") ?? "N/A")</td>
57-
<td class="font-semibold">@(merchant.AvailableBalance?.ToString("C") ?? "N/A")</td>
5855
<td>
5956
<span class="px-3 py-1 bg-blue-100 text-blue-800 rounded-full text-sm font-medium">
6057
@(merchant.SettlementSchedule ?? "Not Set")
6158
</span>
6259
</td>
60+
<td>@(merchant.Contact?.ContactName ?? "N/A")</td>
61+
<td>@(merchant.Address?.AddressLine1 ?? "N/A")</td>
62+
<td>@(merchant.Address?.Town ?? "N/A")</td>
6363
<td class="text-right">
6464
<div class="flex items-center justify-end space-x-2">
6565
<button class="text-blue-600 hover:text-blue-800 p-2" @onclick:stopPropagation="true" @onclick="() => ViewMerchant(merchant.MerchantId)" title="View">
@@ -81,20 +81,10 @@
8181
</table>
8282
</div>
8383

84-
<!-- Summary Cards -->
85-
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
86-
<div class="bg-white rounded-lg shadow-md p-6">
87-
<p class="text-sm text-gray-600 mb-1">Total Merchants</p>
88-
<p class="text-3xl font-bold text-gray-900">@merchants.Count</p>
89-
</div>
90-
<div class="bg-white rounded-lg shadow-md p-6">
91-
<p class="text-sm text-gray-600 mb-1">Total Balance</p>
92-
<p class="text-3xl font-bold text-green-600">@merchants.Sum(m => m.Balance ?? 0).ToString("C")</p>
93-
</div>
94-
<div class="bg-white rounded-lg shadow-md p-6">
95-
<p class="text-sm text-gray-600 mb-1">Available Balance</p>
96-
<p class="text-3xl font-bold text-blue-600">@merchants.Sum(m => m.AvailableBalance ?? 0).ToString("C")</p>
97-
</div>
84+
<!-- Summary Card -->
85+
<div class="bg-white rounded-lg shadow-md p-6">
86+
<p class="text-sm text-gray-600 mb-1">Total Merchants</p>
87+
<p class="text-3xl font-bold text-gray-900">@merchants.Count</p>
9888
</div>
9989
}
10090
else

0 commit comments

Comments
 (0)