1214: Create success/error modals and apply to requisition page

Test Case #:1214

Test Case Name: Create success/error modals and apply to requisition page

System: OpenLMIS

Subsystem: blue

Test case designed by: Paulina Borowa

Design Date:08.11.2016

Short description

Currently success and error messages in the requisition UI are within the form-toolbar — which makes them easy for a user to miss, and leads to a less than ideal implementation in controller code.

To fix this issue, it would be more to use a modal window to make the success and error messages visible. We should use a technique similar to the custom bootbox examples — ie no "OK" button, just a simple box with a message that disappears after 5 seconds (or if a user clicks anywhere or presses any button).

These modals should be created as reusable services in the common directoryto meet the 3.0 Beta release, its ok to not create these services, but make basic functionality in the requisition controller

The success modal should look similar to this, but use a font-awesome icon for the checkbox

The error modal should be similar but use a red X

Acceptance Criteria

  • After saving a requisition, a modal appears that looks similar to the mock up above
  • Clicking or pressing escape immediately close the modal
  • There is inline ngDoc documentation for navigation.modal.js
  • There are unit tests for navigation.modal.js

                                                                                                                                                   

Pre – conditions:

                                                                                                                                                                                                                               

Step


Action

Expected system response

Comment

1

Go on: host/public/#/login. 

                                                                                                                            

                                                 

2

Select Requisition > Create/ Authorize and check if:

  • After saving a requisition, a modal appears
  • Clicking or pressing escape immediately close the modal
    See also for:
     Requisition > Approve


error modal:

success modal:



OpenLMIS: the global initiative for powerful LMIS software