init Area full CRUD
This commit is contained in:
@@ -5,7 +5,6 @@ namespace app\controllers;
|
||||
use Yii;
|
||||
use app\models\Department;
|
||||
use app\models\DepartmentSearch;
|
||||
use app\models\SystemLogs;
|
||||
use app\models\common;
|
||||
use yii\web\Controller;
|
||||
use yii\web\NotFoundHttpException;
|
||||
@@ -225,10 +224,7 @@ class DepartmentController extends Controller {
|
||||
Yii::$app->response->format = "json";
|
||||
return [
|
||||
"title" => Html::tag("i", "", ["class" => "fa fa-file"]) . " Ghi nhận hệ thống",
|
||||
"form" => $this->renderPartial("logs", [
|
||||
"logs" => SystemLogs::find()->andWhere(["type" => Yii::$app->controller->id])->orderBy(['time' => SORT_DESC])->limit(30)->all(),
|
||||
"userArray" => \app\models\User::userArray()
|
||||
])
|
||||
"form" => \app\widgets\SystemLogsView::widget(['type' => Yii::$app->controller->id])
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -238,9 +234,7 @@ class DepartmentController extends Controller {
|
||||
Yii::$app->response->format = "json";
|
||||
return [
|
||||
"title" => Html::tag("i", "", ["class" => "fa fa-sitemap"]) . " Cây thư mục",
|
||||
"form" => $this->renderPartial("tree", [
|
||||
"root" => Department::findOne(1)
|
||||
])
|
||||
"form" => \app\widgets\Tree::widget(["model" => new Department()])
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user