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

TEIS-2446 Edit drivers inspection data api fix

parent 24ab5dfe
......@@ -45,10 +45,9 @@ export class EditInspectionDataComponent implements OnInit {
submit(): void {
triggerValidation(this.form);
if (this.form.invalid) {
return;
if (this.form.valid) {
this.facade.editDriversInspectionData(this.form.value);
}
this.facade.editDriversInspectionData(this.inspectionData.id, this.form.value);
}
}
......@@ -394,7 +394,8 @@ export class DriversInspectionsFacade implements OnDestroy {
});
}
editDriversInspectionData(id: string, inspectionData: EditDriversInspectionInspectedItemsDto) {
editDriversInspectionData(inspectionData: EditDriversInspectionInspectedItemsDto) {
const { id } = this.driversInspection$.getValue();
this.driversInspectionOfficeApi.patchDriversInspectionData(id, inspectionData).subscribe(() => {
this.getNumberOfInspectedItems();
this.modal.close();
......
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