kamilcraft-api/resources/js/Pages/CV/ConfirmDelete.vue

38 lines
1.4 KiB
Vue

<script setup>
import { router } from '@inertiajs/vue3';
const props = defineProps({
cv: {
type: Object,
required: true,
},
});
function confirmDelete() {
router.delete(`/dashboard/cv/${props.cv.token}/delete`);
}
</script>
<template>
<InertiaHead title="Usuwanie CV" />
<div class="p-4">
<header class="pb-4">
<h1 class="text-3xl font-roboto font-light">Usuwanie CV</h1>
</header>
<div class="max-w-[600px]">
<p class="mb-4">Na pewno usunąć CV dla firmy {{ cv.recipient }}?</p>
<div class="grid grid-cols-3 gap-2">
<InertiaLink
as="button"
href="/dashboard/cv"
class="col-span-1 flex justify-center items-center gap-3 w-full px-2 py-1 border-t-4 border-b-4 border-transparent hover:border-b-black"
><FontAwesomeIcon :icon="['fas', 'backward']" />Anuluj</InertiaLink>
<button
@click.prevent="confirmDelete"
class="col-span-2 flex justify-center items-center gap-3 w-full px-2 py-1 rounded-md bg-red-600 border-4 border-red-600 text-white text-lg hover:bg-transparent hover:text-red-600"
><FontAwesomeIcon :icon="['fas', 'trash']" /><span class="whitespace-nowrap overflow-hidden overflow-ellipsis">Usuń CV dla firmy {{ cv.recipient }}</span></button>
</div>
</div>
</div>
</template>