add aha blatt parsing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user