Create Edit Supply Partner page

Description

Create Edit Supply Partner page for adding associating facilities and products to supply partners.

Acceptance Criteria

  • The screen should be available under /administration/supplyPartners/ {id}URI

  • Add "Edit" button on the View Supply Partners page for each Supply Partner

  • The screen should match the mockup from OLMIS‌-5353

  • When admin adds a new supply partner, only the available and not previously assigned program and supervisory nodes are available to select. When admin tries to add an association for a program-supervisory node combination that is already covered an error should be shown (changing this because there is no way to hide them as this is a combination and not a single list of values, FYI )

  • To add a facility, the Admin can search by facility name or facility code

    • List of available facilities to associate must already be assigned to the program and supervisory node

      • please use the following endpoint: GET /api/supervisoryNode/{id}/facilities?programId={programId}

      • please make sure to use the ID of regular SN. It should be possible to get this value by using partnerNodeOf field from SN that is used an association

      • The list of associated facilities in the Add Association modal only shows facilities already associated (does not show the entire list of available facilities to reduce clutter)

  • To add a product, the Admin can search by product name or product code

    • List of available products to associate must be assigned to the program and facility type(s)

      • please use the following endpoint: GET /api/facilityTypeApprovedProducts?facilityType={facilityType1}&facilityType={facilityType2}&facilityType={facilityType3}&…

      • please make sure to use the given facility type only one time in a request → to avoid too long URLs

      • The list of associated products in the Add Association modal only shows products already associated (does not show the entire list of available products to reduce clutter)

    • Edge case: If a product has already been assigned to another supply partner, then the admin should not be able to assign to a new or different existing supply partner. (*

      should they see the product in the list to select? No, only single supply partner can supply a product (for a single supervisory node)

      *)

  • There is text explaining to admin user how to add facilities and products

Activity

Show:
Joanna Szymańska
November 29, 2018, 5:52 PM

I checked everything again, and everything works fine.

Joanna Szymańska
November 29, 2018, 4:20 PM

After re-testing, I see that only missing popovers as I wrote in point 12.

Joanna Szymańska
November 29, 2018, 12:45 PM
Edited


15. I also noticed that the product search by code works but only if the code is entered at the beginning, I think that it should be possible to enter any string of numbers and all matching records should display.

EDIT: The same situation occurs when I click "View" in the "Products" or "Facilities" columns and try to search for products or facility by code.

Joanna Szymańska
November 29, 2018, 12:26 PM
Edited


14. I have also noticed that when I enter the Add Association or Edit Association, I have just clicked the "Add Products" and once again "Add Products", the screen closes as if I had clicked the "Cancel" button, it should display the information that I did not add any product.

Joanna Szymańska
November 29, 2018, 10:33 AM
Edited


13. I started testing and I see that when I start to edit the association, the assigned products and facilities disappear, even though they are still visible in the Supply Partner edition table.

Done

Assignee

Nikodem Graczewski

Reporter

Nikodem Graczewski

Labels

Story Points

5

Time tracking

0m

Time remaining

0m

Components

Sprint

None

Fix versions

Priority

Major