From 5cdce5ec4689c5df1542e13b1b8cc08105fe8912 Mon Sep 17 00:00:00 2001 From: kudakwashe siziva <9620622+kaysiz@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:28:19 +0200 Subject: [PATCH] Revert "[Feature | BUG] - Handle lang attribute for all Othernames (#209)" (#210) This reverts commit 1bd446610befc4289f9e48cd21b28290e3ba9af7. --- .github/dependabot.yml | 4 ++-- app/components/v2/organization-item.js | 17 +++++++---------- app/services/config-service.js | 7 ------- .../components/v2/organization-item.hbs | 2 +- 4 files changed, 10 insertions(+), 20 deletions(-) delete mode 100644 app/services/config-service.js diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 28ac612f..9da5a41c 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -5,5 +5,5 @@ updates: - package-ecosystem: "npm" directory: "/" schedule: - interval: "weekly" - target-branch: "dependabot-updates" + interval: "daily" + target-branch: "dev" \ No newline at end of file diff --git a/app/components/v2/organization-item.js b/app/components/v2/organization-item.js index 4c2a4826..beb305cd 100644 --- a/app/components/v2/organization-item.js +++ b/app/components/v2/organization-item.js @@ -20,7 +20,6 @@ export default Component.extend({ lastModifiedDate: null, otherNames: null, organizationTypes: null, - configService: service('config-service'), // Convert label array into a dictionary with relationship type as key @@ -46,15 +45,13 @@ export default Component.extend({ return result; }, {}); - for (let key in groupedNames) { - if (groupedNames[key]) { - groupedNames[key].forEach((item) => { - if (item.lang && !item.value.includes(`(${item.lang})`)) { - item.value = `${item.value} (${item.lang})`; - } - }) - } - }; + if (groupedNames.label) { + groupedNames.label.forEach((label) => { + if (label.lang && !label.value.includes(`(${label.lang})`)) { + label.value = `${label.value} (${label.lang})`; + } + }); + } const values = Object.values(groupedNames).flat().map(item => item.value).join(', '); diff --git a/app/services/config-service.js b/app/services/config-service.js deleted file mode 100644 index 1740fb1a..00000000 --- a/app/services/config-service.js +++ /dev/null @@ -1,7 +0,0 @@ -import Service from '@ember/service'; -import config from '../config/environment'; - -export default Service.extend({ - API_URL_V1: config.API_URL_V1, - API_URL_V2: config.API_URL_V2 -}); \ No newline at end of file diff --git a/app/templates/components/v2/organization-item.hbs b/app/templates/components/v2/organization-item.hbs index 9c50c7be..3fdab904 100644 --- a/app/templates/components/v2/organization-item.hbs +++ b/app/templates/components/v2/organization-item.hbs @@ -139,7 +139,7 @@ {{#link-to "organizations.show" model.id class="btn btn-sm btn-round"}}View details{{/link-to}} {{/if}} {{#if (not isSearch)}} -
Some record data is not displayed in this view. See JSON view for full record data
+Some record data is not displayed in this view. See JSON view for full record data
{{#if lastModifiedDate}}