Closed ambroisegithub closed 2 months ago
Morning (9:00 AM - 12:00 PM):
Task: Set up project environment and dependencies. Subtasks:
Task: Design and implement product form. Subtasks:
Morning (9:00 AM - 12:00 PM):
Task: Implement Redux actions and reducers. Subtasks:
Task: Integrate form submission with API POST method. Subtasks:
Morning (9:00 AM - 12:00 PM):
Task: Implement client-side form validation. Subtasks:
Task: Write unit tests for the add product functionality. Subtasks:
Description
As a vendor, I need to be able to add new products to my inventory via the vendor dashboard. This involves creating a form for product details, integrating it with Redux Toolkit for state management, implementing POST methods to send product data to the backend API, and writing unit tests to ensure functionality and reliability.
Acceptance Criteria
[ ] Implement a form in the vendor dashboard for adding new products.
[ ] Integrate form state management with Redux Toolkit.
[ ] Validate input fields (name, price, category, etc.) to ensure data integrity.
[ ] Integrate with backend API endpoint for posting new product data.
[ ] Handle success and error responses from the API.
[ ] Display appropriate feedback messages for the user.
[ ] Write unit tests to verify form submission and API integration.
Tasks
Design Form Components
Create React components for the product form inputs.
Use TailwindCSS for styling and responsiveness.
Implement Form Validation
Validate input fields on the client-side for required fields and format (e.g., price, dates).
Display error messages for invalid input.
Integrate with Backend API
Develop unit tests using Jest/Testing Library.
Test form submission, validation, and API integration.
Definition of Done
The product form is implemented and styled according to design specifications.
Form inputs are validated for correctness and completeness.
Integration with backend API for posting new products is functional.
Unit tests are written and passing, covering form submission and API interactions.