Skip to content

feat: my account release 2 #2786

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

Open
wants to merge 34 commits into
base: main
Choose a base branch
from
Open

Conversation

artursantiago
Copy link
Collaborator

@artursantiago artursantiago commented Apr 14, 2025

What's the purpose of this pull request?

This is a feature branch for My Account

References

JIRA EPIC
FIGMA

🔗 Related Package PRs

🧪 How to Test

  • Testing flow: Pending 🚧

## What's the purpose of this pull request?

This PR implements the My Orders page structure within the My Account
section, focusing on the order details view. It provides users with a
comprehensive interface to view and manage their order information.

## What was done?

- Created new order details page at `/account/orders/[id]`
- Implemented structure to core order details components:
  - Order status card with order timeline
  - Order summary with items and totals
  - Delivery information card
  - Payment details card
  - Customer information card
- Added order management actions:
  - Approve/Reject buttons
  - Cancel order functionality
  - Back navigation
- Integrated with My Account layout structure

## How to test it?

1. Navigate to `/account/orders/[any-order-id]`
2. Verify that:
   - The page layout matches the Figma design
   - The structure of cards are displayed correctly
   - Action buttons (Approve, Reject, Cancel) are present
   - Back navigation works
   - The page is responsive on different screen sizes
   
## Preview

https://sfj-434a8e7--faststoreqa.preview.vtex.app/account/orders/1



## References

