fixes
This commit is contained in:
parent
04aef980d3
commit
05ca36f24e
@ -64,7 +64,7 @@ const getStatusColor = (status) => {
|
|||||||
case 'shipped':
|
case 'shipped':
|
||||||
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
|
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
|
||||||
case 'delivered':
|
case 'delivered':
|
||||||
return 'green';
|
return 'success';
|
||||||
case 'returned':
|
case 'returned':
|
||||||
return 'red';
|
return 'red';
|
||||||
case 'results':
|
case 'results':
|
||||||
|
@ -38,7 +38,22 @@ const selectedOptions = [
|
|||||||
const refVForm = ref(null)
|
const refVForm = ref(null)
|
||||||
|
|
||||||
onBeforeMount(async () => {});
|
onBeforeMount(async () => {});
|
||||||
onMounted(async () => {});
|
onMounted(async () => {
|
||||||
|
store.dispatch('updateIsLoading', true)
|
||||||
|
await store.dispatch('patientList')
|
||||||
|
// console.log('patientList',store.getters.getPatientList)
|
||||||
|
patientList.value = store.getters.getPatientList
|
||||||
|
store.dispatch('updateIsLoading', false)
|
||||||
|
|
||||||
|
});
|
||||||
|
const getPatientList = computed(async () => {
|
||||||
|
return patientList.value.map(history => ({
|
||||||
|
...history,
|
||||||
|
dob: changeFormat(history.dob),
|
||||||
|
}));
|
||||||
|
// return patientList.value
|
||||||
|
});
|
||||||
|
|
||||||
onUnmounted(async () => {});
|
onUnmounted(async () => {});
|
||||||
const formatPhoneNumber = () => {
|
const formatPhoneNumber = () => {
|
||||||
console.log(editedItem.value)
|
console.log(editedItem.value)
|
||||||
@ -139,7 +154,6 @@ const closeDelete = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getMettings = (Item) => {
|
const getMettings = (Item) => {
|
||||||
console.log("item", Item);
|
|
||||||
router.push('/admin/patient/meetings/'+Item.id);
|
router.push('/admin/patient/meetings/'+Item.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -176,25 +190,29 @@ const deleteItemConfirm = async () => {
|
|||||||
patientList.value.splice(editedIndex.value, 1)
|
patientList.value.splice(editedIndex.value, 1)
|
||||||
closeDelete()
|
closeDelete()
|
||||||
}
|
}
|
||||||
const getPatientList = computed(async () => {
|
|
||||||
store.dispatch('updateIsLoading', true)
|
|
||||||
await store.dispatch('patientList')
|
|
||||||
console.log('patientList',store.getters.getPatientList)
|
|
||||||
let list = store.getters.getPatientList
|
|
||||||
store.dispatch('updateIsLoading', false)
|
|
||||||
patientList.value = list
|
|
||||||
return patientList.value
|
|
||||||
});
|
|
||||||
|
|
||||||
onMounted(() => {
|
|
||||||
|
|
||||||
|
|
||||||
})
|
function changeFormat(dateFormat) {
|
||||||
|
const dateParts = dateFormat.split('-'); // Assuming date is in yyyy-mm-dd format
|
||||||
|
const year = parseInt(dateParts[0]);
|
||||||
|
const month = parseInt(dateParts[1]); // No need for padding
|
||||||
|
const day = parseInt(dateParts[2]); // No need for padding
|
||||||
|
|
||||||
|
// Create a new Date object with the parsed values
|
||||||
|
const date = new Date(year, month - 1, day); // Month is zero-based in JavaScript Date object
|
||||||
|
|
||||||
|
// Format the date as mm-dd-yyyy
|
||||||
|
const formattedDate = month + '-' + day + '-' + date.getFullYear();
|
||||||
|
console.log("formattedDate",formattedDate)
|
||||||
|
return formattedDate;
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<v-row>
|
<v-row>
|
||||||
<v-col cols="12" md="12" v-if="getPatientList">
|
<v-col cols="12" md="12" v-if="getPatientList">
|
||||||
|
<v-card title="Patients">
|
||||||
<VCardText >
|
<VCardText >
|
||||||
<VRow>
|
<VRow>
|
||||||
<VCol
|
<VCol
|
||||||
@ -286,6 +304,7 @@ onMounted(() => {
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</VDataTable>
|
</VDataTable>
|
||||||
|
</v-card>
|
||||||
</v-col>
|
</v-col>
|
||||||
</v-row>
|
</v-row>
|
||||||
<!-- 👉 Edit Dialog -->
|
<!-- 👉 Edit Dialog -->
|
||||||
|
Loading…
Reference in New Issue
Block a user