@vtex/faststore-plugin-buyer-portal 1.3.14 → 1.3.15

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,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.15] - 2025-11-03
11
+
12
+ ### Added
13
+
14
+ - Disable default button for inactive credit card
15
+
10
16
  ## [1.3.14] - 2025-11-03
11
17
 
12
18
  ### Fixed
@@ -15,6 +21,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
15
21
 
16
22
  ## [1.3.13] - 2025-11-03
17
23
 
24
+ ### Fixed
25
+
18
26
  - Setup OTLP to send log events on error boundary
19
27
 
20
28
  ## [1.3.12] - 2025-10-30
@@ -181,7 +189,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
181
189
  - Add CHANGELOG file
182
190
  - Add README file
183
191
 
184
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.14...HEAD
192
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.15...HEAD
185
193
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
186
194
  [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
187
195
  [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
@@ -196,6 +204,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
196
204
 
197
205
  # <<<<<<< HEAD
198
206
 
207
+ [1.3.15]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.14...v1.3.15
199
208
  [1.3.14]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.13...v1.3.14
200
209
  [1.3.13]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.12...v1.3.13
201
210
  [1.3.12]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.11...v1.3.12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.14",
3
+ "version": "1.3.15",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -114,17 +114,18 @@ export const CreditCardDropdownMenu = ({
114
114
  Rename
115
115
  </DropdownItem> */}
116
116
 
117
- {currentCreditCard.isDefault ? (
118
- <DropdownItem onClick={handleUnsetAsDefault}>
119
- <Icon name="BookmarkRemove" {...sizeProps} />
120
- Unset as default
121
- </DropdownItem>
122
- ) : (
123
- <DropdownItem onClick={handleSetAsDefault}>
124
- <Icon name="BookmarkAdd" {...sizeProps} />
125
- Set as default
126
- </DropdownItem>
127
- )}
117
+ {currentCreditCard.isActive &&
118
+ (currentCreditCard.isDefault ? (
119
+ <DropdownItem onClick={handleUnsetAsDefault}>
120
+ <Icon name="BookmarkRemove" {...sizeProps} />
121
+ Unset as default
122
+ </DropdownItem>
123
+ ) : (
124
+ <DropdownItem onClick={handleSetAsDefault}>
125
+ <Icon name="BookmarkAdd" {...sizeProps} />
126
+ Set as default
127
+ </DropdownItem>
128
+ ))}
128
129
 
129
130
  {/* Precisamos controlar scope com um toggle pra credit card devido a suas particularidades */}
130
131
  {/* <DropdownItem onClick={openRemoveDrawer}>
@@ -134,7 +135,7 @@ export const CreditCardDropdownMenu = ({
134
135
  {
135
136
  // isRootLevelOrgUnit && ( TODO: Put again when we validate the delete rule
136
137
  <>
137
- <BasicDropdownMenu.Separator />
138
+ {currentCreditCard.isActive && <BasicDropdownMenu.Separator />}
138
139
 
139
140
  <DropdownItem
140
141
  onClick={openDeleteDrawer}
@@ -97,7 +97,14 @@ export const CreditCardLayout = ({ data }: CreditCardsLayoutProps) => {
97
97
  aria-label="is contract active"
98
98
  defaultChecked={creditCard.isActive}
99
99
  onChange={(event) => {
100
+ updateItemsFromRefetch(
101
+ creditCards.map((c) =>
102
+ c === creditCard ? { ...c, isActive: !c.isActive } : c
103
+ )
104
+ );
105
+
100
106
  creditCard.isActive = !creditCard.isActive;
107
+
101
108
  handleCardChangeStatus(
102
109
  event,
103
110
  creditCard.accountId,
@@ -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.14";
16
+ export const CURRENT_VERSION = "1.3.15";