Fixed localization issues, fixed text-warning not accessible,
This commit is contained in:
@@ -11,8 +11,6 @@
|
||||
<div class="row mb-4">
|
||||
<div class="col-md-12">
|
||||
<h1>@Localizer.Get("Welcome")</h1>
|
||||
<p>@Localizer.Get("LoggedInAs"): <strong>@User.Identity?.Name</strong></p>
|
||||
<a href="/Account/Logout" class="btn btn-danger">@Localizer.Get("Logout")</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -63,7 +61,7 @@
|
||||
<small class="text-muted">@Localizer.Get("Created"): @order.CreatedAt.ToString("MMM dd, yyyy HH:mm")</small><br>
|
||||
<small>@Localizer.Get("Items"): @order.MenuItems.Count | @Localizer.Get("Orders"): @order.OrderItems.Count</small>
|
||||
</p>
|
||||
<p class="text-success"><strong>@Localizer.Get("Total"): $@order.OrderItems.Sum(oi => oi.MenuItem.Price * oi.Quantity).ToString("F2")</strong></p>
|
||||
<p class="text-success"><strong>@Localizer.Get("Total"): @Localizer["Currency", order.OrderItems.Sum(oi => oi.MenuItem.Price * oi.Quantity).ToString("F2")]</strong></p>
|
||||
<div class="d-flex gap-2">
|
||||
<a href="/order/details?code=@order.OrderCode" class="btn btn-sm btn-primary">@Localizer.Get("View")</a>
|
||||
@if (!order.IsClosed)
|
||||
@@ -72,7 +70,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
<span class="badge bg-secondary">@Localizer.Get("Closed")</span>
|
||||
<span class="badge bg-secondary align-content-center">@Localizer.Get("Closed")</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
@@ -109,7 +107,7 @@
|
||||
<small class="text-muted">@Localizer.Get("CreatedBy"): @order.CreatorName</small><br>
|
||||
<small>@Localizer.Get("MyItems"): @myItems.Count</small>
|
||||
</p>
|
||||
<p class="text-warning"><strong>@Localizer.Get("IOwe"): $@myItems.Sum(oi => oi.MenuItem.Price * oi.Quantity).ToString("F2")</strong></p>
|
||||
<p><strong>@Localizer.Get("IOwe"): @Localizer["Currency", myItems.Sum(oi => (oi.MenuItem?.Price ?? 0) * oi.Quantity).ToString("F2")]</strong></p>
|
||||
<div class="d-flex gap-2">
|
||||
<a href="/order/join?code=@order.OrderCode" class="btn btn-sm btn-primary">@Localizer.Get("View")</a>
|
||||
@if (!order.IsClosed)
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
<footer class="border-top footer text-muted">
|
||||
<div class="container">
|
||||
© 2025 - OneForMe - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
|
||||
© 2025 - OneForMe
|
||||
</div>
|
||||
</footer>
|
||||
<script src="~/lib/jquery/dist/jquery.min.js"></script>
|
||||
|
||||
Reference in New Issue
Block a user