feat(cemo): change flow admin
This commit is contained in:
@@ -13,7 +13,14 @@ import type { PaginationMeta } from '~/components/pub/my-ui/pagination/paginatio
|
||||
// Sample data - replace with actual API call
|
||||
import { sampleRows, type ChemotherapyData } from '~/components/app/chemotherapy/sample'
|
||||
|
||||
|
||||
const route = useRoute()
|
||||
const recId = ref(0)
|
||||
const recAction = ref('')
|
||||
const recItem = ref<any>(null)
|
||||
|
||||
const search = ref('')
|
||||
const mode = route.params.mode as string || 'admin'
|
||||
const dateRange = ref<{ from: Date | null; to: Date | null }>({
|
||||
from: null,
|
||||
to: null,
|
||||
@@ -65,6 +72,19 @@ function handleProses(rec: any) {
|
||||
navigateTo(`/outpation-action/chemotherapy/verification?id=${rec.id}`)
|
||||
}
|
||||
|
||||
watch([recId, recAction], () => {
|
||||
switch (recAction.value) {
|
||||
case 'Process':
|
||||
navigateTo(`/outpation-action/chemotherapy/${mode}/${recId.value}/verification`)
|
||||
break
|
||||
case 'Verification':
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
provide('rec_id', recId)
|
||||
provide('rec_action', recAction)
|
||||
provide('rec_item', recItem)
|
||||
provide('proses-handler', handleProses)
|
||||
</script>
|
||||
|
||||
@@ -102,7 +122,7 @@ provide('proses-handler', handleProses)
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent class="w-auto p-0">
|
||||
<RangeCalendar v-model="dateRange" />
|
||||
<RangeCalendar />
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
|
||||
@@ -205,7 +205,7 @@ function handleBackToAdmin() {
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent class="w-auto p-0">
|
||||
<RangeCalendar v-model="dateRange" />
|
||||
<RangeCalendar />
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user