Feat Infra (#108)

* fix: adjustment some schemas

* fix(room): fixing integrate unit of room

* feat(warehouse): modify form and integration

* feat(counter): modify form and integration

* feat(screen): add list, form and integration

* feat(screen): add page for public screen

* fix: add on reset state at list

* fix: solve list of relation

* feat(chamber): integrate form to api chamber

* feat(bed): integrate form to api bed

* fix: add searching function on list service

* fix: rewrite style for dropdown and tree select

* fix: add sort params

* fix: add sort params on division + medicine

* feat(division-position): layouting form + list

* fix: add sort params for getValueList

* chore: modify side menu style

* chore: fix ui dashboard

* feat(division-position): add content list

* feat(division-position): add temporary page

* feat(division-position): modify content and entry form
This commit is contained in:
Muhammad Rifai
2025-10-10 20:36:07 +07:00
committed by GitHub
parent 4f0c1f4318
commit f94b6d273a
73 changed files with 2638 additions and 416 deletions
+51 -27
View File
@@ -65,12 +65,12 @@ if (props.values) {
if (props.values.name !== undefined) name.value = props.values.name
if (props.values.infraGroup_code !== undefined) infraGroup_code.value = props.values.infraGroup_code
if (props.values.specialist_id !== undefined)
specialist_id.value = props.values.specialist_id ? String(props.values.specialist_id) : null
specialist_id.value = props.values.specialist_id ? Number(props.values.specialist_id) : null
if (props.values.subspecialist_id !== undefined)
subspecialist_id.value = props.values.subspecialist_id ? String(props.values.subspecialist_id) : null
if (props.values.unit_id !== undefined) unit_id.value = props.values.unit_id ? String(props.values.unit_id) : null
subspecialist_id.value = props.values.subspecialist_id ? Number(props.values.subspecialist_id) : null
if (props.values.unit_id !== undefined) unit_id.value = props.values.unit_id ? Number(props.values.unit_id) : null
if (props.values.parent_id !== undefined)
parent_id.value = props.values.parent_id ? String(props.values.parent_id) : null
parent_id.value = props.values.parent_id ? Number(props.values.parent_id) : null
}
const resetForm = () => {
@@ -102,18 +102,50 @@ function onCancelForm() {
</script>
<template>
<form id="form-building" @submit.prevent>
<Block labelSize="thin" class="!mb-2.5 !pt-0 xl:!mb-3" :colCount="1">
<form
id="form-building"
@submit.prevent
>
<Block
labelSize="thin"
class="!mb-2.5 !pt-0 xl:!mb-3"
:colCount="1"
>
<Cell>
<Label height="compact">Kode</Label>
<Field :errMessage="errors.code">
<Input id="code" v-model="code" v-bind="codeAttrs" :disabled="isLoading || isReadonly" />
<Input
id="code"
v-model="code"
v-bind="codeAttrs"
:disabled="isLoading || isReadonly"
/>
</Field>
</Cell>
<Cell>
<Label height="compact">Nama</Label>
<Field :errMessage="errors.name">
<Input id="name" v-model="name" v-bind="nameAttrs" :disabled="isLoading || isReadonly" />
<Input
id="name"
v-model="name"
v-bind="nameAttrs"
:disabled="isLoading || isReadonly"
/>
</Field>
</Cell>
<Cell>
<Label height="compact">Lantai</Label>
<Field :errMessage="errors.parent_id">
<Combobox
id="parent"
v-model="parent_id"
v-bind="parentAttrs"
:items="parents"
:is-disabled="isLoading || isReadonly"
placeholder="Pilih Lantai"
search-placeholder="Cari Lantai"
empty-message="Lantai tidak ditemukan"
/>
</Field>
</Cell>
<Cell>
@@ -124,7 +156,7 @@ function onCancelForm() {
v-model="unit_id"
v-bind="unitAttrs"
:items="units"
:disabled="isLoading || isReadonly"
:is-disabled="isLoading || isReadonly"
placeholder="Pilih Unit"
search-placeholder="Cari Unit"
empty-message="Unit tidak ditemukan"
@@ -140,7 +172,7 @@ function onCancelForm() {
v-model="specialist_id"
v-bind="specialistAttrs"
:items="specialists"
:disabled="isLoading || isReadonly"
:is-disabled="isLoading || isReadonly"
placeholder="Pilih Spesialis"
search-placeholder="Cari spesialis"
empty-message="Spesialis tidak ditemukan"
@@ -156,31 +188,23 @@ function onCancelForm() {
v-model="subspecialist_id"
v-bind="subspecialistAttrs"
:items="subspecialists"
:disabled="isLoading || isReadonly"
:is-disabled="isLoading || isReadonly"
placeholder="Pilih Sub Spesialis"
search-placeholder="Cari sub spesialis"
empty-message="Sub Spesialis tidak ditemukan"
/>
</Field>
</Cell>
<Cell>
<Label height="compact">Lantai</Label>
<Field :errMessage="errors.parent_id">
<Combobox
id="parent"
v-model="parent_id"
v-bind="parentAttrs"
:items="parents"
:disabled="isLoading || isReadonly"
placeholder="Pilih Lantai"
search-placeholder="Cari Lantai"
empty-message="Lantai tidak ditemukan"
/>
</Field>
</Cell>
</Block>
<div class="my-2 flex justify-end gap-2 py-2">
<Button type="button" variant="secondary" class="w-[120px]" @click="onCancelForm"> Kembali </Button>
<Button
type="button"
variant="secondary"
class="w-[120px]"
@click="onCancelForm"
>
Kembali
</Button>
<Button
v-if="!isReadonly"
type="button"
+6 -11
View File
@@ -14,18 +14,9 @@ const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dr
export const cols: Col[] = [{}, {}, {}, {}, {}, { width: 50 }]
export const header: Th[][] = [
[
{ label: 'Kode' },
{ label: 'Nama' },
{ label: 'Spesialis' },
{ label: 'Sub Spesialis' },
{ label: 'Unit' },
{ label: '' },
],
]
export const header: Th[][] = [[{ label: 'Kode' }, { label: 'Nama' }, { label: 'Lantai' }, { label: '' }]]
export const keys = ['code', 'name', 'specialist', 'subspecialist', 'unit', 'action']
export const keys = ['code', 'name', 'parent', 'action']
export const delKeyNames: KeyLabel[] = [
{ key: 'code', label: 'Kode' },
@@ -45,6 +36,10 @@ export const funcParsed: RecStrFuncUnknown = {
const recX = rec as SmallDetailDto
return recX.unit?.name || '-'
},
parent: (rec: unknown): unknown => {
const recX = rec as SmallDetailDto
return recX.parent?.name || '-'
},
}
export const funcComponent: RecStrFuncComponent = {