fix: Reset save button after error handling
feat: Clear review mode and revert to edit mode when navigating to next item feat: Implement close button functionality fix: Handle edge case with zero delivery notes feat: Add new type field with free text option fix: Enable cancellation reversal in WarehouseAdmin improve: Enhance article search autocomplete functionality
This commit is contained in:
@@ -32,7 +32,7 @@ class Helper {
|
||||
$sql .= " AND `$columnName` = '" . $filterValue . "'";
|
||||
} else if (strpos($columnName, "|") !== false) {
|
||||
foreach (explode(" ", $filterValue) as $item)
|
||||
$sql .= " AND CONCAT(" . join(",", explode("|", $columnName)) . ") LIKE '%" . str_replace("%", "", $item) . "%'";
|
||||
$sql .= " AND CONCAT(" . join(",", explode("|", $columnName)) . ") LIKE '%" . $item . "%'";
|
||||
} else if ($filterValue[0] === "%") {
|
||||
$sql .= " AND `$columnName` LIKE '" . $filterValue . "'";
|
||||
} else if ($filterValue[strlen($filterValue) - 1] === "%") {
|
||||
|
||||
@@ -278,8 +278,10 @@ class TTCrud extends mfBaseController {
|
||||
|
||||
$data = [];
|
||||
if (count($data) < 11) {
|
||||
$filter = [$filterKey => '%' . $this->request->q . '%'];
|
||||
$lazyData = $this->model::getAll($filter, 10);
|
||||
// $this->request->q replace ? with
|
||||
$data = $this->model::getAll([$textKey => $this->request->q . '%'], 10);
|
||||
$lazyData = $this->model::getAll([$filterKey => $this->request->q], 10);
|
||||
|
||||
$data = array_merge($data, $lazyData);
|
||||
$data = array_unique($data, SORT_REGULAR);
|
||||
$data = array_slice($data, 0, 10);
|
||||
|
||||
@@ -371,7 +371,7 @@ class mfBaseController
|
||||
}
|
||||
|
||||
public static function sendError(string $message): void {
|
||||
http_response_code(422); // More appropriate status for validation errors
|
||||
http_response_code(500);
|
||||
self::returnJson(['success' => false, 'message' => $message]);
|
||||
exit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user