These tickets could be more granular, but I combined implementation details and acceptance criteria into a single set of bullet point items. Depending on the needs of the engineer it would be easy to accompany with more detailed instruction, or a loom walkthrough / kickoff.
Database migration and ORM model
Update CSV Output
Update getShiftsByFacility
CRUD API Endpoint
Add form field in UI
Migrate database agents
table to include new text column custom_facility_agent_id
and update ORM model in API to reflect the changes.
2-5 hours
- Add a text column
custom_facility_agent_id
toagents
table for all environments (dev, staging, prod) - Commit migration file and run (/migrations/[date-time]-create-agents.js)
- Update agents ORM model in API (/models/agents.js)
Render custom_facility_agent_id
in CSV
1-3 hours
- CSV includes
custom_facility_agent_id
when exists on agent - CSV agent metadata structure is
name, id, phone, email, custom facility agent id
- Integration test coverage includes case for
custom_facility_agent_id
existing and is null.
Include new custom_facility_agent_id
field in agent metadata when fetching shifts by facility.
1-3 hours
- Make sure that the agent metadata returned from
getShiftsByFacility()
includescustom_facility_agent_id
- Test coverage includes unit tests for new column existing and null
Update API endpoints api.app.io/:facility_id/:agent_id
3-5 hours
- Include
custom_facility_agent_id
in CRUD API endpoints - Add validation to endpoint (alphanumeric, nullable)
- Add functional tests for endpoints (create, read, update, and delete)
Update UI on app.io/:facility_id/:agent_id to text field to add or update the custom facility id for an agent.
2-4 hours
- Include
custom_facility_agent_id
form field that accepts alphanumeric characters (using text component) - Form label will include (optional)
- Input will show "please only use alphanumeric characters" if input contains any unaccepted character types.
- Form will show "toast" error component if the input is invalid
- Add cypress tests for smoketest, submitting the form, and invalid chars