@@ -170,7 +170,11 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
@apply bg-slate-100 dark:bg-slate-800;
|
@apply bg-slate-100 dark:bg-slate-800 ;
|
||||||
|
}
|
||||||
|
|
||||||
|
body, table, label {
|
||||||
|
@apply md:!text-xs xl:!text-sm 2xl:!text-base;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Container */
|
/* Container */
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ const items = [
|
|||||||
</Field>
|
</Field>
|
||||||
</FieldGroup>
|
</FieldGroup>
|
||||||
<FieldGroup :column="2">
|
<FieldGroup :column="2">
|
||||||
<Label>Metode Pemberian</Label>
|
<Label>Cara Pemberian</Label>
|
||||||
<Field name="phone">
|
<Field name="phone">
|
||||||
<Select :items="items" />
|
<Select :items="items" />
|
||||||
</Field>
|
</Field>
|
||||||
|
|||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import type {
|
||||||
|
Col,
|
||||||
|
KeyLabel,
|
||||||
|
RecComponent,
|
||||||
|
RecStrFuncComponent,
|
||||||
|
RecStrFuncUnknown,
|
||||||
|
Th,
|
||||||
|
} from '~/components/pub/custom-ui/data/types'
|
||||||
|
import { defineAsyncComponent } from 'vue'
|
||||||
|
|
||||||
|
type SmallDetailDto = any
|
||||||
|
|
||||||
|
const action = defineAsyncComponent(() => import('~/components/pub/custom-ui/data/dropdown-action-dud.vue'))
|
||||||
|
|
||||||
|
export const cols: Col[] = [{}, {}, {}, {}, {}, {}, { width: 50 }]
|
||||||
|
|
||||||
|
export const header: Th[][] = [
|
||||||
|
[
|
||||||
|
{ label: 'Nama' },
|
||||||
|
{ label: 'Bentuk' },
|
||||||
|
{ label: 'Freq' },
|
||||||
|
{ label: 'Dosis' },
|
||||||
|
{ label: 'Interval' },
|
||||||
|
{ label: 'Total' },
|
||||||
|
{ label: '' },
|
||||||
|
],
|
||||||
|
]
|
||||||
|
|
||||||
|
export const keys = ['name', 'uom_code', 'frequency', 'multiplier', 'interval', 'total', 'action']
|
||||||
|
|
||||||
|
export const delKeyNames: KeyLabel[] = [
|
||||||
|
{ key: 'code', label: 'Kode' },
|
||||||
|
{ key: 'name', label: 'Nama' },
|
||||||
|
]
|
||||||
|
|
||||||
|
export const funcParsed: RecStrFuncUnknown = {
|
||||||
|
cateogry: (rec: unknown): unknown => {
|
||||||
|
return (rec as SmallDetailDto).medicineCategory?.name || '-'
|
||||||
|
},
|
||||||
|
group: (rec: unknown): unknown => {
|
||||||
|
return (rec as SmallDetailDto).medicineGroup?.name || '-'
|
||||||
|
},
|
||||||
|
method: (rec: unknown): unknown => {
|
||||||
|
return (rec as SmallDetailDto).medicineMethod?.name || '-'
|
||||||
|
},
|
||||||
|
unit: (rec: unknown): unknown => {
|
||||||
|
return (rec as SmallDetailDto).medicineUnit?.name || '-'
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export const funcComponent: RecStrFuncComponent = {
|
||||||
|
action: (rec: unknown, idx: number): RecComponent => {
|
||||||
|
const res: RecComponent = {
|
||||||
|
idx,
|
||||||
|
rec: rec as object,
|
||||||
|
component: action,
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
export const funcHtml: RecStrFuncUnknown = {
|
||||||
|
// (_rec) {
|
||||||
|
// return '-'
|
||||||
|
// },
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import { cols, funcComponent, funcHtml, funcParsed, header, keys } from './list-entry'
|
||||||
|
|
||||||
|
defineProps<{
|
||||||
|
data: any[]
|
||||||
|
}>()
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<PubBaseDataTable
|
||||||
|
:rows="data"
|
||||||
|
:cols="cols"
|
||||||
|
:header="header"
|
||||||
|
:keys="keys"
|
||||||
|
:func-parsed="funcParsed"
|
||||||
|
:func-html="funcHtml"
|
||||||
|
:func-component="funcComponent"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<PubCustomUiDocEntryBlock mode="preview" :colCount=3>
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>DPJP</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryCell />
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>Tgl Order</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>DPJP</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryCell />
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>Status</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
</PubCustomUiDocEntryBlock>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -0,0 +1,42 @@
|
|||||||
|
<template>
|
||||||
|
<div class="p-10 text-center">
|
||||||
|
<div class="mb-4 xl:mb-5">Belum Ada Data</div>
|
||||||
|
<div>
|
||||||
|
<Button>
|
||||||
|
<Icon name="i-lucide-plus" class="me-2 align-middle" />
|
||||||
|
Tambah Order
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Separator class="my-5" />
|
||||||
|
<div>
|
||||||
|
<PubCustomUiDocEntryBlock mode="preview" :colCount=3>
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>DPJP</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryCell />
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>Tgl Order</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>DPJP</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryCell />
|
||||||
|
<PubCustomUiDocEntryCell>
|
||||||
|
<PubCustomUiDocEntryLabel>Status</PubCustomUiDocEntryLabel>
|
||||||
|
<PubCustomUiDocEntryField>
|
||||||
|
<Input />
|
||||||
|
</PubCustomUiDocEntryField>
|
||||||
|
</PubCustomUiDocEntryCell>
|
||||||
|
</PubCustomUiDocEntryBlock>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -176,33 +176,31 @@ function handleCancelConfirmation() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rounded-md border p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppDivisonList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<AppDivisonList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
|
|
||||||
<Dialog v-model:open="isFormEntryDialogOpen" title="Tambah Divisi" size="lg" prevent-outside>
|
<Dialog v-model:open="isFormEntryDialogOpen" title="Tambah Divisi" size="lg" prevent-outside>
|
||||||
|
|
||||||
<AppDivisionEntryForm
|
<AppDivisionEntryForm
|
||||||
:division="divisionConf" :division-tree="divisionTreeConfig" :schema="schema"
|
:division="divisionConf" :division-tree="divisionTreeConfig" :schema="schema"
|
||||||
:initial-values="{ name: '', code: '', parentId: '' }" @submit="onSubmitForm" @cancel="onCancelForm"
|
:initial-values="{ name: '', code: '', parentId: '' }" @submit="onSubmitForm" @cancel="onCancelForm"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen" action="delete" :record="recItem"
|
v-model:open="isRecordConfirmationOpen" action="delete" :record="recItem"
|
||||||
@confirm="handleConfirmDelete" @cancel="handleCancelConfirmation"
|
@confirm="handleConfirmDelete" @cancel="handleCancelConfirmation"
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -130,52 +130,48 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" class="mb-4 xl:mb-5" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppEquipmentList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<div class="rounded-md border p-4">
|
|
||||||
<AppEquipmentList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
v-model:open="isFormEntryDialogOpen"
|
v-model:open="isFormEntryDialogOpen"
|
||||||
:title="!!recItem ? title : 'Tambah Perlengkapan'"
|
:title="!!recItem ? title : 'Tambah Perlengkapan'"
|
||||||
size="lg"
|
size="lg"
|
||||||
prevent-outside
|
prevent-outside
|
||||||
>
|
>
|
||||||
<AppEquipmentEntryForm
|
<AppEquipmentEntryForm
|
||||||
:schema="MaterialSchema"
|
:schema="MaterialSchema"
|
||||||
:values="recItem"
|
:values="recItem"
|
||||||
:uoms="uoms"
|
:uoms="uoms"
|
||||||
:is-loading="isProcessing"
|
:is-loading="isProcessing"
|
||||||
:is-readonly="isReadonly"
|
:is-readonly="isReadonly"
|
||||||
@submit="
|
@submit="
|
||||||
(values: MaterialFormData, resetForm: any) => {
|
(values: MaterialFormData, resetForm: any) => {
|
||||||
if (recId > 0) {
|
if (recId > 0) {
|
||||||
handleActionEdit(recId, values, getEquipmentList, resetForm, toast)
|
handleActionEdit(recId, values, getEquipmentList, resetForm, toast)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
handleActionSave(values, getEquipmentList, resetForm, toast)
|
|
||||||
}
|
}
|
||||||
"
|
handleActionSave(values, getEquipmentList, resetForm, toast)
|
||||||
@cancel="handleCancelForm"
|
}
|
||||||
/>
|
"
|
||||||
</Dialog>
|
@cancel="handleCancelForm"
|
||||||
|
/>
|
||||||
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen"
|
v-model:open="isRecordConfirmationOpen"
|
||||||
action="delete"
|
action="delete"
|
||||||
:record="recItem"
|
:record="recItem"
|
||||||
@confirm="() => handleActionRemove(recId, getEquipmentList, toast)"
|
@confirm="() => handleActionRemove(recId, getEquipmentList, toast)"
|
||||||
@cancel=""
|
@cancel=""
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -179,28 +179,26 @@ function handleCancelConfirmation() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rounded-md border p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppInstallationList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<AppInstallationList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
|
|
||||||
<Dialog v-model:open="isFormEntryDialogOpen" title="Tambah Instalasi" size="lg" prevent-outside>
|
<Dialog v-model:open="isFormEntryDialogOpen" title="Tambah Instalasi" size="lg" prevent-outside>
|
||||||
<AppInstallationEntryForm :installation="installationConf" :schema="schemaConf"
|
<AppInstallationEntryForm :installation="installationConf" :schema="schemaConf"
|
||||||
:initial-values="{ name: '', code: '', encounterClassCode: '' }" @submit="onSubmitForm"
|
:initial-values="{ name: '', code: '', encounterClassCode: '' }" @submit="onSubmitForm"
|
||||||
@cancel="onCancelForm" />
|
@cancel="onCancelForm" />
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
<RecordConfirmation v-model:open="isRecordConfirmationOpen" action="delete" :record="recItem"
|
<RecordConfirmation v-model:open="isRecordConfirmationOpen" action="delete" :record="recItem"
|
||||||
@confirm="handleConfirmDelete" @cancel="handleCancelConfirmation">
|
@confirm="handleConfirmDelete" @cancel="handleCancelConfirmation">
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -112,51 +112,47 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" class="mb-4 xl:mb-5" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppMedicineGroupList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<div class="rounded-md border p-4">
|
|
||||||
<AppMedicineGroupList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
v-model:open="isFormEntryDialogOpen"
|
v-model:open="isFormEntryDialogOpen"
|
||||||
:title="!!recItem ? title : 'Tambah Kelompok Obat'"
|
:title="!!recItem ? title : 'Tambah Kelompok Obat'"
|
||||||
size="lg"
|
size="lg"
|
||||||
prevent-outside
|
prevent-outside
|
||||||
>
|
>
|
||||||
<AppMedicineGroupEntryForm
|
<AppMedicineGroupEntryForm
|
||||||
:schema="MedicineBaseSchema"
|
:schema="MedicineBaseSchema"
|
||||||
:values="recItem"
|
:values="recItem"
|
||||||
:is-loading="isProcessing"
|
:is-loading="isProcessing"
|
||||||
:is-readonly="isReadonly"
|
:is-readonly="isReadonly"
|
||||||
@submit="
|
@submit="
|
||||||
(values: MedicineBaseFormData | Record<string, any>, resetForm: () => void) => {
|
(values: MedicineBaseFormData | Record<string, any>, resetForm: () => void) => {
|
||||||
if (recId > 0) {
|
if (recId > 0) {
|
||||||
handleActionEdit(recId, values, getMedicineGroupList, resetForm, toast)
|
handleActionEdit(recId, values, getMedicineGroupList, resetForm, toast)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
handleActionSave(values, getMedicineGroupList, resetForm, toast)
|
|
||||||
}
|
}
|
||||||
"
|
handleActionSave(values, getMedicineGroupList, resetForm, toast)
|
||||||
@cancel="handleCancelForm"
|
}
|
||||||
/>
|
"
|
||||||
</Dialog>
|
@cancel="handleCancelForm"
|
||||||
|
/>
|
||||||
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen"
|
v-model:open="isRecordConfirmationOpen"
|
||||||
action="delete"
|
action="delete"
|
||||||
:record="recItem"
|
:record="recItem"
|
||||||
@confirm="() => handleActionRemove(recId, getMedicineGroupList, toast)"
|
@confirm="() => handleActionRemove(recId, getMedicineGroupList, toast)"
|
||||||
@cancel=""
|
@cancel=""
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -112,51 +112,47 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" class="mb-4 xl:mb-5" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppMedicineMethodList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<div class="rounded-md border p-4">
|
|
||||||
<AppMedicineMethodList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
v-model:open="isFormEntryDialogOpen"
|
v-model:open="isFormEntryDialogOpen"
|
||||||
:title="!!recItem ? title : 'Tambah Metode Obat'"
|
:title="!!recItem ? title : 'Tambah Metode Obat'"
|
||||||
size="lg"
|
size="lg"
|
||||||
prevent-outside
|
prevent-outside
|
||||||
>
|
>
|
||||||
<AppMedicineMethodEntryForm
|
<AppMedicineMethodEntryForm
|
||||||
:schema="MedicineBaseSchema"
|
:schema="MedicineBaseSchema"
|
||||||
:values="recItem"
|
:values="recItem"
|
||||||
:is-loading="isProcessing"
|
:is-loading="isProcessing"
|
||||||
:is-readonly="isReadonly"
|
:is-readonly="isReadonly"
|
||||||
@submit="
|
@submit="
|
||||||
(values: MedicineBaseFormData | Record<string, any>, resetForm: () => void) => {
|
(values: MedicineBaseFormData | Record<string, any>, resetForm: () => void) => {
|
||||||
if (recId > 0) {
|
if (recId > 0) {
|
||||||
handleActionEdit(recId, values, getMedicineMethodList, resetForm, toast)
|
handleActionEdit(recId, values, getMedicineMethodList, resetForm, toast)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
handleActionSave(values, getMedicineMethodList, resetForm, toast)
|
|
||||||
}
|
}
|
||||||
"
|
handleActionSave(values, getMedicineMethodList, resetForm, toast)
|
||||||
@cancel="handleCancelForm"
|
}
|
||||||
/>
|
"
|
||||||
</Dialog>
|
@cancel="handleCancelForm"
|
||||||
|
/>
|
||||||
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen"
|
v-model:open="isRecordConfirmationOpen"
|
||||||
action="delete"
|
action="delete"
|
||||||
:record="recItem"
|
:record="recItem"
|
||||||
@confirm="() => handleActionRemove(recId, getMedicineMethodList, toast)"
|
@confirm="() => handleActionRemove(recId, getMedicineMethodList, toast)"
|
||||||
@cancel=""
|
@cancel=""
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
import type { DataTableLoader } from '~/components/pub/base/data-table/type'
|
||||||
|
import type { HeaderPrep, RefSearchNav } from '~/components/pub/custom-ui/data/types'
|
||||||
|
import Header from '~/components/pub/custom-ui/nav-header/prep.vue'
|
||||||
|
import PrescriptionItemListEntry from '~/components/app/prescription-item/list-entry.vue'
|
||||||
|
|
||||||
|
const data = ref([])
|
||||||
|
|
||||||
|
const refSearchNav: RefSearchNav = {
|
||||||
|
onClick: () => {
|
||||||
|
// open filter modal
|
||||||
|
},
|
||||||
|
onInput: (_val: string) => {
|
||||||
|
// filter patient list
|
||||||
|
},
|
||||||
|
onClear: () => {
|
||||||
|
// clear url param
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
const isLoading = reactive<DataTableLoader>({
|
||||||
|
isTableLoading: false,
|
||||||
|
})
|
||||||
|
|
||||||
|
const recId = ref<number>(0)
|
||||||
|
const recAction = ref<string>('')
|
||||||
|
const recItem = ref<any>(null)
|
||||||
|
|
||||||
|
const headerPrep: HeaderPrep = {
|
||||||
|
title: 'Resep Obat',
|
||||||
|
icon: 'i-lucide-panel-bottom',
|
||||||
|
addNav: {
|
||||||
|
label: 'Tambah',
|
||||||
|
onClick: () => navigateTo('/tools-equipment-src/equipment/add'),
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
provide('rec_id', recId)
|
||||||
|
provide('rec_action', recAction)
|
||||||
|
provide('rec_item', recItem)
|
||||||
|
provide('table_data_loader', isLoading)
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getMaterialList()
|
||||||
|
})
|
||||||
|
|
||||||
|
async function getMaterialList() {
|
||||||
|
isLoading.dataListLoading = true
|
||||||
|
|
||||||
|
// const resp = await xfetch('/api/v1/material')
|
||||||
|
// if (resp.success) {
|
||||||
|
// data.value = (resp.body as Record<string, any>).data
|
||||||
|
// }
|
||||||
|
|
||||||
|
isLoading.dataListLoading = false
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<Header :prep="{ ...headerPrep }" :ref-search-nav="refSearchNav" />
|
||||||
|
<AppPrescriptionList v-if="!isLoading.dataListLoading" />
|
||||||
|
<AppPrescriptionEntry />
|
||||||
|
<PrescriptionItemListEntry :data=[] />
|
||||||
|
<div>
|
||||||
|
<Button>
|
||||||
|
Tambah
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
@@ -202,39 +202,37 @@ watch(recId, () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rounded-md border p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppSpecialistList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<AppSpecialistList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
|
|
||||||
<Dialog v-model:open="isFormEntryDialogOpen" :title="headerPrep.addNav?.label!" size="lg" prevent-outside>
|
<Dialog v-model:open="isFormEntryDialogOpen" :title="headerPrep.addNav?.label!" size="lg" prevent-outside>
|
||||||
<AppSpecialistEntryForm
|
<AppSpecialistEntryForm
|
||||||
:installation="installationConf"
|
:installation="installationConf"
|
||||||
:unit="filteredUnitConf"
|
:unit="filteredUnitConf"
|
||||||
:schema="schemaConf"
|
:schema="schemaConf"
|
||||||
:disabled-unit="!selectedInstallationId"
|
:disabled-unit="!selectedInstallationId"
|
||||||
:initial-values="{ name: '', code: '', installationId: '', unitId: '' }"
|
:initial-values="{ name: '', code: '', installationId: '', unitId: '' }"
|
||||||
@submit="onSubmitForm"
|
@submit="onSubmitForm"
|
||||||
@cancel="onCancelForm"
|
@cancel="onCancelForm"
|
||||||
@installation-changed="onInstallationChanged"
|
@installation-changed="onInstallationChanged"
|
||||||
/>
|
/>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen"
|
v-model:open="isRecordConfirmationOpen"
|
||||||
action="delete"
|
action="delete"
|
||||||
:record="recItem"
|
:record="recItem"
|
||||||
@confirm="handleConfirmDelete"
|
@confirm="handleConfirmDelete"
|
||||||
@cancel="handleCancelConfirmation"
|
@cancel="handleCancelConfirmation"
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -203,39 +203,37 @@ watch(recId, () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rounded-md border p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppSubspecialistList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<AppSubspecialistList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
|
|
||||||
<Dialog v-model:open="isFormEntryDialogOpen" :title="headerPrep.addNav?.label!" size="lg" prevent-outside>
|
<Dialog v-model:open="isFormEntryDialogOpen" :title="headerPrep.addNav?.label!" size="lg" prevent-outside>
|
||||||
<AppSubspecialistEntryForm
|
<AppSubspecialistEntryForm
|
||||||
:installation="installationConf"
|
:installation="installationConf"
|
||||||
:unit="filteredUnitConf"
|
:unit="filteredUnitConf"
|
||||||
:specialist="specialistConf"
|
:specialist="specialistConf"
|
||||||
:schema="schemaConf"
|
:schema="schemaConf"
|
||||||
:initial-values="{ name: '', code: '', installationId: '', unitId: '', specialistId: '' }"
|
:initial-values="{ name: '', code: '', installationId: '', unitId: '', specialistId: '' }"
|
||||||
@submit="onSubmitForm"
|
@submit="onSubmitForm"
|
||||||
@cancel="onCancelForm"
|
@cancel="onCancelForm"
|
||||||
@installation-changed="onInstallationChanged"
|
@installation-changed="onInstallationChanged"
|
||||||
@unit-changed="onUnitChanged"
|
@unit-changed="onUnitChanged"
|
||||||
/>
|
/>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen"
|
v-model:open="isRecordConfirmationOpen"
|
||||||
action="delete"
|
action="delete"
|
||||||
:record="recItem"
|
:record="recItem"
|
||||||
@confirm="handleConfirmDelete"
|
@confirm="handleConfirmDelete"
|
||||||
@cancel="handleCancelConfirmation"
|
@cancel="handleCancelConfirmation"
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
||||||
<p v-if="record?.specialist"><strong>Specialist:</strong> {{ record.specialist?.name }}</p>
|
<p v-if="record?.specialist"><strong>Specialist:</strong> {{ record.specialist?.name }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -131,52 +131,48 @@ onMounted(async () => {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" class="mb-4 xl:mb-5" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppToolsList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<div class="rounded-md border p-4">
|
|
||||||
<AppToolsList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<Dialog
|
<Dialog
|
||||||
v-model:open="isFormEntryDialogOpen"
|
v-model:open="isFormEntryDialogOpen"
|
||||||
:title="!!recItem ? title : 'Tambah Peralatan'"
|
:title="!!recItem ? title : 'Tambah Peralatan'"
|
||||||
size="lg"
|
size="lg"
|
||||||
prevent-outside
|
prevent-outside
|
||||||
>
|
>
|
||||||
<AppToolsEntryForm
|
<AppToolsEntryForm
|
||||||
:schema="DeviceSchema"
|
:schema="DeviceSchema"
|
||||||
:values="recItem"
|
:values="recItem"
|
||||||
:uoms="uoms"
|
:uoms="uoms"
|
||||||
:is-loading="isProcessing"
|
:is-loading="isProcessing"
|
||||||
:is-readonly="isReadonly"
|
:is-readonly="isReadonly"
|
||||||
@submit="
|
@submit="
|
||||||
(values: DeviceFormData, resetForm: any) => {
|
(values: DeviceFormData, resetForm: any) => {
|
||||||
if (recId > 0) {
|
if (recId > 0) {
|
||||||
handleActionEdit(recId, values, getToolsList, resetForm, toast)
|
handleActionEdit(recId, values, getToolsList, resetForm, toast)
|
||||||
return
|
return
|
||||||
}
|
|
||||||
handleActionSave(values, getToolsList, resetForm, toast)
|
|
||||||
}
|
}
|
||||||
"
|
handleActionSave(values, getToolsList, resetForm, toast)
|
||||||
@cancel="handleCancelForm"
|
}
|
||||||
/>
|
"
|
||||||
</Dialog>
|
@cancel="handleCancelForm"
|
||||||
|
/>
|
||||||
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen"
|
v-model:open="isRecordConfirmationOpen"
|
||||||
action="delete"
|
action="delete"
|
||||||
:record="recItem"
|
:record="recItem"
|
||||||
@confirm="() => handleActionRemove(recId, getToolsList, toast)"
|
@confirm="() => handleActionRemove(recId, getToolsList, toast)"
|
||||||
@cancel=""
|
@cancel=""
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
<p v-if="record?.name"><strong>Nama:</strong> {{ record.name }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.code }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -177,31 +177,29 @@ function handleCancelConfirmation() {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="rounded-md border p-4">
|
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
||||||
<Header v-model="searchInput" :prep="headerPrep" @search="handleSearch" />
|
<AppUnitList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
||||||
<AppUnitList :data="data" :pagination-meta="paginationMeta" @page-change="handlePageChange" />
|
|
||||||
|
|
||||||
<Dialog v-model:open="isFormEntryDialogOpen" title="Tambah Unit" size="lg" prevent-outside>
|
<Dialog v-model:open="isFormEntryDialogOpen" title="Tambah Unit" size="lg" prevent-outside>
|
||||||
<AppUnitEntryForm
|
<AppUnitEntryForm
|
||||||
:unit="unitConf" :schema="schemaConf" :initial-values="{ name: '', code: '', parentId: '' }"
|
:unit="unitConf" :schema="schemaConf" :initial-values="{ name: '', code: '', parentId: '' }"
|
||||||
@submit="onSubmitForm" @cancel="onCancelForm"
|
@submit="onSubmitForm" @cancel="onCancelForm"
|
||||||
/>
|
/>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
|
||||||
<!-- Record Confirmation Modal -->
|
<!-- Record Confirmation Modal -->
|
||||||
<RecordConfirmation
|
<RecordConfirmation
|
||||||
v-model:open="isRecordConfirmationOpen" action="delete" :record="recItem"
|
v-model:open="isRecordConfirmationOpen" action="delete" :record="recItem"
|
||||||
@confirm="handleConfirmDelete" @cancel="handleCancelConfirmation"
|
@confirm="handleConfirmDelete" @cancel="handleCancelConfirmation"
|
||||||
>
|
>
|
||||||
<template #default="{ record }">
|
<template #default="{ record }">
|
||||||
<div class="text-sm">
|
<div class="text-sm">
|
||||||
<p><strong>ID:</strong> {{ record?.id }}</p>
|
<p><strong>ID:</strong> {{ record?.id }}</p>
|
||||||
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
<p v-if="record?.firstName"><strong>Nama:</strong> {{ record.firstName }}</p>
|
||||||
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
<p v-if="record?.code"><strong>Kode:</strong> {{ record.cellphone }}</p>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</RecordConfirmation>
|
</RecordConfirmation>
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ const openCollapsible = ref(false)
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<SidebarMenu>
|
<SidebarMenu>
|
||||||
<Collapsible :key="item.title" v-model:open="openCollapsible" as-child class="group/collapsible">
|
<Collapsible :key="item.title" v-model:open="openCollapsible" as-child class="group/collapsible ">
|
||||||
<SidebarMenuItem>
|
<SidebarMenuItem>
|
||||||
<CollapsibleTrigger as-child>
|
<CollapsibleTrigger as-child>
|
||||||
<SidebarMenuButton :tooltip="item.title" :size="size">
|
<SidebarMenuButton :tooltip="item.title" :size="size" class="md:!text-xs xl:!text-sm 2xl:!text-base">
|
||||||
<Icon :name="item.icon || ''" mode="svg" />
|
<Icon :name="item.icon || ''" mode="svg" />
|
||||||
<span class="mx-2">{{ item.title }}</span>
|
<span class="mx-2">{{ item.title }}</span>
|
||||||
<Icon
|
<Icon
|
||||||
@@ -37,7 +37,7 @@ const openCollapsible = ref(false)
|
|||||||
<SidebarMenuSubButton as-child>
|
<SidebarMenuSubButton as-child>
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="subItem.link"
|
:to="subItem.link"
|
||||||
class="mx-4 rounded-lg py-5 text-sm transition-all duration-200"
|
class="mx-4 rounded-lg py-5 text-sm transition-all duration-200 md:!text-xs xl:!text-sm 2xl:!text-base"
|
||||||
active-class="bg-primary text-white"
|
active-class="bg-primary text-white"
|
||||||
@click="setOpenMobile(false)"
|
@click="setOpenMobile(false)"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const { setOpenMobile } = useSidebar()
|
|||||||
<SidebarMenuButton as-child :tooltip="item.title" :size="size" class="">
|
<SidebarMenuButton as-child :tooltip="item.title" :size="size" class="">
|
||||||
<NuxtLink
|
<NuxtLink
|
||||||
:to="item.link"
|
:to="item.link"
|
||||||
class="group flex items-center gap-3 rounded-lg px-2 py-4 text-sm transition-all duration-200"
|
class="group flex items-center gap-3 rounded-lg px-2 py-4 text-sm transition-all duration-200 md:!text-xs xl:!text-sm 2xl:!text-base"
|
||||||
active-class="bg-primary text-white"
|
active-class="bg-primary text-white"
|
||||||
@click="setOpenMobile(false)"
|
@click="setOpenMobile(false)"
|
||||||
>
|
>
|
||||||
@@ -29,7 +29,7 @@ const { setOpenMobile } = useSidebar()
|
|||||||
<span class="mx-1">{{ item.title }}</span>
|
<span class="mx-1">{{ item.title }}</span>
|
||||||
<span
|
<span
|
||||||
v-if="item.new"
|
v-if="item.new"
|
||||||
class="bg-#adfa1d rounded-md px-1.5 py-0.5 text-xs leading-none text-black no-underline group-hover:no-underline"
|
class="bg-#adfa1d rounded-md px-1.5 py-0.5 text-xs leading-none text-black no-underline group-hover:no-underline "
|
||||||
>
|
>
|
||||||
New
|
New
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
labelFor: string
|
labelFor?: string
|
||||||
size?: 'default' | 'narrow' | 'wide'
|
size?: 'default' | 'narrow' | 'wide'
|
||||||
height?: 'default' | 'compact'
|
height?: 'default' | 'compact'
|
||||||
position?: 'default' | 'dynamic'
|
position?: 'default' | 'dynamic'
|
||||||
@@ -48,7 +48,7 @@ const labelClass = computed(() => [props.stacked ? 'block mb-1 text-sm font-medi
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div :class="wrapperClass">
|
<div :class="wrapperClass">
|
||||||
<label class="block text-base font-medium text-gray-600" :class="labelClass" :for="labelFor">
|
<label class="block" :class="labelClass" :for="labelFor">
|
||||||
<slot />
|
<slot />
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ const modelValue = useVModel(props, 'modelValue', emits, {
|
|||||||
v-model="modelValue"
|
v-model="modelValue"
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
'border-input ring-offset-background placeholder:text-muted-foreground flex h-9 w-full rounded-md border border-gray-400 px-3 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50',
|
'border-input dark:bg-slate-950 ring-offset-background placeholder:text-muted-foreground flex h-8 xl:h-9 w-full rounded-md border border-gray-400 px-3 py-2 md:text-xs xl:text-sm file:border-0 file:bg-transparent md:file:text-xs xl:file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50',
|
||||||
props.class,
|
props.class,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const delegatedProps = computed(() => {
|
|||||||
v-bind="delegatedProps"
|
v-bind="delegatedProps"
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
'text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
'md:!text-xs xl:text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70',
|
||||||
props.class,
|
props.class,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ const iconName = computed(() => props.iconName || 'i-radix-icons-caret-sort')
|
|||||||
v-bind="forwardedProps"
|
v-bind="forwardedProps"
|
||||||
:class="
|
:class="
|
||||||
cn(
|
cn(
|
||||||
'border-input ring-offset-background placeholder:text-muted-foreground relative flex h-10 w-full rounded-md border border-gray-400 pl-3 pr-8 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50',
|
'border-input ring-offset-background placeholder:text-muted-foreground relative flex h-9 md:h-8 xl:h-9 w-full rounded-md border border-gray-400 pl-3 pr-8 py-2 text-sm file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:cursor-not-allowed disabled:opacity-50',
|
||||||
props.class,
|
props.class,
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
|||||||
+17
-2
@@ -5,7 +5,11 @@ const route = useRoute()
|
|||||||
const contentFrame = computed(() => route.meta.contentFrame)
|
const contentFrame = computed(() => route.meta.contentFrame)
|
||||||
const contentFrameClass = computed(() => {
|
const contentFrameClass = computed(() => {
|
||||||
switch (contentFrame.value) {
|
switch (contentFrame.value) {
|
||||||
case 'cf-container-lg':
|
case 'cf-container-2xl':
|
||||||
|
return 'cf-container-2xl'
|
||||||
|
case 'cf-container-2xl':
|
||||||
|
return 'cf-container-xl'
|
||||||
|
case 'cf-container-xl':
|
||||||
return 'cf-container-lg'
|
return 'cf-container-lg'
|
||||||
case 'cf-container-md':
|
case 'cf-container-md':
|
||||||
return 'cf-container-md'
|
return 'cf-container-md'
|
||||||
@@ -44,10 +48,21 @@ const contentFrameClass = computed(() => {
|
|||||||
.cf-container-md > *,
|
.cf-container-md > *,
|
||||||
.cf-container-sm > *,
|
.cf-container-sm > *,
|
||||||
.cf-full-width {
|
.cf-full-width {
|
||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.cf-full-width > * {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cf-container-2xl > * {
|
||||||
|
max-width: 1400px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.cf-container-xl > * {
|
||||||
|
max-width: 1200px;
|
||||||
|
}
|
||||||
|
|
||||||
.cf-container-lg > * {
|
.cf-container-lg > * {
|
||||||
max-width: 992px;
|
max-width: 992px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ const canRead = true
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentDivisionList />
|
||||||
<ContentDivisionList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ const canRead = true
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentInstallationList />
|
||||||
<ContentInstallationList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ const canRead = true
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentSpecialistList />
|
||||||
<ContentSpecialistList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ const canRead = true
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentSubspecialistList />
|
||||||
<ContentSubspecialistList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -32,10 +32,8 @@ const canRead = true
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentUnitList />
|
||||||
<ContentUnitList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ definePageMeta({
|
|||||||
middleware: ['rbac'],
|
middleware: ['rbac'],
|
||||||
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
||||||
title: 'Daftar User',
|
title: 'Daftar User',
|
||||||
contentFrame: 'cf-full-width',
|
contentFrame: 'cf-container-lg',
|
||||||
})
|
})
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -31,10 +31,8 @@ const canRead = true // hasReadAccess(roleAccess)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentEquipmentList />
|
||||||
<ContentEquipmentList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ definePageMeta({
|
|||||||
middleware: ['rbac'],
|
middleware: ['rbac'],
|
||||||
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
||||||
title: 'Daftar Dokter',
|
title: 'Daftar Dokter',
|
||||||
contentFrame: 'cf-full-width',
|
contentFrame: 'cf-container-lg',
|
||||||
})
|
})
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -31,10 +31,8 @@ const canRead = hasReadAccess(roleAccess)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentMedicineMethodList />
|
||||||
<ContentMedicineMethodList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ definePageMeta({
|
|||||||
middleware: ['rbac'],
|
middleware: ['rbac'],
|
||||||
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
||||||
title: 'Daftar Dokter',
|
title: 'Daftar Dokter',
|
||||||
contentFrame: 'cf-full-width',
|
contentFrame: 'cf-container-lg',
|
||||||
})
|
})
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -31,10 +31,8 @@ const canRead = hasReadAccess(roleAccess)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentMedicineGroupList />
|
||||||
<ContentMedicineGroupList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ const canCreate = hasCreateAccess(roleAccess)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div v-if="canCreate">
|
<template v-if="canCreate">
|
||||||
<ContentMedicineEntry />
|
<ContentMedicineEntry />
|
||||||
</div>
|
</template>
|
||||||
<Error v-else :status-code="403" />
|
<Error v-else :status-code="403" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -31,10 +31,8 @@ const canRead = hasReadAccess(roleAccess)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentMedicineList />
|
||||||
<ContentMedicineList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ definePageMeta({
|
|||||||
middleware: ['rbac'],
|
middleware: ['rbac'],
|
||||||
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
||||||
title: 'Daftar User',
|
title: 'Daftar User',
|
||||||
contentFrame: 'cf-full-width',
|
contentFrame: 'cf-container-lg',
|
||||||
})
|
})
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
@@ -31,10 +31,8 @@ const canRead = true // hasReadAccess(roleAccess)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<template v-if="canRead">
|
||||||
<div v-if="canRead">
|
<ContentToolsList />
|
||||||
<ContentToolsList />
|
</template>
|
||||||
</div>
|
<Error v-else :status-code="403" />
|
||||||
<Error v-else :status-code="403" />
|
|
||||||
</div>
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
<script setup lang="ts">
|
||||||
|
// import type { PagePermission } from '~/models/role'
|
||||||
|
import Error from '~/components/pub/base/error/error.vue'
|
||||||
|
// import { PAGE_PERMISSIONS } from '~/lib/page-permission'
|
||||||
|
|
||||||
|
definePageMeta({
|
||||||
|
// middleware: ['rbac'],
|
||||||
|
roles: ['doctor', 'nurse', 'admisi', 'pharmacy', 'billing', 'management'],
|
||||||
|
title: 'Daftar Divisi',
|
||||||
|
contentFrame: 'cf-container-lg',
|
||||||
|
})
|
||||||
|
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
title: () => route.meta.title as string,
|
||||||
|
})
|
||||||
|
|
||||||
|
// const roleAccess: PagePermission = PAGE_PERMISSIONS['/patient']
|
||||||
|
|
||||||
|
// const { checkRole, hasReadAccess } = useRBAC()
|
||||||
|
|
||||||
|
// // Check if user has access to this page
|
||||||
|
// const hasAccess = checkRole(roleAccess)
|
||||||
|
// if (!hasAccess) {
|
||||||
|
// navigateTo('/403')
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Define permission-based computed properties
|
||||||
|
// const canRead = hasReadAccess(roleAccess)
|
||||||
|
const canRead = true
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div v-if="canRead">
|
||||||
|
<ContentPrescriptionList />
|
||||||
|
</div>
|
||||||
|
<Error v-else :status-code="403" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
Reference in New Issue
Block a user