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 @@
/>
+
+ { if (v !== null) exportYear = Number(v) }"
+ />
+
+
('')
+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}`)
}
}