- [Figma
Design](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=832-50461&t=SYzv14OWeZyCUks2-4)
- [SFS-2422](https://vtex-dev.atlassian.net/browse/SFS-2422)


![image](https://github.com/user-attachments/assets/3aa7ff9b-9245-492b-a443-120c5e541549)


[SFS-2422]:
https://vtex-dev.atlassian.net/browse/SFS-2422?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Bruno Guilera Gutchenzo <[email protected]>
Co-authored-by: Eduardo Formiga <[email protected]>
@artursantiago artursantiago changed the title feat: page structure (#2758) feat: my account 2 Apr 14, 2025
@artursantiago artursantiago changed the title feat: my account 2 feat: my account release 2 Apr 14, 2025
Copy link

codesandbox-ci bot commented Apr 14, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

artursantiago and others added 26 commits April 16, 2025 09:47
> This PR depends on:
> #2758

## What's the purpose of this pull request?

This PR implements the Order Summary Card component for the My Orders
page.

## What was done?

- Created new `MyAccountSummaryCard` component with initial mocked data
- Implemented the component's structure and styling according to Figma
specs
- Integrated the component with the My Orders page structure
- Updated necessary dependencies and configurations
- Removed unused code and optimized imports
- Improved type definitions and GraphQL schemas

## How to test it?

1. Navigate to the My Account section
2. Access the Orders page
3. Verify that the Order Summary Card is displayed correctly with:
   - Order information layout
   - Proper styling and responsiveness
   - Correct data display (even if mocked for now)
   
## Preview

https://sfj-3f0c5e5--faststoreqa.preview.vtex.app/account/orders/1

## References

- [Figma
Design](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=832-51368&t=3FCKn6ZZOAaVG8qZ-4)
- [SFS-2433](https://vtex-dev.atlassian.net/browse/SFS-2433)


![image](https://github.com/user-attachments/assets/c7ce9b19-6e8e-4148-80c3-cd357ae8368f)

[SFS-2433]:
https://vtex-dev.atlassian.net/browse/SFS-2433?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Bruno Guilera Gutchenzo <[email protected]>
> This PR depends on:
> #2758

## What's the purpose of this pull request?

This PR implements the "Ordered By" card component in the My Account
Order Details page, displaying customer information including corporate
details when applicable.

## What was done?

- Created `MyAccountOrderedByCard` component
- Added mock data for order details and client profiles in
`orderDetails.ts`
- Added avatar display for corporate customers showing the first letter
of the company name
- Integrated the component into the main order details view

## How to test it?

1. Navigate to the My Account section
2. Access any order details page
3. Verify that the "Ordered By" card displays:
   - For corporate customers:
     - Company name with avatar (first letter)
     - Customer's full name
     - Contact information (phone and email)
   - For individual customers:
     - Customer's full name
     - Contact information (phone and email)

## Preview
https://sfj-b4402e1--faststoreqa.preview.vtex.app/account/orders/1

## References

- [Figma
Design](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=832-51265&t=7eEAe7QGUOWhq2vk-4)
- [SFS-2433](https://vtex-dev.atlassian.net/browse/SFS-2435)


![image](https://github.com/user-attachments/assets/920a0e99-3ee1-4b42-a3f2-9cef937a233d)

[SFS-2433]:
https://vtex-dev.atlassian.net/browse/SFS-2433?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Bruno Guilera Gutchenzo <[email protected]>
## What's the purpose of this pull request?

This PR aims to move the getServerSideProps from each my account page to
its own implementation instead of a general one.

This PR also adds `user-details` and `security` pages with own SSR
functions.

## How it works?

This should work as before.

The order ID should now come from SSR instead of the client
(`useRouter`).


### Starters Deploy Preview

- vtex-sites/faststoreqa.store#772

preview:
https://starter-ceshp4j3i-vtex.vercel.app/account/profile
## What's the purpose of this pull request?

This PR aims to enable the section extension points for known pages of
my account:
- packages/core/src/pages/account/orders/[id].tsx
- packages/core/src/pages/account/user-details.tsx
- packages/core/src/pages/account/security.tsx
- packages/core/src/pages/account/profile.tsx
- packages/core/src/pages/account/orders/index.tsx

It also removes the mocked styles from pages and wraps the
`MyAccountLayout` children in a section so that the children can appear
in the right place of the grid.

// TODO documentation

## How it works?

To enable the extensions, the user should create files named
`before.tsx` and `after.tsx`, representing components inside the
`src/myAccount/extensions/<page-name>` folders. Also these components
must be exported as default.

where `<page-name>` is one of the default pages:
- orders/
- user-details/
- security/
- profile/
- orders/
- orders/[id]/

These files are copied to the final repo using faststore cli.

```js
// src/myAccount/extensions/orders/[id]/after.tsx
function After() {
  return <div>After the default sections, this section is shown :)</div>
}

export default After
```

<img width="500" alt="Screenshot 2025-04-14 at 18 55 03"
src="https://github.com/user-attachments/assets/e02de5f0-71b0-44e4-90ff-f6374b5f7583"
/>


## How to test it?

Locally, you can create a file as mentioned above and run `yarn dev.`
This section should be shown.
http://localhost:3000/account/orders/2

Check the preview link below


### Starters Deploy Preview

- vtex-sites/faststoreqa.store#773

preview
https://starter-3r3986c54-vtex.vercel.app/account/orders/2
## What's the purpose of this pull request?

This PR aims to create the order details query (OMS) in
`@faststore/api`.
It also calls the query from the corresponding page in
`@faststore/core`, integrates the data, and removes the mocks.

## How it works?

It uses the new order details API to get the order and pass it to the
corresponding page.
This API uses the `VtexIdclientAutCookie` to check permissions, so you
must log in first.

## How to test it?

In localhost, you must replicate the `VtexIdclientAutCookie` created
after logging in.

1. Log in using an account (e.g., storeframework -
https://homebrewqa.fast.store/).
2. Place and order using the faststore > minicart > checkout.
3. Get the order ID created when you finish an order or use the admin >
orders.
4. You should see some order details on the page
`/account/orders/<your-order-id>`

### Starters Deploy Preview

TBD
## What's the purpose of this pull request?

This pull is to centralize and streamline the feature flag check and
redirection logic for my account feature.

## How it works?

* Added `getMyAccountRedirect` in `src/utils/myAccountRedirect.tsx`.
This function checks if the Faststore My Account feature is enabled and
determines the appropriate redirection destination based on the feature
flag and query parameters.

* Updated the `getServerSideProps` function in multiple pages
(`account/index.tsx`, `account/orders/[id].tsx`,
`account/orders/index.tsx`, `account/profile.tsx`,
`account/security.tsx`, `account/user-details.tsx`) to use
`getMyAccountRedirect` for handling redirection logic. This ensures
consistent behavior across all pages.

## How to test it

you can enable or disable the `enableFaststoreMyAccount` flag in
discovery.config.js and try to access any my account page.
`enableFaststoreMyAccount` true should use faststore
`enableFaststoreMyAccount` false should redirect to IO

### Starters Deploy Preview

TBD
## What's the purpose of this pull request?

Updates the graphql userOrder schema
## What's the purpose of this pull request?

This PR aims to create the types and resolvers that build the delivery
options concept used in the order details page. With this data, we can
fill out the Delivery card and the delivery option accordion in the
front end.

## How it works?

It groups some similar data from `shippingdata` and `logisticInfo` and
calls it a delivery option (or package).
```js
const groupKey = `${selectedSla}|${deliveryChannel}|${deliveryCompany}|${seller}|${shippingEstimate}|${shippingEstimateDate}|${addressId}|${deliveryWindow?.startDateUtc}|${deliveryWindow?.endDateUtc}`
```

It also handles some friendly names so that we can show them in the
interface.

## How to test it?

You can see the data that comes with an order in the order details page.

```json
{
  "data": {
    "userOrder": {
      "deliveryOptionsData": {
        "deliveryOptions": [
          {
            "selectedSla": "Normal",
            "deliveryChannel": "delivery",
            "deliveryCompany": "Transportadora",
            "shippingEstimate": "3bd",
            "shippingEstimateDate": "2025-04-29T12:00:00.0000000+00:00",
            "friendlyShippingEstimate": "Up to 3 business days",
            "friendlyDeliveryOptionName": "Normal Delivery Up to 3 business days",
            "seller": "1",
            "address": {
              "addressType": "residential",
              "receiverName": "123",
              "addressId": "23984897234798",
              "versionId": null,
              "entityId": null,
              "postalCode": "23048",
              "city": "Recife",
              "state": "FL",
              "country": "USA",
              "street": "XXX AAAA",
              "number": null,
              "neighborhood": null,
              "complement": null,
              "reference": null,
              "geoCoordinates": [
                -1154358.19,
                323453454.01
              ]
            },
            "pickupStoreInfo": {
              "additionalInfo": null,
              "address": null,
              "dockId": null,
              "friendlyName": null,
              "isPickupStore": false
            },
            "quantityOfDifferentItems": 2,
            "total": 118000,
            "items": [
              {
                "name": "Aedle VK-1 L Headphone Leather",
                "quantity": 4,
                "price": 13000,
                "imageUrl": "https://storeframework.vteximg.com.br/arquivos/ids/190901-55-55/unsplash-headphone.jpg?v=637800115948430000",
                "tax": 0,
                "total": 52000
              },
              {
                "name": "4k Philips Monitor 27” Monitor 27",
                "quantity": 3,
                "price": 22000,
                "imageUrl": "https://storeframework.vteximg.com.br/arquivos/ids/190903-55-55/unsplash-monitor.jpg?v=637800152494200000",
                "tax": 0,
                "total": 66000
              }
            ]
          }
        ],
        "contact": {
          "email": "",
          "phone": "",
          "name": "123"
        }
      }
    }
  }
}
```

### Starters Deploy Preview

TBD
## What's the purpose of this pull request?

 temp enable my account fs flag
## What's the purpose of this pull request?

Add a new Payment Card component in the My Orders section that displays
payment details with visual payment method indicators.

## What was done?

- Created a new `MyAccountPaymentCard` component that displays payment
details including payment method, value, transaction IDs and
installments
- Implemented `MyAccountPaymentFlagsIcon` component to show visual
indicators for different payment methods (credit cards, bank invoices,
digital wallets)
- Added support for displaying different payment types:
  - Credit and debit cards (with last digits display)
  - Bank invoices (with invoice number and print option)
  - PayPal
  - Gift cards
  - Apple Pay and Google Pay
- Updated mock data to support various payment scenarios and types
- Added styling for payment card elements following the design system

## How to test it?

1. Navigate to Order Details by preview
2. Verify the Payment Card displays correctly with:
   - Payment method name and icon
   - Payment value with currency formatting
   - Transaction IDs when available
   - For bank invoices: invoice number and "Print Bank Invoice" link
   - For credit cards: installment details and last digits
   - For gift cards: redemption code
   
### Preview

https://sfj-43d0e54--faststoreqa.preview.vtex.app/account/orders/1   

## References

- [Figma
Design](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=1625-139132&t=Ey1ZAVGJyCRS4b9S-4)
- [JIRA SFS-2425](https://vtex-dev.atlassian.net/browse/SFS-2425)


![image](https://github.com/user-attachments/assets/50abe652-2ec6-4908-b4e0-9e34911f4d37)

![image](https://github.com/user-attachments/assets/106c9ff7-5503-470d-89d3-656b683975b4)

![image](https://github.com/user-attachments/assets/99bc4f57-a064-4277-83df-0ba12ad4b71d)

![image](https://github.com/user-attachments/assets/640151b5-8fc1-47c3-8737-76f01a6b42b9)
## What's the purpose of this pull request?

This PR aims to implement the cancel order graphql mutation. It also
create a hook to be used in frontend.

## How it works?
If you have the permission, you can cancel the order. 

Example:

<img width="1301" alt="Screenshot 2025-04-29 at 19 33 15"
src="https://github.com/user-attachments/assets/b530de3b-e260-4509-8101-a7865fed29b2"
/>

## How to test it?

Now, only use this mutation and pass the corresponding cookie in the
request.
Or maybe you can simulate the use of the new `useCancelOrder` hook
somehow.
## What's the purpose of this pull request?

removes the beginning of the friendly name

before
<img width="777" alt="Screenshot 2025-04-30 at 11 39 01"
src="https://github.com/user-attachments/assets/e32445a3-91ac-497b-9536-38ddd3ac58ea"
/>
## What's the purpose of this pull request?

This PR aims to implement the 404 page error with the page structure
(global sections) + my account menu.

![Apr-30-2025
19-27-51](https://github.com/user-attachments/assets/ab37a778-3fda-46ab-ac8e-d04c1fd6241a)


## How it works?

It creates a custom 404 page for unknown account routes and for 404
error cases.

## How to test it?

Attempts to access some unknown route like `/account/profile/123` or
`/account/123`

### Starters Deploy Preview

TBD
## What's the purpose of this pull request?

This PR aims to implement FastStore API list order request. It also
brings the data to the frontend.

## How it works?

It calls the OMS API to get the corresponding list of orders.

## How to test it?

You can login and use the URL:
http://localhost:3000/account/orders
<img width="1303" alt="Screenshot 2025-04-29 at 17 06 17"
src="https://github.com/user-attachments/assets/939b2139-0a92-426e-9ce6-d3da429105e0"
/>


### Starters Deploy Preview
TBD
## What's the purpose of this pull request?

Implements the delivery options accordion in the order details page,
allowing users to view delivery information and products for each
delivery option in an organized, collapsible interface.

## What was done?

- Created new `MyAccountAccordion` component as a base for all
accordions in My Account section
- Implemented `MyAccountDeliveryOptionAccordion` component with:
  - Collapsible sections for each delivery option
  - Display of delivery option name, total items, and price
  - Detailed delivery information section
  - Product list with images, quantities, prices, and totals


## How to test it?

1. Navigate to My Account > Order
2. Verify that delivery options are displayed as accordions
3. Check that each accordion:
   - Shows correct delivery option name and summary
   - Expands/collapses on click
   - Displays proper delivery information
   - Lists all products with correct details

### Preview

https://sfj-9341747--faststoreqa.preview.vtex.app/account/orders

## References

- [SFS-2427](https://vtex-dev.atlassian.net/browse/SFS-2427)
- [Figma
Design](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=1090-38447&t=G929ofkPW2CATut1-4)


[SFS-2427]:
https://vtex-dev.atlassian.net/browse/SFS-2427?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
## What's the purpose of this pull request?

This PR aims to implement the List Orders search/ filter integration. 
Part of this logic is complemented in the next PR
- #2829
- preview
https://sfj-b47aeb4--faststoreqa.preview.vtex.app/account/orders

If you want to test a more complete experience, use the PR mentioned
above.

## How it works?

It integrates with FastStore API and Commerce OMS APIs.

## How to test it?

- OMS API is not ready yet, but we are passing the corresponding filters
already.

Preview from the frontend PR
https://sfj-b47aeb4--faststoreqa.preview.vtex.app/account/orders
## What's the purpose of this pull request?

This PR implements:
- [x] List orders page frontend.
- [x] `FilterSlider` component with the new `DataRange` component + some
validations.
- [x] Integrate the filter with the API, also using the URL to save the
filters. It includes a debounce to prevent too many requests to the
backend.
- [x] Deeplinks -> paste the link with filters in URL replicates in the
UI with the result.
- [x] adds date range logic to the creation_date field in API, including
Timestamp(hours).
- [x] created the status badge component.
- [x] creates the status structure data to group similar logics into a
source (`userOrderStatus.ts`)

// TODOs - will be done in other tasks
Filters selected tags and Clear all in the page
- #2837

Pagination
- #2838

- Status mapping
TODO

## How it works?

The OMS API is not 100% done yet, so the same results come from API.

Desktop
![May-07-2025
17-12-09](https://github.com/user-attachments/assets/66a36fec-2682-4b2e-ac87-062befdd8981)

Mobile
![May-07-2025
17-17-55](https://github.com/user-attachments/assets/b1b50778-360a-484d-87c1-899354ed2d85)


## How to test it?

Use the preview from the faststoreqa PR or locally in the 
http://localhost:3000/account/orders 
https://sfj-24e708e--faststoreqa.preview.vtex.app/account/orders

### Starters Deploy Preview
PR
- vtex-sites/faststoreqa.store#798
Preview
https://sfj-24e708e--faststoreqa.preview.vtex.app/account/orders

---------

Co-authored-by: Artur Santiago <[email protected]>
## depends on
- #2829

## What's the purpose of this pull request?

This PR aims to implement the selected tags feature in the orders page
of my account list. It also implements the clear all button.

PS: as the status mapping is not completed yet, the labels from the tags
are not beautiful, but as we implement, the labels will become beautiful
(capitalized and with spaces instead of -).

## How it works?

When there are filters selected (status or dates), they appear in the
tags with options of remove and clear all.

![May-09-2025
16-07-53](https://github.com/user-attachments/assets/1a38d648-0ea8-409e-a0ee-657c0c9f1721)


## How to test it?

Select some filter in `FIlterSlider`, then remove the tags.

### Starters Deploy Preview
 TBD
## What's the purpose of this pull request?

Implements the pagination of the list orders page.

mobile
<img width="375" alt="Screenshot 2025-05-09 at 18 02 10"
src="https://github.com/user-attachments/assets/5463c74f-adfc-4133-872d-b67cedc8a327"
/>

desktop
<img width="1324" alt="Screenshot 2025-05-09 at 17 51 09"
src="https://github.com/user-attachments/assets/da0a117f-c74f-4d85-8411-563b72b2f8ad"
/>
## What's the purpose of this pull request?

Add the MyAccountOrderActions component to the My Account section,
enabling users to perform actions such as canceling an order.

## How it works?

- Created the MyAccountOrderActions component to handle user
interactions with orders.
- Integrated the component into the order details page.
- Implements useCancelOrder in MyAccountOrderActios.

## How to test it?

1. Navigate to My Account > Order
2. Verify that the orders layout in mobile/desktop match figma
3. Try cancel an order
   
### Starters Deploy Preview

https://sfj-3bde3ad--faststoreqa.preview.vtex.app
Pr: vtex-sites/faststoreqa.store#796
## References

- [SFS-2469](https://vtex-dev.atlassian.net/browse/SFS-2469)
- [Figma
Design](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=1090-42460&t=nW5eFaW8wFYL2H7z-4)


![image](https://github.com/user-attachments/assets/ca8a8f64-9cd7-415a-937e-4b5275762945)

![image](https://github.com/user-attachments/assets/ed476b2c-59c7-471b-87b5-39e15dd0b17b)

![image](https://github.com/user-attachments/assets/6d1d2c1a-02db-468b-a78a-6018a61fc50a)

![image](https://github.com/user-attachments/assets/b5347190-5f0d-4df2-94d1-807d37b3e0ca)

[SFS-2469]:
https://vtex-dev.atlassian.net/browse/SFS-2469?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
## What's the purpose of this pull request?

This PR attempts to map the statuses from FastStore to the OMS API
status.
It also deals with the status badge, status filter, and selected tags
from the list orders page.

---------

Co-authored-by: Artur Santiago <[email protected]>
## What's the purpose of this pull request?

Intrude Empty State for "My Account" Order List.

## How it works?

This pull request introduces new component to reflects the empty state
on Orders list on My Account.

## How to test it?

My Account -> Orders

### Starters Deploy Preview


![image](https://github.com/user-attachments/assets/9d57acd9-9c3f-4e16-a4d8-19992b49130b)

<!--- Add a link to a deploy preview from `starter.store` with this
branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->

## References

<!--- Spread the knowledge: is there any content you used to create this
PR that is worth sharing? --->

<!--- Extra tip: adding references to related issues or mentioning
people important to this PR may be good for the documentation and
reviewing process --->

## Checklist

<em>You may erase this after checking them all 😉</em>

**PR Title and Commit Messages**

- [x] PR title and commit messages follow the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification
- Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`,
`refactor`, `ci` and `test`

**PR Description**

- [x] Added a label according to the PR goal - `breaking change`, `bug`,
`contributing`, `performance`, `documentation`..

**Dependencies**

- [ ] Committed the `pnpm-lock.yaml` file when there were changes to the
packages

**Documentation**

- [x] PR description
- [ ] For documentation changes, ping `@Mariana-Caetano` to review and
update (Or submit a doc request)

---------

Co-authored-by: Artur Santiago <[email protected]>
## What's the purpose of this pull request?

To implements the Status card on Order Details page

## How it works?

creates a new component called `MyAccountStatusCard` that receives the
order status as props
The current status the component populates the state machine

### Starters Deploy Preview
[PREVIEW](https://sfj-750696f--faststoreqa.preview.vtex.app/)

## References

[FEATURE
BRANCH](https://github.com/vtex/faststore/tree/feat/my-account-release-2)

[FIGMA](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=832-50457&t=8JNRc3sBFjsCOPao-0)
[JIRA SFS-2423](https://vtex-dev.atlassian.net/browse/SFS-2423)

---------

Co-authored-by: gutchenzo <[email protected]>
## What's the purpose of this pull request?

Handles `Canceled` and `Cancellation Requested` status on
MyAccountStatusCard

<!--- Considering the context, what is the problem we'll solve? Where in
VTEX's big picture our issue fits in? Write a tweet about the context
and the problem itself. --->

## How it works?

When the order has `Canceled` or `Cancellation Requested` status, it
must show the cancel status in the middle and "ghost" the others.

## How to test it?

<!--- Describe the steps with bullet points. Is there any external link
that can be used to better test it or an example? --->

### Starters Deploy Preview

- vtex-sites/faststoreqa.store#805

## References


![image](https://github.com/user-attachments/assets/4be9bd5e-a79a-44ec-8c89-29793d1daf2d)

![image](https://github.com/user-attachments/assets/4147b7bb-b771-4168-ae7d-37c0188d8c9a)
## What's the purpose of this pull request?

The order status badge should vary depending on the current status of
the order.
Must follow [current
design](https://www.figma.com/design/JppevzwPSV58ud0JDCFE7o/My-Account?node-id=2124-44748&t=pBH9HXNsVSyxI7t5-4).

## How it works?


![image](https://github.com/user-attachments/assets/8fba3958-9611-4dc8-a5c5-82f8f302eef6)


## How to test it?

After creating an order, go to: `/account/orders/{{orderId}}`.

### Starters Deploy Preview

<!--- Add a link to a deploy preview from `starter.store` with this
branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->

## References

<!--- Spread the knowledge: is there any content you used to create this
PR that is worth sharing? --->

<!--- Extra tip: adding references to related issues or mentioning
people important to this PR may be good for the documentation and
reviewing process --->

## Checklist

<em>You may erase this after checking them all 😉</em>

**PR Title and Commit Messages**

- [x] PR title and commit messages follow the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification
- Available prefixes: `feat`, `fix`, `chore`, `docs`, `style`,
`refactor`, `ci` and `test`

**PR Description**

- [x] Added a label according to the PR goal - `breaking change`, `bug`,
`contributing`, `performance`, `documentation`..

**Dependencies**

- [ ] Committed the `pnpm-lock.yaml` file when there were changes to the
packages

**Documentation**

- [x] PR description
- [ ] For documentation changes, ping `@Mariana-Caetano` to review and
update (Or submit a doc request)
Guilera and others added 7 commits May 19, 2025 11:28
## What's the purpose of this pull request?

Add 403 (Forbidden) error page to My Account module to handle
unauthorized access attempts.

## What was done?

- If call error is "acesso negado" returns status code 403
- Created 403 error page for MyAccount

## How to test it?

1. Open
2. Try to access a protected My Account route without proper
authentication
3. Verify that you are redirected to the 403 error page
4. Check that the page:
   - Shows a forbidden access message
   - Uses the standard My Account layout
   - Displays navigation menu correctly
   - Maintains consistent styling with other account pages
   
   ## Preview
   - vtex-sites/faststoreqa.store#804
   - https://sfj-792c1d5--faststoreqa.preview.vtex.app/

## References

- [SFS-2408](https://vtex-dev.atlassian.net/browse/SFS-2408)



![image](https://github.com/user-attachments/assets/b4b9b038-60a8-414a-b8e2-0f374d7eb9db)

![image](https://github.com/user-attachments/assets/f7a2064e-5d3b-45cb-8bff-148d963ec3cc)


[SFS-2408]:
https://vtex-dev.atlassian.net/browse/SFS-2408?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

---------

Co-authored-by: Artur Santiago <[email protected]>
## What's the purpose of this pull request?

This PR aims to integrate the custom fields in the order details page.
It implements API integration and Frontend.

desktop -> delivery card
cost center -> delivery options item accordion.
PO Number, release (+others) -> More information card.


## How it works?

It brings the custom field from the API and shows it in the
corresponding place.

## How to test it?

The custom fields are not coming from the OMS API yet, but we have
prepared the FastStore API for the moment they come. To test, you can
use a mock commented in the userOrder resolver. Pay attention that for
the item cost center, you should edit the id of the item in the mock.

After that, you can generate the types from the API, and run pnpm dev in
the faststore core.
Please feel free to reach out to me if you have questions or problems.


![May-17-2025
16-28-26](https://github.com/user-attachments/assets/7ff93c51-11f0-4735-99cd-1c531efd4420)

without custom fields
<img width="1297" alt="Screenshot 2025-05-17 at 16 25 36"
src="https://github.com/user-attachments/assets/cb35163d-2a7a-42e9-a6e2-8e4e635779d2"
/>
## What's the purpose of this pull request?

This PR aims to implement the FastStore API calls to make Org Drawer
work as expected. It also anticipated that some commerce API calls that
will be used in the following tasks.

## How it works?

It makes the b2b fields available in the `validateSession` mutation.

## How to test it?

You can call the validateSession mutation with a B2B user. Reach out to
me so that I can help with this case.
It's better to test with the frontend PR:
- #2849
## What's the purpose of this pull request?

This PR aims to implement the frontend to make Org Drawer work as
expected.
The switcher contract feature was postponed, and it's commented.

## How it works?

It creates an Organization Drawer when dealing with a b2b profile.
For b2c, it should be kept as is. 

| Header | Header |
|--------|--------|
| without login |<img width="1303" alt="Screenshot 2025-05-16 at 21 23
55"
src="https://github.com/user-attachments/assets/327cf577-282c-4021-be68-7b41d1bf72d1"
/> |
| b2b login |<img width="1289" alt="Screenshot 2025-05-16 at 21 57 43"
src="https://github.com/user-attachments/assets/2c543552-497f-46bb-8b55-fa873d45f606"
/> |
| b2c login |<img width="1302" alt="Screenshot 2025-05-16 at 21 21 37"
src="https://github.com/user-attachments/assets/dc3b3f3a-f5ff-48a5-82b8-7d5682f589eb"
/> |


## How to test it?
You need a b2b user to log in and see the Organization drawer.
Reach out to me so that I can help with this case.
After that, you'll be able to see the Company button in the navbar and
the drawer.

## references
API PR
- #2848

---------

Co-authored-by: Matheus P. Silva <[email protected]>
Copy link
Member

@eduardoformiga eduardoformiga left a comment

Choose a reason for hiding this comment

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

🎉

@eduardoformiga eduardoformiga marked this pull request as ready for review May 19, 2025 23:05
@eduardoformiga eduardoformiga requested a review from a team as a code owner May 19, 2025 23:05
@eduardoformiga eduardoformiga requested review from emersonlaurentino, renatamottam, matheusps and icaroov and removed request for a team, emersonlaurentino and renatamottam May 19, 2025 23:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants