feat(rulebook): Project Rules tab — applicable rules + subscription chips
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user