mirror of
https://github.com/Karaka-Management/oms-HumanResourceTimeRecording.git
synced 2026-01-11 03:48:40 +00:00
fix bugs
This commit is contained in:
parent
e90d6f8e90
commit
c74dfde014
|
|
@ -5,7 +5,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "TimeRecording",
|
||||
"uri": "{/base}/humanresource/timerecording/dashboard?{?}",
|
||||
"uri": "{/base}/humanresource/timerecording/dashboard",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 70,
|
||||
|
|
@ -19,7 +19,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Dashboard",
|
||||
"uri": "{/base}/humanresource/timerecording/dashboard?{?}",
|
||||
"uri": "{/base}/humanresource/timerecording/dashboard",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
@ -34,7 +34,7 @@
|
|||
"type": 3,
|
||||
"subtype": 1,
|
||||
"name": "Stats",
|
||||
"uri": "{/base}/humanresource/timerecording/stats?{?}",
|
||||
"uri": "{/base}/humanresource/timerecording/stats",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
@ -51,7 +51,7 @@
|
|||
"type": 2,
|
||||
"subtype": 1,
|
||||
"name": "TimeRecording",
|
||||
"uri": "{/base}/private/timerecording/dashboard?{?}",
|
||||
"uri": "{/base}/private/timerecording/dashboard",
|
||||
"target": "self",
|
||||
"icon": null,
|
||||
"order": 1,
|
||||
|
|
|
|||
|
|
@ -147,6 +147,8 @@ final class ApiController extends Controller
|
|||
return;
|
||||
}
|
||||
|
||||
$this->createModel($request->header->account, $element, SessionElementMapper::class, 'element', $request->getOrigin());
|
||||
|
||||
if ($element->status === ClockingStatus::END) {
|
||||
/** @var \Modules\HumanResourceTimeRecording\Models\Session $session */
|
||||
$session = SessionMapper::get()
|
||||
|
|
@ -158,7 +160,6 @@ final class ApiController extends Controller
|
|||
SessionMapper::update()->execute($session);
|
||||
}
|
||||
|
||||
$this->createModel($request->header->account, $element, SessionElementMapper::class, 'element', $request->getOrigin());
|
||||
$this->createStandardCreateResponse($request, $response, $element);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ class Session implements \JsonSerializable
|
|||
}
|
||||
}
|
||||
|
||||
$this->start = $start;
|
||||
$this->start = $start ?? $this->start;
|
||||
$this->end = $end;
|
||||
|
||||
$busyTime = 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user