feat(rulebook): Project Rules tab — applicable rules + subscription chips

This commit is contained in:
2026-05-27 22:20:19 -04:00
parent f2afb2a8bf
commit 9658e9a35c
2 changed files with 219 additions and 1 deletions
+8 -1
View File
@@ -5,6 +5,7 @@ import { apiGet, apiPatch, apiDelete, apiPost } from "@/api/client";
import { useToastStore } from "@/stores/toast";
import { relativeTime } from "@/composables/useRelativeTime";
import ShareDialog from "@/components/ShareDialog.vue";
import ProjectRulesTab from "@/components/rules/ProjectRulesTab.vue";
import {
LayoutGrid,
Clock,
@@ -67,7 +68,7 @@ const loading = ref(false);
const saving = ref(false);
const error = ref<string | null>(null);
const activeTab = ref<"tasks" | "notes">("tasks");
const activeTab = ref<"tasks" | "notes" | "rules">("tasks");
const tasks = ref<NoteItem[]>([]);
const notes = ref<NoteItem[]>([]);
@@ -436,6 +437,9 @@ async function confirmDelete() {
Notes
<span v-if="project.summary" class="tab-count">{{ project.summary.note_count }}</span>
</button>
<button :class="['tab-btn', { active: activeTab === 'rules' }]" @click="activeTab = 'rules'">
Rules
</button>
</div>
<!-- Tasks tab milestone-grouped kanban -->
@@ -616,6 +620,9 @@ async function confirmDelete() {
<p v-if="!notes.length" class="empty-msg">No notes in this project.</p>
</template>
</div>
<!-- Rules tab -->
<ProjectRulesTab v-if="activeTab === 'rules'" :project-id="projectId" />
</div>
</div>
</template>