forked from MapComplete/MapComplete
Fix: fix validation of question input; remove some obsolete logging; stabilize output of generate:translations wrt newlines
This commit is contained in:
parent
755f905c36
commit
1f39ba9ab5
26 changed files with 7328 additions and 71 deletions
|
@ -498,7 +498,7 @@ export class OH {
|
|||
lat: tags._lat,
|
||||
lon: tags._lon,
|
||||
address: {
|
||||
country_code: tags._country.toLowerCase(),
|
||||
country_code: tags._country?.toLowerCase(),
|
||||
state: undefined,
|
||||
},
|
||||
},
|
||||
|
|
|
@ -10,6 +10,7 @@ import { VariableUiElement } from "../Base/VariableUIElement"
|
|||
import Table from "../Base/Table"
|
||||
import { Translation } from "../i18n/Translation"
|
||||
import { OsmConnection } from "../../Logic/Osm/OsmConnection"
|
||||
import Loading from "../Base/Loading";
|
||||
|
||||
export default class OpeningHoursVisualization extends Toggle {
|
||||
private static readonly weekdays: Translation[] = [
|
||||
|
@ -29,6 +30,7 @@ export default class OpeningHoursVisualization extends Toggle {
|
|||
prefix = "",
|
||||
postfix = ""
|
||||
) {
|
||||
const country = tags.map(tags => tags._country)
|
||||
const ohTable = new VariableUiElement(
|
||||
tags
|
||||
.map((tags) => {
|
||||
|
@ -66,12 +68,12 @@ export default class OpeningHoursVisualization extends Toggle {
|
|||
),
|
||||
])
|
||||
}
|
||||
})
|
||||
}, [country])
|
||||
)
|
||||
|
||||
super(
|
||||
ohTable,
|
||||
Translations.t.general.opening_hours.loadingCountry.Clone(),
|
||||
new Loading(Translations.t.general.opening_hours.loadingCountry),
|
||||
tags.map((tgs) => tgs._country !== undefined)
|
||||
)
|
||||
}
|
||||
|
@ -160,7 +162,7 @@ export default class OpeningHoursVisualization extends Toggle {
|
|||
const weekdayStyles = []
|
||||
for (let i = 0; i < 7; i++) {
|
||||
const day = OpeningHoursVisualization.weekdays[i].Clone()
|
||||
day.SetClass("w-full h-full block")
|
||||
day.SetClass("w-full h-full flex")
|
||||
|
||||
const rangesForDay = ranges[i].map((range) =>
|
||||
OpeningHoursVisualization.CreateRangeElem(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue