Fixed localization issues, fixed text-warning not accessible,

This commit is contained in:
2025-11-30 10:28:50 +01:00
parent db8f2fcdf1
commit b005975c81
10 changed files with 76 additions and 20 deletions

View File

@@ -15,7 +15,7 @@
<form method="post" id="createOrderForm">
<div class="mb-3">
<label for="Name" class="form-label">@Localizer["OrderName"]</label>
<input type="text" class="form-control" id="Name" name="Name" placeholder="e.g., Pizza Party" required>
<input type="text" class="form-control" id="Name" name="Name" required>
<small class="text-muted">@Localizer["GiveOrderName"]</small>
</div>
@@ -32,7 +32,7 @@
</div>
<div class="col-md-4">
<div class="input-group">
<span class="input-group-text">$</span>
<span class="input-group-text">@Localizer["CurrencySymbol"]</span>
<input type="number" class="form-control" placeholder="@Localizer["Price"]" name="itemPrices[]" step="0.01" min="0">
</div>
</div>
@@ -67,7 +67,7 @@ document.getElementById('addItemBtn').addEventListener('click', function() {
</div>
<div class="col-md-4">
<div class="input-group">
<span class="input-group-text">$</span>
<span class="input-group-text">@Localizer["CurrencySymbol"]</span>
<input type="number" class="form-control" placeholder="@Localizer["Price"]" name="itemPrices[]" step="0.01" min="0">
<button type="button" class="btn btn-outline-danger" onclick="this.closest('.item-row').remove()">@Localizer["Remove"]</button>
</div>

View File

@@ -38,7 +38,7 @@
{
<tr>
<td>@item.Name</td>
<td>$@item.Price.ToString("F2")</td>
<td>@Localizer["Currency", item.Price.ToString("F2")]</td>
</tr>
}
</tbody>
@@ -74,7 +74,7 @@
<td>@orderItem.ParticipantName</td>
<td>@orderItem.MenuItem?.Name</td>
<td>@orderItem.Quantity</td>
<td>$@(orderItem.MenuItem?.Price * orderItem.Quantity ?? 0).ToString("F2")</td>
<td>@Localizer["Currency", (orderItem.MenuItem?.Price * orderItem.Quantity ?? 0).ToString("F2")]</td>
</tr>
}
</tbody>
@@ -105,13 +105,17 @@
<h5>@Localizer.Get("QuickStats")</h5>
<p>@Localizer.Get("TotalItems"): <strong>@Model.MenuItems.Count</strong></p>
<p>@Localizer.Get("TotalOrders"): <strong>@Model.OrderItems.Count</strong></p>
<p>@Localizer.Get("TotalRevenue"): <strong>$@Model.OrderItems.Sum(oi => oi.MenuItem.Price * oi.Quantity).ToString("F2")</strong></p>
<p>@Localizer.Get("TotalRevenue"): <strong>@Localizer["Currency", Model.OrderItems.Sum(oi => oi.MenuItem.Price * oi.Quantity).ToString("F2")]</strong></p>
</div>
</div>
@if (!Model.IsClosed)
{
<a href="#" class="btn btn-danger w-100">@Localizer.Get("CloseOrder")</a>
<a href="/order/close?code=@Model.OrderCode" class="btn btn-danger w-100">@Localizer.Get("CloseOrder")</a>
}
else
{
<div class="alert alert-danger w-100">@Localizer.Get("Closed")</div>
}
</div>
</div>

View File

@@ -12,7 +12,7 @@
<div class="col-md-8">
<div class="card shadow mb-4">
<div class="card-body">
<h2>@Model.CreatorName</h2>
<h2>@Model.Name</h2>
<p class="text-muted">@Localizer["Code"]: <strong>@Model.OrderCode</strong></p>
<p>@Localizer["CreatedBy"]: <strong>@Model.CreatorName</strong></p>
</div>