init Area full CRUD

This commit is contained in:
2020-10-09 14:19:15 +07:00
parent 5538d74b1b
commit 70db83d3ab
15 changed files with 318 additions and 144 deletions

View File

@@ -73,7 +73,7 @@ class CommonGrid {
public static function rows($type) {
return function($model, $index, $widget, $grid) use ($type) {
return [
"onclick" => "common.form(this, '{$type}');",
"ondblclick" => "common.form(this, '{$type}');",
"style" => "cursor: pointer;",
"data" => [
"href" => Url::to(["update", "id" => $model->id])
@@ -82,4 +82,10 @@ class CommonGrid {
};
}
public static function pid($array) {
return function($model) use ($array) {
return isset($array[$model->pid]) ? $array[$model->pid] : "";
};
}
}