From 7744c82a076c97c33fd0d94eeebb7f4ebac79c78 Mon Sep 17 00:00:00 2001 From: tristan Date: Thu, 11 Jun 2026 12:02:13 +0200 Subject: [PATCH] feat(night-contingent) : option export Contingent H.nuit (liste employes) --- frontend/pages/employees/index.vue | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/frontend/pages/employees/index.vue b/frontend/pages/employees/index.vue index 861f546..d79eb47 100644 --- a/frontend/pages/employees/index.vue +++ b/frontend/pages/employees/index.vue @@ -230,6 +230,16 @@ /> +
+ +
+
('') +const exportChoice = ref<'leave-recap' | 'salary-recap' | 'yearly-hours' | 'night-contingent' | ''>('') const exportYear = ref(new Date().getFullYear()) const exportMonth = ref(new Date().getMonth() + 1) const exportSalaryMonth = ref(`${new Date().getFullYear()}-${String(new Date().getMonth() + 1).padStart(2, '0')}`) @@ -272,7 +282,8 @@ const exportSalaryMonth = ref(`${new Date().getFullYear()}-${String(new const exportTypeOptions = [ { label: 'Récap. congés', value: 'leave-recap' }, { label: 'Récap. salaire', value: 'salary-recap' }, - { label: 'Heures annuelles', value: 'yearly-hours' } + { label: 'Heures annuelles', value: 'yearly-hours' }, + { label: 'Contingent H.nuit', value: 'night-contingent' } ] const exportYearOptions = computed(() => { const current = new Date().getFullYear() @@ -301,11 +312,14 @@ const isExportValid = computed(() => { if (exportChoice.value === 'yearly-hours') { return exportYear.value > 0 && exportMonth.value !== '' } + if (exportChoice.value === 'night-contingent') { + return exportYear.value > 0 + } return true }) const onExportChoiceChange = (value: string | number | null) => { - exportChoice.value = (value === null ? '' : String(value)) as 'leave-recap' | 'salary-recap' | 'yearly-hours' | '' + exportChoice.value = (value === null ? '' : String(value)) as 'leave-recap' | 'salary-recap' | 'yearly-hours' | 'night-contingent' | '' } const { printPdf } = usePdfPrinter() const sitesInitialized = ref(false) @@ -618,6 +632,8 @@ const handleExportValidate = async () => { await printPdf(`/salary-recap/print?month=${exportSalaryMonth.value}`) } else if (choice === 'yearly-hours') { await printPdf(`/yearly-hours/print-all?year=${exportYear.value}&month=${exportMonth.value}`) + } else if (choice === 'night-contingent') { + await printPdf(`/night-hours-contingent/print?year=${exportYear.value}`) } }