40 lines
1.3 KiB
Vue
40 lines
1.3 KiB
Vue
<script setup lang="ts">
|
|
import { Head, Link } from '@inertiajs/vue3';
|
|
import { ArrowLeft } from '@lucide/vue';
|
|
import EmployeeForm from '@/components/admin/hr/EmployeeForm.vue';
|
|
import { Button } from '@/components/ui/button';
|
|
import AdminLayout from '@/layouts/AdminLayout.vue';
|
|
import type { EnumOption } from '@/types/employee';
|
|
|
|
defineProps<{
|
|
genders: EnumOption[];
|
|
employmentStatuses: EnumOption[];
|
|
roles: EnumOption[];
|
|
}>();
|
|
</script>
|
|
|
|
<template>
|
|
|
|
<Head title="Tambah Pegawai" />
|
|
|
|
<AdminLayout>
|
|
<div class="flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between">
|
|
<div class="space-y-1">
|
|
<h2 class="text-2xl font-bold tracking-tight">
|
|
Tambah Pegawai
|
|
</h2>
|
|
</div>
|
|
|
|
<Button variant="outline" as-child class="shrink-0 self-start sm:self-center">
|
|
<Link href="/admin/hr/employees">
|
|
<ArrowLeft class="size-4" />
|
|
Kembali
|
|
</Link>
|
|
</Button>
|
|
</div>
|
|
|
|
<EmployeeForm submit-url="/admin/hr/employees" method="post" submit-label="Simpan" :genders="genders"
|
|
:employment-statuses="employmentStatuses" :roles="roles" />
|
|
</AdminLayout>
|
|
</template>
|