Fix opening hours input element
This commit is contained in:
parent
94f9a0de56
commit
64ec06bfc8
19 changed files with 643 additions and 599 deletions
27
test.ts
27
test.ts
|
@ -3,21 +3,36 @@ import SpecialVisualizations from "./UI/SpecialVisualizations";
|
|||
import State from "./State";
|
||||
import Combine from "./UI/Base/Combine";
|
||||
import {FixedUiElement} from "./UI/Base/FixedUiElement";
|
||||
import OpeningHoursVisualization from "./UI/OpeningHours/OpeningHoursVisualization";
|
||||
import OpeningHoursPickerTable from "./UI/OpeningHours/OpeningHoursPickerTable";
|
||||
import OpeningHoursPicker from "./UI/OpeningHours/OpeningHoursPicker";
|
||||
import {OH, OpeningHour} from "./UI/OpeningHours/OpeningHours";
|
||||
import {VariableUiElement} from "./UI/Base/VariableUIElement";
|
||||
|
||||
|
||||
const tagsSource = new UIEventSource({
|
||||
id:'id',
|
||||
name:'name',
|
||||
surface:'asphalt',
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
surface: 'asphalt',
|
||||
image: "https://i.imgur.com/kX3rl3v.jpg",
|
||||
"image:1": "https://i.imgur.com/oHAJqMB.jpg",
|
||||
// "opening_hours":"mo-fr 09:00-18:00",
|
||||
_country:"be",
|
||||
"opening_hours": "mo-fr 09:00-18:00",
|
||||
_country: "be",
|
||||
})
|
||||
|
||||
const state = new State(undefined)
|
||||
State.state = state
|
||||
|
||||
const ohData = new UIEventSource<OpeningHour[]>([{
|
||||
weekday: 1,
|
||||
startHour: 10,
|
||||
startMinutes: 0
|
||||
, endHour: 12,
|
||||
endMinutes: 0
|
||||
}])
|
||||
new OpeningHoursPicker(ohData).AttachTo("maindiv")
|
||||
new VariableUiElement(ohData.map(OH.ToString)).AttachTo("extradiv")
|
||||
/*
|
||||
const allSpecials = SpecialVisualizations.specialVisualizations.map(spec => {
|
||||
try{
|
||||
|
||||
|
@ -28,4 +43,4 @@ const allSpecials = SpecialVisualizations.specialVisualizations.map(spec => {
|
|||
return new FixedUiElement("Could not construct "+spec.funcName+" due to "+e).SetClass("alert")
|
||||
}
|
||||
})
|
||||
new Combine(allSpecials).AttachTo("maindiv")
|
||||
new Combine(allSpecials).AttachTo("maindiv")*/
|
Loading…
Add table
Add a link
Reference in a new issue