update Device full CRUD

This commit is contained in:
2020-10-13 13:40:49 +07:00
parent 64e62ca3ce
commit 03e03c7e13
20 changed files with 1170 additions and 77 deletions

27
helpers/DeviceGrid.php Normal file
View File

@@ -0,0 +1,27 @@
<?php
namespace app\helpers;
class DeviceGrid extends CommonGrid {
public static function status($array) {
return function($model) use ($array) {
if ($model->status)
return "<i class='fa fa-check text-green'></i>";
return "<i class='fa fa-remove text-red'></i>";
};
}
public static function type($array) {
return function($model) use ($array) {
return isset($array[$model->type]) ? $array[$model->type] : "";
};
}
public static function area($array) {
return function($model) use ($array) {
return isset($array[$model->area_id]) ? $array[$model->area_id] : "";
};
}
}