🐛 fix (employee): fix user entry component on employee add page
This commit is contained in:
@@ -23,20 +23,20 @@ const items = [
|
||||
<div class="mb-2 border-b border-b-slate-300 text-lg xl:text-xl">
|
||||
<div class="flex flex-col justify-between">
|
||||
<Block>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>No. IHS</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>No. IHS</Label>
|
||||
<Field>
|
||||
<Input />
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>No. SIP</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>No. SIP</Label>
|
||||
<Field>
|
||||
<Input />
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>Unit</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>Unit</Label>
|
||||
<Field>
|
||||
<Select v-model="data.type" :items="items" placeholder="Pilih jenis" />
|
||||
</Field>
|
||||
|
||||
@@ -18,26 +18,26 @@ const data = computed({
|
||||
<div class="mb-5 border-b border-b-slate-300 text-lg xl:text-xl">
|
||||
<div class="flex flex-col justify-between">
|
||||
<Block>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>Nomor Induk Pegawai</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>Nomor Induk Pegawai</Label>
|
||||
<Field>
|
||||
<Input v-model="data.number" />
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>Status</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>Status</Label>
|
||||
<Field>
|
||||
<Select v-model="data.type" :items="items" placeholder="Pilih jenis" />
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>Position</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>Position</Label>
|
||||
<Field>
|
||||
<Select v-model="data.type" :items="items" placeholder="Pilih jenis" />
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>Divisi</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>Divisi</Label>
|
||||
<Field>
|
||||
<Select v-model="data.type" :items="items" placeholder="Pilih jenis" />
|
||||
</Field>
|
||||
|
||||
@@ -2,14 +2,10 @@
|
||||
// types
|
||||
import type z from 'zod'
|
||||
import type { MaterialFormData } from '~/schemas/material'
|
||||
<<<<<<< HEAD:app/components/app/equipment/entry-form.vue
|
||||
=======
|
||||
// helpers
|
||||
import { toTypedSchema } from '@vee-validate/zod'
|
||||
import { useForm } from 'vee-validate'
|
||||
// components
|
||||
import Label from '~/components/pub/custom-ui/form/label.vue'
|
||||
>>>>>>> 266d5f740b15942ca7b8845c00573640fdc9a3b2:app/components/app/material/entry-form.vue
|
||||
|
||||
interface Props {
|
||||
schema: z.ZodSchema<any>
|
||||
|
||||
@@ -18,8 +18,8 @@ const data = computed({
|
||||
<div class="mb-2 border-b border-b-slate-300 text-lg xl:text-xl">
|
||||
<div class="flex flex-col justify-between">
|
||||
<Block>
|
||||
<FieldGroup layout="stacked">
|
||||
<Label stacked>No. IHS</Label>
|
||||
<FieldGroup>
|
||||
<Label>No. IHS</Label>
|
||||
<Field>
|
||||
<Input />
|
||||
</Field>
|
||||
|
||||
@@ -18,8 +18,8 @@ const data = computed({
|
||||
<div class="mb-2 border-b border-b-slate-300 text-lg xl:text-xl">
|
||||
<div class="flex flex-col justify-between">
|
||||
<Block>
|
||||
<FieldGroup layout="stacked">
|
||||
<Label stacked>No. IHS</Label>
|
||||
<FieldGroup>
|
||||
<Label>No. IHS</Label>
|
||||
<Field>
|
||||
<Input />
|
||||
</Field>
|
||||
|
||||
@@ -18,8 +18,8 @@ const data = computed({
|
||||
<div class="mb-2 border-b border-b-slate-300 text-lg xl:text-xl">
|
||||
<div class="flex flex-col justify-between">
|
||||
<Block>
|
||||
<FieldGroup layout="stacked">
|
||||
<Label stacked>No. IHS</Label>
|
||||
<FieldGroup>
|
||||
<Label>No. IHS</Label>
|
||||
<Field>
|
||||
<Input />
|
||||
</Field>
|
||||
|
||||
@@ -18,8 +18,8 @@ const data = computed({
|
||||
<div class="mb-2 border-b border-b-slate-300 text-lg xl:text-xl">
|
||||
<div class="flex flex-col justify-between">
|
||||
<Block>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>No. IHS</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>No. IHS</Label>
|
||||
<Field>
|
||||
<Input />
|
||||
</Field>
|
||||
|
||||
@@ -18,14 +18,14 @@ const data = computed({
|
||||
<div class="mb-5 border-b border-b-slate-300 pb-3 text-lg xl:text-xl">
|
||||
<div class="flex flex-col justify-between">
|
||||
<Block>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>Username</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>Username</Label>
|
||||
<Field>
|
||||
<Input v-model="data.name" />
|
||||
</Field>
|
||||
</FieldGroup>
|
||||
<FieldGroup :column="2" layout="stacked">
|
||||
<Label stacked>Password</Label>
|
||||
<FieldGroup :column="2">
|
||||
<Label>Password</Label>
|
||||
<Field>
|
||||
<Input v-model="data.password" type="password" />
|
||||
</Field>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<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: '',
|
||||
@@ -38,6 +39,11 @@ const items = [
|
||||
|
||||
<AppEmployeeEntryForm v-model="data" :items="items" />
|
||||
|
||||
<AppPersonEntryForm v-model="data" :items="items" :schema="MaterialSchema" />
|
||||
<AppPersonAddressEntryForm v-model="data" :items="items" :schema="MaterialSchema" />
|
||||
<AppPersonContactEntryForm v-model="data" :items="items" :schema="MaterialSchema" />
|
||||
<AppPersonRelativeEntryForm v-model="data" :items="items" :schema="MaterialSchema" />
|
||||
|
||||
<AppDoctorEntryForm v-if="data.type === 'doctor'" v-model="data" />
|
||||
<AppNurseEntryForm v-else-if="data.type === 'nurse'" v-model="data" />
|
||||
<AppPharmacistEntryForm v-else-if="data.type === 'pharmacist'" v-model="data" />
|
||||
@@ -35,7 +35,7 @@ const canCreate = hasCreateAccess(roleAccess)
|
||||
|
||||
<template>
|
||||
<div v-if="canCreate">
|
||||
<ContentUserEntry />
|
||||
<ContentEmployeeEntry />
|
||||
</div>
|
||||
<Error v-else :status-code="403" />
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user