Invite members modal - add refreshing of modal data needed on every modal launch
Details
This issue is created for continuing the work started in !104965 (merged) for issue https://gitlab.com/gitlab-org/gitlab/-/issues/323226
The current solution for https://gitlab.com/gitlab-org/gitlab/-/issues/323226 is to trigger a page refresh after a member is invited on the Project/Group members page.
The solution implemented in !104965 (merged) is not an ideal fix and another iteration is required.
Possible Solution
See https://gitlab.com/gitlab-org/gitlab/-/issues/323226#note_1196354625
Next iteration
- Add refreshing of modal data that need updating on every modal launch. For the invite members modal, this will be things like the below from common_invite_modal_dataset
reached_limit: free_user_cap.reached_limit?, close_to_dashboard_limit: free_user_cap.close_to_dashboard_limit?, remaining_seats: free_user_cap.remaining_seats, free_users_limit: ::Namespaces::FreeUserCap.dashboard_limit
- Remove our flash/cookie solution from the first iteration.