Compare commits

...

52 Commits

Author SHA1 Message Date
nasir@endelospay.com
e7534eb5a9 fix 2024-07-23 23:10:15 +05:00
nasir@endelospay.com
d8c3cf3e64 fix 2024-07-23 23:07:59 +05:00
nasir@endelospay.com
dc5aefd914 fix 2024-06-13 23:35:29 +05:00
nasir@endelospay.com
362406e8be fix 2024-06-13 22:50:38 +05:00
nasir@endelospay.com
2c4f694bf5 fix 2024-06-13 22:46:14 +05:00
nasir@endelospay.com
18df537746 fix 2024-06-13 22:42:48 +05:00
Inshal
1aa329559f fix 2024-06-13 20:54:48 +05:00
Inshal
8c088ba169 Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev 2024-06-12 20:10:02 +05:00
nasir@endelospay.com
e6752e60ef fix 2024-06-12 04:10:51 +05:00
nasir@endelospay.com
08f559ffed fix 2024-06-12 04:10:13 +05:00
nasir@endelospay.com
526b3c7763 Merge branch 'dev' of ssh://git.codelfi.com:2202/telemedpro/hgh_admin into dev 2024-06-12 03:57:39 +05:00
nasir@endelospay.com
5b61024dc5 fix 2024-06-12 03:57:31 +05:00
Muhammad Shahzad
a21ced6fca Merge branch 'dev' of https://git.codelfi.com/TelemedPro/hgh_admin into dev 2024-06-12 03:25:13 +05:00
Muhammad Shahzad
a861a06478 fixes 2024-06-12 03:24:58 +05:00
nasir@endelospay.com
d433a99e10 fix 2024-06-12 03:20:25 +05:00
Inshal
33b817aabe Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev 2024-06-12 03:14:18 +05:00
nasir@endelospay.com
bac643bc68 Merge branch 'dev' of ssh://git.codelfi.com:2202/telemedpro/hgh_admin into dev 2024-06-12 03:13:39 +05:00
nasir@endelospay.com
672fb40ddc fix 2024-06-12 03:13:30 +05:00
Muhammad Shahzad
71f4acea1c Merge branch 'dev' of https://git.codelfi.com/TelemedPro/hgh_admin into dev 2024-06-12 03:10:00 +05:00
Muhammad Shahzad
6ffc1b9ea1 fixes 2024-06-12 03:09:20 +05:00
nasir@endelospay.com
19ee008368 fix 2024-06-12 03:06:32 +05:00
nasir@endelospay.com
3a25dffabc fix 2024-06-11 23:38:15 +05:00
nasir@endelospay.com
7d27fe9d26 fix 2024-06-11 23:31:21 +05:00
Inshal
407c901b62 Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev 2024-06-11 23:21:50 +05:00
Muhammad Shahzad
348a293583 fixes 2024-06-11 23:21:17 +05:00
Inshal
b0f2c86fa5 Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev 2024-06-11 23:03:21 +05:00
Muhammad Shahzad
8ae4f3385d FIXES 2024-06-11 23:03:11 +05:00
Muhammad Shahzad
6cf777b786 Merge branch 'dev' of https://git.codelfi.com/TelemedPro/hgh_admin into dev 2024-06-11 22:05:35 +05:00
Muhammad Shahzad
8172fbe5e1 fixes 2024-06-11 22:05:17 +05:00
nasir@endelospay.com
d112fac52c fix 2024-06-11 21:46:56 +05:00
nasir@endelospay.com
7ca8abc68e fix 2024-06-11 21:36:10 +05:00
nasir@endelospay.com
294ad64d2e fix 2024-06-11 21:25:12 +05:00
Inshal
4413337979 Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev 2024-06-11 21:18:03 +05:00
Muhammad Shahzad
7247a33cdc fixes 2024-06-11 04:45:17 +05:00
Muhammad Shahzad
41857281af fixes 2024-06-11 02:36:56 +05:00
Inshal
f1a86730e7 Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev 2024-06-11 02:29:25 +05:00
Inshal
7f86ca1ebd fix 2024-06-11 02:29:02 +05:00
nasir@endelospay.com
13cdd98356 fix 2024-06-11 02:28:32 +05:00
nasir@endelospay.com
cd780618cc fix 2024-06-11 02:13:41 +05:00
nasir@endelospay.com
7083bd4551 fix 2024-06-11 02:12:38 +05:00
nasir@endelospay.com
f591faaa6b fix 2024-06-11 02:04:32 +05:00
Inshal
8611746758 fixes 2024-06-11 01:56:29 +05:00
Inshal
49c1007bfa Merge branch 'dev' of ssh://git.codelfi.com:2202/TelemedPro/hgh_admin into dev 2024-06-11 01:52:53 +05:00
Inshal
e443b1c869 fix 2024-06-11 01:48:23 +05:00
nasir@endelospay.com
ca1200e86a fix 2024-06-11 01:45:08 +05:00
nasir@endelospay.com
d6508b7201 fix 2024-06-11 01:42:10 +05:00
nasir@endelospay.com
3f081cee50 fix 2024-06-11 01:35:27 +05:00
nasir@endelospay.com
f10af129df fix 2024-06-11 00:42:08 +05:00
nasir@endelospay.com
8e59b33d1d fix 2024-06-11 00:38:59 +05:00
nasir@endelospay.com
8514c7915a fu 2024-06-11 00:36:28 +05:00
nasir@endelospay.com
e3e44f116e fix 2024-06-11 00:23:34 +05:00
nasir@endelospay.com
9699b230d5 fix 2024-06-11 00:09:44 +05:00
27 changed files with 1700 additions and 165 deletions

View File

