diff --git a/resources/js/Components/Common/Reporting/ReportingChart.vue b/resources/js/Components/Common/Reporting/ReportingChart.vue index da96ec37..4a815fda 100644 --- a/resources/js/Components/Common/Reporting/ReportingChart.vue +++ b/resources/js/Components/Common/Reporting/ReportingChart.vue @@ -43,7 +43,7 @@ const xAxisLabels = computed(() => { if (props.groupedType === 'week') { return props?.groupedData?.map((el) => formatWeek(el.key)); } - return props?.groupedData?.map((el) => formatDate(el.key ?? '')); + return props?.groupedData?.map((el) => formatDate(el.key ?? '', organization?.value?.date_format)); }); const accentColor = useCssVar('--theme-color-chart', null, { observe: true }); const labelColor = useCssVar('--color-text-secondary', null, { observe: true }); diff --git a/resources/js/Components/ui/calendar/CalendarDateInput.vue b/resources/js/Components/ui/calendar/CalendarDateInput.vue index a8415756..42011362 100644 --- a/resources/js/Components/ui/calendar/CalendarDateInput.vue +++ b/resources/js/Components/ui/calendar/CalendarDateInput.vue @@ -9,7 +9,8 @@ import { Calendar } from '@/Components/ui/calendar'; import { CalendarIcon } from 'lucide-vue-next'; import { formatDateLocalized } from '@/packages/ui/src/utils/time'; import { parseDate } from '@internationalized/date'; -import { computed } from 'vue'; +import { computed, inject, type ComputedRef } from 'vue'; +import { type Organization } from '@/packages/api/src'; const model = defineModel(); const emit = defineEmits<{ @@ -27,6 +28,8 @@ const handleBlur = () => { const date = computed(() => { return model.value ? parseDate(model.value) : undefined; }); + +const organization = inject>('organization');