From ef0b2563f31b5991620b079269b44b0862cbc6fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20Michelet?= Date: Fri, 26 Mar 2021 15:46:06 +0100 Subject: [PATCH] activate APE filter on Enthic API Request, and fix some links and add some partners links --- components/dynamicUX/Footer.vue | 4 +- pages/index.vue | 16 +++- plugins/utils.js | 18 ++-- store/config.js | 150 -------------------------------- 4 files changed, 27 insertions(+), 161 deletions(-) diff --git a/components/dynamicUX/Footer.vue b/components/dynamicUX/Footer.vue index 2cdf5b4..64ed4f4 100644 --- a/components/dynamicUX/Footer.vue +++ b/components/dynamicUX/Footer.vue @@ -9,7 +9,7 @@

Aller plus loin

@@ -20,7 +20,7 @@ diff --git a/pages/index.vue b/pages/index.vue index 6d286fd..5fffec5 100644 --- a/pages/index.vue +++ b/pages/index.vue @@ -119,7 +119,19 @@
- logo Enthic + logo Enthic +
+
+ +
+
+ logo Data for Good +
+
+ +
+
+ logo Latitudes
@@ -134,7 +146,7 @@ Logo Wexample
- +
Logo ApiViz diff --git a/plugins/utils.js b/plugins/utils.js index 9da63d9..dadc65c 100644 --- a/plugins/utils.js +++ b/plugins/utils.js @@ -665,15 +665,19 @@ export function searchEndpointGenerator( obj ) { } // loop in selectedFilters to add filters request if any - // find corresponding mapper in endPointConfig - const filterMapper = endpointConfigArgs.find( c => c.app_arg === 'filters') - // console.log("+ + + searchEndpointGenerator / filterMapper : \n ", filterMapper) - if (filterMapper && selectedFilters.length > 0 ){ - const EndpointArg = filterMapper.arg + console.log("+ + + searchEndpointGenerator / selectedFilters : \n ", selectedFilters) + if (selectedFilters.length > 0 ){ + let filterUrlArg = "" for (let index in selectedFilters) { - let argFilterString = EndpointArg + '=' + selectedFilters[index] - argsArray.push(argFilterString) + if (filterUrlArg) { + filterUrlArg += "," + } + else { + filterUrlArg = "ape=" + } + filterUrlArg += selectedFilters[index].slice(selectedFilters[index].length - 2) } + argsArray.push(filterUrlArg) } let baseQuery = "https://api.enthic.fr/company/search/page" diff --git a/store/config.js b/store/config.js index 8c0378e..c4a1fea 100644 --- a/store/config.js +++ b/store/config.js @@ -664,108 +664,6 @@ const emptyConfig = { "has_socials": false, "is_visible": true, "links": [ - { - "icon_class": "", - "is_external_link": true, - "is_visible": true, - "link_text": [ - { - "locale": "en", - "text": "OCF official website" - }, - { - "locale": "es", - "text": "pendiente" - }, - { - "locale": "tr", - "text": "yapılmamış" - }, - { - "locale": "de", - "text": "ungemacht" - }, - { - "locale": "fr", - "text": "Le site officiel d'OCF" - } - ], - "link_to": "http://opencorporatefacts.fr/", - "link_type": "text", - "tooltip": [ - { - "locale": "en", - "text": "More infos" - }, - { - "locale": "es", - "text": "pendiente" - }, - { - "locale": "tr", - "text": "yapılmamış" - }, - { - "locale": "de", - "text": "ungemacht" - }, - { - "locale": "fr", - "text": "Plus d’informations" - } - ] - }, - { - "icon_class": "", - "is_external_link": true, - "is_visible": true, - "link_text": [ - { - "locale": "en", - "text": "OCF's API platform" - }, - { - "locale": "es", - "text": "pendiente" - }, - { - "locale": "tr", - "text": "yapılmamış" - }, - { - "locale": "de", - "text": "ungemacht" - }, - { - "locale": "fr", - "text": "API platform d'OCF" - } - ], - "link_to": "http://opencorporatefacts.fr/api?ui=docs", - "link_type": "text", - "tooltip": [ - { - "locale": "en", - "text": "More infos" - }, - { - "locale": "es", - "text": "pendiente" - }, - { - "locale": "tr", - "text": "yapılmamış" - }, - { - "locale": "de", - "text": "ungemacht" - }, - { - "locale": "fr", - "text": "Plus d’informations" - } - ] - }, { "icon_class": "", "is_external_link": true, @@ -4709,22 +4607,6 @@ const emptyConfig = { } ], "resp_callbacks": [ - { - "args_options": [ - { - "app_arg": "itemId", - "arg": "Corporate", - "default": null, - "in": [ - "url" - ], - "optional": false, - "resp_field_id": "id", - "type": "str" - } - ], - "root_url": "https://opencorporatefacts.fr/api/compte_de_resultats" - }, { "root_sufix": [ { @@ -4791,22 +4673,6 @@ const emptyConfig = { "is_visible": true, "method": "GET", "resp_callbacks": [ - { - "args_options": [ - { - "app_arg": "itemId", - "arg": "Corporate", - "default": null, - "in": [ - "url" - ], - "optional": false, - "resp_field_id": "id", - "type": "str" - } - ], - "root_url": "https://opencorporatefacts.fr/api/compte_de_resultats" - }, { "root_sufix": [ { @@ -4894,22 +4760,6 @@ const emptyConfig = { } ], "resp_callbacks": [ - { - "args_options": [ - { - "app_arg": "itemId", - "arg": "Corporate", - "default": null, - "in": [ - "url" - ], - "optional": false, - "resp_field_id": "id", - "type": "str" - } - ], - "root_url": "https://opencorporatefacts.fr/api/compte_de_resultats" - }, { "root_sufix": [ {