@@ -1,12 +1,12 @@
<script setup> <script setup>
import { layoutConfig } from '@layouts' import { layoutConfig } from '@layouts';
import { can } from '@layouts/plugins/casl' import { can } from '@layouts/plugins/casl';
import { useLayoutConfigStore } from '@layouts/stores/config' import { useLayoutConfigStore } from '@layouts/stores/config';
import { import {
getComputedNavLinkToProp, getComputedNavLinkToProp,
getDynamicI18nProps, getDynamicI18nProps,
isNavLinkActive, isNavLinkActive,
} from '@layouts/utils' } from '@layouts/utils';
const props = defineProps({ const props = defineProps({
item: { item: {
@@ -29,6 +29,7 @@ const hideTitleAndBadge = configStore.isVerticalNavMini()
:is="item.to ? 'RouterLink' : 'a'" :is="item.to ? 'RouterLink' : 'a'"
v-bind="getComputedNavLinkToProp(item)" v-bind="getComputedNavLinkToProp(item)"
:class="{ 'router-link-active router-link-exact-active': isNavLinkActive(item, $router) }" :class="{ 'router-link-active router-link-exact-active': isNavLinkActive(item, $router) }"
> >
<Component <Component
:is="layoutConfig.app.iconRenderer || 'div'" :is="layoutConfig.app.iconRenderer || 'div'"

View File

@@ -46,18 +46,46 @@ export const resolveNavLinkRouteName = (link, router) => {
*/ */
export const isNavLinkActive = (link, router) => { export const isNavLinkActive = (link, router) => {
// Matched routes array of current route // Matched routes array of current route
const matchedRoutes = router.currentRoute.value.matched const matchedRoutes = router.currentRoute.value.matched;
const currentRoute = router.currentRoute.value;
// Check if the parent menu item should be active
if (isParentActive(currentRoute,router,link)) {
return true;
}
// Check if provided route matches route's matched route // Check if provided route matches route's matched route
const resolveRoutedName = resolveNavLinkRouteName(link, router) const resolveRoutedName = resolveNavLinkRouteName(link, router);
if (!resolveRoutedName) if (!resolveRoutedName) {
return false return false;
}
return matchedRoutes.some(route => { return matchedRoutes.some(route => {
return route.name === resolveRoutedName || route.meta.navActiveLink === resolveRoutedName return route.name === resolveRoutedName || route.meta.navActiveLink === resolveRoutedName;
}) });
} };
const ParentMenuItemName = 'admin-patients';
export const isParentActive = (route, router,link) => {
// Get the current route's activeParent meta property
const activeParent = route.meta.activeParent;
// Check if the activeParent is defined and not an empty string
if (activeParent && activeParent.trim().length > 0) {
// Find the parent route configuration
const parentRoute = router.options.routes.find(r => r.name === activeParent);
console.log('fffff', link.to)
// Check if the parent route configuration exists
if (link.to) {
// Use the parent route's name or any other property as the parent menu item name
return link.to === activeParent;
}
}
// If the activeParent is not defined, an empty string, or the parent route configuration is not found, return false
return false;
};
/** /**
* Check if nav group is active * Check if nav group is active
* @param {Array} children Group children * @param {Array} children Group children

View File

@@ -69,11 +69,7 @@ const addressTypes = [
> >
<VCardText class="pt-5"> <VCardText class="pt-5">
<!-- 👉 dialog close btn --> <!-- 👉 dialog close btn -->
<DialogCloseBtn
variant="text"
size="default"
@click="resetForm"
/>
<!-- 👉 Title --> <!-- 👉 Title -->
<div class="text-center mb-6"> <div class="text-center mb-6">

View File

@@ -18,6 +18,7 @@ export const PATIENT_PRESCRIPTION_STATUS_UPDATE_API = MAIN_DOMAIN + "/api/admin
export const SUBCRIPTIONS_LIST_API = MAIN_DOMAIN + "/api/plans/" export const SUBCRIPTIONS_LIST_API = MAIN_DOMAIN + "/api/plans/"
export const PROVIDER_FILTER_LIST_API = MAIN_DOMAIN + "/api/admin/telemed-pro-list"
export const PROVIDER_LIST_API = MAIN_DOMAIN + "/api/admin/telemed-pro-list" export const PROVIDER_LIST_API = MAIN_DOMAIN + "/api/admin/telemed-pro-list"
export const PROVIDER_INFO_API = MAIN_DOMAIN + "/api/admin/telemed-pro/" export const PROVIDER_INFO_API = MAIN_DOMAIN + "/api/admin/telemed-pro/"
export const PROVIDER_UPDATE_API = MAIN_DOMAIN + "/api/admin/telemed-pro-update/" export const PROVIDER_UPDATE_API = MAIN_DOMAIN + "/api/admin/telemed-pro-update/"
@@ -56,3 +57,11 @@ export const ADMIN_PATIENT_DETAIL_API = MAIN_DOMAIN + "/api/admin/patient-full-d
export const ADMIN_PROVIDER_DETAIL_API = MAIN_DOMAIN + "/api/admin/telemed-full-detail/" export const ADMIN_PROVIDER_DETAIL_API = MAIN_DOMAIN + "/api/admin/telemed-full-detail/"
export const ADMIN_PATIENT_PROFILE_API = MAIN_DOMAIN + "/api/admin/get-question-builder/" export const ADMIN_PATIENT_PROFILE_API = MAIN_DOMAIN + "/api/admin/get-question-builder/"
export const ADMIN_PROVIDER_REPORT_API = MAIN_DOMAIN + "/api/admin/provider-report"
export const ADMIN_PROVIDER_REPORT_POST_API = MAIN_DOMAIN + "/api/admin/provider-report-post"
export const ADMIN_GET_ORDER_API = MAIN_DOMAIN + "/api/admin/get-order-data"

View File

@@ -47,11 +47,15 @@ export default [
}, },
{ {
title: 'Medicines', title: 'Prodcuts',
icon: { icon: 'ri-medicine-bottle-line' }, icon: { icon: 'ri-medicine-bottle-line' },
to: 'admin-medicines', to: 'admin-products',
}, },
// {
// title: 'Orders',
// icon: { icon: 'ri-medicine-bottle-line' },
// to: 'admin-orders',
// },
{ {
title: 'Settings', title: 'Settings',
icon: { icon: 'ri-settings-4-line' }, icon: { icon: 'ri-settings-4-line' },
@@ -83,9 +87,25 @@ export default [
}, },
] ]
} },
{
title: 'Reports',
icon: { icon: 'ri-file-chart-line' },
children: [
{
title: 'Provider Reports',
to: 'admin-provider-report',
icon: {
icon: 'ri-group-line',
},
},
]
}
// { // {
// title: 'Front Pages', // title: 'Front Pages',
// icon: { icon: 'ri-file-copy-line' }, // icon: { icon: 'ri-file-copy-line' },

View File

@@ -1,7 +1,9 @@
<script setup> <script setup>
import mastercard from '@images/logos/mastercard.png' import mastercard from '@images/logos/mastercard.png';
import paypal from '@images/logos/paypal.png' import paypal from '@images/logos/paypal.png';
import { useStore } from 'vuex';
const store = useStore();
const widgetData = ref([ const widgetData = ref([
{ {
title: 'Pending Payment', title: 'Pending Payment',
@@ -132,7 +134,16 @@ const {
orderBy, orderBy,
}, },
})) }))
onMounted(async () => {
store.dispatch('updateIsLoading', true);
await store.dispatch('orderList');
store.dispatch('updateIsLoading', false);
let list = store.getters.getOrderList;
console.log(list);
});
const orders = computed(() => ordersData.value.orders) const orders = computed(() => ordersData.value.orders)
const totalOrder = computed(() => ordersData.value.total) const totalOrder = computed(() => ordersData.value.total)

View File

@@ -47,7 +47,7 @@ const headers = [
{ key: 'start_time', title: 'Start Time' }, { key: 'start_time', title: 'Start Time' },
{ key: 'end_time', title: 'End Time' }, { key: 'end_time', title: 'End Time' },
{ key: 'duration', title: 'Duration' }, { key: 'duration', title: 'Duration' },
{ title: 'ACTIONS', key: 'actions' }, // { title: 'ACTIONS', key: 'actions' },
]; ];
@@ -161,6 +161,17 @@ const options = [
class="text-no-wrap" class="text-no-wrap"
> >
<template #item.id="{ item }">{{ item.id }}</template> <template #item.id="{ item }">{{ item.id }}</template>
<template #item.provider_name="{ item }">
<div class="d-flex flex-column ms-3">
<router-link
:to="{ name: 'admin-provider-profile', params: { id: item.provider_id } }"
class="highlighted"
>
<span class="d-block font-weight-medium text-truncate">{{ item.provider_name }}</span>
</router-link>
</div>
</template>
<template #item.duration="{ item }">{{ item.duration }}</template> <template #item.duration="{ item }">{{ item.duration }}</template>
<!-- Actions --> <!-- Actions -->
<template #item.actions="{ item }"> <template #item.actions="{ item }">

View File

@@ -16,7 +16,6 @@ const props = defineProps({
}) })
const formatDateDate = (date) => { const formatDateDate = (date) => {
const messageDate = new Date(date); const messageDate = new Date(date);
const options = { const options = {
@@ -29,14 +28,25 @@ const formatDateDate = (date) => {
return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-'); return messageDate.toLocaleDateString('en-US', options).replace(/\//g, '-');
}; };
const downloadFile = (fileUrl) => { const downloadFile = async (fileUrl, fileName = 'downloadedFile.png') => {
const link = document.createElement('a'); try {
link.href = fileUrl; const response = await fetch(fileUrl);
link.download = 'noteFile.png'; if (!response.ok) throw new Error('Network response was not ok');
document.body.appendChild(link); const blob = await response.blob();
link.click(); const link = document.createElement('a');
document.body.removeChild(link); const url = window.URL.createObjectURL(blob);
}; link.href = url;
link.download = fileName;
document.body.appendChild(link);
link.click();
window.URL.revokeObjectURL(url);
document.body.removeChild(link);
} catch (error) {
console.error('Download failed', error);
}
};
</script> </script>
<template> <template>
@@ -64,16 +74,24 @@ const downloadFile = (fileUrl) => {
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'"> <span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
{{p_note.note}} {{p_note.note}}
</span> </span>
<span class="app-timeline-title" v-if="p_note.note_type=='file'"> <span class="app-timeline-title" v-if="p_note.note_type == 'file'">
<img :src="p_note.note"/>
</span> <VIcon>ri-attachment-2</VIcon> <button @click="downloadFile(p_note.note,'noteFile.png')">Download Image</button>
</span>
<span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span> <span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
<!-- <span></span> --> <!-- <span></span> -->
</div> </div>
<!-- 👉 Content --> <!-- 👉 Content -->
<div class="app-timeline-text mb-1"> <div class="app-timeline-text mb-1">
<span>{{ p_note.provider_name }}</span> <router-link
:to="{ name: 'admin-provider-profile', params: { id: p_note.provider_id } }"
class=""
>
<span class="">{{ p_note.provider_name }}</span>
</router-link>
<VIcon <VIcon
size="20" size="20"
icon="tabler-arrow-right" icon="tabler-arrow-right"

View File

@@ -1,4 +1,6 @@
<script setup> <script setup>
const profile = ref(0)
const color = ref(null)
const props = defineProps({ const props = defineProps({
userData: { userData: {
type: Object, type: Object,
@@ -66,7 +68,18 @@ const resolveUserRoleVariant = role => {
const lines = props.userData.plans.list_two_title.split(',') const lines = props.userData.plans.list_two_title.split(',')
return lines.slice(0, 3) return lines.slice(0, 3)
}) })
onMounted(async () => {
profile.value = props.userData.patient.profile_completion_Percentage
if (profile.value <= 50) {
color.value="rgb(var(--v-theme-error))"
}
if (profile.value >= 80) {
color.value="rgb(var(--v-theme-success))"
}
if (profile.value > 50 && profile.value < 80) {
color.value="rgb(var(--v-theme-warning))"
}
});
</script> </script>
<template> <template>
@@ -100,25 +113,29 @@ const resolveUserRoleVariant = role => {
</h5> </h5>
<!-- 👉 Role chip --> <!-- 👉 Role chip -->
<VChip
:color="resolveUserRoleVariant('Patient').color"
size="small" <div class="mt-3">
class="text-capitalize mt-4" <span class="font-weight-medium" style="float: left;">
> Profile Status:
Patient </span>
</VChip> <VProgressLinear
<VChip v-model="profile"
size="small" :color="color"
:color="resolveUserStatusVariant('active')" height="14"
class="text-capitalize mt-4" striped
> >
Active <template #default="{ value }">
</VChip> <span>{{ Math.ceil(value) }}%</span>
</template>
</VProgressLinear>
</div>
</VCardText> </VCardText>
<!-- 👉 Details --> <!-- 👉 Details -->
<VCardText class="pb-6"> <VCardText class="pb-6">
<h5 class="text-h5"> <h5 class="text-h5">
Details Details
@@ -142,8 +159,7 @@ const resolveUserRoleVariant = role => {
<span class="font-weight-medium"> <span class="font-weight-medium">
Address: Address:
</span> </span>
<span class="text-body-1">{{ props.userData.patient.address }} <span class="text-body-1">{{ props.userData.patient.address }} ,{{ props.userData.patient.city }},{{ props.userData.patient.state }} {{ props.userData.patient.zip_code }}</span>
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ props.userData.patient.city }},{{ props.userData.patient.state }} {{ props.userData.patient.zip_code }}</span>
</VListItemTitle> </VListItemTitle>
</VListItem> </VListItem>
@@ -269,29 +285,7 @@ const resolveUserRoleVariant = role => {
</VList> </VList>
<!-- 👉 Days --> <!-- 👉 Days -->
<div class="my-6">
<div class="d-flex mt-3 mb-2">
<h6 class="text-h6 font-weight-medium">
Days
</h6>
<VSpacer />
<h6 class="text-h6 font-weight-medium">
26 of 30 Days
</h6>
</div>
<!-- 👉 Progress -->
<VProgressLinear
rounded
:model-value="86"
height="8"
color="primary"
/>
<p class="text-sm mt-1">
4 days remaining
</p>
</div>
<!-- 👉 Upgrade Plan --> <!-- 👉 Upgrade Plan -->
<VBtn <VBtn

View File

@@ -0,0 +1,211 @@
<script setup>
const props = defineProps({
userData: {
type: Object,
required: true,
},
})
import { onBeforeMount, onMounted, onUnmounted, ref } from 'vue';
import { useRoute, useRouter } from 'vue-router';
import { useStore } from 'vuex';
const store = useStore();
const router = useRouter();
const route = useRoute();
const editDialog = ref(false);
const deleteDialog = ref(false);
const search = ref('');
const appointmentId = ref('');
const defaultItem = ref({
id: -1,
avatar: '',
name: '',
email: '',
dob: '',
phone_no: '',
});
const editedItem = ref({ ...defaultItem.value });
const editedIndex = ref(-1);
const patientLabList = ref([]);
const isLoading = ref(false);
// Status options
const selectedOptions = [
{ text: 'Active', value: 1 },
{ text: 'InActive', value: 2 },
];
const refVForm = ref(null);
// Headers
const headers = [
// { title: 'Appointment Id', key: 'id' },
{ title: 'Lab Kit Name', key: 'name' },
// { key: 'appointment_date', sortable: false, title: 'Date' },
{ key: 'address', title: 'Address' },
{ key: 'amount', title: 'Amount' },
{ key: 'status', title: 'Status' },
// { title: 'ACTIONS', key: 'actions' },
];
const formatDate = (date) => {
const messageDate = new Date(date);
const options = {
year: 'numeric',
month: 'numeric',
day: 'numeric',
hour: 'numeric', // Change from '2-digit' to 'numeric'
minute: '2-digit',
hour12: true, // Add hour12: true to get 12-hour format with AM/PM
};
const formattedDate = messageDate.toLocaleString('en-US', options).replace(/\//g, '-');
return `${formattedDate} `;
};
// Fetch and process the patient meeting list
const getPatientLabList = async () => {
//store.dispatch('updateIsLoading', true);
//await store.dispatch('patientMeetingList', { id: route.params.id });
// store.dispatch('updateIsLoading', false);
let list = props.userData.labkit;
patientLabList.value = list
console.log(list);
};
// Lifecycle hooks
onBeforeMount(() => {});
onMounted(async () => {
await getPatientLabList();
});
onUnmounted(() => {});
const historyDetail = (item, value) => {
console.log('item',item.id ,value)
if(value == 'notes')
router.push('/admin/patient/meeting/notes/' + route.params.id + '/' + item.id);
if(value == 'prescription')
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
}
const menusVariant = [
'primary'
];
const options = [
{
title: 'Notes',
key: 'notes',
},
{
title: 'Prescription',
key: 'prescription',
},
]
const getStatusColor = (status) => {
switch (status) {
case 'pending':
return 'warning'; // Use Vuetify's warning color (typically yellow)
case 'shipped':
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
case 'delivered':
return 'success';
case 'returned':
return 'red';
case 'results':
return 'blue';
default:
return 'grey'; // Use Vuetify's grey color for any other status
}
};
</script>
<template>
<v-row>
<v-col cols="12" md="12" >
<v-card title="Lab Kits">
<v-card-text>
<v-row>
<v-col cols="12" offset-md="8" md="4">
<v-text-field
v-model="search"
label="Search"
placeholder="Search ..."
append-inner-icon="ri-search-line"
single-line
hide-details
dense
outlined
/>
</v-col>
</v-row>
</v-card-text>
<v-data-table
:headers="headers"
:items="patientLabList"
:search="search"
:items-per-page="5"
class="text-no-wrap"
>
<template #item.id="{ item }">{{ item.id }}</template>
<template #item.provider_name="{ item }">
<div class="d-flex flex-column ms-3">
<router-link
:to="{ name: 'admin-provider-profile', params: { id: item.provider_id } }"
class="highlighted"
>
<span class="d-block font-weight-medium text-truncate">{{ item.provider_name }}</span>
</router-link>
</div>
</template>
<template #item.status="{ item }">
<VChip
:color="getStatusColor(item.status)"
density="comfortable"
>
{{ item.status}}
</VChip>
</template>
<template #item.address="{ item }">{{ item.shipping_address1 }} <br/>{{ item.shipping_city }} {{ item.shipping_state }} {{ item.shipping_zipcode }}</template>
<!-- Actions -->
<template #item.actions="{ item }">
<div class="demo-space-x">
<VMenu
v-for="menu in menusVariant"
:key="menu"
>
<template #activator="{ props }">
<i class="ri-more-2-line cursor-pointer" style="font-size: 32px;" v-bind="props"></i>
</template>
<v-list>
<v-list-item
v-for="opt in options"
:key="opt.value"
@click="historyDetail(item, opt.key)"
>
{{ opt.title }}
</v-list-item>
</v-list>
</VMenu>
</div>
<!-- <div class="d-flex gap-1">
<VBtn class="text-capitalize text-white" @click="historyDetail(item)"> Detail
</VBtn>
</div> -->
</template>
</v-data-table>
</v-card>
</v-col>
</v-row>
</template>

View File

@@ -16,10 +16,10 @@ const address1 = ref(null);
const dob = ref(null); const dob = ref(null);
const agePatient = ref(null); const agePatient = ref(null);
const isMobile = ref(window.innerWidth <= 768); const isMobile = ref(window.innerWidth <= 768);
const patientId = route.params.patient_id const patientId = route.params.id
onMounted(async () => { onMounted(async () => {
// console.log('patient id',props.patient_id)
const navbar = document.querySelector('.layout-navbar'); const navbar = document.querySelector('.layout-navbar');
const callDiv = document.querySelector('.layout-page-content'); const callDiv = document.querySelector('.layout-page-content');
if (navbar) { if (navbar) {
@@ -116,7 +116,7 @@ const calculateAge = (dateOfBirth) => {
<template> <template>
<v-row class='mb-2'> <v-row class='mb-2'>
<VCol cols="12" md="12" class="mb-4 " v-if="username || phone" style="font-size: 16px;"> <!-- <VCol cols="12" md="12" class="mb-4 " v-if="username || phone" style="font-size: 16px;">
<VCard> <VCard>
<VCardText> <VCardText>
<h3 class="mb-2"> {{ username }}</h3> <h3 class="mb-2"> {{ username }}</h3>
@@ -134,7 +134,7 @@ const calculateAge = (dateOfBirth) => {
</div> </div>
<div class="mb-2"> <div class="mb-2">
<VTooltip location="left" activator="parent" transition="scroll-x-transition"> <VTooltip location="left" activator="parent" transition="scroll-x-transition">
Date of birth Date of Birth
</VTooltip> </VTooltip>
<VIcon icon="ri-calendar-line" size="20" class="me-2" />{{ dob }} <VIcon icon="ri-calendar-line" size="20" class="me-2" />{{ dob }}
</div> </div>
@@ -153,7 +153,7 @@ const calculateAge = (dateOfBirth) => {
</div> </div>
</VCardText> </VCardText>
</VCard> </VCard>
</VCol> </VCol> -->
<v-col cols="12" md="12"> <v-col cols="12" md="12">
<VList class=""> <VList class="">
<VListItem class=""> <VListItem class="">

View File

@@ -160,7 +160,7 @@ const close = () => {
:color="getStatusColor(item.status)" :color="getStatusColor(item.status)"
density="comfortable" density="comfortable"
> >
{{ getStatusColor(item.status) }} {{ item.status}}
</VChip> </VChip>
</template> </template>

View File

@@ -45,7 +45,7 @@ const finalValue = computed(() => {
bgColor.value = 'warning' bgColor.value = 'warning'
} }
if (operator[singleObject.type](singleObject, props.value) > 80 && operator[singleObject.type](singleObject, props.value) <= 100) { if (operator[singleObject.type](singleObject, props.value) > 80 && operator[singleObject.type](singleObject, props.value) <= 100) {
bgColor.value = 'red' bgColor.value = 'error'
} }
return operator[singleObject.type](singleObject, props.value) return operator[singleObject.type](singleObject, props.value)

View File

@@ -2,9 +2,10 @@
import NotesPanel from '@/pages/patients/NotesPanel.vue' import NotesPanel from '@/pages/patients/NotesPanel.vue'
import PatienTabOverview from '@/pages/patients/PatienTabOverview.vue' import PatienTabOverview from '@/pages/patients/PatienTabOverview.vue'
import PatientBioPanel from '@/pages/patients/PatientBioPanel.vue' import PatientBioPanel from '@/pages/patients/PatientBioPanel.vue'
import PatientLabTest from '@/pages/patients/PatientLabTest.vue'
import PatientQuestionProfile from '@/pages/patients/PatientQuestionProfile.vue'
import PrescriptionPanel from '@/pages/patients/PrescriptionPanel.vue' import PrescriptionPanel from '@/pages/patients/PrescriptionPanel.vue'
import UserTabNotifications from '@/views/apps/user/view/UserTabNotifications.vue'
import { useStore } from 'vuex' import { useStore } from 'vuex'
const patientDtail = ref(null); const patientDtail = ref(null);
@@ -25,10 +26,14 @@ const tabs = [
icon: 'ri-bookmark-line', icon: 'ri-bookmark-line',
title: 'Prescriptions', title: 'Prescriptions',
}, },
// { {
// icon: 'ri-notification-4-line', icon: 'ri-flask-line',
// title: 'Notifications', title: 'Lab Test',
// }, },
{
icon: 'ri-survey-line',
title: 'Profile',
},
// { // {
// icon: 'ri-link-m', // icon: 'ri-link-m',
// title: 'Connections', // title: 'Connections',
@@ -98,8 +103,12 @@ onMounted(async () => {
<PrescriptionPanel :prescription-data="patientDtail"/> <PrescriptionPanel :prescription-data="patientDtail"/>
</VWindowItem> </VWindowItem>
<VWindowItem>
<PatientLabTest :user-data="patientDtail"/>
</VWindowItem>
<VWindowItem> <VWindowItem>
<UserTabNotifications /> <PatientQuestionProfile />
</VWindowItem> </VWindowItem>

View File

@@ -21,13 +21,13 @@ const defaultItem = ref({
const editedItem = ref(defaultItem.value) const editedItem = ref(defaultItem.value)
const editedIndex = ref(-1) const editedIndex = ref(-1)
const patientList = ref([]) const patientList = ref([])
const subcriptionLists = ref([]) const subcriptionLists = ref(['All'])
const isLoading=ref(false) const isLoading=ref(false)
const filter = ref({ const filter = ref({
gender: '', gender: 'All',
state: '', state: 'all',
plan: '', plan: 'all',
}) })
// const gender =ref(); // const gender =ref();
// const city =ref(); // const city =ref();
@@ -61,16 +61,29 @@ onMounted(async () => {
const getPatientFilter = async() => { const getPatientFilter = async() => {
console.log("filter", filter.value.plan, filter.value.gender, filter.value.state); console.log("filter", filter.value.plan, filter.value.gender, filter.value.state);
await store.dispatch('PatientFilter', { await store.dispatch('PatientFilter', {
plan: filter.value.plan, plan: filter.value.plan,
gender: filter.value.gender, gender: filter.value.gender.toLowerCase(),
state: filter.value.state, state: filter.value.state,
}) })
store.dispatch('updateIsLoading', false) store.dispatch('updateIsLoading', false)
} }
const getPatientList = computed(async () => { const getPatientList = computed(async () => {
subcriptionLists.value = [];
patientList.value = [];
subcriptionLists.value = store.getters.getSubcriptions; subcriptionLists.value = store.getters.getSubcriptions;
const allIndex = subcriptionLists.value.findIndex(sub => sub.title.toLowerCase() === 'all');
// If "All" exists, move it to the beginning
if (allIndex !== -1) {
const all = subcriptionLists.value.splice(allIndex, 1)[0];
subcriptionLists.value.unshift(all);
} else {
// If "All" doesn't exist, create it and prepend it
subcriptionLists.value.unshift({ title: 'All', slug: 'all' });
}
console.log("subcriptin",subcriptionLists.value); console.log("subcriptin",subcriptionLists.value);
patientList.value = store.getters.getPatientList.map(history => ({ patientList.value = store.getters.getPatientList.map(history => ({
...history, ...history,
@@ -97,10 +110,10 @@ const formatPhoneNumber = () => {
}; };
// headers // headers
const headers = [ const headers = [
// { {
// title: 'ID', title: 'ID',
// key: 'id', key: 'id',
// }, },
{ {
title: 'NAME', title: 'NAME',
key: 'name', key: 'name',
@@ -282,13 +295,19 @@ const states = ref([
{ name: 'Rhode Island', abbreviation: 'RI' }, { name: 'Rhode Island', abbreviation: 'RI' },
{ name: 'Washington', abbreviation: 'WA' }, { name: 'Washington', abbreviation: 'WA' },
{ name: 'Ohio', abbreviation: 'OH' }, { name: 'Ohio', abbreviation: 'OH' },
{ name: 'All', abbreviation: 'all' },
// ... (add the rest of the states) // ... (add the rest of the states)
]); ]);
const sortedStates = computed(() => { const sortedStates = computed(() => {
return states.value.slice().sort((a, b) => { const sorted = states.value.slice().sort((a, b) => {
// Move "All" to the beginning
if (a.name === 'All') return -1;
if (b.name === 'all') return 1;
// Sort other states alphabetically
return a.name.localeCompare(b.name); return a.name.localeCompare(b.name);
}); });
return sorted;
}); });
const deleteItemConfirm = async () => { const deleteItemConfirm = async () => {
@@ -350,7 +369,7 @@ const onStateChange = async(newvalue)=> {
<VCol <VCol
cols="12" cols="12"
md="4" md="3"
> >
<VSelect <VSelect
v-model="filter.plan" v-model="filter.plan"
@@ -368,7 +387,7 @@ const onStateChange = async(newvalue)=> {
<VCol <VCol
cols="12" cols="12"
md="4" md="3"
> >
<VSelect <VSelect
@@ -376,7 +395,7 @@ const onStateChange = async(newvalue)=> {
label="Gender" label="Gender"
placeholder="Gender" placeholder="Gender"
density="comfortable" density="comfortable"
:items="['Male', 'Female']" :items="['All','Male', 'Female']"
@update:model-value="onGenderChange" @update:model-value="onGenderChange"
/> />
@@ -385,7 +404,7 @@ const onStateChange = async(newvalue)=> {
<VCol <VCol
cols="12" cols="12"
md="4" md="3"
> >
<VSelect <VSelect
v-model="filter.state" v-model="filter.state"
@@ -399,10 +418,10 @@ const onStateChange = async(newvalue)=> {
/> />
</VCol> </VCol>
<!-- <VCol <VCol
cols="12" cols="12"
md="4" md="3"
> >
<VTextField <VTextField
v-model="search" v-model="search"
@@ -414,7 +433,7 @@ const onStateChange = async(newvalue)=> {
dense dense
outlined outlined
/> />
</VCol> --> </VCol>
</VRow> </VRow>
</VCardText> </VCardText>
<VDataTable <VDataTable

View File

@@ -74,10 +74,10 @@ const headers = [
title: 'Title', title: 'Title',
key: 'title', key: 'title',
}, },
{ // {
title: 'Slug', // title: 'Slug',
key: 'slug', // key: 'slug',
}, // },
{ {
title: 'Price', title: 'Price',
key: 'price', key: 'price',
@@ -371,14 +371,14 @@ onMounted(() => {
<template> <template>
<v-row> <v-row>
<v-col cols="12" md="12" v-if="getmedicineList"> <v-col cols="12" md="12" v-if="getmedicineList">
<VCard title="Medicines"> <VCard title="Products">
<VCardText > <VCardText >
<VRow> <VRow>
<VCol cols="12" md="8" class="d-flex align-center"> <VCol cols="12" md="8" class="d-flex align-center">
<VBtn color="primary" prepend-icon="ri-add-line" @click="addDialog = true" style="display: none;"> <VBtn color="primary" prepend-icon="ri-add-line" @click="addDialog = true" style="display: none;">
New Medicine New Product
</VBtn> </VBtn>
</VCol> </VCol>
<VCol cols="12" md="4" class="d-flex justify-end"> <VCol cols="12" md="4" class="d-flex justify-end">

View File

@@ -47,7 +47,6 @@ const headers = [
{ key: 'start_time', title: 'Start Time' }, { key: 'start_time', title: 'Start Time' },
{ key: 'end_time', title: 'End Time' }, { key: 'end_time', title: 'End Time' },
{ key: 'duration', title: 'Duration' }, { key: 'duration', title: 'Duration' },
{ title: 'Actions', key: 'profile' }, // Add this line
]; ];
function totalCallDuration(start_time, end_time) { function totalCallDuration(start_time, end_time) {
@@ -111,11 +110,6 @@ const historyDetail = (item, value) => {
if(value == 'prescription') if(value == 'prescription')
router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id); router.push('/admin/patient/meeting/prescription/' + route.params.id + '/' + item.id);
} }
const viewProfile = (item) => {
console.log('Viewing profile for', item);
// Navigate to the profile page (modify the route as per your application structure)
router.push('/admin/providers/patientprofile/' + item.patient_id);
}
const menusVariant = [ const menusVariant = [
'primary' 'primary'
@@ -163,11 +157,18 @@ const options = [
class="text-no-wrap" class="text-no-wrap"
> >
<template #item.id="{ item }">{{ item.id }}</template> <template #item.id="{ item }">{{ item.id }}</template>
<template #item.patient_name="{ item }">
<div class="d-flex flex-column ms-3">
<router-link
:to="{ name: 'admin-patient-profile', params: { id: item.patient_id } }"
class="highlighted"
>
<span class="d-block font-weight-medium text-truncate">{{ item.patient_name }}</span>
</router-link>
<small>{{ item.post }}</small>
</div>
</template>
<template #item.duration="{ item }">{{ item.duration }}</template> <template #item.duration="{ item }">{{ item.duration }}</template>
<!-- Profile Button -->
<template #item.profile="{ item }">
<v-btn class="text-capitalize text-white" @click="viewProfile(item)">Profile</v-btn>
</template>
<!-- Actions --> <!-- Actions -->
<template #item.actions="{ item }"> <template #item.actions="{ item }">
<div class="demo-space-x"> <div class="demo-space-x">
@@ -202,3 +203,10 @@ const options = [
</v-col> </v-col>
</v-row> </v-row>
</template> </template>
<style scoped>
.highlighted {
/* Add your desired highlighting styles here */
font-weight: bold;
color: #a169ff; /* or any other color you prefer */
}
</style>

View File

@@ -37,6 +37,16 @@ const downloadFile = (fileUrl) => {
link.click(); link.click();
document.body.removeChild(link); document.body.removeChild(link);
}; };
const downloadImage = async (imageUrl) => {
try {
const response = await fetch(imageUrl)
const blob = await response.blob()
const fileName = imageUrl.split('/').pop()
saveAs(blob, fileName)
} catch (error) {
console.error('Error downloading image:', error) }
}
</script> </script>
<template> <template>
@@ -64,9 +74,12 @@ const downloadFile = (fileUrl) => {
<span class="app-timeline-title" v-if="p_note.note_type=='Notes'"> <span class="app-timeline-title" v-if="p_note.note_type=='Notes'">
{{p_note.note}} {{p_note.note}}
</span> </span>
<span class="app-timeline-title" v-if="p_note.note_type=='file'">
<img :src="p_note.note"/> <span class="app-timeline-title" v-if="p_note.note_type == 'file'">
</span> <VIcon>ri-attachment-2</VIcon> <button @click="downloadImage(p_note.note)">Download Image</button>
</span>
<span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span> <span class="app-timeline-meta">{{ formatDateDate(p_note.created_at) }}</span>
<!-- <span></span> --> <!-- <span></span> -->

View File

@@ -156,11 +156,12 @@ const close = () => {
<!-- full name --> <!-- full name -->
<!-- status --> <!-- status -->
<template #item.status="{ item }"> <template #item.status="{ item }">
<VChip <VChip
:color="getStatusColor(item.status)" :color="getStatusColor(item.status)"
density="comfortable" density="comfortable"
> >
{{ getStatusColor(item.status) }} {{ item.status}}
</VChip> </VChip>
</template> </template>

View File

@@ -95,20 +95,14 @@ const resolveUserRoleVariant = role => {
</h5> </h5>
<!-- 👉 Role chip --> <!-- 👉 Role chip -->
<VChip
:color="resolveUserRoleVariant('Provider').color" <!-- <VChip
size="small"
class="text-capitalize mt-4"
>
Provider
</VChip>
<VChip
:color="resolveUserStatusVariant(props.userData.telemed.status==1?'Active':'InActive')" :color="resolveUserStatusVariant(props.userData.telemed.status==1?'Active':'InActive')"
size="small" size="small"
class="text-capitalize mt-4" class="text-capitalize mt-4"
> >
{{ props.userData.telemed.status==1?"Active":'InActive' }} {{ props.userData.telemed.status==1?"Active":'InActive' }}
</VChip> </VChip>-->
</VCardText> </VCardText>
@@ -137,8 +131,7 @@ const resolveUserRoleVariant = role => {
<span class="font-weight-medium"> <span class="font-weight-medium">
Address: Address:
</span> </span>
<span class="text-body-1">{{ props.userData.telemed.home_address }} <span class="text-body-1">{{ props.userData.telemed.home_address }}, {{ props.userData.telemed.city }},{{ props.userData.telemed.state }} {{ props.userData.telemed.zip_code }}</span>
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ props.userData.telemed.city }},{{ props.userData.telemed.state }} {{ props.userData.telemed.zip_code }}</span>
</VListItemTitle> </VListItemTitle>
</VListItem> </VListItem>
@@ -160,7 +153,7 @@ const resolveUserRoleVariant = role => {
<span class="font-weight-medium"> <span class="font-weight-medium">
Availability: Availability:
</span> </span>
<span class="text-body-1">{{ props.userData.telemed.availability_from }}</span> <span class="text-body-1">{{ props.userData.telemed.availability_to }}</span> <span class="text-body-1">{{ props.userData.telemed.availability_from }}</span> to<span class="text-body-1">{{ props.userData.telemed.availability_to }}</span>
</VListItemTitle> </VListItemTitle>
</VListItem> </VListItem>

View File

@@ -152,6 +152,89 @@ const save = async () => {
} }
const states = ref([
{ name: 'Alabama', abbreviation: 'AL' },
{ name: 'Alaska', abbreviation: 'AK' },
{ name: 'Arizona', abbreviation: 'AZ' },
{ name: 'Arkansas', abbreviation: 'AR' },
{ name: 'Howland Island', abbreviation: 'UM-84' },
{ name: 'Delaware', abbreviation: 'DE' },
{ name: 'Maryland', abbreviation: 'MD' },
{ name: 'Baker Island', abbreviation: 'UM-81' },
{ name: 'Kingman Reef', abbreviation: 'UM-89' },
{ name: 'New Hampshire', abbreviation: 'NH' },
{ name: 'Wake Island', abbreviation: 'UM-79' },
{ name: 'Kansas', abbreviation: 'KS' },
{ name: 'Texas', abbreviation: 'TX' },
{ name: 'Nebraska', abbreviation: 'NE' },
{ name: 'Vermont', abbreviation: 'VT' },
{ name: 'Jarvis Island', abbreviation: 'UM-86' },
{ name: 'Hawaii', abbreviation: 'HI' },
{ name: 'Guam', abbreviation: 'GU' },
{ name: 'United States Virgin Islands', abbreviation: 'VI' },
{ name: 'Utah', abbreviation: 'UT' },
{ name: 'Oregon', abbreviation: 'OR' },
{ name: 'California', abbreviation: 'CA' },
{ name: 'New Jersey', abbreviation: 'NJ' },
{ name: 'North Dakota', abbreviation: 'ND' },
{ name: 'Kentucky', abbreviation: 'KY' },
{ name: 'Minnesota', abbreviation: 'MN' },
{ name: 'Oklahoma', abbreviation: 'OK' },
{ name: 'Pennsylvania', abbreviation: 'PA' },
{ name: 'New Mexico', abbreviation: 'NM' },
{ name: 'American Samoa', abbreviation: 'AS' },
{ name: 'Illinois', abbreviation: 'IL' },
{ name: 'Michigan', abbreviation: 'MI' },
{ name: 'Virginia', abbreviation: 'VA' },
{ name: 'Johnston Atoll', abbreviation: 'UM-67' },
{ name: 'West Virginia', abbreviation: 'WV' },
{ name: 'Mississippi', abbreviation: 'MS' },
{ name: 'Northern Mariana Islands', abbreviation: 'MP' },
{ name: 'United States Minor Outlying Islands', abbreviation: 'UM' },
{ name: 'Massachusetts', abbreviation: 'MA' },
{ name: 'Connecticut', abbreviation: 'CT' },
{ name: 'Florida', abbreviation: 'FL' },
{ name: 'District of Columbia', abbreviation: 'DC' },
{ name: 'Midway Atoll', abbreviation: 'UM-71' },
{ name: 'Navassa Island', abbreviation: 'UM-76' },
{ name: 'Indiana', abbreviation: 'IN' },
{ name: 'Wisconsin', abbreviation: 'WI' },
{ name: 'Wyoming', abbreviation: 'WY' },
{ name: 'South Carolina', abbreviation: 'SC' },
{ name: 'Arkansas', abbreviation: 'AR' },
{ name: 'South Dakota', abbreviation: 'SD' },
{ name: 'Montana', abbreviation: 'MT' },
{ name: 'North Carolina', abbreviation: 'NC' },
{ name: 'Palmyra Atoll', abbreviation: 'UM-95' },
{ name: 'Puerto Rico', abbreviation: 'PR' },
{ name: 'Colorado', abbreviation: 'CO' },
{ name: 'Missouri', abbreviation: 'MO' },
{ name: 'New York', abbreviation: 'NY' },
{ name: 'Maine', abbreviation: 'ME' },
{ name: 'Tennessee', abbreviation: 'TN' },
{ name: 'Georgia', abbreviation: 'GA' },
{ name: 'Louisiana', abbreviation: 'LA' },
{ name: 'Nevada', abbreviation: 'NV' },
{ name: 'Iowa', abbreviation: 'IA' },
{ name: 'Idaho', abbreviation: 'ID' },
{ name: 'Rhode Island', abbreviation: 'RI' },
{ name: 'Washington', abbreviation: 'WA' },
{ name: 'Ohio', abbreviation: 'OH' },
{ name: 'All', abbreviation: 'All' }
// ... (add the rest of the states)
]);
const sortedStates = computed(() => {
const sorted = states.value.slice().sort((a, b) => {
// Move "All" to the beginning
if (a.name === 'All') return -1;
if (b.name === 'All') return 1;
// Sort other states alphabetically
return a.name.localeCompare(b.name);
});
return sorted;
});
const getMettings = (Item) => { const getMettings = (Item) => {
router.push('/admin/provider/meetings/'+Item.id); router.push('/admin/provider/meetings/'+Item.id);
} }
@@ -164,19 +247,116 @@ const deleteItemConfirm = async() => {
closeDelete() closeDelete()
} }
const getprovidersList = computed(async () => { const getprovidersList = computed(async () => {
store.dispatch('updateIsLoading', true) providersList.value = [];
await store.dispatch('providersList') console.log('getprovidersFilterList',store.getters.getProvidersList)
console.log('getProvidersList',store.getters.getProvidersList)
let list = store.getters.getProvidersList let list = store.getters.getProvidersList
store.dispatch('updateIsLoading', false) store.dispatch('updateIsLoading', false)
providersList.value = list providersList.value = list
return providersList.value return providersList.value
}); });
onMounted(() => { const getProviderFilter = async() => {
store.dispatch('updateIsLoading', true)
await store.dispatch('providersFilterList',{
gender: filter.value.gender.toLowerCase(),
state: filter.value.state,
availabilityFrom: filter.value.availabilityFrom,
availabilityTo:filter.value.availabilityTo,
})
store.dispatch('updateIsLoading', false)
}
onMounted(async() => {
store.dispatch('updateIsLoading', true)
await store.dispatch('providersList')
store.dispatch('updateIsLoading', false)
}) })
const filter = ref({
practics_state:'',
gender: 'All',
state: 'All',
specialty:'',
availabilityFrom:'All',
availabilityTo:'All'
// plan: '',
})
// const onSubcriptionChange = async(newvalue)=> {
// filter.value.plan = newvalue;
// console.log("Plan",filter.value.plan );
// await getPatientFilter();
// }
const onSpecialty = async(newvalue)=> {
if(newvalue.length > 3){
filter.value.specialty = newvalue;
console.log("onSpecialty",filter.value.specialty);
}
// await getPatientFilter();
}
const onGenderChange = async(newvalue)=> {
filter.value.gender = newvalue;
console.log("gender",filter.value.gender);
await getProviderFilter();
}
const onStateChange = async(newvalue)=> {
filter.value.state = newvalue;
console.log("state",filter.value.state);
await getProviderFilter();
}
const onAvailabilityFromChange = async(newvalue)=> {
filter.value.availabilityFrom = newvalue;
console.log("frmo",filter.value.availabilityFrom);
await getProviderFilter();
}
const onAvailabilityToChange = async(newvalue)=> {
filter.value.availabilityTo = newvalue;
console.log("to",filter.value.availabilityTo);
await getProviderFilter();
}
const onPracticsStateChange = async(newvalue)=> {
filter.value.practics_state = newvalue;
console.log("state",filter.value.practics_state);
await getProviderFilter();
}
const onDateRangeChange = async(newvalue)=> {
filter.value.date_range = newvalue;
console.log("Length", newvalue.length);
}
const timeOptions = computed(() => {
const options = ['All'];
// Loop through the hours from 12 to 23 (for 12:00 PM to 11:00 PM)
for (let hour = 12; hour <= 23; hour++) {
// Loop through the minutes (0 and 30)
for (let minute of [0, 30]) {
// Construct the time string
const timeString = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
options.push(timeString);
}
}
// Add the time option for 24:00 (midnight)
options.push('24:00');
return options;
});
</script> </script>
<template> <template>
@@ -185,10 +365,102 @@ onMounted(() => {
<VCard title="Providers"> <VCard title="Providers">
<VCardText > <VCardText >
<VRow> <VRow>
<!-- <VCol
cols="12"
md="3"
>
<VSelect
v-model="filter.plan"
label="Subcription"
placeholder="Subcription"
density="comfortable"
:items="subcriptionLists"
item-title="title"
item-value="slug"
@update:model-value="onSubcriptionChange"
/>
</VCol> -->
<!-- <VCol
cols="12"
md="2"
>
<VSelect
v-model="filter.practics_state"
label="Practics State"
density="comfortable"
:items="sortedStates"
item-title="name"
item-value="abbreviation"
@update:model-value="onPracticsStateChange"
/>
</VCol> -->
<VCol <VCol
cols="12" cols="12"
offset-md="8"
md="4" md="2"
>
<VSelect
v-model="filter.gender"
label="Gender"
placeholder="Gender"
density="comfortable"
:items="['All','Male', 'Female']"
@update:model-value="onGenderChange"
/>
</VCol>
<VCol
cols="12"
md="2"
>
<VSelect
v-model="filter.state"
label="State"
density="comfortable"
:items="sortedStates"
item-title="name"
item-value="abbreviation"
@update:model-value="onStateChange"
/>
</VCol>
<!-- <VCol
cols="12"
md="2"
>
<VTextField
v-model="filter.specialty"
label="Speciality"
append-inner-icon="ri-search-line"
@update:model-value="onSpecialty"
/>
</VCol> -->
<VCol
cols="12"
md="3"
>
<VSelect @update:model-value="onAvailabilityFromChange" v-model="filter.availabilityFrom" label="Availability From" :items="timeOptions" density="comfortable" />
</VCol>
<VCol
cols="12"
md="3"
>
<VSelect @update:model-value="onAvailabilityToChange" v-model="filter.availabilityTo" label="Availability To" :items="timeOptions" density="comfortable"
/>
</VCol>
<VCol
cols="12"
md="2"
> >
<VTextField <VTextField
v-model="search" v-model="search"

View File

@@ -0,0 +1,748 @@
<script setup>
import { useStore } from 'vuex';
const store = useStore()
const editDialog = ref(false)
const deleteDialog = ref(false)
const search = ref('')
const defaultItem = ref({
id: -1,
avatar: '',
name: '',
email: '',
// dob: '',
phone_no: '',
})
const router = useRouter()
const editedItem = ref(defaultItem.value)
const editedIndex = ref(-1)
const providersList = ref([])
const providersFilter = ref([])
const isLoading=ref(false)
// status options
const selectedOptions = [
{
text: 'Active',
value: 1,
},
{
text: 'InActive',
value: 2,
},
]
const refVForm = ref(null)
const formatPhoneNumber = () => {
console.log(editedItem.value)
// Remove non-numeric characters from the input
const numericValue = editedItem.value.phone_no.replace(/\D/g, '');
// Apply formatting logic
if (numericValue.length <= 10) {
editedItem.value.phone_no = numericValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
} else {
// Limit the input to a maximum of 14 characters
const truncatedValue = numericValue.slice(0, 10);
editedItem.value.phone_no = truncatedValue.replace(/(\d{3})(\d{3})(\d{4})/, '($1) $2-$3');
}
};
// headers
const headers = [
{
title: 'ID',
key: 'id',
},
{
title: 'NAME',
key: 'name',
},
{
title: 'EMAIL',
key: 'email',
},
// {
// title: 'Date Of Birth',
// key: 'dob',
// },
{
title: 'Phone',
key: 'phone_no',
},
// {
// title: 'ACTIONS',
// key: 'actions',
// },
]
const resolveStatusVariant = status => {
if (status === 1)
return {
color: 'primary',
text: 'Current',
}
else if (status === 2)
return {
color: 'success',
text: 'Professional',
}
else if (status === 3)
return {
color: 'error',
text: 'Rejected',
}
else if (status === 4)
return {
color: 'warning',
text: 'Resigned',
}
else
return {
color: 'info',
text: 'Applied',
}
}
const editItem = item => {
editedIndex.value = providersList.value.indexOf(item)
editedItem.value = { ...item }
editDialog.value = true
}
const deleteItem = item => {
editedIndex.value = providersList.value.indexOf(item)
editedItem.value = { ...item }
deleteDialog.value = true
}
const close = () => {
editDialog.value = false
editedIndex.value = -1
editedItem.value = { ...defaultItem.value }
}
const closeDelete = () => {
deleteDialog.value = false
editedIndex.value = -1
editedItem.value = { ...defaultItem.value }
}
const save = async () => {
await getProviderFilter()
}
const states = ref([
{ name: 'Alabama', abbreviation: 'AL' },
{ name: 'Alaska', abbreviation: 'AK' },
{ name: 'Arizona', abbreviation: 'AZ' },
{ name: 'Arkansas', abbreviation: 'AR' },
{ name: 'Howland Island', abbreviation: 'UM-84' },
{ name: 'Delaware', abbreviation: 'DE' },
{ name: 'Maryland', abbreviation: 'MD' },
{ name: 'Baker Island', abbreviation: 'UM-81' },
{ name: 'Kingman Reef', abbreviation: 'UM-89' },
{ name: 'New Hampshire', abbreviation: 'NH' },
{ name: 'Wake Island', abbreviation: 'UM-79' },
{ name: 'Kansas', abbreviation: 'KS' },
{ name: 'Texas', abbreviation: 'TX' },
{ name: 'Nebraska', abbreviation: 'NE' },
{ name: 'Vermont', abbreviation: 'VT' },
{ name: 'Jarvis Island', abbreviation: 'UM-86' },
{ name: 'Hawaii', abbreviation: 'HI' },
{ name: 'Guam', abbreviation: 'GU' },
{ name: 'United States Virgin Islands', abbreviation: 'VI' },
{ name: 'Utah', abbreviation: 'UT' },
{ name: 'Oregon', abbreviation: 'OR' },
{ name: 'California', abbreviation: 'CA' },
{ name: 'New Jersey', abbreviation: 'NJ' },
{ name: 'North Dakota', abbreviation: 'ND' },
{ name: 'Kentucky', abbreviation: 'KY' },
{ name: 'Minnesota', abbreviation: 'MN' },
{ name: 'Oklahoma', abbreviation: 'OK' },
{ name: 'Pennsylvania', abbreviation: 'PA' },
{ name: 'New Mexico', abbreviation: 'NM' },
{ name: 'American Samoa', abbreviation: 'AS' },
{ name: 'Illinois', abbreviation: 'IL' },
{ name: 'Michigan', abbreviation: 'MI' },
{ name: 'Virginia', abbreviation: 'VA' },
{ name: 'Johnston Atoll', abbreviation: 'UM-67' },
{ name: 'West Virginia', abbreviation: 'WV' },
{ name: 'Mississippi', abbreviation: 'MS' },
{ name: 'Northern Mariana Islands', abbreviation: 'MP' },
{ name: 'United States Minor Outlying Islands', abbreviation: 'UM' },
{ name: 'Massachusetts', abbreviation: 'MA' },
{ name: 'Connecticut', abbreviation: 'CT' },
{ name: 'Florida', abbreviation: 'FL' },
{ name: 'District of Columbia', abbreviation: 'DC' },
{ name: 'Midway Atoll', abbreviation: 'UM-71' },
{ name: 'Navassa Island', abbreviation: 'UM-76' },
{ name: 'Indiana', abbreviation: 'IN' },
{ name: 'Wisconsin', abbreviation: 'WI' },
{ name: 'Wyoming', abbreviation: 'WY' },
{ name: 'South Carolina', abbreviation: 'SC' },
{ name: 'Arkansas', abbreviation: 'AR' },
{ name: 'South Dakota', abbreviation: 'SD' },
{ name: 'Montana', abbreviation: 'MT' },
{ name: 'North Carolina', abbreviation: 'NC' },
{ name: 'Palmyra Atoll', abbreviation: 'UM-95' },
{ name: 'Puerto Rico', abbreviation: 'PR' },
{ name: 'Colorado', abbreviation: 'CO' },
{ name: 'Missouri', abbreviation: 'MO' },
{ name: 'New York', abbreviation: 'NY' },
{ name: 'Maine', abbreviation: 'ME' },
{ name: 'Tennessee', abbreviation: 'TN' },
{ name: 'Georgia', abbreviation: 'GA' },
{ name: 'Louisiana', abbreviation: 'LA' },
{ name: 'Nevada', abbreviation: 'NV' },
{ name: 'Iowa', abbreviation: 'IA' },
{ name: 'Idaho', abbreviation: 'ID' },
{ name: 'Rhode Island', abbreviation: 'RI' },
{ name: 'Washington', abbreviation: 'WA' },
{ name: 'Ohio', abbreviation: 'OH' },
{ name: 'All', abbreviation: 'All' }
// ... (add the rest of the states)
]);
const sortedStates = computed(() => {
const sorted = states.value.slice().sort((a, b) => {
// Move "All" to the beginning
if (a.name === 'All') return -1;
if (b.name === 'All') return 1;
// Sort other states alphabetically
return a.name.localeCompare(b.name);
});
return sorted;
});
const getMettings = (Item) => {
router.push('/admin/provider/meetings/'+Item.id);
}
const deleteItemConfirm = async() => {
console.log('editedIndex.value',editedIndex.value,editedItem.value.id)
await store.dispatch('providerDelete',{
id: editedItem.value.id
})
providersList.value.splice(editedIndex.value, 1)
closeDelete()
}
const getProviderFilter = async() => {
store.dispatch('updateIsLoading', true)
await store.dispatch('providersReportsFilterList',{
gender: filter.value.gender.toLowerCase(),
state: filter.value.state,
availabilityFrom: filter.value.availabilityFrom.toLowerCase(),
availabilityTo: filter.value.availabilityTo.toLowerCase(),
specialty: filter.value.specialty,
provider_list: filter.value.provider_list,
practics_state:filter.value.practics_state,
})
store.dispatch('updateIsLoading', false)
}
onMounted(async() => {
store.dispatch('updateIsLoading', true)
await store.dispatch('providersReportFilter')
providersFilter.value =store.getters.getProvidersReportFilter
store.dispatch('updateIsLoading', false)
})
const filter = ref({
practics_state:'',
gender: 'All',
state: 'All',
specialty:'',
availabilityFrom:'All',
availabilityTo: 'All',
provider_list:'All'
// plan: '',
})
// const onSubcriptionChange = async(newvalue)=> {
// filter.value.plan = newvalue;
// console.log("Plan",filter.value.plan );
// await getPatientFilter();
// }
const onSpecialty = async(newvalue)=> {
if(newvalue.length > 3){
filter.value.specialty = newvalue;
console.log("onSpecialty",filter.value.specialty);
}
//await getProviderFilter();
}
const onGenderChange = async(newvalue)=> {
filter.value.gender = newvalue;
console.log("gender",filter.value.gender);
//await getProviderFilter();
}
const onStateChange = async(newvalue)=> {
filter.value.state = newvalue;
console.log("state",filter.value.state);
//await getProviderFilter();
}
const onAvailabilityFromChange = async(newvalue)=> {
filter.value.availabilityFrom = newvalue;
console.log("frmo",filter.value.availabilityFrom);
//await getProviderFilter();
}
const onAvailabilityToChange = async(newvalue)=> {
filter.value.availabilityTo = newvalue;
console.log("to",filter.value.availabilityTo);
//await getProviderFilter();
}
const onProviderListChange = async(newvalue)=> {
filter.value.provider_list = newvalue;
console.log("provider_list",filter.value.provider_list);
//await getProviderFilter();
}
const onPracticsStateChange = async(newvalue)=> {
filter.value.practics_state = newvalue;
console.log("state",filter.value.practics_state);
//await getProviderFilter();
}
const onDateRangeChange = async(newvalue)=> {
filter.value.date_range = newvalue;
console.log("Length", newvalue.length);
}
const timeOptions = computed(() => {
const options = ['All'];
// Loop through the hours from 12 to 23 (for 12:00 PM to 11:00 PM)
for (let hour = 12; hour <= 23; hour++) {
// Loop through the minutes (0 and 30)
for (let minute of [0, 30]) {
// Construct the time string
const timeString = `${hour.toString().padStart(2, '0')}:${minute.toString().padStart(2, '0')}`;
options.push(timeString);
}
}
// Add the time option for 24:00 (midnight)
options.push('24:00');
return options;
});
</script>
<template>
<v-row>
<v-col cols="12" md="12" >
<VCard title="Providers">
<VCardText >
<VRow>
<!-- <VCol
cols="12"
md="3"
>
<VSelect
v-model="filter.plan"
label="Subcription"
placeholder="Subcription"
density="comfortable"
:items="subcriptionLists"
item-title="title"
item-value="slug"
@update:model-value="onSubcriptionChange"
/>
</VCol> -->
<!-- <VCol
cols="12"
md="2"
>
<VSelect
v-model="filter.practics_state"
label="Practics State"
density="comfortable"
:items="sortedStates"
item-title="name"
item-value="abbreviation"
@update:model-value="onPracticsStateChange"
/>
</VCol> -->
<VCol
cols="12"
md="2"
>
<VSelect
v-model="filter.gender"
label="Gender"
placeholder="Gender"
density="comfortable"
:items="['All','Male', 'Female']"
@update:model-value="onGenderChange"
/>
</VCol>
<VCol
cols="12"
md="2"
>
<VAutocomplete
v-model="filter.provider_list"
label="Provider"
:items="providersFilter.provider_list"
item-title="name"
item-value="id"
placeholder="Select Provider"
@update:model-value="onProviderListChange"
/>
</VCol>
<VCol
cols="12"
md="2"
>
<VAutocomplete
v-model="filter.practics_state"
label="Practice States"
:items="providersFilter.practicing_states"
item-title="name"
item-value="abbreviation"
placeholder="Select State"
@update:model-value="onPracticsStateChange"
/>
</VCol>
<VCol
cols="12"
md="2"
>
<VAutocomplete
v-model="filter.state"
label="States"
:items="sortedStates"
item-title="name"
item-value="abbreviation"
placeholder="Select State"
@update:model-value="onStateChange"
/>
</VCol>
<VCol
cols="12"
md="2"
>
<VAutocomplete
v-model="filter.specialty"
label="Specialty"
:items="providersFilter.specialty"
item-title="specialty"
item-value="specialty"
placeholder="Select specialty"
@update:model-value="onSpecialty"
/>
</VCol>
<VCol
cols="12"
md="2"
>
<VTextField
v-model="search"
label="Search"
placeholder="Search ..."
append-inner-icon="ri-search-line"
single-line
hide-details
dense
outlined
/>
</VCol>
<!-- <VCol
cols="12"
md="2"
>
<VTextField
v-model="filter.specialty"
label="Speciality"
append-inner-icon="ri-search-line"
@update:model-value="onSpecialty"
/>
</VCol> -->
<VCol
cols="12"
md="3"
>
<VSelect @update:model-value="onAvailabilityFromChange" v-model="filter.availabilityFrom" label="Availability From" :items="timeOptions" density="comfortable" />
</VCol>
<VCol
cols="12"
md="3"
>
<VSelect @update:model-value="onAvailabilityToChange" v-model="filter.availabilityTo" label="Availability To" :items="timeOptions" density="comfortable"
/>
</VCol>
</VRow>
<VCardActions>
<VSpacer />
<VBtn
color="success"
variant="elevated"
@click="getProviderFilter"
>
<VIcon class="ri-file-download-line" ></VIcon>
Download
</VBtn>
</VCardActions>
</VCardText>
<VDataTable
:headers="headers"
:items="providersList"
:search="search"
:items-per-page="5"
class="text-no-wrap"
style="display: none;"
>
<!-- full name -->
<template #item.name="{ item }">
<div class="d-flex align-center">
<!-- avatar -->
<VAvatar
size="32"
:color="item.avatar ? '' : 'primary'"
:class="item.avatar ? '' : 'v-avatar-light-bg primary--text'"
:variant="!item.avatar ? 'tonal' : undefined"
>
<VImg
v-if="item.avatar"
:src="item.avatar"
/>
<span
v-else
class="text-sm"
>{{ avatarText(item.name) }}</span>
</VAvatar>
<div class="d-flex flex-column ms-3">
<router-link
:to="{ name: 'admin-provider-profile', params: { id: item.id } }"
class=" highlighted"
>
<span class="d-block font-weight-medium text-truncate">{{ item.name }}</span>
</router-link>
<small>{{ item.post }}</small>
</div>
</div>
</template>
<!-- status -->
<template #item.status="{ item }">
<VChip
:color="resolveStatusVariant(item.status).color"
density="comfortable"
>
{{ resolveStatusVariant(item.status).text }}
</VChip>
</template>
<!-- Actions -->
<template #item.actions="{ item }">
<div class="d-flex gap-1">
<IconBtn
size="small"
@click="editItem(item)"
style="display: none;"
>
<VIcon icon="ri-pencil-line" />
</IconBtn>
<IconBtn
size="small"
@click="deleteItem(item)"
style="display: none;"
>
<VIcon icon="ri-delete-bin-line" />
</IconBtn>
<IconBtn
size="small"
@click="getMettings(item)"
>
<VIcon icon="ri-time-line" />
</IconBtn>
</div>
</template>
</VDataTable>
</VCard>
</v-col>
</v-row>
<!-- 👉 Edit Dialog -->
<VDialog
v-model="editDialog"
max-width="600px"
>
<VForm ref="refVForm" >
<VCard>
<VCardTitle>
<span class="headline">Edit Provider</span>
</VCardTitle>
<VCardText>
<VContainer >
<VRow>
<!-- fullName -->
<VCol cols="12" md="6">
<VTextField
v-model="editedItem.first_name"
label="First Name"
:rules="[requiredFirstName]"
/>
</VCol>
<VCol cols="12" md="6">
<VTextField
v-model="editedItem.last_name"
label="Last Name"
:rules="[requiredLastName]"
/>
</VCol>
<!-- email -->
<VCol cols="12" sm="6" md="12">
<VTextField
v-model="editedItem.email"
label="Email"
:rules="[requiredEmail, emailValidator]"
/>
</VCol>
<!-- <VCol cols="12" sm="6" md="12">
<VTextField
v-model="editedItem.dob"
label="Date Of Birth"
/>
</VCol> -->
<VCol cols="12" sm="6" md="12">
<VTextField v-model="editedItem.phone_no" label="Phone Number" pattern="^\(\d{3}\) \d{3}-\d{4}$"
:rules="[requiredPhone, validUSAPhone]" placeholder="i.e. (000) 000-0000"
@input="formatPhoneNumber" max="14" density="comfortable" />
</VCol>
<!-- status -->
<VCol
cols="12"
md="12"
>
<VSelect
v-model="editedItem.status"
:items="selectedOptions"
item-title="text"
item-value="value"
label="Status"
variant="outlined"
/>
</VCol>
</VRow>
</VContainer>
</VCardText>
<VCardActions>
<VSpacer />
<VBtn
color="error"
variant="outlined"
@click="close"
>
Cancel
</VBtn>
<VBtn
color="success"
variant="elevated"
@click="save"
>
Save
</VBtn>
</VCardActions>
</VCard>
</VForm>
</VDialog>
<!-- 👉 Delete Dialog -->
<VDialog
v-model="deleteDialog"
max-width="500px"
>
<VCard>
<VCardTitle>
Are you sure you want to delete this item?
</VCardTitle>
<VCardActions>
<VSpacer />
<VBtn
color="error"
variant="outlined"
@click="closeDelete"
>
Cancel
</VBtn>
<VBtn
color="success"
variant="elevated"
@click="deleteItemConfirm"
>
OK
</VBtn>
<VSpacer />
</VCardActions>
</VCard>
</VDialog>
</template>
<style scoped>
.highlighted {
/* Add your desired highlighting styles here */
font-weight: bold;
color: #a169ff; /* or any other color you prefer */
}
</style>

View File

@@ -83,6 +83,7 @@ export const routes = [
name: 'admin-provider-meeitng-details', name: 'admin-provider-meeitng-details',
component: () => import('@/pages/providers/meeting-details.vue'), component: () => import('@/pages/providers/meeting-details.vue'),
}, },
{ {
path: '/admin/patient/meeting/prescription/:patient_id/:id', path: '/admin/patient/meeting/prescription/:patient_id/:id',
name: 'admin-patient-meeitng-prescription', name: 'admin-patient-meeitng-prescription',
@@ -109,9 +110,9 @@ export const routes = [
component: () => import('@/pages/labs/labs-kit.vue'), component: () => import('@/pages/labs/labs-kit.vue'),
}, },
{ {
path: '/admin/medicines', path: '/admin/products',
name: 'admin-medicines', name: 'admin-products',
component: () => import('@/pages/medicines/medicines.vue'), component: () => import('@/pages/products/product.vue'),
}, },
{ {
path: '/admin/profile', path: '/admin/profile',
@@ -132,16 +133,33 @@ export const routes = [
path: '/admin/patients/patient-profile/:id', path: '/admin/patients/patient-profile/:id',
name: 'admin-patient-profile', name: 'admin-patient-profile',
component: () => import('@/pages/patients/patient-profile.vue'), component: () => import('@/pages/patients/patient-profile.vue'),
meta: {
activeParent: 'admin-patients'
}
}, },
{ {
path: '/admin/provider/provider-profile/:id', path: '/admin/provider/provider-profile/:id',
name: 'admin-provider-profile', name: 'admin-provider-profile',
component: () => import('@/pages/providers/provider-profile.vue'), component: () => import('@/pages/providers/provider-profile.vue'),
meta: {
activeParent: 'admin-providers'
}
}, },
{ {
path: '/admin/providers/patientprofile/:patient_id', path: '/admin/providers/patientprofile/:id',
name: 'admin-providers-patientprofile', name: 'admin-providers-patientprofile',
component: () => import('@/pages/patients/patientprofile.vue'), component: () => import('@/pages/patients/PatientQuestionProfile.vue'),
},
{
path: '/admin/reports/providers',
name: 'admin-provider-report',
component: () => import('@/pages/reports/providers-report.vue'),
},
{
path: '/admin/orders',
name: 'admin-orders',
component: () => import('@/pages/apps/ecommerce/order/list/index.vue'),
}, },
{ {
path: '/apps/email/filter/:filter', path: '/apps/email/filter/:filter',
@@ -179,4 +197,5 @@ export const routes = [
name: 'apps-ecommerce-dashboard', name: 'apps-ecommerce-dashboard',
component: () => import('@/pages/dashboards/ecommerce.vue'), component: () => import('@/pages/dashboards/ecommerce.vue'),
}, },
] ]

View File

@@ -157,7 +157,9 @@
"Fleet": "Fleet", "Fleet": "Fleet",
"Widgets": "Widgets", "Widgets": "Widgets",
"Patients": "Patients", "Patients": "Patients",
"Lab Kites": "Lab Kites",
"Providers": "Providers", "Providers": "Providers",
"Prodcuts": "Prodcuts",
"Labs": "Labs", "Labs": "Labs",
"Medicines": "Medicines", "Medicines": "Medicines",
"Profile": "Profile", "Profile": "Profile",

View File

@@ -1,6 +1,7 @@
import axios from 'axios'; import axios from 'axios';
import { createStore } from 'vuex'; import { createStore } from 'vuex';
import { import {
ADMIN_GET_ORDER_API,
ADMIN_GET_SITE_SETTING, ADMIN_GET_SITE_SETTING,
ADMIN_LAB_KIT_ADD_API, ADMIN_LAB_KIT_ADD_API,
ADMIN_LAB_KIT_DELETE_API, ADMIN_LAB_KIT_DELETE_API,
@@ -10,6 +11,8 @@ import {
ADMIN_PATIENT_DETAIL_API, ADMIN_PATIENT_DETAIL_API,
ADMIN_PATIENT_PROFILE_API, ADMIN_PATIENT_PROFILE_API,
ADMIN_PROVIDER_DETAIL_API, ADMIN_PROVIDER_DETAIL_API,
ADMIN_PROVIDER_REPORT_API,
ADMIN_PROVIDER_REPORT_POST_API,
ADMIN_UPDATE_PASSWORD, ADMIN_UPDATE_PASSWORD,
ADMIN_UPDATE_SITE_SETTING, ADMIN_UPDATE_SITE_SETTING,
APPOINTMENT_DETAILS_API, APPOINTMENT_DETAILS_API,
@@ -33,6 +36,7 @@ import {
PATIENT_UPDATE_API, PATIENT_UPDATE_API,
PROFILE_UPDATE_API, PROFILE_UPDATE_API,
PROVIDER_DELETE_API, PROVIDER_DELETE_API,
PROVIDER_FILTER_LIST_API,
PROVIDER_LIST_API, PROVIDER_LIST_API,
PROVIDER_MEETING_LIST_API, PROVIDER_MEETING_LIST_API,
PROVIDER_UPDATE_API, PROVIDER_UPDATE_API,
@@ -49,7 +53,9 @@ export default createStore({
patientMeetingList: [], patientMeetingList: [],
patientLabKitList:[], patientLabKitList:[],
providerMeetingList:[], providerMeetingList:[],
providersList:[], providersList: [],
providersReportFilter: [],
providersReportData:[],
labsList:[], labsList:[],
subcriptions:[], subcriptions:[],
patientLabKitStatus:'', patientLabKitStatus:'',
@@ -68,6 +74,7 @@ export default createStore({
patientDetail: null, patientDetail: null,
providerDetail:null, providerDetail:null,
patientAnswers: null, patientAnswers: null,
orderList:null
}, },
mutations: { mutations: {
setLoading(state, payload) { setLoading(state, payload) {
@@ -110,6 +117,11 @@ export default createStore({
console.log('payload'); console.log('payload');
state.providerDetail = payload state.providerDetail = payload
}, },
setProvidersReportFilter(state, payload) {
console.log('payload');
state.providersReportFilter = payload
},
setProviderMeetingList(state, payload) { setProviderMeetingList(state, payload) {
console.log('payload'); console.log('payload');
state.providerMeetingList = payload state.providerMeetingList = payload
@@ -167,8 +179,12 @@ export default createStore({
state.patientAnswers = payload state.patientAnswers = payload
}, },
setProvidersReportData(state, payload){
state.providersReportData= payload
},
setOrderList(state, payload){
state.orderList= payload
},
}, },
actions: { actions: {
@@ -216,6 +232,7 @@ export default createStore({
}, },
async PatientFilter({ commit,state }, payload) { async PatientFilter({ commit,state }, payload) {
commit('setLoading', true) commit('setLoading', true)
await axios.post(PATIENT_FILTER_LIST_API, { await axios.post(PATIENT_FILTER_LIST_API, {
plan: payload.plan ? payload.plan: 'all' , plan: payload.plan ? payload.plan: 'all' ,
gender: payload.gender ? payload.gender: 'all', gender: payload.gender ? payload.gender: 'all',
@@ -341,10 +358,58 @@ export default createStore({
console.error('Error:', error); console.error('Error:', error);
}); });
}, },
async providersFilterList({ commit }, payload) {
commit('setLoading', true)
if(payload.state == 'All')
payload.state = payload.state.toLowerCase();
if(payload.availabilityFrom == 'All')
payload.availabilityFrom = payload.availabilityFrom.toLowerCase();
if(payload.availabilityTo == 'All')
payload.availabilityTo = payload.availabilityTo.toLowerCase();
console.log(localStorage.getItem('admin_access_token'))
await axios.post(PROVIDER_FILTER_LIST_API, {
gender:payload.gender? payload.gender:'all',
state: payload.state? payload.state:'all',
availability_from: payload.availabilityFrom ? payload.availabilityFrom:'all',
availability_to:payload.availabilityTo?payload.availabilityTo : 'all'
}, {
headers: {
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
}
}) .then(response => {
commit('setLoading', false)
console.log('Response:', response.data.patients);
let dataArray =[]
for (let data of response.data.patients) {
let dataObject = {}
dataObject.name = data.first_name + ' ' + data.last_name
dataObject.first_name = data.first_name
dataObject.last_name = data.last_name
dataObject.email = data.email
// dataObject.dob = data.dob
dataObject.phone_no = data.phone_number
dataObject.avatar = '',
dataObject.id = data.id,
dataArray.push(dataObject)
}
console.log(dataArray)
commit('setProvidersList',dataArray)
})
.catch(error => {
commit('setLoading', false)
console.error('Error:', error);
});
},
async providersList({ commit }, payload) { async providersList({ commit }, payload) {
commit('setLoading', true) commit('setLoading', true)
console.log(localStorage.getItem('admin_access_token')) console.log(localStorage.getItem('admin_access_token'))
await axios.post(PROVIDER_LIST_API, {}, { await axios.post(PROVIDER_LIST_API, {
gender: 'all',
state: 'all',
availabilityFrom: 'all',
availabilityTo: 'all'
}, {
headers: { headers: {
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`, 'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
} }
@@ -1035,6 +1100,82 @@ export default createStore({
}); });
}, },
async providersReportFilter({ commit }, payload) {
commit('setLoading', true)
console.log(localStorage.getItem('admin_access_token'))
await axios.post(ADMIN_PROVIDER_REPORT_API, {}, {
headers: {
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
}
}) .then(response => {
commit('setLoading', false)
console.log('Response:', response.data);
commit('setProvidersReportFilter',response.data)
})
.catch(error => {
commit('setLoading', false)
console.error('Error:', error);
});
},
async providersReportsFilterList({ commit }, payload) {
commit('setLoading', true)
if(payload.state == 'All')
payload.state = payload.state.toLowerCase();
if(payload.availabilityFrom == 'All')
payload.availabilityFrom = payload.availabilityFrom.toLowerCase();
if(payload.availabilityTo == 'All')
payload.availabilityTo = payload.availabilityTo.toLowerCase();
console.log(localStorage.getItem('admin_access_token'))
await axios.post(ADMIN_PROVIDER_REPORT_POST_API, {
gender:payload.gender? payload.gender:'all',
state: payload.state? payload.state:'all',
availability_from: payload.availabilityFrom ? payload.availabilityFrom:'all',
availability_to: payload.availabilityTo ? payload.availabilityTo : 'all',
specialty: payload.specialty ? payload.specialty : 'all',
provider_list: payload.provider_list ? payload.provider_list : 'all',
practice_state: payload.practics_state ? payload.practics_state : 'all',
}, {
headers: {
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
}
}) .then(response => {
commit('setLoading', false)
console.log('Response:', response.data);
commit('setProvidersReportData',response.data)
})
.catch(error => {
commit('setLoading', false)
console.error('Error:', error);
});
},
async orderList({ commit }, payload) {
commit('setLoading', true)
console.log(localStorage.getItem('admin_access_token'))
await axios.get(ADMIN_GET_ORDER_API, {
}, {
headers: {
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
}
}) .then(response => {
commit('setLoading', false)
console.log('Response:', response.data);
commit('setOrderList',response.data)
})
.catch(error => {
commit('setLoading', false)
console.error('Error:', error);
});
},
}, },
getters: { getters: {
getIsLoading(state){ getIsLoading(state){
@@ -1115,5 +1256,14 @@ export default createStore({
getPatientAnswers(state){ getPatientAnswers(state){
return state.patientAnswers return state.patientAnswers
}, },
getProvidersReportFilter(state){
return state.providersReportFilter
},
getProvidersReportData(state){
return state.providersReportData
},
getOrderList(state){
return state.orderList
},
} }
}) })

View File

@@ -13,7 +13,7 @@ export const { themeConfig, layoutConfig } = defineThemeConfig({
title: '', title: '',
// ❗ if you have SVG logo and want it to adapt according to theme color, you have to apply color as `color: rgb(var(--v-global-theme-primary))` // ❗ if you have SVG logo and want it to adapt according to theme color, you have to apply color as `color: rgb(var(--v-global-theme-primary))`
logo: h('div', { innerHTML: `<img src="${logoImage}" alt="Logo" style="width:150px;">` }), logo: h('div', { innerHTML: `<img src="${logoImage}" alt="Logo" style="width:170px;">` }),
contentWidth: ContentWidth.Boxed, contentWidth: ContentWidth.Boxed,
contentLayoutNav: AppContentLayoutNav.Vertical, contentLayoutNav: AppContentLayoutNav.Vertical,
overlayNavFromBreakpoint: breakpointsVuetify.md + 16, // 16 for scrollbar. Docs: https://next.vuetifyjs.com/en/features/display-and-platform/ overlayNavFromBreakpoint: breakpointsVuetify.md + 16, // 16 for scrollbar. Docs: https://next.vuetifyjs.com/en/features/display-and-platform/

6
typed-router.d.ts vendored
View File

@@ -121,7 +121,6 @@ declare module 'vue-router/auto/routes' {
'labs-labs': RouteRecordInfo<'labs-labs', '/labs/labs', Record<never, never>, Record<never, never>>, 'labs-labs': RouteRecordInfo<'labs-labs', '/labs/labs', Record<never, never>, Record<never, never>>,
'labs-labs-kit': RouteRecordInfo<'labs-labs-kit', '/labs/labs-kit', Record<never, never>, Record<never, never>>, 'labs-labs-kit': RouteRecordInfo<'labs-labs-kit', '/labs/labs-kit', Record<never, never>, Record<never, never>>,
'login': RouteRecordInfo<'login', '/login', Record<never, never>, Record<never, never>>, 'login': RouteRecordInfo<'login', '/login', Record<never, never>, Record<never, never>>,
'medicines-medicines': RouteRecordInfo<'medicines-medicines', '/medicines/medicines', Record<never, never>, Record<never, never>>,
'not-authorized': RouteRecordInfo<'not-authorized', '/not-authorized', Record<never, never>, Record<never, never>>, 'not-authorized': RouteRecordInfo<'not-authorized', '/not-authorized', Record<never, never>, Record<never, never>>,
'pages-account-settings-tab': RouteRecordInfo<'pages-account-settings-tab', '/pages/account-settings/:tab', { tab: ParamValue<true> }, { tab: ParamValue<false> }>, 'pages-account-settings-tab': RouteRecordInfo<'pages-account-settings-tab', '/pages/account-settings/:tab', { tab: ParamValue<true> }, { tab: ParamValue<false> }>,
'pages-authentication-forgot-password-v1': RouteRecordInfo<'pages-authentication-forgot-password-v1', '/pages/authentication/forgot-password-v1', Record<never, never>, Record<never, never>>, 'pages-authentication-forgot-password-v1': RouteRecordInfo<'pages-authentication-forgot-password-v1', '/pages/authentication/forgot-password-v1', Record<never, never>, Record<never, never>>,
@@ -161,10 +160,12 @@ declare module 'vue-router/auto/routes' {
'patients-patient-profile': RouteRecordInfo<'patients-patient-profile', '/patients/patient-profile', Record<never, never>, Record<never, never>>, 'patients-patient-profile': RouteRecordInfo<'patients-patient-profile', '/patients/patient-profile', Record<never, never>, Record<never, never>>,
'patients-patien-tab-overview': RouteRecordInfo<'patients-patien-tab-overview', '/patients/PatienTabOverview', Record<never, never>, Record<never, never>>, 'patients-patien-tab-overview': RouteRecordInfo<'patients-patien-tab-overview', '/patients/PatienTabOverview', Record<never, never>, Record<never, never>>,
'patients-patient-bio-panel': RouteRecordInfo<'patients-patient-bio-panel', '/patients/PatientBioPanel', Record<never, never>, Record<never, never>>, 'patients-patient-bio-panel': RouteRecordInfo<'patients-patient-bio-panel', '/patients/PatientBioPanel', Record<never, never>, Record<never, never>>,
'patients-patientprofile': RouteRecordInfo<'patients-patientprofile', '/patients/patientprofile', Record<never, never>, Record<never, never>>, 'patients-patient-lab-test': RouteRecordInfo<'patients-patient-lab-test', '/patients/PatientLabTest', Record<never, never>, Record<never, never>>,
'patients-patient-question-profile': RouteRecordInfo<'patients-patient-question-profile', '/patients/PatientQuestionProfile', Record<never, never>, Record<never, never>>,
'patients-patients': RouteRecordInfo<'patients-patients', '/patients/patients', Record<never, never>, Record<never, never>>, 'patients-patients': RouteRecordInfo<'patients-patients', '/patients/patients', Record<never, never>, Record<never, never>>,
'patients-prescription-panel': RouteRecordInfo<'patients-prescription-panel', '/patients/PrescriptionPanel', Record<never, never>, Record<never, never>>, 'patients-prescription-panel': RouteRecordInfo<'patients-prescription-panel', '/patients/PrescriptionPanel', Record<never, never>, Record<never, never>>,
'patients-question-progress-bar': RouteRecordInfo<'patients-question-progress-bar', '/patients/QuestionProgressBar', Record<never, never>, Record<never, never>>, 'patients-question-progress-bar': RouteRecordInfo<'patients-question-progress-bar', '/patients/QuestionProgressBar', Record<never, never>, Record<never, never>>,
'products-product': RouteRecordInfo<'products-product', '/products/product', Record<never, never>, Record<never, never>>,
'providers-completed-meeting-tab': RouteRecordInfo<'providers-completed-meeting-tab', '/providers/CompletedMeetingTab', Record<never, never>, Record<never, never>>, 'providers-completed-meeting-tab': RouteRecordInfo<'providers-completed-meeting-tab', '/providers/CompletedMeetingTab', Record<never, never>, Record<never, never>>,
'providers-meeting-details': RouteRecordInfo<'providers-meeting-details', '/providers/meeting-details', Record<never, never>, Record<never, never>>, 'providers-meeting-details': RouteRecordInfo<'providers-meeting-details', '/providers/meeting-details', Record<never, never>, Record<never, never>>,
'providers-meetings': RouteRecordInfo<'providers-meetings', '/providers/meetings', Record<never, never>, Record<never, never>>, 'providers-meetings': RouteRecordInfo<'providers-meetings', '/providers/meetings', Record<never, never>, Record<never, never>>,
@@ -175,6 +176,7 @@ declare module 'vue-router/auto/routes' {
'providers-providers': RouteRecordInfo<'providers-providers', '/providers/providers', Record<never, never>, Record<never, never>>, 'providers-providers': RouteRecordInfo<'providers-providers', '/providers/providers', Record<never, never>, Record<never, never>>,
'providers-provider-tab-overview': RouteRecordInfo<'providers-provider-tab-overview', '/providers/ProviderTabOverview', Record<never, never>, Record<never, never>>, 'providers-provider-tab-overview': RouteRecordInfo<'providers-provider-tab-overview', '/providers/ProviderTabOverview', Record<never, never>, Record<never, never>>,
'register': RouteRecordInfo<'register', '/register', Record<never, never>, Record<never, never>>, 'register': RouteRecordInfo<'register', '/register', Record<never, never>, Record<never, never>>,
'reports-providers-report': RouteRecordInfo<'reports-providers-report', '/reports/providers-report', Record<never, never>, Record<never, never>>,
'tables-data-table': RouteRecordInfo<'tables-data-table', '/tables/data-table', Record<never, never>, Record<never, never>>, 'tables-data-table': RouteRecordInfo<'tables-data-table', '/tables/data-table', Record<never, never>, Record<never, never>>,
'tables-simple-table': RouteRecordInfo<'tables-simple-table', '/tables/simple-table', Record<never, never>, Record<never, never>>, 'tables-simple-table': RouteRecordInfo<'tables-simple-table', '/tables/simple-table', Record<never, never>, Record<never, never>>,
'wizard-examples-checkout': RouteRecordInfo<'wizard-examples-checkout', '/wizard-examples/checkout', Record<never, never>, Record<never, never>>, 'wizard-examples-checkout': RouteRecordInfo<'wizard-examples-checkout', '/wizard-examples/checkout', Record<never, never>, Record<never, never>>,