Skip to content

Commit

Permalink
Merge pull request #140 from lcnetdev/fix-genre-form-label
Browse files Browse the repository at this point in the history
Some tweaks to the complexLookupModal for GenreForm
  • Loading branch information
f-osorio authored Nov 22, 2024
2 parents fb5e915 + 1d58749 commit 387c515
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/components/panels/edit/modals/ComplexLookupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,10 @@
}
if (title[0] && typeof title[0] == 'string'){ return title[0]}
let noLang = title.filter((v)=>{ if (v['@language']){return false}else{return true} })
//let noLang = title.filter((v)=>{ if (v['@language']){return false}else{return true} })
//GenreForm seem to have the lang tag even when there is only English values
let noLang = title.filter((v)=> typeof v['@language'] == "undefined" || (v['@language'] && v['@language'] == "en") )
if (noLang && noLang[0] && noLang[0]['@value']){ return noLang[0]['@value']}
return 'ERROR - Cannot find label'
Expand All @@ -231,7 +234,8 @@
}
if (title[0] && typeof title[0] == 'string'){ return []}
let hasLang = title.filter((v)=>{ if (v['@language']){return true}else{return false} })
let hasLang = title.filter((v)=>{ if (v['@language'] && v['@language'] != "en"){return true}else{return false} })
let results = []
for (let l of hasLang){
results.push(`${l['@value']} @ ${l['@language']}`)
Expand Down
2 changes: 1 addition & 1 deletion src/stores/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const useConfigStore = defineStore('config', {

versionMajor: 0,
versionMinor: 16,
versionPatch: 19,
versionPatch: 20,


regionUrls: {
Expand Down

0 comments on commit 387c515

Please sign in to comment.