diff --git a/frontend/src/components/project/project.svelte b/frontend/src/components/project/project.svelte
index 78c178b..720f6e2 100644
--- a/frontend/src/components/project/project.svelte
+++ b/frontend/src/components/project/project.svelte
@@ -25,29 +25,40 @@
{#if project}
- {#if view && $projectTags[view.primary_tag_id] && $cards}
-
-
- {#each $projectTags[view.primary_tag_id].options as option}
+ {#if view}
+
+ {#if cards}
+
+ {#if view.primary_tag_id !== -1}
+ {#each $projectTags[view.primary_tag_id].options as option}
+
+ c.tags.map((t) => t.option_id).includes(option.id)
+ )}
+ projectId={project.id}
+ />
+ {/each}
+ {/if}
c.tags.map((t) => t.option_id).includes(option.id))}
+ option={{
+ id: -1,
+ tag_id: view.primary_tag_id,
+ value:
+ view.primary_tag_id !== -1
+ ? `No ${$projectTags[view.primary_tag_id].title}`
+ : 'No groups'
+ }}
+ columnCards={view.primary_tag_id !== -1
+ ? $cards.filter(
+ (c) => !c.tags.map((t) => t.tag_id).includes(view?.primary_tag_id || -2)
+ )
+ : $cards}
projectId={project.id}
+ editable={false}
/>
- {/each}
- !c.tags.map((t) => t.tag_id).includes(view?.primary_tag_id || -2)
- )}
- projectId={project.id}
- editable={false}
- />
-
+
+ {/if}
{/if}
{/if}
diff --git a/frontend/src/components/sidebar.svelte b/frontend/src/components/sidebar.svelte
index 26d8ad4..201296b 100644
--- a/frontend/src/components/sidebar.svelte
+++ b/frontend/src/components/sidebar.svelte
@@ -6,6 +6,7 @@
import ViewIcon from './icons/viewIcon.svelte';
import projectTags from '../stores/projectTags';
import EditIcon from './icons/editIcon.svelte';
+ import { get } from 'svelte/store';
export let project: Project;
@@ -15,10 +16,10 @@
onMount(async () => {
await views.init(project.id);
- if ($views.length > 0) currentView.set($views[0]);
+ if ($views && $views.length > 0) currentView.set($views[0]);
});
- async function newView() {
+ async function createView() {
if (!$views) return;
const primaryTagId =
@@ -35,7 +36,6 @@
}
async function saveView(view: View) {
- await tick();
if (!view || !$views.includes(view)) return;
if (viewEditId === view.id && viewEditValue !== view.title) {
if (!(await views.edit(view))) return;
@@ -53,10 +53,10 @@
v0.0.1