Open ghost opened 5 years ago
Ongoing discussion with the gantt-elastic folks https://github.com/neuronetio/gantt-elastic/issues/32
I have it somewhat working now, I'll check in the code here in a minute
I'm still getting the following error however which I think is the problem with the calendar portion not showing:
ERROR in C:/Users/Todd Hay/Documents/code/boatnet/apps/obs-web/src/views/Chart.vue 73:39 Parameter 'task' implicitly has an 'any' type. 71 | { id: 2, label: 'Description', value: 'label', width: 200, expander: true }, 72 | { id: 3, label: 'Assigned to', value: 'user', width: 130, html: true },
73 | { id: 3, label: 'Start', value: task => dayjs(task.start).format('YYYY-MM-DD'), width: 78 }, | ^ 74 | { id: 4, label: 'Type', value: 'type', width: 68 },
I would note that the error is occurring on line 73, with task.
Branch where we're exploring this: gantt-elastic
tracking the commentary on the original gantt-elastic site as well: https://github.com/neuronetio/gantt-elastic/issues/32
The gantt chart is now showing:
I was able to get rid of the task any error by modifying the tsconfig.json file in the obs-web directory as follows:
// "strict": true,
"noImplicitAny": false,
reference: https://stackoverflow.com/questions/47848778/parameter-implicitly-has-an-any-type
not thinking that this is the correct solution however.
With regards to the parameter implicitly has an any type error, the way to correct this is to modify the Chart.vue file where the error is occurring from:
{ id: 3, label: 'Start', value: task => dayjs(task.start).format('YYYY-MM-DD'), width: 78 },
to:
{ id: 3, label: 'Start', value: (task: any) => dayjs(task.start).format('YYYY-MM-DD'), width: 78 },
@toddhay-NOAA good find!
@sethgerou-noaa, @Mak-NOAA, @melinashak-noaa do we still want to try and use this lib for calendaring? I know Seth already has some calendaring stuff implemented for the Trips stuff...
@SaOgaz-NOAA Let's hang on to this ticket - might be useful for observer trip assignment when we get around to it.
Investigate using the gantt-elastic Vue component as the primary calendaring component for the Observer Activity Tracking effort. For this ticket, just get the component to compile and render in a web browser.