37 lines
1.5 KiB
Vue
37 lines
1.5 KiB
Vue
<script setup lang="ts">
|
|
import { Head } from '@inertiajs/vue3';
|
|
import { computed } from 'vue';
|
|
import ProjectTemplateForm from '@/components/projects/ProjectTemplateForm.vue';
|
|
import { useLocalization } from '@/composables/useLocalization';
|
|
import AppLayout from '@/layouts/AppLayout.vue';
|
|
import { index, edit } from '@/routes/project-templates';
|
|
import type { BreadcrumbItem, ProjectTemplatesEditPageProps } from '@/types';
|
|
const props = defineProps<ProjectTemplatesEditPageProps>();
|
|
const { t } = useLocalization();
|
|
const breadcrumbs = computed<BreadcrumbItem[]>(() => [
|
|
{ title: t('navigation.templates'), href: index() },
|
|
{ title: props.template.name, href: edit(props.template.id) },
|
|
]);
|
|
</script>
|
|
|
|
<template>
|
|
<AppLayout :breadcrumbs="breadcrumbs">
|
|
<Head :title="t('templates.editTitle', { name: template.name })" />
|
|
<div class="p-page gap-page mx-auto grid w-full min-w-0 max-w-6xl">
|
|
<header class="gap-stack grid">
|
|
<h1 class="text-headline-mobile md:text-headline break-words">
|
|
{{ t('templates.editTitle', { name: template.name }) }}
|
|
</h1>
|
|
<p class="text-muted-foreground">
|
|
{{ t('templates.editDescription') }}
|
|
</p>
|
|
</header>
|
|
<ProjectTemplateForm
|
|
:key="template.id"
|
|
:template="template"
|
|
:copy-area-options="copyAreaOptions"
|
|
/>
|
|
</div>
|
|
</AppLayout>
|
|
</template>
|