Update src/client/types/wrapper.ts
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
sora-ext 2025-03-10 17:25:09 +01:00
parent 2ddc4a113c
commit e547df866f

View File

@ -61,6 +61,9 @@ class journey_wrapper {
day_sel(idx: number): void { day_sel(idx: number): void {
this.sel_day = idx; this.sel_day = idx;
} }
day_count(): number {
return this.leg_len();
}
day_next() { day_next() {
this.sel_day += 1 this.sel_day += 1
if (this.sel_day > this.leg_len() - 1) { if (this.sel_day > this.leg_len() - 1) {
@ -151,6 +154,16 @@ class journey_wrapper {
} }
} }
} }
import_data(v: any) {
this.data = Object.assign({}, v);
this.data.main.forEach((e) => {
if (e.date_range) {
e.date_range[0] = new Date(e.date_range[0]);
e.date_range[1] = new Date(e.date_range[1]);
}
});
}
} }
export default journey_wrapper; export default journey_wrapper;