Uploaded image for project: 'CiviHR'
  1. CiviHR
  2. HR-226

Implement employee-absence widget

    Details

    • Type: New Feature
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Won't Do
    • Affects Version/s: HR-1.2
    • Fix Version/s: HR-1.2
    • Component/s: Absence
    • Labels:
      None
    • Sprint:
      Sprint 1, Sprint 12b

      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

      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

          Activity

            People

            • Assignee:
              nileema.jadhav Nileema Jadhav
              Reporter:
              timotten Tim Otten
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 week, 3 days, 3 hours
                1w 3d 3h