quasarframework / quasar-ui-qcalendar

QCalendar - Quasar App Extension, Vue CLI plug-in and UMD distributions available
https://quasarframework.github.io/quasar-ui-qcalendar
MIT License
439 stars 123 forks source link

Is there a way to show Resource View with intervall "day" and before/after-resources slot? #233

Open anli-xsigns opened 3 years ago

anli-xsigns commented 3 years ago

Is your feature request related to a problem? Please describe. I want to build a resource scheduler / gantt view like gantt

Describe the solution you'd like A resource view which I can make look like the screenshot (a vue component which almost achieves this is e. g. https://github.com/neuronetio/gantt-elastic)

Is there already a chance to build this with existing components? Is there a chance to have this built donation based?

hawkeye64 commented 3 years ago

@anli-xsigns With current calendar, no. There is a new calendar component in next brach (still to be done), QCalendarGrid, that will be like that.

My idea is that it will be configurable to the point you can do something like this: image

anli-xsigns commented 3 years ago

@hawkeye64 Wow Jeff, that looks really awesome!!! 👍🥳 Do you think it will be possible to draw the occupancy bars with custom code? (They are like events, e. g. from 3/3/2021 2pm to 3/17/2021 11 am)

hawkeye64 commented 3 years ago

@anli-xsigns yes, there will be some helper methods for determining starting position and length

anli-xsigns commented 3 years ago

@hawkeye64 thanks a lot for your great work! I really appreciate it, it's awesome! And thanks a lot for putting this on todo! I had a look at the current documentation as mentioned in https://github.com/quasarframework/quasar-ui-qcalendar/releases/tag/v4.0.0-alpha.1 but did not find slots in this component. So this is not possible at the moment, am I right?

hawkeye64 commented 3 years ago

@anli-xsigns There are slots. I just haven't had time to put them into the JSON API so they show up. However, I do not have the before/after slots as you have requested. I am still mulling over how to do this properly. Perhaps an items in tasks array that can tell Tasks calendar to do an empty row...

anli-xsigns commented 3 years ago

@hawkeye64 ah, sorry, didn't have a look at the source 😬🤦‍♂️

Perhaps an items in tasks array that can tell Tasks calendar to do an empty row...

Either that or what about the "total" row? Because the afterResource Slot is more like "totals" - just different totals depending on the task status (days with beginning tasks, days with ending tasks, days with beginning and ending tasks, partially paid, full paid...)

hawkeye64 commented 3 years ago

@anli-xsigns I am thinking the Task calendar needs something similar with children. So that the parent can hold totals and children can be displayed that make up those totals. For instance, a parent would be a country, like the US, and children would be the states.

anli-xsigns commented 3 years ago

@hawkeye64 ah, ok. For my usecase children/subtasks are not important. For me it would be enough having several total rows :-)

hawkeye64 commented 3 years ago

@anli-xsigns Just so I am clear, you are talking about the summary row? Meaning, configurable to have more than 1?

hawkeye64 commented 3 years ago

What I have done for QCalendarTask is create a new model-footer property. This takes an array of objects. For each item, you will get a row in the footer (summary) area. You are responsible for the content using the footer-task slot. If there is no model-footer property, then no footer/summary will be displayed.

hawkeye64 commented 3 years ago

Is this going to suffice?

https://user-images.githubusercontent.com/10262924/115971938-b3374f80-a508-11eb-94b1-d2b111cea674.mp4

anli-xsigns commented 3 years ago

@hawkeye64 sorry, I was full day in the workshop yesterday :-) Yes, that's perfect 🥳! Really awesome ✨! Would it be possible to have the same at the top to print the colored bars like shown below? We use them for printing national holidays of different states (could be for holidays of employees too...).

https://user-images.githubusercontent.com/8227996/115986210-6a86a180-a5af-11eb-8685-d8f7ad328d1c.mp4

hawkeye64 commented 3 years ago

https://user-images.githubusercontent.com/10262924/115994247-6e0c2f80-a593-11eb-9b19-08a8681ec619.mp4

anli-xsigns commented 3 years ago

@hawkeye64 That's it 🥳🥳🚀🚀✨✨ Thanks a million! @maximilianfixl

hawkeye64 commented 3 years ago

I wouldn't mind if you played with it a bit. If you need help/advice getting set up, I am here to help.

anli-xsigns commented 3 years ago

@hawkeye64 Sure, I will do, thanks a lot for your effort and help! I'll try the component certainly within the next days! Maybe you can share a tiny code snippet how I can setup the holiday and the occupancy bars?

hawkeye64 commented 3 years ago

@anli-xsigns I'll try to get a codepen put together so we can both play with it

hawkeye64 commented 3 years ago

https://codepen.io/Hawkeye64/pen/PoWLpoq

anli-xsigns commented 3 years ago

@hawkeye64 Awesome, thanks a lot! I blocked mysef some time tomorrow to play with it 👀

anli-xsigns commented 3 years ago

Hi Jeff, sorry for the delay! A colleague got ill and I had a lot of extra work to do :-( I managed to play arround with the codepen this morning and had problems to get it running - I think mostly because of the logic we use today to print the calendar and which blocks my head atm 🤣 I created the following codepen: https://codepen.io/anli-xsigns/pen/gOgJVNb There I have resources with occupancies which I want to print at the left (where the task names are atm). The occupancies I want to show in the grid as a bar. From my understanding the days are printed day by day and I couldn't figure it out how to print a colored bar for all occupied days. So my questions are: How can I print resources on the left regardless of occupancies and do you have an idea how to print the colored bars in the grid and add a title/number to them?

hawkeye64 commented 3 years ago

I started working on hierarchical rows yesterday and drag-and-drop support. I should be done sometime this weekend.

anli-xsigns commented 3 years ago

Great to hear 🥳 Thanks a lot!