Details
Description
See also: http://wiki.civicrm.org/confluence/display/HR/Absence+-+Employee+Perspective
Tasks:
T1. Implement skeletal/placeholder page
- Use Backbone Marionette
- Define data classes – AbsenceModel, and AbsenceCollection, and AbsenceCriteria
- Add tabs, routes, and placeholder implementations of ListView, CalendarView, and StatisticsView
- Add events to refresh content whenever the filter criteria changes
T2. Change the filter widgets from single-selects to checkbox multi-selects
- Probably use https://github.com/ehynds/jquery-ui-multiselect-widget
- Possibly use http://ivaynberg.github.io/select2/
T3. Add styling
- Use vertical-tab layout like the mockup
- Ensure that spacing holds up reasonable in different browsers/resolutions
T4. Load real data
- Load real list of absence-related activity types (CRM_HRAbsence_Page_EmployeeAbsencePage::registerResources)
- Load real list of absence periods (CRM_HRAbsence_Page_EmployeeAbsencePage::registerResources)
- Implement API (either update/enhance the Activity API or add a new API) to fetch absence-activities; must support filters:
- period_id: accepts or int or (ideally) array of ints
- activity_type_id: accepts or int or (ideally) array of ints
- target_contact_id: int (note: be sure to respect ACLs)
T5. Implement ListView which displays the first tab. Notes:
- The raw data should be available in this.options.collection (AbsenceCollection).
- The raw filter criteria should be available in this.options.criteria (AbsenceCriteria).
- Write qunit tests for the functions which compute totals.
- If multiple periods are selected, note that the table will display subsection for each period.
T6. Implement CalendarView which displays the second tab. Notes:
- The raw data should be available in this.options.collection (AbsenceCollection).
- The raw filter criteria should be available in this.options.criteria (AbsenceCriteria).
- Write qunit tests for functions or classes which which get activities by date
T7. Implement StatisticsView which displays the third tab. Notes:
- The raw data should be available in this.options.collection (AbsenceCollection).
- The raw filter criteria should be available in this.options.criteria (AbsenceCriteria).
- Write qunit tests for functions or classes which compute the statistics
T8. Implement "New Absence" behavior
- ie choose an item from a dropdown, and it redirects to the Absence Request screen in create mode (
HR-227)
T9. Embed in standalone "My Absences" page (/civicrm/absences")
T10. Embed in "View Contact" page (as tab – maybe /civicrm/absences?cid=<contact>&snippet=<foo>)
Attachments
1.
|
Change the filter widgets from single-selects to checkbox multi-selects | Done/Fixed | Nishant Bhorodia |
|
|
||||||||
2.
|
Add styling to absence-request layout | Done/Fixed | Nishant Bhorodia |
|
|
||||||||
3.
|
Load real data in absence-request widget | Done/Fixed | Tim Otten |
|
|||||||||
4.
|
Implement ListView which displays the first tab | Done/Fixed | Nishant Bhorodia |
|
|||||||||
5.
|
Implement CalendarView which displays the second tab | Done/Fixed | Nishant Bhorodia |
|
|||||||||
6.
|
Implement StatisticsView which displays the third tab. | Done/Fixed | Nishant Bhorodia |
|
|
||||||||
7.
|
Implement "New Absence" dropdown | Done/Fixed | Nishant Bhorodia |
|
|||||||||
8.
|
Embed in standalone "My Absences" page (/civicrm/absences") | Done/Fixed | Nishant Bhorodia |
|
|
||||||||
9.
|
Embed in "View Contact" page (as tab) | Done/Fixed | Nishant Bhorodia |
|
|
||||||||
10.
|
Activity.get API - Filter by target_contact_id | Done/Fixed | Nileema Jadhav |
|
|
||||||||
11.
|
Activity.getAbsences API should use period_id based on absence-dates | Done/Fixed | Nishant Bhorodia |
|