@vtex/faststore-plugin-buyer-portal 1.1.76 → 1.1.78

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
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
13
13
 
14
14
  ### Fixed
15
15
 
16
+ - Fix geoCordinate to be geoCoordinates
16
17
  - Adjusts in Credit Card's experience
17
18
  - Create a custom dropdown for Buying Policy criteria
18
19
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.1.76",
3
+ "version": "1.1.78",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -107,7 +107,7 @@ export default class AddressesClient extends Client {
107
107
  city: data.city,
108
108
  state: data.state,
109
109
  country: data.countryCode,
110
- geoCordinates: data.geoCordinates,
110
+ geoCoordinates: data.geoCoordinates,
111
111
  types: data.types,
112
112
  userId: customerId,
113
113
  isActive: true,
@@ -140,7 +140,7 @@ export default class AddressesClient extends Client {
140
140
  city: data.city,
141
141
  state: data.state,
142
142
  country: data.countryCode,
143
- geoCordinates: data.geoCordinates,
143
+ geoCoordinates: data.geoCoordinates,
144
144
  types: data.types,
145
145
  isActive: true,
146
146
  };
@@ -268,9 +268,9 @@ export const AddressForm = ({
268
268
  {isEdit && (
269
269
  <InputText
270
270
  label="Geo coordinates (Optional)"
271
- value={address.geoCordinates}
271
+ value={address.geoCoordinates}
272
272
  onChange={(event) =>
273
- setAddress({ ...address, geoCordinates: event.target.value })
273
+ setAddress({ ...address, geoCoordinates: event.target.value })
274
274
  }
275
275
  />
276
276
  )}
@@ -44,7 +44,7 @@ export const CreateAddressDrawer = ({
44
44
  countryCode: "",
45
45
  zip: "",
46
46
  state: "",
47
- geoCordinates: "",
47
+ geoCoordinates: "",
48
48
  city: "",
49
49
  types: [],
50
50
  neighborhood: "",
@@ -20,7 +20,7 @@ export type AddressOption = {
20
20
 
21
21
  export type AddressData = AddressSummaryData &
22
22
  AddressOption & {
23
- geoCordinates: string;
23
+ geoCoordinates: string;
24
24
  locations: string[];
25
25
  };
26
26
 
@@ -93,7 +93,7 @@ export type AddressInput = {
93
93
  countryCode: string;
94
94
  zip: string;
95
95
  state: string;
96
- geoCordinates: string;
96
+ geoCoordinates: string;
97
97
  locations?: string[];
98
98
  city: string;
99
99
  types: string[];
@@ -67,7 +67,7 @@ export const CreateCreditCardDrawer = ({
67
67
  countryCode: "",
68
68
  zip: "",
69
69
  state: "",
70
- geoCordinates: "",
70
+ geoCoordinates: "",
71
71
  city: "",
72
72
  types: ["invoice"],
73
73
  neighborhood: "",
@@ -1,7 +1,5 @@
1
1
  import type { ReactNode } from "react";
2
2
 
3
- import Link from "next/link";
4
-
5
3
  import { Dropdown } from "@faststore/components";
6
4
 
7
5
  import { BasicDropdownMenu } from "../../BasicDropdownMenu/BasicDropdownMenu";
@@ -36,7 +34,7 @@ export const TableRow = ({
36
34
  enabled = true,
37
35
  ...otherProps
38
36
  }: TableRowProps) => {
39
- const ClickComponent = href ? Link : "button";
37
+ const ClickComponent = href ? "a" : "button";
40
38
 
41
39
  return (
42
40
  <tr
@@ -8,6 +8,6 @@ export const addressLabelToPropMapping = {
8
8
  state: "State",
9
9
  city: "City",
10
10
  neighborhood: "Neighborhood",
11
- geoCordinates: "Geo coordinate",
11
+ geoCoordinates: "Geo coordinate",
12
12
  types: "Address Type",
13
13
  };
@@ -79,12 +79,10 @@ export const CreateUserDrawer = ({
79
79
  data-fs-bp-toast-view-button
80
80
  type="button"
81
81
  onClick={() => {
82
- router.push(
83
- buyerPortalRoutes.userDetails({
84
- userId: user.id,
85
- orgUnitId: orgUnitId,
86
- })
87
- );
82
+ window.location.href = buyerPortalRoutes.userDetails({
83
+ userId: user.id,
84
+ orgUnitId: orgUnitId,
85
+ });
88
86
  }}
89
87
  >
90
88
  View
@@ -56,12 +56,10 @@ export const UserDropdownMenu = ({
56
56
  <BasicDropdownMenu>
57
57
  <DropdownItem
58
58
  onClick={() =>
59
- route.push(
60
- buyerPortalRoutes.userDetails({
61
- orgUnitId: currentOrgUnit?.id ?? "",
62
- userId: user.id,
63
- })
64
- )
59
+ (window.location.href = buyerPortalRoutes.userDetails({
60
+ orgUnitId: currentOrgUnit?.id ?? "",
61
+ userId: user.id,
62
+ }))
65
63
  }
66
64
  >
67
65
  <Icon name="OpenInNew" {...sizeProps} />