resource Assignments units

Discuss issues related to v4.x
Post Reply
User avatar
Pooja Jain
Posts: 275
Joined: Sat Jul 27, 2013 11:49 am

resource Assignments units

Post by Pooja Jain » Mon Jul 04, 2016 12:36 pm

Hello,

In previous version of bryntum gantt we are able to assign resource for more than 100% but in latest library we are unable to set more than 100%.

Kindly guide us how can we increment the assignment percentage from 100, as we were able to did in previous versions.

Thanks is advance.

Thanks & Regards,
Pooja Jain.

User avatar
mats
Core Developer
Core Developer
Posts: 14100
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: resource Assignments units

Post by mats » Mon Jul 04, 2016 2:04 pm

This limit has now been removed, you can override this yourself for now:

Code: Select all

Ext.define("Gnt.column.AssignmentUnits", {
    extend : "Ext.grid.column.Number",
    mixins : ['Gnt.mixin.Localizable'],
    alias  : "widget.assignmentunitscolumn",

    dataIndex : 'Units',
    format    : '0 %',
    align     : 'left',

    editor : {
        xtype         : 'percentfield',
        minValue      : 0,
        maxValue      : undefined
    },
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Pooja Jain
Posts: 275
Joined: Sat Jul 27, 2013 11:49 am

Re: resource Assignments units

Post by Pooja Jain » Mon Jul 04, 2016 2:29 pm

thanks for the reply.

But If I override column assignmentunit then I think we should also override Gnt.widget.AssignmentEditGrid to understand over customized assignment unit column ...Is this correct or there is any other way to only override assignment unit column which will do the required changes.

Thanks & Regards
Pooja Jain.

User avatar
mats
Core Developer
Core Developer
Posts: 14100
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: resource Assignments units

Post by mats » Mon Jul 04, 2016 2:31 pm

It uses the same column type so no need for extra overrides.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
Pooja Jain
Posts: 275
Joined: Sat Jul 27, 2013 11:49 am

Re: resource Assignments units

Post by Pooja Jain » Mon Jul 04, 2016 2:45 pm

thanks it works.

thanks & Regards,
Pooja Jain.

User avatar
rahulranjan
Posts: 172
Joined: Mon Apr 29, 2019 8:43 pm

Re: resource Assignments units

Post by rahulranjan » Sat May 18, 2019 3:24 pm

Hi
How can i achieve same thing using Brytumn Gantt Angular 7 .
Code Goes Here

Code: Select all

class ResourceAssignmentColumnOverride {
    static get target() {
        return {
            class: ResourceAssignmentColumn,
            product: 'gantt'
        };
    }

    itemTpl(assignment, i) {
        return `${assignment.resourceName} ${assignment.units}[MY_UNIT!]`;
    }

}

Override.apply(ResourceAssignmentColumnOverride);

class AssignmentFieldOverride {
    static get target() {
        return {
            class: AssignmentField,
            product: 'gantt'
        };
    }

    static get defaultConfig() {
        const cfg = this._overridden.defaultConfig;
        console.log(cfg);
        cfg.chipView.itemTpl = (assignment, i) => {
            return `${assignment.name} ${assignment.units}`;
        };

        return cfg;
    }
}

Override.apply(AssignmentFieldOverride);

// Apply changes to locale
Object.assign(LocaleManager.locale.AssignmentGrid, {
    ' ': '[MY_UNIT!]',
    unitsTpl: ({ value }) => value
});

User avatar
pmiklashevich
Core Developer
Core Developer
Posts: 1702
Joined: Fri Apr 01, 2016 11:08 am

Re: resource Assignments units

Post by pmiklashevich » Mon May 20, 2019 3:43 pm

You can look at our shipped samples. Please open our angular/advanced demo and see how it works. Then you can implement what you need there, including the overrides you've mentioned. For example create an override in examples/angular/advanced/src/app/lib and import it in examples/angular/advanced/src/app/gantt/ganttConfig.js
Pavel Miklashevich - Core Developer

Post Reply