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 in Vendor Dashboard #67

Merged
merged 1 commit into from
Jul 20, 2024

Conversation

ambroisegithub
Copy link
Collaborator

@ambroisegithub ambroisegithub commented Jul 2, 2024

Description

This pull request aims to enable vendors to add new products to their inventory via the vendor dashboard. It 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 ensuring functionality and reliability through comprehensive unit testing.

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.
  • 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 POST methods to send product data to the backend API.

  • Handle success and error responses from the API.

  • Write Unit Tests

  • Write Jest/Testing Library tests to verify 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 ambroisegithub self-assigned this Jul 2, 2024
@ambroisegithub ambroisegithub linked an issue Jul 2, 2024 that may be closed by this pull request
7 tasks
@ambroisegithub ambroisegithub changed the title Implement "Add Product" Functionality in Vendor Dashboard #66 Implement "Add Product" Functionality in Vendor Dashboard Jul 2, 2024
@ambroisegithub ambroisegithub force-pushed the ft-vendor-should-add-product-#66 branch from 100cf29 to 97b0633 Compare July 3, 2024 11:08
Copy link

netlify bot commented Jul 3, 2024

Deploy Preview for dynamite-frontend ready!

Name Link
🔨 Latest commit 7a23a12
🔍 Latest deploy log https://app.netlify.com/sites/dynamite-frontend/deploys/669b65b5dc7c3600080db73b
😎 Deploy Preview https://deploy-preview-67--dynamite-frontend.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2024

Codecov Report

Attention: Patch coverage is 94.96403% with 42 lines in your changes missing coverage. Please review.

Project coverage is 74.60%. Comparing base (8565693) to head (7a23a12).

Files Patch % Lines
src/components/dashBoard/Table.tsx 10.00% 18 Missing ⚠️
src/components/dashBoard/addProducts.tsx 97.54% 16 Missing ⚠️
src/components/dashBoard/EditProduct.tsx 33.33% 2 Missing ⚠️
src/utils/cloudinary.tsx 50.00% 2 Missing ⚠️
src/components/Orders/EditableOrder.tsx 0.00% 0 Missing and 1 partial ⚠️
src/components/form/HSInput.tsx 66.66% 1 Missing ⚠️
src/pages/SignIn.tsx 0.00% 1 Missing ⚠️
src/pages/TwoFactorAuthForm.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #67      +/-   ##
===========================================
+ Coverage    71.97%   74.60%   +2.62%     
===========================================
  Files           87       89       +2     
  Lines         8094     8908     +814     
  Branches       471      527      +56     
===========================================
+ Hits          5826     6646     +820     
+ Misses        2260     2254       -6     
  Partials         8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ambroisegithub ambroisegithub force-pushed the ft-vendor-should-add-product-#66 branch 7 times, most recently from 6ef2dfa to 24b3e75 Compare July 10, 2024 12:17
@ambroisegithub ambroisegithub force-pushed the ft-vendor-should-add-product-#66 branch 12 times, most recently from 178e5ca to 2c81ffb Compare July 17, 2024 14:18
@ambroisegithub ambroisegithub requested review from wayneleon1 and jkarenzi and removed request for wayneleon1 and jkarenzi July 17, 2024 14:20
@ambroisegithub ambroisegithub force-pushed the ft-vendor-should-add-product-#66 branch 11 times, most recently from d8d270c to 35a225d Compare July 19, 2024 11:39
@ambroisegithub
Copy link
Collaborator Author

ambroisegithub commented Jul 19, 2024

Screenshot from 2024-07-19 13-37-40
Screenshot from 2024-07-19 13-33-45
Screenshot from 2024-07-19 13-43-49

Screenshot from 2024-07-19 13-56-44
Screenshot from 2024-07-19 13-57-26
Screenshot from 2024-07-19 13-57-48

@ambroisegithub ambroisegithub force-pushed the ft-vendor-should-add-product-#66 branch from 35a225d to dac04f1 Compare July 19, 2024 11:55
@ambroisegithub ambroisegithub added Front-End Ready for TTL Review the PR is ready to be reviewed by the TTL/Manager and removed WIP labels Jul 19, 2024
Copy link
Contributor

@wayneleon1 wayneleon1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done

