@vtex/faststore-plugin-buyer-portal 1.1.87 → 1.1.89

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 (52) hide show
  1. package/CHANGELOG.md +39 -28
  2. package/README.md +2 -2
  3. package/cypress/constants.ts +1 -1
  4. package/cypress/integration/collections.test.ts +9 -5
  5. package/cypress/integration/credit-cards.test.ts +24 -20
  6. package/cypress/integration/roles.test.ts +3 -1
  7. package/cypress/support/commands.ts +1 -1
  8. package/package.json +1 -1
  9. package/plugin.config.js +20 -20
  10. package/src/features/addresses/components/AddressForm/AddressForm.tsx +72 -41
  11. package/src/features/addresses/data/USA.ts +69 -64
  12. package/src/features/addresses/data/countries.ts +6 -1
  13. package/src/features/addresses/data/states.ts +4 -2
  14. package/src/features/addresses/layouts/AddressDetailsLayout/AddressDetailsLayout.tsx +10 -1
  15. package/src/features/addresses/utils/index.ts +1 -0
  16. package/src/features/addresses/utils/stateUtils.ts +63 -0
  17. package/src/features/budgets/components/BudgetAddForm/budget-add-form.scss +9 -3
  18. package/src/features/budgets/components/BudgetAllocationsSelection/budget-allocations-selection.scss +2 -2
  19. package/src/features/budgets/components/BudgetAllocationsTable/budget-allocations-table.scss +29 -0
  20. package/src/features/budgets/components/BudgetDeleteDrawer/budget-delete-drawer.scss +13 -0
  21. package/src/features/budgets/components/BudgetRemainingBalance/BudgetRemainingBalance.tsx +5 -1
  22. package/src/features/budgets/components/BudgetRemainingBalance/budget-remaining-balance.scss +18 -1
  23. package/src/features/budgets/components/BudgetSettingsInfo/budget-settings-info.scss +19 -0
  24. package/src/features/budgets/components/BudgetsTable/BudgetsTable.tsx +12 -2
  25. package/src/features/budgets/components/BudgetsTable/budgets-table.scss +30 -1
  26. package/src/features/budgets/components/CreateBudgetAllocationDrawer/create-budget-allocation-drawer.scss +22 -6
  27. package/src/features/budgets/components/CreateBudgetDrawer/create-budget-drawer.scss +15 -6
  28. package/src/features/budgets/components/DeleteBudgetAllocationDrawer/delete-budget-allocations.scss +15 -1
  29. package/src/features/budgets/components/EditBudgetDrawer/edit-budget-drawer.scss +11 -1
  30. package/src/features/budgets/layouts/BudgetsDetailsLayout/BudgetsDetailsLayout.tsx +76 -75
  31. package/src/features/budgets/layouts/BudgetsDetailsLayout/budget-details-layout.scss +22 -19
  32. package/src/features/budgets/layouts/BudgetsLayout/budgets-layout.scss +6 -0
  33. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/basic-buying-policy-drawer.scss +4 -0
  34. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/buying-policies-layout.scss +41 -6
  35. package/src/features/buying-policies/layouts/BuyingPolicyDetailsLayout/BuyingPolicyDetailsLayout.tsx +1 -1
  36. package/src/features/buying-policies/layouts/BuyingPolicyDetailsLayout/buying-policy-details-layout.scss +17 -1
  37. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +93 -68
  38. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/add-payment-methods-drawer.scss +66 -30
  39. package/src/features/payment-methods/components/SearchPaymentMethods/SearchPaymentMethods.tsx +6 -4
  40. package/src/features/payment-methods/components/SearchPaymentMethods/search-payment-methods.scss +3 -0
  41. package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +65 -54
  42. package/src/features/payment-methods/layouts/PaymentMethodsLayout/payment-methods-layout.scss +121 -103
  43. package/src/features/shared/components/CustomDropdown/custom-dropdown.scss +5 -0
  44. package/src/features/shared/components/InternalTopbar/InternalTopbar.tsx +1 -1
  45. package/src/features/shared/components/MainLinksDropdownMenu/MainLinksDropdownMenu.tsx +1 -1
  46. package/src/features/shared/components/Pagination/Pagination.tsx +18 -8
  47. package/src/features/shared/components/Pagination/pagination.scss +14 -0
  48. package/src/features/shared/layouts/BaseTabsLayout/sidebar-drawer/sidebar-drawer.scss +5 -3
  49. package/src/features/shared/utils/buyerPortalRoutes.ts +1 -1
  50. package/src/features/shared/utils/routeLayoutMapping.ts +22 -21
  51. package/src/pages/org-units.tsx +1 -1
  52. package/src/pages/user-details.tsx +1 -1
