From ab007cd525e2a8ef8f018449b8446dd3b518b365 Mon Sep 17 00:00:00 2001 From: Armand Bahi <armand.bahi@veremes.com> Date: Mon, 25 Feb 2019 17:30:43 +0100 Subject: [PATCH] =?UTF-8?q?Probl=C3=A8me=20avec=20l'affichage=20de=20type?= =?UTF-8?q?=20d'effluent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...isie_anc_controle_controle_evacuation.json | 63 ++++++++++--------- .../anc_saisie_anc_evacuation_eaux.json | 61 +++++++++--------- .../module/javascript/script_module.js | 12 ++-- 3 files changed, 71 insertions(+), 65 deletions(-) diff --git a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json index fcfab0b9..063c5402 100755 --- a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json +++ b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_controle_controle_evacuation.json @@ -521,7 +521,7 @@ "nb_cols":12, "javascript":false, "rows":[ - + ] }, "insert":{ @@ -816,24 +816,19 @@ { "fields":[ { - "type":"radio", + "type":"select", "name":"evac_is_type_effl", "label":"Type d'effluent", "nb_cols":4, "id":"evac_is_type_effl_16_1", - "options":{ - "choices":[ - { - "label":"Oui", - "value":true, - "$$hashKey":"object:39384" - }, - { - "label":"Non", - "value":false, - "$$hashKey":"object:39385" - } - ] + "datasource":{ + "datasource_id":"datasource_12", + "sort_order":"ASC", + "distinct":"true", + "label_key":"alias", + "order_by":"alias", + "id_key":"valeur", + "attributs":"valeur|alias" } }, { @@ -1636,24 +1631,19 @@ { "fields":[ { - "type":"radio", + "type":"select", "name":"evac_is_type_effl", "label":"Type d'effluent", "nb_cols":4, "id":"evac_is_type_effl_16_1", - "options":{ - "choices":[ - { - "label":"Oui", - "value":true, - "$$hashKey":"object:35340" - }, - { - "label":"Non", - "value":false, - "$$hashKey":"object:35341" - } - ] + "datasource":{ + "datasource_id":"datasource_12", + "sort_order":"ASC", + "distinct":"true", + "label_key":"alias", + "order_by":"alias", + "id_key":"valeur", + "attributs":"valeur|alias" } }, { @@ -2358,6 +2348,19 @@ }, "ressource_id":"vitis/genericquerys", "id":"datasource_11" + }, + "datasource_12":{ + "type":"web_service", + "dataType":"tableValue", + "name":"evac_is_type_effl", + "description":"", + "parameters":{ + "schema":"s_anc", + "table":"param_liste", + "filter": {"id_nom_table": "evacuation_eaux", "nom_liste": "evac_is_type_effl"} + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_12" } } -} \ No newline at end of file +} diff --git a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json index 2df0cd8e..25479c2a 100755 --- a/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json +++ b/src/module_anc/module/forms/anc_saisie/anc_saisie_anc_evacuation_eaux.json @@ -908,24 +908,19 @@ { "fields":[ { - "type":"radio", + "type":"select", "name":"evac_is_type_effl", "label":"Type d'effluent", "nb_cols":4, "id":"evac_is_type_effl_16_1", - "options":{ - "choices":[ - { - "label":"Oui", - "value":true, - "$$hashKey":"object:39384" - }, - { - "label":"Non", - "value":false, - "$$hashKey":"object:39385" - } - ] + "datasource":{ + "datasource_id":"datasource_12", + "sort_order":"ASC", + "distinct":"true", + "label_key":"alias", + "order_by":"alias", + "id_key":"valeur", + "attributs":"valeur|alias" } }, { @@ -1734,24 +1729,19 @@ { "fields":[ { - "type":"radio", + "type":"select", "name":"evac_is_type_effl", "label":"Type d'effluent", "nb_cols":4, "id":"evac_is_type_effl_16_1", - "options":{ - "choices":[ - { - "label":"Oui", - "value":true, - "$$hashKey":"object:35340" - }, - { - "label":"Non", - "value":false, - "$$hashKey":"object:35341" - } - ] + "datasource":{ + "datasource_id":"datasource_12", + "sort_order":"ASC", + "distinct":"true", + "label_key":"alias", + "order_by":"alias", + "id_key":"valeur", + "attributs":"valeur|alias" } }, { @@ -2457,6 +2447,19 @@ }, "ressource_id":"vitis/genericquerys", "id":"datasource_11" + }, + "datasource_12":{ + "type":"web_service", + "dataType":"tableValue", + "name":"evac_is_type_effl", + "description":"", + "parameters":{ + "schema":"s_anc", + "table":"param_liste", + "filter": {"id_nom_table": "evacuation_eaux", "nom_liste": "evac_is_type_effl"} + }, + "ressource_id":"vitis/genericquerys", + "id":"datasource_12" } } -} \ No newline at end of file +} diff --git a/src/module_anc/module/javascript/script_module.js b/src/module_anc/module/javascript/script_module.js index 81e39224..c086d26a 100755 --- a/src/module_anc/module/javascript/script_module.js +++ b/src/module_anc/module/javascript/script_module.js @@ -944,9 +944,9 @@ vitisApp.on('appMainDrtvLoaded', function () { var aFormFieldsToConcat = [envSrvc["sMode"] + "_button", "id_eva", "id_installation", "id_controle"]; var oFormFieldsToDisplay, aFormFieldsToDisplay = []; oFormFieldsToDisplay = { - "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"], - "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm"], - "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_rp_grav", "evac_rp_tamp", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"] + "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_is_type_effl", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"], + "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm", "evac_hs_type_eff"], + "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_type_effl", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"] }; if (envSrvc["sMode"] == "insert") $rootScope["displayFormFields"](aFormFieldsToConcat); @@ -1311,9 +1311,9 @@ vitisApp.on('appMainDrtvLoaded', function () { var aFormFieldsToConcat = [envSrvc["sMode"] + "_button", "id_eva", "id_installation", "id_controle"]; var oFormFieldsToDisplay, aFormFieldsToDisplay = []; oFormFieldsToDisplay = { - "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"], - "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm"], - "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_rp_grav", "evac_rp_tamp", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul"] + "BON FONCTIONNEMENT": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_is_acc_reg", "evac_rp_grav", "evac_rp_tamp", "evac_rp_type_eff", "evac_rp_trap", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_type", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul", "evac_is_type_effl"], + "CONCEPTION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_rp_etude_hydrogeol", "evac_rp_rejet", "evac_hs_type", "evac_hs_gestionnaire", "evac_hs_gestionnaire_auth", "evac_commentaires", "maj", "maj_date", "create", "create_date", "photos_f", "fiche_f", "schema_f", "documents_f", "plan_f", "Element_0", "Element_1", "Element_2", "Element_3", "Element_4", "evac_is_inf_perm", "evac_hs_type_eff"], + "REALISATION": ["evacuation_eaux.id_eva", "id_controle", "evac_type", "evac_is_long", "evac_is_larg", "evac_is_surface", "evac_is_profondeur", "evac_is_geotex", "evac_is_rac", "evac_is_hum", "evac_is_reg_rep", "evac_is_reb_bcl", "evac_is_veg", "evac_rp_grav", "evac_rp_tamp", "evac_hs_type", "evac_commentaires", "maj", "maj_date", "create", "create_date", "Element_0", "Element_1", "Element_2", "Element_4", "evac_is_lin_total", "evac_rp_bons_grav", "evac_hs_intr", "evac_hs_type_eff", "evac_hs_ecoul", "evac_is_type_effl", "evac_rp_type_eff"] }; if (typeof (oParentFormValues["controle_type"]) == "string") var sControleType = oParentFormValues["controle_type"]; -- GitLab