Feature/warehouse improve 2

This commit is contained in:
Luca Haid
2024-12-10 13:55:53 +00:00
parent 7c0491cdff
commit 2b14953318
3 changed files with 37 additions and 7 deletions
+10 -6
View File
@@ -165,6 +165,10 @@ class TTCrud extends mfBaseController {
}
}
if (method_exists($this, 'customRowsHandler')) {
$rows = $this->customRowsHandler($rows);
}
self::returnJson(["rows" => $rows,
"autoCompleteData" => $autocompleteData,
"pagination" => ["page" => $page,
@@ -201,12 +205,12 @@ class TTCrud extends mfBaseController {
}
protected function updateAction() {
if (property_exists($this->model, 'createBy') && !isset($this->postData['createBy'])) {
$this->postData['createBy'] = $this->user->id;
}
if (property_exists($this->model, 'create') && !isset($this->postData['create'])) {
$this->postData['create'] = time();
}
// if (property_exists($this->model, 'createBy') && !isset($this->postData['createBy'])) {
// $this->postData['createBy'] = $this->user->id;
// }
// if (property_exists($this->model, 'create') && !isset($this->postData['create'])) {
// $this->postData['create'] = time();
// }
Helper::validateArray($this->postData, array_merge($this->checkArray, ['id' => ['required' => true]]));