< Summary

Information
Class: AspNetCoreGeneratedDocument.Areas_Studio2_Views_OrderHistory__OrderHistoryTransactionComment
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/OrderHistory/_OrderHistoryTransactionComment.cshtml
Line coverage
0%
Covered lines: 0
Uncovered lines: 24
Coverable lines: 24
Total lines: 95
Line coverage: 0%
Branch coverage
0%
Covered branches: 0
Total branches: 38
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%1482380%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Areas/Studio2/Views/OrderHistory/_OrderHistoryTransactionComment.cshtml

#LineLine coverage
 1@model Services.TransactionUtilsServices.TransactionCommentDisplayModel
 2@using Services.TransactionUtilsServices
 3
 4@{
 05    var embedded = Model.DisplayMode == TransactionCommentDisplayMode.OrderHistoryCard;
 06    var rootClass = embedded ? "oh-tx-comment oh-tx-comment--embedded" : "oh-tx-comment";
 7}
 8
 09@switch (Model.Kind)
 10{
 11    case TransactionCommentDisplayKind.Empty:
 12        <span class="text-muted">—</span>
 013        break;
 14
 15    case TransactionCommentDisplayKind.Generating:
 16        <div class="@rootClass oh-tx-comment--generating">
 17            <i class="fas fa-hourglass-half me-1" aria-hidden="true"></i>
 18            <span>Комментарий генерируется…</span>
 19        </div>
 020        break;
 21
 22    case TransactionCommentDisplayKind.Html:
 23        <div class="@rootClass oh-tx-comment--legacy@(Model.IsExpandable ? " oh-tx-comment--collapsible oh-tx-comment--c
 024            <div class="oh-tx-comment-legacy-body">@Html.Raw(Model.Raw)</div>
 025            @if (Model.IsExpandable)
 26            {
 27                <button type="button" class="oh-tx-comment-toggle" data-oh-tx-comment-toggle aria-expanded="false">
 28                    Показать полностью
 29                </button>
 30            }
 31        </div>
 032        break;
 33
 34    case TransactionCommentDisplayKind.Plain:
 35        <div class="@rootClass oh-tx-comment--plain@(Model.IsExpandable ? " oh-tx-comment--collapsible oh-tx-comment--co
 036            <div class="oh-tx-comment-plain-body">@Model.Raw</div>
 037            @if (Model.IsExpandable)
 38            {
 39                <button type="button" class="oh-tx-comment-toggle" data-oh-tx-comment-toggle aria-expanded="false">
 40                    Показать полностью
 41                </button>
 42            }
 43        </div>
 044        break;
 45
 46    case TransactionCommentDisplayKind.Structured:
 47        <div class="@rootClass oh-tx-comment--structured@(embedded ? " oh-tx-comment--embedded" : string.Empty)@(Model.I
 048            @if (Model.Meta.Count > 0)
 49            {
 50                <dl class="oh-tx-comment-meta">
 051                    @foreach (var item in Model.Meta)
 52                    {
 53                        <div class="oh-tx-comment-meta-item">
 054                            <dt>@item.Label</dt>
 055                            <dd>@item.Value</dd>
 56                        </div>
 57                    }
 58                </dl>
 59            }
 60
 061            @if (Model.Sections.Count > 0)
 62            {
 63                <div class="oh-tx-comment-sections">
 064                    @foreach (var section in Model.Sections)
 65                    {
 066                        var paragraphs = TransactionCommentDisplayFormatter.SplitParagraphs(section.Body);
 67                        <div class="oh-tx-comment-section@(section.IsWarning ? " oh-tx-comment-section--warning" : strin
 068                            @if (!string.IsNullOrWhiteSpace(section.Title))
 69                            {
 70                                <div class="oh-tx-comment-section__title">
 071                                    @if (section.IsWarning)
 72                                    {
 73                                        <i class="fas fa-triangle-exclamation me-1" aria-hidden="true"></i>
 74                                    }
 075                                    @(section.Title)
 76                                </div>
 77                            }
 078                            @foreach (var paragraph in paragraphs)
 79                            {
 080                                <p class="oh-tx-comment-section__text">@paragraph</p>
 81                            }
 82                        </div>
 83                    }
 84                </div>
 85            }
 86
 087            @if (Model.IsExpandable)
 88            {
 89                <button type="button" class="oh-tx-comment-toggle" data-oh-tx-comment-toggle aria-expanded="false">
 90                    Показать полностью
 91                </button>
 92            }
 93        </div>
 94        break;
 95}

Methods/Properties

ExecuteAsync()