Skip to content

Commit

Permalink
[fix] Name the printed PDF
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
ponsfrilus committed Nov 15, 2024
1 parent 8187993 commit 559a652
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/responsable/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ export default function Page() {
</button>
<button
onClick={() => {
const date = new Date()
document.title=`rapportStage_${rapportStorage['internFirstName']}_${rapportStorage['internLastName']}_${date.toISOString().split('T')[0]}`
const date = new Date().toLocaleString('fr-FR', { month: 'long', year: 'numeric' }).replace(' ', '_')
document.title=`${rapportStorage['internFirstName']}_${rapportStorage['internLastName']}_Rapport_de_stage_EPFL_responsables_${date}`
window.print()
}}
className="
Expand Down Expand Up @@ -871,4 +871,4 @@ export default function Page() {
</div>
)
)
}
}

0 comments on commit 559a652

Please sign in to comment.