Sync completed work orders into vehicle records
Some checks failed
ci / test (push) Has been cancelled

This commit is contained in:
VPN SaaS Dev
2026-05-16 12:17:45 +09:00
parent ecfb5aa949
commit 069b0a66c0
7 changed files with 68 additions and 4 deletions

View File

@@ -445,9 +445,10 @@ document.body.addEventListener("click", async (event) => {
}));
}
if (button.dataset.completeWorkOrder) {
const odometer = window.prompt("Пробег на закрытии, км. Можно оставить пустым, если пробег уже указан.") || "";
await runAction(button, () => api(`/work-orders/${button.dataset.completeWorkOrder}/complete`, {
method: "POST",
body: JSON.stringify({ comment: "Работы завершены" }),
body: JSON.stringify({ comment: "Работы завершены", odometer: numberOrNull(odometer) }),
}));
}
if (button.dataset.requestVehicleProfile) {