diff --git a/components/viewer/ViewBackpack.vue b/components/viewer/ViewBackpack.vue index babd31e..dfa584d 100644 --- a/components/viewer/ViewBackpack.vue +++ b/components/viewer/ViewBackpack.vue @@ -43,14 +43,15 @@ const { toggleBackpack } = useViewerStore(); const { isBackpackVisible } = useViewerRefs(); const packRows = computed(() => { - const choicesByGroup: Record = - R.groupBy( - ({ row }) => row.resultGroupId, - R.map( - (id: string) => ({ obj: getObject(id), row: getRow(getObjectRow(id)) }), - selected.value, - ), - ); + const choicesByGroup: Partial< + Record + > = R.groupBy( + ({ row }) => row.resultGroupId, + R.map( + (id: string) => ({ obj: getObject(id), row: getRow(getObjectRow(id)) }), + selected.value, + ), + ); return R.chain( (row: ProjectRow) => diff --git a/composables/store/project.ts b/composables/store/project.ts index b3b0a86..7bc59fe 100644 --- a/composables/store/project.ts +++ b/composables/store/project.ts @@ -71,6 +71,14 @@ export const useProjectStore = defineStore('project', () => { project.value = null; }; + const conditions = computed(() => + R.pipe( + R.chain((row: ProjectRow) => + R.map((obj: ProjectObj) => [row, obj], row.objects), + ), + )(project.value?.data.rows ?? []), + ); + const setSelected = (id: string, isSelected: boolean) => { console.log(`setSelected(${id}, ${isSelected})`); if (isSelected) { @@ -92,6 +100,7 @@ export const useProjectStore = defineStore('project', () => { getObject, getObjectRow, setSelected, + conditions, }; }); diff --git a/plugins/bootstrap.js b/plugins/bootstrap.js deleted file mode 100644 index 0d0c201..0000000 --- a/plugins/bootstrap.js +++ /dev/null @@ -1 +0,0 @@ -import 'bootstrap/dist/js/bootstrap.bundle';