This commit is contained in:
2023-07-28 16:50:46 +02:00
parent 8974721c9c
commit f32f13604f
5 changed files with 119 additions and 25 deletions

View File

@@ -19,7 +19,14 @@ function createCategory() {
<InertiaHead title="Nowa kategoria" />
<div class="p-4">
<header class="pb-4">
<h1 class="text-3xl font-roboto font-light">Nowa kategoria</h1>
<div class="flex items-center gap-2">
<InertiaLink
as="button"
href="/dashboard"
class="px-2 text-xl text-gray-700 hover:text-black"
title="Wróc do dashboard"><FontAwesomeIcon :icon="['fas', 'caret-left']" /></InertiaLink>
<h1 class="text-3xl font-roboto font-light">Nowa kategoria</h1>
</div>
</header>
<div>
<form class="flex flex-col gap-4" @submit.prevent="createCategory">

View File

@@ -30,10 +30,23 @@ function updateProject() {
</script>
<template>
<InertiaHead title="Nowy projekt" />
<InertiaHead title="Edytuj projekt" />
<div class="p-4">
<header class="pb-4">
<h1 class="text-3xl font-roboto font-light">Edytuj {{ category.name }}</h1>
<header class="flex items-center justify-between pb-4">
<div class="flex items-center gap-2">
<InertiaLink
as="button"
href="/dashboard"
class="px-2 text-xl text-gray-700 hover:text-black"
title="Wróc do dashboard"><FontAwesomeIcon :icon="['fas', 'caret-left']" /></InertiaLink>
<h1 class="text-3xl font-roboto font-light">Edytuj {{ category.name }}</h1>
</div>
<InertiaLink
as="button"
:href="`/dashboard/category/${category.id}/delete`"
class="flex items-center gap-2 px-2 py-1 text-red-600 hover:text-white hover:bg-red-600 rounded-md"
title="Usuń kategorię"
><FontAwesomeIcon :icon="['fas', 'trash']" />Usuń</InertiaLink>
</header>
<div>
<form class="flex flex-col gap-4" @submit.prevent="updateProject">