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.

3.2 KB
Raw Blame
@model OrderModel
@{
    //page title
    ViewBag.Title = Loc["Vendor.Orders.EditOrderDetails"];
}
<form asp-area="@Constants.AreaVendor" asp-controller="Order" asp-action="Edit" method="post" id="order-form">
    <input type="hidden" asp-for="Id"/>
    <div asp-validation-summary="All"></div>
    @* the admin order screen's shell: the order number as the title, the invoice as an outline
       button; a vendor has nothing to save or delete here *@
    <admin-page sticky
                title="@Model.OrderNumber.ToString()"
                icon="bi-basket"
                meta="@Loc["Vendor.Orders.EditOrderDetails"]"
                back-url="@Url.Action("List")"
                back-text="@Loc["Vendor.Orders.BackToList"]">
        <page-actions>
            <a href="@Url.Action("PdfInvoice", new { orderId = Model.Id, area = Constants.AreaVendor })" class="btn btn-outline-secondary">
                <i class="bi bi-file-earmark-pdf"></i> @Loc["Vendor.Orders.PdfInvoice"]
            </a>
            <input type="submit" id="btnRefreshPage" style="display: none"/>
            <script>
                $(document).ready(function () {
                    $('#btnRefreshPage').click(function () {
                        //refresh page
                        location.reload();
                    });
                });
            </script>
            <vc:vendor-widget widget-zone="vendor_order_details_buttons" additional-data="Model"/>
        </page-actions>

        <admin-tabstrip name="order-edit" SetTabPos="true" BindGrid="true">
            <items>
                <tabstrip-item text="@Loc["Vendor.Orders.Info"]" tab-index="0">
                    <content>
                        <div>
                            <partial name="Partials/OrderDetails.Info" model="Model"/>
                        </div>
                    </content>
                </tabstrip-item>

                <tabstrip-item text="@Loc["Vendor.Orders.Addresses"]" tab-index="1">
                    <content>
                        <div>
                            <partial name="Partials/OrderDetails.Addresses" model="Model"/>
                        </div>
                    </content>
                </tabstrip-item>
                @if (Model.IsShippable)
                {
                    <tabstrip-item text="@Loc["Vendor.Orders.Shipments"]" tab-index="2">
                        <content>
                            <div>
                                <partial name="Partials/OrderDetails.Shipment" model="Model"/>
                            </div>
                        </content>
                    </tabstrip-item>
                }
                <tabstrip-item text="@Loc["Vendor.Orders.Products"]" tab-index="3">
                    <content>
                        <div>
                            <partial name="Partials/OrderDetails.Products" model="Model"/>
                        </div>
                    </content>
                </tabstrip-item>
                <vc:vendor-widget widget-zone="vendor_order_details_tabs" additional-data="Model"/>
            </items>
        </admin-tabstrip>
    </admin-page>
</form>
<admin-delete-confirmation button-id="order-delete"/>