Our flexible Kanban board for managing tasks with drag drop


Post by shimnx »

When I just create a project, I need to get data from the background and load it. I want to know what kinds of loading methods are available. I have used loadInlineData of Gantt graph before, and the Task board seems to be able to use this method, but I don't know what data format to upload. I saw on the official website that its data format is the same as Gantt, but these two controls should not be the same data format, right? Or if there's another way to load it

await project.loadInlineData({
    eventsData             : [...],
    resourcesData          : [...],
    assignmentsData        : [...],
    dependenciesData       : [...],
    resourceTimeRangesData : [...],
    timeRangesData         : [...]
});

Post by tasnim »

Hi,
Here is how the data format looks like

project : {
        tasksData : [
            { id : 1, name : 'Try TaskBoard', status : 'doing' },
            { id : 2, name : 'Test Scheduler', status : 'done' },
            { id : 3, name : 'Evaluate Gantt', status : 'doing' },
            { id : 4, name : 'Download Grid', status : 'todo' },
            { id : 5, name : 'Install Scheduler Pro', status : 'todo' }
        ],

    resourcesData : [
        { id : 1, name : 'Angelo', image : 'angelo.jpg' },
        { id : 2, name : 'Celia', image : 'celia.jpg' },
        { id : 3, name : 'Dave', image : 'dave.jpg' },
        { id : 4, name : 'Emilia', image : 'emilia.jpg' }
    ],

    assignmentsData : [
        { id : 1, event : 1, resource : 1 },
        { id : 2, event : 2, resource : 2 },
        { id : 3, event : 3, resource : 3 },
        { id : 4, event : 4, resource : 4 },
        { id : 5, event : 5, resource : 1 },
        { id : 6, event : 1, resource : 2 },
        { id : 7, event : 2, resource : 3 },
        { id : 29, event : 3, resource : 1 }
    ]
}

And there is only one method available loadInlineData to load the data.


Post by shimnx »

 tasks = [
        { id: 1, name: 'My first task', status: 'Todo', "prio": "medium", date:"2022-08-01" ,group:'GroupA'},
        { id: 2, name: 'My second task', status: 'Todo', "prio": "high", date:"2022-02-01",group:'GroupA'}
    ];
    resourcesDatas = [
        { id : 1, name : 'Angelo', image : 'angelo.jpg' },
        { id : 2, name : 'Celia', image : 'celia.jpg' },
    ]
    assignmentsDatas : [
        { id : 1, event : 1, resource : 1 },
        { id : 2, event : 2, resource : 2 },
    ]
  <bryntum-task-board #taskboard [tbar]="taskBoardConfig.tbar"
                [swimlaneDragFeature]="taskBoardConfig.features.swimlaneDrag" [swimlanes]="taskBoardConfig.swimlanes"
                [columnToolbarsFeature]="taskBoardConfig.features.columnToolbars"
                [taskEditFeature]="taskBoardConfig.features.taskEdit" [swimlaneField]="taskBoardConfig.swimlaneField"
                [useDomTransition]="taskBoardConfig.useDomTransition"
                [columnDragFeature]="taskBoardConfig.features.columnDrag" [columns]="taskBoardConfig.columns"
                [bodyItems]="taskBoardConfig.bodyItems"
                [resourceImagePath]="taskBoardConfig.resourceImagePath"
                [footerItems]="taskBoardConfig.footerItems"
                [columnField]="taskBoardConfig.columnField!" project=[project]>
            </bryntum-task-board>

This is my data. Why doesn't it show who assigned

Attachments
屏幕截图 2022-08-01 155328.png
屏幕截图 2022-08-01 155328.png (9 KiB) Viewed 553 times

Post by tasnim »

Could you please provide a runnable test case so we can debug it?


Post Reply