diff --git a/sql/data_fr.sql b/sql/data_fr.sql index 5725a38dbec989e67b58c5e80c0f59dfff596e87..22613fd79f0b4334ce4e71ce760c8b0ff27a83f6 100755 --- a/sql/data_fr.sql +++ b/sql/data_fr.sql @@ -1682,8 +1682,8 @@ INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_val INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (1, 'initiator', TRUE, null, 'process'); INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (1, 'destination', TRUE, null, 'process'); INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (1, 'processLimitDate', TRUE, null, 'process'); -INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (1, 'folder', FALSE, null, 'classement'); -INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (1, 'tags', FALSE, null, 'classement'); +INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (1, 'folder', FALSE, null, 'classifying'); +INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (1, 'tags', FALSE, null, 'classifying'); /* Départ */ INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'doctype', TRUE, null, 'mail'); @@ -1697,8 +1697,8 @@ INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_val INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'initiator', TRUE, null, 'process'); INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'destination', TRUE, null, 'process'); INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'processLimitDate', TRUE, null, 'process'); -INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'folder', FALSE, null, 'classement'); -INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'tags', FALSE, null, 'classement'); +INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'folder', FALSE, null, 'classifying'); +INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (2, 'tags', FALSE, null, 'classifying'); /* Interne */ INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'doctype', TRUE, null, 'mail'); @@ -1711,8 +1711,8 @@ INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_val INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'initiator', TRUE, null, 'process'); INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'destination', TRUE, null, 'process'); INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'processLimitDate', TRUE, null, 'process'); -INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'folder', FALSE, null, 'classement'); -INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'tags', FALSE, null, 'classement'); +INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'folder', FALSE, null, 'classifying'); +INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (3, 'tags', FALSE, null, 'classifying'); /* GED */ INSERT INTO indexing_models_fields (model_id, identifier, mandatory, default_value, unit) VALUES (4, 'doctype', TRUE, null, 'mail'); diff --git a/src/app/resource/controllers/IndexingController.php b/src/app/resource/controllers/IndexingController.php index 52b45441307fad0e7c662feba935390d9aa2bcf6..09302c9cb4c33ce1752dd24e939c2a3393f43508 100755 --- a/src/app/resource/controllers/IndexingController.php +++ b/src/app/resource/controllers/IndexingController.php @@ -122,13 +122,22 @@ class IndexingController } $actions = []; + $categories = ResModel::getCategories(); + foreach ($indexingParameters['indexingParameters']['actions'] as $value) { $action = ActionModel::getById(['id' => $value, 'select' => ['id', 'label_action', 'component', 'id_status']]); $categoriesList = ActionModel::getCategoriesById(['id' => $value]); - $action['label'] = $action['label_action']; - $action['enabled'] = !empty($action['id_status']) && $action['id_status'] != '_NOSTATUS_'; - $action['categories'] = array_column($categoriesList, 'category_id'); + $action['label'] = $action['label_action']; + $action['enabled'] = !empty($action['id_status']) && $action['id_status'] != '_NOSTATUS_'; + + if (!empty($categoriesList)) { + $action['categories'] = array_column($categoriesList, 'category_id'); + } else { + foreach ($categories as $category) { + $action['categories'][] = $category['id']; + } + } unset($action['label_action'], $action['id_status']); $actions[] = $action; } diff --git a/src/frontend/app/process/process.component.ts b/src/frontend/app/process/process.component.ts index b4142351c88fa707d7b156f71bf525653930245d..05a744779cf987191c4f8feeb293398c379c5da5 100644 --- a/src/frontend/app/process/process.component.ts +++ b/src/frontend/app/process/process.component.ts @@ -20,7 +20,7 @@ import { DocumentViewerComponent } from '../viewer/document-viewer.component'; templateUrl: "process.component.html", styleUrls: [ 'process.component.scss', - '/../indexation/indexing-form/indexing-form.component.scss' + '../indexation/indexing-form/indexing-form.component.scss' ], providers: [NotificationService, AppService, ActionsService], })