Skip to content

Commit

Permalink
Fix Build Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ltouroumov committed Aug 26, 2023
1 parent 0ef03b4 commit edb9a56
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
17 changes: 9 additions & 8 deletions components/viewer/ViewBackpack.vue
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ const { toggleBackpack } = useViewerStore();
const { isBackpackVisible } = useViewerRefs();
const packRows = computed(() => {
const choicesByGroup: Record<string, { obj: ProjectObj; row: ProjectRow }> =
R.groupBy(
({ row }) => row.resultGroupId,
R.map(
(id: string) => ({ obj: getObject(id), row: getRow(getObjectRow(id)) }),
selected.value,
),
);
const choicesByGroup: Partial<
Record<string, { obj: ProjectObj; row: ProjectRow }[]>
> = R.groupBy(
({ row }) => row.resultGroupId,
R.map(
(id: string) => ({ obj: getObject(id), row: getRow(getObjectRow(id)) }),
selected.value,
),
);
return R.chain(
(row: ProjectRow) =>
Expand Down
9 changes: 9 additions & 0 deletions composables/store/project.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -92,6 +100,7 @@ export const useProjectStore = defineStore('project', () => {
getObject,
getObjectRow,
setSelected,
conditions,
};
});

Expand Down
1 change: 0 additions & 1 deletion plugins/bootstrap.js

This file was deleted.

0 comments on commit edb9a56

Please sign in to comment.