Poster Design: a withheld country's large-format cards say why, and are never drawn or printed

countrySheet.js now withholds the whole-India poster (WITHHELD,
sheetWithheld), and makeCountrySheet returns nothing for India. The three
large-format Styles cards use India as their sample, so they showed
"preview unavailable" and their print fell through to a stored poster
that does not exist. They now answer PosterWall's unsupported with
messages.countryPosterTooMany, in the reader's language: the card shows
that sentence instead of a preview, and a print opens only that notice.
The designs stay in the catalogue, so they return when India is no longer
withheld.
This commit is contained in:
Doxa Maps 2026-10-01 22:21:59 +00:00
parent 5226c8f4bc
commit c11d179d3d

View file

@ -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"