how do I build a timeTable field?
I currently have:
timeTable = (HourScheduleDefinitionModel[])[];
e.g.
[
{
day: '0',
timeline: [
{ from: '01:00', to: '02:00' },
{ from: '20:00', to: '22:00' }
]
},
{
day: '1',
timeline: [ { from: '01:00', to: '04:00' }, { from: '20:00', to: '21:00' } ]
}
]
and I want to
timeTable: Map<number, Array<HourScheduleDefinitionModel>>;
e.g.
{
0: [{from: '00:00', to: '23:00'}],
1: [{from:'00:00', to:'10:00'},{from:'14:00', to:'16:00'}]
}
the save button shows it
https://stackblitz.com/edit/angular-ivy-slrmqc?fbclid=IwAR3mZbHjz8TkLUZJI1kd7gsMnaPikdS0eyGzdF17RPYJ70jyHhXMOzW8x3w&file=src%2Fapp%2Fapp.component.ts