@vtex/faststore-plugin-buyer-portal 1.0.43 → 1.0.44

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/CHANGELOG.md CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ### Fixed
11
+
12
+ - UserData accepts undefined e-mail
13
+ - Fix styles
14
+
10
15
  ### Added
11
16
 
12
17
  - Add Buying Policies Page
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "dependencies": {
@@ -2,11 +2,11 @@
2
2
  @import "../../../shared/components/InputText/input-text.scss";
3
3
  @import "../../../shared/components/ErrorMessage/error-message.scss";
4
4
  @import "@faststore/ui/src/components/atoms/Select/styles.scss";
5
- @import "@faststore/ui/src/components/atoms/Button/styles.scss";
6
5
  @import "@faststore/ui/src/components/molecules/Alert/styles.scss";
7
6
  @import "../CreditCardForm/credit-card-form.scss";
8
7
 
9
8
  [data-fs-bp-create-credit-card-drawer] {
9
+ @import "@faststore/ui/src/components/atoms/Button/styles.scss";
10
10
  @import "../../../addresses/components/ExistingAddress/existing-address.scss";
11
11
 
12
12
  [data-fs-bp-create-credit-card-drawer-section-label] {
@@ -1,4 +1,7 @@
1
1
  @import "../../../shared/components/BasicDrawer/basic-drawer.scss";
2
2
  @import "../../../shared/components/InputText/input-text.scss";
3
3
  @import "../../../shared/components/ErrorMessage/error-message.scss";
4
- @import "@faststore/ui/src/components/atoms/Button/styles.scss";
4
+
5
+ [data-fs-bp-edit-credit-card-drawer] {
6
+ @import "@faststore/ui/src/components/atoms/Button/styles.scss";
7
+ }
@@ -87,11 +87,11 @@ class UsersClient extends Client {
87
87
  },
88
88
  cookie: string
89
89
  ) {
90
- const { orgUnitId, ...data } = props;
90
+ const { orgUnitId, userId, ...data } = props;
91
91
 
92
- return this.delete<unknown, { userId: string }>(
93
- `units/${orgUnitId}/users`,
94
- data,
92
+ return this.delete<unknown, null>(
93
+ `units/${orgUnitId}/users/${userId}`,
94
+ null,
95
95
  {
96
96
  headers: {
97
97
  Cookie: cookie,
@@ -11,14 +11,17 @@ export const getUserByIdService = async ({
11
11
  cookie: string;
12
12
  }): Promise<UserData | null> => {
13
13
  try {
14
- const { email, name, orgUnit, role } =
15
- await usersClient.getUserById(orgUnitId, userId, cookie);
14
+ const { email, name, orgUnit, role } = await usersClient.getUserById(
15
+ orgUnitId,
16
+ userId,
17
+ cookie
18
+ );
16
19
 
17
20
  return {
18
21
  name: `${name}`,
19
22
  userType: role,
20
23
  id: userId,
21
- email,
24
+ email: email ?? "",
22
25
  orgUnit: {
23
26
  name: orgUnit,
24
27
  },
@@ -3,7 +3,7 @@ export type UserData = {
3
3
  userType: string;
4
4
  isActive?: boolean;
5
5
  id: string;
6
- email: string;
6
+ email?: string;
7
7
  role?: string;
8
8
  orgUnit: {
9
9
  id?: string;