Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Resource view #373

Closed
wants to merge 5 commits into from
Closed

Add Resource view #373

wants to merge 5 commits into from

Conversation

sabarasaba
Copy link

@sabarasaba sabarasaba commented May 2, 2017

Heya,

I'm back from holidays, but have a lot of stuff on my plate at the moment and I don't know how much more time I'll be able to put on this pr. I'm hopeful someone else that is in need of it will be able to pick it up and make the few small things that are needed:

  • The Resource and ResourceGrid are just duped files from Day and TimeGrid files with some extra added functionality. I'd be much happier if we could somehow DRY it up.
  • Ideally when having lots of resources you should be able to have a minimum amount of resources that are shown and the rest would be hidden and shown upon scrolling horizontally (pretty much like an excel grid would work). Also the resource headers should always be visible, only cells would scroll.
  • It needs an proper demo in the /examples/demos folder and documentation.

I've added a story that shows how the resource view works and example data in stories/resourceEvents.js.

Fixes #13 and others.

@jquense
Copy link
Owner

jquense commented May 2, 2017

thanks for this! looks good. if you want to open up your branch to allow pushes then I may be able to jump in and contribute a bit

@sabarasaba
Copy link
Author

@jquense awesome, just added you as a collaborator :)

@TeaBough
Copy link
Contributor

I'm SO looking forward this feature ! Has anybody planned to work on this any time soon ?

@TeaBough
Copy link
Contributor

TeaBough commented Jun 1, 2017

It would be great to have a resource view for the week view as well ...

@TeaBough TeaBough mentioned this pull request Jun 2, 2017
@TeaBough
Copy link
Contributor

TeaBough commented Jun 2, 2017

I've created #423, that serve the same purpose as this PR. The difference is that the logic of the resource is done directly in the TimeGrid instead of creating a ResourceGrid which DRY things up and allow to enjoy resource in the week view as well.

@mukesh-n-crest
Copy link

Any update regarding the PR for vertical resource view? please do it as soon as possible because i need it urgently.

Thanks in advance.

@sabarasaba
Copy link
Author

@mukesh-n-crest that aint how it works papi

@TeaBough
Copy link
Contributor

TeaBough commented Jan 3, 2018

@jquense @sabarasaba I think we can close this PR since #423 has been merged

@jquense jquense closed this Jan 3, 2018
@asharafshahi
Copy link

asharafshahi commented Feb 8, 2018

Hi guys, just to confirm, is this feature available now? The day-view calendar with all the rooms across the top is beautiful. Any documentation on how to set it up? Thanks!

I tried the example with the resource map like this, but it never changes to show the resources across the top. Anything wrong with this?:

getResourceMap() {
    return [
      { resourceId: 1, resourceTitle: 'OR 1' },
      { resourceId: 2, resourceTitle: 'OR 2' },
      { resourceId: 3, resourceTitle: 'OR 3' },
      { resourceId: 4, resourceTitle: 'OR 4' }
    ];
  }

and the Big Calendar component like this:

<BigCalendar
              formats={formats}
              events={this.createEvents()}
              views={['day']}
              toolbar={true}
              step={30}
              defaultView="day"
              resources={this.getResourceMap()}
              resourceIdAccessor="resourceId"
              resourceTitleAccessor="resourceTitle"
              defaultDate={new Date(2018, 1, 8)}
            />

@sabarasaba
Copy link
Author

@asharafshahi This implementation I did never ended up being merged but there was another PR that actually added it in a different way. Not sure about its API thought, but might be worth asking there :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants