feat(cemo): change flow admin

This commit is contained in:
riefive
2025-11-04 13:23:52 +07:00
parent 64fe2524fb
commit be0a761170
7 changed files with 215 additions and 47 deletions
@@ -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>