feat(defects): file a defect via a board-section modal (T5)
POST /api/defects validates the body with arktype (known section, uuid project, non-empty trimmed verbatim) and resolves the reporter through a dev seam (getReporter, ADR 0002) until OAuth lands. DefectForm is a DaisyUI modal opened by a section click — pick a project, describe the problem, submit.
This commit is contained in:
@@ -1,13 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
const selected = ref<string | null>(null)
|
||||
// Andon reporting view (F2): the board is the entry point — clicking a section
|
||||
// opens the defect form for it.
|
||||
const selectedSectionId = ref<string | null>(null)
|
||||
const confirmation = ref<string | null>(null)
|
||||
|
||||
function onFiled() {
|
||||
selectedSectionId.value = null
|
||||
confirmation.value = 'Thanks — your report was filed.'
|
||||
setTimeout(() => (confirmation.value = null), 4000)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<main>
|
||||
<h1>Andon — report a board problem</h1>
|
||||
<BoardView @select="(id) => (selected = id)" />
|
||||
<p v-if="selected">
|
||||
Selected section: <code>{{ selected }}</code> — the defect form arrives in Task 5.
|
||||
</p>
|
||||
<main class="mx-auto flex max-w-5xl flex-col items-center gap-6 p-6">
|
||||
<header class="text-center">
|
||||
<h1>Andon — report a board problem</h1>
|
||||
<p class="opacity-70">Click a section to report a problem.</p>
|
||||
</header>
|
||||
|
||||
<BoardView @select="(id) => (selectedSectionId = id)" />
|
||||
|
||||
<DefectForm
|
||||
:section-id="selectedSectionId"
|
||||
@close="selectedSectionId = null"
|
||||
@filed="onFiled"
|
||||
/>
|
||||
|
||||
<div v-if="confirmation" class="toast toast-end">
|
||||
<div class="alert alert-success">{{ confirmation }}</div>
|
||||
</div>
|
||||
</main>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user