Implement project board status workflow

This commit is contained in:
2026-03-25 08:04:34 +01:00
parent f7a0543ea1
commit 7e767b0c6c
22 changed files with 1076 additions and 7 deletions
+64 -3
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
import { Form, Head, Link } from '@inertiajs/vue3';
import ProjectBacklogController from '@/actions/App/Http/Controllers/ProjectBacklogController';
import ProjectBoardController from '@/actions/App/Http/Controllers/ProjectBoardController';
import Heading from '@/components/Heading.vue';
import InputError from '@/components/InputError.vue';
import { Badge } from '@/components/ui/badge';
@@ -15,6 +16,7 @@ import {
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import AppLayout from '@/layouts/AppLayout.vue';
import { index as boardIndex } from '@/routes/projects/board';
import { index as backlogIndex } from '@/routes/projects/backlog';
import { index, show } from '@/routes/projects';
import { metadata as metadataSettings } from '@/routes/projects/settings';
@@ -59,9 +61,15 @@ const hasTicketMetadata =
/>
</div>
<Button as-child variant="outline">
<Link :href="show(project.id)">Back to project</Link>
</Button>
<div class="flex flex-wrap gap-3">
<Button as-child variant="outline">
<Link :href="boardIndex(project.id)">Open board</Link>
</Button>
<Button as-child variant="outline">
<Link :href="show(project.id)">Back to project</Link>
</Button>
</div>
</div>
<div
@@ -222,6 +230,12 @@ const hasTicketMetadata =
<th class="px-4 py-3 font-medium">
Priority
</th>
<th
v-if="canEditTickets"
class="px-4 py-3 font-medium"
>
Move to board
</th>
</tr>
</thead>
<tbody class="divide-y divide-border">
@@ -254,6 +268,53 @@ const hasTicketMetadata =
<td class="px-4 py-4 text-muted-foreground">
{{ ticket.ticket_priority.name }}
</td>
<td v-if="canEditTickets" class="px-4 py-4">
<Form
v-if="boardColumns.length > 0"
v-bind="
ProjectBoardController.move.form(
{
project: project.id,
ticket: ticket.id,
},
)
"
class="flex flex-col gap-2 sm:flex-row"
v-slot="{ processing }"
>
<input
type="hidden"
name="redirect_to"
value="backlog"
/>
<select
name="board_column_id"
class="min-w-44 rounded-md border border-input bg-background px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50"
>
<option
v-for="boardColumn in boardColumns"
:key="boardColumn.id"
:value="boardColumn.id"
>
{{ boardColumn.name }}
</option>
</select>
<Button
type="submit"
size="sm"
:disabled="processing"
>
Move
</Button>
</Form>
<span
v-else
class="text-sm text-muted-foreground"
>
Add board columns first.
</span>
</td>
</tr>
</tbody>
</table>