feat:Remove "Know Your Patient Queue" from the Queue dropdown in Volunteer Actions
Problem Statement
Currently, the Queue dropdown includes "Know Your Patient Queue", but "Know Your Patient" is not a queue-based workflow; it is a direct action available as a separate card. This creates confusion for volunteers, as they may assume it follows queue processing when it does not. The issue occurs every time the Queue dropdown is opened, and there is no proper workaround except ignoring the incorrect entry. This affects all users interacting with the Volunteer Actions module.
Proposed Solution
Remove "Know Your Patient Queue" from the Queue dropdown while keeping "Know Your Patient" available only as a main action card. Ensure that no backend logic, routing, or other queue items are affected. The user flow should remain unchanged except that the dropdown will only display valid queue items such as Vitals Queue, Consultation Queue, Prescriptions Queue, etc., and "Know Your Patient" will remain accessible separately.
Test-Driven Development
Acceptance Criteria (Given-When-Then)
Primary User Flow
Scenario 1: Queue dropdown shows only valid queues
Given user is on Volunteer Actions page And queue dropdown is available When user clicks on Queue dropdown Then "Know Your Patient Queue" should NOT be visible And all other valid queue items should be displayed And UI should render correctly without layout issues
Alternative Flows
Scenario 2: Access Know Your Patient via card
Given user is on Volunteer Actions page When user clicks on "Know Your Patient" card Then the feature should work as expected
Edge Cases
Scenario 3: Empty State
Given no queues are available When user opens dropdown Then appropriate empty state should be displayed
Scenario 4: Error State
Given queue API returns error When user opens dropdown Then error should be handled gracefully And user-friendly message should be displayed
Scenario 5: Permission Denied
Given user lacks required permissions When user attempts to access queues Then action should be blocked And appropriate message should be displayed
Unit Test Requirements
Components/Functions to Create:
| File Path | Component/Function | Test Coverage Required |
|---|---|---|
src/components/VolunteerActions |
Queue Dropdown | Render, filtering logic |
src/constants/queues |
Queue list | Ensure filtering works |
Test Assertions Required:
-
Component renders without crashing -
Component renders with correct initial state -
User interactions trigger correct handlers -
Form validation works correctly -
API calls made with correct payload -
Loading states display correctly -
Success states display correctly -
Error states display correctly -
State updates propagate correctly -
Child components receive correct props -
Callbacks are called with correct arguments
Technical Specification
Files to Create/Modify
| File Path | Action | Purpose |
|---|---|---|
src/components/VolunteerActions.tsx |
Modify | Remove/filter queue item |
src/constants/queues.ts |
Modify | Update queue configuration |
API Requirements
| Endpoint | Method | Request Body | Response | Status |
|---|---|---|---|---|
| No API change required | - | - | - | Exists |
API Types to Add:
// No new types required
UI/UX Specification
Design Requirements
Queue dropdown should include only valid queue items such as Vitals Queue, Consultation Queue, Prescriptions Queue, etc. "Know Your Patient Queue" should be removed while retaining the main "Know Your Patient" action card.
Mockups/Wireframes:
UI screenshot attached
Responsive Behavior
| Viewport | Behavior |
|---|---|
| Mobile (<576px) | Dropdown displays correctly |
| Tablet (576px-991px) | No layout issues |
| Desktop (≥992px) | Clean dropdown |
Accessibility Requirements
-
Semantic HTML elements used -
ARIA labels for interactive elements -
Keyboard navigation supported -
Focus states visible -
Screen reader compatible -
Color contrast meets WCAG standards -
Error messages linked to inputs
i18n Requirements
| String Key | Default Value (English) | Context |
|---|---|---|
queue.dropdown.title |
Queues | Dropdown label |
Definition of Done
Development
-
All acceptance criteria pass -
Unit tests written with minimum 80% coverage -
Code follows project conventions -
No TypeScript errors -
No ESLint/Prettier errors
Testing
-
Manual testing completed -
Responsive testing done -
Cross-browser testing completed
Documentation
-
Not required