Skip to content

Commit

Permalink
Continued work in support of #260.
Browse files Browse the repository at this point in the history
  • Loading branch information
uncheckederror committed Feb 11, 2022
1 parent 03b9c13 commit 05f6903
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 6 deletions.
4 changes: 2 additions & 2 deletions NumberSearch.Ops/Controllers/ProductItemsController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public async Task<IActionResult> Create(Guid? shipmentId)
[Authorize]
[HttpPost("ProductItems")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,DateCreated,DateUpdated")] ProductItem productItem)
public async Task<IActionResult> Create([Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,ExternalOrderId,ShipmentTrackingLink,DateCreated,DateUpdated")] ProductItem productItem)
{
if (ModelState.IsValid)
{
Expand Down Expand Up @@ -135,7 +135,7 @@ public async Task<IActionResult> Edit(Guid? id)
[Authorize]
[HttpPost("ProductItems/Edit/{id}")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(Guid id, [Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,DateCreated,DateUpdated")] ProductItem productItem)
public async Task<IActionResult> Edit(Guid id, [Bind("ProductItemId,ProductId,ProductShipmentId,OrderId,SerialNumber,MACAddress,Condition,ExternalOrderId,ShipmentTrackingLink,DateCreated,DateUpdated")] ProductItem productItem)
{
if (id != productItem.ProductItemId)
{
Expand Down
2 changes: 2 additions & 0 deletions NumberSearch.Ops/PostgreSQL/ProductItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
}
Expand Down
4 changes: 4 additions & 0 deletions NumberSearch.Ops/PostgreSQL/numberSearchContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 4 additions & 0 deletions NumberSearch.Ops/Views/Orders/OrderEdit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -680,6 +680,8 @@
<th>Serial Number</th>
<th>MAC Address</th>
<th>Condition</th>
<th>TeleDynamics Order Id</th>
<th>Tracking</th>
<th></th>
</tr>
</thead>
Expand All @@ -692,6 +694,8 @@
<td>@item?.SerialNumber</td>
<td>@item?.MACAddress</td>
<td>@item?.Condition</td>
<td>@item?.ExternalOrderId</td>
<td><a href="@item?.ShipmentTrackingLink" target="_blank" rel="noreferrer" class="btn btn-info">Tracking Status</a></td>
<td>
<div class="btn-group" role="group" aria-label="Basic example">
<a href="/Products/Details/@item.ProductId" class="btn btn-outline-primary">Product</a>
Expand Down
18 changes: 14 additions & 4 deletions NumberSearch.Ops/Views/ProductItems/Create.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,22 @@
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="ProductItemId" class="control-label"></label>
<input asp-for="ProductItemId" class="form-control" readonly/>
<input asp-for="ProductItemId" class="form-control" readonly />
<span asp-validation-for="ProductItemId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ProductShipmentId" class="control-label"></label>
<input asp-for="ProductShipmentId" class="form-control" readonly/>
<input asp-for="ProductShipmentId" class="form-control" readonly />
<span asp-validation-for="ProductShipmentId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="OrderId" class="control-label"></label>
<input asp-for="OrderId" class="form-control" readonly/>
<input asp-for="OrderId" class="form-control" readonly />
<span asp-validation-for="OrderId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ProductId" class="control-label"></label>
<input asp-for="ProductId" class="form-control" readonly/>
<input asp-for="ProductId" class="form-control" readonly />
<span asp-validation-for="ProductId" class="text-danger"></span>
</div>
<div class="form-group">
Expand All @@ -48,6 +48,16 @@
<input asp-for="Condition" class="form-control" />
<span asp-validation-for="Condition" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ExternalOrderId" class="control-label"></label>
<input asp-for="ExternalOrderId" class="form-control" />
<span asp-validation-for="ExternalOrderId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ShipmentTrackingLink" class="control-label"></label>
<input asp-for="ShipmentTrackingLink" class="form-control" />
<span asp-validation-for="ShipmentTrackingLink" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary mt-3 mb-3" />
</div>
Expand Down
12 changes: 12 additions & 0 deletions NumberSearch.Ops/Views/ProductItems/Delete.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,18 @@
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Condition)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExternalOrderId)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExternalOrderId)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ShipmentTrackingLink)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ShipmentTrackingLink)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.DateCreated)
</dt>
Expand Down
12 changes: 12 additions & 0 deletions NumberSearch.Ops/Views/ProductItems/Details.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,18 @@
<dd class="col-sm-10">
@Html.DisplayFor(model => model.Condition)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ExternalOrderId)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ExternalOrderId)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.ShipmentTrackingLink)
</dt>
<dd class="col-sm-10">
@Html.DisplayFor(model => model.ShipmentTrackingLink)
</dd>
<dt class="col-sm-2">
@Html.DisplayNameFor(model => model.DateCreated)
</dt>
Expand Down
10 changes: 10 additions & 0 deletions NumberSearch.Ops/Views/ProductItems/Edit.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
<input asp-for="Condition" class="form-control" />
<span asp-validation-for="Condition" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ExternalOrderId" class="control-label"></label>
<input asp-for="ExternalOrderId" class="form-control" />
<span asp-validation-for="ExternalOrderId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ShipmentTrackingLink" class="control-label"></label>
<input asp-for="ShipmentTrackingLink" class="form-control" />
<span asp-validation-for="ShipmentTrackingLink" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DateCreated" class="control-label"></label>
<input asp-for="DateCreated" class="form-control" />
Expand Down
8 changes: 8 additions & 0 deletions NumberSearch.Ops/Views/ProductItems/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@
<th>
Condition
</th>
<th>
TeleDynamics Order Id
</th>
<th>
Tracking
</th>
<th>
Action
</th>
Expand All @@ -40,6 +46,8 @@
<td>
@item?.Condition
</td>
<td>@item?.ExternalOrderId</td>
<td><a href="@item?.ShipmentTrackingLink" target="_blank" rel="noreferrer" class="btn btn-info">Tracking Status</a></td>
<td>
<div class="btn-group" role="group" aria-label="Basic example">
<a href="/Home/Order/@item?.OrderId" class="btn btn-outline-primary">Order</a>
Expand Down

0 comments on commit 05f6903

Please sign in to comment.