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

Implement Add Product Functionality for Vendor Dashboard #65

Closed
7 tasks
ambroisegithub opened this issue Jul 2, 2024 · 1 comment · Fixed by #67
Closed
7 tasks

Implement Add Product Functionality for Vendor Dashboard #65

ambroisegithub opened this issue Jul 2, 2024 · 1 comment · Fixed by #67
Labels
Front-End Ready for TTL Review the PR is ready to be reviewed by the TTL/Manager

Comments

@ambroisegithub
Copy link
Collaborator

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.
@ambroisegithub
Copy link
Collaborator Author

Implementation Plan: Three-Day Timeline

Day 1: July 03, 2024

Morning (9:00 AM - 12:00 PM):

Task: Set up project environment and dependencies.
Subtasks:

  • Create branch and raise PR of my work in existing React project.
  • Install necessary packages (TailwindCSS, Redux Toolkit, Axios) if any.

Afternoon (1:00 PM - 5:00 PM):

Task: Design and implement product form.
Subtasks:

  • Create form components (name, price, category, etc.).
  • Style form using TailwindCSS for responsiveness.
  • Integrate form state with Redux Toolkit.

Day 2: July 03, 2024

Morning (9:00 AM - 12:00 PM):

Task: Implement Redux actions and reducers.
Subtasks:

  • Create Redux slice for managing product state.
  • Implement action creators for adding a new product.
    Afternoon (1:00 PM - 5:00 PM):

Task: Integrate form submission with API POST method.
Subtasks:

  • Implement API service for sending product data.
  • Handle success and error responses from the API.

Day 3: July 04, 2024

Morning (9:00 AM - 12:00 PM):

Task: Implement client-side form validation.
Subtasks:

  • Validate input fields (e.g., required fields, format validation).
  • Display error messages for invalid inputs.
    Afternoon (1:00 PM - 5:00 PM):

Task: Write unit tests for the add product functionality.
Subtasks:

  • Test form components using React Testing Library.
  • Mock Redux actions and reducers for testing Redux integration.
  • Test API integration with Jest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Front-End Ready for TTL Review the PR is ready to be reviewed by the TTL/Manager
Projects
None yet
2 participants