@ambroisegithub ambroisegithub force-pushed the ft-vendor-should-add-product-#66 branch from dac04f1 to 7a23a12 Compare July 20, 2024 07:22
@dushimeemma dushimeemma merged commit b4e341a into develop Jul 20, 2024
6 checks passed
jkarenzi pushed a commit that referenced this pull request Jul 20, 2024
Co-authored-by: Pray Eddy SHIMWA <[email protected]>
jkarenzi pushed a commit that referenced this pull request Jul 20, 2024
vendor should add product (#67)

Co-authored-by: Pray Eddy SHIMWA <[email protected]>
niyibi250 added a commit that referenced this pull request Jul 22, 2024
rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

users can now signup with facebook (#74)

side bar implementation (#75)

implement stage 1 design of otp form (#58) (#61)

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

implementation of dashboard nav bar (#79)

added Admin Dashboard Home (#85)

fix bannerSection (#87)

feat(dashboard-metrics): implement visitor insights chart and top categories (#84)

- implement visitor insights chart
- implement top categories section

[Delivers #73]

Fix image and routing (#92)

fix lint error

finall fix lint

finall fix lint

show message when product deleted

fix the commit

fix console lint error

Fix image and routing (#92)

finall fix lint

show message when product deleted

fix the commit

fix console lint error

fix the store

fix the husky

add created at column

Co-authored-by: Rurangwa Leo <[email protected]>

vendor should add product (#67)

Co-authored-by: Pray Eddy SHIMWA <[email protected]>

feat(product-details-page): implement product details page (#108)

- implement product details ui components
-write appropriate tests

[Delivers #101]

Co-authored-by: AMBROISE Muhayimana <[email protected]>

implemented add to cart and cart (#112)

added Seller Dashboard (#110)

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

fix the add new product button

fix the add new product button
dushimeemma pushed a commit that referenced this pull request Jul 22, 2024
rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

users can now signup with facebook (#74)

side bar implementation (#75)

implement stage 1 design of otp form (#58) (#61)

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

implementation of dashboard nav bar (#79)

added Admin Dashboard Home (#85)

fix bannerSection (#87)

feat(dashboard-metrics): implement visitor insights chart and top categories (#84)

- implement visitor insights chart
- implement top categories section

[Delivers #73]

Fix image and routing (#92)

fix lint error

finall fix lint

finall fix lint

show message when product deleted

fix the commit

fix console lint error

Fix image and routing (#92)

finall fix lint

show message when product deleted

fix the commit

fix console lint error

fix the store

fix the husky

add created at column

Co-authored-by: Rurangwa Leo <[email protected]>

vendor should add product (#67)

Co-authored-by: Pray Eddy SHIMWA <[email protected]>

feat(product-details-page): implement product details page (#108)

- implement product details ui components
-write appropriate tests

[Delivers #101]

Co-authored-by: AMBROISE Muhayimana <[email protected]>

implemented add to cart and cart (#112)

added Seller Dashboard (#110)

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

fix the add new product button

fix the add new product button
niyibi250 pushed a commit that referenced this pull request Jul 22, 2024
added Seller Dashboard (#110)

implement stage 1 design of otp form (#58) (#94) (#106)

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

users can now signup with facebook (#74)

side bar implementation (#75)

implement stage 1 design of otp form (#58) (#61)

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

implementation of dashboard nav bar (#79)

added Admin Dashboard Home (#85)

fix bannerSection (#87)

feat(dashboard-metrics): implement visitor insights chart and top categories (#84)

- implement visitor insights chart
- implement top categories section

[Delivers #73]

Fix image and routing (#92)

fix lint error

finall fix lint

finall fix lint

show message when product deleted

fix the commit

fix console lint error

Fix image and routing (#92)

finall fix lint

show message when product deleted

fix the commit

fix console lint error

fix the store

fix the husky

add created at column

Co-authored-by: Rurangwa Leo <[email protected]>

vendor should add product (#67)

Co-authored-by: Pray Eddy SHIMWA <[email protected]>

feat(product-details-page): implement product details page (#108)

- implement product details ui components
-write appropriate tests

[Delivers #101]

Co-authored-by: AMBROISE Muhayimana <[email protected]>

implemented add to cart and cart (#112)

added Seller Dashboard (#110)

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

fix the add new product button

fix the add new product button

 add the best selling products table in admin dashboard (#107)

Added changes on footer (#117)

fix link to product details

fix link to product details

fix link to product details

fix link to product details

 add the best selling products table in admin dashboard (#107)

Added changes on footer (#117)

fix link to product details

fix link to product details

fix link to product details

fix link to product details
dushimeemma pushed a commit that referenced this pull request Jul 22, 2024
added Seller Dashboard (#110)

implement stage 1 design of otp form (#58) (#94) (#106)

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

users can now signup with facebook (#74)

side bar implementation (#75)

implement stage 1 design of otp form (#58) (#61)

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

implementation of dashboard nav bar (#79)

added Admin Dashboard Home (#85)

fix bannerSection (#87)

feat(dashboard-metrics): implement visitor insights chart and top categories (#84)

- implement visitor insights chart
- implement top categories section

[Delivers #73]

Fix image and routing (#92)

fix lint error

finall fix lint

finall fix lint

show message when product deleted

fix the commit

fix console lint error

Fix image and routing (#92)

finall fix lint

show message when product deleted

fix the commit

fix console lint error

fix the store

fix the husky

add created at column

Co-authored-by: Rurangwa Leo <[email protected]>

vendor should add product (#67)

Co-authored-by: Pray Eddy SHIMWA <[email protected]>

feat(product-details-page): implement product details page (#108)

- implement product details ui components
-write appropriate tests

[Delivers #101]

Co-authored-by: AMBROISE Muhayimana <[email protected]>

implemented add to cart and cart (#112)

added Seller Dashboard (#110)

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

feat(wishlist): implement buyer wishlist (#100)

- implement wishlist UI components

[Delivers #96]

implement stage 1 design of otp form (#58) (#61) (#88)

working on orders page

rebase from dev and fix eslint errors

implement nextSibling functiion

implement previousSibling while you delete

rebase from develop

resolve deployment errors

implement 2fa functionality

working on verify otp codes and redirect

rebasing from develop

resolve vendor token must be string

implement 2fa verfication

Co-authored-by: Rurangwa Leo <[email protected]>

fix the image on popular section on langing page

fix the image on popular section on langing page

add exclude for caverage

fix the add new product button

fix the add new product button

 add the best selling products table in admin dashboard (#107)

Added changes on footer (#117)

fix link to product details

fix link to product details

fix link to product details

fix link to product details

 add the best selling products table in admin dashboard (#107)

Added changes on footer (#117)

fix link to product details

fix link to product details

fix link to product details

fix link to product details

Co-authored-by: NIYOMUGABO BERNARD <[email protected]>
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
Development

Successfully merging this pull request may close these issues.

Implement Add Product Functionality for Vendor Dashboard
8 participants