Added order item delete functionality
This commit is contained in:
@@ -106,7 +106,9 @@
|
||||
<th>@Localizer.Get("Participant")</th>
|
||||
<th>@Localizer.Get("Item")</th>
|
||||
<th>@Localizer.Get("Qty")</th>
|
||||
<th>@Localizer.Get("Comments")</th>
|
||||
<th>@Localizer.Get("Total")</th>
|
||||
<th>@Localizer.Get("Actions")</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -116,7 +118,17 @@
|
||||
<td>@orderItem.ParticipantName</td>
|
||||
<td>@orderItem.MenuItem?.Name</td>
|
||||
<td>@orderItem.Quantity</td>
|
||||
<td>@orderItem.Comments</td>
|
||||
<td>@Localizer["Currency", (orderItem.MenuItem?.Price * orderItem.Quantity ?? 0).ToString("F2")]</td>
|
||||
<td>
|
||||
@if (User.Identity?.Name == orderItem.ParticipantEmail)
|
||||
{
|
||||
<form method="post" action="/order/deleteitem" onsubmit="return confirm('@Localizer.Get("ConfirmDeleteOrderItem")');">
|
||||
<input type="hidden" name="orderItemId" value="@orderItem.Id" />
|
||||
<button type="submit" class="btn btn-sm btn-danger">@Localizer.Get("Delete")</button>
|
||||
</form>
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user