From 05f69039cbe00c1c09024ed7853cfa6bb4e5a052 Mon Sep 17 00:00:00 2001 From: Thomas Ryan Date: Thu, 10 Feb 2022 21:10:40 -0800 Subject: [PATCH] Continued work in support of #260. --- .../Controllers/ProductItemsController.cs | 4 ++-- NumberSearch.Ops/PostgreSQL/ProductItem.cs | 2 ++ .../PostgreSQL/numberSearchContext.cs | 4 ++++ NumberSearch.Ops/Views/Orders/OrderEdit.cshtml | 4 ++++ .../Views/ProductItems/Create.cshtml | 18 ++++++++++++++---- .../Views/ProductItems/Delete.cshtml | 12 ++++++++++++ .../Views/ProductItems/Details.cshtml | 12 ++++++++++++ .../Views/ProductItems/Edit.cshtml | 10 ++++++++++ .../Views/ProductItems/Index.cshtml | 8 ++++++++ 9 files changed, 68 insertions(+), 6 deletions(-) diff --git a/NumberSearch.Ops/Controllers/ProductItemsController.cs b/NumberSearch.Ops/Controllers/ProductItemsController.cs index 4033eea7..30336725 100644 --- a/NumberSearch.Ops/Controllers/ProductItemsController.cs +++ b/NumberSearch.Ops/Controllers/ProductItemsController.cs @@ -99,7 +99,7 @@ public async Task Create(Guid? shipmentId) [Authorize] [HttpPost("ProductItems")] [ValidateAntiForgeryToken] - public async Task Create([Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,DateCreated,DateUpdated")] ProductItem productItem) + public async Task Create([Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,ExternalOrderId,ShipmentTrackingLink,DateCreated,DateUpdated")] ProductItem productItem) { if (ModelState.IsValid) { @@ -135,7 +135,7 @@ public async Task Edit(Guid? id) [Authorize] [HttpPost("ProductItems/Edit/{id}")] [ValidateAntiForgeryToken] - public async Task Edit(Guid id, [Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,DateCreated,DateUpdated")] ProductItem productItem) + public async Task Edit(Guid id, [Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,ExternalOrderId,ShipmentTrackingLink,DateCreated,DateUpdated")] ProductItem productItem) { if (id != productItem.ProductItemId) { diff --git a/NumberSearch.Ops/PostgreSQL/ProductItem.cs b/NumberSearch.Ops/PostgreSQL/ProductItem.cs index 427dac75..f31ac84f 100644 --- a/NumberSearch.Ops/PostgreSQL/ProductItem.cs +++ b/NumberSearch.Ops/PostgreSQL/ProductItem.cs @@ -11,6 +11,8 @@ public class ProductItem public string SerialNumber { get; set; } public string MACAddress { get; set; } public string Condition { get; set; } + public string ExternalOrderId { get; set; } + public string ShipmentTrackingLink { get; set; } public DateTime DateCreated { get; set; } public DateTime DateUpdated { get; set; } } diff --git a/NumberSearch.Ops/PostgreSQL/numberSearchContext.cs b/NumberSearch.Ops/PostgreSQL/numberSearchContext.cs index 1e26406e..5131cb7e 100644 --- a/NumberSearch.Ops/PostgreSQL/numberSearchContext.cs +++ b/NumberSearch.Ops/PostgreSQL/numberSearchContext.cs @@ -691,6 +691,10 @@ protected override void OnModelCreating(ModelBuilder modelBuilder) entity.Property(e => e.MACAddress).HasColumnType("character varying"); entity.Property(e => e.Condition).HasColumnType("character varying"); + + entity.Property(e => e.ExternalOrderId).HasColumnType("character varying"); + + entity.Property(e => e.ShipmentTrackingLink).HasColumnType("character varying"); entity.Property(e => e.DateCreated) .HasColumnType("timestamp without time zone") diff --git a/NumberSearch.Ops/Views/Orders/OrderEdit.cshtml b/NumberSearch.Ops/Views/Orders/OrderEdit.cshtml index 49fde0f3..a0e34856 100644 --- a/NumberSearch.Ops/Views/Orders/OrderEdit.cshtml +++ b/NumberSearch.Ops/Views/Orders/OrderEdit.cshtml @@ -680,6 +680,8 @@ Serial Number MAC Address Condition + TeleDynamics Order Id + Tracking @@ -692,6 +694,8 @@ @item?.SerialNumber @item?.MACAddress @item?.Condition + @item?.ExternalOrderId + Tracking Status
Product diff --git a/NumberSearch.Ops/Views/ProductItems/Create.cshtml b/NumberSearch.Ops/Views/ProductItems/Create.cshtml index fcdca298..109a9232 100644 --- a/NumberSearch.Ops/Views/ProductItems/Create.cshtml +++ b/NumberSearch.Ops/Views/ProductItems/Create.cshtml @@ -15,22 +15,22 @@
- +
- +
- +
- +
@@ -48,6 +48,16 @@
+
+ + + +
+
+ + + +
diff --git a/NumberSearch.Ops/Views/ProductItems/Delete.cshtml b/NumberSearch.Ops/Views/ProductItems/Delete.cshtml index fc5cd386..1a6f0173 100644 --- a/NumberSearch.Ops/Views/ProductItems/Delete.cshtml +++ b/NumberSearch.Ops/Views/ProductItems/Delete.cshtml @@ -49,6 +49,18 @@
@Html.DisplayFor(model => model.Condition)
+
+ @Html.DisplayNameFor(model => model.ExternalOrderId) +
+
+ @Html.DisplayFor(model => model.ExternalOrderId) +
+
+ @Html.DisplayNameFor(model => model.ShipmentTrackingLink) +
+
+ @Html.DisplayFor(model => model.ShipmentTrackingLink) +
@Html.DisplayNameFor(model => model.DateCreated)
diff --git a/NumberSearch.Ops/Views/ProductItems/Details.cshtml b/NumberSearch.Ops/Views/ProductItems/Details.cshtml index 6c857dce..89cdc2df 100644 --- a/NumberSearch.Ops/Views/ProductItems/Details.cshtml +++ b/NumberSearch.Ops/Views/ProductItems/Details.cshtml @@ -45,6 +45,18 @@
@Html.DisplayFor(model => model.Condition)
+
+ @Html.DisplayNameFor(model => model.ExternalOrderId) +
+
+ @Html.DisplayFor(model => model.ExternalOrderId) +
+
+ @Html.DisplayNameFor(model => model.ShipmentTrackingLink) +
+
+ @Html.DisplayFor(model => model.ShipmentTrackingLink) +
@Html.DisplayNameFor(model => model.DateCreated)
diff --git a/NumberSearch.Ops/Views/ProductItems/Edit.cshtml b/NumberSearch.Ops/Views/ProductItems/Edit.cshtml index 46c13cd7..93475c97 100644 --- a/NumberSearch.Ops/Views/ProductItems/Edit.cshtml +++ b/NumberSearch.Ops/Views/ProductItems/Edit.cshtml @@ -43,6 +43,16 @@
+
+ + + +
+
+ + + +
diff --git a/NumberSearch.Ops/Views/ProductItems/Index.cshtml b/NumberSearch.Ops/Views/ProductItems/Index.cshtml index 05070d2e..445d2acb 100644 --- a/NumberSearch.Ops/Views/ProductItems/Index.cshtml +++ b/NumberSearch.Ops/Views/ProductItems/Index.cshtml @@ -22,6 +22,12 @@ Condition + + TeleDynamics Order Id + + + Tracking + Action @@ -40,6 +46,8 @@ @item?.Condition + @item?.ExternalOrderId + Tracking Status