feat(heures) : sites en tags et désélectionnés par défaut dans le drawer d'export
- Affichage des sites sélectionnés en tags (display-tag) - Aucun site sélectionné à l'ouverture du drawer (prop initialSiteIds retirée) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
groupClass="w-full mt-2"
|
||||
label="Sites"
|
||||
display-select-all
|
||||
display-tag
|
||||
/>
|
||||
</div>
|
||||
|
||||
@@ -49,7 +50,6 @@ const props = defineProps<{
|
||||
modelValue: boolean
|
||||
sites: Site[]
|
||||
initialDate: string
|
||||
initialSiteIds: number[]
|
||||
isLoading?: boolean
|
||||
}>()
|
||||
|
||||
@@ -64,7 +64,7 @@ const drawerOpen = computed({
|
||||
})
|
||||
|
||||
const selectedDate = ref(props.initialDate)
|
||||
const selectedSites = ref<number[]>([...props.initialSiteIds])
|
||||
const selectedSites = ref<number[]>([])
|
||||
|
||||
const siteOptions = computed(() =>
|
||||
props.sites.map((site) => ({ label: site.name, value: site.id }))
|
||||
@@ -80,7 +80,7 @@ watch(
|
||||
(isOpen) => {
|
||||
if (isOpen) {
|
||||
selectedDate.value = props.initialDate
|
||||
selectedSites.value = [...props.initialSiteIds]
|
||||
selectedSites.value = []
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
v-model="isExportDrawerOpen"
|
||||
:sites="sites"
|
||||
:initial-date="selectedDate"
|
||||
:initial-site-ids="selectedSiteIds"
|
||||
:is-loading="isExporting"
|
||||
@submit="handleExport"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user