Post by jonas »

Hello,

Is it possible to create project also from the create button ?

Thanks in advance.

Attachments
create.png
create.png (3.04 KiB) Viewed 465 times

Post by Terence »

Not in the gantt view. You can do it in the project dashboard. The Gantt View will only let you edit tasks.


Post by jonas »

Terence wrote: Tue Jan 17, 2023 2:27 pm

Not in the gantt view. You can do it in the project dashboard. The Gantt View will only let you edit tasks.

Hello Terence,

I want to add new button in gantt view 'create project'
so when i click on that then able to add new project inside gantt view(like task)

{
 color    : 'b-green',
 ref      : 'addProjectButton',
 icon     : 'b-fa b-fa-plus',
 text     : 'Create Project',
 tooltip  : 'Create new project',
 onAction : 'up.onAddProjectClick'
}
async onAddProjectClick() {
}

i have added button and related function like this in GanttToolbar.js
but i have no idea how to create project inside backend and ganttview

Attachments
createproject.png
createproject.png (5.93 KiB) Viewed 449 times

Post by Terence »

A project is top(parent) node. You need to add it to the taskStore, the same as is done for create task and handle the update in the controller (backend). A project is regarded as a task without parent. You need to add a new node to the stores rootNode

gantt.taskStore.rootNode

.

The crudManager ProjectModel.js will then fire a change request towards the controller (def bryntum_gantt_update). In the controller you need to implement the saving of the project. Support on the implementation of the controller (backend) is out of the scope of forum support.

On the forum I can provide basic information about how you could approach this. If you need further support on this, you can contact sales@bryntum.com for professional support.


Post Reply