Files
simrsx-fe/app/components/content/specialist-intern/entry.vue

50 lines
1.4 KiB
Vue

<script setup lang="ts">
import Action from '~/components/pub/custom-ui/nav-footer/ba-dr-su.vue'
import { MaterialSchema, type MaterialFormData } from '~/schemas/material'
const data = ref({
name: '',
password: '',
status: '',
type: 'doctor',
})
function onClick(type: string) {
if (type === 'cancel') {
navigateTo('/human-src/specialist-intern')
} else if (type === 'draft') {
// do something
} else if (type === 'submit') {
// do something
}
}
const items = [
{ value: 'doctor', label: 'Dokter' },
{ value: 'nurse', label: 'Perawat' },
{ value: 'nutritionist', label: 'Ahli Gizi' },
{ value: 'laborant', label: 'Laboran' },
{ value: 'pharmacy', label: 'Farmasi' },
{ value: 'payment', label: 'Pembayaran' },
{ value: 'payment-verificator', label: 'Konfirmasi Pembayaran' },
{ value: 'management', label: 'Management' },
]
</script>
<template>
<div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
<Icon name="i-lucide-user" class="me-2" />
<span class="font-semibold">Tambah</span> Karyawan
</div>
<AppUserEntryForm v-model="data" />
<AppSpecialistInternEntryForm v-model="data" :items="items" :schema="MaterialSchema" />
<AppPersonEntryForm v-model="data" :items="items" :schema="MaterialSchema" />
<div class="my-2 flex justify-end py-2">
<Action @click="onClick" />
</div>
</template>