Add placeholder for time column
This commit is contained in:
parent
3854bc0507
commit
01f29b80c5
|
@ -1,5 +1,6 @@
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
import { getMidnightTimestamp, isSameDay, sorter } from '../utils.js';
|
import { getMidnightTimestamp, isSameDay, sorter } from '../utils.js';
|
||||||
|
import { langs } from '../Schedule/constants.js';
|
||||||
|
|
||||||
export default function useScheduleTable({
|
export default function useScheduleTable({
|
||||||
eventTypeId,
|
eventTypeId,
|
||||||
|
@ -24,7 +25,12 @@ export default function useScheduleTable({
|
||||||
void(days);
|
void(days);
|
||||||
void(hallSlots);
|
void(hallSlots);
|
||||||
|
|
||||||
const header = filteredHalls;
|
const header = [{
|
||||||
|
id: 0,
|
||||||
|
name: Object.fromEntries(Object.keys(langs).map(lang => [lang, ''])),
|
||||||
|
},
|
||||||
|
...filteredHalls,
|
||||||
|
];
|
||||||
const rows = days.flatMap(day => [{
|
const rows = days.flatMap(day => [{
|
||||||
id: 'header-'.concat(day.getTime().toString()),
|
id: 'header-'.concat(day.getTime().toString()),
|
||||||
cells: [{
|
cells: [{
|
||||||
|
@ -39,6 +45,9 @@ export default function useScheduleTable({
|
||||||
id: slot.id,
|
id: slot.id,
|
||||||
cells: [{
|
cells: [{
|
||||||
id: 1,
|
id: 1,
|
||||||
|
day, // TODO replace with slot time
|
||||||
|
}, {
|
||||||
|
id: 2,
|
||||||
attributes: {
|
attributes: {
|
||||||
className: 'schedule-'.concat(slot.event.language).concat(' ').concat(slot.event.track?.css_class),
|
className: 'schedule-'.concat(slot.event.language).concat(' ').concat(slot.event.track?.css_class),
|
||||||
colSpan: 2,
|
colSpan: 2,
|
||||||
|
|
Loading…
Reference in New Issue