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 additional user column to week view #699

Closed
greedy96 opened this issue Sep 3, 2018 · 6 comments
Closed

Add additional user column to week view #699

greedy96 opened this issue Sep 3, 2018 · 6 comments

Comments

@greedy96
Copy link

greedy96 commented Sep 3, 2018

Is your feature request related to a problem? Please describe

Hi. I'm making my own angular calendar and I would like to display the user name in the events row belong to him in an additional column (check a screenshot). I've been trying to implement this by myself but I don't know how to add the additional column like this. For now I'm sorting rows to split it by the users like u suggested:
https://github.com/mattlewis92/angular-calendar/issues/517

So I've added "MyCalendarUtils" extended on CalendarUtils version 0.1.2. I've overridden getWeekView method and sort eventsRows by "event.meta.user.id". Here is my solution:
https://stackblitz.com/edit/angular-cnh3lm

Now I need to add additional column and get userName from meta in events row or add the user column and split the events rows between them something like:
https://github.com/mattlewis92/angular-calendar/issues/269
but for WeekView .

Is there any possibility of making something like this?
Thanks a lot.

Describe the solution you'd like

I can set the user name in events row belong to him on the left side in WeekView.

Describe your use case for implementing this feature

I want to add the additional column with user name in WeekView. Most likely, it would be used read-only so any drag-and-drop events between users isn't necessary.

Additional context

There is a screenshot that I've made in paint and it should looked like.
weekview

P.S. Sorry for my english.

@mattlewis92
Copy link
Owner

Thanks for taking the time to make such a detailed issue report, it was really helpful in understanding your use case 😄 In the upcoming 0.26 release there was a similar issue here: #632 You can use the feature implemented for it as follows to solve your problem:

  1. Upgrade to 0.26 that has the new feature, see instructions here on how to upgrade: 0.26 #589

  2. In the beforeViewRenderCalled output, $event.allDayEventRows will contain the events for your view. From this you can exact the list of users per row.

  3. Create a new column on the left side of the mwl-calendar-week-view component that lists the users you gained from the beforeViewRenderCalled output.

I hope that makes sense, let me know if you get stuck 😄

@skriaa
Copy link

skriaa commented Jun 12, 2021

hello, I'm trying to make the same schedule (add a new column with the user's name in week view), is there any example wish I can use.
i'm using angular-calendar version : 0.28.22.
Thank you.

@webdevelopersbc
Copy link

hello @mattlewis92 I need add custom template for day view ... cloud you please help me
I wanted to display events like
https://prnt.sc/1bqeobu
in this format on day view, could you please help me

@adhamankar
Copy link

Hello @mattlewis92 your suggestion with some more tweaks worked for me. I implemented this by customizing the template and the getWeekView utility method. All in all, it was very easy and straightforward, thanks to you. Much appreciate your efforts.

@HarshalShah2703
Copy link

Hello @mattlewis92 how do we show the User Name instead of Timeline in week view?
Currently, I'm using the 0.29 version.

@HarshalShah2703
Copy link

Is your feature request related to a problem? Please describe

Hi. I'm making my own angular calendar and I would like to display the user name in the events row belong to him in an additional column (check a screenshot). I've been trying to implement this by myself but I don't know how to add the additional column like this. For now I'm sorting rows to split it by the users like u suggested: https://github.com/mattlewis92/angular-calendar/issues/517

So I've added "MyCalendarUtils" extended on CalendarUtils version 0.1.2. I've overridden getWeekView method and sort eventsRows by "event.meta.user.id". Here is my solution: https://stackblitz.com/edit/angular-cnh3lm

Now I need to add additional column and get userName from meta in events row or add the user column and split the events rows between them something like: https://github.com/mattlewis92/angular-calendar/issues/269 but for WeekView .

Is there any possibility of making something like this? Thanks a lot.

Describe the solution you'd like

I can set the user name in events row belong to him on the left side in WeekView.

Describe your use case for implementing this feature

I want to add the additional column with user name in WeekView. Most likely, it would be used read-only so any drag-and-drop events between users isn't necessary.

Additional context

There is a screenshot that I've made in paint and it should looked like. weekview

P.S. Sorry for my english.

If your issue is resolved can you help me with what to do?

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

No branches or pull requests

6 participants