fixes
This commit is contained in:
parent
04aef980d3
commit
05ca36f24e
@ -64,7 +64,7 @@ const getStatusColor = (status) => {
|
||||
case 'shipped':
|
||||
return '#45B8AC'; // Use Vuetify's primary color (typically blue)
|
||||
case 'delivered':
|
||||
return 'green';
|
||||
return 'success';
|
||||
case 'returned':
|
||||
return 'red';
|
||||
case 'results':
|
||||
|
@ -38,7 +38,22 @@ const selectedOptions = [
|
||||
const refVForm = ref(null)
|
||||
|
||||
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 () => {});
|
||||
const formatPhoneNumber = () => {
|
||||
console.log(editedItem.value)
|
||||
@ -139,7 +154,6 @@ const closeDelete = () => {
|
||||
}
|
||||
|
||||
const getMettings = (Item) => {
|
||||
console.log("item", Item);
|
||||
router.push('/admin/patient/meetings/'+Item.id);
|
||||
}
|
||||
|
||||
@ -176,25 +190,29 @@ const deleteItemConfirm = async () => {
|
||||
patientList.value.splice(editedIndex.value, 1)
|
||||
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>
|
||||
|
||||
<template>
|
||||
<v-row>
|
||||
<v-col cols="12" md="12" v-if="getPatientList">
|
||||
<v-card title="Patients">
|
||||
<VCardText >
|
||||
<VRow>
|
||||
<VCol
|
||||
@ -286,6 +304,7 @@ onMounted(() => {
|
||||
</div>
|
||||
</template>
|
||||
</VDataTable>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
<!-- 👉 Edit Dialog -->
|
||||
|
Loading…
Reference in New Issue
Block a user