forked from MapComplete/MapComplete
Better OH viz
This commit is contained in:
parent
7e5e84b2f1
commit
6557c51493
4 changed files with 14 additions and 15 deletions
|
@ -196,6 +196,14 @@ export default class OpeningHoursVisualization extends UIElement {
|
|||
// Closed!
|
||||
const opensAtDate = oh.getNextChange();
|
||||
if(opensAtDate === undefined){
|
||||
const comm = oh.getComment();
|
||||
if(comm !== undefined){
|
||||
return new FixedUiElement(comm).SetClass("ohviz-closed").Render();
|
||||
}
|
||||
|
||||
if(oh.getState()){
|
||||
return Translations.t.general.opening_hours.open_24_7.SetClass("ohviz-closed").Render()
|
||||
}
|
||||
return Translations.t.general.opening_hours.closed_permanently.SetClass("ohviz-closed").Render()
|
||||
}
|
||||
const moment = `${opensAtDate.getDay()}/${opensAtDate.getMonth() + 1} ${OH.hhmm(opensAtDate.getHours(), opensAtDate.getMinutes())}`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue