@vtex/faststore-plugin-buyer-portal 1.3.33 → 1.3.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vtex/catalog.yaml +12 -0
- package/.vtex/deployment.yaml +17 -0
- package/CHANGELOG.md +18 -2
- package/docs/Runbook.md +29 -0
- package/docs/troubleshooting/BFF.md +42 -0
- package/docs/troubleshooting/Bugs.md +13 -0
- package/docs/troubleshooting/Cache Policies.md +39 -0
- package/docs/troubleshooting/Experimental Versions.md +27 -0
- package/package.json +1 -1
- package/src/features/shared/utils/constants.ts +2 -2
- /package/{README.md → docs/README.md} +0 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
apiVersion: backstage.io/v1alpha1
|
|
2
|
+
kind: Component
|
|
3
|
+
metadata:
|
|
4
|
+
name: organization-account
|
|
5
|
+
annotations:
|
|
6
|
+
github.com/project-slug: vtex/faststore-plugin-buyer-portal
|
|
7
|
+
vtex.com/application-id: XCQV318B
|
|
8
|
+
spec:
|
|
9
|
+
type: frontend-ui
|
|
10
|
+
lifecycle: stable
|
|
11
|
+
owner: te-0010
|
|
12
|
+
dependsOn: []
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
- name: organization-account
|
|
2
|
+
acronym: organization-account
|
|
3
|
+
description: Deploy organization-account application
|
|
4
|
+
build:
|
|
5
|
+
provider: dkcicd
|
|
6
|
+
pipelines:
|
|
7
|
+
- name: techdocs-v1
|
|
8
|
+
parameters:
|
|
9
|
+
entityReference: default/component/organization-account
|
|
10
|
+
indexFile: README.md
|
|
11
|
+
sourceDir: ./
|
|
12
|
+
path:
|
|
13
|
+
- "docs/*"
|
|
14
|
+
when:
|
|
15
|
+
- event: push
|
|
16
|
+
source: branch
|
|
17
|
+
regex: main
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.3.35] - 2025-12-02
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- Add runbooks to docs
|
|
15
|
+
|
|
16
|
+
## [1.3.34] - 2025-12-01
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Add DK Docs
|
|
21
|
+
|
|
10
22
|
## [1.3.33] - 2025-11-25
|
|
11
23
|
|
|
12
24
|
### Changed
|
|
@@ -74,7 +86,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
74
86
|
- Added CSS rules to apply max-width of 960px for large-sized drawers
|
|
75
87
|
- Updated existing drawer components to explicitly specify `size="large"`
|
|
76
88
|
- Improved drawer sizing consistency across the application
|
|
77
|
-
|
|
89
|
+
|
|
78
90
|
## [1.3.24] - 2025-11-25
|
|
79
91
|
|
|
80
92
|
### Added
|
|
@@ -170,6 +182,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
170
182
|
## [1.3.9] - 2025-10-21
|
|
171
183
|
|
|
172
184
|
### Added
|
|
185
|
+
|
|
173
186
|
- Add Changelog entry check on actions
|
|
174
187
|
|
|
175
188
|
## [1.3.8] - 2025-10-17
|
|
@@ -314,7 +327,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
314
327
|
- Add CHANGELOG file
|
|
315
328
|
- Add README file
|
|
316
329
|
|
|
317
|
-
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/
|
|
330
|
+
[unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/1.3.35...HEAD
|
|
318
331
|
[1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
|
|
319
332
|
[1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
|
|
320
333
|
[1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
|
|
@@ -329,6 +342,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
329
342
|
|
|
330
343
|
# <<<<<<< HEAD
|
|
331
344
|
|
|
345
|
+
[1.3.34]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.33...v1.3.34
|
|
332
346
|
[1.3.33]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.32...v1.3.33
|
|
333
347
|
[1.3.32]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.31...v1.3.32
|
|
334
348
|
[1.3.31]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.30...v1.3.31
|
|
@@ -354,3 +368,5 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
354
368
|
|
|
355
369
|
> > > > > > > main
|
|
356
370
|
> > > > > > > [1.3.11]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.11
|
|
371
|
+
|
|
372
|
+
[1.3.35]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.35
|
package/docs/Runbook.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Organization Account (Previously known as Buyer Portal) - Troubleshooting Guide
|
|
2
|
+
|
|
3
|
+
This document serves as the main index for troubleshooting guides for the Organization Account.
|
|
4
|
+
|
|
5
|
+
## 📋 Troubleshooting Guides
|
|
6
|
+
|
|
7
|
+
### Cache Policies
|
|
8
|
+
|
|
9
|
+
- **[Cache Policies Known Issues and Guides](./troubleshooting/Cache%20Policies.md.md)**
|
|
10
|
+
- Redirect not working between pages - But navigation via url is working.
|
|
11
|
+
- How to navigate without being affected by cache policies
|
|
12
|
+
|
|
13
|
+
### Backend For Front
|
|
14
|
+
|
|
15
|
+
- **[Backend for Front Guides](./troubleshooting/BFF.md)**
|
|
16
|
+
- How to run Organization Account with a linked instance of the BFF
|
|
17
|
+
|
|
18
|
+
### Bug reproduction
|
|
19
|
+
|
|
20
|
+
- **[Best pratices for reproducing bugs](./troubleshooting/Bugs.md)**
|
|
21
|
+
|
|
22
|
+
### Experimental versions
|
|
23
|
+
|
|
24
|
+
- **[How to generate experimental versions](./troubleshooting/Experimental%20Versions.md)**
|
|
25
|
+
- What to do when a bug happens only in production
|
|
26
|
+
|
|
27
|
+
> 📚 **Additional Resources:**
|
|
28
|
+
>
|
|
29
|
+
> - [VTEX B2B Documentation](https://developers.vtex.com/vtex-rest-api/docs/b2b-overview)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
## Backend for Front - Buyer Portal Graphql
|
|
2
|
+
|
|
3
|
+
### How to run the Organization Account with a linked workspace
|
|
4
|
+
|
|
5
|
+
#### How to create and link an workspace
|
|
6
|
+
|
|
7
|
+
Clone the [Buyer Portal Graphql Repo](https://github.com/vtex/buyer-portal-graphql)
|
|
8
|
+
|
|
9
|
+
Via terminal, login into your development account with the following command (IE: `b2bfaststoredev`)
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
vtex login {{accountName}}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
In the same terminal instance, create your workspace with
|
|
16
|
+
the following command:
|
|
17
|
+
|
|
18
|
+
- The `-r` option resets the workspace if you are using the same name as one created previously
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
vtex use {{workspaceName}} -r
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Once inside your workspace, link the app with the following command:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
vtex link
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Wait for the build and the link and at the end you should see all the REST apis listed on your terminal.
|
|
31
|
+
|
|
32
|
+
#### How to make Organization Account use the linked workspace
|
|
33
|
+
|
|
34
|
+
Go to the follwing file `src/features/shared/utils/constants.ts`
|
|
35
|
+
|
|
36
|
+
Replace `{{workspace}}` on line 7 with your workspace name
|
|
37
|
+
|
|
38
|
+
Comment the default function - Lines 3 and 4
|
|
39
|
+
|
|
40
|
+
Uncomment the changed function - Lines 6 and 7.
|
|
41
|
+
|
|
42
|
+
If the plugin is already started - re-start it.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
## Bug Reproduction: Best Practices
|
|
2
|
+
|
|
3
|
+
### Replicating the bug
|
|
4
|
+
|
|
5
|
+
Things to check when trying to reproduce a bug
|
|
6
|
+
|
|
7
|
+
- You are using the same account as the report
|
|
8
|
+
- You are using the same app versions as the report
|
|
9
|
+
- You created a new user and added it to the same Org Unit and Contract as the report
|
|
10
|
+
|
|
11
|
+
### Why use the same Org Unit and Contract:
|
|
12
|
+
|
|
13
|
+
Bug can be, and ofter are, related to Scope. The best way to emulate the circustances where the bug happened is to have the same Scope apply to your user.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
## Cache policies
|
|
2
|
+
|
|
3
|
+
### Known Issue with new accounts: Redirects are not working inside Organization Account
|
|
4
|
+
|
|
5
|
+
One of the reasons that redirects might not work inside organization account or in the drawer that redirects to it is the cache policies from the CDN that control what is passed in terms of cookies and headers to every new page.
|
|
6
|
+
|
|
7
|
+
Since the Organization Account relies heavily on the authentication cookie (Ex: `VtexIdclientAutCookie_{{accountName}})`), if this cookie is not sent with the page load, most pages won't load.
|
|
8
|
+
|
|
9
|
+
To validate if the cookies are being sent, follow this steps:
|
|
10
|
+
|
|
11
|
+
#### How to check if the cookie is being sent:
|
|
12
|
+
|
|
13
|
+
- Open your account using the production domain, IE: `faststore.vtexfaststore.com` and be sure to be logged in.
|
|
14
|
+
|
|
15
|
+
- Open your browsers's developer tools (F12, usually) and go to the network tab
|
|
16
|
+
|
|
17
|
+
- Activate the `preserve log` or equivalent option
|
|
18
|
+
|
|
19
|
+
- Use the `Company` drawer to go to Organization Account -> It's important to go through the drawer and not typing the url directly
|
|
20
|
+
|
|
21
|
+
- After you click `Manage` on the drawer, one of the first requests in your `network` tab should follow this format: `https://{{accountDomain}}/_next/data/{{buildId}}/{{locale}}/pvt/organization-account/org-unit/{{orgUnitId}}`
|
|
22
|
+
|
|
23
|
+
- Check the `Response` on this request, inside of it, there should be a `clientContext` object and this object should have a `cookie` property, inside of it, the auth cookie must be present.
|
|
24
|
+
|
|
25
|
+
##### The auth cookie is not present on Response
|
|
26
|
+
|
|
27
|
+
- Check the request `Response Headers` for the `X-Cache` key, it should have the value `Miss from cloudfront`
|
|
28
|
+
|
|
29
|
+
##### The request doesn't have the `Miss from cloudfront` value on header
|
|
30
|
+
|
|
31
|
+
- Contact the traffic team (#traffic) and explain that you need to change the cache policy of this new account to respect the `/_next/data/*/pvt/` rule.
|
|
32
|
+
|
|
33
|
+
### How to navigate in a production build without being afected by cache policies.
|
|
34
|
+
|
|
35
|
+
Most accounts have a `vtex.app` domain, this domain is not subject to the rules coming from the CDN and can be used to check if the problem is related to cache policies.
|
|
36
|
+
|
|
37
|
+
Just go to `{{accountName}}.vtex.app` and manually insert you auth cookie so it recognizes you as logged in
|
|
38
|
+
|
|
39
|
+
If your bug doesn't happen while using this domain, there is a good chance it's related to a cache policy.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
## Experimental Versions
|
|
2
|
+
|
|
3
|
+
### What to do when a bug happens only in the production environment?
|
|
4
|
+
|
|
5
|
+
#### First, generate an experimental version
|
|
6
|
+
|
|
7
|
+
Make sure that your working tree is clean
|
|
8
|
+
|
|
9
|
+
Run the following command:
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
yarn release:beta
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
This will copy your current branch to a `beta` branch, generate an experimental version on `npm` and then go back to your working branch.
|
|
16
|
+
|
|
17
|
+
To get the version id, go to the [Registry Page](https://www.npmjs.com/package/@vtex/faststore-plugin-buyer-portal)
|
|
18
|
+
|
|
19
|
+
#### Install the experimental version on the development store
|
|
20
|
+
|
|
21
|
+
Clone the [development store repo](https://github.com/vtex-sites/b2bfaststoredev.store)
|
|
22
|
+
|
|
23
|
+
Open a pull request replacing the version on `package.json` with your experimental one.
|
|
24
|
+
|
|
25
|
+
Wait for the preview to be generated, with it, you have a production environment with your experimental version.
|
|
26
|
+
|
|
27
|
+
If you need to test it in the main domain, you will need to merge this PR, just **make sure to have a revert PR ready and warn the rest of the team about the installation**
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@ export const API_URL = (checkoutUrl: string, operation?: string) =>
|
|
|
4
4
|
`${checkoutUrl}/_v/store-front/${operation}`;
|
|
5
5
|
// DEV URL - CHANGE BEFORE MERGE
|
|
6
6
|
// export const API_URL = (checkoutUrl?: string, operation?: string) =>
|
|
7
|
-
// `https://
|
|
7
|
+
// `https://{{workspace}}--b2bfaststoredev.myvtex.com/_v/store-front/${operation}`;
|
|
8
8
|
|
|
9
9
|
export const DEBOUNCE_TIMEOUT = 500;
|
|
10
10
|
|
|
@@ -13,4 +13,4 @@ export const LOCAL_STORAGE_LOCATION_EDIT_KEY = "bp_hide_edit_location_confirm";
|
|
|
13
13
|
export const LOCAL_STORAGE_RECIPIENT_EDIT_KEY =
|
|
14
14
|
"bp_hide_edit_recipient_confirm";
|
|
15
15
|
|
|
16
|
-
export const CURRENT_VERSION = "1.3.
|
|
16
|
+
export const CURRENT_VERSION = "1.3.35";
|
|
File without changes
|