< Summary

Information
Class: AspNetCoreGeneratedDocument.Areas_Studio2_Views_AvdBasket_Index
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/AvdBasket/Index.cshtml
Line coverage
0%
Covered lines: 0
Uncovered lines: 15
Coverable lines: 15
Total lines: 88
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 18
Branch coverage: 0%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
ExecuteAsync()0%342180%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/AvdBasket/Index.cshtml

#LineLine coverage
 1@using Services.ApiServices.AvdApi
 2@model IReadOnlyList<AvdBasketItem>
 3
 4@{
 05    var items = Model ?? Array.Empty<AvdBasketItem>();
 06    ViewData["Title"] = $"Корзина АВД ({items.Count} шт.)";
 07    Layout = "~/Views/Shared/_Layout.cshtml";
 8}
 9
 10<div class="container">
 11    <div class="row">
 12        <div>
 13            <div class="card">
 14                <div class="card-header">
 15                    <div>
 16                        <h2>Корзина АВД</h2>
 17                        <div class="nav-links">
 18                            <a asp-action="Orders">Заказы АВД</a>
 19                        </div>
 20                    </div>
 21                </div>
 22
 23                <div class="card-body">
 024                    @if (TempData["ErrorMessage"] is string errorMessage)
 25                    {
 026                        <div class="alert alert-danger"><i class="fas fa-triangle-exclamation me-2"></i>@errorMessage</d
 27                    }
 28
 29                    <div class="table-responsive">
 30                        <table class="table table-hover">
 31                            <thead class="bg-light">
 32                            <tr>
 33                                <th>Артикул</th>
 34                                <th>Наименование</th>
 35                                <th>Каталог</th>
 36                                <th>Поставщик АВД</th>
 37                                <th class="text-end">Цена</th>
 38                                <th style="width: 12%;">Количество</th>
 39                                <th>Комментарий</th>
 40                                <th class="text-center" style="width: 8%;">Действия</th>
 41                            </tr>
 42                            </thead>
 43                            <tbody>
 044                            @if (items.Any())
 45                            {
 046                                foreach (var item in items)
 47                                {
 48                                    <tr>
 049                                        <td>@item.ItemNumber</td>
 050                                        <td>@item.ItemName</td>
 051                                        <td>@item.CatalogName</td>
 052                                        <td>@item.SupplierName <span class="text-muted small">(@item.Region)</span></td>
 053                                        <td class="text-end">@(item.Price?.ToString("0.##") ?? "-")</td>
 54                                        <td>
 55                                            <form asp-action="Update" method="post" class="d-flex gap-1">
 56                                                <input type="hidden" name="idBasketItem" value="@item.Id" />
 57                                                <input type="number" name="quantity" value="@item.Quantity" min="0" step
 58                                                <input type="hidden" name="comment" value="@item.Comment" />
 59                                                <button type="submit" class="btn btn-outline-primary btn-sm" title="Сохр
 60                                            </form>
 61                                        </td>
 062                                        <td>@item.Comment</td>
 63                                        <td class="text-center">
 064                                            <form asp-action="Remove" method="post" data-st2-confirm="Удалить @item.Item
 65                                                <input type="hidden" name="idBasketItem" value="@item.Id" />
 66                                                <button type="submit" class="btn btn-outline-danger btn-sm" title="Удали
 67                                            </form>
 68                                        </td>
 69                                    </tr>
 070                                }
 71                            }
 72                            else
 73                            {
 74                                <tr>
 75                                    <td colspan="8" class="text-center py-4 text-muted">
 76                                        <i class="fas fa-cart-shopping fa-2x mb-3 d-block"></i>
 77                                        Корзина АВД пуста
 78                                    </td>
 79                                </tr>
 80                            }
 81                            </tbody>
 82                        </table>
 83                    </div>
 84                </div>
 85            </div>
 86        </div>
 87    </div>
 88</div>

Methods/Properties

ExecuteAsync()