Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Admin Dashboard - Update Feature Flag #799

Open
tobi-bams opened this issue Dec 19, 2024 · 2 comments
Open

Admin Dashboard - Update Feature Flag #799

tobi-bams opened this issue Dec 19, 2024 · 2 comments
Labels

Comments

@tobi-bams
Copy link
Collaborator

Admin Dashboard - Update Feature Flag


Description:

Implement the functionality to edit and update feature flags from the Admin Dashboard.


Deliverables:

  1. Update Button:

    • Use the "Edit" button on the feature flags table.
  2. Edit Modal:

    • Clicking "Edit" should open a modal pre-populated with the feature flag's current details:
      • Name (text input)
      • Description (textarea)
      • Enabled status (toggle)
    • Allow changes to the above fields and submit.
  3. API Integration:

    • Call PUT /feature_flags/{id} with the updated details.
    • Request Body Example:
      {
        "name": "Updated Chat",
        "description": "Updated description for chat feature",
        "enabled": true
      }
    • Expected Response:
      {
        "success": true,
        "message": "Feature flag updated successfully",
        "data": {
          "name": "Updated Chat",
          "description": "Updated description for chat feature",
          "enabled": true,
          "uuid": "uuid-123",
          "endpoints": [
            { "path": "/api/chat", "uuid": "uuid-ep-1" },
            { "path": "/api/chat/:id", "uuid": "uuid-ep-2" }
          ]
        }
      }
  4. Dynamic UI Update:

    • After a successful API call, update the feature flag's details in the table without reloading the page.
  5. Validation & Error Handling:

    • Validate user inputs (e.g., name and description should not be empty).
    • Handle errors from the API and display appropriate messages in the modal.

Testing Checklist:

  • Ensure the "Edit" button opens a modal with pre-filled data.
  • Validate form inputs for required fields.
  • Confirm that the feature flag's updated details reflect accurately in the table after submission.
  • Handle API errors gracefully and display feedback to the user.
@Ekep-Obasi
Copy link
Contributor

Ekep-Obasi commented Dec 19, 2024

@tobi-bams @humansinstitute please assign me

@AhsanFarooqDev
Copy link
Contributor

@tobi-bams can I help

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants