When the toggle is active the frontend should request the invite link from the backend and display it in the UI. This invite link allows anyone to join the workspace. Admins should be able to copy this link easily using the provided "Copy link" button.
User Story:
As an admin, I want to toggle the invite link option to be active and have the invite link automatically retrieved from the backend and displayed, so I can easily share the link to invite others to join my workspace.
Requirements:
When the toggle switch is enabled, the frontend should make an API call to the backend to retrieve the invite link. The invite link should be displayed in the invite link field. The "Copy link" button should be enabled and allow the admin to copy the invite link to the clipboard.
When the toggle switch is disabled, The invite link field and "Copy link" button should not be displayed.
If there is an error retrieving the invite link from the backend, display an appropriate error message and keep the invite link field hidden.
Acceptance Criteria
When the toggle switch is enabled, the frontend should fetch the invite link from the backend and display it in the invite link field.
The "Copy link" button should be active and allow the admin to copy the link.
An error message should be shown, if retrieval of the link from the backend is not successful and the invite link field should remain hidden.
Expected Outcome:
The invite link is retrieved from the backend and displayed only when the toggle switch is enabled, Admins can copy the link, and any errors in fetching the link are appropriately handled and communicated.
Description
When the toggle is active the frontend should request the invite link from the backend and display it in the UI. This invite link allows anyone to join the workspace. Admins should be able to copy this link easily using the provided "Copy link" button.
User Story:
As an admin, I want to toggle the invite link option to be active and have the invite link automatically retrieved from the backend and displayed, so I can easily share the link to invite others to join my workspace.
Requirements:
Acceptance Criteria
Expected Outcome:
The invite link is retrieved from the backend and displayed only when the toggle switch is enabled, Admins can copy the link, and any errors in fetching the link are appropriately handled and communicated.
Links
https://github.com/hngprojects/hng_boilerplate_nestjs/issues/808 (backend) | [
FIGMA LINK
] (https://www.figma.com/design/VEItfX6St5NSAqqNHImcxD/HNG-Boilerplate-Designs?node-id=10-16358&m=dev)Images