Compare commits
No commits in common. "fdb8717a53bb1959926706ec2447eabe5a111ca5" and "1f6a8c5af167f0095e438deb1b8e42973f8410fe" have entirely different histories.
fdb8717a53
...
1f6a8c5af1
@ -4,7 +4,6 @@ export const ADMIN_LOGIN_API = MAIN_DOMAIN + "/api/admin/login"
|
|||||||
|
|
||||||
export const PATIENT_LIST_API = MAIN_DOMAIN + "/api/admin/patient-list"
|
export const PATIENT_LIST_API = MAIN_DOMAIN + "/api/admin/patient-list"
|
||||||
export const PATIENT_INFO_API = MAIN_DOMAIN + "/api/admin/patient/"
|
export const PATIENT_INFO_API = MAIN_DOMAIN + "/api/admin/patient/"
|
||||||
export const PATIENT_MEETING_LIST_API = MAIN_DOMAIN + "/api/admin/get-meeting-history/"
|
|
||||||
export const PATIENT_UPDATE_API = MAIN_DOMAIN + "/api/admin/patient-update/"
|
export const PATIENT_UPDATE_API = MAIN_DOMAIN + "/api/admin/patient-update/"
|
||||||
export const PATIENT_DELETE_API = MAIN_DOMAIN + "/api/admin/patient-delete/"
|
export const PATIENT_DELETE_API = MAIN_DOMAIN + "/api/admin/patient-delete/"
|
||||||
|
|
||||||
|
@ -1,140 +0,0 @@
|
|||||||
<script setup>
|
|
||||||
import { onBeforeMount, onMounted, onUnmounted } 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 patientMeetingList = ref([])
|
|
||||||
const isLoading=ref(false)
|
|
||||||
// status options
|
|
||||||
const selectedOptions = [
|
|
||||||
{
|
|
||||||
text: 'Active',
|
|
||||||
value: 1,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
text: 'InActive',
|
|
||||||
value: 2,
|
|
||||||
},
|
|
||||||
|
|
||||||
]
|
|
||||||
|
|
||||||
const refVForm = ref(null)
|
|
||||||
|
|
||||||
onBeforeMount(async () => {});
|
|
||||||
onMounted(async () => {
|
|
||||||
appointmentId.value = route.params.id;
|
|
||||||
console.log("appointmentId",appointmentId.value);
|
|
||||||
});
|
|
||||||
onUnmounted(async () => {});
|
|
||||||
|
|
||||||
// headers
|
|
||||||
const headers = [
|
|
||||||
{
|
|
||||||
title: 'Appiontment Id',
|
|
||||||
key: 'id',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: 'Patient',
|
|
||||||
key: 'patient_name',
|
|
||||||
},
|
|
||||||
{ key: 'appointment_date', sortable: false, title: 'Date' },
|
|
||||||
{ key: 'start_time', title: 'Start Time' },
|
|
||||||
{ key: 'end_time', title: 'End Time' },
|
|
||||||
{ key: 'duration', title: 'Duration' },
|
|
||||||
|
|
||||||
|
|
||||||
// {
|
|
||||||
// title: 'ACTIONS',
|
|
||||||
// key: 'actions',
|
|
||||||
// },
|
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const getPatientMeetingList = computed(async () => {
|
|
||||||
patientMeetingList.value = [];
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('patientMeetingList', {
|
|
||||||
id: appointmentId.value
|
|
||||||
})
|
|
||||||
console.log('patientMeetingList',store.getters.getPatientMeetingList)
|
|
||||||
let list = store.getters.getPatientMeetingList
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
patientMeetingList.value = list
|
|
||||||
return patientMeetingList.value
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
<v-row>
|
|
||||||
<v-col cols="12" md="12" v-if="getPatientMeetingList">
|
|
||||||
<VCard title="Meetings">
|
|
||||||
<VCardText >
|
|
||||||
<VRow>
|
|
||||||
<VCol
|
|
||||||
cols="12"
|
|
||||||
offset-md="8"
|
|
||||||
md="4"
|
|
||||||
>
|
|
||||||
<VTextField
|
|
||||||
v-model="search"
|
|
||||||
label="Search"
|
|
||||||
placeholder="Search ..."
|
|
||||||
append-inner-icon="ri-search-line"
|
|
||||||
single-line
|
|
||||||
hide-details
|
|
||||||
dense
|
|
||||||
outlined
|
|
||||||
/>
|
|
||||||
</VCol>
|
|
||||||
</VRow>
|
|
||||||
</VCardText>
|
|
||||||
<VDataTable
|
|
||||||
:headers="headers"
|
|
||||||
:items="patientMeetingList"
|
|
||||||
:search="search"
|
|
||||||
:items-per-page="5"
|
|
||||||
class="text-no-wrap"
|
|
||||||
>
|
|
||||||
<template #item.id="{ item }">
|
|
||||||
{{ item.id }}
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<!-- Actions -->
|
|
||||||
<template #item.actions="{ item }">
|
|
||||||
<div class="d-flex gap-1">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</VDataTable>
|
|
||||||
</VCard>
|
|
||||||
</v-col>
|
|
||||||
</v-row>
|
|
||||||
|
|
||||||
<!-- 👉 Delete Dialog -->
|
|
||||||
|
|
||||||
</template>
|
|
@ -1,10 +1,7 @@
|
|||||||
<script setup>
|
<script setup>
|
||||||
import { onBeforeMount, onMounted, onUnmounted } from 'vue';
|
import { onBeforeMount, onMounted, onUnmounted } from 'vue';
|
||||||
import { useRouter } from 'vue-router';
|
|
||||||
import { useStore } from 'vuex';
|
import { useStore } from 'vuex';
|
||||||
const store = useStore()
|
const store = useStore()
|
||||||
// const route = useRoute()
|
|
||||||
const router = useRouter()
|
|
||||||
const editDialog = ref(false)
|
const editDialog = ref(false)
|
||||||
const deleteDialog = ref(false)
|
const deleteDialog = ref(false)
|
||||||
const search = ref('')
|
const search = ref('')
|
||||||
@ -77,8 +74,6 @@ const headers = [
|
|||||||
key: 'phone_no',
|
key: 'phone_no',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
title: 'ACTIONS',
|
title: 'ACTIONS',
|
||||||
key: 'actions',
|
key: 'actions',
|
||||||
@ -138,11 +133,6 @@ const closeDelete = () => {
|
|||||||
editedItem.value = { ...defaultItem.value }
|
editedItem.value = { ...defaultItem.value }
|
||||||
}
|
}
|
||||||
|
|
||||||
const getMettings = (Item) => {
|
|
||||||
console.log("item", Item);
|
|
||||||
router.push('/admin/patient/meetings/'+Item.id);
|
|
||||||
}
|
|
||||||
|
|
||||||
const save = async () => {
|
const save = async () => {
|
||||||
const { valid } = await refVForm.value.validate()
|
const { valid } = await refVForm.value.validate()
|
||||||
console.log(valid)
|
console.log(valid)
|
||||||
@ -277,12 +267,6 @@ onMounted(() => {
|
|||||||
>
|
>
|
||||||
<VIcon icon="ri-delete-bin-line" />
|
<VIcon icon="ri-delete-bin-line" />
|
||||||
</IconBtn>
|
</IconBtn>
|
||||||
<IconBtn
|
|
||||||
size="small"
|
|
||||||
@click="getMettings(item)"
|
|
||||||
>
|
|
||||||
<VIcon icon="ri-time-line" />
|
|
||||||
</IconBtn>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VDataTable>
|
</VDataTable>
|
||||||
|
@ -43,11 +43,6 @@ export const routes = [
|
|||||||
name: 'admin-patients',
|
name: 'admin-patients',
|
||||||
component: () => import('@/pages/patients/patients.vue'),
|
component: () => import('@/pages/patients/patients.vue'),
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/admin/patient/meetings/:id',
|
|
||||||
name: 'admin-patient-meeitngs',
|
|
||||||
component: () => import('@/pages/patients/meetings.vue'),
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: '/admin/providers',
|
path: '/admin/providers',
|
||||||
name: 'admin-providers',
|
name: 'admin-providers',
|
||||||
|
@ -7,20 +7,15 @@ import {
|
|||||||
LABS_UPDATE_API,
|
LABS_UPDATE_API,
|
||||||
PATIENT_DELETE_API,
|
PATIENT_DELETE_API,
|
||||||
PATIENT_LIST_API,
|
PATIENT_LIST_API,
|
||||||
PATIENT_MEETING_LIST_API,
|
|
||||||
PATIENT_UPDATE_API,
|
PATIENT_UPDATE_API,
|
||||||
PROVIDER_DELETE_API,
|
PROVIDER_DELETE_API,
|
||||||
PROVIDER_LIST_API,
|
PROVIDER_LIST_API,
|
||||||
PROVIDER_UPDATE_API
|
PROVIDER_UPDATE_API
|
||||||
} from './constants.js';
|
} from './constants.js';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default createStore({
|
export default createStore({
|
||||||
state: {
|
state: {
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
patientList:[],
|
patientList:[],
|
||||||
patientMeetingList:[],
|
|
||||||
providersList:[],
|
providersList:[],
|
||||||
labsList:[]
|
labsList:[]
|
||||||
},
|
},
|
||||||
@ -32,9 +27,6 @@ export default createStore({
|
|||||||
setPtientList(state, payload) {
|
setPtientList(state, payload) {
|
||||||
state.patientList = payload
|
state.patientList = payload
|
||||||
},
|
},
|
||||||
setPtientMeetingList(state, payload) {
|
|
||||||
state.patientMeetingList = payload
|
|
||||||
},
|
|
||||||
setProvidersList(state, payload) {
|
setProvidersList(state, payload) {
|
||||||
state.providersList = payload
|
state.providersList = payload
|
||||||
},
|
},
|
||||||
@ -79,24 +71,6 @@ export default createStore({
|
|||||||
console.error('Error:', error);
|
console.error('Error:', error);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async patientMeetingList({ commit }, payload) {
|
|
||||||
commit('setLoading', true)
|
|
||||||
console.log(localStorage.getItem('admin_access_token'))
|
|
||||||
await axios.post(PATIENT_MEETING_LIST_API+payload.id, {}, {
|
|
||||||
headers: {
|
|
||||||
'Authorization': `Bearer ${localStorage.getItem('admin_access_token')}`,
|
|
||||||
}
|
|
||||||
}) .then(response => {
|
|
||||||
commit('setLoading', false)
|
|
||||||
console.log('Meeting Response:', response.data.patients);
|
|
||||||
commit('setPtientMeetingList',response.data.patients);
|
|
||||||
|
|
||||||
})
|
|
||||||
.catch(error => {
|
|
||||||
commit('setLoading', false)
|
|
||||||
console.error('Error:', error);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
async patientUpdate({ commit }, payload) {
|
async patientUpdate({ commit }, payload) {
|
||||||
commit('setLoading', true)
|
commit('setLoading', true)
|
||||||
await axios.post(PATIENT_UPDATE_API+payload.id, {
|
await axios.post(PATIENT_UPDATE_API+payload.id, {
|
||||||
@ -284,10 +258,6 @@ export default createStore({
|
|||||||
getPatientList(state){
|
getPatientList(state){
|
||||||
return state.patientList
|
return state.patientList
|
||||||
},
|
},
|
||||||
getPatientMeetingList(state){
|
|
||||||
return state.patientMeetingList
|
|
||||||
},
|
|
||||||
|
|
||||||
getProvidersList(state){
|
getProvidersList(state){
|
||||||
return state.providersList
|
return state.providersList
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user