add aha blatt parsing

This commit is contained in:
Luca Haid
2026-01-20 13:27:35 +01:00
parent b79be61ca9
commit d6d213a8d3
9 changed files with 412 additions and 140 deletions

View File

@@ -44,4 +44,24 @@ class RimoWorkorderController extends mfBaseController {
exit;
}
protected function parseAhaAction() {
header('Content-Type: application/json');
$post = json_decode(file_get_contents('php://input'), true);
$id = $post['id'] ?? $this->request->id ?? null;
if (!$id || $id < 1) {
echo json_encode(['success' => false, 'message' => 'Invalid workorder id.']);
exit;
}
$wo = new RimoWorkorder($id);
if (!$wo->id) {
echo json_encode(['success' => false, 'message' => 'RimoWorkorder nicht gefunden.']);
exit;
}
echo json_encode($wo->parseAha());
exit;
}
}