diff --git a/plugin-designs/poster-design/poster-styles.vue b/plugin-designs/poster-design/poster-styles.vue index e27a14009..0b6961441 100644 --- a/plugin-designs/poster-design/poster-styles.vue +++ b/plugin-designs/poster-design/poster-styles.vue @@ -22,7 +22,7 @@ import { createPeopleGroupRecords } from '@map/lists/peopleGroupRecords.js' import { getApiBaseUrl } from '@map/api/apiBaseUrl.js' import { getRuntimeLocale, detectLocale } from '@map/i18n/index.js' import countryData from '@map/data/country-posters.json' -import { makeCountrySheet } from '@map/packet/countrySheet.js' +import { makeCountrySheet, sheetWithheld } from '@map/packet/countrySheet.js' import { loadPacketStrings } from '@map/packet/packetStrings.js' import { firstPageImage } from './src/pageThumb.js' import { panelsSvgUrl } from './src/panelsSvg.js' @@ -54,6 +54,14 @@ const groupBy = (item) => t(FAMILY_KEYS[byName.get(item.id)?.family] || FAMILY_K // ── drawing a configuration from the library ────────────────────────────────────────────────── const countryById = (id) => (countryData.countries || []).find((c) => c.id === id) +// A design whose sample country is WITHHELD (countrySheet.js: the whole-India poster, for now) shows this sentence on its +// card and is never drawn or printed: PosterWall answers `unsupported` before it draws a preview or starts a print. The +// designs stay in the catalogue, so they reappear the day the country is no longer withheld. +const withheld = (item) => { + const c = byName.get(item.id) + const sample = c && c.sample ? countryById(c.sample) : null + return sample && sheetWithheld(sample) ? t('messages.countryPosterTooMany') : null +} const sample = countryById(SAMPLE_COUNTRY_ID) const recordsFor = createPeopleGroupRecords({ apiBase: () => profileConfig.value?.apiBaseUrl || getApiBaseUrl(), @@ -192,6 +200,7 @@ useShadowStyles(` :collapsible="true" :header-action="{ labelKey: 'posterDesign.showFullDetails', ariaKey: 'posterDesign.showFullDetailsAria' }" :preview-src="previewSrc" + :unsupported="withheld" :sheet="sheet" :hide-prayer-list-when-soon="true" download-prefix="doxa-poster-design"