From cf95fe234e3b88a100fd9856dcc740fb199c9f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Mon, 6 May 2024 19:51:00 +0200 Subject: [PATCH] Edit ItemgroupCharacteristic --- .../item-group-editor.component.html | 21 ++++++++++++++++--- .../item-group-editor.component.scss | 4 ++++ .../item-group-editor.component.ts | 10 +++++++++ 3 files changed, 32 insertions(+), 3 deletions(-) diff --git a/src/app/editor/items/item-group-editor/item-group-editor.component.html b/src/app/editor/items/item-group-editor/item-group-editor.component.html index 155fd28..b88942b 100644 --- a/src/app/editor/items/item-group-editor/item-group-editor.component.html +++ b/src/app/editor/items/item-group-editor/item-group-editor.component.html @@ -1,15 +1,30 @@ - + - + - + diff --git a/src/app/editor/items/item-group-editor/item-group-editor.component.scss b/src/app/editor/items/item-group-editor/item-group-editor.component.scss index 906202f..9aa19ce 100644 --- a/src/app/editor/items/item-group-editor/item-group-editor.component.scss +++ b/src/app/editor/items/item-group-editor/item-group-editor.component.scss @@ -1,3 +1,7 @@ .mat-column-edit, .mat-column-delete { width: 32px; } + +.mat-column-Characteristic, { + width: 25%; +} diff --git a/src/app/editor/items/item-group-editor/item-group-editor.component.ts b/src/app/editor/items/item-group-editor/item-group-editor.component.ts index 201ec33..f0326c0 100644 --- a/src/app/editor/items/item-group-editor/item-group-editor.component.ts +++ b/src/app/editor/items/item-group-editor/item-group-editor.component.ts @@ -16,6 +16,8 @@ export class ItemGroupEditorComponent implements OnInit{ itemQualityDatasource: MatTableDataSource = new MatTableDataSource(); displayedColumns: string[] = ["Characteristic", "Description", 'edit', 'delete'] + editedCharacteristic: ItemGroupCharacteristic | undefined; + ngOnInit(): void { this.itemgroup!.itemGroupCharacteristics.push(new ItemGroupCharacteristic("Inventory", "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.")) @@ -26,4 +28,12 @@ export class ItemGroupEditorComponent implements OnInit{ this.itemgroup!.itemGroupCharacteristics = this.itemgroup!.itemGroupCharacteristics.filter(igc => igc.characteristicName !== characteristic.characteristicName); this.itemQualityDatasource.data = this.itemgroup!.itemGroupCharacteristics; } + + editItemgroupCharacteristic(characteristic: ItemGroupCharacteristic) { + this.editedCharacteristic = characteristic; + } + + finishEditing() { + this.editedCharacteristic = undefined; + } }
Characteristic {{element.characteristicName}} + {{element.characteristicName}} + + Name + + + Description {{element.characteristicDescription}} + {{element.characteristicDescription}} + + Name + + + + + +