Commit a1e575df authored by Pearu Sarv's avatar Pearu Sarv
Browse files

.

parent 2661d3aa
<teis-modal [icon]="numberOfInspectedItems ? 'icon-edit' : 'icon-add'" [title]="numberOfInspectedItems ? ('edit_number_of_inspected_items_' + numberOfInspectedItems.item) : ('add_number_of_inspected_items_' + item) | translate">
<teis-modal
[icon]="numberOfInspectedItems ? 'icon-edit' : 'icon-add'"
[title]="numberOfInspectedItems ? 'edit_number_of_inspected_items_' + numberOfInspectedItems.item : ('add_number_of_inspected_items_' + item | translate)"
>
<teis-form-layout [colsize]="18">
<form-row *ngFor="let numbersFormItem of numbersForm.controls | keyvalue:keepOrder" [label]="numbersFormItem.key | translate">
<ska-number min="0" max="999999999" [formControl]="numbersFormItem.value" [name]="numbersFormItem.key" required pattern="\d+"></ska-number>
<form-row *ngFor="let numbersFormItem of numbersForm.controls | keyvalue: keepOrder" [label]="numbersFormItem.key | translate">
<ska-number min="0" max="999999999" [formControl]="numbersFormItem.value" [name]="numbersFormItem.key" required pattern="\d+"></ska-number>
</form-row>
<div *ngIf="numbersForm.errors" class="pb-2">
......
......@@ -32,6 +32,7 @@ export class AddOrEditNumberOfInspectedItemsComponent implements OnInit {
this.numbersForm = this.fb.group(
{
generallyWithoutM: [this.numberOfInspectedItems?.generallyWithoutM ?? 0],
// TODO: remove hardcode when BE changed
...(true
? { goodsAM: [this.numberOfInspectedItems?.goodsAM ?? 0], goodsDM: [this.numberOfInspectedItems?.goodsDM ?? 0], goodsSM: [this.numberOfInspectedItems?.goodsSM ?? 0] }
: {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment