solucionado el problema que al borrar una fecha de la OT se quedaba en caché el objeto anterior y no actualizaba el progreso

This commit is contained in:
2025-06-07 11:26:52 +02:00
parent e2ff0f6667
commit 6a3a10c7e8

View File

@ -169,6 +169,7 @@ class Ordentrabajo extends BaseController
if ($validated) {
$validatedData = $bodyData;
$r = $this->produccionService->emptyOrdenTrabajoDate($validatedData['orden_trabajo_id'], $validatedData['name']);
$this->produccionService->init($validatedData['orden_trabajo_id']); // Re-init service to update the state of the OT
return $this->response->setJSON(["message" => lang("App.global_alert_save_success"), "status" => $r, "user" => auth()->user(), "data" => $bodyData]);
} else {
return $this->response->setJSON(["errors" => $this->validation->getErrors()])->setStatusCode(400);