Implement RoR and BB parts of Holidays.
Holiday view does not expose HTML controls to users without
manager role.
Rework creating new vacation requests on BB
Update form template.
Add validations.
Rework VacationRequestsController#create action method
The method considers authentication and authorization.
The method also ensures the following:
user with manager role does not get approval request for own
vacation request.
vacation request attributes are properly set before saving.
Integrate the following tools:
Bootstrap Datepicker
Haml
The following model is renamed:
DayOff -> Holiday
All Holiday related entities are renamed as well, or created.
Migration for DB table renaming is added.
The HolidaysController is created with the following action methods:
index
create
update
destroy
The following authorization policies are added:
HolidayPolicy
VacationRequestPolicy
Add the following helpers:
arrayOfDates
arrayOfWeekends
Improvements:
Convert application layout from HTML to Haml.
Add tests for BB VacationRequest model.
Add .calculateDuration() method to BB VacationRequest model.
Update isWeekend helper to use moment.js.
Update BB router, so that prepared Holidays and AvailableVacations
collections are passed parameters to the view.
Add 'invalid' trait to the VacationRequest factory.
Add tests for VacationRequestsController#create.
Rework VacationRequestsController
Accept date as an ISO8601 string. This allows to omit date
conversions. As a result all conversion related methods are removed.
In case of failed attempt to save a record, set response status
code to 422, and and error message as JSON.
Update defaults in App.Models.VacationRequest.
Update VacationRequestsController#create.
Refactor ApprovalRequestsController.
Add new methods to RoR User model
The model can answer if a user has member role in any team.
The model provides a list of all managers the user is assigned to.
Add authorization policy for VacationRequest model.
Update BB Team view to use dynamic events
Implement DOM events binding within events() method, instead of updating
static events property after initialization.
Extract App.Helpers.dateRangeDuration helper.
Use Array#uniq in ApprovalRequestsController#index.
@alazarchuk
@rubycop
Implement RoR and BB parts of Holidays. Holiday view does not expose HTML controls to users without manager role.
Rework creating new vacation requests on BB Update form template. Add validations.
Rework VacationRequestsController#create action method The method considers authentication and authorization. The method also ensures the following:
Integrate the following tools:
The following model is renamed:
All Holiday related entities are renamed as well, or created. Migration for DB table renaming is added.
The HolidaysController is created with the following action methods:
The following authorization policies are added:
Add the following helpers:
Improvements: