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

Implemented Product Return Feature with routes, schema and Controllers for advance feature #893

Merged
merged 3 commits into from
Nov 9, 2024

Conversation

IkkiOcean
Copy link
Contributor

Overview:

This pull request implements the product return feature, which includes the creation, management, and tracking of product return requests. The functionality allows users to initiate return requests, admins to approve or reject them, and users to track their return history. The following routes and schema have been added to manage product returns effectively.


Routes:

  1. POST /api/returns - Create a return request
  2. PATCH /api/returns/:id - Update the return status (admin only)
  3. GET /api/returns/:id - Get detailed information of a return request
  4. GET /api/returns/user/:userId - Get the return history of a user
  5. GET /api/returns/pending - Get all pending return requests (admin only)
  6. PATCH /api/returns/cancel/:id - Cancel a return request
  7. GET /api/returns/returned - Get all returned products (admin only)
  8. GET /api/returns/damaged - Get all damaged products (admin only)
  9. GET /api/returns/product/:productId - Get all return requests for a specific product (admin only)

Schema:

  1. ReturnProduct Schema:
    • Represents the return request details, including product ID, user ID, return date, condition of the product, status of the request, and timestamps.
    • The status field tracks whether the return is "pending," "approved," "rejected," or "returned."
    • The condition field allows tracking of the product's condition ("damaged" or "good").
    • References to Product and User models for related data (populated in controllers).

Copy link

vercel bot commented Nov 8, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
agro-tech-ai ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 8, 2024 9:39pm

Copy link
Contributor

github-actions bot commented Nov 8, 2024

Thank you for submitting your pull request! 🙌 We'll review it as soon as possible. In the meantime, please ensure that your changes align with our CONTRIBUTING.md. If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@manikumarreddyu manikumarreddyu merged commit 856c008 into manikumarreddyu:main Nov 9, 2024
4 checks passed
Copy link
Contributor

github-actions bot commented Nov 9, 2024

🎉 Your pull request has been successfully merged! 🎉 Thank you for your valuable contribution to our project. Your efforts are greatly appreciated. Feel free to reach out if you have any more contributions or if there's anything else we can assist you with. Keep up the fantastic work! 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Return Product Schema and Controllers with Advance feature
2 participants