Skip to content

Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.

1.1 KB
Raw Blame
@model VendorModel
@{
    if (Model.AvailableDiscounts is { Count: > 0 })
    {
        @* the discount list of the product Prices tab: one check per discount, two to a row *@
        <admin-card>
            <div class="grand-fields grand-fields--2col">
                @foreach (var discount in Model.AvailableDiscounts)
                {
                    <div class="grand-field grand-field--check form-check">
                        <div class="grand-field__control">
                            <input type="checkbox" class="form-check-input" id="[email protected]" name="SelectedDiscountIds" value="@discount.Id"
                                   checked="@(Model.SelectedDiscountIds != null && Model.SelectedDiscountIds.Contains(discount.Id))"/>
                        </div>
                        <label class="grand-field__label" for="[email protected]">@discount.Name</label>
                    </div>
                }
            </div>
        </admin-card>
    }
    else
    {
        <div class="note note-info">
            @Html.Raw(Loc["Admin.Vendors.Discounts.NoDiscounts"])
        </div>
    }
}