From bb7db820d81c93700c33e8499b83ff7a8bb8d13a Mon Sep 17 00:00:00 2001
From: Oleksandr Husak <oleksandr.husak@mailbox.tu-dresden.de>
Date: Fri, 26 Nov 2021 09:58:05 +0100
Subject: [PATCH] collors for soll columns

---
 src/app/app.component.html                    | 12 +----
 .../pick-list/pick-list.component.html        | 44 +++++++++++--------
 .../pick-list/pick-list.component.ts          |  2 +-
 3 files changed, 28 insertions(+), 30 deletions(-)

diff --git a/src/app/app.component.html b/src/app/app.component.html
index 22bfa6e..7876eeb 100644
--- a/src/app/app.component.html
+++ b/src/app/app.component.html
@@ -13,14 +13,4 @@
         <chart-timeline> ... </chart-timeline> 
     </mat-tab>
     
-</mat-tab-group>
-
-
-
-
-
-
-
-
-
-
+</mat-tab-group>
\ No newline at end of file
diff --git a/src/app/components/pick-list/pick-list.component.html b/src/app/components/pick-list/pick-list.component.html
index 43a2040..7e0f7fd 100644
--- a/src/app/components/pick-list/pick-list.component.html
+++ b/src/app/components/pick-list/pick-list.component.html
@@ -24,7 +24,11 @@
             </th>
             <td mat-cell *matCellDef="let item">
                 <mat-chip-list *ngIf="item.inventoryItemSoll">
-                    <mat-chip selected>
+                    <mat-chip selected *ngIf="!item.hasOwnProperty('inventoryIsCorrect')">
+                        {{item.inventoryItemSoll}} 
+                    </mat-chip>
+                    <mat-chip selected *ngIf="item.hasOwnProperty('inventoryIsCorrect')" 
+                        [color]="item.inventoryIsCorrect === false ? 'warn' : 'accent'">
                         {{item.inventoryItemSoll}} 
                     </mat-chip>
                 </mat-chip-list>
@@ -36,23 +40,9 @@
             <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-chip selected [color]="item.inventoryIsCorrect === false ? 'warn' : 'accent'">
                         {{item.inventoryItemIst}} 
-                    </mat-basic-chip>
-                </mat-chip-list>
-            </td>
-        </ng-container>
-
-        <!-- Shipment Ist-->
-        <ng-container matColumnDef="shipment_ist">
-            <th mat-header-cell *matHeaderCellDef>
-                Shipment Ist
-            </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'">
-                        {{item.shipmentBinNrIst}} 
-                    </mat-basic-chip>
+                    </mat-chip>
                 </mat-chip-list>
             </td>
         </ng-container>
@@ -64,9 +54,27 @@
             </th>
             <td mat-cell *matCellDef="let item">
                 <mat-chip-list *ngIf="item.shipmentBinNrSoll">
-                    <mat-chip selected>
+                    <mat-chip selected *ngIf="!item.hasOwnProperty('shipmentIsCorrect')">
                         {{item.shipmentBinNrSoll}} 
                     </mat-chip>
+                    <mat-chip selected *ngIf="item.hasOwnProperty('shipmentIsCorrect')" 
+                        [color]="item.shipmentIsCorrect === false ? 'warn' : 'accent'">
+                        {{item.shipmentBinNrSoll}} 
+                    </mat-chip>
+                </mat-chip-list>
+            </td>
+        </ng-container>
+
+        <!-- Shipment Ist-->
+        <ng-container matColumnDef="shipment_ist">
+            <th mat-header-cell *matHeaderCellDef>
+                Shipment Ist
+            </th>
+            <td mat-cell *matCellDef="let item"> 
+                <mat-chip-list *ngIf="item.shipmentBinNrIst">
+                    <mat-chip selected [color]="item.shipmentIsCorrect === false ? 'warn' : 'accent'">
+                        {{item.shipmentBinNrIst}} 
+                    </mat-chip>
                 </mat-chip-list>
             </td>
         </ng-container>
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