Merge branch 'dev' of github.com:dikstub-rssa/simrs-fe into feat/patient-63-adjustment
This commit is contained in:
@@ -89,10 +89,10 @@ function proceedItem(action: string) {
|
||||
|
||||
function getLinks() {
|
||||
switch (activeServicePosition.value) {
|
||||
case 'medical':
|
||||
case 'med':
|
||||
linkItemsFiltered.value = baseLinkItems.filter((item) => item.groups?.includes('medical'))
|
||||
break
|
||||
case 'registration':
|
||||
case 'reg':
|
||||
linkItemsFiltered.value = baseLinkItems.filter((item) => item.groups?.includes('registration'))
|
||||
break
|
||||
default:
|
||||
|
||||
@@ -28,6 +28,7 @@ import ConfirmationInfo from '~/components/app/device-order/confirmation-info.vu
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
encounter_id: number
|
||||
canUpdate?: boolean
|
||||
}>()
|
||||
|
||||
const encounter_id = props.encounter_id
|
||||
@@ -153,7 +154,7 @@ function pickItem(): DeviceOrder | null {
|
||||
:pagination-meta="paginationMeta"
|
||||
@page-change="handlePageChange"
|
||||
/>
|
||||
<!--
|
||||
<!--
|
||||
@cancel="cancel"
|
||||
@edit="edit"
|
||||
@submit="submit"
|
||||
|
||||
@@ -16,7 +16,7 @@ import { useIntegrationSepEntry } from '~/handlers/integration-sep-entry.handler
|
||||
const props = defineProps<{
|
||||
id: number
|
||||
classCode?: 'ambulatory' | 'emergency' | 'inpatient' | 'outpatient'
|
||||
subClassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
subclassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
formType: string
|
||||
}>()
|
||||
|
||||
@@ -77,9 +77,7 @@ function handleSaveClick() {
|
||||
}
|
||||
|
||||
function handleFetch(value?: any) {
|
||||
if (value?.subSpecialistId) {
|
||||
handleFetchDoctors(value.subSpecialistId)
|
||||
}
|
||||
// handleFetchDoctors(props.subclassCode)
|
||||
}
|
||||
|
||||
async function handleEvent(menu: string, value?: any) {
|
||||
@@ -97,7 +95,7 @@ async function handleEvent(menu: string, value?: any) {
|
||||
isService: 'false',
|
||||
encounterId: props.id || null,
|
||||
sourcePath: route.path,
|
||||
resource: `${props.classCode}-${props.subClassCode}`,
|
||||
resource: `${props.classCode}-${props.subclassCode}`,
|
||||
...value,
|
||||
})
|
||||
} else if (menu === 'sep-number-changed') {
|
||||
@@ -213,7 +211,7 @@ onMounted(async () => {
|
||||
:is-action="true"
|
||||
:histories="histories"
|
||||
/>
|
||||
|
||||
|
||||
<!-- Footer Actions -->
|
||||
<div class="mt-6 flex justify-end gap-2 border-t border-t-slate-300 pt-4">
|
||||
<Button
|
||||
|
||||
@@ -35,7 +35,7 @@ import FilterForm from '~/components/app/encounter/filter-form.vue'
|
||||
// Props
|
||||
const props = defineProps<{
|
||||
classCode?: 'ambulatory' | 'emergency' | 'inpatient'
|
||||
subClassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
subclassCode?: 'reg' | 'rehab' | 'chemo' | 'emg' | 'eon' | 'op' | 'icu' | 'hcu' | 'vk'
|
||||
canCreate?: boolean
|
||||
canUpdate?: boolean
|
||||
canDelete?: boolean
|
||||
@@ -172,8 +172,8 @@ async function getPatientList() {
|
||||
if (props.classCode) {
|
||||
params['class-code'] = props.classCode
|
||||
}
|
||||
if (props.subClassCode) {
|
||||
params['sub-class-code'] = props.subClassCode
|
||||
if (props.subclassCode) {
|
||||
params['subclass-code'] = props.subclassCode
|
||||
}
|
||||
const result = await getEncounterList(params)
|
||||
if (result.success) {
|
||||
|
||||
@@ -15,6 +15,8 @@ import CheckOutView from '~/components/app/encounter/check-out-view.vue'
|
||||
import CheckOutEntry from '~/components/app/encounter/check-out-entry.vue'
|
||||
import type { Encounter } from '~/models/encounter'
|
||||
import { checkIn } from '~/services/encounter.service'
|
||||
import { getServicePosition } from '~/lib/roles'
|
||||
import type { Item } from '~/components/pub/my-ui/combobox'
|
||||
|
||||
//
|
||||
const props = defineProps<{
|
||||
@@ -22,11 +24,24 @@ const props = defineProps<{
|
||||
canUpdate?: boolean
|
||||
}>()
|
||||
|
||||
//
|
||||
const { user } = useUserStore()
|
||||
const servicePosition = user.user_contractPosition_code == 'emp' ? getServicePosition('emp|'+user.employee_position_code) : null
|
||||
// const subClassCode = servicePosition == 'chemo' ? 'chemo' : null
|
||||
|
||||
// doctors
|
||||
const localEncounter = ref<Encounter>(props.encounter)
|
||||
const doctors = await getDoctorValueLabelList({'includes': 'employee,employee-person'}, true)
|
||||
const doctors = ref<Item[]>([])
|
||||
const employees = await getEmployeeValueLabelList({'includes': 'person', 'position-code': 'reg'})
|
||||
const units = await getUnitValueLabelList()
|
||||
const canUpdate = ref(true)
|
||||
|
||||
if (props.encounter.status_code == 'done') {
|
||||
canUpdate.value = false
|
||||
}
|
||||
if (canUpdate.value) {
|
||||
doctors.value = await getDoctorValueLabelList({'includes': 'employee,employee-person', 'unit-code': user.unit_code}, true)
|
||||
}
|
||||
|
||||
// check in
|
||||
const checkInValues = ref<any>({
|
||||
@@ -94,6 +109,7 @@ function submitCheckOut(values: CheckOutFormData) {
|
||||
</div>
|
||||
|
||||
<Dialog
|
||||
v-if="canUpdate"
|
||||
v-model:open="checkInDialogOpen"
|
||||
title="Ubah Informasi Masuk"
|
||||
size="md"
|
||||
@@ -103,7 +119,7 @@ function submitCheckOut(values: CheckOutFormData) {
|
||||
:schema="CheckInSchema"
|
||||
:values="checkInValues"
|
||||
:encounter="encounter"
|
||||
:doctors="doctors"
|
||||
:doctors="doctors || []"
|
||||
:employees="employees"
|
||||
:is-loading="checkInIsLoading"
|
||||
:is-readonly="checkInIsReadonly"
|
||||
@@ -113,6 +129,7 @@ function submitCheckOut(values: CheckOutFormData) {
|
||||
</Dialog>
|
||||
|
||||
<Dialog
|
||||
v-if="canUpdate"
|
||||
v-model:open="checkOutDialogOpen"
|
||||
title="Ubah Informasi Keluar"
|
||||
size="lg"
|
||||
|
||||
@@ -7,6 +7,14 @@ import SoapiList from './list.vue'
|
||||
import EarlyForm from './form.vue'
|
||||
import RehabForm from './form-rehab.vue'
|
||||
import FunctionForm from './form-function.vue'
|
||||
import type { Encounter } from '~/models/encounter'
|
||||
|
||||
interface Props {
|
||||
encounter: Encounter
|
||||
label: string
|
||||
canUpdate?: boolean
|
||||
}
|
||||
const props = defineProps<Props>()
|
||||
|
||||
const route = useRoute()
|
||||
const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
|
||||
@@ -23,8 +31,9 @@ const ActiveForm = computed(() => formMap[type.value] || EarlyForm)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- {{ type }} -->
|
||||
<div>
|
||||
<SoapiList v-if="mode === 'list'" />
|
||||
<SoapiList v-if="mode === 'list'" :label="label" :canUpdate="canUpdate" />
|
||||
<component
|
||||
v-else
|
||||
:is="ActiveForm"
|
||||
|
||||
@@ -21,6 +21,7 @@ import type { Encounter } from '~/models/encounter'
|
||||
interface Props {
|
||||
encounter: Encounter
|
||||
label: string
|
||||
canUpdate?: boolean
|
||||
}
|
||||
const props = defineProps<Props>()
|
||||
const emits = defineEmits(['add', 'edit'])
|
||||
@@ -58,10 +59,12 @@ const typeCode = ref('')
|
||||
const hreaderPrep: HeaderPrep = {
|
||||
title: props.label,
|
||||
icon: 'i-lucide-users',
|
||||
addNav: {
|
||||
}
|
||||
if(props.canUpdate) {
|
||||
hreaderPrep['addNav'] = {
|
||||
label: 'Tambah',
|
||||
onClick: () => goToEntry(),
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
const type = computed(() => (route.query.menu as string) || 'early-medical-assessment')
|
||||
@@ -169,6 +172,8 @@ provide('table_data_loader', isLoading)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- {{ canUpdate }}
|
||||
{{ hreaderPrep }} -->
|
||||
<Header
|
||||
:prep="{ ...hreaderPrep }"
|
||||
:ref-search-nav="refSearchNav"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export interface Item {
|
||||
value: string | number
|
||||
value: string
|
||||
label: string
|
||||
code?: string
|
||||
priority?: number
|
||||
|
||||
@@ -1,40 +1,33 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
height?: number
|
||||
class?: string
|
||||
activeTab?: 1 | 2
|
||||
}>()
|
||||
|
||||
const classVal = computed(() => {
|
||||
return props.class ? props.class : ''
|
||||
})
|
||||
const activeTab = ref(props.activeTab || 1)
|
||||
|
||||
function handleClick(value: 1 | 2) {
|
||||
activeTab.value = value
|
||||
function switchActiveTab() {
|
||||
activeTab.value = activeTab.value === 1 ? 2 : 1
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="content-switcher" :style="`height: ${height || 200}px`">
|
||||
<div :class="`${activeTab === 1 ? 'active' : 'inactive'}`">
|
||||
<div class="content-wrapper">
|
||||
<div>
|
||||
<slot name="content1" />
|
||||
</div>
|
||||
<div :class="`content-switcher ${classVal}`" :style="height ? `height:${200}px` : ''">
|
||||
<div class="wrapper">
|
||||
<div :class="`item item-1 ${activeTab === 1 ? 'active' : 'inactive'}`">
|
||||
<slot name="content1" />
|
||||
</div>
|
||||
<div class="content-nav">
|
||||
<button @click="handleClick(1)">
|
||||
<Icon name="i-lucide-chevron-right" />
|
||||
<div :class="`nav border-slate-300 ${ activeTab == 1 ? 'border-l' : 'border-r'}`">
|
||||
<button @click="switchActiveTab()" class="!p-0 w-full h-full">
|
||||
<Icon :name="activeTab == 1 ? 'i-lucide-chevron-left' : 'i-lucide-chevron-right'" class="text-3xl" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="`${activeTab === 2 ? 'active' : 'inactive'}`">
|
||||
<div class="content-nav">
|
||||
<button @click="handleClick(2)">
|
||||
<Icon name="i-lucide-chevron-left" />
|
||||
</button>
|
||||
</div>
|
||||
<div class="content-wrapper">
|
||||
<div>
|
||||
<slot name="content2" />
|
||||
</div>
|
||||
<div :class="`item item-2 ${activeTab === 2 ? 'active' : 'inactive'}`">
|
||||
<slot name="content2" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -42,45 +35,24 @@ function handleClick(value: 1 | 2) {
|
||||
|
||||
<style>
|
||||
.content-switcher {
|
||||
@apply flex overflow-hidden gap-3
|
||||
@apply overflow-hidden
|
||||
}
|
||||
.content-switcher > * {
|
||||
@apply border border-slate-300 rounded-md flex overflow-hidden
|
||||
.wrapper {
|
||||
@apply flex w-[200%] h-full
|
||||
}
|
||||
.item {
|
||||
@apply w-[calc(50%-60px)]
|
||||
}
|
||||
|
||||
.content-wrapper {
|
||||
@apply p-4 2xl:p-5 overflow-hidden grow
|
||||
.item-1.active {
|
||||
@apply ms-0 transition-all duration-500 ease-in-out
|
||||
}
|
||||
.inactive .content-wrapper {
|
||||
@apply p-0 w-0
|
||||
.item-1.inactive {
|
||||
@apply -ms-[calc(50%-60px)] transition-all duration-500 ease-in-out
|
||||
}
|
||||
|
||||
.content-nav {
|
||||
@apply h-full flex flex-row items-center justify-center content-center !text-2xl overflow-hidden
|
||||
.nav {
|
||||
@apply h-full w-[60px] flex flex-row items-center justify-center content-center !text-2xl overflow-hidden
|
||||
}
|
||||
|
||||
.content-nav button {
|
||||
@apply pt-2 px-2 h-full w-full
|
||||
}
|
||||
|
||||
/* .content-switcher .inactive > .content-wrapper {
|
||||
@apply w-0 p-0 opacity-0 transition-all duration-500 ease-in-out
|
||||
} */
|
||||
.content-switcher .inactive {
|
||||
@apply w-16 transition-all duration-500 ease-in-out
|
||||
}
|
||||
.content-switcher .inactive > .content-nav {
|
||||
@apply w-full transition-all duration-100 ease-in-out
|
||||
}
|
||||
|
||||
.content-switcher .active {
|
||||
@apply grow transition-all duration-500 ease-in-out
|
||||
}
|
||||
.content-switcher .active > .content-nav {
|
||||
@apply w-0 transition-all duration-100 ease-in-out
|
||||
}
|
||||
/* .content-switcher .active > .content-wrapper {
|
||||
@apply w-full delay-1000 transition-all duration-1000 ease-in-out
|
||||
} */
|
||||
|
||||
</style>
|
||||
|
||||
@@ -4,6 +4,9 @@ import { type EncounterItem } from "~/handlers/encounter-init.handler";
|
||||
const props = defineProps<{
|
||||
initialActiveMenu: string
|
||||
data: EncounterItem[]
|
||||
canCreate?: boolean
|
||||
canUpdate?: boolean
|
||||
canDelete?: boolean
|
||||
}>()
|
||||
|
||||
const activeMenu = ref(props.initialActiveMenu)
|
||||
@@ -38,7 +41,11 @@ function changeMenu(value: string) {
|
||||
class="flex-1 rounded-md border bg-white p-4 shadow-sm dark:bg-neutral-950">
|
||||
<component
|
||||
:is="data.find((m) => m.id === activeMenu)?.component"
|
||||
v-bind="data.find((m) => m.id === activeMenu)?.props" />
|
||||
v-bind="data.find((m) => m.id === activeMenu)?.props"
|
||||
:can-create="canCreate"
|
||||
:can-update="canUpdate"
|
||||
:can-delete="canDelete"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user