Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Events, tasks, Calendar.. What is what?
#1
This one is more of a general system question, but I'll post it in development since I think there can be some improvement here. Since I've started development on the Schedular module I've grown more and more confused by what is what when it comes to events in coreBOS. There's tasks, which is a module, but stores it's data in the activity table. Then there's calendar, which does the same. Then there are a bunch of translations coming from either the calendar, the tasks module or the general file. When creating filters, I can use translated values to filter on one occasion, but need to use the system's language for the next. When I want to give privileges to a user, I need to use the tasks module to do so. Is there anyone who can explain a bit what the general philosophy is when it comes to events? Maybe I'll get an a-ha moment, or maybe I can assist in simplifying the event structure...
Reply
#2
This part of the application is really all wrong. It was conceived incorrectly and then pushed forward and maintained that way.
You may have not noticed yet, that email are ALSO saved in that same structure.

To my understanding the correct way to do this it to create ONE task or ToDo standard vtlib module and move ALL the information into that module. Then modify the calendar to work with that new module and throw away all the other stuff

That is drastic, a considerable amount of work and scary. I have installs with millions of records in there! I have no idea how long that could take.

I would recommend (and in fact it is what I am currently doing) to create a new module for your events and integrate those into the calendar. if you need to create an event for the calendar you can do it, but as a reflection of a record in your module.

The calendar will automatically detect modules that have dates and show them, if you time fields it will even show the record positioned int the right time slot. You will have to insert some records in a table to get full support but that is really easy (ask if you are interested and I will look it up). Then the Calendar has a save or change event corebos.filter.CalendarModule.save, you can plug into this event and detect drag and drop, and resize events on your records. So you can change the dats accordingly in your module.

Have a look at how timecontrol does it:

https://github.com/tsolucio/Timecontrol/...andler.php

You will see timecontrol records in their time slot and you can resize or drag them and the record will get updated. In general it works very well. Just stay away from the old stuff.
Joe
TSolucio
Reply
#3
Thanks, I had a feeling it was like that. Then I'll have to make some changes to my Schedular module. Right now, I don't use the vtlib record functionality since I was planning on using the in-app calendar mechanism. Basically what you're saying is: create a record for every event/task/todo/whatever you make like you would in other entity modules?

I'll have to retrace my steps a bit and figure out what I skipped when I thought I could just tap into the core mechanism. Also I have to rethink my listview.php (which currently just comments out the inclusion of the listview file and calls my own template). Since I have a chance of starting out the right way, I think I'll take a good look at your example and come asking here a lot still to make sure I make the best possible module.
Reply
#4
(07-27-2016, 05:49 PM)Guido1982 Wrote: ... Basically what you're saying is: create a record for every event/task/todo/whatever you make like you would in other entity modules?

Yes, correct.

(07-27-2016, 05:49 PM)Guido1982 Wrote: ... I think I'll take a good look at your example and come asking here a lot still to make sure I make the best possible module.



Waiting to help as I can.... :-)
Joe
TSolucio
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)