Skip to content

Commit

Permalink
added customer name in list load page
Browse files Browse the repository at this point in the history
  • Loading branch information
suxrobGM committed Nov 18, 2023
1 parent 6e7a412 commit 3bc0ad2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ <h1>List Loads</h1>
Name
<p-sortIcon field="name"></p-sortIcon>
</th>
<th pSortableColumn="customer">
Customer
<p-sortIcon field="customer"></p-sortIcon>
</th>
<th pSortableColumn="originAddress">
Origin
<p-sortIcon field="originAddress"></p-sortIcon>
Expand Down Expand Up @@ -91,6 +95,9 @@ <h1>List Loads</h1>
<td [pTooltip]="load.name" [showDelay]="500" tooltipPosition="bottom">
{{load.name}}
</td>
<td [pTooltip]="load.customer.name" [showDelay]="500" tooltipPosition="bottom">
{{load.customer.name}}
</td>
<td [pTooltip]="load.originAddress | address" [showDelay]="500" tooltipPosition="bottom">
{{load.originAddress | address}}
</td>
Expand Down
2 changes: 2 additions & 0 deletions src/Core/Logistics.Domain/Specifications/SearchLoads.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public SearchLoads(

Criteria = i =>
(i.Name != null && i.Name.Contains(search)) ||
(i.Customer != null && i.Customer.Name.Contains(search)) ||
i.RefId.ToString().Contains(search) ||
i.OriginAddress.Line1.Contains(search) ||
(i.OriginAddress.Line2 != null && i.OriginAddress.Line2.Contains(search)) ||
Expand All @@ -31,6 +32,7 @@ public SearchLoads(
return propertyName switch
{
"name" => i => i.Name,
"customer" => i => i.Customer!.Name,
"originaddress" => i => i.OriginAddress.Line1,
"destinationaddress" => i => i.DestinationAddress.Line1,
"deliverycost" => i => i.DeliveryCost,
Expand Down

0 comments on commit 3bc0ad2

Please sign in to comment.