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

Feature Request - Purchase History Component #47

Closed
3 tasks done
firze20 opened this issue Jul 29, 2024 · 1 comment · Fixed by #52 or #54
Closed
3 tasks done

Feature Request - Purchase History Component #47

firze20 opened this issue Jul 29, 2024 · 1 comment · Fixed by #52 or #54
Assignees
Labels
enhancement New feature or request

Comments

@firze20
Copy link
Owner

firze20 commented Jul 29, 2024

Create component for users to check their purchase history

The purchase component should allow user to paginate and query between dates

  • Right now there is no component created yet
  • If user is not authenticated the component should still display a message to the client.
  • Component should have pagination.
Gravacao.do.ecra.2024-07-29.as.13.01.45.mov

The purchase response comes like this:

{
    "purchases": [
        {
            "id": 29,
            "totalPrice": "45.00",
            "createdAt": "2024-07-29T12:03:49.791Z",
            "items": [
                {
                    "name": "Sports Bike",
                    "price": "45.00",
                    "description": "A bike good to ride on the road",
                    "image": "https://www.reidcycles.com.au/cdn/shop/products/reid-cycles-australia-mtb-pro-27-5-disc-wsd-mountain-bike-light-blue-s-488.png?v=1620962055&width=1946"
                }
            ]
        },
        {
            "id": 24,
            "totalPrice": "100.00",
            "createdAt": "2024-07-28T20:53:47.359Z",
            "items": [
                {
                    "name": "Test-Item",
                    "price": "100.00",
                    "description": "Test-Item-Description",
                    "image": "https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png"
                }
            ]
        },
        {
            "id": 20,
            "totalPrice": "20.00",
            "createdAt": "2024-07-28T16:29:43.543Z",
            "items": [
                {
                    "name": "Mouse",
                    "price": "20.00",
                    "description": "A mouse to move the cursor",
                    "image": "https://purepng.com/public/uploads/large/purepng.com-rat-mousemouseanimalratmicerodent-981524651565fwflu.png"
                }
            ]
        },
        {
            "id": 15,
            "totalPrice": "180.00",
            "createdAt": "2024-07-28T15:45:44.790Z",
            "items": [
                {
                    "name": "Sports Bike",
                    "price": "45.00",
                    "description": "A bike good to ride on the road",
                    "image": "https://www.reidcycles.com.au/cdn/shop/products/reid-cycles-australia-mtb-pro-27-5-disc-wsd-mountain-bike-light-blue-s-488.png?v=1620962055&width=1946"
                }
            ]
        },
        {
            "id": 14,
            "totalPrice": "90.00",
            "createdAt": "2024-07-28T15:42:47.766Z",
            "items": [
                {
                    "name": "Sports Bike",
                    "price": "45.00",
                    "description": "A bike good to ride on the road",
                    "image": "https://www.reidcycles.com.au/cdn/shop/products/reid-cycles-australia-mtb-pro-27-5-disc-wsd-mountain-bike-light-blue-s-488.png?v=1620962055&width=1946"
                }
            ]
        },
        {
            "id": 13,
            "totalPrice": "90.00",
            "createdAt": "2024-07-28T15:41:00.086Z",
            "items": [
                {
                    "name": "Sports Bike",
                    "price": "45.00",
                    "description": "A bike good to ride on the road",
                    "image": "https://www.reidcycles.com.au/cdn/shop/products/reid-cycles-australia-mtb-pro-27-5-disc-wsd-mountain-bike-light-blue-s-488.png?v=1620962055&width=1946"
                }
            ]
        },
        {
            "id": 12,
            "totalPrice": "399.00",
            "createdAt": "2024-07-28T15:39:16.920Z",
            "items": [
                {
                    "name": "Steam Deck",
                    "price": "399.00",
                    "description": "A handheld gaming console",
                    "image": "https://clan.akamai.steamstatic.com/images//39049601/a1aa0624727ea6fd61bd179d214eaca1904fae45.png"
                }
            ]
        },
        {
            "id": 11,
            "totalPrice": "45.00",
            "createdAt": "2024-07-28T15:38:51.599Z",
            "items": [
                {
                    "name": "Sports Bike",
                    "price": "45.00",
                    "description": "A bike good to ride on the road",
                    "image": "https://www.reidcycles.com.au/cdn/shop/products/reid-cycles-australia-mtb-pro-27-5-disc-wsd-mountain-bike-light-blue-s-488.png?v=1620962055&width=1946"
                }
            ]
        },
        {
            "id": 10,
            "totalPrice": "45.00",
            "createdAt": "2024-07-28T15:38:31.927Z",
            "items": [
                {
                    "name": "Sports Bike",
                    "price": "45.00",
                    "description": "A bike good to ride on the road",
                    "image": "https://www.reidcycles.com.au/cdn/shop/products/reid-cycles-australia-mtb-pro-27-5-disc-wsd-mountain-bike-light-blue-s-488.png?v=1620962055&width=1946"
                }
            ]
        },
        {
            "id": 9,
            "totalPrice": "135.00",
            "createdAt": "2024-07-28T15:04:50.885Z",
            "items": [
                {
                    "name": "Sports Bike",
                    "price": "45.00",
                    "description": "A bike good to ride on the road",
                    "image": "https://www.reidcycles.com.au/cdn/shop/products/reid-cycles-australia-mtb-pro-27-5-disc-wsd-mountain-bike-light-blue-s-488.png?v=1620962055&width=1946"
                }
            ]
        }
    ],
    "totalPages": 2,
    "currentPage": 1,
    "perPage": 10
}
@firze20 firze20 pinned this issue Jul 29, 2024
@firze20 firze20 added the enhancement New feature or request label Jul 29, 2024
@firze20 firze20 assigned firze20 and unassigned firze20 Jul 29, 2024
@firze20 firze20 linked a pull request Aug 1, 2024 that will close this issue
@firze20
Copy link
Owner Author

firze20 commented Aug 1, 2024

Still needs Pagination:

image

@firze20 firze20 reopened this Aug 1, 2024
@firze20 firze20 linked a pull request Aug 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
1 participant