Post by kuantiik »

Hello,

I have made some configuration with the column (show some, hide other). I did apply filter on some column. I would like to "save" this configuration as the default "view/setup" when I'm loading my Gantt Chart.

How can I do that ?

Thanks


Post by alex.l »

Please see
https://bryntum.com/docs/gantt/#Gantt/view/mixin/GanttState
https://bryntum.com/docs/gantt/#Gantt/view/Gantt#property-state

// save
const state = gantt.state;
localStorage.setItem('b-gantt-state', JSON.stringify(state));

// apply
const state = JSON.parse(localStorage.getItem('b-gantt-state'));
// assigning to gantt.state applies a state to the gantt
if (state) {
    gantt.state = state;
}

All the best,
Alex


Post by Terence »

Hi Alex,

We are currently working to add a configuration object on management level. See preview (work in progress)

Screenshot 2021-09-30 at 15.55.08.png
Screenshot 2021-09-30 at 15.55.08.png (55.85 KiB) Viewed 1659 times

That would allow you to configure the gantt view on each level like documented overhere
https://www.bryntum.com/docs/gantt/#Gantt/view/Gantt

Columns, features etcetera. We will give support based on what Odoo's backend supports.

Additionally we could add user level configurations ourselves, still under consideration, it will in any case give you the flexibility to use our api like you were trying to do with the local storage.

Our aim is to deploy the management level configuration in the settings pane this week or upcoming week.

I hope that will help you out.


Post by Terence »

Actually user state management we should support default. Created a ticket.

https://github.com/bryntum/odoo-support/issues/44


Post by Terence »

Implemented! Both user state storage and an overall admin gantt config. Will be released at the beginning of upcoming week.


Post Reply