The PhaseDialog component is initialized when 'siteTable` mounts, and fetches the phase data. When the user creates a phase, closes the modal and re-opens it, the component doesn't re-fetch the data therefore the validation fails, as the newly created phase isn't in the array being used for validation.
If the component is not opened, reset the 'isPendingRequests flag, and only fetch data if that flag is true and modal is open.
BUG fix
PhaseDialog
component is initialized when 'siteTable` mounts, and fetches the phase data. When the user creates a phase, closes the modal and re-opens it, the component doesn't re-fetch the data therefore the validation fails, as the newly created phase isn't in the array being used for validation.'isPendingRequests
flag, and only fetch data if that flag is true and modal is open.https://user-images.githubusercontent.com/25125247/225445419-c710e5fb-5614-4fed-9eca-59890005e656.mov