thay doi filter va Viet hoa

This commit is contained in:
2020-12-29 14:28:08 +07:00
parent c9d0c24218
commit cb6c8fba32
12 changed files with 72 additions and 51 deletions

View File

@@ -31,7 +31,7 @@ class ListManagementController extends Controller {
];
}
public function actionIndex($from = "", $to = "", $name = "", $type = "all", $gender = "all") {
public function actionIndex($from = "", $to = "", $name = "", $type = "all", $gender = "all", $id = "") {
$f = date_format(date_create_from_format('H:i d/m/Y', "00:00 " . date("d/m/Y")), 'U');
$t = date_format(date_create_from_format('H:i d/m/Y', "23:59 " . date("d/m/Y")), 'U');
$this->view->title = "List management";
@@ -42,6 +42,8 @@ class ListManagementController extends Controller {
$t = date_format(date_create_from_format('H:i d/m/Y', $to), 'U');
$dataProvider->query->andWhere(["BETWEEN", "time", $f, $t]);
}
if ($id !== "")
$dataProvider->query->andWhere(["LIKE", "code", $id]);
if ($name !== "")
$dataProvider->query->andWhere(["LIKE", "name", $name]);
if ($type !== "all")