Merge from Stash
This commit is contained in:
@@ -1,32 +1,36 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div class="md:grid md:grid-cols-2 font-semibold">
|
||||||
<PubMyUiDocEntryBlock mode="preview" :colCount=3>
|
<div class="md:pe-10">
|
||||||
<PubMyUiDocEntryCell>
|
<PubMyUiDocEntryBlock>
|
||||||
<PubMyUiDocEntryLabel>DPJP</PubMyUiDocEntryLabel>
|
<PubMyUiDocEntryCell>
|
||||||
<PubMyUiDocEntryField>
|
<PubMyUiDocEntryLabel>Tgl Order</PubMyUiDocEntryLabel>
|
||||||
<Input />
|
<PubMyUiDocEntryField>
|
||||||
</PubMyUiDocEntryField>
|
<Input />
|
||||||
</PubMyUiDocEntryCell>
|
</PubMyUiDocEntryField>
|
||||||
<PubMyUiDocEntryCell />
|
</PubMyUiDocEntryCell>
|
||||||
<PubMyUiDocEntryCell>
|
<PubMyUiDocEntryCell>
|
||||||
<PubMyUiDocEntryLabel>Tgl Order</PubMyUiDocEntryLabel>
|
<PubMyUiDocEntryLabel>Status</PubMyUiDocEntryLabel>
|
||||||
<PubMyUiDocEntryField>
|
<PubMyUiDocEntryField>
|
||||||
<Input />
|
<Input />
|
||||||
</PubMyUiDocEntryField>
|
</PubMyUiDocEntryField>
|
||||||
</PubMyUiDocEntryCell>
|
</PubMyUiDocEntryCell>
|
||||||
<PubMyUiDocEntryCell>
|
</PubMyUiDocEntryBlock>
|
||||||
<PubMyUiDocEntryLabel>DPJP</PubMyUiDocEntryLabel>
|
</div>
|
||||||
<PubMyUiDocEntryField>
|
<div class="md:ps-10">
|
||||||
<Input />
|
<PubMyUiDocEntryBlock>
|
||||||
</PubMyUiDocEntryField>
|
<PubMyUiDocEntryCell>
|
||||||
</PubMyUiDocEntryCell>
|
<PubMyUiDocEntryLabel position="dynamic">DPJP</PubMyUiDocEntryLabel>
|
||||||
<PubMyUiDocEntryCell />
|
<PubMyUiDocEntryField>
|
||||||
<PubMyUiDocEntryCell>
|
<Input />
|
||||||
<PubMyUiDocEntryLabel>Status</PubMyUiDocEntryLabel>
|
</PubMyUiDocEntryField>
|
||||||
<PubMyUiDocEntryField>
|
</PubMyUiDocEntryCell>
|
||||||
<Input />
|
<PubMyUiDocEntryCell>
|
||||||
</PubMyUiDocEntryField>
|
<PubMyUiDocEntryLabel position="dynamic">PPDS</PubMyUiDocEntryLabel>
|
||||||
</PubMyUiDocEntryCell>
|
<PubMyUiDocEntryField>
|
||||||
</PubMyUiDocEntryBlock>
|
<Input />
|
||||||
|
</PubMyUiDocEntryField>
|
||||||
|
</PubMyUiDocEntryCell>
|
||||||
|
</PubMyUiDocEntryBlock>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -1,10 +1,32 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
import Dialog from '~/components/pub/my-ui/modal/dialog.vue'
|
||||||
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 { HeaderPrep, RefSearchNav } from '~/components/pub/my-ui/data/types'
|
||||||
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
import Header from '~/components/pub/my-ui/nav-header/prep.vue'
|
||||||
|
import ListEntry from '~/components/app/prescription/list-entry.vue'
|
||||||
import PrescriptionItemListEntry from '~/components/app/prescription-item/list-entry.vue'
|
import PrescriptionItemListEntry from '~/components/app/prescription-item/list-entry.vue'
|
||||||
|
|
||||||
const data = ref([])
|
import { prescriptionSvc } from '~/services/prescription.service'
|
||||||
|
import { usePaginatedList } from '~/composables/usePaginatedList'
|
||||||
|
|
||||||
|
import MixEntry from '~/components/app/prescription-item/mix-entry.vue'
|
||||||
|
|
||||||
|
const {
|
||||||
|
data,
|
||||||
|
isLoading,
|
||||||
|
paginationMeta,
|
||||||
|
searchInput,
|
||||||
|
handlePageChange,
|
||||||
|
handleSearch,
|
||||||
|
fetchData: getMedicineList,
|
||||||
|
} = usePaginatedList({
|
||||||
|
fetchFn: async ({ page, search }) => {
|
||||||
|
const result = await prescriptionSvc.getList({ search, page })
|
||||||
|
return { success: result.success || false, body: result.body || {} }
|
||||||
|
},
|
||||||
|
entityName: 'medicine',
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const refSearchNav: RefSearchNav = {
|
const refSearchNav: RefSearchNav = {
|
||||||
onClick: () => {
|
onClick: () => {
|
||||||
@@ -18,10 +40,6 @@ const refSearchNav: RefSearchNav = {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const isLoading = reactive<DataTableLoader>({
|
|
||||||
isTableLoading: false,
|
|
||||||
})
|
|
||||||
|
|
||||||
const recId = ref<number>(0)
|
const recId = ref<number>(0)
|
||||||
const recAction = ref<string>('')
|
const recAction = ref<string>('')
|
||||||
const recItem = ref<any>(null)
|
const recItem = ref<any>(null)
|
||||||
@@ -40,6 +58,11 @@ provide('rec_action', recAction)
|
|||||||
provide('rec_item', recItem)
|
provide('rec_item', recItem)
|
||||||
provide('table_data_loader', isLoading)
|
provide('table_data_loader', isLoading)
|
||||||
|
|
||||||
|
let loading = ref(false);
|
||||||
|
let itemEntryDialogShown = ref(false);
|
||||||
|
let itemMixEntryDialogShown = ref(false);
|
||||||
|
let title = '';
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getMaterialList()
|
getMaterialList()
|
||||||
})
|
})
|
||||||
@@ -54,16 +77,26 @@ async function getMaterialList() {
|
|||||||
|
|
||||||
isLoading.dataListLoading = false
|
isLoading.dataListLoading = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function addMedicine() {
|
||||||
|
itemEntryDialogShown.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function addMedicineMix() {
|
||||||
|
itemMixEntryDialogShown.value = true;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Header :prep="{ ...headerPrep }" :ref-search-nav="refSearchNav" />
|
<Header :prep="{ ...headerPrep }" :ref-search-nav="refSearchNav" />
|
||||||
<AppPrescriptionList v-if="!isLoading.dataListLoading" />
|
<ListEntry v-if="!isLoading.dataListLoading" :data="[]" :isLoading="isLoading" :paginatin="{}" />
|
||||||
<AppPrescriptionEntry />
|
|
||||||
<PrescriptionItemListEntry :data=[] />
|
<Dialog v-model:open="itemEntryDialogShown" :title="!!recItem ? title : 'Tambah Obat'" size="lg" prevent-outside>
|
||||||
<div>
|
</Dialog>
|
||||||
<Button>
|
|
||||||
Tambah
|
<Dialog v-model:open="itemMixEntryDialogShown" :title="!!recItem ? title : 'Tambah Obat'" size="lg" prevent-outside>
|
||||||
</Button>
|
<MixEntry />
|
||||||
</div>
|
</Dialog>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
Reference in New Issue
Block a user