As an administrator (Adam), I want to be able to support multiple requisition templates per program so that different parts of my supervisory hierarchy can use simplified, stock-based forms.
This configuration flexibility is to allow stock-based requisitions to be used in some requisition workflows.
The recommended mapping for multiple templates per program is to do it by facility type (e.g. a clinic's template might be a stock-based requisition template, while a district store's template might be a regular requisition template). This will allow different levels in the hierarchy to use different templates. (Another way to configure could be through the structure itself, but this will probably lead to duplication of templates at the same level.)
Programs can have multiple templates, by facility type
R&R templates should now have names, which are unique in the system
Additions/changes to the Admin UI:
R&R Templates are its own navigation item in the Administration Menu
When choosing the navigation item, it goes to the first mockup (R&R Templates); see mockup for how it is supposed to look
Every program in the system has a section, but not every program has to have a template
Clicking on "Configure" on any template will go to the second mockup
This mockup has a different title "Configure (template name) for (program)"
It has two new tabs "Template Columns" and "Template Settings"
It uses most of the already existing "Configure R&R Template" pane, except the section has a different title "Configure Template Columns"
Clicking on the "Template Settings" tab goes to the third mockup, which allows mapping the template to multiple facility types
The facility type dropdown only shows facility types that are:
Not already in the list of facility types
Not already associated to another template for this program
Once a facility type is added, it is removed from the dropdown
Clicking "Remove" on a facility type will remove it from the list, and add it back to the dropdown
In either tab, clicking "Save" with no errors will show an alert modal that states "All changes to the requisition template columns and settings will only affect future initiated requisitions."
Clicking "Save" for the modal saves the changes and goes back to the R&R Templates page
New Zephyr test case is added to this ticket and tested
Change demo data to showcase UI
Give names to all existing requisition templates
Remove template for the "New Program" program
Associate existing template for "EPI" program with facility types "District Store", "Provincial Store"
Add new template for "EPI" program called "Vaccine Stock-Based R&R Template" with the same columns as the existing EPI template and associate it with facility type "Health Center"
Associate all other templates to all facility types in demo data (there should be four facility types in demo data)