| | | 1 | | @model OzonDomains.Models.OrderCarts.OrderCart |
| | | 2 | | |
| | | 3 | | @{ |
| | 0 | 4 | | ViewData["Title"] = "Удаление корзины заказов"; |
| | 0 | 5 | | Layout = "_Layout"; |
| | | 6 | | } |
| | | 7 | | |
| | | 8 | | <div class="container mt-4"> |
| | 0 | 9 | | <h2>@ViewData["Title"]</h2> |
| | | 10 | | <h3>Вы уверены, что хотите удалить эту корзину?</h3> |
| | | 11 | | |
| | | 12 | | <div class="card border-danger mt-4"> |
| | | 13 | | <div class="card-header bg-danger text-white"> |
| | | 14 | | <h4>Информация о корзине</h4> |
| | | 15 | | </div> |
| | | 16 | | <div class="card-body"> |
| | | 17 | | <dl class="row"> |
| | | 18 | | <dt class="col-sm-3">ID:</dt> |
| | 0 | 19 | | <dd class="col-sm-9">@Model.Id</dd> |
| | | 20 | | |
| | | 21 | | <dt class="col-sm-3">Поставщик:</dt> |
| | 0 | 22 | | <dd class="col-sm-9">@Model.Provider</dd> |
| | | 23 | | |
| | | 24 | | <dt class="col-sm-3">Статус:</dt> |
| | 0 | 25 | | <dd class="col-sm-9">@Model.CartStatus?.Name</dd> |
| | | 26 | | |
| | | 27 | | <dt class="col-sm-3">Дата создания:</dt> |
| | 0 | 28 | | <dd class="col-sm-9">@Model.CreatedAt.ToString("g")</dd> |
| | | 29 | | |
| | | 30 | | <dt class="col-sm-3">Кол-во товаров:</dt> |
| | 0 | 31 | | <dd class="col-sm-9">@(Model.OrderItems?.Count ?? 0)</dd> |
| | | 32 | | |
| | 0 | 33 | | @if (!string.IsNullOrEmpty(Model.Comment)) |
| | | 34 | | { |
| | | 35 | | <dt class="col-sm-3">Комментарий:</dt> |
| | 0 | 36 | | <dd class="col-sm-9">@Model.Comment</dd> |
| | | 37 | | } |
| | | 38 | | |
| | 0 | 39 | | @if (!string.IsNullOrEmpty(Model.ClientOrderNumber)) |
| | | 40 | | { |
| | | 41 | | <dt class="col-sm-3">Номер заказа клиента:</dt> |
| | 0 | 42 | | <dd class="col-sm-9">@Model.ClientOrderNumber</dd> |
| | | 43 | | } |
| | | 44 | | </dl> |
| | | 45 | | |
| | 0 | 46 | | @if (Model.OrderItems != null && Model.OrderItems.Any()) |
| | | 47 | | { |
| | | 48 | | <div class="mt-4"> |
| | | 49 | | <h5>Товары в корзине:</h5> |
| | | 50 | | <table class="table table-sm table-bordered"> |
| | | 51 | | <thead class="table-light"> |
| | | 52 | | <tr> |
| | | 53 | | <th>ID</th> |
| | | 54 | | <th>ItemId</th> |
| | | 55 | | <th>Количество</th> |
| | | 56 | | <th>Комментарий</th> |
| | | 57 | | <th>Статус</th> |
| | | 58 | | </tr> |
| | | 59 | | </thead> |
| | | 60 | | <tbody> |
| | 0 | 61 | | @foreach (var item in Model.OrderItems) |
| | | 62 | | { |
| | | 63 | | <tr> |
| | 0 | 64 | | <td>@item.Id</td> |
| | 0 | 65 | | <td>@item.ItemId</td> |
| | 0 | 66 | | <td>@item.Quantity</td> |
| | 0 | 67 | | <td>@item.Comment</td> |
| | 0 | 68 | | <td>@item.ItemStatus?.Name</td> |
| | | 69 | | </tr> |
| | | 70 | | } |
| | | 71 | | </tbody> |
| | | 72 | | </table> |
| | | 73 | | </div> |
| | | 74 | | } |
| | | 75 | | </div> |
| | | 76 | | </div> |
| | | 77 | | |
| | | 78 | | <form asp-action="Delete" class="mt-4"> |
| | | 79 | | <input type="hidden" asp-for="Id" /> |
| | | 80 | | <div class="form-group"> |
| | | 81 | | <button type="submit" class="btn btn-danger"> |
| | | 82 | | <i class="fas fa-trash-alt"></i> Удалить |
| | | 83 | | </button> |
| | | 84 | | <a asp-action="Index" class="btn btn-secondary"> |
| | | 85 | | <i class="fas fa-arrow-left"></i> Назад к списку |
| | | 86 | | </a> |
| | | 87 | | </div> |
| | | 88 | | </form> |
| | | 89 | | </div> |