✨ feat (patient): add example api request
This commit is contained in:
@@ -7,7 +7,7 @@ const refSearchNav = {
|
||||
console.log('>>>', val)
|
||||
},
|
||||
onClear: () => {
|
||||
// refresh page
|
||||
// clear url param
|
||||
},
|
||||
}
|
||||
|
||||
@@ -19,6 +19,16 @@ const hreaderPrep: HeaderPrep = {
|
||||
onClick: () => (window.location.pathname = '/emergency/patient/add'),
|
||||
},
|
||||
}
|
||||
|
||||
// NOTE: example api
|
||||
async function getPatientList() {
|
||||
const { data } = await xfetch('/api/v1/patient')
|
||||
console.log('data patient', data)
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getPatientList()
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
<script setup lang="ts"></script>
|
||||
<script setup lang="ts">
|
||||
definePageMeta({
|
||||
roles: ['system', 'doctor'],
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
|
||||
+5
-3
@@ -2,9 +2,11 @@
|
||||
import { Activity, CreditCard, DollarSign, Users } from 'lucide-vue-next'
|
||||
|
||||
definePageMeta({
|
||||
middleware: 'auth',
|
||||
roles: ['sys', 'doc'],
|
||||
})
|
||||
|
||||
const { userRole } = useUserStore()
|
||||
|
||||
const dataCard = ref({
|
||||
totalRevenue: 0,
|
||||
totalRevenueDesc: 0,
|
||||
@@ -61,7 +63,7 @@ onMounted(() => {
|
||||
<template>
|
||||
<div class="flex w-full flex-col gap-4">
|
||||
<div class="flex flex-wrap items-center justify-between gap-2">
|
||||
<h2 class="text-2xl font-bold tracking-tight">Dashboard</h2>
|
||||
<h2 class="text-2xl font-bold tracking-tight">Dashboard {{ userRole }}</h2>
|
||||
<div class="flex items-center space-x-2"></div>
|
||||
</div>
|
||||
<main class="flex flex-1 flex-col gap-4 md:gap-8">
|
||||
@@ -147,7 +149,7 @@ onMounted(() => {
|
||||
<CardTitle>Overview</CardTitle>
|
||||
</CardHeader>
|
||||
<CardContent class="pl-2">
|
||||
<DashboardOverview />
|
||||
<!-- <DashboardOverview /> -->
|
||||
</CardContent>
|
||||
</Card>
|
||||
<Card>
|
||||
|
||||
Reference in New Issue
Block a user