6f9d19bda3
Auto Tag Develop / tag (push) Successful in 7s
## Résumé Ajoute un bouton **Exporter** (admin uniquement) à droite du titre « Heures » qui génère un **PDF d'une journée**, regroupé par site, reprenant les colonnes de la vue Jour **sans la colonne « Valider »**. - Drawer : champ date (préremplit la date affichée) + cases à cocher des sites (préselectionnées sur le filtre courant). - Portée identique à l'écran : non-conducteurs, sous contrat à la date, sites cochés (lignes vides incluses). - Jour/Nuit/Total incluent le crédit d'absence et le crédit virtuel férié. ## Implémentation - Back : `WorkHourDayExport` (ApiResource) + `WorkHourDayExportProvider`, endpoint `GET /work-hours/day-export?workDate=&siteIds=` (ROLE_ADMIN). - Calcul des cellules mutualisé via `YearlyHoursExportBuilder::buildDayRowsForEmployees` (source unique de vérité). - Gabarit `templates/work-hour-day-export/print.html.twig` (A4 portrait compact). - Front : `HoursDayExportDrawer.vue` + câblage dans `pages/hours.vue`. - Docs : `doc/hours-day-export.md`, `documentation-content.ts`, `CLAUDE.md`. ## Tests - Test unitaire `YearlyHoursDayRowsTest` ajouté. - Suite complète verte : 173 tests, 359 assertions. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #24 Co-authored-by: tristan <tristan@yuno.malio.fr> Co-committed-by: tristan <tristan@yuno.malio.fr>
57 lines
1.5 KiB
Vue
57 lines
1.5 KiB
Vue
<template>
|
|
<div v-if="modelValue" class="fixed inset-0 z-[60]">
|
|
<Transition name="drawer-backdrop">
|
|
<div class="absolute inset-0 bg-black/40" @click="close" />
|
|
</Transition>
|
|
<Transition name="drawer-panel">
|
|
<div class="absolute right-0 top-0 h-full w-full max-w-md bg-white shadow-xl flex flex-col">
|
|
<div class="shrink-0 flex items-center justify-between px-[20px] pt-8 pb-8">
|
|
<h2 class="text-[32px] font-semibold text-primary-500">
|
|
{{ title }}
|
|
</h2>
|
|
<button
|
|
type="button"
|
|
class="rounded-md p-1 text-primary-500 hover:text-secondary-500"
|
|
@click="close"
|
|
>
|
|
<Icon name="mdi:close" size="24"/>
|
|
</button>
|
|
</div>
|
|
<div class="min-h-0 flex-1 overflow-y-auto px-[20px] pb-4 pt-1">
|
|
<slot />
|
|
</div>
|
|
</div>
|
|
</Transition>
|
|
</div>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
const props = defineProps<{ modelValue: boolean; title?: string }>()
|
|
const emit = defineEmits<{ (e: 'update:modelValue', value: boolean): void }>()
|
|
|
|
const close = () => emit('update:modelValue', false)
|
|
</script>
|
|
|
|
<style scoped>
|
|
.drawer-backdrop-enter-active,
|
|
.drawer-backdrop-leave-active {
|
|
transition: opacity 0.2s ease;
|
|
}
|
|
|
|
.drawer-backdrop-enter-from,
|
|
.drawer-backdrop-leave-to {
|
|
opacity: 0;
|
|
}
|
|
|
|
.drawer-panel-enter-active,
|
|
.drawer-panel-leave-active {
|
|
transition: transform 0.2s ease, opacity 0.2s ease;
|
|
}
|
|
|
|
.drawer-panel-enter-from,
|
|
.drawer-panel-leave-to {
|
|
transform: translateX(100%);
|
|
opacity: 0;
|
|
}
|
|
</style>
|