Our state of the art Gantt chart


Post by licjapodaca »

Hi there, when I remove all the assignments from the tasks and reload the Gantt component the ResourceAssignmentColumn doesn't refresh correctly like the following image:

assignments.png
assignments.png (209.37 KiB) Viewed 233 times

But if I remove just 1 assignment from the tasks the Gantt refresh correctly one by one ... but when I remove the last assignment there is the problem when I reload the Gantt again without any assignment.

I use Gantt v4.2.6

I configured the resourceassignment column like the following:

...
{
	type: 'resourceassignment',
	showAvatars: false,
	align: 'left',
	itemTpl: function (assignment) {
		const { resource } = assignment;

	if(Ext.isEmpty(resource.imageUrl)) {
		return `<div class="b-resource-avatar b-resource-initials">${resource.initials}</div>${resource.name}`;
	} else {
		return `<div class="b-resource-avatar-container"><img draggable="false" class="b-resource-avatar b-resource-image" ontouchstart="return false" src="${resource.imageUrl}"></img></div>${resource.name}`;
	}
}
},
...

Regards


Post by licjapodaca »

Solved 👍🏻 ... returning from the backend with this specific assignments data structure:

assignment-solved.png
assignment-solved.png (219.19 KiB) Viewed 225 times

Regards


Post Reply