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