mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-10 09:23:58 +08:00
Merge pull request #7869 from rekonder/aj_SCI_11074
Fix displaying of checklist items for repository snapshots [SCI-11074]
This commit is contained in:
commit
c53034359a
1 changed files with 3 additions and 15 deletions
|
@ -16,14 +16,14 @@
|
||||||
>
|
>
|
||||||
</select-dropdown>
|
</select-dropdown>
|
||||||
</div>
|
</div>
|
||||||
<div v-else-if="computedArrOfItemObjects && computedArrOfItemObjects.length > 0"
|
<div v-else-if="colVal && colVal.length > 0"
|
||||||
class="text-sn-dark-grey font-inter text-sm font-normal leading-5 w-[370px] overflow-x-auto flex flex-wrap gap-1">
|
class="text-sn-dark-grey font-inter text-sm font-normal leading-5 w-[370px] overflow-x-auto flex flex-wrap gap-1">
|
||||||
<span v-for="(checklistItem, index) in computedArrOfItemObjects"
|
<span v-for="(checklistItem, index) in colVal"
|
||||||
:key="index"
|
:key="index"
|
||||||
:id="`checklist-item-${index}`"
|
:id="`checklist-item-${index}`"
|
||||||
class="flex w-fit break-words">
|
class="flex w-fit break-words">
|
||||||
{{
|
{{
|
||||||
index + 1 === computedArrOfItemObjects.length
|
index + 1 === colVal.length
|
||||||
? checklistItem?.label
|
? checklistItem?.label
|
||||||
: `${checklistItem?.label} |`
|
: `${checklistItem?.label} |`
|
||||||
}}
|
}}
|
||||||
|
@ -66,18 +66,6 @@ export default {
|
||||||
this.selectedChecklistItemsIds = this.colVal.map((item) => String(item.value));
|
this.selectedChecklistItemsIds = this.colVal.map((item) => String(item.value));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
|
||||||
computedArrOfItemObjects() {
|
|
||||||
const arrOfItemObjects = this.selectedChecklistItemsIds.map((id) => {
|
|
||||||
const matchingItem = this.availableChecklistItems.find((item) => item[0] === id);
|
|
||||||
return {
|
|
||||||
id: matchingItem ? matchingItem[0] : null,
|
|
||||||
label: matchingItem ? matchingItem[1] : null
|
|
||||||
};
|
|
||||||
});
|
|
||||||
return arrOfItemObjects;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
fetchChecklistItems() {
|
fetchChecklistItems() {
|
||||||
this.isLoading = true;
|
this.isLoading = true;
|
||||||
|
|
Loading…
Reference in a new issue