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.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
refactor(arch001): migrate Shipment views to Grand.Web.AdminShared, add per-host WidgetZone overrides
KrzysztofPajakcb8fcf3fe99a
diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/List.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/List.cshtmldeleted file mode 100644index 6d9e1d96b..000000000--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/List.cshtml+++ /dev/null@@ -1,404 +0,0 @@-@model ShipmentListModel-@inject AdminAreaSettings adminAreaSettings-@{- ViewBag.Title = Loc["Admin.Orders.Shipments.List"];-}--<form asp-area="@Constants.AreaAdmin" asp-controller="Shipment" asp-action="List" method="post">-- <div class="row">- <div class="col-md-12">- <div class="x_panel light form-fit popup-window">- <div class="x_title">- <div class="caption">- <i class="fa fa-truck"></i>- @Loc["Admin.Orders.Shipments.List"]- </div>- <div class="actions">- <div class="btn-group btn-group-devided util-btn-margin-bottom-5">- <button type="submit" name="exportpackagingslips-all" asp-action="PdfPackagingSlipAll" class="btn purple">- <i class="fa fa-file-pdf-o"></i>- @Loc["Admin.Orders.Shipments.PrintPackagingSlip.All"]- </button>- <button type="submit" id="exportpackagingslips-selected" class="btn blue">- <i class="fa fa-file-pdf-o"></i>- @Loc["Admin.Orders.Shipments.PrintPackagingSlip.Selected"]- </button>- <button class="btn btn-success" type="submit" id="ship-selected">- <i class="fa fa-check"></i> @Loc["Admin.Orders.Shipments.ShipSelected"]- </button>- <button class="btn btn-success" type="submit" id="deliver-selected">- <i class="fa fa-check-circle"></i> @Loc["Admin.Orders.Shipments.DeliverySelected"]- </button>- <vc:admin-widget widget-zone="order_shipment_list_buttons" additional-data="null"/>- </div>- </div>- </div>- <div class="x_content form">- <div class="form-horizontal">- <div class="form-body">- <div class="main-header col-12 px-0">- <div class="row align-items-end">- <div class="col-md-8 col-ms-12 col-12">- <div class="form-group mb-0">- <admin-label asp-for="TrackingNumber" class="control-label"/>- <admin-input asp-for="TrackingNumber"/>- </div>- </div>- <div class="col-md-4 col-sm-12 col-12">- <div class="form-actions">- <div class="btn-group">- <button class="btn btn-success filter-submit" id="search-shipments">- <i class="fa fa-search"></i> @Loc["Admin.Common.Search"]- </button>- <button class="btn btn-info" type="button" data-toggle="collapse" data-target="#filterCollapse" aria-expanded="false" aria-controls="filterCollapse">- <i class="fa fa-filter"></i> @Loc["Admin.Common.Filters"]- </button>- </div>- </div>- </div>- </div>- </div>- <div class="collapse" id="filterCollapse">- <div class="drop-filters-container w-100">- <div class="form-group">- <admin-label asp-for="StartDate" class="col-sm-3 control-label"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="StartDate"/>- </div>- </div>- <div class="form-group">- <admin-label asp-for="EndDate" class="col-sm-3 control-label"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="EndDate"/>- </div>- </div>- <div class="form-group">- <admin-label asp-for="LoadNotShipped" class="col-sm-3 control-label"/>- <div class="col-md-9 col-sm-9">- <label class="mt-checkbox mt-checkbox-outline control control-checkbox">- <admin-input asp-for="LoadNotShipped"/>- <div class="control__indicator"></div>- </label>- </div>- </div>- </div>- </div>- </div>- <div class="x_content">- <div id="shipments-grid"></div>- </div>- </div>- </div>- </div>- </div>- </div>- <script>- $(document).ready(function () {- $("#shipments-grid").kendoGrid({- dataSource: {- transport: {- read: {- url: "@Html.Raw(Url.Action("ShipmentListSelect", "Shipment", new { area = Constants.AreaAdmin }))",- type: "POST",- dataType: "json",- data: additionalData- }- },- schema: {- data: "Data",- total: "Total",- errors: "Errors"- },- error: function(e) {- display_kendoui_grid_error(e);- // Cancel the changes- this.cancelChanges();- },- pageSize: @(adminAreaSettings.DefaultGridPageSize),- serverPaging: true,- serverFiltering: true,- serverSorting: true- },- pageable: {- refresh: true,- pageSizes: [@(adminAreaSettings.GridPageSizes)]- },- //details grid- detailInit: detailInit,- scrollable: false,- dataBound: onDataBound,- columns: [{- field: "Id",- headerTemplate: "<label class='mt-checkbox mt-checkbox-outline control control-checkbox'><input id='mastercheckbox' type='checkbox'/> <div class='control__indicator'></div></label>",- template: "<label class='mt-checkbox mt-checkbox-outline control control-checkbox'><input type='checkbox' value='#=Id#' class='checkboxGroups'/> <div class='control__indicator'></div></label>",- width: 40- }, {- field: "ShipmentNumber",- title: "@Loc["Admin.Orders.Shipments.ID"]",- width: 100,- template: '<a class="k-link" href="@Url.Action("ShipmentDetails", "Shipment", new { area = Constants.AreaAdmin })/#=Id#">#=ShipmentNumber#</a>'- }, {- field: "OrderNumber",- title: "@Loc["Admin.Orders.Shipments.OrderID"]",- width: 100,- template: '<a class="k-link" href="@Url.Action("Edit", "Order", new { area = Constants.AreaAdmin })/#=OrderId#">#=OrderNumber#</a>'- }, {- field: "TrackingNumber",- title: "@Loc["Admin.Orders.Shipments.TrackingNumber"]",- width: 100,- template: '<a class="k-link" href="@Url.Action("ShipmentDetails", "Shipment", new { area = Constants.AreaAdmin })/#=Id#">#=kendo.htmlEncode(TrackingNumber)#</a>'- }, {- field: "TotalWeight",- title: "@Loc["Admin.Orders.Shipments.TotalWeight"]",- width: 80,- minScreenWidth: 770,- }, {- field: "ShippedDate",- title: "@Loc["Admin.Orders.Shipments.ShippedDate"]",- width: 180,- type: "date",- format: "{0:G}"- }, {- field: "DeliveryDate",- title: "@Loc["Admin.Orders.Shipments.DeliveryDate"]",- width: 180,- type: "date",- format: "{0:G}"- }]- });- });-- function detailInit(e) {- $("<div/>").appendTo(e.detailCell).kendoGrid({- dataSource: {- transport: {- read: {- url: "@Html.Raw(Url.Action("ShipmentsItemsByShipmentId", "Shipment", new { area = Constants.AreaAdmin }))?shipmentId="+e.data.Id,- type: "POST",- dataType: "json",- data: addAntiForgeryToken- }- },- schema: {- data: "Data",- total: "Total",- errors: "Errors"- },- error: function(e) {- display_kendoui_grid_error(e);- this.cancelChanges();- },- serverPaging: true,- serverFiltering: true,- serverSorting: true- },- scrollable: false,- sortable: true,- pageable: {- refresh: true,- numeric: false,- previousNext: false,- info: false- },- columns: [- {- field: "ProductName",- title: "@Loc["Admin.Orders.Shipments.Products.ProductName"]",- width: 400- },{- field: "ShippedFromWarehouse",- title: "@Loc["Admin.Orders.Shipments.Products.Warehouse"]",- width: 150- },{- field: "QuantityInThisShipment",- title: "@Loc["Admin.Orders.Shipments.Products.QtyShipped"]",- width: 150- },{- field: "ItemWeight",- title: "@Loc["Admin.Orders.Shipments.Products.ItemWeight"]",- width: 150- },{- field: "ItemDimensions",- title: "@Loc["Admin.Orders.Shipments.Products.ItemDimensions"]",- width: 150- }- ]- });- }- </script>--- <script>-- var selectedIds = [];-- $(document).ready(function () {-- $("#@Html.IdFor(model => model.CountryId)").change(function () {- var selectedItem = $(this).val();- var ddlStates = $("#@Html.IdFor(model => model.StateProvinceId)");- $.ajax({- cache: false,- type: "GET",- url: "@(Url.Action("GetStatesByCountryId", "Home", new { area = Constants.AreaAdmin }))",- data: { "countryId": selectedItem, "addAsterisk": "true" },- success: function (data) {- ddlStates.html('');- $.each(data, function (id, option) {- ddlStates.append($('<option></option>').val(option.id).html(option.name));- });- },- error: function (xhr, ajaxOptions, thrownError) {- alert('Failed to retrieve states.');- }- });- });-- $("#@Html.IdFor(model => model.TrackingNumber)").keydown(function (event) {- if (event.keyCode == 13) {- $("#search-shipments").click();- return false;- }- });- $("#@Html.IdFor(model => model.City)").keydown(function (event) {- if (event.keyCode == 13) {- $("#search-shipments").click();- return false;- }- });-- $('#search-shipments').click(function () {- var grid = $('#shipments-grid').data('kendoGrid');- grid.dataSource.page(1);- $('.checkboxGroups').prop('checked', false).change();- selectedIds = [];- return false;- });-- $('#ship-selected').click(function(e) {- e.preventDefault();-- var postData = {- selectedIds: selectedIds- };- addAntiForgeryToken(postData);-- $.ajax({- cache: false,- type: "POST",- url: "@(Url.Action("SetAsShippedSelected", "Shipment", new { area = Constants.AreaAdmin }))",- data: postData,- complete: function(data) {- var grid = $('#shipments-grid').data('kendoGrid');- grid.dataSource.read();- },- error: function(xhr, ajaxOptions, thrownError) {- alert(thrownError);- },- traditional: true- });- return false;- });-- $('#deliver-selected').click(function(e) {- e.preventDefault();-- var postData = {- selectedIds: selectedIds- };- addAntiForgeryToken(postData);-- $.ajax({- cache: false,- type: "POST",- url: "@(Url.Action("SetAsDeliveredSelected", "Shipment", new { area = Constants.AreaAdmin }))",- data: postData,- complete: function(data) {- var grid = $('#shipments-grid').data('kendoGrid');- grid.dataSource.read();- },- error: function(xhr, ajaxOptions, thrownError) {- alert(thrownError);- },- traditional: true- });- return false;- });--- $('#mastercheckbox').click(function () {- $('.checkboxGroups').prop('checked', $(this).is(':checked')).change();- });-- $('#shipments-grid').on('change', 'input[type=checkbox][id!=mastercheckbox]', function (e) {- var $check = $(this);- if ($check.is(":checked") == true) {- var checked = jQuery.inArray($check.val(), selectedIds);- if (checked == -1) {- selectedIds.push($check.val());- }- }- else {- var checked = jQuery.inArray($check.val(), selectedIds);- if (checked > -1) {- selectedIds = $.grep(selectedIds, function (item, index) {- return item != $check.val();- });- }- }- updateMasterCheckbox();- });- });-- function additionalData() {- var data = {- StartDate: $('#@Html.IdFor(model => model.StartDate)').val(),- EndDate: $('#@Html.IdFor(model => model.EndDate)').val(),- TrackingNumber: $('#@Html.IdFor(model => model.TrackingNumber)').val(),- CountryId: $('#@Html.IdFor(model => model.CountryId)').val(),- StateProvinceId: $('#@Html.IdFor(model => model.StateProvinceId)').val(),- City: $('#@Html.IdFor(model => model.City)').val(),- WarehouseId: $('#@Html.IdFor(model => model.WarehouseId)').val(),- LoadNotShipped: $('#@Html.IdFor(model => model.LoadNotShipped)').is(':checked')- };- addAntiForgeryToken(data);- return data;- }-- function onDataBound(e) {- $('#shipments-grid input[type=checkbox][id!=mastercheckbox]').each(function () {- var currentId = $(this).val();- var checked = jQuery.inArray(currentId, selectedIds);- $(this).prop('checked', checked > -1);- });-- updateMasterCheckbox();- }-- function updateMasterCheckbox() {- var numChkBoxes = $('#shipments-grid input[type=checkbox][id!=mastercheckbox]').length;- var numChkBoxesChecked = $('#shipments-grid input[type=checkbox][id!=mastercheckbox]:checked').length;- $('#mastercheckbox').prop('checked', numChkBoxes == numChkBoxesChecked && numChkBoxes > 0);- }- </script>--</form>-<form asp-area="@Constants.AreaAdmin" asp-controller="Shipment" asp-action="PdfPackagingSlipSelected" method="post" id="pdf-packaging-slip-selected-form">-- <input type="hidden" id="selectedIds" name="selectedIds" value=""/>-</form>--<script>-- $(document).ready(function () {- $('#exportpackagingslips-selected').click(function (e) {- e.preventDefault();- var ids = selectedIds.join(",");- $('#pdf-packaging-slip-selected-form #selectedIds').val(ids);- $('#pdf-packaging-slip-selected-form').submit();- return false;- });- });--</script>\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/Documents.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/Documents.cshtmldeleted file mode 100644index e59b6db41..000000000--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/Documents.cshtml+++ /dev/null@@ -1,73 +0,0 @@-@model ShipmentModel-@inject AdminAreaSettings adminAreaSettings-<div class="panel panel-default">- <vc:admin-widget widget-zone="order_shipment_details_documents_top" additional-data="Model"/>- <div class="panel-body">- <div id="shipment-documents-grid"></div>- </div>- <div class="panel-footer">- <button type="button" class="k-button" onclick="location.href='@Url.Action("CreateDocument", "Document", new { ObjectId = Model.Id, Reference = (int)Reference.Shipment, area = Constants.AreaAdmin })'"><i class="fa fa-plus"></i> @Loc["Admin.Marketing.Document.Add"]</button>- </div>- <vc:admin-widget widget-zone="order_shipment_details_documents_bottom" additional-data="Model"/>-</div>--<script>-$(document).ready(function () {- $("#shipment-documents-grid").kendoGrid({- dataSource: {- transport: {- read: {- url: "@Html.Raw(Url.Action("ListDocuments", "Document", new { reference = (int)Reference.Shipment, ObjectId = Model.Id, StatusId = -1, area = Constants.AreaAdmin }))",- type: "POST",- dataType: "json",- data: addAntiForgeryToken- },- },- schema: {- data: "Data",- total: "Total",- errors: "Errors",- model: {- id: "Id"- }- },- error: function(e) {- display_kendoui_grid_error(e);- // Cancel the changes- this.cancelChanges();- },- pageSize: @(adminAreaSettings.DefaultGridPageSize),- serverPaging: true,- serverFiltering: true,- serverSorting: true- },- pageable: {- refresh: true,- pageSizes: [@(adminAreaSettings.GridPageSizes)]- },- editable: {- confirmation: true,- mode: "inline"- },- scrollable: false,- columns: [{- field: "Number",- title: "@Loc["Admin.Documents.Document.Fields.Number"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaAdmin })/#=Id#">#=kendo.htmlEncode(Number)#</a>',- },- {- field: "Name",- title: "@Loc["Admin.Documents.Document.Fields.Name"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaAdmin })/#=Id#">#=kendo.htmlEncode(Name)#</a>',- }, {- field: "Published",- title: "@Loc["Admin.Documents.Document.Fields.Published"]",- width: 100,- minScreenWidth: 500,- headerAttributes: { style: "text-align:center" },- attributes: { style: "text-align:center" },- template: '# if(Published) {# <i class="fa fa-check" aria-hidden="true" style="color:green"></i> #} else {# <i class="fa fa-times" aria-hidden="true" style="color:red"></i> #} #'- }]- });-});-</script>\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.AddButtons.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.AddButtons.cshtmlnew file mode 100644index 000000000..e8bec5d70--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.AddButtons.cshtml@@ -0,0 +1 @@+<vc:admin-widget widget-zone="order_shipment_add_buttons" additional-data="null"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtmlnew file mode 100644index 000000000..25b76f962--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:admin-widget widget-zone="order_shipment_details_buttons" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtmlnew file mode 100644index 000000000..67b270354--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:admin-widget widget-zone="order_shipment_details_tabs" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Documents.Bottom.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Documents.Bottom.cshtmlnew file mode 100644index 000000000..718eb3b6b--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Documents.Bottom.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:admin-widget widget-zone="order_shipment_details_documents_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Documents.Top.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Documents.Top.cshtmlnew file mode 100644index 000000000..117b570d7--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Documents.Top.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:admin-widget widget-zone="order_shipment_details_documents_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.ListButtons.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.ListButtons.cshtmlnew file mode 100644index 000000000..5762141a4--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.ListButtons.cshtml@@ -0,0 +1 @@+<vc:admin-widget widget-zone="order_shipment_list_buttons" additional-data="null"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtmlnew file mode 100644index 000000000..03ba04ce8--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:admin-widget widget-zone="order_shipment_details_notes_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtmlnew file mode 100644index 000000000..7ad875e51--- /dev/null+++ b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:admin-widget widget-zone="order_shipment_details_notes_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/ShipmentDetails.cshtml b/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/ShipmentDetails.cshtmldeleted file mode 100644index 3a439f29e..000000000--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/ShipmentDetails.cshtml+++ /dev/null@@ -1,125 +0,0 @@-@using Grand.Business.Core.Interfaces.Common.Security-@using Grand.Domain.Permissions-@model ShipmentModel-@inject IPermissionService permissionService-@{- //page title- ViewBag.Title = Loc["Admin.Orders.Shipments.ViewDetails"];- var canManageDocuments = await permissionService.Authorize(StandardPermission.ManageDocuments);-}-<form asp-area="@Constants.AreaAdmin" asp-controller="Shipment" asp-action="ShipmentDetails" method="post">- <input type="hidden" asp-for="Id"/>- <script>- $(document).ready(function () {- toggleShippedDate(false);- toggleDeliveryDate(false);- });-- function toggleShippedDate(editmode) {- if (editmode) {- $('#lblShippedDate').hide();- $('#divShippedDate').show();- $('#btnEditShippedDate').hide();- $('#btnSaveShippedDate').show();- $('#btnCancelShippedDate').show();- }- else {- $('#lblShippedDate').show();- $('#divShippedDate').hide();- $('#btnEditShippedDate').show();- $('#btnSaveShippedDate').hide();- $('#btnCancelShippedDate').hide();- }- }-- function toggleDeliveryDate(editmode) {- if (editmode) {- $('#lblDeliveryDate').hide();- $('#divDeliveryDate').show();- $('#btnEditDeliveryDate').hide();- $('#btnSaveDeliveryDate').show();- $('#btnCancelDeliveryDate').show();- }- else {- $('#lblDeliveryDate').show();- $('#divDeliveryDate').hide();- $('#btnEditDeliveryDate').show();- $('#btnSaveDeliveryDate').hide();- $('#btnCancelDeliveryDate').hide();- }- }- </script>- <div asp-validation-summary="All"></div>- <div class="row">- <div class="col-md-12">- <div class="x_panel light form-fit">- <div class="x_title">- <div class="caption">- <i class="fa fa-truck"></i>- @Loc["Admin.Orders.Shipments.ViewDetails"] - @Model.ShipmentNumber- <small>- <i class="fa fa-arrow-circle-left"></i>- @Html.ActionLink(Loc["Admin.Orders.Shipments.BackToList"], "List")- </small>- </div>- <div class="actions">- <div class="btn-group btn-group-devided">- <a href="@Url.Action("PdfPackagingSlip", new { shipmentId = Model.Id, area = Constants.AreaAdmin })" class="btn purple">- <i class="fa fa-file-pdf-o"></i> @Loc["Admin.Orders.Shipments.PrintPackagingSlip"]- </a>- <span id="shipment-delete" class="btn red">- <i class="fa fa-trash-o"></i> @Loc["Admin.Common.Delete"]- </span>- <vc:admin-widget widget-zone="order_shipment_details_buttons" additional-data="Model"/>- </div>- </div>- </div>- <div class="x_content form">- <admin-tabstrip name="shipment-edit" SetTabPos="true">- <items>- <tabstrip-item text="@Loc["Admin.Orders.Shipments.ViewDetails.Info"]" tab-index="0">- <content>- <div>- <partial name="Partials/Info" model="Model"/>- </div>- </content>- </tabstrip-item>- @if (canManageDocuments)- {- <tabstrip-item text="@Loc["Admin.Orders.Shipments.Documents"]" tab-index="1">- <content>- <div>- <partial name="Partials/Documents" model="Model"/>- </div>- </content>- </tabstrip-item>- }- <tabstrip-item text="@Loc["Admin.Orders.Shipments.ShipmentNotes"]" tab-index="2">- <content>- <div>- <partial name="Partials/ShipmentNotes" model="Model"/>- </div>- </content>- </tabstrip-item>- <tabstrip-item text="@Loc["Admin.Common.UserFields.Tab"]" tab-index="3">- <content>- <div>- <div class="form-actions">- <input type="submit" asp-action="EditUserFields" value="@Loc["Admin.Common.Save"]" id="btnSaveUserFields" name="save-generic-attributes" class="k-button"/>- </div>- <div class="form-horizontal">- <partial name="Partials/UserFields" model="Model"/>- </div>- </div>- </content>- </tabstrip-item>- <vc:admin-widget widget-zone="order_shipment_details_tabs" additional-data="Model"/>- </items>- </admin-tabstrip>- </div>- </div>-- </div>- </div>-</form>-<admin-delete-confirmation button-id="shipment-delete" action-name="DeleteShipment"/>\ No newline at end of filediff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/AddShipment.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/AddShipment.cshtmlsimilarity index 76%rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/AddShipment.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/AddShipment.cshtmlindex cf0cd20ce..6c067720f 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/AddShipment.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/AddShipment.cshtml@@ -1,9 +1,13 @@-@model ShipmentModel+@using Grand.Domain.Shipping+@model ShipmentModel+@inject IAdminDataScope<Shipment> Scope@{//page title- ViewBag.Title = string.Format(Loc["Admin.Orders.Shipments.AddNew.Title"], Model.OrderId);+ var prefix = Scope.ResourceKeyPrefix;+ var area = ViewContext.RouteData.Values["area"]?.ToString();+ ViewBag.Title = string.Format(Loc[$"{prefix}.Orders.Shipments.AddNew.Title"], Model.OrderId);}-<form asp-area="@Constants.AreaAdmin" asp-controller="Shipment" asp-action="AddShipment" method="post"+<form asp-area="@area" asp-controller="Shipment" asp-action="AddShipment" method="post"asp-route-orderId="@HtmlExtensions.HtmlEncodeSafe(Context.Request.Query["orderId"])"><div asp-validation-summary="All"></div>@@ -13,21 +17,21 @@<div class="x_title"><div class="caption"><i class="fa fa-truck"></i>- @string.Format(Loc["Admin.Orders.Shipments.AddNew.Title"], Model.OrderNumber)+ @string.Format(Loc[$"{prefix}.Orders.Shipments.AddNew.Title"], Model.OrderNumber)<small><i class="fa fa-arrow-circle-left"></i>- @Html.ActionLink(Loc["Admin.Orders.Shipments.BackToOrder"], "Edit", "Order", new { Id = Model.OrderId })+ @Html.ActionLink(Loc[$"{prefix}.Orders.Shipments.BackToOrder"], "Edit", "Order", new { Id = Model.OrderId })</small></div><div class="actions"><div class="btn-group btn-group-devided"><button class="btn btn-success" type="submit" id="shipment-save" name="save">- <i class="fa fa-check"></i> @Loc["Admin.Common.Save"]+ <i class="fa fa-check"></i> @Loc[$"{prefix}.Common.Save"]</button><button class="btn btn-success" type="submit" id="shipment-save-continue" name="save-continue">- <i class="fa fa-check-circle"></i> @Loc["Admin.Common.SaveContinue"]+ <i class="fa fa-check-circle"></i> @Loc[$"{prefix}.Common.SaveContinue"]</button>- <vc:admin-widget widget-zone="order_shipment_add_buttons" additional-data="null"/>+ <partial name="Partials/WidgetZone.AddButtons" model="Model"/></div></div></div>@@ -54,7 +58,7 @@<h4>- <strong>@Loc["Admin.Orders.Shipments.Products"]</strong>+ <strong>@Loc[$"{prefix}.Orders.Shipments.Products"]</strong></h4><div class="table-responsive visible-xs-block visible-sm-block visible-md-block visible-lg-block">@@ -62,28 +66,28 @@<thead><tr><th>- @Loc["Admin.Orders.Shipments.Products.ProductName"]+ @Loc[$"{prefix}.Orders.Shipments.Products.ProductName"]</th><th>- @Loc["Admin.Orders.Shipments.Products.SKU"]+ @Loc[$"{prefix}.Orders.Shipments.Products.SKU"]</th><th>- @Loc["Admin.Orders.Shipments.Products.Warehouse"]+ @Loc[$"{prefix}.Orders.Shipments.Products.Warehouse"]</th><th>- @Loc["Admin.Orders.Shipments.Products.ItemWeight"]+ @Loc[$"{prefix}.Orders.Shipments.Products.ItemWeight"]</th><th>- @Loc["Admin.Orders.Shipments.Products.ItemDimensions"]+ @Loc[$"{prefix}.Orders.Shipments.Products.ItemDimensions"]</th><th>- @Loc["Admin.Orders.Shipments.Products.QtyOrdered"]+ @Loc[$"{prefix}.Orders.Shipments.Products.QtyOrdered"]</th><th>- @Loc["Admin.Orders.Shipments.Products.QtyShipped"]+ @Loc[$"{prefix}.Orders.Shipments.Products.QtyShipped"]</th><th>- @Loc["Admin.Orders.Shipments.Products.QtyToShip"]+ @Loc[$"{prefix}.Orders.Shipments.Products.QtyToShip"]</th></tr></thead>@@ -96,7 +100,7 @@<td><div style="padding-left:10px;padding-right:10px;"><em>- <a href="@Url.Action("Edit", "Product", new { id = item.ProductId, area = Constants.AreaAdmin })">@item.ProductName</a>+ <a href="@Url.Action("Edit", "Product", new { id = item.ProductId, area = area })">@item.ProductName</a></em>@if (!string.IsNullOrEmpty(item.AttributeInfo)){@@ -107,8 +111,8 @@@if (item.ShipSeparately){<p>- <strong>@Loc["Admin.Orders.Shipments.Products.ShipSeparately.Warning"]</strong>- @Loc["Admin.Orders.Shipments.Products.ShipSeparately"]+ <strong>@Loc[$"{prefix}.Orders.Shipments.Products.ShipSeparately.Warning"]</strong>+ @Loc[$"{prefix}.Orders.Shipments.Products.ShipSeparately"]</p>}</div>@@ -131,7 +135,7 @@<option value="@(warehouse.WarehouseId)" data-stock-qty="@(warehouse.StockQuantity)"data-reserved-qty="@(warehouse.ReservedQuantity)"selected="@selected">- @Loc["Admin.Orders.Shipments.Products.Warehouse.ChooseQty", warehouse.WarehouseName, warehouse.StockQuantity, warehouse.ReservedQuantity]+ @Loc[$"{prefix}.Orders.Shipments.Products.Warehouse.ChooseQty", warehouse.WarehouseName, warehouse.StockQuantity, warehouse.ReservedQuantity]</option>}</select>@@ -179,4 +183,4 @@</div>-</form>\ No newline at end of file+</form>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/List.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/List.cshtmlsimilarity index 94%rename from src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/List.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/List.cshtmlindex 0d65f4125..254e0f663 100644--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/List.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/List.cshtml@@ -1,10 +1,11 @@-@model ShipmentListModel+@model ShipmentListModel@inject AdminAreaSettings adminAreaSettings@{ViewBag.Title = Loc["Admin.Orders.Shipments.List"];+ var area = ViewContext.RouteData.Values["area"]?.ToString();}-<form asp-area="@Constants.AreaStore" asp-controller="Shipment" asp-action="List" method="post">+<form asp-area="@area" asp-controller="Shipment" asp-action="List" method="post"><div class="row"><div class="col-md-12">@@ -30,7 +31,7 @@<button class="btn btn-success" type="submit" id="deliver-selected"><i class="fa fa-check-circle"></i> @Loc["Admin.Orders.Shipments.DeliverySelected"]</button>- <vc:admin-widget widget-zone="order_shipment_list_buttons" additional-data="null"/>+ <partial name="Partials/WidgetZone.ListButtons" model="Model"/></div></div></div>@@ -99,7 +100,7 @@dataSource: {transport: {read: {- url: "@Html.Raw(Url.Action("ShipmentListSelect", "Shipment", new { area = Constants.AreaStore }))",+ url: "@Html.Raw(Url.Action("ShipmentListSelect", "Shipment", new { area = area }))",type: "POST",dataType: "json",data: additionalData@@ -137,17 +138,17 @@field: "ShipmentNumber",title: "@Loc["Admin.Orders.Shipments.ID"]",width: 100,- template: '<a class="k-link" href="@Url.Action("ShipmentDetails", "Shipment", new { area = Constants.AreaStore })/#=Id#">#=ShipmentNumber#</a>'+ template: '<a class="k-link" href="@Url.Action("ShipmentDetails", "Shipment", new { area = area })/#=Id#">#=ShipmentNumber#</a>'}, {field: "OrderNumber",title: "@Loc["Admin.Orders.Shipments.OrderID"]",width: 100,- template: '<a class="k-link" href="@Url.Action("Edit", "Order", new { area = Constants.AreaStore })/#=OrderId#">#=OrderNumber#</a>'+ template: '<a class="k-link" href="@Url.Action("Edit", "Order", new { area = area })/#=OrderId#">#=OrderNumber#</a>'}, {field: "TrackingNumber",title: "@Loc["Admin.Orders.Shipments.TrackingNumber"]",width: 100,- template: '<a class="k-link" href="@Url.Action("ShipmentDetails", "Shipment", new { area = Constants.AreaStore })/#=Id#">#=kendo.htmlEncode(TrackingNumber)#</a>'+ template: '<a class="k-link" href="@Url.Action("ShipmentDetails", "Shipment", new { area = area })/#=Id#">#=kendo.htmlEncode(TrackingNumber)#</a>'}, {field: "TotalWeight",title: "@Loc["Admin.Orders.Shipments.TotalWeight"]",@@ -174,7 +175,7 @@dataSource: {transport: {read: {- url: "@Html.Raw(Url.Action("ShipmentsItemsByShipmentId", "Shipment", new { area = Constants.AreaStore }))?shipmentId="+e.data.Id,+ url: "@Html.Raw(Url.Action("ShipmentsItemsByShipmentId", "Shipment", new { area = area }))?shipmentId="+e.data.Id,type: "POST",dataType: "json",data: addAntiForgeryToken@@ -241,7 +242,7 @@$.ajax({cache: false,type: "GET",- url: "@(Url.Action("GetStatesByCountryId", "Home", new { area = Constants.AreaStore }))",+ url: "@(Url.Action("GetStatesByCountryId", "Home", new { area = area }))",data: { "countryId": selectedItem, "addAsterisk": "true" },success: function (data) {ddlStates.html('');@@ -287,7 +288,7 @@$.ajax({cache: false,type: "POST",- url: "@(Url.Action("SetAsShippedSelected", "Shipment", new { area = Constants.AreaStore }))",+ url: "@(Url.Action("SetAsShippedSelected", "Shipment", new { area = area }))",data: postData,complete: function(data) {var grid = $('#shipments-grid').data('kendoGrid');@@ -312,7 +313,7 @@$.ajax({cache: false,type: "POST",- url: "@(Url.Action("SetAsDeliveredSelected", "Shipment", new { area = Constants.AreaStore }))",+ url: "@(Url.Action("SetAsDeliveredSelected", "Shipment", new { area = area }))",data: postData,complete: function(data) {var grid = $('#shipments-grid').data('kendoGrid');@@ -384,7 +385,7 @@</script></form>-<form asp-area="@Constants.AreaStore" asp-controller="Shipment" asp-action="PdfPackagingSlipSelected" method="post" id="pdf-packaging-slip-selected-form">+<form asp-area="@area" asp-controller="Shipment" asp-action="PdfPackagingSlipSelected" method="post" id="pdf-packaging-slip-selected-form"><input type="hidden" id="selectedIds" name="selectedIds" value=""/></form>@@ -401,4 +402,4 @@});});-</script>\ No newline at end of file+</script>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/Documents.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/Documents.cshtmlsimilarity index 79%rename from src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/Documents.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/Documents.cshtmlindex 3a2255401..9a36db4df 100644--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/Documents.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/Documents.cshtml@@ -1,14 +1,17 @@-@model ShipmentModel+@model ShipmentModel@inject AdminAreaSettings adminAreaSettings+@{+ var area = ViewContext.RouteData.Values["area"]?.ToString();+}<div class="panel panel-default">- <vc:admin-widget widget-zone="order_shipment_details_documents_top" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Documents.Top" model="Model"/><div class="panel-body"><div id="shipment-documents-grid"></div></div><div class="panel-footer">- <button type="button" class="k-button" onclick="location.href='@Url.Action("CreateDocument", "Document", new { ObjectId = Model.Id, Reference = (int)Reference.Shipment, area = Constants.AreaStore })'"><i class="fa fa-plus"></i> @Loc["Admin.Marketing.Document.Add"]</button>+ <button type="button" class="k-button" onclick="location.href='@Url.Action("CreateDocument", "Document", new { ObjectId = Model.Id, Reference = (int)Reference.Shipment, area = area })'"><i class="fa fa-plus"></i> @Loc["Admin.Marketing.Document.Add"]</button></div>- <vc:admin-widget widget-zone="order_shipment_details_documents_bottom" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Documents.Bottom" model="Model"/></div><script>@@ -17,7 +20,7 @@ $(document).ready(function () {dataSource: {transport: {read: {- url: "@Html.Raw(Url.Action("ListDocuments", "Document", new { reference = (int)Reference.Shipment, ObjectId = Model.Id, StatusId = -1, area = Constants.AreaStore }))",+ url: "@Html.Raw(Url.Action("ListDocuments", "Document", new { reference = (int)Reference.Shipment, ObjectId = Model.Id, StatusId = -1, area = area }))",type: "POST",dataType: "json",data: addAntiForgeryToken@@ -53,12 +56,12 @@ $(document).ready(function () {columns: [{field: "Number",title: "@Loc["Admin.Documents.Document.Fields.Number"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaStore })/#=Id#">#=kendo.htmlEncode(Number)#</a>',+ template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = area })/#=Id#">#=kendo.htmlEncode(Number)#</a>',},{field: "Name",title: "@Loc["Admin.Documents.Document.Fields.Name"]",- template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = Constants.AreaStore })/#=Id#">#=kendo.htmlEncode(Name)#</a>',+ template: '<a class="k-link" href="@Url.Action("EditDocument", "Document", new { area = area })/#=Id#">#=kendo.htmlEncode(Name)#</a>',}, {field: "Published",title: "@Loc["Admin.Documents.Document.Fields.Published"]",@@ -70,4 +73,4 @@ $(document).ready(function () {}]});});-</script>\ No newline at end of file+</script>diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/Info.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/Info.cshtmlsimilarity index 97%rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/Info.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/Info.cshtmlindex ba7dcd41f..342b12855 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/Info.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/Info.cshtml@@ -1,4 +1,7 @@-@model ShipmentModel+@model ShipmentModel+@{+ var area = ViewContext.RouteData.Values["area"]?.ToString();+}<div><div class="form-horizontal"><div class="form-body">@@ -6,7 +9,7 @@<admin-label asp-for="OrderId"/><div class="col-md-9 col-sm-9"><label class="control-label">- <a href="@Url.Action("Edit", "Order", new { Id = Model.OrderId, area = Constants.AreaAdmin })">@Model.OrderNumber - @Loc["Admin.Common.View"]</a>+ <a href="@Url.Action("Edit", "Order", new { Id = Model.OrderId, area = area })">@Model.OrderNumber - @Loc["Admin.Common.View"]</a></label></div></div>@@ -140,7 +143,7 @@<td><div style="padding-left: 10px; padding-right: 10px;"><em>- <a href="@Url.Action("Edit", "Product", new { id = item.ProductId, area = Constants.AreaAdmin })">@item.ProductName</a>+ <a href="@Url.Action("Edit", "Product", new { id = item.ProductId, area = area })">@item.ProductName</a></em>@if (!string.IsNullOrEmpty(item.AttributeInfo)){@@ -242,4 +245,4 @@</div></div></div>-}\ No newline at end of file+}diff --git a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/ShipmentNotes.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/ShipmentNotes.cshtmlsimilarity index 92%rename from src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/ShipmentNotes.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/ShipmentNotes.cshtmlindex 0eb0d57a4..3788bf1ef 100644--- a/src/Web/Grand.Web.Admin/Areas/Admin/Views/Shipment/Partials/ShipmentNotes.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/ShipmentNotes.cshtml@@ -1,15 +1,16 @@-@using Grand.Domain.Media+@using Grand.Domain.Media@model ShipmentModel@{ViewData["DownloadType"] = DownloadType.Shipment;ViewData["ReferenceId"] = Model.Id;+ var area = ViewContext.RouteData.Values["area"]?.ToString();}<div class="panel panel-default">- <vc:admin-widget widget-zone="order_shipment_details_notes_top" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Notes.Top" model="Model"/><div class="panel-body"><div id="shipmentnotes-grid"></div></div>- <vc:admin-widget widget-zone="order_shipment_details_notes_bottom" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Notes.Bottom" model="Model"/></div><script>$(document).ready(function () {@@ -17,13 +18,13 @@dataSource: {transport: {read: {- url: "@Html.Raw(Url.Action("ShipmentNotesSelect", "Shipment", new { shipmentId = Model.Id, area = Constants.AreaAdmin }))",+ url: "@Html.Raw(Url.Action("ShipmentNotesSelect", "Shipment", new { shipmentId = Model.Id, area = area }))",type: "POST",dataType: "json",data: addAntiForgeryToken},destroy: {- url: "@Html.Raw(Url.Action("ShipmentNoteDelete", "Shipment", new { shipmentId = Model.Id, area = Constants.AreaAdmin }))",+ url: "@Html.Raw(Url.Action("ShipmentNoteDelete", "Shipment", new { shipmentId = Model.Id, area = area }))",type: "POST",dataType: "json",data: addAntiForgeryToken@@ -78,7 +79,7 @@field: "DownloadId",title: "@Loc["Admin.Orders.Shipments.ShipmentNotes.Download"]",width: 100,- template: '# if(DownloadId != "") {# <a href="@Url.Action("DownloadFile", "Download", new { area = Constants.AreaAdmin })/?downloadGuid=#=DownloadGuid#">@Loc["Admin.Orders.OrderNotes.Fields.Download.Link"]</a> #} else {# @Loc["Admin.Orders.OrderNotes.Fields.Download.Link.No"] #} #'+ template: '# if(DownloadId != "") {# <a href="@Url.Action("DownloadFile", "Download", new { area = area })/?downloadGuid=#=DownloadGuid#">@Loc["Admin.Orders.OrderNotes.Fields.Download.Link"]</a> #} else {# @Loc["Admin.Orders.OrderNotes.Fields.Download.Link.No"] #} #'}, {field: "CreatedByCustomer",title: "@Loc["Admin.Orders.Shipments.ShipmentNotes.CreatedByCustomer"]",@@ -187,7 +188,7 @@$.ajax({cache:false,type: "POST",- url: "@(Url.Action("ShipmentNoteAdd", "Shipment", new { area = Constants.AreaAdmin }))",+ url: "@(Url.Action("ShipmentNoteAdd", "Shipment", new { area = area }))",data: postData,success: function (data) {var grid = $("#shipmentnotes-grid").data('kendoGrid');@@ -201,4 +202,4 @@});});});-</script>\ No newline at end of file+</script>diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.AddButtons.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.AddButtons.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.AddButtons.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.DetailsButtons.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.DetailsButtons.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.DetailsButtons.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.DetailsTabs.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.DetailsTabs.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.DetailsTabs.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Documents.Bottom.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Documents.Bottom.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Documents.Bottom.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Documents.Top.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Documents.Top.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Documents.Top.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.ListButtons.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.ListButtons.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.ListButtons.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Notes.Bottom.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Notes.Top.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Notes.Top.cshtmlnew file mode 100644index 000000000..691131b1a--- /dev/null+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/Partials/WidgetZone.Notes.Top.cshtml@@ -0,0 +1 @@+@* Unreachable in practice: Admin, Store, and Vendor (where applicable) all carry their own real override of this file, which wins by view-location precedence. Kept as the documented fallback for a future host with no widget component of its own - see ARCH-001 Phase 6 spec. *@diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/ShipmentDetails.cshtml b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/ShipmentDetails.cshtmlsimilarity index 91%rename from src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/ShipmentDetails.cshtmlrename to src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/ShipmentDetails.cshtmlindex 67fa15e92..13f0e27b6 100644--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/ShipmentDetails.cshtml+++ b/src/Web/Grand.Web.AdminShared/Views/AdminShared/Shipment/ShipmentDetails.cshtml@@ -1,4 +1,4 @@-@using Grand.Business.Core.Interfaces.Common.Security+@using Grand.Business.Core.Interfaces.Common.Security@using Grand.Domain.Permissions@model ShipmentModel@inject IPermissionService permissionService@@ -6,8 +6,9 @@//page titleViewBag.Title = Loc["Admin.Orders.Shipments.ViewDetails"];var canManageDocuments = await permissionService.Authorize(StandardPermission.ManageDocuments);+ var area = ViewContext.RouteData.Values["area"]?.ToString();}-<form asp-area="@Constants.AreaStore" asp-controller="Shipment" asp-action="ShipmentDetails" method="post">+<form asp-area="@area" asp-controller="Shipment" asp-action="ShipmentDetails" method="post"><input type="hidden" asp-for="Id"/><script>$(document).ready(function () {@@ -64,13 +65,13 @@</div><div class="actions"><div class="btn-group btn-group-devided">- <a href="@Url.Action("PdfPackagingSlip", new { shipmentId = Model.Id, area = Constants.AreaStore })" class="btn purple">+ <a href="@Url.Action("PdfPackagingSlip", new { shipmentId = Model.Id, area = area })" class="btn purple"><i class="fa fa-file-pdf-o"></i> @Loc["Admin.Orders.Shipments.PrintPackagingSlip"]</a><span id="shipment-delete" class="btn red"><i class="fa fa-trash-o"></i> @Loc["Admin.Common.Delete"]</span>- <vc:admin-widget widget-zone="order_shipment_details_buttons" additional-data="Model"/>+ <partial name="Partials/WidgetZone.DetailsButtons" model="Model"/></div></div></div>@@ -113,7 +114,7 @@</div></content></tabstrip-item>- <vc:admin-widget widget-zone="order_shipment_details_tabs" additional-data="Model"/>+ <partial name="Partials/WidgetZone.DetailsTabs" model="Model"/></items></admin-tabstrip></div>@@ -122,4 +123,4 @@</div></div></form>-<admin-delete-confirmation button-id="shipment-delete" action-name="DeleteShipment"/>\ No newline at end of file+<admin-delete-confirmation button-id="shipment-delete" action-name="DeleteShipment"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/AddShipment.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/AddShipment.cshtmldeleted file mode 100644index df73af52b..000000000--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/AddShipment.cshtml+++ /dev/null@@ -1,182 +0,0 @@-@model ShipmentModel-@{- //page title- ViewBag.Title = string.Format(Loc["Admin.Orders.Shipments.AddNew.Title"], Model.OrderId);-}-<form asp-area="@Constants.AreaStore" asp-controller="Shipment" asp-action="AddShipment" method="post"- asp-route-orderId="@HtmlExtensions.HtmlEncodeSafe(Context.Request.Query["orderId"])">-- <div asp-validation-summary="All"></div>- <input type="hidden" asp-for="@Model.OrderId"/>- <div class="col-md-12">- <div class="x_panel light form-fit">- <div class="x_title">- <div class="caption">- <i class="fa fa-truck"></i>- @string.Format(Loc["Admin.Orders.Shipments.AddNew.Title"], Model.OrderNumber)- <small>- <i class="fa fa-arrow-circle-left"></i>- @Html.ActionLink(Loc["Admin.Orders.Shipments.BackToOrder"], "Edit", "Order", new { Id = Model.OrderId })- </small>- </div>- <div class="actions">- <div class="btn-group btn-group-devided">- <button class="btn btn-success" type="submit" id="shipment-save" name="save">- <i class="fa fa-check"></i> @Loc["Admin.Common.Save"]- </button>- <button class="btn btn-success" type="submit" id="shipment-save-continue" name="save-continue">- <i class="fa fa-check-circle"></i> @Loc["Admin.Common.SaveContinue"]- </button>- <vc:admin-widget widget-zone="order_shipment_add_buttons" additional-data="null"/>- </div>- </div>- </div>- <div class="x_content form">- <div class="form-horizontal">- <div class="form-body">- <div class="form-group">- <admin-label asp-for="TrackingNumber"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="TrackingNumber"/>- </div>- </div>- <div class="form-group">- <admin-label asp-for="AdminComment"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="AdminComment"/>- </div>- </div>- </div>- </div>- </div>- </div>- </div>--- <h4>- <strong>@Loc["Admin.Orders.Shipments.Products"]</strong>- </h4>-- <div class="table-responsive visible-xs-block visible-sm-block visible-md-block visible-lg-block">- <table class="table table-bordered table-striped table-hover">- <thead>- <tr>- <th>- @Loc["Admin.Orders.Shipments.Products.ProductName"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.SKU"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.Warehouse"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.ItemWeight"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.ItemDimensions"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.QtyOrdered"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.QtyShipped"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.QtyToShip"]- </th>- </tr>- </thead>- <tbody>- @for (var j = 0; j < Model.Items.Count; j++)- {- var item = Model.Items[j];- <input asp-for="@Model.Items[j].OrderItemId" type="hidden"/>- <tr>- <td>- <div style="padding-left:10px;padding-right:10px;">- <em>- <a href="@Url.Action("Edit", "Product", new { id = item.ProductId, area = Constants.AreaStore })">@item.ProductName</a>- </em>- @if (!string.IsNullOrEmpty(item.AttributeInfo))- {- <p>- @Html.Raw(item.AttributeInfo)- </p>- }- @if (item.ShipSeparately)- {- <p>- <strong>@Loc["Admin.Orders.Shipments.Products.ShipSeparately.Warning"]</strong>- @Loc["Admin.Orders.Shipments.Products.ShipSeparately"]- </p>- }- </div>- </td>- <td>- <div style="padding-left:10px;padding-right:10px;">- @item.Sku- </div>- </td>- <td>- <div>- @if (item.AllowToChooseWarehouse)- {- if (item.AvailableWarehouses.Count > 0)- {- <select asp-for="@Model.Items[j].WarehouseId">- @foreach (var warehouse in item.AvailableWarehouses)- {- var selected = warehouse.WarehouseId == item.WarehouseId;- <option value="@(warehouse.WarehouseId)" data-stock-qty="@(warehouse.StockQuantity)"- data-reserved-qty="@(warehouse.ReservedQuantity)"- selected="@selected">- @Loc["Admin.Orders.Shipments.Products.Warehouse.ChooseQty", warehouse.WarehouseName, warehouse.StockQuantity, warehouse.ReservedQuantity]- </option>- }- </select>- }- else- {- <div>@Loc["Admin.Orders.Shipments.Products.Warehouse.NotAvailabe"]</div>- }- }- else- {- //display warehouses- for (var i = 0; i < item.AvailableWarehouses.Count; i++)- {- var warehouse = item.AvailableWarehouses[i];- @warehouse.WarehouseName- if (i != item.AvailableWarehouses.Count - 1)- {- <br/>- }- }- }- </div>- </td>- <td>- @item.ItemWeight- </td>- <td>- @item.ItemDimensions- </td>- <td>- @item.QuantityOrdered- </td>- <td>- @item.QuantityInAllShipments- </td>- <td>- <input asp-for="@Model.Items[j].QuantityToAdd" type="number" value="@item.QuantityToAdd"- class="form-control" style="width:100px;" max="@item.QuantityToAdd"/>- </td>- </tr>- }- </tbody>- </table>- </div>---</form>\ No newline at end of filediff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/Info.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/Info.cshtmldeleted file mode 100644index 624d85621..000000000--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/Info.cshtml+++ /dev/null@@ -1,245 +0,0 @@-@model ShipmentModel-<div>- <div class="form-horizontal">- <div class="form-body">- <div class="form-group">- <admin-label asp-for="OrderId"/>- <div class="col-md-9 col-sm-9">- <label class="control-label">- <a href="@Url.Action("Edit", "Order", new { Id = Model.OrderId, area = Constants.AreaStore })">@Model.OrderNumber - @Loc["Admin.Common.View"]</a>- </label>- </div>- </div>- <div class="form-group">- <admin-label asp-for="TrackingNumber"/>- <div class="col-md-6">- <div class="input-group">- <div class="input-group-control">- <admin-input asp-for="TrackingNumber"/>- </div>- <div class="input-group-append">- <input type="submit" name="settrackingnumber" asp-action="SetTrackingNumber" value="@Loc["Admin.Orders.Shipments.TrackingNumber.Button"]" class="btn default"/>- @if (!string.IsNullOrEmpty(Model.TrackingNumberUrl))- {- <a href="@Model.TrackingNumberUrl" target="_blank" class="tracking-url">@Loc["Admin.Orders.Shipments.TrackingNumber.ViewOnline"]</a>- }- </div>- </div>- </div>- </div>- <div class="form-group">- <admin-label asp-for="AdminComment"/>- <div class="col-md-6">- <div class="input-group">- <div class="input-group-control">- <admin-input asp-for="AdminComment"/>- </div>- <div class="input-group-append">- <input type="submit" name="setadmincomment" asp-action="SetShipmentAdminComment" value="@Loc["Admin.Orders.Shipments.AdminComment.Button"]" class="btn default"/>- </div>- </div>- </div>- </div>- <div class="form-group">- <admin-label asp-for="TotalWeight"/>- <div class="col-md-9 col-sm-9">- <label class="control-label">@Model.TotalWeight</label>- </div>- </div>- <div class="form-group">- <admin-label asp-for="ShippedDate"/>- <div class="col-md-9 col-sm-9">- <span id="lblShippedDate">- @if (Model.ShippedDate.HasValue)- {- @Model.ShippedDate.Value.ToString(CultureInfo.InvariantCulture)- }- else- {- <text>@Loc["Admin.Orders.Shipments.ShippedDate.NotYet"]</text>- }- </span>- @if (Model.CanShip)- {- <input type="submit" name="setasshipped" asp-action="SetAsShipped" value="@Loc["Admin.Orders.Shipments.ShippedDate.Button"]" id="setasshipped" class="btn default"/>- }- @if (Model.ShippedDateUtc.HasValue)- {- <div id="divShippedDate" style="display: inline-block;"><admin-input asp-for="ShippedDate"/> @Loc["Admin.Orders.Shipments.ShippedDate.Enter"]</div>- <button type="submit" id="btnEditShippedDate" onclick=" toggleShippedDate(true);return false; " class="k-button"><span class="k-icon k-i-edit"></span> @Loc["Admin.Common.Edit"]</button>- <button type="submit" id="btnSaveShippedDate" asp-action="EditShippedDate" name="saveshippeddate" onclick=" return confirm('@Loc["Admin.Common.AreYouSure"]'); " class="k-button"><span class="k-icon k-i-save"></span> @Loc["Admin.Common.Save"]</button>- <button type="submit" id="btnCancelShippedDate" onclick=" toggleShippedDate(false);return false; " class="k-button"><span class="k-icon k-i-cancel"></span> @Loc["Admin.Common.Cancel"]</button>- }- </div>- </div>- <div class="form-group">- <admin-label asp-for="DeliveryDate"/>- <div class="col-md-9 col-sm-9">- <span id="lblDeliveryDate">- @if (Model.DeliveryDate.HasValue)- {- @Model.DeliveryDate.Value.ToString(CultureInfo.InvariantCulture)- }- else- {- <text>@Loc["Admin.Orders.Shipments.DeliveryDate.NotYet"]</text>- }- </span>- @if (Model.CanDeliver)- {- <input type="submit" name="setasdelivered" asp-action="SetAsDelivered" value="@Loc["Admin.Orders.Shipments.DeliveryDate.Button"]" id="setasdelivered" class="btn default"/>- }- @if (Model.DeliveryDateUtc.HasValue)- {- <div id="divDeliveryDate" style="display: inline-block;"><admin-input asp-for="DeliveryDate"/> @Loc["Admin.Orders.Shipments.DeliveryDate.Enter"]</div>- <button type="submit" id="btnEditDeliveryDate" onclick=" toggleDeliveryDate(true);return false; " class="k-button"><span class="k-icon k-i-edit"></span> @Loc["Admin.Common.Edit"]</button>- <button type="submit" id="btnSaveDeliveryDate" asp-action="EditDeliveryDate" name="savedeliverydate" onclick=" return confirm('@Loc["Admin.Common.AreYouSure"]'); " class="k-button"><span class="k-icon k-i-save"></span> @Loc["Admin.Common.Save"]</button>- <button type="submit" id="btnCancelDeliveryDate" onclick=" toggleDeliveryDate(false);return false; " class="k-button"><span class="k-icon k-i-cancel"></span> @Loc["Admin.Common.Cancel"]</button>- }- </div>- </div>- </div>- </div>-</div>--<table class="table table-striped table-hover">- <tr>- <td>- <strong>@Loc["Admin.Orders.Shipments.Products"]</strong>- </td>- </tr>- <tr>- <td>- <table class="table table-bordered table-striped table-hover">- <thead>- <tr>- <th>- @Loc["Admin.Orders.Shipments.Products.ProductName"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.SKU"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.Warehouse"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.ItemWeight"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.ItemDimensions"]- </th>- <th>- @Loc["Admin.Orders.Shipments.Products.QtyShipped"]- </th>- </tr>- </thead>- <tbody>- @foreach (var item in Model.Items)- {- <tr>- <td>- <div style="padding-left: 10px; padding-right: 10px;">- <em>- <a href="@Url.Action("Edit", "Product", new { id = item.ProductId, area = Constants.AreaStore })">@item.ProductName</a>- </em>- @if (!string.IsNullOrEmpty(item.AttributeInfo))- {- <p>- @Html.Raw(item.AttributeInfo)- </p>- }- @if (!string.IsNullOrEmpty(item.RentalInfo))- {- <p>- @Html.Raw(item.RentalInfo)- </p>- }- </div>- </td>- <td>- <div style="padding-left: 10px; padding-right: 10px;">- @item.Sku- </div>- </td>- <td>- <div style="padding-left: 10px; padding-right: 10px;">- @item.ShippedFromWarehouse- </div>- </td>- <td>- @item.ItemWeight- </td>- <td>- @item.ItemDimensions- </td>- <td>- @item.QuantityInThisShipment- </td>- </tr>- }- </tbody>- </table>- </td>- </tr>-</table>--@if (Model.ShipmentStatusEvents.Count > 0)-{- <div class="form-horizontal">- <div class="note note-info">- @Loc["Admin.Orders.Shipments.ShipmentStatusEvents"]- </div>- <div class="form-body">- <div class="form-group">- <table class="table table-bordered table-striped table-hover">- <thead>- <tr>- <th align="center">- @Loc["Admin.Orders.Shipments.ShipmentStatusEvents.Event"]- </th>- <th align="center">- @Loc["Admin.Orders.Shipments.ShipmentStatusEvents.Location"]- </th>- <th align="center">- @Loc["Admin.Orders.Shipments.ShipmentStatusEvents.Country"]- </th>- <th align="center">- @Loc["Admin.Orders.Shipments.ShipmentStatusEvents.Date"]- </th>- </tr>- </thead>- <tbody>- @foreach (var item in Model.ShipmentStatusEvents)- {- <tr>- <td style="width:40%;">- <div style="padding-left: 10px; padding-right: 10px;">- @item.EventName- </div>- </td>- <td style="width:20%;">- <div style="padding-left: 10px; padding-right: 10px;">- @item.Location- </div>- </td>- <td style="width:20%;">- <div style="padding-left: 10px; padding-right: 10px;">- @item.Country- </div>- </td>- <td style="width:20%;">- <div style="padding-left: 10px; padding-right: 10px;">- @if (item.Date.HasValue)- {- @item.Date.Value.ToString("D")- }- </div>- </td>- </tr>- }- </tbody>- </table>- </div>- </div>- </div>-}\ No newline at end of filediff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/ShipmentNotes.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/ShipmentNotes.cshtmldeleted file mode 100644index e3860d968..000000000--- a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/ShipmentNotes.cshtml+++ /dev/null@@ -1,204 +0,0 @@-@using Grand.Domain.Media-@model ShipmentModel-@{- ViewData["DownloadType"] = DownloadType.Shipment;- ViewData["ReferenceId"] = Model.Id;-}-<div class="panel panel-default">- <vc:admin-widget widget-zone="order_shipment_details_notes_top" additional-data="Model"/>- <div class="panel-body">- <div id="shipmentnotes-grid"></div>- </div>- <vc:admin-widget widget-zone="order_shipment_details_notes_bottom" additional-data="Model"/>-</div>-<script>- $(document).ready(function () {- $("#shipmentnotes-grid").kendoGrid({- dataSource: {- transport: {- read: {- url: "@Html.Raw(Url.Action("ShipmentNotesSelect", "Shipment", new { shipmentId = Model.Id, area = Constants.AreaStore }))",- type: "POST",- dataType: "json",- data: addAntiForgeryToken- },- destroy: {- url: "@Html.Raw(Url.Action("ShipmentNoteDelete", "Shipment", new { shipmentId = Model.Id, area = Constants.AreaStore }))",- type: "POST",- dataType: "json",- data: addAntiForgeryToken- }- },- schema: {- data: "Data",- total: "Total",- errors: "Errors",- model: {- id: "Id",- fields: {- //do not implicitly specify all fields- //we do it only for fields which implicitly require it- //otherwise, they'll be formatted wrong way- CreatedOn: {type: "date" }- }- }- },- error: function(e) {- display_kendoui_grid_error(e);- // Cancel the changes- this.cancelChanges();- },- serverPaging: true,- serverFiltering: true,- serverSorting: true- },- pageable: {- refresh: true,- numeric: false,- previousNext: false,- info: false- },- editable: {- confirmation: false,- mode: "inline"- },- scrollable: false,- columns: [{- field: "CreatedOn",- title: "@Loc["Admin.Orders.Shipments.ShipmentNotes.CreatedOn"]",- width: 180,- type: "date",- format: "{0:G}"- }, {- field: "Note",- title: "@Loc["Admin.Orders.Shipments.ShipmentNotes.Note"]",- width: 350,- encoded: false- }, {- field: "DownloadId",- title: "@Loc["Admin.Orders.Shipments.ShipmentNotes.Download"]",- width: 100,- template: '# if(DownloadId != "") {# <a href="@Url.Action("DownloadFile", "Download", new { area = Constants.AreaStore })/?downloadGuid=#=DownloadGuid#">@Loc["Admin.Orders.OrderNotes.Fields.Download.Link"]</a> #} else {# @Loc["Admin.Orders.OrderNotes.Fields.Download.Link.No"] #} #'- }, {- field: "CreatedByCustomer",- title: "@Loc["Admin.Orders.Shipments.ShipmentNotes.CreatedByCustomer"]",- width: 100,- headerAttributes: { style: "text-align:center" },- attributes: { style: "text-align:center" },- template: '# if(CreatedByCustomer) {# <i class="fa fa-check" aria-hidden="true" style="color:green"></i> #} else {# <i class="fa fa-times" aria-hidden="true" style="color:red"></i> #} #'- }, {- field: "DisplayToCustomer",- title: "@Loc["Admin.Orders.Shipments.ShipmentNotes.Fields.DisplayToCustomer"]",- width: 100,- headerAttributes: { style: "text-align:center" },- attributes: { style: "text-align:center" },- template: '# if(DisplayToCustomer) {# <i class="fa fa-check" aria-hidden="true" style="color:green"></i> #} else {# <i class="fa fa-times" aria-hidden="true" style="color:red"></i> #} #'- }, {- command: { name: "destroy", text: "@Loc["Admin.Common.Delete"]" },- title: "@Loc["Admin.Common.Delete"]",- width: 100- }]- });- });-</script>-<p>- <strong>- @Loc["Admin.Orders.Shipments.ShipmentNotes.AddTitle"]- </strong>-</p>-<script>- $(document).ready(function () {- $("#@Html.IdFor(model => model.AddShipmentNoteHasDownload)").change(toggleAddShipmentNoteHasDownload);- toggleAddShipmentNoteHasDownload();- });- function toggleAddShipmentNoteHasDownload() {- if ($('#@Html.IdFor(model => model.AddShipmentNoteHasDownload)').is(':checked')) {- $('#pnlAddShipmentNoteDownloadId').show();- }- else {- $('#pnlAddShipmentNoteDownloadId').hide();- }- }--</script>--<div class="form-horizontal">- <div class="form-body">- <div class="form-group">- <admin-label asp-for="AddShipmentNoteMessage"/>- <div class="col-md-9 col-sm-9">- <admin-textarea asp-for="AddShipmentNoteMessage"></admin-textarea>- <span asp-validation-for="AddShipmentNoteMessage"></span>- </div>- </div>- <div class="form-group">- <admin-label asp-for="AddShipmentNoteDownloadId"/>- <div class="col-md-9 col-sm-9">- <label class="mt-checkbox mt-checkbox-outline control control-checkbox">- <admin-input asp-for="AddShipmentNoteHasDownload"/>- <div class="control__indicator"></div>- </label>- <div id="pnlAddShipmentNoteDownloadId">- <admin-input asp-for="AddShipmentNoteDownloadId"/>- <span asp-validation-for="AddShipmentNoteDownloadId"></span>- </div>- </div>- </div>- <div class="form-group">- <admin-label asp-for="AddShipmentNoteDisplayToCustomer"/>- <div class="col-md-9 col-sm-9">- <label class="mt-checkbox mt-checkbox-outline control control-checkbox">- <admin-input asp-for="AddShipmentNoteDisplayToCustomer"/>- <div class="control__indicator"></div>- </label>- <span asp-validation-for="AddShipmentNoteDisplayToCustomer"></span>- </div>- </div>- <div class="form-actions">- <div class="offset-md-3 col-md-9 col-sm-9">- <button type="button" id="addShipmentNote" class="k-button"><i class="fa fa-plus"></i> @Loc["Admin.Orders.Shipments.ShipmentNotes.AddButton"]</button>- </div>- </div>- </div>-</div>--<script>- $(document).ready(function () {- $('#addShipmentNote').click(function () {- var shipmentNoteMessage = $("#@Html.IdFor(model => model.AddShipmentNoteMessage)").val();- if (shipmentNoteMessage.length == 0) {- alert('Message text is required');- return;- }- var shipmentNoteDownloadId = '';- if ($('#@Html.IdFor(model => model.AddShipmentNoteHasDownload)').is(':checked')) {- shipmentNoteDownloadId = $("#@Html.IdFor(model => model.AddShipmentNoteDownloadId)").val();- }- var shipmentNoteDisplayToCustomer = $("#@Html.IdFor(model => model.AddShipmentNoteDisplayToCustomer)").is(':checked');- $('#addShipmentNote').attr('disabled', true);- var postData = {- DisplayToCustomer: shipmentNoteDisplayToCustomer,- message: shipmentNoteMessage,- downloadId: shipmentNoteDownloadId,- shipmentId: '@Model.Id'- };- addAntiForgeryToken(postData);-- $.ajax({- cache:false,- type: "POST",- url: "@(Url.Action("ShipmentNoteAdd", "Shipment", new { area = Constants.AreaStore }))",- data: postData,- success: function (data) {- var grid = $("#shipmentnotes-grid").data('kendoGrid');- grid.dataSource.read();- $('#addShipmentNote').attr('disabled', false);- },- error:function (xhr, ajaxOptions, thrownError){- alert('Failed to add shipment note.');- $('#addShipmentNote').attr('disabled', false);- }- });- });- });-</script>\ No newline at end of filediff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.AddButtons.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.AddButtons.cshtmlnew file mode 100644index 000000000..cedcdc6c1--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.AddButtons.cshtml@@ -0,0 +1 @@+<vc:store-widget widget-zone="store_order_shipment_add_buttons" additional-data="null"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtmlnew file mode 100644index 000000000..25940a822--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:store-widget widget-zone="store_order_shipment_details_buttons" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtmlnew file mode 100644index 000000000..37276fbad--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:store-widget widget-zone="store_order_shipment_details_tabs" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Documents.Bottom.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Documents.Bottom.cshtmlnew file mode 100644index 000000000..feab39f96--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Documents.Bottom.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:store-widget widget-zone="store_order_shipment_details_documents_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Documents.Top.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Documents.Top.cshtmlnew file mode 100644index 000000000..d70a24d3b--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Documents.Top.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:store-widget widget-zone="store_order_shipment_details_documents_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.ListButtons.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.ListButtons.cshtmlnew file mode 100644index 000000000..6837cee21--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.ListButtons.cshtml@@ -0,0 +1 @@+<vc:store-widget widget-zone="store_order_shipment_list_buttons" additional-data="null"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtmlnew file mode 100644index 000000000..d11bb8837--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:store-widget widget-zone="store_order_shipment_details_notes_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtml b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtmlnew file mode 100644index 000000000..8cc575437--- /dev/null+++ b/src/Web/Grand.Web.Store/Areas/Store/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:store-widget widget-zone="store_order_shipment_details_notes_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/AddShipment.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/AddShipment.cshtmldeleted file mode 100644index 9f9c1bf91..000000000--- a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/AddShipment.cshtml+++ /dev/null@@ -1,182 +0,0 @@-@model ShipmentModel-@{- //page title- ViewBag.Title = string.Format(Loc["Vendor.Orders.Shipments.AddNew.Title"], Model.OrderId);-}-<form asp-area="@Constants.AreaVendor" asp-controller="Shipment" asp-action="AddShipment" method="post"- asp-route-orderId="@HtmlExtensions.HtmlEncodeSafe(Context.Request.Query["orderId"])">-- <div asp-validation-summary="All"></div>- <input type="hidden" asp-for="@Model.OrderId"/>- <div class="col-md-12">- <div class="x_panel light form-fit">- <div class="x_title">- <div class="caption">- <i class="fa fa-truck"></i>- @string.Format(Loc["Vendor.Orders.Shipments.AddNew.Title"], Model.OrderNumber)- <small>- <i class="fa fa-arrow-circle-left"></i>- @Html.ActionLink(Loc["Vendor.Orders.Shipments.BackToOrder"], "Edit", "Order", new { Id = Model.OrderId })- </small>- </div>- <div class="actions">- <div class="btn-group btn-group-devided">- <button class="btn btn-success" type="submit" id="shipment-save" name="save">- <i class="fa fa-check"></i> @Loc["Vendor.Common.Save"]- </button>- <button class="btn btn-success" type="submit" id="shipment-save-continue" name="save-continue">- <i class="fa fa-check-circle"></i> @Loc["Vendor.Common.SaveContinue"]- </button>- <vc:vendor-widget widget-zone="vendor_order_shipment_add_buttons" additional-data="null"/>- </div>- </div>- </div>- <div class="x_content form">- <div class="form-horizontal">- <div class="form-body">- <div class="form-group">- <admin-label asp-for="TrackingNumber"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="TrackingNumber"/>- </div>- </div>- <div class="form-group">- <admin-label asp-for="AdminComment"/>- <div class="col-md-9 col-sm-9">- <admin-input asp-for="AdminComment"/>- </div>- </div>- </div>- </div>- </div>- </div>- </div>--- <h4>- <strong>@Loc["Vendor.Orders.Shipments.Products"]</strong>- </h4>-- <div class="table-responsive visible-xs-block visible-sm-block visible-md-block visible-lg-block">- <table class="table table-bordered table-striped table-hover">- <thead>- <tr>- <th>- @Loc["Vendor.Orders.Shipments.Products.ProductName"]- </th>- <th>- @Loc["Vendor.Orders.Shipments.Products.SKU"]- </th>- <th>- @Loc["Vendor.Orders.Shipments.Products.Warehouse"]- </th>- <th>- @Loc["Vendor.Orders.Shipments.Products.ItemWeight"]- </th>- <th>- @Loc["Vendor.Orders.Shipments.Products.ItemDimensions"]- </th>- <th>- @Loc["Vendor.Orders.Shipments.Products.QtyOrdered"]- </th>- <th>- @Loc["Vendor.Orders.Shipments.Products.QtyShipped"]- </th>- <th>- @Loc["Vendor.Orders.Shipments.Products.QtyToShip"]- </th>- </tr>- </thead>- <tbody>- @for (var j = 0; j < Model.Items.Count; j++)- {- var item = Model.Items[j];- <input asp-for="@Model.Items[j].OrderItemId" type="hidden"/>- <tr>- <td>- <div style="padding-left:10px;padding-right:10px;">- <em>- <a href="@Url.Action("Edit", "Product", new { id = item.ProductId, area = Constants.AreaVendor })">@item.ProductName</a>- </em>- @if (!string.IsNullOrEmpty(item.AttributeInfo))- {- <p>- @Html.Raw(item.AttributeInfo)- </p>- }- @if (item.ShipSeparately)- {- <p>- <strong>@Loc["Vendor.Orders.Shipments.Products.ShipSeparately.Warning"]</strong>- @Loc["Vendor.Orders.Shipments.Products.ShipSeparately"]- </p>- }- </div>- </td>- <td>- <div style="padding-left:10px;padding-right:10px;">- @item.Sku- </div>- </td>- <td>- <div>- @if (item.AllowToChooseWarehouse)- {- if (item.AvailableWarehouses.Count > 0)- {- <select asp-for="@Model.Items[j].WarehouseId">- @foreach (var warehouse in item.AvailableWarehouses)- {- var selected = warehouse.WarehouseId == item.WarehouseId;- <option value="@(warehouse.WarehouseId)" data-stock-qty="@(warehouse.StockQuantity)"- data-reserved-qty="@(warehouse.ReservedQuantity)"- selected="@selected">- @Loc["Vendor.Orders.Shipments.Products.Warehouse.ChooseQty", warehouse.WarehouseName, warehouse.StockQuantity, warehouse.ReservedQuantity]- </option>- }- </select>- }- else- {- <div>@Loc["Vendor.Orders.Shipments.Products.Warehouse.NotAvailable"]</div>- }- }- else- {- //display warehouses- for (var i = 0; i < item.AvailableWarehouses.Count; i++)- {- var warehouse = item.AvailableWarehouses[i];- @warehouse.WarehouseName- if (i != item.AvailableWarehouses.Count - 1)- {- <br/>- }- }- }- </div>- </td>- <td>- @item.ItemWeight- </td>- <td>- @item.ItemDimensions- </td>- <td>- @item.QuantityOrdered- </td>- <td>- @item.QuantityInAllShipments- </td>- <td>- <input asp-for="@Model.Items[j].QuantityToAdd" type="number" value="@item.QuantityToAdd"- class="form-control" style="width:100px;" max="@item.QuantityToAdd"/>- </td>- </tr>- }- </tbody>- </table>- </div>---</form>\ No newline at end of filediff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/List.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/List.cshtmlindex 1ab7a552d..509fc682b 100644--- a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/List.cshtml+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/List.cshtml@@ -30,7 +30,7 @@<button class="btn btn-success" type="submit" id="deliver-selected"><i class="fa fa-check-circle"></i> @Loc["Vendor.Orders.Shipments.DeliverySelected"]</button>- <vc:vendor-widget widget-zone="vendor_order_shipment_list_buttons" additional-data="null"/>+ <partial name="Partials/WidgetZone.ListButtons" model="Model"/></div></div></div>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/ShipmentNotes.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/ShipmentNotes.cshtmlindex 267595e1e..e365dfd6d 100644--- a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/ShipmentNotes.cshtml+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/ShipmentNotes.cshtml@@ -1,11 +1,11 @@@model ShipmentModel<div class="panel panel-default">- <vc:vendor-widget widget-zone="vendor_order_shipment_details_notes_top" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Notes.Top" model="Model"/><div class="panel-body"><div id="shipmentnotes-grid"></div></div>- <vc:vendor-widget widget-zone="vendor_order_shipment_details_notes_bottom" additional-data="Model"/>+ <partial name="Partials/WidgetZone.Notes.Bottom" model="Model"/></div><script>$(document).ready(function () {diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.AddButtons.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.AddButtons.cshtmlnew file mode 100644index 000000000..c8e32831e--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.AddButtons.cshtml@@ -0,0 +1 @@+<vc:vendor-widget widget-zone="vendor_order_shipment_add_buttons" additional-data="null"/>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtmlnew file mode 100644index 000000000..2bd14fd4f--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.DetailsButtons.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:vendor-widget widget-zone="vendor_order_shipment_details_buttons" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtmlnew file mode 100644index 000000000..ee1ed9e90--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.DetailsTabs.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:vendor-widget widget-zone="vendor_order_shipment_details_tabs" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.ListButtons.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.ListButtons.cshtmlnew file mode 100644index 000000000..ff7f7d470--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.ListButtons.cshtml@@ -0,0 +1 @@+<vc:vendor-widget widget-zone="vendor_order_shipment_list_buttons" additional-data="null"/>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtmlnew file mode 100644index 000000000..96f07ec31--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.Notes.Bottom.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:vendor-widget widget-zone="vendor_order_shipment_details_notes_bottom" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtmlnew file mode 100644index 000000000..f4291b45f--- /dev/null+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/Partials/WidgetZone.Notes.Top.cshtml@@ -0,0 +1,2 @@+@model ShipmentModel+<vc:vendor-widget widget-zone="vendor_order_shipment_details_notes_top" additional-data="Model"/>diff --git a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/ShipmentDetails.cshtml b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/ShipmentDetails.cshtmlindex 2ff0753d9..d536881f2 100644--- a/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/ShipmentDetails.cshtml+++ b/src/Web/Grand.Web.Vendor/Areas/Vendor/Views/Shipment/ShipmentDetails.cshtml@@ -66,7 +66,7 @@<span id="shipment-delete" class="btn red"><i class="fa fa-trash-o"></i> @Loc["Vendor.Common.Delete"]</span>- <vc:vendor-widget widget-zone="vendor_order_shipment_details_buttons" additional-data="Model"/>+ <partial name="Partials/WidgetZone.DetailsButtons" model="Model"/></div></div></div>@@ -87,7 +87,7 @@</div></content></tabstrip-item>- <vc:vendor-widget widget-zone="vendor_order_shipment_details_tabs" additional-data="Model"/>+ <partial name="Partials/WidgetZone.DetailsTabs" model="Model"/></items></admin-tabstrip></div>