@@ -12,89 +12,90 @@ export interface RouteTabsLayoutConfig {
12
12
 
13
13
  export const ROUTE_TABS_LAYOUT_MAPPING: Record<string, RouteTabsLayoutConfig> =
14
14
  {
15
- "/buyer-portal/profile/[orgUnitId]/[contractId]": {
15
+ "/pvt/organization-account/profile/[orgUnitId]/[contractId]": {
16
16
  layout: "ContractTabsLayout",
17
17
  pageName: "Contract",
18
18
  pageTitle: "Profile",
19
19
  },
20
- "/buyer-portal/addresses/[orgUnitId]/[contractId]": {
20
+ "/pvt/organization-account/addresses/[orgUnitId]/[contractId]": {
21
21
  layout: "ContractTabsLayout",
22
22
  pageName: "Contract",
23
23
  pageTitle: "Addresses",
24
24
  },
25
- "/buyer-portal/address/[orgUnitId]/[contractId]/[addressId]": {
25
+ "/pvt/organization-account/address/[orgUnitId]/[contractId]/[addressId]": {
26
26
  layout: "ContractTabsLayout",
27
27
  pageName: "Contract",
28
28
  pageTitle: "Address Details",
29
29
  },
30
- "/buyer-portal/payment-methods/[orgUnitId]/[contractId]": {
30
+ "/pvt/organization-account/payment-methods/[orgUnitId]/[contractId]": {
31
31
  layout: "ContractTabsLayout",
32
32
  pageName: "Contract",
33
33
  pageTitle: "Payment Methods",
34
34
  },
35
- "/buyer-portal/credit-cards/[orgUnitId]/[contractId]": {
35
+ "/pvt/organization-account/credit-cards/[orgUnitId]/[contractId]": {
36
36
  layout: "ContractTabsLayout",
37
37
  pageName: "Contract",
38
38
  pageTitle: "Credit Cards",
39
39
  },
40
- "/buyer-portal/collections/[orgUnitId]/[contractId]": {
40
+ "/pvt/organization-account/collections/[orgUnitId]/[contractId]": {
41
41
  layout: "ContractTabsLayout",
42
42
  pageName: "Contract",
43
43
  pageTitle: "Collections",
44
44
  },
45
- "/buyer-portal/po-numbers/[orgUnitId]/[contractId]": {
45
+ "/pvt/organization-account/po-numbers/[orgUnitId]/[contractId]": {
46
46
  layout: "ContractTabsLayout",
47
47
  pageName: "Contract",
48
48
  pageTitle: "PO Numbers",
49
49
  },
50
- "/buyer-portal/cost-centers/[orgUnitId]/[contractId]": {
50
+ "/pvt/organization-account/cost-centers/[orgUnitId]/[contractId]": {
51
51
  layout: "ContractTabsLayout",
52
52
  pageName: "Contract",
53
53
  pageTitle: "Cost Centers",
54
54
  },
55
- "/buyer-portal/releases/[orgUnitId]/[contractId]": {
55
+ "/pvt/organization-account/releases/[orgUnitId]/[contractId]": {
56
56
  layout: "ContractTabsLayout",
57
57
  pageName: "Contract",
58
58
  pageTitle: "Releases",
59
59
  },
60
60
 
61
- "/buyer-portal/buying-policies/[orgUnitId]/[contractId]": {
61
+ "/pvt/organization-account/buying-policies/[orgUnitId]/[contractId]": {
62
62
  layout: "FinanceTabsLayout",
63
63
  pageName: "Finance and Compliance",
64
64
  pageTitle: "Buying Policies",
65
65
  },
66
- "/buyer-portal/buying-policy/[orgUnitId]/[contractId]/[buyingPolicyId]": {
67
- layout: "FinanceTabsLayout",
68
- pageName: "Finance and Compliance",
69
- pageTitle: "Buying Policy Details",
70
- },
66
+ "/pvt/organization-account/buying-policy/[orgUnitId]/[contractId]/[buyingPolicyId]":
67
+ {
68
+ layout: "FinanceTabsLayout",
69
+ pageName: "Finance and Compliance",
70
+ pageTitle: "Buying Policy Details",
71
+ },
71
72
 
72
- "/buyer-portal/roles/[orgUnitId]": {
73
+ "/pvt/organization-account/roles/[orgUnitId]": {
73
74
  layout: "OrgUnitTabsLayout",
74
75
  pageName: "Organization",
75
76
  pageTitle: "Roles",
76
77
  },
77
- "/buyer-portal/roles/[orgUnitId]/[roleName]": {
78
+ "/pvt/organization-account/roles/[orgUnitId]/[roleName]": {
78
79
  layout: "OrgUnitTabsLayout",
79
80
  pageName: "Organization",
80
81
  pageTitle: "Role Details",
81
82
  },
82
- "/buyer-portal/users/[orgUnitId]": {
83
+ "/pvt/organization-account/users/[orgUnitId]": {
83
84
  layout: "OrgUnitTabsLayout",
84
85
  pageName: "Organization",
85
86
  pageTitle: "Users",
86
87
  },
87
- "/buyer-portal/user/[orgUnitId]/[userId]": {
88
+ "/pvt/organization-account/user/[orgUnitId]/[userId]": {
88
89
  layout: "OrgUnitTabsLayout",
89
90
  pageName: "Organization",
90
91
  pageTitle: "User Details",
91
92
  },
92
- "/buyer-portal/org-units/[orgUnitId]": {
93
+ "/pvt/organization-account/org-units/[orgUnitId]": {
93
94
  layout: "OrgUnitTabsLayout",
94
95
  pageName: "Organization",
95
96
  pageTitle: "Organization Details",
96
97
  },
97
- "/buyer-portal/org-unit/[orgUnitId]": {
98
+ "/pvt/organization-account/org-unit/[orgUnitId]": {
98
99
  layout: "OrgUnitDetailsLayout",
99
100
  pageName: "Organization",
100
101
  pageTitle: "Organization Details",
@@ -95,7 +95,7 @@ export async function loader(
95
95
  };
96
96
  }
97
97
 
98
- data.res?.writeHead(302, { Location: "/buyer-portal" });
98
+ data.res?.writeHead(302, { Location: "/pvt/organization-account" });
99
99
  data.res?.end();
100
100
 
101
101
  return {
@@ -41,7 +41,7 @@ export async function loader(
41
41
  const user = await getUserByIdService({ orgUnitId, userId, cookie });
42
42
 
43
43
  if (!user) {
44
- data.res?.writeHead(302, { Location: "/buyer-portal" });
44
+ data.res?.writeHead(302, { Location: "/pvt/organization-account" });
45
45
  data.res?.end();
46
46
  }
47
47