diff --git a/common/locales/de.json b/common/locales/de.json index 22fdfeeebe..2f2afc70a8 100644 --- a/common/locales/de.json +++ b/common/locales/de.json @@ -1,8 +1,8 @@ { "components": { - "story": { - "storyDay": { - "noStory": "Die Blöcke an diesem Tag enthalten keinen roten Faden." + "summary": { + "summaryDay": { + "noContent": "Die Blöcke an diesem Tag enthalten keine '{contentType}' Inhalte." } } }, @@ -244,6 +244,9 @@ "shortScheduleEntryDescription": "Tag\u202f{dayNumber} {startTime}" }, "print": { + "config": { + "periods": "Lagerabschnitt(e)" + }, "cover": { "title": "Titelseite" }, @@ -259,8 +262,13 @@ "program": { "title": "Detailprogramm" }, - "story": { - "title": "Roter Faden" + "summary": { + "safetyConsiderations": { + "title": "Sicherheitsüberlegungen" + }, + "storycontext": { + "title": "Roter Faden" + } }, "toc": { "title": "Inhaltsverzeichnis" diff --git a/common/locales/en.json b/common/locales/en.json index 302b326ea9..2f33b5a304 100644 --- a/common/locales/en.json +++ b/common/locales/en.json @@ -1,8 +1,8 @@ { "components": { - "story": { - "storyDay": { - "noStory": "The activities on this day do not contain any story content." + "summary": { + "summaryDay": { + "noContent": "The activities on this day do not contain any {contentType} content." } } }, @@ -251,6 +251,9 @@ "shortScheduleEntryDescription": "day {dayNumber} {startTime}" }, "print": { + "config": { + "periods": "Period(s)" + }, "cover": { "title": "Cover page" }, @@ -266,8 +269,13 @@ "program": { "title": "Program" }, - "story": { - "title": "Storyline" + "summary": { + "safetyConsiderations": { + "title": "Safety considerations" + }, + "storycontext": { + "title": "Story" + } }, "toc": { "title": "Table of contents" diff --git a/common/locales/fr.json b/common/locales/fr.json index 803341e7bd..893e313ad2 100644 --- a/common/locales/fr.json +++ b/common/locales/fr.json @@ -1,8 +1,8 @@ { "components": { - "story": { - "storyDay": { - "noStory": "Aucun file rouge trouvé ce jour-là..." + "summary": { + "summaryDay": { + "noContent": "Aucun {contentType} trouvé ce jour-là..." } } }, @@ -231,6 +231,9 @@ } }, "print": { + "config": { + "periods": "Période(s) du camp" + }, "cover": { "title": "Page de couverture" }, @@ -246,8 +249,13 @@ "program": { "title": "Programme" }, - "story": { - "title": "Histoire" + "summary": { + "safetyConsiderations": { + "title": "Considérations de sécurité" + }, + "storycontext": { + "title": "Histoire" + } }, "toc": { "title": "Table des matières" diff --git a/common/locales/it.json b/common/locales/it.json index 799d9086dc..ea6c611789 100644 --- a/common/locales/it.json +++ b/common/locales/it.json @@ -1,8 +1,8 @@ { "components": { - "story": { - "storyDay": { - "noStory": "Nessun contenuto di storia trovato in questo giorno..." + "summary": { + "summaryDay": { + "noContent": "Nessun contenuto '{contentType}' trovato in questo giorno..." } } }, @@ -221,6 +221,9 @@ } }, "print": { + "config": { + "periods": "Sezione/i portante/i" + }, "cover": { "title": "Pagina di copertina" }, @@ -230,8 +233,13 @@ "program": { "title": "Programma" }, - "story": { - "title": "Trama" + "summary": { + "safetyConsiderations": { + "title": "Considerazioni sulla sicurezza" + }, + "storycontext": { + "title": "Storia" + } }, "toc": { "title": "Indice dei contenuti" diff --git a/frontend/eslint.config.mjs b/frontend/eslint.config.mjs index cd3bfc8a0f..437b437b7f 100644 --- a/frontend/eslint.config.mjs +++ b/frontend/eslint.config.mjs @@ -82,7 +82,7 @@ export default [ 'error', { ignoreKeysRegex: - '^(global|entity|contentNode\\.[a-z][a-zA-Z]+|print\\.(global|activity|cover|picasso|program|story|toc))\\..+', + '^(global|entity|contentNode\\.[a-z][a-zA-Z]+|print\\.(global|activity|cover|picasso|program|config|summary|toc))\\..+', translationKeyPropRegex: '[a-zA-Z0-9]-i18n-key$', }, ], diff --git a/frontend/src/components/print/PrintConfigurator.vue b/frontend/src/components/print/PrintConfigurator.vue index a72c3d04fa..bc4091fc53 100644 --- a/frontend/src/components/print/PrintConfigurator.vue +++ b/frontend/src/components/print/PrintConfigurator.vue @@ -100,7 +100,7 @@ import PrintPreviewNuxt from './print-nuxt/PrintPreviewNuxt.vue' import Draggable from 'vuedraggable' import CoverConfig from './config/CoverConfig.vue' import PicassoConfig from './config/PicassoConfig.vue' -import StoryConfig from './config/StoryConfig.vue' +import SummaryConfig from './config/SummaryConfig.vue' import ProgramConfig from './config/ProgramConfig.vue' import ActivityConfig from './config/ActivityConfig.vue' import TocConfig from './config/TocConfig.vue' @@ -112,6 +112,8 @@ import { getEnv } from '@/environment.js' import cloneDeep from 'lodash/cloneDeep' import VueI18n from '../../plugins/i18n/index.js' import repairConfig from './repairPrintConfig.js' +import StoryConfig from '@/components/print/config/StoryConfig.vue' +import SafetyConsiderationsConfig from '@/components/print/config/SafetyConsiderationsConfig.vue' import campShortTitle from '@/common/helpers/campShortTitle.js' export default { @@ -126,7 +128,7 @@ export default { PrintPreviewNuxt, CoverConfig, PicassoConfig, - StoryConfig, + SummaryConfig, ProgramConfig, ActivityConfig, TocConfig, @@ -143,6 +145,7 @@ export default { Cover: CoverConfig, Picasso: PicassoConfig, Story: StoryConfig, + SafetyConsiderations: SafetyConsiderationsConfig, Program: ProgramConfig, Activity: ActivityConfig, Toc: TocConfig, @@ -209,6 +212,7 @@ export default { type: 'Story', options: { periods: [period._meta.self], + contentType: 'Storycontext', }, }) contents.push({ diff --git a/frontend/src/components/print/__tests__/repairPrintConfig.spec.js b/frontend/src/components/print/__tests__/repairPrintConfig.spec.js index 9b8ecd272e..c78b3f84a6 100644 --- a/frontend/src/components/print/__tests__/repairPrintConfig.spec.js +++ b/frontend/src/components/print/__tests__/repairPrintConfig.spec.js @@ -4,6 +4,7 @@ import ActivityConfig from '../config/ActivityConfig.vue' import CoverConfig from '../config/CoverConfig.vue' import ProgramConfig from '../config/ProgramConfig.vue' import StoryConfig from '../config/StoryConfig.vue' +import SafetyConsiderationsConfig from '../config/SafetyConsiderationsConfig.vue' import TocConfig from '../config/TocConfig.vue' describe('repairConfig', () => { @@ -25,6 +26,7 @@ describe('repairConfig', () => { CoverConfig, PicassoConfig, ProgramConfig, + SafetyConsiderationsConfig, StoryConfig, TocConfig, ].map((component) => [component.name.replace(/Config$/, ''), component.repairConfig]) @@ -840,7 +842,7 @@ describe('repairConfig', () => { contents: [ { type: 'Story', - options: { periods: [] }, + options: { periods: [], contentType: 'Storycontext' }, }, ], documentName: 'test camp', @@ -855,7 +857,7 @@ describe('repairConfig', () => { contents: [ { type: 'Story', - options: { periods: [] }, + options: { periods: [], contentType: 'Storycontext' }, }, ], documentName: 'test camp', @@ -871,7 +873,7 @@ describe('repairConfig', () => { contents: [ { type: 'Story', - options: { periods: [] }, + options: { periods: [], contentType: 'Storycontext' }, }, ], documentName: 'test camp', @@ -888,6 +890,7 @@ describe('repairConfig', () => { type: 'Story', options: { periods: ['/periods/11112222', '/periods/1a2b3c4d'], + contentType: 'Storycontext', }, }, ], @@ -904,7 +907,184 @@ describe('repairConfig', () => { contents: [ { type: 'Story', - options: { periods: ['/periods/1a2b3c4d'] }, + options: { + periods: ['/periods/1a2b3c4d'], + contentType: 'Storycontext', + }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + }) + }) + + test('uses known contentType', async () => { + // given + const config = { + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'Story', + options: { + periods: ['/periods/1a2b3c4d'], + contentType: 'Storyboard', + }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + } + + // when + const result = repairConfig(config, ...args) + + // then + expect(result).toEqual({ + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'Story', + options: { + periods: ['/periods/1a2b3c4d'], + contentType: 'Storycontext', + }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + }) + }) + }) + + describe('safetyConsiderations', () => { + test('adds missing options', async () => { + // given + const config = { + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + }, + ], + documentName: 'test camp', + language: 'en-GB', + } + + // when + const result = repairConfig(config, ...args) + + // then + expect(result).toEqual({ + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + options: { periods: [], contentType: 'SafetyConsiderations' }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + }) + }) + + test('allows empty periods', async () => { + // given + const config = { + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + options: { periods: [], contentType: 'SafetyConsiderations' }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + } + + // when + const result = repairConfig(config, ...args) + + // then + expect(result).toEqual({ + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + options: { periods: [], contentType: 'SafetyConsiderations' }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + }) + }) + + test('filters out unknown periods', async () => { + // given + const config = { + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + options: { + periods: ['/periods/11112222', '/periods/1a2b3c4d'], + contentType: 'SafetyConsiderations', + }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + } + + // when + const result = repairConfig(config, ...args) + + // then + expect(result).toEqual({ + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + options: { + periods: ['/periods/1a2b3c4d'], + contentType: 'SafetyConsiderations', + }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + }) + }) + + test('uses known contentType', async () => { + // given + const config = { + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + options: { + periods: ['/periods/1a2b3c4d'], + contentType: 'Storyboard', + }, + }, + ], + documentName: 'test camp', + language: 'en-GB', + } + + // when + const result = repairConfig(config, ...args) + + // then + expect(result).toEqual({ + camp: '/camps/1a2b3c4d', + contents: [ + { + type: 'SafetyConsiderations', + options: { + periods: ['/periods/1a2b3c4d'], + contentType: 'SafetyConsiderations', + }, }, ], documentName: 'test camp', diff --git a/frontend/src/components/print/config/PicassoConfig.vue b/frontend/src/components/print/config/PicassoConfig.vue index 49e767cc05..9f49c0961e 100644 --- a/frontend/src/components/print/config/PicassoConfig.vue +++ b/frontend/src/components/print/config/PicassoConfig.vue @@ -2,7 +2,7 @@
+
+ +
+ + + diff --git a/frontend/src/components/print/config/StoryConfig.vue b/frontend/src/components/print/config/StoryConfig.vue index 6576b5cc6c..74af6dc76a 100644 --- a/frontend/src/components/print/config/StoryConfig.vue +++ b/frontend/src/components/print/config/StoryConfig.vue @@ -3,7 +3,7 @@ diff --git a/frontend/src/locales/de.json b/frontend/src/locales/de.json index 4aa9021392..f2395d1b3f 100644 --- a/frontend/src/locales/de.json +++ b/frontend/src/locales/de.json @@ -314,11 +314,7 @@ "periods": "Lagerabschnitt(e)" }, "programConfig": { - "dayOverview": "Tagesübersicht", - "periods": "Lagerabschnitt(e)" - }, - "storyConfig": { - "periods": "Lagerabschnitt(e)" + "dayOverview": "Tagesübersicht" } }, "documents": { @@ -354,6 +350,7 @@ "Cover": "Titelseite", "Picasso": "Grobprogramm", "Program": "Detailprogramm", + "SafetyConsiderations": "Sicherheits­überlegungen", "Story": "Roter Faden", "Toc": "Inhaltsverzeichnis" } diff --git a/frontend/src/locales/en.json b/frontend/src/locales/en.json index 39a95331b5..27f7c52dc0 100644 --- a/frontend/src/locales/en.json +++ b/frontend/src/locales/en.json @@ -309,15 +309,10 @@ "activity": "Activity" }, "picassoConfig": { - "orientation": "Page layout", - "periods": "Period(s)" + "orientation": "Page layout" }, "programConfig": { - "dayOverview": "print day overview", - "periods": "Period(s)" - }, - "storyConfig": { - "periods": "Period(s)" + "dayOverview": "print day overview" } }, "documents": { @@ -353,7 +348,8 @@ "Cover": "Cover page", "Picasso": "Picasso", "Program": "Program", - "Story": "Story summary", + "SafetyConsiderations": "Safety considerations", + "Story": "Story", "Toc": "Table of contents" } }, diff --git a/frontend/src/locales/fr.json b/frontend/src/locales/fr.json index d1ce0a9d15..afeb1d59d1 100644 --- a/frontend/src/locales/fr.json +++ b/frontend/src/locales/fr.json @@ -289,15 +289,10 @@ "activity": "Activité" }, "picassoConfig": { - "orientation": "Mise en page", - "periods": "Période(s) du camp" + "orientation": "Mise en page" }, "programConfig": { - "dayOverview": "Aperçu des jours", - "periods": "Période(s) du camp" - }, - "storyConfig": { - "periods": "Période(s) du camp" + "dayOverview": "Aperçu des jours" } }, "documents": { @@ -333,6 +328,7 @@ "Cover": "Page de couverture", "Picasso": "Picasso", "Program": "Programme", + "SafetyConsiderations": "Considérations de sécurité", "Story": "Histoire", "Toc": "Table des matières" } diff --git a/frontend/src/locales/it.json b/frontend/src/locales/it.json index 398aed55aa..e994a0db59 100644 --- a/frontend/src/locales/it.json +++ b/frontend/src/locales/it.json @@ -281,15 +281,10 @@ "activity": "Attività" }, "picassoConfig": { - "orientation": "Layout della pagina", - "periods": "Sezione/i portante/i" + "orientation": "Layout della pagina" }, "programConfig": { - "dayOverview": "Panoramica della giornata di stampa", - "periods": "Sezione/i portante/i" - }, - "storyConfig": { - "periods": "Sezione/i portante/i" + "dayOverview": "Panoramica della giornata di stampa" } }, "documents": { @@ -325,6 +320,7 @@ "Cover": "Pagina di copertina", "Picasso": "Picasso", "Program": "Programma", + "SafetyConsiderations": "Considerazioni sulla sicurezza", "Story": "Riassunto della storia", "Toc": "Indice dei contenuti" } diff --git a/frontend/src/locales/rm.json b/frontend/src/locales/rm.json index ae73401546..489707cbe2 100644 --- a/frontend/src/locales/rm.json +++ b/frontend/src/locales/rm.json @@ -245,15 +245,10 @@ "activity": "Activitad" }, "picassoConfig": { - "orientation": "Layout da la pagina", - "periods": "Part(s) dal champ" + "orientation": "Layout da la pagina" }, "programConfig": { - "dayOverview": "Survista dal di", - "periods": "Part(s) dal champ" - }, - "storyConfig": { - "periods": "Part(s) dal champ" + "dayOverview": "Survista dal di" } }, "documents": { diff --git a/pdf/eslint.config.mjs b/pdf/eslint.config.mjs index f3a56433b8..8e152813d3 100644 --- a/pdf/eslint.config.mjs +++ b/pdf/eslint.config.mjs @@ -77,7 +77,7 @@ export default [ 'error', { ignoreKeysRegex: - '^(global|entity|contentNode\\.[a-z][a-zA-Z]+|print\\.(global|activity|cover|picasso|program|story|toc))\\..+', + '^(global|entity|contentNode\\.[a-z][a-zA-Z]+|print\\.(global|activity|cover|picasso|program|config|summary|toc))\\..+', translationKeyPropRegex: '[a-zA-Z0-9]-i18n-key$', }, ], diff --git a/pdf/src/CampPrint.vue b/pdf/src/CampPrint.vue index 23bd137b56..fbca30e02f 100644 --- a/pdf/src/CampPrint.vue +++ b/pdf/src/CampPrint.vue @@ -23,7 +23,8 @@ import InterDisplayBoldItalic from '@/assets/fonts/Inter/InterDisplay-BoldItalic import Cover from '@/campPrint/cover/Cover.vue' import TableOfContents from '@/campPrint/tableOfContents/TableOfContents.vue' import Picasso from '@/campPrint/picasso/Picasso.vue' -import Story from '@/campPrint/story/Story.vue' +import Story from '@/campPrint/summary/Story.vue' +import SafetyConsiderations from '@/campPrint/summary/SafetyConsiderations.vue' import Program from '@/campPrint/program/Program.vue' import Activity from '@/campPrint/activity/Activity.vue' import { wordHyphenation } from '@react-pdf/textkit' @@ -45,6 +46,7 @@ export default { Program, Activity, Story, + SafetyConsiderations, } }, }, diff --git a/pdf/src/campPrint/story/StoryPeriod.vue b/pdf/src/campPrint/story/StoryPeriod.vue deleted file mode 100644 index 5389c95f91..0000000000 --- a/pdf/src/campPrint/story/StoryPeriod.vue +++ /dev/null @@ -1,35 +0,0 @@ - - - -.story-period-title { - font-size: 10pt; - font-weight: bold; - text-align: center; -} - diff --git a/pdf/src/campPrint/summary/SafetyConsiderations.vue b/pdf/src/campPrint/summary/SafetyConsiderations.vue new file mode 100644 index 0000000000..ff329c87ef --- /dev/null +++ b/pdf/src/campPrint/summary/SafetyConsiderations.vue @@ -0,0 +1,29 @@ + + diff --git a/pdf/src/campPrint/story/Story.vue b/pdf/src/campPrint/summary/Story.vue similarity index 65% rename from pdf/src/campPrint/story/Story.vue rename to pdf/src/campPrint/summary/Story.vue index 30573dce91..1c061eebf1 100644 --- a/pdf/src/campPrint/story/Story.vue +++ b/pdf/src/campPrint/summary/Story.vue @@ -1,15 +1,20 @@ - - diff --git a/pdf/src/campPrint/story/StoryDay.vue b/pdf/src/campPrint/summary/SummaryDay.vue similarity index 74% rename from pdf/src/campPrint/story/StoryDay.vue rename to pdf/src/campPrint/summary/SummaryDay.vue index e3645d5c08..cfa4179f3e 100644 --- a/pdf/src/campPrint/story/StoryDay.vue +++ b/pdf/src/campPrint/summary/SummaryDay.vue @@ -1,11 +1,11 @@