Dev cleaning (#106)
This commit is contained in:
No files matched your search
@@ -0,0 +1,86 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import ListProsedur from './sep-prosedur/list.vue'
|
||||
|
||||
interface TabItem {
|
||||
value: string
|
||||
label: string
|
||||
component?: any
|
||||
props?: Record<string, any>
|
||||
}
|
||||
|
||||
const tabs: TabItem[] = [
|
||||
{ value: 'status', label: 'Status Masuk/Keluar' },
|
||||
{ value: 'medis', label: 'Pengkajian Awal Medis' },
|
||||
{ value: 'rehab', label: 'Pengkajian Awal Medis Rehabilitasi Medis' },
|
||||
{ value: 'fungsi', label: 'Asesmen Fungsi', component: ListProsedur },
|
||||
{ value: 'protokol', label: 'Protokol Terapi' },
|
||||
{ value: 'edukasi', label: 'Asesmen Kebutuhan Edukasi' },
|
||||
{ value: 'consent', label: 'General Consent' },
|
||||
{ value: 'cprj', label: 'CPRJ' },
|
||||
{ value: 'obat', label: 'Order Obat' },
|
||||
{ value: 'alkes', label: 'Order Alkes' },
|
||||
{ value: 'radiologi', label: 'Order Radiologi' },
|
||||
{ value: 'labpk', label: 'Order Lab PK' },
|
||||
{ value: 'labmikro', label: 'Order Lab Mikro' },
|
||||
{ value: 'labpa', label: 'Order Lab PA' },
|
||||
{ value: 'ruangtindakan', label: 'Order Ruang Tindakan' },
|
||||
{ value: 'hasil', label: 'Hasil Penunjang' },
|
||||
{ value: 'konsultasi', label: 'Konsultasi' },
|
||||
{ value: 'resume', label: 'Resume' },
|
||||
{ value: 'kontrol', label: 'Surat Kontrol' },
|
||||
{ value: 'skrining', label: 'Skrinning MPP' },
|
||||
{ value: 'upload', label: 'Upload Dokumen Pendukung' },
|
||||
]
|
||||
const data = {
|
||||
noRm: 'RM21123',
|
||||
nama: 'Ahmad Sutanto',
|
||||
alamat: 'Jl Jaksa Agung Suprapto No. 12, Jakarta',
|
||||
tanggalKunjungan: '23 April 2024',
|
||||
klinik: 'Bedah',
|
||||
tanggalLahir: '23 April 1990 (25 Tahun)',
|
||||
jenisKelamin: 'Laki-laki',
|
||||
jenisPembayaran: 'JKN',
|
||||
noBilling: '223332',
|
||||
dpjp: 'dr. Syaifullah, Sp.OT(K)',
|
||||
}
|
||||
|
||||
const activeTab = ref('fungsi')
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="w-full">
|
||||
<div class="mb-4">
|
||||
<button
|
||||
class="flex items-center gap-2 rounded-full border border-orange-400 bg-orange-50 px-3 py-1 text-sm font-medium text-orange-600 hover:bg-orange-100"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 19l-7-7 7-7" />
|
||||
</svg>
|
||||
Kembali ke Daftar Kunjungan
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<AppPatientQuickInfo :data="data" />
|
||||
<div class="mt-4 flex flex-wrap gap-2 rounded-md border bg-white p-4 shadow-sm">
|
||||
<button
|
||||
v-for="tab in tabs"
|
||||
:key="tab.value"
|
||||
:data-active="activeTab === tab.value"
|
||||
class="flex-shrink-0 rounded-full px-4 py-2 text-sm font-medium transition data-[active=false]:bg-gray-100 data-[active=true]:bg-green-600 data-[active=false]:text-gray-700 data-[active=true]:text-white"
|
||||
@click="activeTab = tab.value"
|
||||
>
|
||||
{{ tab.label }}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="mt-4 rounded-md border p-4">
|
||||
<component
|
||||
:is="tabs.find((t) => t.value === activeTab)?.component"
|
||||
v-if="tabs.find((t) => t.value === activeTab)?.component"
|
||||
v-bind="tabs.find((t) => t.value === activeTab)?.props || {}"
|
||||
:label="tabs.find((t) => t.value === activeTab)?.label"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@@ -0,0 +1,3 @@
|
||||
<template>
|
||||
<div>halo</div>
|
||||
</template>
|
||||
@@ -0,0 +1,64 @@
|
||||
<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 RehabSepProsedurList from '~/components/app/rehab/registration/sep-prosedur/list.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">
|
||||
<RehabSepProsedurList :data="data" />
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user