@vtex/faststore-plugin-buyer-portal 1.3.49 → 1.3.51

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.
Files changed (27) hide show
  1. package/CHANGELOG.md +56 -40
  2. package/package.json +1 -1
  3. package/src/features/addresses/components/CreateAddressSettingsDrawer/CreateAddressSettingsDrawer.tsx +2 -13
  4. package/src/features/budgets/components/BudgetEditNotificationDrawer/BudgetEditNotificationDrawer.tsx +1 -0
  5. package/src/features/budgets/components/BudgetNotificationForm/BudgetNotificationForm.tsx +64 -26
  6. package/src/features/budgets/components/BudgetNotificationForm/budget-notification-form.scss +26 -15
  7. package/src/features/budgets/components/BudgetUsersTable/BudgetUsersTable.tsx +2 -13
  8. package/src/features/budgets/components/CreateBudgetDrawer/create-budget-drawer.scss +0 -9
  9. package/src/features/budgets/components/EditBudgetDrawer/edit-budget-drawer.scss +0 -6
  10. package/src/features/credit-cards/components/CreditCardSettingsDrawer/CreditCardSettingsDrawer.tsx +45 -56
  11. package/src/features/credit-cards/layouts/CreditCardsLayout/CreditCardLayout.tsx +18 -0
  12. package/src/features/custom-fields/components/CustomFieldSettingsDrawer/CustomFieldSettingsDrawer.tsx +225 -49
  13. package/src/features/payment-methods/components/PaymentMethodSettingsDrawer/PaymentMethodSettingsDrawer.tsx +78 -0
  14. package/src/features/payment-methods/components/index.ts +4 -0
  15. package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +19 -0
  16. package/src/features/product-assortment/components/CollectionsSettingsDrawer/CollectionsSettingsDrawer.tsx +77 -0
  17. package/src/features/product-assortment/components/index.tsx +4 -0
  18. package/src/features/product-assortment/layouts/ProductAssortmentLayout/ProductAssortmentLayout.tsx +22 -1
  19. package/src/features/shared/components/AutocompleteDropdown/AutocompleteDropdown.tsx +23 -6
  20. package/src/features/shared/components/AutocompleteDropdown/autocomplete-dropdown.scss +21 -7
  21. package/src/features/shared/components/BuyerPortalProvider/BuyerPortalProvider.tsx +1 -0
  22. package/src/features/shared/components/QuantitySelectorWithPercentage/QuantitySelectorWithPercentage.tsx +6 -3
  23. package/src/features/shared/components/SettingsDrawer/SettingsDrawerListType.tsx +28 -16
  24. package/src/features/shared/components/SettingsDrawer/listTypeOptions.ts +23 -0
  25. package/src/features/shared/components/Table/TableRow/table-row.scss +4 -0
  26. package/src/features/shared/components/index.ts +5 -0
  27. package/src/features/shared/utils/constants.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,22 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [1.3.51] - 2026-01-05
11
+
12
+ ### Added
13
+
14
+ - Add Settings Drawers for Credit Cards, Payment Methods and Collections
15
+ - Implement `CreditCardSettingsDrawer` component for credit cards scope configuration
16
+ - Implement `PaymentMethodSettingsDrawer` component for payment methods scope configuration
17
+ - Implement `CollectionsSettingsDrawer` component for product assortment scope configuration
18
+ - Integrate settings drawers with respective layout pages
19
+
20
+ ## [1.3.50] - 2025-12-19
21
+
22
+ ### Changed
23
+
24
+ - Introduces several improvements and refactorings to the budget notification drawer, focusing on user experience.
25
+
10
26
  ## [1.3.49] - 2025-12-19
11
27
 
12
28
  ### Added
@@ -23,7 +39,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
23
39
  - Alternative Login Keys:
24
40
  - Add auth setup drawer
25
41
  - Update AddUserDrawer to support username
26
-
42
+
27
43
  ## [1.3.46] - 2025-12-19
28
44
 
29
45
  ### Fixed
@@ -33,16 +49,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
33
49
  ## [1.3.45] - 2025-12-17
34
50
 
35
51
  ### Fixed
52
+
36
53
  - Remove AwaitedType imports
37
54
 
38
55
  ## [1.3.44] - 2025-12-16
39
56
 
40
57
  ### Fixed
