From a374a5247466a00c91451471593876ee11e93bfa Mon Sep 17 00:00:00 2001 From: Gregor Vostrak Date: Wed, 9 Oct 2024 01:47:55 +0200 Subject: [PATCH] add select and deselect all on time and detailed reporting view --- .../css/filament/admin/tailwind.config.js | 4 +-- .../TimeEntry/TimeEntryMassActionRow.vue | 27 ++++++++++++++++--- resources/js/Pages/ReportingDetailed.vue | 7 ++++- resources/js/Pages/Time.vue | 3 +++ .../js/packages/ui/src/Input/Checkbox.vue | 2 +- .../js/packages/ui/src/Input/InputLabel.vue | 12 ++++++--- vite.config.js | 6 ++++- 7 files changed, 49 insertions(+), 12 deletions(-) diff --git a/resources/css/filament/admin/tailwind.config.js b/resources/css/filament/admin/tailwind.config.js index 67de966a..68171b31 100644 --- a/resources/css/filament/admin/tailwind.config.js +++ b/resources/css/filament/admin/tailwind.config.js @@ -1,4 +1,4 @@ -import preset from '../../../../vendor/filament/filament/tailwind.config.preset' +import preset from '../../../../vendor/filament/filament/tailwind.config.preset'; export default { presets: [preset], @@ -7,4 +7,4 @@ export default { './resources/views/filament/**/*.blade.php', './vendor/filament/**/*.blade.php', ], -} +}; diff --git a/resources/js/Components/Common/TimeEntry/TimeEntryMassActionRow.vue b/resources/js/Components/Common/TimeEntry/TimeEntryMassActionRow.vue index ff3aafd2..f8913db5 100644 --- a/resources/js/Components/Common/TimeEntry/TimeEntryMassActionRow.vue +++ b/resources/js/Components/Common/TimeEntry/TimeEntryMassActionRow.vue @@ -5,15 +5,19 @@ import TimeEntryMassUpdateModal from '@/Components/Common/TimeEntry/TimeEntryMas import type { TimeEntry } from '@/packages/api/src'; import { ref } from 'vue'; import { twMerge } from 'tailwind-merge'; +import { Checkbox, InputLabel } from '@/packages/ui/src'; const props = defineProps<{ selectedTimeEntries: TimeEntry[]; deleteSelected: () => void; class?: string; + allSelected: boolean; }>(); const emit = defineEmits<{ submit: []; + selectAll: []; + unselectAll: []; }>(); const showMassUpdateModal = ref(false); @@ -25,14 +29,31 @@ const showMassUpdateModal = ref(false); @submit="emit('submit')" v-model:show="showMassUpdateModal"> -
{{ selectedTimeEntries.length }} selected
+ + + + {{ selectedTimeEntries.length }} selected + + Select All