Skip to content

feat: add filter and selected tag for pending approval - #3001

Merged
eduardoformiga merged 2 commits into
feat/pending-approvalfrom
feat/pending-approval-filter-ui-SFS-2618
Sep 4, 2025
Merged

eduardoformiga merged 2 commits into
feat/pending-approvalfrom
feat/pending-approval-filter-ui-SFS-2618

Conversation

@artursantiago

@artursantiago artursantiago commented Aug 27, 2025 •

Copy link
Copy Markdown
Contributor

What's the purpose of this pull request?

Adds a new "Pending Approval" filter to the MyAccount orders page, allowing users to quickly filter orders that require their approval.

How it works?

  • New toggle filter: Added "Pending Approval" as the first filter option in the orders filter slider
  • Toggle switch: Users can turn on/off the filter to show only pending approval orders
  • URL integration: Filter state is reflected in the URL (?pendingApproval=true)
  • Selected tag: When active, shows "Pending my approval" tag below the search bar

How to test it?

  • Go to /account/orders
  • Open filter slider and verify "Pending Approval" is the first option
  • Toggle the switch and click "Apply"
  • Check URL - should include ?pendingApproval=true
  • Verify tag appears - "Pending my approval" tag should show below search bar
  • Test removal - click "×" on tag or "Clear All" to remove filter
  • Test direct URL - navigate to /account/orders?pendingApproval=true and verify filter is active

References

SFS-2618

List Filter
image image

@artursantiago
artursantiago requested a review from a team as a code owner August 27, 2025 22:37
@artursantiago
artursantiago requested review from lucasfp13 and ommeirelles and removed request for a team August 27, 2025 22:37
@codesandbox-ci

codesandbox-ci Bot commented Aug 27, 2025 •

Copy link
Copy Markdown

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
artursantiago changed the base branch from main to feat/pending-approval September 2, 2025 13:33

@eduardoformiga eduardoformiga left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!
I tested it and worked as expected.

type: 'toggleFacet',
payload: {
key: 'pendingMyApproval',
value: 'true',

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This shouldn't be false here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I used true because when setFacet creates the facet, it will create it with true if it doesn’t already exist. Then, when I want to turn it off, I look for the toggle using the facet with the value true. The toggleFacet will remove that facet with the value true and revert it to the initial state, which is false.

I could use only setFacet, but then the facet would persist in the URL even when the value is false. This way, it only shows up in the URL when it’s true.

@eduardoformiga
eduardoformiga merged commit 7c21d1d into feat/pending-approval Sep 4, 2025
@eduardoformiga
eduardoformiga deleted the feat/pending-approval-filter-ui-SFS-2618 branch September 4, 2025 19:55
lucasfp13 pushed a commit that referenced this pull request Nov 5, 2025
Adds a new "Pending Approval" filter to the MyAccount orders page,
allowing users to quickly filter orders that require their approval.

- New toggle filter: Added "Pending Approval" as the first filter option
in the orders filter slider
- Toggle switch: Users can turn on/off the filter to show only pending
approval orders
- URL integration: Filter state is reflected in the URL
(?pendingApproval=true)
- Selected tag: When active, shows "Pending my approval" tag below the
search bar

- Go to /account/orders
- Open filter slider and verify "Pending Approval" is the first option
- Toggle the switch and click "Apply"
- Check URL - should include ?pendingApproval=true
- Verify tag appears - "Pending my approval" tag should show below
search bar
- Test removal - click "×" on tag or "Clear All" to remove filter
- Test direct URL - navigate to /account/orders?pendingApproval=true and
verify filter is active

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

| List | Filter |

|-------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------|
|
![image](https://github.com/user-attachments/assets/70a02298-4461-4b21-926d-8d6b754a78bc)
|
![image](https://github.com/user-attachments/assets/2d6afc76-7153-473a-b839-c141e4f0ca1f)
|

[SFS-2618]:
https://vtex-dev.atlassian.net/browse/SFS-2618?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
eduardoformiga pushed a commit that referenced this pull request Nov 11, 2025
)

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

Adds a new "Pending Approval" filter to the MyAccount orders page,
allowing users to quickly filter orders that require their approval.

## How it works?

- New toggle filter: Added "Pending Approval" as the first filter option
in the orders filter slider
- Toggle switch: Users can turn on/off the filter to show only pending
approval orders
- URL integration: Filter state is reflected in the URL
(?pendingApproval=true)
- Selected tag: When active, shows "Pending my approval" tag below the
search bar

## How to test it?

- Go to /account/orders
- Open filter slider and verify "Pending Approval" is the first option
- Toggle the switch and click "Apply"
- Check URL - should include ?pendingApproval=true
- Verify tag appears - "Pending my approval" tag should show below
search bar
- Test removal - click "×" on tag or "Clear All" to remove filter
- Test direct URL - navigate to /account/orders?pendingApproval=true and
verify filter is active

## Starter deploy preview

vtex-sites/b2bfaststoredev.store#358

## References

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

| List | Filter |
| - | - |
|
![image](https://github.com/user-attachments/assets/70a02298-4461-4b21-926d-8d6b754a78bc)
|
![image](https://github.com/user-attachments/assets/2d6afc76-7153-473a-b839-c141e4f0ca1f)
|

[SFS-2618]:

https://vtex-dev.atlassian.net/browse/SFS-2618?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

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

---------

Co-authored-by: Artur Santiago <[email protected]>
sahanljc added a commit to clouda-inc/faststore that referenced this pull request Nov 11, 2025
* dev:
  feat: add filter and selected tag for pending my approval (vtex#3001) (vtex#3101)
thiagopereira-vtex pushed a commit that referenced this pull request Jan 8, 2026
)

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

Adds a new "Pending Approval" filter to the MyAccount orders page,
allowing users to quickly filter orders that require their approval.

## How it works?

- New toggle filter: Added "Pending Approval" as the first filter option
in the orders filter slider
- Toggle switch: Users can turn on/off the filter to show only pending
approval orders
- URL integration: Filter state is reflected in the URL
(?pendingApproval=true)
- Selected tag: When active, shows "Pending my approval" tag below the
search bar

## How to test it?

- Go to /account/orders
- Open filter slider and verify "Pending Approval" is the first option
- Toggle the switch and click "Apply"
- Check URL - should include ?pendingApproval=true
- Verify tag appears - "Pending my approval" tag should show below
search bar
- Test removal - click "×" on tag or "Clear All" to remove filter
- Test direct URL - navigate to /account/orders?pendingApproval=true and
verify filter is active

## Starter deploy preview

vtex-sites/b2bfaststoredev.store#358

## References

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

| List | Filter |
| - | - |
|
![image](https://github.com/user-attachments/assets/70a02298-4461-4b21-926d-8d6b754a78bc)
|
![image](https://github.com/user-attachments/assets/2d6afc76-7153-473a-b839-c141e4f0ca1f)
|

[SFS-2618]:

https://vtex-dev.atlassian.net/browse/SFS-2618?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ

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

---------

Co-authored-by: Artur Santiago <[email protected]>
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.

3 participants