Autoload OH if country code is not yet loaded

This commit is contained in:
Pieter Vander Vennet 2020-10-11 22:44:58 +02:00
parent c9478c100a
commit feab5a19b3
4 changed files with 19 additions and 5 deletions

View file

@ -5,10 +5,11 @@ import {UIEventSource} from "./Logic/UIEventSource";
import OpeningHoursVisualization from "./UI/OhVisualization";
const oh = "Tu-Fr 09:00-17:00 'as usual'; mo off 'yyy'; su off 'xxx'"
new OpeningHoursVisualization(new UIEventSource<any>({opening_hours:oh}), 'opening_hours').AttachTo('maindiv')
const tags = new UIEventSource<any>({opening_hours:oh});
new OpeningHoursVisualization(tags, 'opening_hours').AttachTo('maindiv')
window.setTimeout(() => {tags.data._country = "be"; }, 5000)
/*/