diff --git a/resources/js/constants.js b/resources/js/constants.js index b617893..df9a488 100644 --- a/resources/js/constants.js +++ b/resources/js/constants.js @@ -53,3 +53,4 @@ export const ADMIN_LAB_KIT_ADD_API = MAIN_DOMAIN + "/api/admin/labkit-list-creat export const ADMIN_LAB_KIT_DELETE_API = MAIN_DOMAIN + "/api/admin/labkit-delete/" export const ADMIN_PATIENT_DETAIL_API = MAIN_DOMAIN + "/api/admin/patient-full-detail/" +export const ADMIN_PROVIDER_DETAIL_API = MAIN_DOMAIN + "/api/admin/telemed-full-detail/" diff --git a/resources/js/pages/patients/NotesPanel.vue b/resources/js/pages/patients/NotesPanel.vue index d0d8e56..6421747 100644 --- a/resources/js/pages/patients/NotesPanel.vue +++ b/resources/js/pages/patients/NotesPanel.vue @@ -71,7 +71,7 @@ const downloadFile = (fileUrl) => {
- {{ p_note.telemedPro.name }} + {{ p_note.provider_name }} +const props = defineProps({ + userData: { + type: Object, + required: true, + }, +}) +import CompletedMeetingTab from '@/pages/patients/CompletedMeetingTab.vue'; import moment from 'moment'; 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(); @@ -44,21 +50,9 @@ const headers = [ { title: 'ACTIONS', key: 'actions' }, ]; -// Utility functions -function changeDateFormat(dateFormat) { - if (dateFormat) { - const [datePart, timePart] = dateFormat.split(' '); - const [year, month, day] = datePart.split('-'); - const formattedDate = `${parseInt(month)}-${parseInt(day)}-${year}`; - return `${formattedDate} ${timePart}`; - } - return dateFormat; -} -function changeFormat(dateFormat) { - const [year, month, day] = dateFormat.split('-'); - return `${parseInt(month)}-${parseInt(day)}-${year}`; -} + + function totalCallDuration(start_time, end_time) { const startMoment = moment(start_time); @@ -71,24 +65,37 @@ function totalCallDuration(start_time, end_time) { if (hours === '00' && minutes === '00') { return `00:00:${seconds}`; } else if (hours === '00') { - return `00:${minutes}:${seconds}`; + return `00:${minutes}`; } else { - return `${hours}:${minutes}:${seconds}`; + return `${hours}:${minutes}`; } } - +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 getPatientMeetingList = async () => { - store.dispatch('updateIsLoading', true); - await store.dispatch('patientMeetingList', { id: route.params.id }); - store.dispatch('updateIsLoading', false); + //store.dispatch('updateIsLoading', true); + //await store.dispatch('patientMeetingList', { id: route.params.id }); + // store.dispatch('updateIsLoading', false); - let list = store.getters.getPatientMeetingList; + let list = props.userData.upcomingMeetings; + patientMeetingList.value = list.map(history => ({ ...history, - appointment_date: changeFormat(history.appointment_date), - start_time: changeDateFormat(history.start_time), - end_time: changeDateFormat(history.end_time), + appointment_date: formatDate(history.appointment_date), + start_time: formatDate(history.start_time), + end_time: formatDate(history.end_time), duration: totalCallDuration(history.start_time, history.end_time), })); console.log(list); @@ -122,25 +129,14 @@ const options = [ }, ] -const breadcrums = [ - { - title: 'Patient', - disabled: false, - to: '/admin/patients', - }, - { - title: 'Meetings', - disabled: false, - } - -]; + diff --git a/resources/js/pages/patients/PatientBioPanel.vue b/resources/js/pages/patients/PatientBioPanel.vue index cd99d59..74141b1 100644 --- a/resources/js/pages/patients/PatientBioPanel.vue +++ b/resources/js/pages/patients/PatientBioPanel.vue @@ -102,6 +102,13 @@ const resolveUserRoleVariant = role => { > Patient + + Active + @@ -157,27 +164,9 @@ const resolveUserRoleVariant = role => { {{ props.userData.patient.zip_code }} - - - - Status: - - - Active - - - + - - - Role: - Patient - - + @@ -191,29 +180,23 @@ const resolveUserRoleVariant = role => { - - - - Country: - - {{ props.userData.patient.country }} - - - + Suspend @@ -223,7 +206,7 @@ const resolveUserRoleVariant = role => { - + { color="primary" size="small" > - {{ props.userData.plans[0].title }} + {{ props.userData.plans.title }}
- {{ props.userData.plans[0].currency }} + {{ props.userData.plans.currency }}

- {{ props.userData.plans[0].price }} + {{ props.userData.plans.price }}

month
@@ -263,7 +246,7 @@ const resolveUserRoleVariant = role => { icon="ri-circle-fill" />
- {{ props.userData.plans[0].list_one_title }} + {{ props.userData.plans.list_one_title }}
@@ -277,7 +260,7 @@ const resolveUserRoleVariant = role => { icon="ri-circle-fill" />
- {{ props.userData.plans[0].list_sub_title }} + {{ props.userData.plans.list_sub_title }}
@@ -292,7 +275,7 @@ const resolveUserRoleVariant = role => { icon="ri-circle-fill" />
- {{ props.userData.plans[0].list_two_title }} + {{ props.userData.plans.list_two_title }}
diff --git a/resources/js/pages/patients/PrescriptionPanel.vue b/resources/js/pages/patients/PrescriptionPanel.vue index 511ca52..eb9b1de 100644 --- a/resources/js/pages/patients/PrescriptionPanel.vue +++ b/resources/js/pages/patients/PrescriptionPanel.vue @@ -1,6 +1,7 @@ - -