Our powerful JS Calendar component


Post by percy.brea »

I am looking to create a resource view for day view mode, but showing sub-resources for each resource as columns above.

On the screenshot take a look at the first resource "Branch A". It will have a day view, but instead of days of the week as columns, it will have resources within each resource.

Is this possible to achieve, if so how can this be created?

Attachments
image (6).png
image (6).png (220.15 KiB) Viewed 1694 times

Post by mats »

It isn't possible currently, but we would be open to implementing it for you as part of our Feature Sponsorship offering. Please see this page for details: https://www.bryntum.com/services/

If interested, please reach out to [email protected] and we can set up a call to discuss.


Post by Animal »

You could create your own view type.

If I were to do this this would be along the lines of the following code (YMMV, this is off the top of my head, but a start)

export default class BranchResourceView extends Container.mixin(DateRangeOwner, CalendarMixin) {
    static configurable = {
         // We don't add mouse listeners. We just relay events from the children
         handlePointerInteraction : false,

        // The child views will make us need to scroll left/right
        scrollable : { x : true }
    };

    doRefresh() {
        // iterate the branchStore
        // Create a DayResourceView for each one with an eventFilter property which filters in only events for the branch
        // Obviously cache them and only create a view if one does not already exist for the branch.
        // Configure them with project : this.project
        // Configure them with a catchAll listener pointing to this.relayChildViewEvents as the handler
        // Configure them with range : this.range (We are a DateRangeOwner, so probably have '1 week')
        // add the views (This is a Container, it contains child Widgets)
    }

    relayChildViewEvents() {
        // trigger the events from here so the Calendar handles them
    }

    // Inherited from Container. We get to look at new child widgets
    onChildAdd(child) {
        super.onChildAdd(child);

        // We get a look at child view config changes to see if we need to propagate them to their siblings
        FunctionHelper.before(child, 'onConfigChange', 'onChildViewConfigChange', this, { return : false });
    }

}

You would add a branchesStore to your CrudManager which would load the branches up along with all the other data (resources, events etc) in one block.

There will be a lot more to it than that, but that's the principle. A Container which manages a child DayResourceView for each Branch.


Post by percy.brea »

Thanks both for your response.

I wouldn't think twice to go for the Feature Sponsorship, the only inconvenience is that the client takes quite a bit of time to approve any additional service, and we need this for our current sprint. I will talk with the team anyway.

I tried putting together the code above, but has many type errors.

Will keep you posted what the team decides.


Post by marcio »

Hey percy.brea,

Thanks for the update. Please let us know when you have a decision. :)

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post by percy.brea »

Hey team bryntum,

The team decided to pivot to another alternative solution with scheduler pro, as if we wait to get approval for this we would compromise our current sprint. It would have been great to have such feature available on the resource view part of the core - I initially thought it was possible.

Again, thank you all for being so responsive and for your great product.


Post by marcio »

Hey,

Thanks for the update.

I created a ticket to implement that https://github.com/bryntum/support/issues/9897, but as it's very specific for now, it would have top priority on development. If you want to speed up that process, please ping our services as Mats mentioned earlier on this thread.

Best regards,
Márcio

How to ask for help? Please read our Support Policy


Post by percy.brea »

Marcio,

Thank you for kindly adding this ticket. I will let the team know.

Again thank you Mats, Marcio and Animal for your help. Really appreciate your prompt and kind responses.


Post by Animal »

We need an easy way to create views like this which are aggregates of atomic Calendar views.

https://github.com/bryntum/support/issues/9898


Post by mats »

This is best solved using the Scheduler in vertical mode - which supports grouping: https://bryntum.com/examples/scheduler/vertical


Post Reply