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