manikumarreddyu / AgroTech-AI

AgroTech AI platform is a comprehensive web-based tool where users can access various machine learning models for making accurate predictions related to agriculture
https://agro-tech-ai.vercel.app
MIT License
69 stars 115 forks source link

Implement Order History Page for Users #869

Open IkkiOcean opened 2 hours ago

IkkiOcean commented 2 hours ago

Description:

Implement the Order History page in the frontend where users can view their past orders. This page should display a list of all completed orders, including order ID, date, total amount, payment status, and the option to view order details. The frontend should fetch data from the Order History API and display it in a user-friendly format with pagination if necessary.

Steps:

  1. Design the Order History Page:
    • Create a page layout to display a list of orders with the following details:
      • Order ID
      • Order Date
      • Total Amount
      • Payment Status (Paid, Pending, etc.)
      • Order Details button (to view a detailed breakdown of each order)
  2. Integrate with Order History API:
    • Use the GET /api/orders endpoint to fetch the list of orders for the logged-in user.
    • Display a loading spinner or message while waiting for the data.
  3. Display Orders with Pagination:
    • If there are many orders, implement pagination to show a limited number of orders per page.
  4. Order Details Page:
    • When users click on the "Order Details" button, show a modal or a new page with detailed information about the selected order (items, shipping details, etc.).
  5. Styling:
    • Use Tailwind CSS or Bootstrap for layout and styling of the page.
    • Ensure the page is responsive for both desktop and mobile views.
github-actions[bot] commented 2 hours ago

Thank you for creating this issue! 🎉 We'll look into it as soon as possible. In the meantime, please make sure to provide all the necessary details and context. If you have any questions or additional information, feel free to add them here. Your contributions are highly appreciated! 😊

You can also check our CONTRIBUTING.md for guidelines on contributing to this project.