Skip to content

Commit 485db77

Browse files
Merge pull request #7996 from carlobeltrame/improve-pdf-filenames
Improve generated pdf names
2 parents 91a69eb + 7a801aa commit 485db77

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

frontend/src/components/activity/ScheduleEntry.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ export default {
409409
return {
410410
camp: this.camp._meta.self,
411411
language: this.$store.state.lang.language,
412-
documentName: this.activity.title + '.pdf',
412+
documentName: this.activity.title,
413413
contents: [
414414
{
415415
type: 'Activity',

frontend/src/views/camp/CampProgram.vue

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ import {
154154
transformValuesToHalId,
155155
} from '@/helpers/querySyncHelper.js'
156156
import { filterMatchScheduleEntry } from '@/common/helpers/filterMatchScheduleEntry.js'
157+
import campShortTitle from '@/common/helpers/campShortTitle.js'
157158
158159
export default {
159160
name: 'CampProgram',
@@ -206,7 +207,7 @@ export default {
206207
return {
207208
camp: this.camp._meta.self,
208209
language: this.$store.state.lang.language,
209-
documentName: this.camp.title + '-picasso.pdf',
210+
documentName: campShortTitle(this.camp) + '-' + this.period.description,
210211
contents: [
211212
{
212213
type: 'Picasso',

frontend/src/views/camp/Story.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ import DownloadClientPdf from '@/components/print/print-client/DownloadClientPdf
3939
import LockButton from '@/components/generic/LockButton.vue'
4040
import LockUnlockListItem from '@/components/generic/LockUnlockListItem.vue'
4141
import PeriodSwitcher from '@/components/program/PeriodSwitcher.vue'
42+
import campShortTitle from '@/common/helpers/campShortTitle.js'
4243
4344
export default {
4445
name: 'Story',
@@ -66,7 +67,8 @@ export default {
6667
return {
6768
camp: this.camp._meta.self,
6869
language: this.$store.state.lang.language,
69-
documentName: this.camp.title + '-StorySummary.pdf',
70+
documentName:
71+
campShortTitle(this.camp) + '-' + this.$tc('views.camp.story.title'),
7072
contents: [
7173
{
7274
type: 'Story',

0 commit comments

Comments
 (0)