Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature | BUG] - Handle lang attribute for all Othernames #207

Merged
merged 20 commits into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
2bca2ca
Merge pull request #125 from ror-community/dev
lizkrznarich Jan 3, 2023
422f5c2
Merge pull request #126 from ror-community/staging
lizkrznarich Jan 4, 2023
1d1ddf3
Merge pull request #141 from ror-community/dev
lizkrznarich Jan 5, 2023
47c3dde
Merge pull request #142 from ror-community/staging
lizkrznarich Jan 5, 2023
93ee7f8
Merge pull request #144 from ror-community/dev
lizkrznarich Jan 5, 2023
227ca84
Merge pull request #153 from ror-community/dev
lizkrznarich Jan 9, 2023
013aa95
Merge pull request #154 from ror-community/staging
lizkrznarich Jan 9, 2023
35ac631
Update dependabot.yml
lizkrznarich Jan 10, 2023
840cbea
Merge pull request #174 from ror-community/dev
lizkrznarich Mar 8, 2023
8631486
Merge pull request #175 from ror-community/staging
lizkrznarich Mar 8, 2023
67b3278
Merge pull request #186 from ror-community/dev
lizkrznarich Mar 29, 2023
c600f3f
Merge pull request #187 from ror-community/staging
lizkrznarich Mar 29, 2023
911bd1c
Merge pull request #192 from ror-community/dev
lizkrznarich Oct 5, 2023
07659fe
Merge pull request #193 from ror-community/staging
lizkrznarich Oct 5, 2023
b931f02
Merge pull request #196 from ror-community/dev
lizkrznarich Jan 17, 2024
1da06f2
Merge pull request #197 from ror-community/staging
lizkrznarich Jan 17, 2024
3e9181d
Update UI to support V2 API (#204) (#205)
kaysiz Apr 2, 2024
3db61ba
Add lang to all otherNames
kaysiz Apr 12, 2024
c8dbf90
Handle api urls for different envs for the json schema url
kaysiz Apr 12, 2024
c085d86
Merge branch 'dev' into feature-v2-name-type-lang
kaysiz Apr 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
target-branch: "dev"
interval: "weekly"
target-branch: "dependabot-updates"
17 changes: 10 additions & 7 deletions app/components/v2/organization-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ 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
Expand All @@ -45,13 +46,15 @@ export default Component.extend({
return result;
}, {});

if (groupedNames.label) {
groupedNames.label.forEach((label) => {
if (label.lang && !label.value.includes(`(${label.lang})`)) {
label.value = `${label.value} (${label.lang})`;
}
});
}
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})`;
}
});
}
};

const values = Object.values(groupedNames).flat().map(item => item.value).join(', ');

Expand Down
7 changes: 7 additions & 0 deletions app/services/config-service.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
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
});
2 changes: 1 addition & 1 deletion app/templates/components/v2/organization-item.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
{{#link-to "organizations.show" model.id class="btn btn-sm btn-round"}}View details{{/link-to}}
{{/if}}
{{#if (not isSearch)}}
<p class="mt-3 mb-0"><i>Some record data is not displayed in this view. <a target="_blank" rel="noopener" href="https://api.ror.org/v2/organizations/{{model.id}}">See JSON view for full record data</a></i></p>
<p class="mt-3 mb-0"><i>Some record data is not displayed in this view. <a target="_blank" rel="noopener" href="{{configService.API_URL_V2}}/organizations/{{model.id}}">See JSON view for full record data</a></i></p>
<p class="mt-3 mb-0">
<i>
{{#if lastModifiedDate}}
Expand Down