This commit is contained in:
2025-10-04 11:46:59 +07:00
commit 97427d7cff
498 changed files with 47596 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
<?php
namespace Hura8\Components\Staff\Model;
class StaffDepartmentPermissionModel
{
protected $objStaffDepartmentModel;
public function __construct()
{
$this->objStaffDepartmentModel = new StaffDepartmentModel();
}
public function getDepartmentMenuPermission($department_id) {
$_info = $this->objStaffDepartmentModel->getInfo($department_id);
return ($_info['menu_permission']) ? \json_decode($_info['menu_permission'], true) : [];
}
public function getDepartmentEntityPermission($department_id) {
$_info = $this->objStaffDepartmentModel->getInfo($department_id);
return ($_info['entity_permission']) ? \json_decode($_info['entity_permission'], true) : [];
}
}