58
+
41
59
  - Remove AwaitedType export that was breaking the application build
42
60
 
43
61
  ## [1.3.43] - 2025-12-16
44
62
 
45
63
  ### Fixed
64
+
46
65
  - Update maskPhoneNumber to include country DDI
47
66
  - Send only phone digits to API in Users and Recipients pages
48
67
  - Show masked phone in layout and forms in Users and Recipients pages
@@ -62,6 +81,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
62
81
 
63
82
  ## [1.3.40] - 2025-12-09
64
83
 
84
+ ### Fixed
85
+
65
86
  - Fix e2e auth flow
66
87
 
67
88
  ## [1.3.39] - 2025-12-09
@@ -79,7 +100,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
79
100
 
80
101
  ## [1.3.37] - 2025-12-04
81
102
 
82
- ## Changed
103
+ ### Changed
83
104
 
84
105
  - Allow Credit Card CVV to accept 4 digits
85
106
 
@@ -97,12 +118,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
97
118
 
98
119
  ## [1.3.34] - 2025-12-01
99
120
 
121
+ ### Added
122
+
100
123
  - Add generic `SettingsDrawer` component with `ListType` subcomponent for scope configuration
101
124
  - Add Scope Config API integration (`useGetScopeConfig`, `useSetScopeConfig` hooks)
102
125
  - Integrate Settings Drawer with Address Settings page
103
-
104
- ### Added
105
-
106
126
  - Add DK Docs
107
127
 
108
128
  ### Fixed
@@ -306,6 +326,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
306
326
 
307
327
  ## [1.3.4] - 2025-10-16
308
328
 
329
+ ### Fixed
330
+
309
331
  - Error boundary:
310
332
  - Updating the authentication loader to provide detailed error context.
311
333
 
@@ -417,21 +439,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
417
439
  - Add CHANGELOG file
418
440
  - Add README file
419
441
 
