From 385f11a299a400bce16454844654999470d2c489 Mon Sep 17 00:00:00 2001
From: Frank Rohde <frank.rohde@tu-dresden.de>
Date: Wed, 1 Dec 2021 18:35:07 +0100
Subject: [PATCH] removed two columns and fixed bug that the cell-colour was
 not displayed correctly when the field "isCorrect" is not present (it is
 deliberately not included if the default value is sent, i.e., false)

---
 src/app/components/pick-list/pick-list.component.html | 4 ++--
 src/app/components/pick-list/pick-list.component.ts   | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/app/components/pick-list/pick-list.component.html b/src/app/components/pick-list/pick-list.component.html
index 43a2040..5c51e27 100644
--- a/src/app/components/pick-list/pick-list.component.html
+++ b/src/app/components/pick-list/pick-list.component.html
@@ -36,7 +36,7 @@
             <th mat-header-cell *matHeaderCellDef> Inventory Ist </th>
             <td mat-cell *matCellDef="let item"> 
                 <mat-chip-list *ngIf="item.inventoryItemIst">
-                    <mat-basic-chip selected [style]="item.inventoryIsCorrect === false ? 'background-color:red; color:white' : 'background-color:green; color:white'">
+                    <mat-basic-chip selected [style]="item.inventoryIsCorrect === true ? 'background-color:green; color:white' : 'background-color:red; color:white'">
                         {{item.inventoryItemIst}} 
                     </mat-basic-chip>
                 </mat-chip-list>
@@ -50,7 +50,7 @@
             </th>
             <td mat-cell *matCellDef="let item"> 
                 <mat-chip-list *ngIf="item.shipmentBinNrIst">
-                    <mat-basic-chip selected [style]="item.shipmentIsCorrect === false ? 'background-color:red; color:white' : 'background-color:green; color:white'">
+                    <mat-basic-chip selected [style]="item.shipmentIsCorrect === true ? 'background-color:green; color:white' : 'background-color:red; color:white'">
                         {{item.shipmentBinNrIst}} 
                     </mat-basic-chip>
                 </mat-chip-list>
diff --git a/src/app/components/pick-list/pick-list.component.ts b/src/app/components/pick-list/pick-list.component.ts
index cac0894..481d65f 100644
--- a/src/app/components/pick-list/pick-list.component.ts
+++ b/src/app/components/pick-list/pick-list.component.ts
@@ -53,7 +53,7 @@ export class PickListComponent implements OnInit {
 
   private subsPosition: Subscription;
 
-  displayedColumns: string[] = ['index', 'product', 'inventory_soll', 'inventory_ist', 'shipment_soll', 'shipment_ist', 'picker', 'list'];
+  displayedColumns: string[] = ['index', 'product', 'inventory_soll', 'inventory_ist', 'shipment_soll', 'shipment_ist'];
 
   tableData: any;
   pickListData: any;
-- 
GitLab