forked from MapComplete/MapComplete
Themes(sauna): refactor 'sauna_at_leisure' to contain all sauna relevant questions and 'layers/sauna.json' to contain only related questions; include 'sauna_at_leisure' in 'hotels' and 'beauty shops'; add beauty shop types
This commit is contained in:
parent
ccbbba5628
commit
c701247066
8 changed files with 452 additions and 174 deletions
|
@ -248,6 +248,10 @@ class PresetTypeSelect extends SpecialVisualizationSvelte {
|
|||
layer: LayerConfig,
|
||||
): SvelteUIElement {
|
||||
const t = Translations.t.preset_type
|
||||
if(layer._basedOn !== layer.id){
|
||||
console.warn("Trying to use the _original_ layer")
|
||||
layer = state.theme.layers.find(l => l.id === layer._basedOn) ?? layer
|
||||
}
|
||||
const question: QuestionableTagRenderingConfigJson = {
|
||||
id: layer.id + "-type",
|
||||
question: t.question.translations,
|
||||
|
@ -260,6 +264,10 @@ class PresetTypeSelect extends SpecialVisualizationSvelte {
|
|||
}).translations,
|
||||
})),
|
||||
}
|
||||
if(question.mappings.length === 0){
|
||||
console.error("No mappings for preset_type_select, something went wrong")
|
||||
return undefined
|
||||
}
|
||||
const config = new TagRenderingConfig(question)
|
||||
return new SvelteUIElement(TagRenderingEditable, {
|
||||
config,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue