diff --git a/Admin/Install/Navigation.install.json b/Admin/Install/Navigation.install.json index 9c7efdd..6c0847e 100755 --- a/Admin/Install/Navigation.install.json +++ b/Admin/Install/Navigation.install.json @@ -92,6 +92,54 @@ ] } ] + }, + { + "id": 1002404001, + "pid": "/", + "type": 2, + "subtype": 1, + "name": "Departments", + "uri": "{/prefix}humanresource/position/list", + "target": "self", + "icon": null, + "order": 1, + "from": "HumanResourceManagement", + "permission": { "permission": 2, "type": null, "element": null }, + "parent": 1002401001, + "children": [ + { + "id": 1002404101, + "pid": "/humanresource/position", + "type": 3, + "subtype": 1, + "name": "List", + "uri": "{/prefix}humanresource/position/list", + "target": "self", + "icon": null, + "order": 1, + "from": "HumanResourceManagement", + "permission": { "permission": 2, "type": null, "element": null }, + "parent": 1002404001, + "children": [ + ] + }, + { + "id": 1002402201, + "pid": "/humanresource/position", + "type": 3, + "subtype": 1, + "name": "Create", + "uri": "{/prefix}humanresource/position/create?{?}", + "target": "self", + "icon": null, + "order": 5, + "from": "HumanResourceManagement", + "permission": { "permission": 4, "type": null, "element": null }, + "parent": 1002404001, + "children": [ + ] + } + ] } ] } diff --git a/Admin/Install/db.json b/Admin/Install/db.json index 5c69e69..bd57156 100755 --- a/Admin/Install/db.json +++ b/Admin/Install/db.json @@ -124,8 +124,8 @@ "primary": true, "autoincrement": true }, - "hr_staff_history_media_item": { - "name": "hr_staff_history_media_item", + "hr_staff_history_media_history": { + "name": "hr_staff_history_media_history", "type": "INT", "null": false, "foreignTable": "hr_staff_history", @@ -200,8 +200,8 @@ "primary": true, "autoincrement": true }, - "hr_staff_education_history_media_item": { - "name": "hr_staff_education_history_media_item", + "hr_staff_education_history_media_history": { + "name": "hr_staff_education_history_media_history", "type": "INT", "null": false, "foreignTable": "hr_staff_education_history", @@ -266,8 +266,8 @@ "primary": true, "autoincrement": true }, - "hr_staff_work_history_media_item": { - "name": "hr_staff_work_history_media_item", + "hr_staff_work_history_media_history": { + "name": "hr_staff_work_history_media_history", "type": "INT", "null": false, "foreignTable": "hr_staff_work_history", @@ -281,5 +281,83 @@ "foreignKey": "media_id" } } + }, + "hr_position": { + "name": "hr_position", + "fields": { + "hr_position_id": { + "name": "hr_position_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "hr_position_title": { + "name": "hr_position_title", + "type": "VARCHAR(255)", + "null": false + }, + "hr_position_requirement": { + "name": "hr_position_requirement", + "type": "TEXT", + "null": false + }, + "hr_position_requirementraw": { + "name": "hr_position_requirementraw", + "type": "TEXT", + "null": false + }, + "hr_position_tasks": { + "name": "hr_position_tasks", + "type": "TEXT", + "null": false + }, + "hr_position_tasksraw": { + "name": "hr_position_tasksraw", + "type": "TEXT", + "null": false + }, + "hr_position_lang": { + "name": "hr_position_lang", + "type": "VARCHAR(2)", + "null": false, + "foreignTable": "language", + "foreignKey": "language_639_1" + }, + "hr_position_position": { + "name": "hr_position_position", + "type": "INT", + "default": null, + "null": true, + "foreignTable": "organization_position", + "foreignKey": "organization_position_id" + } + } + }, + "hr_position_media": { + "name": "hr_position_media", + "fields": { + "hr_position_media_id": { + "name": "hr_position_media_id", + "type": "INT", + "null": false, + "primary": true, + "autoincrement": true + }, + "hr_position_media_position": { + "name": "hr_position_media_position", + "type": "INT", + "null": false, + "foreignTable": "hr_position", + "foreignKey": "hr_position_id" + }, + "hr_position_media_media": { + "name": "hr_position_media_media", + "type": "INT", + "null": false, + "foreignTable": "media", + "foreignKey": "media_id" + } + } } } \ No newline at end of file diff --git a/Admin/Routes/Web/Backend.php b/Admin/Routes/Web/Backend.php index cc8a7e1..8dfe4ae 100755 --- a/Admin/Routes/Web/Backend.php +++ b/Admin/Routes/Web/Backend.php @@ -50,4 +50,26 @@ return [ ], ], ], + '^.*/humanresource/position/list.*$' => [ + [ + 'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrPositionList', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::MODULE_NAME, + 'type' => PermissionType::READ, + 'state' => PermissionState::POSITION, + ], + ], + ], + '^.*/humanresource/position/create.*$' => [ + [ + 'dest' => '\Modules\HumanResourceManagement\Controller\BackendController:viewHrPositionCreate', + 'verb' => RouteVerb::GET, + 'permission' => [ + 'module' => BackendController::MODULE_NAME, + 'type' => PermissionType::CREATE, + 'state' => PermissionState::POSITION, + ], + ], + ], ]; diff --git a/Docs/Dev/en/SUMMARY.md b/Docs/Dev/en/SUMMARY.md old mode 100644 new mode 100755 diff --git a/Docs/Dev/en/structure.md b/Docs/Dev/en/structure.md old mode 100644 new mode 100755 diff --git a/Models/EmployeeEducationHistoryMapper.php b/Models/EmployeeEducationHistoryMapper.php old mode 100644 new mode 100755 index 8e447cd..883205d --- a/Models/EmployeeEducationHistoryMapper.php +++ b/Models/EmployeeEducationHistoryMapper.php @@ -68,7 +68,7 @@ final class EmployeeEducationHistoryMapper extends DataMapperAbstract 'mapper' => MediaMapper::class, /* mapper of the related object */ 'table' => 'hr_staff_work_history_media', /* table of the related object, null if no relation table is used (many->1) */ 'external' => 'hr_staff_work_history_media_media', - 'self' => 'hr_staff_work_history_media_item', + 'self' => 'hr_staff_work_history_media_history', ], ]; diff --git a/Models/EmployeeHistoryMapper.php b/Models/EmployeeHistoryMapper.php index 0620731..88bc359 100755 --- a/Models/EmployeeHistoryMapper.php +++ b/Models/EmployeeHistoryMapper.php @@ -82,7 +82,7 @@ final class EmployeeHistoryMapper extends DataMapperAbstract 'mapper' => MediaMapper::class, /* mapper of the related object */ 'table' => 'hr_staff_work_history_media', /* table of the related object, null if no relation table is used (many->1) */ 'external' => 'hr_staff_work_history_media_media', - 'self' => 'hr_staff_work_history_media_item', + 'self' => 'hr_staff_work_history_media_history', ], ]; diff --git a/Models/EmployeeWorkHistoryMapper.php b/Models/EmployeeWorkHistoryMapper.php old mode 100644 new mode 100755 index ae6a65f..82bb05c --- a/Models/EmployeeWorkHistoryMapper.php +++ b/Models/EmployeeWorkHistoryMapper.php @@ -66,7 +66,7 @@ final class EmployeeWorkHistoryMapper extends DataMapperAbstract 'mapper' => MediaMapper::class, /* mapper of the related object */ 'table' => 'hr_staff_work_history_media', /* table of the related object, null if no relation table is used (many->1) */ 'external' => 'hr_staff_work_history_media_media', - 'self' => 'hr_staff_work_history_media_item', + 'self' => 'hr_staff_work_history_media_history', ], ]; diff --git a/Models/PermissionState.php b/Models/PermissionState.php index 3ae3f4d..2b1e84e 100755 --- a/Models/PermissionState.php +++ b/Models/PermissionState.php @@ -29,4 +29,6 @@ abstract class PermissionState extends Enum public const HR = 1; public const DEPARTMENT = 2; + + public const POSITION = 3; }