Added order image and description upload

This commit is contained in:
2025-11-30 10:48:08 +01:00
parent b005975c81
commit 1bce61267a
13 changed files with 974 additions and 2 deletions

View File

@@ -12,13 +12,25 @@
<div class="card-body p-5">
<h2 class="mb-4">@Localizer["CreateNewOrder"]</h2>
<form method="post" id="createOrderForm">
<form method="post" id="createOrderForm" enctype="multipart/form-data">
<div class="mb-3">
<label for="Name" class="form-label">@Localizer["OrderName"]</label>
<input type="text" class="form-control" id="Name" name="Name" required>
<small class="text-muted">@Localizer["GiveOrderName"]</small>
</div>
<div class="mb-3">
<label for="AdditionalInfo" class="form-label">Additional Information</label>
<textarea class="form-control" id="AdditionalInfo" name="AdditionalInfo" rows="3" placeholder="Enter any additional details about this order..."></textarea>
<small class="text-muted">Optional: Add notes, special instructions, or other details</small>
</div>
<div class="mb-3">
<label for="ImageFile" class="form-label">Order Image</label>
<input type="file" class="form-control" id="ImageFile" name="ImageFile" accept="image/*">
<small class="text-muted">Optional: Upload an image for this order (JPG, PNG, etc.)</small>
</div>
<hr>
<h5 class="mb-3">@Localizer["MenuItems"]</h5>

View File

@@ -15,6 +15,15 @@
<h2>@Model.Name</h2>
<p class="text-muted">@Localizer.Get("Code"): <strong>@Model.OrderCode</strong></p>
<p>@Localizer.Get("CreatedBy"): <strong>@Model.CreatorName</strong></p>
<p>@Localizer.Get("CreatedOn"): @Model.CreatedAt.ToString("g")</p>
@if (!string.IsNullOrEmpty(Model.ImagePath))
{
<img src="@Model.ImagePath" alt="Order Image" class="img-fluid mb-3" style="max-height: 300px; object-fit: cover;">
}
@if (!string.IsNullOrEmpty(Model.AdditionalInfo))
{
<p class="border rounded p-3" style="white-space: pre-wrap;">@Model.AdditionalInfo</p>
}
<p>@Localizer.Get("Status"): <span class="badge @(Model.IsClosed ? "bg-danger" : "bg-success")">@(Model.IsClosed ? Localizer.Get("Closed") : Localizer.Get("Open"))</span></p>
</div>
</div>

View File

@@ -15,6 +15,16 @@
<h2>@Model.Name</h2>
<p class="text-muted">@Localizer["Code"]: <strong>@Model.OrderCode</strong></p>
<p>@Localizer["CreatedBy"]: <strong>@Model.CreatorName</strong></p>
@if (!string.IsNullOrEmpty(Model.ImagePath))
{
<img src="@Model.ImagePath" alt="Order Image" class="img-fluid mb-3" style="max-height: 300px; object-fit: cover;">
}
@if (!string.IsNullOrEmpty(Model.AdditionalInfo))
{
<p class="border rounded p-3" style="white-space: pre-wrap;">@Model.AdditionalInfo</p>
}
</div>
</div>