inventory-slots #49

Merged
sebastian merged 13 commits from inventory-slots into main 2024-05-11 15:36:10 +02:00
3 changed files with 7 additions and 2 deletions
Showing only changes of commit e53d718c17 - Show all commits

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;
}
} }