mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
Merged PR 1929: fix(remission-quantity-reason): correct dropdown placeholder and remove hardc...
fix(remission-quantity-reason): correct dropdown placeholder and remove hardcoded option Change dropdown placeholder from "Rückgabegrund" to "Remigrund" for consistency with application terminology. Remove hardcoded test option from reason dropdown that was polluting the dropdown list. Extract initial item object to class property for better maintainability and reusability. Ref: #5293, #5299
This commit is contained in:
committed by
Andreas Schickinger
parent
297ec9100d
commit
327fdc745d
@@ -38,8 +38,6 @@
|
||||
</ui-dropdown-option>
|
||||
}
|
||||
}
|
||||
|
||||
<ui-dropdown-option [value]="1">1</ui-dropdown-option>
|
||||
</ui-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@ export class QuantityAndReasonItemComponent {
|
||||
|
||||
dropdownLabel = computed(() => {
|
||||
const reason = this.quantityAndReason().reason;
|
||||
return reason !== '' ? reason : 'Rückgabegrund';
|
||||
return reason !== '' ? reason : 'Remigrund';
|
||||
});
|
||||
|
||||
reasonResource = resource({
|
||||
|
||||
@@ -50,15 +50,12 @@ export class SelectRemiQuantityAndReasonComponent {
|
||||
#feedbackDialog = injectFeedbackDialog();
|
||||
host = inject(SearchItemToRemitDialogComponent);
|
||||
|
||||
quantitiesAndResons = model<QuantityAndReason[]>([
|
||||
{ quantity: 1, reason: '' },
|
||||
]);
|
||||
initialItem: QuantityAndReason = { quantity: 1, reason: '' };
|
||||
|
||||
quantitiesAndResons = model<QuantityAndReason[]>([this.initialItem]);
|
||||
|
||||
addQuantityReasonItem(): void {
|
||||
this.quantitiesAndResons.update((items) => [
|
||||
...items,
|
||||
{ quantity: 1, reason: '' },
|
||||
]);
|
||||
this.quantitiesAndResons.update((items) => [...items, this.initialItem]);
|
||||
}
|
||||
|
||||
removeQuantityReasonItem(position: number): void {
|
||||
|
||||
Reference in New Issue
Block a user