This commit is contained in:
Dennis Eichhorn 2024-04-07 17:31:42 +00:00
parent c7fc80747c
commit 883a46ecb5
6 changed files with 349 additions and 33 deletions

View File

@ -60,7 +60,53 @@
]
},
{
"id": 1004304001,
"id": 1004305001,
"pid": "/",
"type": 2,
"subtype": 1,
"name": "Recipes",
"uri": "{/base}/production/recipe/list?{?}",
"target": "self",
"icon": null,
"order": 10,
"from": "Production",
"permission": { "permission": 2, "type": null, "element": null },
"parent": 1004301001,
"children": [
{
"id": 1004305101,
"pid": "/production",
"type": 3,
"subtype": 1,
"name": "List",
"uri": "{/base}/production/recipe/list?{?}",
"target": "self",
"icon": null,
"order": 5,
"from": "Production",
"permission": { "permission": 2, "type": null, "element": null },
"parent": 1004305001,
"children": []
},
{
"id": 1004305201,
"pid": "/production",
"type": 3,
"subtype": 1,
"name": "Create",
"uri": "{/base}/production/recipe/create?{?}",
"target": "self",
"icon": null,
"order": 10,
"from": "Production",
"permission": { "permission": 4, "type": null, "element": null },
"parent": 1004305001,
"children": []
}
]
},
{
"id": 1004306001,
"pid": "/",
"type": 2,
"subtype": 1,
@ -68,13 +114,13 @@
"uri": "{/base}/production/machine/list?{?}",
"target": "self",
"icon": null,
"order": 5,
"order": 15,
"from": "Production",
"permission": { "permission": 2, "type": null, "element": null },
"parent": 1004301001,
"children": [
{
"id": 1004304101,
"id": 1004306101,
"pid": "/production",
"type": 3,
"subtype": 1,
@ -85,11 +131,11 @@
"order": 5,
"from": "Production",
"permission": { "permission": 2, "type": null, "element": null },
"parent": 1004304001,
"parent": 1004306001,
"children": []
},
{
"id": 1004304201,
"id": 1004306201,
"pid": "/production",
"type": 3,
"subtype": 1,
@ -100,7 +146,7 @@
"order": 10,
"from": "Production",
"permission": { "permission": 4, "type": null, "element": null },
"parent": 1004304001,
"parent": 1004306001,
"children": []
}
]

240
Admin/Install/db.json Normal file
View File

@ -0,0 +1,240 @@
{
"production_machine": {
"name": "production_machine",
"fields": {
"production_machine_id": {
"name": "production_machine_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"production_machine_capacity": {
"name": "production_machine_capacity",
"type": "BIGINT",
"null": false
},
"production_machine_unit": {
"name": "production_machine_unit",
"type": "VARCHAR(16)",
"null": false
},
"production_machine_equipment": {
"name": "production_machine_equipment",
"type": "INT(11)",
"null": false,
"foreignTable": "equipmgmt_equipment",
"foreignKey": "equipmgmt_equipment_id"
}
}
},
"production_machine_item": {
"name": "production_machine_item",
"fields": {
"production_machine_item_id": {
"name": "production_machine_item_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"production_machine_item_capacity": {
"name": "production_machine_item_capacity",
"type": "BIGINT",
"null": false
},
"production_machine_item_item": {
"name": "production_machine_item_item",
"type": "INT(11)",
"null": false,
"foreignTable": "itemmgmt_item",
"foreignKey": "itemmgmt_item_id"
},
"production_machine_item_machine": {
"name": "production_machine_item_machine",
"type": "INT(11)",
"null": false,
"foreignTable": "production_machine",
"foreignKey": "production_machine_id"
}
}
},
"production_recipe": {
"name": "production_recipe",
"fields": {
"production_recipe_id": {
"name": "production_recipe_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"production_recipe_status": {
"name": "production_recipe_status",
"type": "TINYINT",
"null": false
},
"production_recipe_quantity": {
"description": "Base quantity the recipe is based on",
"name": "production_recipe_quantity",
"type": "BIGINT",
"null": false
},
"production_recipe_item": {
"name": "production_recipe_item",
"type": "INT(11)",
"null": false,
"foreignTable": "itemmgmt_item",
"foreignKey": "itemmgmt_item_id"
}
}
},
"production_recipe_media": {
"name": "production_recipe_media",
"fields": {
"production_recipe_media_id": {
"name": "production_recipe_media_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"production_recipe_media_file": {
"name": "production_recipe_media_file",
"type": "INT(11)",
"null": false,
"foreignTable": "media",
"foreignKey": "media_id"
},
"production_recipe_media_recipe": {
"name": "production_recipe_media_recipe",
"type": "INT(11)",
"null": false,
"foreignTable": "production_recipe",
"foreignKey": "production_recipe_id"
}
}
},
"production_recipe_step": {
"name": "production_recipe_step",
"fields": {
"production_recipe_step_id": {
"name": "production_recipe_step_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"production_recipe_step_description": {
"name": "production_recipe_step_description",
"type": "TEXT",
"null": false
},
"production_recipe_step_order": {
"name": "production_recipe_step_order",
"type": "INT",
"null": false
},
"production_recipe_step_people": {
"description": "Amount of people performing this step",
"name": "production_recipe_step_people",
"type": "INT",
"null": false
},
"production_recipe_step_position": {
"description": "Which people group performs this step. Important to calculate costs and responsibilities",
"name": "production_recipe_step_position",
"type": "INT",
"null": false,
"foreignTable": "organization_position",
"foreignKey": "organization_position_id"
},
"production_recipe_step_duration": {
"description": "Real duration it takes to finish",
"name": "production_recipe_step_duration",
"type": "BIGINT",
"null": false
},
"production_recipe_step_additiveduration": {
"description": "Duration if no parallel work is performed. E.g. multiple people perform this step.",
"name": "production_recipe_step_additiveduration",
"type": "BIGINT",
"null": false
},
"production_recipe_step_scalable": {
"description": "Scales linear with item quantity, jumps with machine usage, no scaling",
"name": "production_recipe_step_scalable",
"type": "TINYINT",
"null": false
}
}
},
"production_recipe_step_item": {
"name": "production_recipe_step_item",
"fields": {
"production_recipe_step_item_id": {
"name": "production_recipe_step_item_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"production_recipe_step_item_quantity": {
"name": "production_recipe_step_item_quantity",
"type": "BIGINT",
"null": false
},
"production_recipe_step_item_item": {
"name": "production_recipe_step_item_item",
"type": "INT(11)",
"null": false,
"foreignTable": "itemmgmt_item",
"foreignKey": "itemmgmt_item_id"
},
"production_recipe_step_item_step": {
"name": "production_recipe_step_item_step",
"type": "INT(11)",
"null": false,
"foreignTable": "production_recipe_step",
"foreignKey": "production_recipe_step_id"
}
},
"production_recipe_step_machine": {
"name": "production_recipe_step_machine",
"fields": {
"production_recipe_step_machine_id": {
"name": "production_recipe_step_machine_id",
"type": "INT",
"null": false,
"primary": true,
"autoincrement": true
},
"production_recipe_step_machine_settings": {
"name": "production_recipe_step_machine_settings",
"type": "TEXT",
"null": false
},
"production_recipe_step_machine_alt": {
"description": "Is alternative machine",
"name": "production_recipe_step_machine_alt",
"type": "TINYINT(1)",
"null": false
},
"production_recipe_step_machine_machine": {
"name": "production_recipe_step_machine_machine",
"type": "INT(11)",
"null": false,
"foreignTable": "production_machine",
"foreignKey": "production_machine_id"
},
"production_recipe_step_machine_step": {
"name": "production_recipe_step_machine_step",
"type": "INT(11)",
"null": false,
"foreignTable": "production_recipe_step",
"foreignKey": "production_recipe_step_id"
}
}
}
}
}

View File

@ -10,6 +10,7 @@ return [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionList',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::READ,
@ -21,6 +22,7 @@ return [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::CREATE,
@ -28,25 +30,15 @@ return [
],
],
],
'^/production/process/list(\?.*$|$)' => [
'^/production/view(\?.*$|$)' => [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionProcessList',
'dest' => '\Modules\Production\Controller\BackendController:viewProductionView',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::READ,
'state' => PermissionState::PROCESS,
],
],
],
'^/production/process/create(\?.*$|$)' => [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionProcessCreate',
'verb' => RouteVerb::GET,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::PROCESS,
'state' => PermissionState::PRODUCTION,
],
],
],
@ -54,6 +46,7 @@ return [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionMachineList',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::READ,
@ -65,6 +58,7 @@ return [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionMachineCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::CREATE,
@ -76,6 +70,7 @@ return [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionMachineCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::CREATE,
@ -83,4 +78,40 @@ return [
],
],
],
'^/production/recipe/list(\?.*$|$)' => [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionMachineList',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::READ,
'state' => PermissionState::RECIPE,
],
],
],
'^/production/recipe/create(\?.*$|$)' => [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionMachineCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::RECIPE,
],
],
],
'^/production/recipe/view(\?.*$|$)' => [
[
'dest' => '\Modules\Production\Controller\BackendController:viewProductionMachineCreate',
'verb' => RouteVerb::GET,
'active' => true,
'permission' => [
'module' => BackendController::MODULE_NAME,
'type' => PermissionType::CREATE,
'state' => PermissionState::RECIPE,
],
],
],
];

View File

@ -28,7 +28,8 @@ abstract class PermissionState extends Enum
{
public const PRODUCTION = 1;
public const PROCESS = 2;
public const RECIPE = 2;
public const MACHINE = 3;
}

View File

@ -13,17 +13,16 @@
declare(strict_types=1);
return ['Production' => [
'Article' => '',
'Done' => '',
'Due' => '',
'For' => '',
'Done' => 'Fertig',
'Due' => 'Fällig',
'For' => 'Für',
'Name' => 'Name',
'Ordered' => '',
'Orderer' => '',
'Process' => '',
'Product' => '',
'Productions' => '',
'Quantity' => '',
'Ordered' => 'Bestellt',
'Orderer' => 'Besteller',
'Process' => 'Prozess',
'Product' => 'Product',
'Productions' => 'Produktionen',
'Quantity' => 'Menge',
'Start' => 'Start',
'Status' => '',
'Status' => 'Status',
]];

View File

@ -13,7 +13,6 @@
declare(strict_types=1);
return ['Production' => [
'Article' => 'Article',
'Done' => 'Done',
'Due' => 'Due',
'For' => 'For',