The view aggregates two existing views, VacationRequestForm and
VacationRequestsList. As a result these views lose their own pages
and render themselves in one place.
As an intermediator, the view passes collections to the views it uses.
The VacationRequestForm view interacts with the VacationRequestsList
with the 'sync' event on VacationRequests collection. When new vacation
request is created on the server, VacationRequestForm view uses fetch()
method on the collection. The VacationRequestsList view listens
to the 'sync' event on the collection and redraws the list
of vacation requests.
Remove redundant entities from HTML layout
Remove redundant entities from BB router
Update BB VacationRequest model
The model now accepts 'created_at' and 'updated_at' from server.
Update BB VacationRequestForm view
The view renders itself to new DOM element, according to layout of
the VacationRequests view.
The following components are updated in scope of these changes:
template for the view.
Update BB VacationRequestsList view
The view renders itself to new DOM element, according to layout of
the VacationRequests view.
The following components are updated in scope of these changes:
template for the view,
tests for the view.
Update VacationRequestsController
It seems that jQuery ajax() method expects proper response body
in answer. Otherwise it throws 'parseerror'.
The controller responds with proper status and with created record
in message.
The view aggregates two existing views, VacationRequestForm and VacationRequestsList. As a result these views lose their own pages and render themselves in one place. As an intermediator, the view passes collections to the views it uses. The VacationRequestForm view interacts with the VacationRequestsList with the 'sync' event on VacationRequests collection. When new vacation request is created on the server, VacationRequestForm view uses fetch() method on the collection. The VacationRequestsList view listens to the 'sync' event on the collection and redraws the list of vacation requests.
Remove redundant entities from HTML layout
Remove redundant entities from BB router
Update BB VacationRequest model The model now accepts 'created_at' and 'updated_at' from server.
Update BB VacationRequestForm view The view renders itself to new DOM element, according to layout of the VacationRequests view. The following components are updated in scope of these changes:
Update BB VacationRequestsList view The view renders itself to new DOM element, according to layout of the VacationRequests view. The following components are updated in scope of these changes:
Update VacationRequestsController It seems that jQuery ajax() method expects proper response body in answer. Otherwise it throws 'parseerror'. The controller responds with proper status and with created record in message.
@alazarchuk , @epmlys , @rubycop