|
@@ -114,6 +114,7 @@ export class MedicalWasteTypeComponent implements OnInit {
|
114
|
114
|
this.validateForm = this.fb.group({
|
115
|
115
|
typeName: [null, [Validators.required]],
|
116
|
116
|
inventoryDays: [0, [Validators.required]],
|
|
117
|
+ unitPrice: [0, [Validators.required]],
|
117
|
118
|
unit: [null, [Validators.required]],
|
118
|
119
|
storageUnit: [null, [Validators.required]],
|
119
|
120
|
});
|
|
@@ -130,6 +131,7 @@ export class MedicalWasteTypeComponent implements OnInit {
|
130
|
131
|
let data:any = {
|
131
|
132
|
typeName: that.validateForm.value.typeName,
|
132
|
133
|
inventoryDays: that.validateForm.value.inventoryDays,
|
|
134
|
+ unitPrice: that.validateForm.value.unitPrice || undefined,
|
133
|
135
|
unit: that.validateForm.value.unit ? { id: that.validateForm.value.unit } : undefined,
|
134
|
136
|
storageUnit: that.validateForm.value.storageUnit ? { id: that.validateForm.value.storageUnit } : undefined,
|
135
|
137
|
hosId: that.hosId,
|
|
@@ -161,6 +163,7 @@ export class MedicalWasteTypeComponent implements OnInit {
|
161
|
163
|
this.coopData = data;
|
162
|
164
|
this.validateForm.controls.typeName.setValue(data.typeName);
|
163
|
165
|
this.validateForm.controls.inventoryDays.setValue(data.inventoryDays);
|
|
166
|
+ this.validateForm.controls.unitPrice.setValue(data.unitPrice);
|
164
|
167
|
this.validateForm.controls.unit.setValue(data.unit.id);
|
165
|
168
|
this.validateForm.controls.storageUnit.setValue(data.storageUnit.id);
|
166
|
169
|
}
|