@if (!string.IsNullOrEmpty(Model.BillingAddress.FormattedCustomAddressAttributes))
{
}
@if (!Model.IsLoggedInAsVendor)
{
}
@if (Model.IsShippable)
{
if (!Model.PickupInStore && Model.ShippingAddress != null)
{
@await Component.InvokeAsync(typeof(WidgetViewComponent), new { widgetZone = AdminWidgetZones.OrderShippingAddressDetailsBottom, additionalData = Model })
@if (!string.IsNullOrEmpty(Model.ShippingAddress.FormattedCustomAddressAttributes))
{
}
}
if (Model.PickupInStore && Model.PickupAddress != null)
{
@if (!string.IsNullOrEmpty(Model.PickupAddress.Address1))
{
}
@if (!string.IsNullOrEmpty(Model.PickupAddress.City))
{
}
@if (!string.IsNullOrEmpty(Model.PickupAddress.County))
{
}
@if (!string.IsNullOrEmpty(Model.PickupAddress.CountryName))
{
}
@if (!string.IsNullOrEmpty(Model.PickupAddress.ZipPostalCode))
{
}
}
}
else
{
}
@if (Model.IsShippable)
{
@if (!Model.IsLoggedInAsVendor)
{
}
@await Html.PartialAsync("Table", new DataTablesModel
{
Name = "shipments-grid",
UrlRead = new DataUrl("ShipmentsByOrder", "Order", new RouteValueDictionary { [nameof(OrderShipmentSearchModel.OrderId)] = Model.Id }),
PrimaryKeyColumn = nameof(ShipmentModel.Id),
Length = Model.OrderShipmentSearchModel.PageSize,
LengthMenu = Model.OrderShipmentSearchModel.AvailablePageSizes,
ColumnCollection = new List
{
new ColumnProperty(null)
{
Render = new RenderChildCaret(),
Width = "5",
Searchable = false,
ClassName = NopColumnClassDefaults.ChildControl
},
new ColumnProperty(nameof(ShipmentModel.Id))
{
Title = T("Admin.Orders.Shipments.ID").Text,
Width = "50"
},
new ColumnProperty(nameof(ShipmentModel.CustomOrderNumber))
{
Title = T("Admin.Orders.Shipments.CustomOrderNumber").Text,
Width = "100"
},
new ColumnProperty(nameof(ShipmentModel.TrackingNumber))
{
Title = T("Admin.Orders.Shipments.TrackingNumber").Text,
Width = "100"
},
new ColumnProperty(nameof(ShipmentModel.TotalWeight))
{
Title = T("Admin.Orders.Shipments.TotalWeight").Text,
Width = "100"
},
(Model.PickupInStore ?
new ColumnProperty(nameof(ShipmentModel.ReadyForPickupDate))
{
Title = T("Admin.Orders.Shipments.ReadyForPickupDate").Text,
Width = "100"
} :
new ColumnProperty(nameof(ShipmentModel.ShippedDate))
{
Title = T("Admin.Orders.Shipments.ShippedDate").Text,
Width = "100"
}),
new ColumnProperty(nameof(ShipmentModel.DeliveryDate))
{
Title = T("Admin.Orders.Shipments.DeliveryDate").Text,
Width = "100"
},
new ColumnProperty(nameof(ShipmentModel.Id))
{
Title = T("Admin.Common.View").Text,
Width = "50",
Render = new RenderButtonView(new DataUrl("~/Admin/Order/ShipmentDetails/"))
}
},
ChildTable = new DataTablesModel
{
Name = "shipment-items-grid",
UrlRead = new DataUrl("ShipmentsItemsByShipmentId", "Order", null),
IsChildTable = true,
Length = Model.OrderShipmentSearchModel.PageSize,
LengthMenu = Model.OrderShipmentSearchModel.AvailablePageSizes,
Filters = new List
{
new FilterParameter(nameof(ShipmentItemSearchModel.ShipmentId), nameof(ShipmentModel.Id), true)
},
ColumnCollection = new List
{
new ColumnProperty(nameof(ShipmentItemModel.ProductName))
{
Title = T("Admin.Orders.Shipments.Products.ProductName").Text,
Width = "400"
},
new ColumnProperty(nameof(ShipmentItemModel.ShippedFromWarehouse))
{
Title = T("Admin.Orders.Shipments.Products.Warehouse").Text,
Width = "150"
},
new ColumnProperty(nameof(ShipmentItemModel.QuantityInThisShipment))
{
Title = T("Admin.Orders.Shipments.Products.QtyShipped").Text,
Width = "150"
},
new ColumnProperty(nameof(ShipmentItemModel.ItemWeight))
{
Title = T("Admin.Orders.Shipments.Products.ItemWeight").Text,
Width = "150"
},
new ColumnProperty(nameof(ShipmentItemModel.ItemDimensions))
{
Title = T("Admin.Orders.Shipments.Products.ItemDimensions").Text,
Width = "150"
}
}
}
})
@if (Model.CanAddNewShipments)
{
}
}