Merge pull request #140 from dikstub-rssa/feat/integrasi-assessment-medis-114
Feat/integrasi assessment medis 114
This commit is contained in:
@@ -7,94 +7,18 @@ const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dr
|
|||||||
const statusBadge = defineAsyncComponent(() => import('./status-badge.vue'))
|
const statusBadge = defineAsyncComponent(() => import('./status-badge.vue'))
|
||||||
|
|
||||||
export const config: Config = {
|
export const config: Config = {
|
||||||
cols: [
|
cols: [{}, {}, {}, {}],
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{ width: 100 },
|
|
||||||
{ width: 120 },
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{ width: 100 },
|
|
||||||
{ width: 100 },
|
|
||||||
{},
|
|
||||||
{ width: 50 },
|
|
||||||
],
|
|
||||||
|
|
||||||
headers: [
|
headers: [[{ label: 'Kode' }, { label: 'Nama (FHIR)' }, { label: 'Nama (ID)' }, { label: '' }]],
|
||||||
[
|
|
||||||
{ label: 'Nama' },
|
|
||||||
{ label: 'Rekam Medis' },
|
|
||||||
{ label: 'KTP' },
|
|
||||||
{ label: 'Tgl Lahir' },
|
|
||||||
{ label: 'Umur' },
|
|
||||||
{ label: 'JK' },
|
|
||||||
{ label: 'Pendidikan' },
|
|
||||||
{ label: 'Status' },
|
|
||||||
{ label: '' },
|
|
||||||
],
|
|
||||||
],
|
|
||||||
|
|
||||||
keys: [
|
keys: ['code', 'name', 'indName', 'action'],
|
||||||
'name',
|
|
||||||
'medicalRecord_number',
|
|
||||||
'identity_number',
|
|
||||||
'birth_date',
|
|
||||||
'patient_age',
|
|
||||||
'gender',
|
|
||||||
'education',
|
|
||||||
'status',
|
|
||||||
'action',
|
|
||||||
],
|
|
||||||
|
|
||||||
delKeyNames: [
|
delKeyNames: [
|
||||||
{ key: 'code', label: 'Kode' },
|
{ key: 'code', label: 'Kode' },
|
||||||
{ key: 'name', label: 'Nama' },
|
{ key: 'name', label: 'Nama' },
|
||||||
],
|
],
|
||||||
|
|
||||||
parses: {
|
parses: {},
|
||||||
name: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}`
|
|
||||||
},
|
|
||||||
identity_number: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
if (recX.identity_number?.substring(0, 5) === 'BLANK') {
|
|
||||||
return '(TANPA NIK)'
|
|
||||||
}
|
|
||||||
return recX.identity_number
|
|
||||||
},
|
|
||||||
birth_date: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
if (typeof recX.birth_date == 'object' && recX.birth_date) {
|
|
||||||
return (recX.birth_date as Date).toLocaleDateString()
|
|
||||||
} else if (typeof recX.birth_date == 'string') {
|
|
||||||
return (recX.birth_date as string).substring(0, 10)
|
|
||||||
}
|
|
||||||
return recX.birth_date
|
|
||||||
},
|
|
||||||
patient_age: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
return recX.birth_date?.split('T')[0]
|
|
||||||
},
|
|
||||||
gender: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') {
|
|
||||||
return 'Tidak Diketahui'
|
|
||||||
}
|
|
||||||
return recX.gender_code
|
|
||||||
},
|
|
||||||
education: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
if (typeof recX.education_code == 'number' && recX.education_code >= 0) {
|
|
||||||
return recX.education_code
|
|
||||||
} else if (typeof recX.education_code) {
|
|
||||||
return recX.education_code
|
|
||||||
}
|
|
||||||
return '-'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
action(rec, idx) {
|
action(rec, idx) {
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
import { config } from './list-cfg'
|
import { config } from './list-cfg'
|
||||||
|
|
||||||
defineProps<{ data: any[] }>()
|
defineProps<{ data: any[] }>()
|
||||||
const modelValue = defineModel<any | null>()
|
const modelValue = defineModel<any[]>('modelValue', { default: [] })
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref } from 'vue'
|
|
||||||
import { Trash2 } from 'lucide-vue-next'
|
import { Trash2 } from 'lucide-vue-next'
|
||||||
// import { Button } from '@/components/ui/button'
|
|
||||||
// import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from '@/components/ui/table'
|
|
||||||
|
|
||||||
interface Diagnosa {
|
interface Diagnosa {
|
||||||
id: number
|
id: number
|
||||||
@@ -10,10 +7,10 @@ interface Diagnosa {
|
|||||||
icd: string
|
icd: string
|
||||||
}
|
}
|
||||||
|
|
||||||
const list = ref<Diagnosa[]>([{ id: 1, diagnosa: 'Acute appendicitis', icd: 'K35' }])
|
const modelValue = defineModel<Diagnosa[]>({ default: [] })
|
||||||
|
|
||||||
function removeItem(id: number) {
|
function removeItem(id: number) {
|
||||||
list.value = list.value.filter((item) => item.id !== id)
|
modelValue.value = modelValue.value.filter((item) => item.id !== id)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -30,12 +27,19 @@ function removeItem(id: number) {
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
<TableBody>
|
<TableBody>
|
||||||
<TableRow v-for="(item, i) in list" :key="item.id">
|
<TableRow
|
||||||
|
v-for="(item, i) in modelValue"
|
||||||
|
:key="item.id"
|
||||||
|
>
|
||||||
<TableCell class="text-center font-medium">{{ i + 1 }}</TableCell>
|
<TableCell class="text-center font-medium">{{ i + 1 }}</TableCell>
|
||||||
<TableCell>{{ item.diagnosa }}</TableCell>
|
<TableCell>{{ item.code }}</TableCell>
|
||||||
<TableCell>{{ item.icd }}</TableCell>
|
<TableCell>{{ item.name }}</TableCell>
|
||||||
<TableCell class="text-center">
|
<TableCell class="text-center">
|
||||||
<Button variant="ghost" size="icon" @click="removeItem(item.id)">
|
<Button
|
||||||
|
variant="ghost"
|
||||||
|
size="icon"
|
||||||
|
@click="removeItem(item.id)"
|
||||||
|
>
|
||||||
<Trash2 class="h-4 w-4 text-gray-500 hover:text-red-500" />
|
<Trash2 class="h-4 w-4 text-gray-500 hover:text-red-500" />
|
||||||
</Button>
|
</Button>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -63,13 +63,13 @@ const validate = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ validate })
|
defineExpose({ validate })
|
||||||
|
const icdPreview = inject('icdPreview')
|
||||||
|
|
||||||
const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<form id="entry-form">
|
<form id="entry-form">
|
||||||
{{ errors }}
|
|
||||||
<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">
|
||||||
<Block>
|
<Block>
|
||||||
<Cell>
|
<Cell>
|
||||||
@@ -285,7 +285,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
|||||||
<Button
|
<Button
|
||||||
class="rounded bg-orange-100 px-3 py-1 text-orange-600"
|
class="rounded bg-orange-100 px-3 py-1 text-orange-600"
|
||||||
type="button"
|
type="button"
|
||||||
@click="emits('modal', 'diagnosa')"
|
@click="emit('modal', 'diagnosa')"
|
||||||
>
|
>
|
||||||
+ Pilih Diagnosa
|
+ Pilih Diagnosa
|
||||||
</Button>
|
</Button>
|
||||||
@@ -298,7 +298,7 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
|||||||
<Button
|
<Button
|
||||||
class="rounded bg-orange-100 px-3 py-1 text-orange-600"
|
class="rounded bg-orange-100 px-3 py-1 text-orange-600"
|
||||||
type="button"
|
type="button"
|
||||||
@click="emits('modal', 'prosedur')"
|
@click="emit('modal', 'prosedur')"
|
||||||
>
|
>
|
||||||
+ Pilih Prosedur
|
+ Pilih Prosedur
|
||||||
</Button>
|
</Button>
|
||||||
@@ -307,8 +307,8 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
|||||||
</Block>
|
</Block>
|
||||||
|
|
||||||
<div class="mb-8 grid grid-cols-2 gap-4">
|
<div class="mb-8 grid grid-cols-2 gap-4">
|
||||||
<AppIcdPreview />
|
<AppIcdPreview v-model="icdPreview.diagnoses" />
|
||||||
<AppIcdPreview />
|
<AppIcdPreview v-model="icdPreview.procedures" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<Block :colCount="3">
|
<Block :colCount="3">
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ const validate = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
defineExpose({ validate })
|
defineExpose({ validate })
|
||||||
|
const icdPreview = inject('icdPreview')
|
||||||
|
|
||||||
const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
||||||
</script>
|
</script>
|
||||||
@@ -452,10 +453,18 @@ const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
|||||||
|
|
||||||
<div class="my-2">
|
<div class="my-2">
|
||||||
<h1 class="font-semibold">Diagnosa Fungsional (ICD-X)</h1>
|
<h1 class="font-semibold">Diagnosa Fungsional (ICD-X)</h1>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
class="rounded bg-orange-100 px-3 py-1 text-orange-600"
|
||||||
|
type="button"
|
||||||
|
@click="emit('click', 'fungsional')"
|
||||||
|
>
|
||||||
|
+ Pilih Prosedur
|
||||||
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-8 grid grid-cols-2 gap-4">
|
<div class="mb-8 grid grid-cols-2 gap-4">
|
||||||
<AppIcdPreview />
|
<AppIcdPreview v-model="icdPreview.diagnoses" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="my-2">
|
<div class="my-2">
|
||||||
|
|||||||
@@ -43,5 +43,6 @@ defineExpose({ validate })
|
|||||||
@click="$emit('click', $event)"
|
@click="$emit('click', $event)"
|
||||||
@submit="$emit('submit', $event)"
|
@submit="$emit('submit', $event)"
|
||||||
@cancel="$emit('cancel', $event)"
|
@cancel="$emit('cancel', $event)"
|
||||||
|
@modal="$emit('modal', $event)"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -86,6 +86,8 @@ const validate = async () => {
|
|||||||
|
|
||||||
defineExpose({ validate })
|
defineExpose({ validate })
|
||||||
|
|
||||||
|
const icdPreview = inject('icdPreview')
|
||||||
|
|
||||||
const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
const isExcluded = (key: string) => props.excludeFields?.includes(key)
|
||||||
const disorders = ref<string[]>([])
|
const disorders = ref<string[]>([])
|
||||||
const therapies = ref<string[]>([])
|
const therapies = ref<string[]>([])
|
||||||
@@ -558,33 +560,33 @@ const therapyOptions = ['Terapi Latihan', 'Modalitas Fisik', 'Protesa/Ortosa', '
|
|||||||
<Button
|
<Button
|
||||||
class="my-2 rounded bg-orange-100 px-3 py-1 text-orange-600"
|
class="my-2 rounded bg-orange-100 px-3 py-1 text-orange-600"
|
||||||
type="button"
|
type="button"
|
||||||
@click="emits('click', 'prosedur')"
|
@click="emit('click', 'diagnosa')"
|
||||||
>
|
>
|
||||||
+ Pilih Prosedur
|
+ Pilih Prosedur
|
||||||
</Button>
|
</Button>
|
||||||
<AppIcdPreview />
|
<AppIcdPreview v-model="icdPreview.diagnoses" />
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<span class="text-md">Diagnosa Fungsional (ICD-X)</span>
|
||||||
|
<Button
|
||||||
|
class="my-2 rounded bg-orange-100 px-3 py-1 text-orange-600"
|
||||||
|
type="button"
|
||||||
|
@click="emit('click', 'fungsional')"
|
||||||
|
>
|
||||||
|
+ Pilih Prosedur
|
||||||
|
</Button>
|
||||||
|
<AppIcdPreview v-model="icdPreview.fungsional" />
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<span class="text-md">Diagnosa Medis (ICD-X)</span>
|
<span class="text-md">Diagnosa Medis (ICD-X)</span>
|
||||||
<Button
|
<Button
|
||||||
class="my-2 rounded bg-orange-100 px-3 py-1 text-orange-600"
|
class="my-2 rounded bg-orange-100 px-3 py-1 text-orange-600"
|
||||||
type="button"
|
type="button"
|
||||||
@click="emits('click', 'prosedur')"
|
@click="emit('click', 'prosedur')"
|
||||||
>
|
>
|
||||||
+ Pilih Prosedur
|
+ Pilih Prosedur
|
||||||
</Button>
|
</Button>
|
||||||
<AppIcdPreview />
|
<AppIcdPreview v-model="icdPreview.procedures" />
|
||||||
</div>
|
|
||||||
<div>
|
|
||||||
<span class="text-md">Diagnosa Medis (ICD-X)</span>
|
|
||||||
<Button
|
|
||||||
class="my-2 rounded bg-orange-100 px-3 py-1 text-orange-600"
|
|
||||||
type="button"
|
|
||||||
@click="emits('click', 'prosedur')"
|
|
||||||
>
|
|
||||||
+ Pilih Prosedur
|
|
||||||
</Button>
|
|
||||||
<AppIcdPreview />
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -6,46 +6,21 @@ type SmallDetailDto = any
|
|||||||
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
|
const action = defineAsyncComponent(() => import('~/components/pub/my-ui/data/dropdown-action-dud.vue'))
|
||||||
|
|
||||||
export const config: Config = {
|
export const config: Config = {
|
||||||
cols: [
|
cols: [{}, {}, {}, { width: 100 }, { width: 120 }, {}, {}, {}, { width: 100 }, { width: 100 }, {}, { width: 50 }],
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{ width: 100 },
|
|
||||||
{ width: 120 },
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{},
|
|
||||||
{ width: 100 },
|
|
||||||
{ width: 100 },
|
|
||||||
{},
|
|
||||||
{ width: 50 },
|
|
||||||
],
|
|
||||||
|
|
||||||
headers: [
|
headers: [
|
||||||
[
|
[
|
||||||
{ label: 'Nama' },
|
{ label: 'Tanggal' },
|
||||||
{ label: 'Rekam Medis' },
|
{ label: 'DPJP' },
|
||||||
{ label: 'KTP' },
|
{ label: 'Keluhan & Riwayat' },
|
||||||
{ label: 'Tgl Lahir' },
|
{ label: 'Pemeriksaan' },
|
||||||
{ label: 'Umur' },
|
{ label: 'Diagnosa' },
|
||||||
{ label: 'JK' },
|
|
||||||
{ label: 'Pendidikan' },
|
|
||||||
{ label: 'Status' },
|
{ label: 'Status' },
|
||||||
{ label: '' },
|
{ label: 'Aksi' },
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
|
|
||||||
keys: [
|
keys: ['time', 'employee_id', 'main_complaint', 'encounter_id', 'diagnose', 'status', 'action'],
|
||||||
'name',
|
|
||||||
'medicalRecord_number',
|
|
||||||
'identity_number',
|
|
||||||
'birth_date',
|
|
||||||
'patient_age',
|
|
||||||
'gender',
|
|
||||||
'education',
|
|
||||||
'status',
|
|
||||||
'action',
|
|
||||||
],
|
|
||||||
|
|
||||||
delKeyNames: [
|
delKeyNames: [
|
||||||
{ key: 'code', label: 'Kode' },
|
{ key: 'code', label: 'Kode' },
|
||||||
@@ -53,45 +28,34 @@ export const config: Config = {
|
|||||||
],
|
],
|
||||||
|
|
||||||
parses: {
|
parses: {
|
||||||
name: (rec: unknown): unknown => {
|
time(rec: any) {
|
||||||
const recX = rec as SmallDetailDto
|
return rec.time ? new Date(rec.time).toLocaleDateString() : ''
|
||||||
return `${recX.firstName} ${recX.middleName || ''} ${recX.lastName || ''}`
|
|
||||||
},
|
},
|
||||||
identity_number: (rec: unknown): unknown => {
|
main_complaint(rec: any) {
|
||||||
const recX = rec as SmallDetailDto
|
const { value } = rec ?? {}
|
||||||
if (recX.identity_number?.substring(0, 5) === 'BLANK') {
|
|
||||||
return '(TANPA NIK)'
|
if (typeof value !== 'string') return '-'
|
||||||
|
|
||||||
|
try {
|
||||||
|
const parsed = JSON.parse(value)
|
||||||
|
console.log('parsed', parsed)
|
||||||
|
return parsed?.['prim-compl'] || '-'
|
||||||
|
} catch {
|
||||||
|
return '-'
|
||||||
}
|
}
|
||||||
return recX.identity_number
|
|
||||||
},
|
},
|
||||||
birth_date: (rec: unknown): unknown => {
|
diagnose(rec: any) {
|
||||||
const recX = rec as SmallDetailDto
|
const { value } = rec ?? {}
|
||||||
if (typeof recX.birth_date === 'object' && recX.birth_date) {
|
|
||||||
return (recX.birth_date as Date).toLocaleDateString()
|
if (typeof value !== 'string') return '-'
|
||||||
} else if (typeof recX.birth_date === 'string') {
|
|
||||||
return recX.birth_date.substring(0, 10)
|
try {
|
||||||
|
const parsed = JSON.parse(value)
|
||||||
|
const diagnose = parsed?.diagnose || []
|
||||||
|
return diagnose.map((d: any) => d.name).join(', ')
|
||||||
|
} catch {
|
||||||
|
return '-'
|
||||||
}
|
}
|
||||||
return recX.birth_date
|
|
||||||
},
|
|
||||||
patient_age: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
return recX.birth_date?.split('T')[0]
|
|
||||||
},
|
|
||||||
gender: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
if (typeof recX?.gender_code !== 'number' && recX?.gender_code !== '') {
|
|
||||||
return 'Tidak Diketahui'
|
|
||||||
}
|
|
||||||
return recX.gender_code
|
|
||||||
},
|
|
||||||
education: (rec: unknown): unknown => {
|
|
||||||
const recX = rec as SmallDetailDto
|
|
||||||
if (typeof recX.education_code === 'number' && recX.education_code >= 0) {
|
|
||||||
return recX.education_code
|
|
||||||
} else if (typeof recX.education_code !== 'undefined') {
|
|
||||||
return recX.education_code
|
|
||||||
}
|
|
||||||
return '-'
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>halo</div>
|
|
||||||
</template>
|
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
<script setup lang="ts">
|
|
||||||
import type { DataTableLoader } from '~/components/pub/my-ui/data-table/type'
|
|
||||||
import type { HeaderPrep, RefSearchNav } from '~/components/pub/my-ui/data/types'
|
|
||||||
import AssesmentFunctionList from '~/components/app/encounter/assesment-function/list.vue'
|
|
||||||
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
|
||||||
|
|
||||||
const props = defineProps<{
|
|
||||||
label: string
|
|
||||||
}>()
|
|
||||||
|
|
||||||
const data = ref([])
|
|
||||||
|
|
||||||
const refSearchNav: RefSearchNav = {
|
|
||||||
onClick: () => {
|
|
||||||
// open filter modal
|
|
||||||
},
|
|
||||||
onInput: (_val: string) => {
|
|
||||||
// filter patient list
|
|
||||||
},
|
|
||||||
onClear: () => {
|
|
||||||
// clear url param
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
// Loading state management
|
|
||||||
const isLoading = reactive<DataTableLoader>({
|
|
||||||
isTableLoading: false,
|
|
||||||
})
|
|
||||||
const recId = ref<number>(0)
|
|
||||||
const recAction = ref<string>('')
|
|
||||||
const recItem = ref<any>(null)
|
|
||||||
|
|
||||||
const hreaderPrep: HeaderPrep = {
|
|
||||||
title: props.label,
|
|
||||||
icon: 'i-lucide-users',
|
|
||||||
addNav: {
|
|
||||||
label: 'Tambah',
|
|
||||||
onClick: () => navigateTo('/rehab/registration-queue/sep-prosedur/add'),
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getPatientList() {
|
|
||||||
const resp = await xfetch('/api/v1/patient')
|
|
||||||
if (resp.success) {
|
|
||||||
data.value = (resp.body as Record<string, any>).data
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
getPatientList()
|
|
||||||
})
|
|
||||||
|
|
||||||
provide('rec_id', recId)
|
|
||||||
provide('rec_action', recAction)
|
|
||||||
provide('rec_item', recItem)
|
|
||||||
provide('table_data_loader', isLoading)
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
<Header :prep="{ ...hreaderPrep }" :ref-search-nav="refSearchNav" />
|
|
||||||
<div class="my-4 flex flex-1 flex-col gap-4 md:gap-8">
|
|
||||||
<AssesmentFunctionList :data="data" />
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
@@ -11,7 +11,7 @@ import CompTab from '~/components/pub/my-ui/comp-tab/comp-tab.vue'
|
|||||||
|
|
||||||
// PLASE ORDER BY TAB POSITION
|
// PLASE ORDER BY TAB POSITION
|
||||||
import Status from '~/components/content/encounter/status.vue'
|
import Status from '~/components/content/encounter/status.vue'
|
||||||
import AssesmentFunctionList from '~/components/content/assesment-function/list.vue'
|
import AssesmentFunctionList from '~/components/content/soapi/entry.vue'
|
||||||
import EarlyMedicalAssesmentList from '~/components/content/soapi/entry.vue'
|
import EarlyMedicalAssesmentList from '~/components/content/soapi/entry.vue'
|
||||||
import EarlyMedicalRehabList from '~/components/content/soapi/entry.vue'
|
import EarlyMedicalRehabList from '~/components/content/soapi/entry.vue'
|
||||||
import PrescriptionList from '~/components/content/prescription/list.vue'
|
import PrescriptionList from '~/components/content/prescription/list.vue'
|
||||||
@@ -38,13 +38,24 @@ const data = dataResBody?.data ?? null
|
|||||||
|
|
||||||
const tabs: TabItem[] = [
|
const tabs: TabItem[] = [
|
||||||
{ value: 'status', label: 'Status Masuk/Keluar', component: Status, props: { encounter: data } },
|
{ value: 'status', label: 'Status Masuk/Keluar', component: Status, props: { encounter: data } },
|
||||||
{ value: 'early-medical-assessment', label: 'Pengkajian Awal Medis', component: EarlyMedicalAssesmentList },
|
{
|
||||||
|
value: 'early-medical-assessment',
|
||||||
|
label: 'Pengkajian Awal Medis',
|
||||||
|
component: EarlyMedicalAssesmentList,
|
||||||
|
props: { encounter: data, type: 'early-medic', label: 'Pengkajian Awal Medis' },
|
||||||
|
},
|
||||||
{
|
{
|
||||||
value: 'rehab-medical-assessment',
|
value: 'rehab-medical-assessment',
|
||||||
label: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
label: 'Pengkajian Awal Medis Rehabilitasi Medis',
|
||||||
component: EarlyMedicalRehabList,
|
component: EarlyMedicalRehabList,
|
||||||
|
props: { encounter: data, type: 'early-rehab', label: 'Pengkajian Awal Medis Rehabilitasi Medis' },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 'function-assessment',
|
||||||
|
label: 'Asesmen Fungsi',
|
||||||
|
component: AssesmentFunctionList,
|
||||||
|
props: { encounter: data, type: 'function', label: 'Asesmen Fungsi' },
|
||||||
},
|
},
|
||||||
{ value: 'function-assessment', label: 'Asesmen Fungsi', component: AssesmentFunctionList },
|
|
||||||
{ value: 'therapy-protocol', label: 'Protokol Terapi' },
|
{ value: 'therapy-protocol', label: 'Protokol Terapi' },
|
||||||
{ value: 'education-assessment', label: 'Asesmen Kebutuhan Edukasi' },
|
{ value: 'education-assessment', label: 'Asesmen Kebutuhan Edukasi' },
|
||||||
{ value: 'consent', label: 'General Consent' },
|
{ value: 'consent', label: 'General Consent' },
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import FunctionForm from './form-function.vue'
|
|||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
||||||
|
|
||||||
const { mode, openForm, backToList } = useQueryMode('mode')
|
const { mode, goToEntry, backToList } = useQueryCRUDMode('mode')
|
||||||
|
|
||||||
const formMap = {
|
const formMap = {
|
||||||
'early-medical-assessment': EarlyForm,
|
'early-medical-assessment': EarlyForm,
|
||||||
@@ -26,7 +26,8 @@ const ActiveForm = computed(() => formMap[type.value] || EarlyForm)
|
|||||||
<div>
|
<div>
|
||||||
<SoapiList
|
<SoapiList
|
||||||
v-if="mode === 'list'"
|
v-if="mode === 'list'"
|
||||||
@add="openForm"
|
@add="goToEntry"
|
||||||
|
@edit="goToEntry"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<component
|
<component
|
||||||
|
|||||||
@@ -2,14 +2,23 @@
|
|||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
import Entry from '~/components/app/soapi/entry.vue'
|
import Entry from '~/components/app/soapi/entry.vue'
|
||||||
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||||
|
import ActionDialog from '~/components/pub/my-ui/nav-footer/ba-su.vue'
|
||||||
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||||
import { FunctionSoapiSchema } from '~/schemas/soapi.schema'
|
import { FunctionSoapiSchema } from '~/schemas/soapi.schema'
|
||||||
import { toast } from '~/components/pub/ui/toast'
|
import { toast } from '~/components/pub/ui/toast'
|
||||||
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
||||||
|
const { backToList } = useQueryMode('mode')
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const isOpen = ref(false)
|
const isOpenProcedure = ref(false)
|
||||||
const data = ref([])
|
const isOpenDiagnose = ref(false)
|
||||||
|
const isOpenFungsional = ref(false)
|
||||||
|
const procedures = ref([])
|
||||||
|
const diagnoses = ref([])
|
||||||
|
const fungsional = ref([])
|
||||||
|
const selectedProcedure = ref<any>(null)
|
||||||
|
const selectedDiagnose = ref<any>(null)
|
||||||
|
const selectedFungsional = ref<any>(null)
|
||||||
const schema = FunctionSoapiSchema
|
const schema = FunctionSoapiSchema
|
||||||
const payload = ref({
|
const payload = ref({
|
||||||
encounter_id: 0,
|
encounter_id: 0,
|
||||||
@@ -60,29 +69,55 @@ const isLoading = reactive<DataTableLoader>({
|
|||||||
isTableLoading: false,
|
isTableLoading: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getPatientList() {
|
async function getDiagnoses() {
|
||||||
isLoading.isTableLoading = true
|
isLoading.isTableLoading = true
|
||||||
const resp = await xfetch('/api/v1/patient')
|
const resp = await xfetch('/api/v1/diagnose-src')
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
data.value = (resp.body as Record<string, any>).data
|
diagnoses.value = (resp.body as Record<string, any>).data
|
||||||
|
}
|
||||||
|
isLoading.isTableLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getProcedures() {
|
||||||
|
isLoading.isTableLoading = true
|
||||||
|
const resp = await xfetch('/api/v1/procedure-src')
|
||||||
|
if (resp.success) {
|
||||||
|
procedures.value = (resp.body as Record<string, any>).data
|
||||||
}
|
}
|
||||||
isLoading.isTableLoading = false
|
isLoading.isTableLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPatientList()
|
getProcedures()
|
||||||
|
getDiagnoses()
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleOpen(type: string) {
|
function handleClick(type: string) {
|
||||||
console.log(type)
|
if (type === 'prosedur') {
|
||||||
isOpen.value = true
|
isOpenProcedure.value = true
|
||||||
|
} else if (type === 'diagnosa') {
|
||||||
|
isOpenDiagnose.value = true
|
||||||
|
} else if (type === 'fungsional') {
|
||||||
|
isOpenDiagnose.value = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const entryRehabRef = ref()
|
const entryRehabRef = ref()
|
||||||
async function actionHandler(type: string) {
|
async function actionHandler(type: string) {
|
||||||
console.log(type)
|
if (type === 'back') {
|
||||||
|
backToList()
|
||||||
|
return
|
||||||
|
}
|
||||||
const result = await entryRehabRef.value?.validate()
|
const result = await entryRehabRef.value?.validate()
|
||||||
if (result?.valid) {
|
if (result?.valid) {
|
||||||
|
if (
|
||||||
|
selectedProcedure.value?.length > 0 ||
|
||||||
|
selectedDiagnose.value?.length > 0 ||
|
||||||
|
selectedFungsional.value?.length > 0
|
||||||
|
) {
|
||||||
|
result.data.procedure = selectedProcedure.value || []
|
||||||
|
result.data.diagnose = selectedDiagnose.value || []
|
||||||
|
result.data.fungsional = selectedFungsional.value || []
|
||||||
|
}
|
||||||
console.log('data', result.data)
|
console.log('data', result.data)
|
||||||
handleActionSave(
|
handleActionSave(
|
||||||
{
|
{
|
||||||
@@ -99,7 +134,23 @@ async function actionHandler(type: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const icdPreview = ref({
|
||||||
|
procedures: [],
|
||||||
|
diagnoses: [],
|
||||||
|
})
|
||||||
|
|
||||||
|
function actionDialogHandler(type: string) {
|
||||||
|
if (type === 'submit') {
|
||||||
|
icdPreview.value.procedures = selectedProcedure.value || []
|
||||||
|
icdPreview.value.diagnoses = selectedDiagnose.value || []
|
||||||
|
icdPreview.value.fungsional = selectedFungsional.value || []
|
||||||
|
}
|
||||||
|
isOpenProcedure.value = false
|
||||||
|
isOpenDiagnose.value = false
|
||||||
|
}
|
||||||
|
|
||||||
provide('table_data_loader', isLoading)
|
provide('table_data_loader', isLoading)
|
||||||
|
provide('icdPreview', icdPreview)
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Entry
|
<Entry
|
||||||
@@ -107,17 +158,52 @@ provide('table_data_loader', isLoading)
|
|||||||
v-model="model"
|
v-model="model"
|
||||||
:schema="schema"
|
:schema="schema"
|
||||||
type="function"
|
type="function"
|
||||||
@modal="handleOpen"
|
@click="handleClick"
|
||||||
/>
|
/>
|
||||||
<div class="my-2 flex justify-end py-2">
|
<div class="my-2 flex justify-end py-2">
|
||||||
<Action @click="actionHandler" />
|
<Action @click="actionHandler" />
|
||||||
</div>
|
</div>
|
||||||
<Dialog
|
<Dialog
|
||||||
v-model:open="isOpen"
|
v-model:open="isOpenProcedure"
|
||||||
title="Pilih Prosedur"
|
title="Pilih Prosedur"
|
||||||
size="xl"
|
size="xl"
|
||||||
prevent-outside
|
prevent-outside
|
||||||
>
|
>
|
||||||
<AppIcdMultiselectPicker :data="data" />
|
<AppIcdMultiselectPicker
|
||||||
|
v-model:model-value="selectedProcedure"
|
||||||
|
:data="procedures"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="my-2 flex justify-end py-2">
|
||||||
|
<ActionDialog @click="actionDialogHandler" />
|
||||||
|
</div>
|
||||||
|
</Dialog>
|
||||||
|
<Dialog
|
||||||
|
v-model:open="isOpenDiagnose"
|
||||||
|
title="Pilih Diagnosa"
|
||||||
|
size="xl"
|
||||||
|
prevent-outside
|
||||||
|
>
|
||||||
|
<AppIcdMultiselectPicker
|
||||||
|
v-model:model-value="selectedDiagnose"
|
||||||
|
:data="diagnoses"
|
||||||
|
/>
|
||||||
|
<div class="my-2 flex justify-end py-2">
|
||||||
|
<ActionDialog @click="actionDialogHandler" />
|
||||||
|
</div>
|
||||||
|
</Dialog>
|
||||||
|
<Dialog
|
||||||
|
v-model:open="isOpenFungsional"
|
||||||
|
title="Pilih Fungsional"
|
||||||
|
size="xl"
|
||||||
|
prevent-outside
|
||||||
|
>
|
||||||
|
<AppIcdMultiselectPicker
|
||||||
|
v-model:model-value="selectedFungsional"
|
||||||
|
:data="diagnoses"
|
||||||
|
/>
|
||||||
|
<div class="my-2 flex justify-end py-2">
|
||||||
|
<ActionDialog @click="actionDialogHandler" />
|
||||||
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -2,14 +2,20 @@
|
|||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
import Entry from '~/components/app/soapi/entry.vue'
|
import Entry from '~/components/app/soapi/entry.vue'
|
||||||
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||||
|
import ActionDialog from '~/components/pub/my-ui/nav-footer/ba-su.vue'
|
||||||
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||||
import { EarlyRehabSchema } from '~/schemas/soapi.schema'
|
import { EarlyRehabSchema } from '~/schemas/soapi.schema'
|
||||||
import { toast } from '~/components/pub/ui/toast'
|
import { toast } from '~/components/pub/ui/toast'
|
||||||
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
||||||
|
const { backToList } = useQueryMode('mode')
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const isOpen = ref(false)
|
const isOpenProcedure = ref(false)
|
||||||
const data = ref([])
|
const isOpenDiagnose = ref(false)
|
||||||
|
const procedures = ref([])
|
||||||
|
const diagnoses = ref([])
|
||||||
|
const selectedProcedure = ref<any>(null)
|
||||||
|
const selectedDiagnose = ref<any>(null)
|
||||||
const schema = EarlyRehabSchema
|
const schema = EarlyRehabSchema
|
||||||
const payload = ref({
|
const payload = ref({
|
||||||
encounter_id: 0,
|
encounter_id: 0,
|
||||||
@@ -65,29 +71,46 @@ const isLoading = reactive<DataTableLoader>({
|
|||||||
isTableLoading: false,
|
isTableLoading: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getPatientList() {
|
async function getDiagnoses() {
|
||||||
isLoading.isTableLoading = true
|
isLoading.isTableLoading = true
|
||||||
const resp = await xfetch('/api/v1/patient')
|
const resp = await xfetch('/api/v1/diagnose-src')
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
data.value = (resp.body as Record<string, any>).data
|
diagnoses.value = (resp.body as Record<string, any>).data
|
||||||
|
}
|
||||||
|
isLoading.isTableLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getProcedures() {
|
||||||
|
isLoading.isTableLoading = true
|
||||||
|
const resp = await xfetch('/api/v1/procedure-src')
|
||||||
|
if (resp.success) {
|
||||||
|
procedures.value = (resp.body as Record<string, any>).data
|
||||||
}
|
}
|
||||||
isLoading.isTableLoading = false
|
isLoading.isTableLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPatientList()
|
getProcedures()
|
||||||
|
getDiagnoses()
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleOpen(type: string) {
|
function handleOpen(type: string) {
|
||||||
console.log(type)
|
if (type === 'fungsional') {
|
||||||
isOpen.value = true
|
isOpenDiagnose.value = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const entryRehabRef = ref()
|
const entryRehabRef = ref()
|
||||||
async function actionHandler(type: string) {
|
async function actionHandler(type: string) {
|
||||||
console.log(type)
|
if (type === 'back') {
|
||||||
|
backToList()
|
||||||
|
return
|
||||||
|
}
|
||||||
const result = await entryRehabRef.value?.validate()
|
const result = await entryRehabRef.value?.validate()
|
||||||
if (result?.valid) {
|
if (result?.valid) {
|
||||||
|
if (selectedDiagnose.value?.length > 0) {
|
||||||
|
result.data.diagnose = selectedDiagnose.value || []
|
||||||
|
}
|
||||||
console.log('data', result.data)
|
console.log('data', result.data)
|
||||||
handleActionSave(
|
handleActionSave(
|
||||||
{
|
{
|
||||||
@@ -104,7 +127,22 @@ async function actionHandler(type: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const icdPreview = ref({
|
||||||
|
procedures: [],
|
||||||
|
diagnoses: [],
|
||||||
|
})
|
||||||
|
|
||||||
|
function actionDialogHandler(type: string) {
|
||||||
|
if (type === 'submit') {
|
||||||
|
icdPreview.value.procedures = selectedProcedure.value || []
|
||||||
|
icdPreview.value.diagnoses = selectedDiagnose.value || []
|
||||||
|
}
|
||||||
|
isOpenProcedure.value = false
|
||||||
|
isOpenDiagnose.value = false
|
||||||
|
}
|
||||||
|
|
||||||
provide('table_data_loader', isLoading)
|
provide('table_data_loader', isLoading)
|
||||||
|
provide('icdPreview', icdPreview)
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Entry
|
<Entry
|
||||||
@@ -112,17 +150,23 @@ provide('table_data_loader', isLoading)
|
|||||||
v-model="model"
|
v-model="model"
|
||||||
:schema="schema"
|
:schema="schema"
|
||||||
type="early-rehab"
|
type="early-rehab"
|
||||||
@modal="handleOpen"
|
@click="handleOpen"
|
||||||
/>
|
/>
|
||||||
<div class="my-2 flex justify-end py-2">
|
<div class="my-2 flex justify-end py-2">
|
||||||
<Action @click="actionHandler" />
|
<Action @click="actionHandler" />
|
||||||
</div>
|
</div>
|
||||||
<Dialog
|
<Dialog
|
||||||
v-model:open="isOpen"
|
v-model:open="isOpenDiagnose"
|
||||||
title="Pilih Prosedur"
|
title="Pilih Fungsional"
|
||||||
size="xl"
|
size="xl"
|
||||||
prevent-outside
|
prevent-outside
|
||||||
>
|
>
|
||||||
<AppIcdMultiselectPicker :data="data" />
|
<AppIcdMultiselectPicker
|
||||||
|
v-model:model-value="selectedDiagnose"
|
||||||
|
:data="diagnoses"
|
||||||
|
/>
|
||||||
|
<div class="my-2 flex justify-end py-2">
|
||||||
|
<ActionDialog @click="actionDialogHandler" />
|
||||||
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -2,14 +2,20 @@
|
|||||||
import { z } from 'zod'
|
import { z } from 'zod'
|
||||||
import Entry from '~/components/app/soapi/entry.vue'
|
import Entry from '~/components/app/soapi/entry.vue'
|
||||||
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
import Action from '~/components/pub/my-ui/nav-footer/ba-dr-su.vue'
|
||||||
|
import ActionDialog from '~/components/pub/my-ui/nav-footer/ba-su.vue'
|
||||||
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||||
import { EarlySchema } from '~/schemas/soapi.schema'
|
import { EarlySchema } from '~/schemas/soapi.schema'
|
||||||
import { toast } from '~/components/pub/ui/toast'
|
import { toast } from '~/components/pub/ui/toast'
|
||||||
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
import { handleActionSave, handleActionEdit } from '~/handlers/soapi-early.handler'
|
||||||
|
|
||||||
|
const { backToList } = useQueryMode('mode')
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const isOpen = ref(false)
|
const isOpenProcedure = ref(false)
|
||||||
const data = ref([])
|
const isOpenDiagnose = ref(false)
|
||||||
|
const procedures = ref([])
|
||||||
|
const diagnoses = ref([])
|
||||||
|
const selectedProcedure = ref<any>(null)
|
||||||
|
const selectedDiagnose = ref<any>(null)
|
||||||
const schema = EarlySchema
|
const schema = EarlySchema
|
||||||
const payload = ref({
|
const payload = ref({
|
||||||
encounter_id: 0,
|
encounter_id: 0,
|
||||||
@@ -38,29 +44,50 @@ const isLoading = reactive<DataTableLoader>({
|
|||||||
isTableLoading: false,
|
isTableLoading: false,
|
||||||
})
|
})
|
||||||
|
|
||||||
async function getPatientList() {
|
async function getDiagnoses() {
|
||||||
isLoading.isTableLoading = true
|
isLoading.isTableLoading = true
|
||||||
const resp = await xfetch('/api/v1/patient')
|
const resp = await xfetch('/api/v1/diagnose-src')
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
data.value = (resp.body as Record<string, any>).data
|
diagnoses.value = (resp.body as Record<string, any>).data
|
||||||
|
}
|
||||||
|
isLoading.isTableLoading = false
|
||||||
|
}
|
||||||
|
|
||||||
|
async function getProcedures() {
|
||||||
|
isLoading.isTableLoading = true
|
||||||
|
const resp = await xfetch('/api/v1/procedure-src')
|
||||||
|
if (resp.success) {
|
||||||
|
procedures.value = (resp.body as Record<string, any>).data
|
||||||
}
|
}
|
||||||
isLoading.isTableLoading = false
|
isLoading.isTableLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getPatientList()
|
getProcedures()
|
||||||
|
getDiagnoses()
|
||||||
})
|
})
|
||||||
|
|
||||||
function handleOpen(type: string) {
|
function handleOpen(type: string) {
|
||||||
console.log(type)
|
if (type === 'prosedur') {
|
||||||
isOpen.value = true
|
isOpenProcedure.value = true
|
||||||
|
} else if (type === 'diagnosa') {
|
||||||
|
isOpenDiagnose.value = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const entryRef = ref()
|
const entryRef = ref()
|
||||||
async function actionHandler(type: string) {
|
async function actionHandler(type: string) {
|
||||||
console.log(type)
|
if (type === 'back') {
|
||||||
|
backToList()
|
||||||
|
return
|
||||||
|
}
|
||||||
const result = await entryRef.value?.validate()
|
const result = await entryRef.value?.validate()
|
||||||
if (result?.valid) {
|
if (result?.valid) {
|
||||||
|
if (selectedProcedure.value?.length > 0 || selectedDiagnose.value?.length > 0) {
|
||||||
|
result.data.procedure = selectedProcedure.value || []
|
||||||
|
result.data.diagnose = selectedDiagnose.value || []
|
||||||
|
}
|
||||||
|
|
||||||
console.log('data', result.data)
|
console.log('data', result.data)
|
||||||
handleActionSave(
|
handleActionSave(
|
||||||
{
|
{
|
||||||
@@ -77,7 +104,22 @@ async function actionHandler(type: string) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const icdPreview = ref({
|
||||||
|
procedures: [],
|
||||||
|
diagnoses: [],
|
||||||
|
})
|
||||||
|
|
||||||
|
function actionDialogHandler(type: string) {
|
||||||
|
if (type === 'submit') {
|
||||||
|
icdPreview.value.procedures = selectedProcedure.value || []
|
||||||
|
icdPreview.value.diagnoses = selectedDiagnose.value || []
|
||||||
|
}
|
||||||
|
isOpenProcedure.value = false
|
||||||
|
isOpenDiagnose.value = false
|
||||||
|
}
|
||||||
|
|
||||||
provide('table_data_loader', isLoading)
|
provide('table_data_loader', isLoading)
|
||||||
|
provide('icdPreview', icdPreview)
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<Entry
|
<Entry
|
||||||
@@ -91,11 +133,32 @@ provide('table_data_loader', isLoading)
|
|||||||
<Action @click="actionHandler" />
|
<Action @click="actionHandler" />
|
||||||
</div>
|
</div>
|
||||||
<Dialog
|
<Dialog
|
||||||
v-model:open="isOpen"
|
v-model:open="isOpenProcedure"
|
||||||
title="Pilih Prosedur"
|
title="Pilih Prosedur"
|
||||||
size="xl"
|
size="xl"
|
||||||
prevent-outside
|
prevent-outside
|
||||||
>
|
>
|
||||||
<AppIcdMultiselectPicker :data="data" />
|
<AppIcdMultiselectPicker
|
||||||
|
v-model:model-value="selectedProcedure"
|
||||||
|
:data="procedures"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div class="my-2 flex justify-end py-2">
|
||||||
|
<ActionDialog @click="actionDialogHandler" />
|
||||||
|
</div>
|
||||||
|
</Dialog>
|
||||||
|
<Dialog
|
||||||
|
v-model:open="isOpenDiagnose"
|
||||||
|
title="Pilih Diagnosa"
|
||||||
|
size="xl"
|
||||||
|
prevent-outside
|
||||||
|
>
|
||||||
|
<AppIcdMultiselectPicker
|
||||||
|
v-model:model-value="selectedDiagnose"
|
||||||
|
:data="diagnoses"
|
||||||
|
/>
|
||||||
|
<div class="my-2 flex justify-end py-2">
|
||||||
|
<ActionDialog @click="actionDialogHandler" />
|
||||||
|
</div>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,16 +1,41 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import type { DataTableLoader } from '~/components/pub/my-ui/data-table/type'
|
import type { DataTableLoader } from '~/components/pub/my-ui/data-table/type'
|
||||||
import type { HeaderPrep, RefSearchNav } from '~/components/pub/my-ui/data/types'
|
import type { PaginationMeta } from '~/components/pub/my-ui/pagination/pagination.type'
|
||||||
import AssesmentFunctionList from '~/components/app/soapi/list.vue'
|
import { ActionEvents, type HeaderPrep, type RefSearchNav } from '~/components/pub/my-ui/data/types'
|
||||||
|
import RecordConfirmation from '~/components/pub/my-ui/confirmation/record-confirmation.vue'
|
||||||
|
import List from '~/components/app/soapi/list.vue'
|
||||||
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
||||||
|
|
||||||
const props = defineProps<{
|
// Helpers
|
||||||
label: string
|
import { usePaginatedList } from '~/composables/usePaginatedList'
|
||||||
}>()
|
import { toast } from '~/components/pub/ui/toast'
|
||||||
|
|
||||||
|
import { handleActionRemove } from '~/handlers/soapi-early.handler'
|
||||||
|
// Services
|
||||||
|
import { getList, getDetail } from '~/services/soapi-early.service'
|
||||||
|
|
||||||
|
// Models
|
||||||
|
import type { Encounter } from '~/models/encounter'
|
||||||
|
|
||||||
|
// Props
|
||||||
|
interface Props {
|
||||||
|
encounter: Encounter
|
||||||
|
label: string
|
||||||
|
}
|
||||||
|
const route = useRoute()
|
||||||
|
const props = defineProps<Props>()
|
||||||
const emits = defineEmits(['add', 'edit'])
|
const emits = defineEmits(['add', 'edit'])
|
||||||
|
|
||||||
const data = ref([])
|
const data = ref([])
|
||||||
|
const encounterId = ref<number>(props?.encounter?.id || 0)
|
||||||
|
const title = ref('')
|
||||||
|
const recId = ref<number>(0)
|
||||||
|
const recAction = ref<string>('')
|
||||||
|
const recItem = ref<any>(null)
|
||||||
|
const isLoading = ref(false)
|
||||||
|
const isReadonly = ref(false)
|
||||||
|
const isRecordConfirmationOpen = ref(false)
|
||||||
|
const paginationMeta = ref<PaginationMeta>(null)
|
||||||
|
|
||||||
const refSearchNav: RefSearchNav = {
|
const refSearchNav: RefSearchNav = {
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
@@ -24,13 +49,7 @@ const refSearchNav: RefSearchNav = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
// Loading state management
|
const typeCode = ref('')
|
||||||
const isLoading = reactive<DataTableLoader>({
|
|
||||||
isTableLoading: false,
|
|
||||||
})
|
|
||||||
const recId = ref<number>(0)
|
|
||||||
const recAction = ref<string>('')
|
|
||||||
const recItem = ref<any>(null)
|
|
||||||
|
|
||||||
const hreaderPrep: HeaderPrep = {
|
const hreaderPrep: HeaderPrep = {
|
||||||
title: props.label,
|
title: props.label,
|
||||||
@@ -41,15 +60,86 @@ const hreaderPrep: HeaderPrep = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
async function getPatientList() {
|
const { recordId } = useQueryCRUDRecordId()
|
||||||
const resp = await xfetch('/api/v1/patient')
|
const { goToEntry, backToList } = useQueryCRUDMode('mode')
|
||||||
|
|
||||||
|
const type = computed(() => (route.query.tab as string) || 'early-medical-assessment')
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
await getMyList()
|
||||||
|
})
|
||||||
|
|
||||||
|
async function getMyList() {
|
||||||
|
const url = `/api/v1/soapi?type-code=${typeCode.value}?includes=encounter`
|
||||||
|
const resp = await xfetch(url)
|
||||||
if (resp.success) {
|
if (resp.success) {
|
||||||
data.value = (resp.body as Record<string, any>).data
|
data.value = (resp.body as Record<string, any>).data
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
function handlePageChange(page: number) {
|
||||||
getPatientList()
|
emits('pageChange', page)
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleBack() {
|
||||||
|
recordId.value = ''
|
||||||
|
backToList()
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => type.value,
|
||||||
|
(val) => {
|
||||||
|
if (val) {
|
||||||
|
if (val === 'early-medical-assessment') {
|
||||||
|
typeCode.value = 'early-medic'
|
||||||
|
} else if (val === 'rehab-medical-assessment') {
|
||||||
|
typeCode.value = 'early-rehab'
|
||||||
|
} else if (val === 'function-assessment') {
|
||||||
|
typeCode.value = 'function'
|
||||||
|
}
|
||||||
|
getMyList()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
)
|
||||||
|
|
||||||
|
watch([recId, recAction], () => {
|
||||||
|
switch (recAction.value) {
|
||||||
|
case ActionEvents.showEdit:
|
||||||
|
emits('edit')
|
||||||
|
isReadonly.value = false
|
||||||
|
router.replace({
|
||||||
|
path: route.path,
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
mode: 'entry',
|
||||||
|
'record-id': recId.value,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
break
|
||||||
|
|
||||||
|
case ActionEvents.showDetail:
|
||||||
|
emits('edit')
|
||||||
|
isReadonly.value = true
|
||||||
|
router.replace({
|
||||||
|
path: route.path,
|
||||||
|
query: {
|
||||||
|
...route.query,
|
||||||
|
mode: 'entry',
|
||||||
|
'record-id': recId.value,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
break
|
||||||
|
|
||||||
|
case ActionEvents.showConfirmDelete:
|
||||||
|
isRecordConfirmationOpen.value = true
|
||||||
|
break
|
||||||
|
|
||||||
|
case ActionEvents.showAdd:
|
||||||
|
recordId.value = ''
|
||||||
|
goToEntry()
|
||||||
|
emits('add')
|
||||||
|
break
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('rec_id', recId)
|
provide('rec_id', recId)
|
||||||
@@ -59,7 +149,39 @@ provide('table_data_loader', isLoading)
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Header :prep="{ ...hreaderPrep }" :ref-search-nav="refSearchNav" />
|
<Header
|
||||||
|
:prep="{ ...hreaderPrep }"
|
||||||
|
:ref-search-nav="refSearchNav"
|
||||||
|
/>
|
||||||
|
<List :data="data" />
|
||||||
|
|
||||||
<AssesmentFunctionList :data="data" />
|
<PaginationView
|
||||||
|
:pagination-meta="paginationMeta"
|
||||||
|
@page-change="handlePageChange"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<RecordConfirmation
|
||||||
|
v-model:open="isRecordConfirmationOpen"
|
||||||
|
action="delete"
|
||||||
|
:record="recItem"
|
||||||
|
@confirm="() => handleActionRemove(recId, getMyList, toast)"
|
||||||
|
@cancel=""
|
||||||
|
>
|
||||||
|
<template #default="{ record }">
|
||||||
|
<div class="text-sm">
|
||||||
|
<p>
|
||||||
|
<strong>ID:</strong>
|
||||||
|
{{ record?.id }}
|
||||||
|
</p>
|
||||||
|
<p v-if="record?.name">
|
||||||
|
<strong>Nama:</strong>
|
||||||
|
{{ record.name }}
|
||||||
|
</p>
|
||||||
|
<p v-if="record?.code">
|
||||||
|
<strong>Kode:</strong>
|
||||||
|
{{ record.code }}
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</RecordConfirmation>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -12,14 +12,14 @@ const emit = defineEmits<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
function changeTab(value: string) {
|
function changeTab(value: string) {
|
||||||
activeTab.value = value;
|
activeTab.value = value
|
||||||
emit('changeTab', value);
|
emit('changeTab', value)
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<!-- Tabs -->
|
<!-- Tabs -->
|
||||||
<div class="mt-4 flex flex-wrap gap-2 rounded-md border bg-white dark:bg-neutral-950 p-4 shadow-sm">
|
<div class="mt-4 flex flex-wrap gap-2 rounded-md border bg-white p-4 shadow-sm dark:bg-neutral-950">
|
||||||
<Button
|
<Button
|
||||||
v-for="tab in data"
|
v-for="tab in data"
|
||||||
:key="tab.value"
|
:key="tab.value"
|
||||||
@@ -34,10 +34,12 @@ function changeTab(value: string) {
|
|||||||
<!-- Active Tab Content -->
|
<!-- Active Tab Content -->
|
||||||
<div class="mt-4 rounded-md border p-4">
|
<div class="mt-4 rounded-md border p-4">
|
||||||
<component
|
<component
|
||||||
v-if="data.find((t) => t.value === activeTab)?.component"
|
|
||||||
:is="data.find((t) => t.value === activeTab)?.component"
|
:is="data.find((t) => t.value === activeTab)?.component"
|
||||||
:label="data.find((t) => t.value === activeTab)?.label"
|
v-bind="data.find((t) => t.value === activeTab)?.props"
|
||||||
v-bind="data.find((t) => t.value === activeTab)?.props || {}"
|
|
||||||
/>
|
/>
|
||||||
|
<!-- v-if="data.find((t) => t.value === activeTab)?.component" -->
|
||||||
|
<!-- :is="data.find((t) => t.value === activeTab)?.component" -->
|
||||||
|
<!-- v-bind="data.find((t) => t.value === activeTab)?.props || {}" -->
|
||||||
|
<!-- :label="data.find((t) => t.value === activeTab)?.label" -->
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { isRef } from 'vue';
|
import { isRef } from 'vue'
|
||||||
import type { DataTableLoader } from '~/components/pub/my-ui/data/types'
|
import type { DataTableLoader } from '~/components/pub/my-ui/data/types'
|
||||||
import type { Config } from './index'
|
import type { Config } from './index'
|
||||||
import { Info } from 'lucide-vue-next'
|
import { Info } from 'lucide-vue-next'
|
||||||
@@ -19,14 +19,21 @@ const loader = inject('table_data_loader') as DataTableLoader
|
|||||||
// local state utk selection
|
// local state utk selection
|
||||||
const selected = ref<any[]>([])
|
const selected = ref<any[]>([])
|
||||||
|
|
||||||
function toggleSelection(row: any) {
|
function toggleSelection(row: any, event?: Event) {
|
||||||
if (props.selectMode === 'single') {
|
if (event) event.stopPropagation() // cegah event bubble ke TableRow
|
||||||
|
|
||||||
|
const isMultiple = props.selectMode === 'multi' || props.selectMode === 'multiple'
|
||||||
|
|
||||||
|
// gunakan pembanding berdasarkan id atau stringify data
|
||||||
|
const findIndex = selected.value.findIndex((r) => JSON.stringify(r) === JSON.stringify(row))
|
||||||
|
|
||||||
|
if (!isMultiple) {
|
||||||
|
// mode single
|
||||||
selected.value = [row]
|
selected.value = [row]
|
||||||
emit('update:modelValue', row)
|
emit('update:modelValue', row)
|
||||||
} else {
|
} else {
|
||||||
const idx = selected.value.findIndex((r) => r === row)
|
if (findIndex >= 0) {
|
||||||
if (idx >= 0) {
|
selected.value.splice(findIndex, 1)
|
||||||
selected.value.splice(idx, 1)
|
|
||||||
} else {
|
} else {
|
||||||
selected.value.push(row)
|
selected.value.push(row)
|
||||||
}
|
}
|
||||||
@@ -35,23 +42,22 @@ function toggleSelection(row: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function deepFetch(data: Record<string, any>, key: string): string {
|
function deepFetch(data: Record<string, any>, key: string): string {
|
||||||
let result = '';
|
let result = ''
|
||||||
const keys = key.split('.')
|
const keys = key.split('.')
|
||||||
let lastVal: any = isRef(data) ? {...(data.value as any)} : data
|
let lastVal: any = isRef(data) ? { ...(data.value as any) } : data
|
||||||
for (let i = 0; i < keys.length; i++) {
|
for (let i = 0; i < keys.length; i++) {
|
||||||
let idx = keys[i] || ''
|
let idx = keys[i] || ''
|
||||||
if (typeof lastVal[idx] != undefined && lastVal[idx] != null) {
|
if (typeof lastVal[idx] != undefined && lastVal[idx] != null) {
|
||||||
if (i == keys.length - 1) {
|
if (i == keys.length - 1) {
|
||||||
return lastVal[idx];
|
return lastVal[idx]
|
||||||
} else {
|
} else {
|
||||||
lastVal = isRef(lastVal[idx]) ? {...(lastVal[idx].value as any)} : lastVal[idx]
|
lastVal = isRef(lastVal[idx]) ? { ...(lastVal[idx].value as any) } : lastVal[idx]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function handleActionCellClick(event: Event, _cellRef: string) {
|
function handleActionCellClick(event: Event, _cellRef: string) {
|
||||||
// Prevent event if clicked directly on the button/dropdown
|
// Prevent event if clicked directly on the button/dropdown
|
||||||
const target = event.target as HTMLElement
|
const target = event.target as HTMLElement
|
||||||
@@ -70,7 +76,10 @@ function handleActionCellClick(event: Event, _cellRef: string) {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Table>
|
<Table>
|
||||||
<TableHeader v-if="headers" class="bg-gray-50 dark:bg-gray-800">
|
<TableHeader
|
||||||
|
v-if="headers"
|
||||||
|
class="bg-gray-50 dark:bg-gray-800"
|
||||||
|
>
|
||||||
<TableRow v-for="(hr, hrIdx) in headers">
|
<TableRow v-for="(hr, hrIdx) in headers">
|
||||||
<TableHead
|
<TableHead
|
||||||
v-for="(th, idx) in headers[hrIdx]"
|
v-for="(th, idx) in headers[hrIdx]"
|
||||||
@@ -85,15 +94,25 @@ function handleActionCellClick(event: Event, _cellRef: string) {
|
|||||||
|
|
||||||
<TableBody v-if="loader?.isTableLoading">
|
<TableBody v-if="loader?.isTableLoading">
|
||||||
<!-- Loading state with 5 skeleton rows -->
|
<!-- Loading state with 5 skeleton rows -->
|
||||||
<TableRow v-for="n in getSkeletonSize" :key="`skeleton-${n}`">
|
<TableRow
|
||||||
<TableCell v-for="(key, cellIndex) in keys" :key="`cell-skel-${n}-${cellIndex}`" class="border">
|
v-for="n in getSkeletonSize"
|
||||||
<Skeleton class="h-6 w-full animate-pulse bg-gray-100 dark:bg-gray-700 text-muted-foreground" />
|
:key="`skeleton-${n}`"
|
||||||
|
>
|
||||||
|
<TableCell
|
||||||
|
v-for="(key, cellIndex) in keys"
|
||||||
|
:key="`cell-skel-${n}-${cellIndex}`"
|
||||||
|
class="border"
|
||||||
|
>
|
||||||
|
<Skeleton class="h-6 w-full animate-pulse bg-gray-100 text-muted-foreground dark:bg-gray-700" />
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</TableRow>
|
||||||
</TableBody>
|
</TableBody>
|
||||||
<TableBody v-else-if="rows.length === 0">
|
<TableBody v-else-if="rows.length === 0">
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell :colspan="keys.length" class="py-8 text-center">
|
<TableCell
|
||||||
|
:colspan="keys.length"
|
||||||
|
class="py-8 text-center"
|
||||||
|
>
|
||||||
<div class="flex items-center justify-center">
|
<div class="flex items-center justify-center">
|
||||||
<Info class="size-5 text-muted-foreground" />
|
<Info class="size-5 text-muted-foreground" />
|
||||||
<span class="ml-2">Tidak ada data tersedia</span>
|
<span class="ml-2">Tidak ada data tersedia</span>
|
||||||
@@ -106,8 +125,11 @@ function handleActionCellClick(event: Event, _cellRef: string) {
|
|||||||
v-for="(row, rowIndex) in rows"
|
v-for="(row, rowIndex) in rows"
|
||||||
:key="`row-${rowIndex}`"
|
:key="`row-${rowIndex}`"
|
||||||
:class="{
|
:class="{
|
||||||
'bg-green-50': props.selectMode === 'single' && selected.includes(row),
|
'bg-green-50':
|
||||||
'bg-blue-50': props.selectMode === 'multiple' && selected.includes(row),
|
props.selectMode === 'single' && selected.some((r) => JSON.stringify(r) === JSON.stringify(row)),
|
||||||
|
'bg-blue-50':
|
||||||
|
(props.selectMode === 'multi' || props.selectMode === 'multiple') &&
|
||||||
|
selected.some((r) => JSON.stringify(r) === JSON.stringify(row)),
|
||||||
}"
|
}"
|
||||||
@click="toggleSelection(row)"
|
@click="toggleSelection(row)"
|
||||||
>
|
>
|
||||||
@@ -116,14 +138,23 @@ function handleActionCellClick(event: Event, _cellRef: string) {
|
|||||||
<input
|
<input
|
||||||
v-if="props.selectMode === 'single'"
|
v-if="props.selectMode === 'single'"
|
||||||
type="radio"
|
type="radio"
|
||||||
:checked="selected.includes(row)"
|
:checked="selected.some((r) => JSON.stringify(r) === JSON.stringify(row))"
|
||||||
@change="toggleSelection(row)"
|
@click.stop="toggleSelection(row, $event)"
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
v-else
|
||||||
|
type="checkbox"
|
||||||
|
:checked="selected.some((r) => JSON.stringify(r) === JSON.stringify(row))"
|
||||||
|
@click.stop="toggleSelection(row, $event)"
|
||||||
/>
|
/>
|
||||||
<input v-else type="checkbox" :checked="selected.includes(row)" @change="toggleSelection(row)" />
|
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|
||||||
<!-- lanjut render cell normal -->
|
<!-- lanjut render cell normal -->
|
||||||
<TableCell v-for="(key, cellIndex) in keys" :key="`cell-${rowIndex}-${cellIndex}`" class="border">
|
<TableCell
|
||||||
|
v-for="(key, cellIndex) in keys"
|
||||||
|
:key="`cell-${rowIndex}-${cellIndex}`"
|
||||||
|
class="border"
|
||||||
|
>
|
||||||
<!-- existing cell renderer -->
|
<!-- existing cell renderer -->
|
||||||
<component
|
<component
|
||||||
:is="components?.[key]?.(row, rowIndex).component"
|
:is="components?.[key]?.(row, rowIndex).component"
|
||||||
@@ -133,9 +164,12 @@ function handleActionCellClick(event: Event, _cellRef: string) {
|
|||||||
v-bind="components[key]?.(row, rowIndex).props"
|
v-bind="components[key]?.(row, rowIndex).props"
|
||||||
/>
|
/>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<div v-if="htmls?.[key]" v-html="htmls?.[key]?.(row, rowIndex)"></div>
|
<div
|
||||||
|
v-if="htmls?.[key]"
|
||||||
|
v-html="htmls?.[key]?.(row, rowIndex)"
|
||||||
|
></div>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
{{ parses?.[key]?.(row, rowIndex) ?? deepFetch((row as any), key) }}
|
{{ parses?.[key]?.(row, rowIndex) ?? deepFetch(row as any, key) }}
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
Reference in New Issue
Block a user