Files
KanbanGit/resources/js/pages/projects/Show.vue
T

101 lines
3.2 KiB
Vue

<script setup lang="ts">
import { Head, Link } from '@inertiajs/vue3';
import { LayoutGrid, ListTodo, Settings2 } from 'lucide-vue-next';
import Heading from '@/components/Heading.vue';
import { Badge } from '@/components/ui/badge';
import { Button } from '@/components/ui/button';
import {
Card,
CardContent,
CardDescription,
CardHeader,
CardTitle,
} from '@/components/ui/card';
import AppLayout from '@/layouts/AppLayout.vue';
import { index, show } from '@/routes/projects';
import type { BreadcrumbItem, ProjectShowPageProps } from '@/types';
const props = defineProps<ProjectShowPageProps>();
const breadcrumbs: BreadcrumbItem[] = [
{
title: 'Projects',
href: index(),
},
{
title: props.project.name,
href: show(props.project.id),
},
];
const projectAreas = [
{
title: 'Backlog',
description:
'This area will receive new tickets first and act as the intake queue for project work.',
icon: ListTodo,
},
{
title: 'Board',
description:
'This area will become the configurable Kanban board with project-specific columns.',
icon: LayoutGrid,
},
{
title: 'Project settings',
description:
'This area will host project-level configuration such as ticket metadata and workflow options.',
icon: Settings2,
},
];
</script>
<template>
<AppLayout :breadcrumbs="breadcrumbs">
<Head :title="project.name" />
<div class="flex flex-1 flex-col gap-6 p-4">
<div
class="flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between"
>
<div class="space-y-3">
<Badge variant="outline" class="px-3 py-1">
{{ project.key }}
</Badge>
<Heading
:title="project.name"
description="Project hub for the upcoming backlog, board, and settings work."
/>
</div>
<Button as-child variant="outline">
<Link :href="index()">Back to projects</Link>
</Button>
</div>
<div class="grid gap-4 md:grid-cols-3">
<Card
v-for="area in projectAreas"
:key="area.title"
class="h-full"
>
<CardHeader>
<div
class="mb-3 flex size-10 items-center justify-center rounded-full bg-muted text-foreground"
>
<component :is="area.icon" class="size-5" />
</div>
<CardTitle>{{ area.title }}</CardTitle>
<CardDescription>{{
area.description
}}</CardDescription>
</CardHeader>
<CardContent class="text-sm text-muted-foreground">
Coming next in the project workflow implementation.
</CardContent>
</Card>
</div>
</div>
</AppLayout>
</template>