Edit ItemSlotCharacteristics
All checks were successful
E2E Testing / test (push) Successful in 1m42s

This commit is contained in:
Sebastian Böckelmann 2024-05-11 10:56:17 +02:00
parent 99454753a6
commit e53d718c17
3 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,5 @@
<mat-form-field class="example-full-width"> <mat-form-field class="example-full-width">
<mat-label>Number</mat-label> <mat-label>Item Characteristic</mat-label>
<input matInput <input matInput
aria-label="State" aria-label="State"
[matAutocomplete]="auto" [matAutocomplete]="auto"

View File

@ -26,7 +26,8 @@
<th mat-header-cell *matHeaderCellDef></th> <th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let slotCharacteristic"> <td mat-cell *matCellDef="let slotCharacteristic">
<button mat-icon-button (click)="finishEditing()" *ngIf="editedCharacteristic === slotCharacteristic"><mat-icon>done</mat-icon></button> <button mat-icon-button (click)="finishEditing()" *ngIf="editedCharacteristic === slotCharacteristic"><mat-icon>done</mat-icon></button>
<button mat-icon-button *ngIf="editedCharacteristic !== slotCharacteristic" [disabled]="editedCharacteristic != null"><mat-icon>edit</mat-icon></button> <button mat-icon-button *ngIf="editedCharacteristic !== slotCharacteristic" [disabled]="editedCharacteristic != null"
(click)="editSlotCharacteristic(slotCharacteristic)"><mat-icon>edit</mat-icon></button>
</td> </td>
</ng-container> </ng-container>

View File

@ -48,4 +48,8 @@ export class InventorySlotCharacteristicEditorComponent implements OnInit{
onSelectDecreasingCharacteristic(selectedCharacteristic: ItemGroupCharacteristic, slotCharacteristic: InventoryCharacteristic) { onSelectDecreasingCharacteristic(selectedCharacteristic: ItemGroupCharacteristic, slotCharacteristic: InventoryCharacteristic) {
slotCharacteristic.decreasingCharacteristic = selectedCharacteristic; slotCharacteristic.decreasingCharacteristic = selectedCharacteristic;
} }
editSlotCharacteristic(slotCharacteristic: InventoryCharacteristic) {
this.editedCharacteristic = slotCharacteristic;
}
} }