420
- [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.49...HEAD
421
- [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.2.2...1.2.3
422
- [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
423
- [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
424
- [1.3.2]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.2
425
- [1.3.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.3
426
- [1.3.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.4
427
- [1.3.5]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.5
428
- [1.3.6]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.6
429
- [1.3.9]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.8...v1.3.9
430
- [1.3.8]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.7...v1.3.8
431
- [1.3.7]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.7
432
-
433
- # <<<<<<< HEAD
434
-
442
+ [unreleased]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.51...HEAD
443
+ [1.3.51]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.50...v1.3.51
444
+ [1.3.50]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.49...v1.3.50
445
+ [1.3.49]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.48...v1.3.49
446
+ [1.3.48]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.47...v1.3.48
447
+ [1.3.47]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.46...v1.3.47
448
+ [1.3.46]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.45...v1.3.46
449
+ [1.3.45]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.44...v1.3.45
450
+ [1.3.44]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.43...v1.3.44
451
+ [1.3.43]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.42...v1.3.43
452
+ [1.3.42]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.42
453
+ [1.3.41]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.40...v1.3.41
454
+ [1.3.40]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.39...v1.3.40
455
+ [1.3.39]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.38...v1.3.39
456
+ [1.3.38]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.37...v1.3.38
457
+ [1.3.37]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.36...v1.3.37
458
+ [1.3.36]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.35...v1.3.36
459
+ [1.3.35]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.35
435
460
  [1.3.34]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.33...v1.3.34
436
461
  [1.3.33]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.32...v1.3.33
437
462
  [1.3.32]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.31...v1.3.32
@@ -455,23 +480,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
455
480
  [1.3.14]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.13...v1.3.14
456
481
  [1.3.13]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.12...v1.3.13
457
482
  [1.3.12]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.11...v1.3.12
458
-
459
- > > > > > > > main
460
- > > > > > > > [1.3.11]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.11
461
-
462
- [1.3.41]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.40...v1.3.41
463
- [1.3.40]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.39...v1.3.40
464
- [1.3.39]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.38...v1.3.39
465
- [1.3.38]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.37...v1.3.38
466
- [1.3.37]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.36...v1.3.37
467
- [1.3.36]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.35...v1.3.36
468
- [1.3.35]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.35
469
-
470
- [1.3.49]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.48...v1.3.49
471
- [1.3.48]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.47...v1.3.48
472
- [1.3.47]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.46...v1.3.47
473
- [1.3.46]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.45...v1.3.46
474
- [1.3.45]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.44...v1.3.45
475
- [1.3.44]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.43...v1.3.44
476
- [1.3.43]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.42...v1.3.43
477
- [1.3.42]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.42
483
+ [1.3.11]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.11
484
+ [1.3.9]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.8...v1.3.9
485
+ [1.3.8]: https://github.com/vtex/faststore-plugin-buyer-portal/compare/v1.3.7...v1.3.8
486
+ [1.3.7]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.7
487
+ [1.3.6]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.6
488
+ [1.3.5]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.5
489
+ [1.3.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.4
490
+ [1.3.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.3
491
+ [1.3.2]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.3.2
492
+ [1.2.4]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.4
493
+ [1.2.3]: https://github.com/vtex/faststore-plugin-buyer-portal/releases/tag/1.2.3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vtex/faststore-plugin-buyer-portal",
3
- "version": "1.3.49",
3
+ "version": "1.3.51",
4
4
  "description": "A plugin for faststore with buyer portal",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -7,10 +7,9 @@ import { useUI, Skeleton } from "@faststore/ui";
7
7
  import {
8
8
  type BasicDrawerProps,
9
9
  AutocompleteDropdown,
10
- DEFAULT_LIST_TYPE_OPTIONS,
11
10
  Icon,
12
- ListTypeOption,
13
11
  SettingsDrawer,
12
+ createListTypeOptions,
14
13
  } from "../../../shared/components";
15
14
  import { OptionSelected } from "../../../shared/components/OptionSelected/OptionSelected";
16
15
  import { SearchHighlight } from "../../../shared/components/SearchHighlight/SearchHighlight";
@@ -31,17 +30,7 @@ export type CreateAddressSettingsDrawerProps = Omit<
31
30
  onUpdate?: () => void;
32
31
  };
33
32
 
34
- export const ADDRESS_LIST_TYPE_OPTIONS: ListTypeOption[] = [
35
- {
36
- ...DEFAULT_LIST_TYPE_OPTIONS[0],
37
- description: "Manage a unique list of addresses for this organization.",
38
- },
39
- {
40
- ...DEFAULT_LIST_TYPE_OPTIONS[1],
41
- description:
42
- "Use the shared list of addresses defined by the contract. Updates are automatic.",
43
- },
44
- ];
33
+ export const ADDRESS_LIST_TYPE_OPTIONS = createListTypeOptions("addresses");
45
34
 
46
35
  export const CreateAddressSettingsDrawer = ({
47
36
  close,
@@ -104,6 +104,7 @@ export function BudgetEditNotificationDrawer({
104
104
  <BasicDrawer
105
105
  data-fs-bp-budget-notifications-drawer
106
106
  close={close}
107
+ size="large"
107
108
  {...props}
108
109
  >
109
110
  <BasicDrawer.Heading title="Edit notifications" onClose={close} />
@@ -7,6 +7,7 @@ import {
7
7
  QuantitySelectorWithPercentage,
8
8
  Table,
9
9
  } from "../../../shared/components";
10
+ import { useBuyerPortal } from "../../../shared/hooks";
10
11
  import { CurrencyType, LocaleType } from "../../../shared/types";
11
12
  import { useDebouncedSearchBudgetNotification } from "../../hooks/useDebouncedSearchBudgetNotification";
12
13
  import BudgetUsersTable from "../BudgetUsersTable/BudgetUsersTable";
@@ -36,6 +37,8 @@ type BudgetNotificationFormProps = {
36
37
 
37
38
  type UserOption = { id: string; name: string; email?: string };
38
39
 
40
+ const MAX_THRESHOLDS = 5;
41
+
39
42
  export const BudgetNotificationForm = ({
40
43
  budget,
41
44
  contractId,
@@ -47,6 +50,8 @@ export const BudgetNotificationForm = ({
47
50
  locale = "en-US",
48
51
  showUsersError = false,
49
52
  }: BudgetNotificationFormProps) => {
53
+ const { currentUser } = useBuyerPortal();
54
+
50
55
  const [enabled, setEnabled] = useState<boolean>(
51
56
  Boolean(budget?.notifications?.hasNotification)
52
57
  );
@@ -124,7 +129,7 @@ export const BudgetNotificationForm = ({
124
129
  const addThreshold = () => {
125
130
  if (readonly || parsedTotal <= 0) return;
126
131
  setThresholds((prev) =>
127
- prev.length >= 5 ? prev : [...prev, { value: 50 }]
132
+ prev.length >= MAX_THRESHOLDS ? prev : [...prev, { value: 50 }]
128
133
  );
129
134
  };
130
135
 
@@ -154,8 +159,20 @@ export const BudgetNotificationForm = ({
154
159
  name: String(u.name ?? "Usuário"),
155
160
  email: u.email,
156
161
  }));
157
- setOptions(mapped);
158
- }, [usersResponse]);
162
+
163
+ setOptions(
164
+ currentUser?.id
165
+ ? [
166
+ {
167
+ id: String(currentUser.id),
168
+ email: currentUser?.email ?? "",
169
+ name: currentUser?.name ? `${currentUser.name} (You)` : "You",
170
+ },
171
+ ...mapped,
172
+ ]
173
+ : mapped
174
+ );
175
+ }, [usersResponse, currentUser]);
159
176
 
160
177
  const addUserIfNotExists = (opt: UserOption) => {
161
178
  const exists = selectedUsers.some((u) => u.userId === opt.id);
@@ -178,8 +195,21 @@ export const BudgetNotificationForm = ({
178
195
  setSelectedUsers(next);
179
196
  };
180
197
 
198
+ const handleThresholdsChange = (value: number, idx: number) => {
199
+ setThresholds((prev) =>
200
+ prev.map((th, i) =>
201
+ i === idx
202
+ ? {
203
+ value: Math.min(100, Math.max(1, value)),
204
+ }
205
+ : th
206
+ )
207
+ );
208
+ };
209
+
181
210
  const sizeProps = { width: 20, height: 20 };
182
211
  const disableRows = readonly || !enabled;
212
+ const isLoading = isLoadingUsers || isDebouncing;
183
213
 
184
214
  return (
185
215
  <div data-fs-bp-budget-notification>
@@ -200,8 +230,8 @@ export const BudgetNotificationForm = ({
200
230
 
201
231
  <div data-fs-bp-budget-notification-section-label>
202
232
  <span>
203
- Set up to 5 thresholds and notify users when the total amount reaches
204
- specific percentages
233
+ Set up to {MAX_THRESHOLDS} thresholds and notify users when the total
234
+ amount reaches specific percentages
205
235
  </span>
206
236
  </div>
207
237
 
@@ -240,37 +270,35 @@ export const BudgetNotificationForm = ({
240
270
  title={
241
271
  <div data-fs-bp-budget-notification-stepper>
242
272
  <QuantitySelectorWithPercentage
243
- min={1}
273
+ min={5}
244
274
  max={100}
245
275
  initial={t.value}
246
276
  formatAsPercent
247
277
  disabled={disableRows || parsedTotal <= 0}
248
- onChange={(val: number) =>
249
- setThresholds((prev) =>
250
- prev.map((th, i) =>
251
- i === idx
252
- ? {
253
- value: Math.min(
254
- 100,
255
- Math.max(1, val)
256
- ),
257
- }
258
- : th
259
- )
260
- )
278
+ onChange={(value) =>
279
+ handleThresholdsChange(value, idx)
261
280
  }
281
+ increaseQuantityBy={5}
282
+ decreaseQuantityBy={5}
262
283
  />
263
284
  </div>
264
285
  }
265
286
  enabled={!disableRows}
266
287
  actionIcons={
267
- <Icon
268
- name="MinusCircle"
269
- {...sizeProps}
270
- data-fs-bp-budget-notification-remove
288
+ <button
289
+ data-fs-bp-budget-notification-remove-button
290
+ type="button"
271
291
  onClick={() => removeThreshold(idx)}
272
292
  aria-label="Remove threshold"
273
- />
293
+ title="Remove threshold"
294
+ disabled={disableRows}
295
+ >
296
+ <Icon
297
+ name="MinusCircle"
298
+ {...sizeProps}
299
+ data-fs-bp-budget-notification-remove
300
+ />
301
+ </button>
274
302
  }
275
303
  >
276
304
  <Table.Cell>
@@ -294,7 +322,11 @@ export const BudgetNotificationForm = ({
294
322
  <button
295
323
  type="button"
296
324
  onClick={addThreshold}
297
- disabled={disableRows || thresholds.length >= 5}
325
+ disabled={
326
+ disableRows ||
327
+ parsedTotal <= 0 ||
328
+ thresholds.length >= MAX_THRESHOLDS
329
+ }
298
330
  >
299
331
  Add threshold
300
332
  </button>
@@ -315,11 +347,17 @@ export const BudgetNotificationForm = ({
315
347
  shouldOpenOnFocus={false}
316
348
  autoComplete="off"
317
349
  shouldShowArrowDown={false}
350
+ isLoading={isLoading}
351
+ disabled={isLoading}
318
352
  onChange={(e: ChangeEvent<HTMLInputElement>) => {
319
353
  setInputValue(e.target.value);
320
354
  }}
321
355
  options={
322
- isLoadingUsers || isDebouncing ? [loadingObject] : options
356
+ isLoading
357
+ ? [loadingObject]
358
+ : options.filter(
359
+ (opt) => !selectedUsers.some((u) => u.userId === opt.id)
360
+ )
323
361
  }
324
362
  hasError={showUsersError && enabled && selectedUsers.length === 0}
325
363
  helperLabel={
@@ -1,11 +1,11 @@
1
1
  [data-fs-bp-budget-notification] {
2
- @import "@faststore/ui/src/components/molecules/Toggle/styles.scss";
3
- @import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
4
- @import "@faststore/ui/src/components/molecules/QuantitySelector/styles.scss";
5
- @import "../../../shared/components/InputText/input-text.scss";
6
- @import "../../../shared/components/Table/table.scss";
7
- @import "../../../shared/components/ErrorMessage/error-message.scss";
8
- @import "../BudgetUsersTable/budget-users-table.scss";
2
+ @import '@faststore/ui/src/components/molecules/Toggle/styles.scss';
3
+ @import '@faststore/ui/src/components/molecules/Tooltip/styles.scss';
4
+ @import '@faststore/ui/src/components/molecules/QuantitySelector/styles.scss';
5
+ @import '../../../shared/components/InputText/input-text.scss';
6
+ @import '../../../shared/components/Table/table.scss';
7
+ @import '../../../shared/components/ErrorMessage/error-message.scss';
8
+ @import '../BudgetUsersTable/budget-users-table.scss';
9
9
 
10
10
  padding-bottom: var(--fs-spacing-7);
11
11
 
@@ -29,7 +29,7 @@
29
29
  [data-fs-bp-budget-notification-section-label] {
30
30
  font-weight: var(--fs-text-weight-regular);
31
31
  font-size: var(--fs-text-size-1);
32
- color: #5c5c5c;
32
+ color: var(--fs-bp-color-neutral-7);
33
33
  line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
34
34
  }
35
35
 
@@ -38,7 +38,7 @@
38
38
  flex-direction: column;
39
39
  width: 100%;
40
40
 
41
- @include media(">=notebook") {
41
+ @include media('>=notebook') {
42
42
  align-items: center;
43
43
  flex-direction: row;
44
44
  gap: var(--fs-spacing-3);
@@ -62,9 +62,9 @@
62
62
  }
63
63
  }
64
64
 
65
- [data-fs-bp-autocomplete-dropdown]{
66
- [data-fs-bp-autocomplete-dropdown-menu]{
67
- z-index:2;
65
+ [data-fs-bp-autocomplete-dropdown] {
66
+ [data-fs-bp-autocomplete-dropdown-menu] {
67
+ z-index: 2;
68
68
  }
69
69
  }
70
70
 
@@ -99,7 +99,7 @@
99
99
  text-align: start;
100
100
  font-weight: var(--fs-text-weight-medium);
101
101
  font-size: var(--fs-text-size-1);
102
- color: #5c5c5c;
102
+ color: var(--fs-bp-color-neutral-7);
103
103
  padding: var(--fs-spacing-2) 0;
104
104
  }
105
105
 
@@ -165,7 +165,7 @@
165
165
  }
166
166
  }
167
167
 
168
- div[data-fs-quantity-selector="disabled"] {
168
+ div[data-fs-quantity-selector='disabled'] {
169
169
  [data-fs-input] {
170
170
  color: #c3c3c3;
171
171
  }
@@ -185,18 +185,23 @@
185
185
  [data-fs-bp-budget-notification-money] {
186
186
  font-weight: var(--fs-text-weight-regular);
187
187
  font-size: var(--fs-text-size-1);
188
- color: #5C5C5C;
188
+ color: var(--fs-bp-color-neutral-7);
189
189
  }
190
190
 
191
191
  [data-fs-bp-budget-notification-remove] {
192
192
  color: #000000;
193
193
  stroke-width: 1.3rem;
194
+ cursor: pointer;
194
195
  &[disabled] {
195
196
  color: #9ca3af; /* gray when disabled */
196
197
  cursor: not-allowed;
197
198
  }
198
199
  }
199
200
 
201
+ [data-fs-bp-budget-notification-remove-button] {
202
+ cursor: pointer;
203
+ }
204
+
200
205
  [data-fs-bp-budget-notification-add] {
201
206
  margin-top: var(--fs-spacing-3);
202
207
  display: flex;
@@ -204,6 +209,7 @@
204
209
  gap: var(--fs-spacing-2);
205
210
 
206
211
  button {
212
+ cursor: pointer;
207
213
  height: var(--fs-spacing-6);
208
214
  width: 8.4375rem;
209
215
  border-radius: var(--fs-border-radius-pill);
@@ -214,6 +220,11 @@
214
220
  color: #0068d7;
215
221
  font-size: var(--fs-text-size-1);
216
222
  font-weight: var(--fs-text-weight-semibold);
223
+
224
+ &:disabled {
225
+ cursor: not-allowed;
226
+ color: #9ca3af; /* gray when disabled */
227
+ }
217
228
  }
218
229
  }
219
230
  }
@@ -4,7 +4,6 @@ import { Icon, Tooltip } from "@faststore/ui";
4
4
 
5
5
  import { Table } from "../../../shared/components";
6
6
  import { getTableColumns } from "../../../shared/components/Table/utils/tableColumns";
7
- import { useBuyerPortal } from "../../../shared/hooks";
8
7
 
9
8
  type UserRow = {
10
9
  userId: string;
@@ -28,8 +27,6 @@ function BudgetUsersTableBase({
28
27
  className,
29
28
  disabled = false,
30
29
  }: BudgetUsersTableProps) {
31
- const { clientContext } = useBuyerPortal();
32
- const currClientId = clientContext.userId;
33
30
  const columns = getTableColumns({
34
31
  actionsLength: onRemove ? 1 : 0,
35
32
  nameColumnLabel: "User name",
@@ -64,16 +61,7 @@ function BudgetUsersTableBase({
64
61
  users.map((u) => (
65
62
  <Table.Row
66
63
  key={u.userId}
67
- title={
68
- currClientId === u.userId ? (
69
- <span>
70
- {u.userName}
71
- <span data-fs-bp-users-you> (you)</span>
72
- </span>
73
- ) : (
74
- u.userName
75
- )
76
- }
64
+ title={u.userName}
77
65
  enabled={!disabled}
78
66
  actionIcons={(() => {
79
67
  const rowDisabled =
@@ -85,6 +73,7 @@ function BudgetUsersTableBase({
85
73
  aria-label={`Remove ${u.userName}`}
86
74
  disabled={rowDisabled}
87
75
  onClick={() => onRemove?.(u.userId)}
76
+ title={rowDisabled ? undefined : `Remove ${u.userName}`}
88
77
  >
89
78
  <Icon name="MinusCircle" width={20} height={20} />
90
79
  </button>
@@ -21,15 +21,6 @@
21
21
  width: 100%;
22
22
  max-width: none;
23
23
 
24
- @include media(">=tablet") {
25
- max-width: 30rem;
26
- min-width: 30rem;
27
- }
28
-
29
- @include media(">=notebook") {
30
- max-width: 40rem;
31
- }
32
-
33
24
  [data-fs-divider] {
34
25
  border: var(--fs-border-radius-small) solid #e0e0e0;
35
26
  margin: var(--fs-spacing-4) 0rem;
@@ -23,12 +23,6 @@
23
23
  }
24
24
  }
25
25
 
26
- @include media(">=notebook") {
27
- &[data-fs-modal-content] {
28
- max-width: 40rem;
29
- width: 100%;
30
- }
31
- }
32
26
  [data-fs-divider] {
33
27
  border: var(--fs-border-radius-small) solid #e0e0e0;
34
28
  margin: var(--fs-spacing-4) 0rem;