The Facility Type select doesn't work correctly in the Add Requisition Template modal

Description

I noticed an issue during regression tests. When one tries to add a facility type without choosing it in the "Add Requisition Template" modal, it gets added to the table either way, causing a console error. When one tries to remove it, it stays there, and the second console error, as visible on the screenshot, occurs.

Reproduction steps:

  1. Log into the application as administrator.

  2. Navigate to Administration > Requisition Templates.

  3. Click the "Add Requisition Template" button.

  4. Click the "Add Facility Type" button without selecting any facility type.

  5. An entry appears in the table with facility types, causing the first console error.

  6. Click the "Remove" button.

  7. The entry isn't removed, and the second console error occurs.

Expected behavior:

  • User cannot click Add Facility button until a Program and Facility Type are selected.

Environment

None

Assignee

Ian Manyama

Reporter

Joanna Bebak

Story Points

2

Time tracking

8h

Epic Link

Components

Sprint

None

Fix versions

Priority

Major
Configure