Educado-App / educado-frontend

The repository for the educado content creation web platform.
https://app.educado.com
GNU General Public License v3.0
0 stars 4 forks source link

[Web - Admin] Institutions CRUD #129

Open iarandrd opened 2 days ago

iarandrd commented 2 days ago

As a content creator, I want to manage the institutions

Figma: https://www.figma.com/design/BCEVQYvMDrcBE9qqehr9HL/Mobile-Education-UI?node-id=5217-8061&t=5ai9ByHIYOhBLRiC-4

LazarShockX commented 1 day ago

Acceptance Criteria

1. Admin Tab Visibility: Given a user with admin permissions, When the admin logs in to the platform, Then a new tab labeled "Institutions" should be visible on the admin page. Given a user without admin permissions, When the user logs in, Then the "Institutions" tab should not be visible on the admin page.

2. Institutions Management Table: Given an admin user on the "Institutions" tab, When the page loads, Then a table should display the list of institutions. The table should include columns for institution name and email address.

3. Add Institution: Given an admin user on the "Institutions" tab, When the user clicks the "Add" button, Then a form should appear allowing the admin to input: Institution name Email address When the admin fills out the form and clicks "Submit," Then the new institution should be added to the table and stored in the system.

4. Edit Institution: Given an admin user on the "Institutions" tab, When the user clicks the "Edit" button on a specific institution row, Then an editable form should appear with the current institution's details pre-filled. When the admin modifies the details and clicks "Save," Then the updated institution details should be reflected in the table and stored.

5. Delete Institution: Given an admin user on the "Institutions" tab, When the user clicks the "Delete" button on a specific institution row, Then a confirmation prompt should appear asking the admin to confirm the deletion. When the admin confirms the action, Then the institution should be removed from the table and deleted from the system.

6. CRUD Functionalities: Create: Admin can add a new institution. Read: Admin can view the list of institutions in a table format. Update: Admin can edit existing institutions. Delete: Admin can delete institutions from the system.

7. Data Validation: When adding or editing an institution, Then the email address should be validated for proper email format. When an invalid email is entered, Then an error message should be displayed, and the institution should not be saved until a valid email is provided.

8. Permissions: Given a user without admin permissions, When they attempt to access the Institutions management page (e.g., via URL), Then they should receive an "Access Denied" message or be redirected to the homepage.