I
I had to plan a trip to Iceland. Previously I was drawing timelines on paper to make sure I can get there in time, to utilize my time on the location and to avoid any overlaps. But with this trip I knew it will be too much redo, so I thought about doing it in APEX...
The Plan
I need a grid to input the data and I need a Gantt chart to render it as timeline. Thats it. I had a fully functional prototype in 2 hours (I was stuck for a while on the chart). Since that I added some small features, like:
- daily overview so I can check (and eventually print) just specific days
- customizable colors, per event/stop category with event/stop level override
- added costs and flags so I can keep track of things I need to pay or do
- clickable chart (thanks to Hari), so I can click on event on chart to adjust it
- dynamic chart height (thanks to Hari) based on the number of categories used on trip
I am planning to add maps thanks to suggestion from Jayson.
Finally, this is the end rusult I was going for:
Challenges
There were few challenges, like how to show multiple events on the same line when there is no real hierarchy? Or how to make the chart clickable? Or how to adjust chart the height per trip? Luckily Hari solved this before me.
The trick for the Gantt chart is in trp_itinerary_v view, I basically used categories as parents. For adjustable height I calculate it on server and adjust by DA with ajax callback. And I use another callback to get url for the modal dialog to show the stop/event detail on chart click.
There are also some other technical component you might be interested in:
- dynamic navigation based on a view, that allows me to show trips in navigation
- generated tapi to handle grids, checkout my new generator
- customized styles and modals which I get from the Master app
- autohiding success messages
- trick to allow chart color changes without refreshing whole page (check trp_app.set_colors procedure and a CSS region (Dynamic Content) on page 100)
- just checkout the app, you might find something else
Go ahead and check the repo, install the app, explore.
Repo and install script are handled by my OPY project.
Comments
Post a Comment