@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
|
@@ -1,44 +1,80 @@
|
|
|
1
1
|
@import "../SearchPaymentMethods/search-payment-methods.scss";
|
|
2
2
|
|
|
3
|
+
[data-fs-bp-basic-drawer][data-fs-slide-over-size="partial"] {
|
|
4
|
+
width: 66%;
|
|
5
|
+
min-width: 66%;
|
|
6
|
+
|
|
7
|
+
@include media(">=notebook") {
|
|
8
|
+
width: 60rem;
|
|
9
|
+
min-width: 60rem;
|
|
10
|
+
max-width: 60rem;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
3
14
|
[data-fs-bp-add-payment-methods-drawer] {
|
|
4
|
-
|
|
15
|
+
[data-fs-payment-methods-drawer] {
|
|
16
|
+
@import "../../../shared/components/EmptyState/empty-state.scss";
|
|
17
|
+
@import "@faststore/ui/src/components/atoms/Checkbox/styles.scss";
|
|
18
|
+
@import "@faststore/ui/src/components/atoms/Skeleton/styles.scss";
|
|
19
|
+
|
|
20
|
+
[data-fs-bp-add-payment-methods-drawer-description] {
|
|
21
|
+
color: #1f1f1f;
|
|
22
|
+
margin-bottom: var(--fs-spacing-3);
|
|
23
|
+
|
|
24
|
+
span {
|
|
25
|
+
color: #0366dd;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
5
28
|
|
|
6
|
-
[data-fs-payment-methods-
|
|
7
|
-
|
|
8
|
-
|
|
29
|
+
[data-fs-bp-payment-methods-checkbox] {
|
|
30
|
+
border-color: #e5e5e5;
|
|
31
|
+
}
|
|
9
32
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
33
|
+
[data-fs-bp-payment-methods-checkbox]:checked {
|
|
34
|
+
background-color: #0366dd;
|
|
35
|
+
}
|
|
13
36
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
37
|
+
[data-fs-bp-basic-drawer-button-loading-indicator] {
|
|
38
|
+
position: relative;
|
|
39
|
+
}
|
|
18
40
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
41
|
+
[data-fs-payment-methods-loading] {
|
|
42
|
+
* {
|
|
43
|
+
margin-top: var(--fs-spacing-1);
|
|
44
|
+
padding: var(--fs-spacing-2) 0;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
22
48
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
49
|
+
[data-fs-bp-add-payment-methods-drawer-footer] {
|
|
50
|
+
display: flex;
|
|
51
|
+
justify-content: flex-end;
|
|
52
|
+
gap: var(--fs-spacing-3);
|
|
53
|
+
}
|
|
54
|
+
[data-fs-bp-payment-methods-search-container] {
|
|
55
|
+
[data-fs-bp-pagination] {
|
|
56
|
+
[data-fs-bp-counter-bottom] {
|
|
57
|
+
display: block;
|
|
58
|
+
text-align: end;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
26
62
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
63
|
+
@include media("<=tablet") {
|
|
64
|
+
[data-fs-buyer-portal-internal-search] {
|
|
65
|
+
width: 18rem !important;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
30
68
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
padding: var(--fs-spacing-2) 0;
|
|
35
|
-
}
|
|
36
|
-
}
|
|
69
|
+
@include media("<=phonemid") {
|
|
70
|
+
[data-fs-buyer-portal-internal-search] {
|
|
71
|
+
width: 14rem !important;
|
|
37
72
|
}
|
|
73
|
+
}
|
|
38
74
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
gap: var(--fs-spacing-3);
|
|
75
|
+
@include media("<=phone") {
|
|
76
|
+
[data-fs-buyer-portal-internal-search] {
|
|
77
|
+
width: 10rem !important;
|
|
43
78
|
}
|
|
79
|
+
}
|
|
44
80
|
}
|
package/src/features/payment-methods/components/SearchPaymentMethods/SearchPaymentMethods.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InternalSearch } from "../../../shared/components";
|
|
1
|
+
import { InternalSearch, Pagination } from "../../../shared/components";
|
|
2
2
|
import { InternalSearchProps } from "../../../shared/components/InternalSearch/InternalSearch";
|
|
3
3
|
import { useQueryParams } from "../../../shared/hooks";
|
|
4
4
|
|
|
@@ -36,9 +36,11 @@ export const SearchPaymentMethods = ({
|
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
/>
|
|
39
|
-
<
|
|
40
|
-
{
|
|
41
|
-
|
|
39
|
+
<Pagination
|
|
40
|
+
total={getCount(paymentMethodsData)}
|
|
41
|
+
currentCount={getCount(data)}
|
|
42
|
+
variant="counter"
|
|
43
|
+
/>
|
|
42
44
|
</div>
|
|
43
45
|
);
|
|
44
46
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useEffect, useState } from "react";
|
|
1
|
+
import { useEffect, useMemo, useState } from "react";
|
|
2
2
|
|
|
3
3
|
import { HeaderInside, Table } from "../../../shared/components";
|
|
4
4
|
import ConditionalTooltip from "../../../shared/components/ConditionalTooltip/ConditionalTooltip";
|
|
@@ -49,6 +49,7 @@ export const PaymentMethodsLayout = ({
|
|
|
49
49
|
isOpen: isAddPaymentMethodDrawerOpen,
|
|
50
50
|
...addDrawerProps
|
|
51
51
|
} = useDrawerProps();
|
|
52
|
+
|
|
52
53
|
const {
|
|
53
54
|
open: openRemoveDrawer,
|
|
54
55
|
isOpen: isRemovePaymentMethodDrawerOpen,
|
|
@@ -68,11 +69,21 @@ export const PaymentMethodsLayout = ({
|
|
|
68
69
|
search: querySearch,
|
|
69
70
|
});
|
|
70
71
|
|
|
72
|
+
const fetchedMethods = paymentMethods ?? [];
|
|
73
|
+
const currentPaymentMethods = useMemo(
|
|
74
|
+
() => (paymentMethodsData ?? []).filter((m) => m?.isEnabled),
|
|
75
|
+
[paymentMethodsData]
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
const isSinglePaymentMethod = currentPaymentMethods.length <= 1;
|
|
79
|
+
const allPaymentMethodsSelected =
|
|
80
|
+
currentPaymentMethods.length === (paymentMethodsData?.length ?? 0);
|
|
81
|
+
|
|
71
82
|
useEffect(() => {
|
|
72
83
|
if (!isLoadingPaymentMethods && querySearch.length > 0) {
|
|
73
|
-
setPaymentMethodsData(
|
|
84
|
+
setPaymentMethodsData(fetchedMethods);
|
|
74
85
|
}
|
|
75
|
-
}, [
|
|
86
|
+
}, [fetchedMethods, isLoadingPaymentMethods, querySearch]);
|
|
76
87
|
|
|
77
88
|
const handleSearch = (searchTerm: string) => {
|
|
78
89
|
setQuerySearch(searchTerm);
|
|
@@ -94,13 +105,53 @@ export const PaymentMethodsLayout = ({
|
|
|
94
105
|
}
|
|
95
106
|
};
|
|
96
107
|
|
|
97
|
-
|
|
98
|
-
|
|
108
|
+
// --------- Render helpers (sem ternários encadeados) ----------
|
|
109
|
+
const renderEmpty = () => (
|
|
110
|
+
<EmptyState
|
|
111
|
+
title="No results found"
|
|
112
|
+
description={
|
|
113
|
+
querySearch.length > 0
|
|
114
|
+
? "Try using different terms"
|
|
115
|
+
: "No payment methods found"
|
|
116
|
+
}
|
|
117
|
+
/>
|
|
99
118
|
);
|
|
100
119
|
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
120
|
+
const renderTableRows = () =>
|
|
121
|
+
currentPaymentMethods.map((method) => (
|
|
122
|
+
<Table.Row
|
|
123
|
+
data-fs-bp-payment-method-table-row
|
|
124
|
+
key={method?.id}
|
|
125
|
+
searchTerm={querySearch}
|
|
126
|
+
title={method?.name}
|
|
127
|
+
iconName="AccountBalanceWallet"
|
|
128
|
+
iconSize={24}
|
|
129
|
+
children={
|
|
130
|
+
<td>
|
|
131
|
+
<RemoveMethodButton
|
|
132
|
+
isLoading={isRemovingPaymentMethod}
|
|
133
|
+
onClick={() => onRemoveClick(method)}
|
|
134
|
+
disabled={isSinglePaymentMethod || isRemovingPaymentMethod}
|
|
135
|
+
/>
|
|
136
|
+
</td>
|
|
137
|
+
}
|
|
138
|
+
/>
|
|
139
|
+
));
|
|
140
|
+
|
|
141
|
+
const renderTable = () => (
|
|
142
|
+
<Table>
|
|
143
|
+
<Table.Head columns={getTableColumns()} />
|
|
144
|
+
<Table.Body>
|
|
145
|
+
{isLoadingPaymentMethods ? <Table.Loading /> : renderTableRows()}
|
|
146
|
+
</Table.Body>
|
|
147
|
+
</Table>
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
const renderContent = () => {
|
|
151
|
+
if (!isLoadingPaymentMethods && fetchedMethods.length === 0)
|
|
152
|
+
return renderEmpty();
|
|
153
|
+
return renderTable();
|
|
154
|
+
};
|
|
104
155
|
|
|
105
156
|
return (
|
|
106
157
|
<GlobalLayout>
|
|
@@ -129,71 +180,31 @@ export const PaymentMethodsLayout = ({
|
|
|
129
180
|
/>
|
|
130
181
|
</ConditionalTooltip>
|
|
131
182
|
</HeaderInside>
|
|
183
|
+
|
|
132
184
|
<SearchPaymentMethods
|
|
133
185
|
data={currentPaymentMethods}
|
|
134
186
|
paymentMethodsData={paymentMethodsData}
|
|
135
187
|
defaultValue={querySearch}
|
|
136
188
|
textSearch={handleSearch}
|
|
137
189
|
/>
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
title="No results found"
|
|
141
|
-
description={
|
|
142
|
-
querySearch.length > 0
|
|
143
|
-
? "Try using different terms"
|
|
144
|
-
: "No payment methods found"
|
|
145
|
-
}
|
|
146
|
-
/>
|
|
147
|
-
) : (
|
|
148
|
-
<Table>
|
|
149
|
-
<Table.Head columns={getTableColumns()} />
|
|
150
|
-
{isLoadingPaymentMethods ? (
|
|
151
|
-
<Table.Body>
|
|
152
|
-
<Table.Loading />
|
|
153
|
-
</Table.Body>
|
|
154
|
-
) : (
|
|
155
|
-
<Table.Body>
|
|
156
|
-
{currentPaymentMethods.map((method) => (
|
|
157
|
-
<Table.Row
|
|
158
|
-
data-fs-bp-payment-method-table-row
|
|
159
|
-
key={method?.id}
|
|
160
|
-
searchTerm={querySearch}
|
|
161
|
-
title={method?.name}
|
|
162
|
-
iconName={"AccountBalanceWallet"}
|
|
163
|
-
iconSize={24}
|
|
164
|
-
children={
|
|
165
|
-
<td>
|
|
166
|
-
<RemoveMethodButton
|
|
167
|
-
isLoading={isRemovingPaymentMethod}
|
|
168
|
-
onClick={() => {
|
|
169
|
-
onRemoveClick(method);
|
|
170
|
-
}}
|
|
171
|
-
disabled={
|
|
172
|
-
isSinglePaymentMethod || isRemovingPaymentMethod
|
|
173
|
-
}
|
|
174
|
-
/>
|
|
175
|
-
</td>
|
|
176
|
-
}
|
|
177
|
-
/>
|
|
178
|
-
))}
|
|
179
|
-
</Table.Body>
|
|
180
|
-
)}
|
|
181
|
-
</Table>
|
|
182
|
-
)}
|
|
190
|
+
|
|
191
|
+
{renderContent()}
|
|
183
192
|
|
|
184
193
|
{!isLoadingPaymentMethods && (
|
|
185
194
|
<p data-fs-bp-payment-methods-search-container-counter-bottom>
|
|
186
|
-
{`${currentPaymentMethods
|
|
195
|
+
{`${currentPaymentMethods.length} of ${
|
|
187
196
|
paymentMethodsData?.length ?? 0
|
|
188
197
|
}`}
|
|
189
198
|
</p>
|
|
190
199
|
)}
|
|
200
|
+
|
|
191
201
|
{isAddPaymentMethodDrawerOpen && (
|
|
192
202
|
<AddPaymentMethodsDrawer
|
|
193
203
|
{...addDrawerProps}
|
|
194
204
|
isOpen={isAddPaymentMethodDrawerOpen}
|
|
195
205
|
/>
|
|
196
206
|
)}
|
|
207
|
+
|
|
197
208
|
{isRemovePaymentMethodDrawerOpen && selectedMethod && (
|
|
198
209
|
<RemovePaymentMethodsDrawer
|
|
199
210
|
{...removeDrawerProps}
|
package/src/features/payment-methods/layouts/PaymentMethodsLayout/payment-methods-layout.scss
CHANGED
|
@@ -5,110 +5,128 @@
|
|
|
5
5
|
|
|
6
6
|
[data-fs-payment-methods-section] [data-fs-payment-methods-list],
|
|
7
7
|
[data-fs-payment-methods-drawer] [data-fs-payment-methods-list] {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
8
|
+
width: 100%;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
padding-bottom: var(--fs-spacing-3);
|
|
12
|
+
|
|
13
|
+
[data-fs-bp-payment-methods-list-title] {
|
|
14
|
+
color: #5c5c5c;
|
|
15
|
+
margin-bottom: var(--fs-spacing-1);
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: start;
|
|
18
|
+
align-items: center;
|
|
19
|
+
gap: var(--fs-spacing-3);
|
|
20
|
+
|
|
21
|
+
&[data-fs-bp-payment-methods-list-title-drawer="true"] {
|
|
22
|
+
padding-left: var(--fs-spacing-3);
|
|
23
|
+
padding-right: var(--fs-spacing-3);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
[data-fs-payment-methods-line] {
|
|
28
|
+
border-top: var(--fs-border-width) solid #e5e5e5;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-fs-payment-methods-row] {
|
|
32
|
+
display: flex;
|
|
33
|
+
justify-content: space-between;
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
background-color: #f5f5f5;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:visited {
|
|
40
|
+
color: #1f1f1f;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&[data-fs-payment-methods-row-selected="true"] {
|
|
44
|
+
background-color: #f1f8fd;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[data-fs-payment-methods-row-information] {
|
|
48
|
+
display: flex;
|
|
49
|
+
gap: var(--fs-spacing-2);
|
|
50
|
+
align-items: center;
|
|
51
|
+
margin-left: var(--fs-spacing-3);
|
|
52
|
+
padding: var(--fs-spacing-2) 0;
|
|
53
|
+
size: var(--fs-text-size-1);
|
|
54
|
+
color: #0366dd;
|
|
55
|
+
text-decoration: none;
|
|
56
|
+
flex: 1;
|
|
57
|
+
|
|
58
|
+
[data-fs-payment-methods-row-icon-wrapper] {
|
|
59
|
+
color: #0366dd;
|
|
60
|
+
display: flex;
|
|
61
|
+
align-items: center;
|
|
62
|
+
justify-content: center;
|
|
63
|
+
width: var(--fs-spacing-6);
|
|
64
|
+
height: var(--fs-spacing-6);
|
|
65
|
+
|
|
66
|
+
margin-right: calc(var(--fs-spacing-2) - var(--fs-spacing-0));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[data-fs-payment-methods-name] {
|
|
70
|
+
width: var(--data-fs-users-table-width);
|
|
71
|
+
font-weight: var(--fs-text-weight-medium);
|
|
72
|
+
font-size: var(--fs-text-size-1);
|
|
73
|
+
line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
74
|
+
text-decoration: none;
|
|
75
|
+
color: #000;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
[data-fs-payment-methods-section] {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
82
|
+
@import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
|
|
83
|
+
|
|
84
|
+
@import "../../../shared/components/InternalSearch/internal-search.scss";
|
|
85
|
+
@import "../../../shared/components/HeaderInside/header-inside.scss";
|
|
86
|
+
@import "../../../shared/components/Table/table.scss";
|
|
87
|
+
@import "../../../shared/components/EmptyState/empty-state.scss";
|
|
88
|
+
|
|
89
|
+
@include media(">=notebook") {
|
|
90
|
+
padding: 0 calc(var(--fs-spacing-9) - var(--fs-spacing-0));
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-fs-payment-methods-tooltip] {
|
|
94
|
+
--fs-tooltip-background: var(--fs-text-color-secondary);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[data-fs-bp-payment-method-table-row] {
|
|
98
|
+
td:nth-child(3) {
|
|
99
|
+
vertical-align: middle;
|
|
100
|
+
text-align: right;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-fs-bp-payment-methods-search-container-counter-bottom] {
|
|
105
|
+
font-size: var(--fs-text-size-1);
|
|
106
|
+
color: #5c5c5c;
|
|
107
|
+
text-align: end;
|
|
108
|
+
display: none;
|
|
109
|
+
margin-top: var(--fs-spacing-3);
|
|
110
|
+
@include media("<=tablet") {
|
|
111
|
+
display: block;
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@include media("<=tablet") {
|
|
116
|
+
[data-fs-buyer-portal-internal-search] {
|
|
117
|
+
width: 100% !important;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-fs-bp-header-inside] {
|
|
121
|
+
[data-fs-header-inside-button] {
|
|
122
|
+
position: fixed;
|
|
123
|
+
bottom: 20px;
|
|
124
|
+
right: 20px;
|
|
125
|
+
border: none;
|
|
126
|
+
border-radius: 50%;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
z-index: 1;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
114
132
|
}
|
|
@@ -49,11 +49,16 @@
|
|
|
49
49
|
position: relative;
|
|
50
50
|
cursor: pointer;
|
|
51
51
|
padding: var(--fs-spacing-2) calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
52
|
+
|
|
52
53
|
min-width: 10.625rem;
|
|
53
54
|
border-radius: var(--fs-border-radius-pill);
|
|
54
55
|
font-size: var(--fs-text-size-1);
|
|
55
56
|
font-weight: var(--fs-text-weight-semibold);
|
|
56
57
|
line-height: var(--fs-spacing-3);
|
|
57
58
|
text-align: center;
|
|
59
|
+
|
|
60
|
+
@include media("<=tablet") {
|
|
61
|
+
min-width: 8rem;
|
|
62
|
+
}
|
|
58
63
|
}
|
|
59
64
|
}
|
|
@@ -25,7 +25,7 @@ const getMenuItems = (orgUnit?: OrgUnitBasicData | null) => {
|
|
|
25
25
|
|
|
26
26
|
const firstOption = orgUnit
|
|
27
27
|
? { name: orgUnit.name, link: `/org-unit/${orgUnit.id}` }
|
|
28
|
-
: { name: "
|
|
28
|
+
: { name: "Organization Account", link: "/pvt/organization-account" };
|
|
29
29
|
|
|
30
30
|
return [firstOption, ...menuItems];
|
|
31
31
|
};
|
|
@@ -2,7 +2,7 @@ import { Button, Skeleton } from "@faststore/ui";
|
|
|
2
2
|
|
|
3
3
|
interface PaginationProps {
|
|
4
4
|
currentCount: number;
|
|
5
|
-
variant?: "default" | "onlyText";
|
|
5
|
+
variant?: "default" | "onlyText" | "counter";
|
|
6
6
|
total: number;
|
|
7
7
|
loading?: boolean;
|
|
8
8
|
showMore?(): void;
|
|
@@ -23,13 +23,23 @@ export const Pagination = ({
|
|
|
23
23
|
</Button>
|
|
24
24
|
)}
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
{variant === "counter" ? (
|
|
27
|
+
<span data-fs-bp-counter-bottom>
|
|
28
|
+
{loading ? (
|
|
29
|
+
<Skeleton size={{ width: "3.75rem", height: "1.25rem" }} />
|
|
30
|
+
) : (
|
|
31
|
+
`${currentCount} of ${total}`
|
|
32
|
+
)}
|
|
33
|
+
</span>
|
|
34
|
+
) : (
|
|
35
|
+
<span data-fs-bp-pagination-span>
|
|
36
|
+
{loading ? (
|
|
37
|
+
<Skeleton size={{ width: "3.75rem", height: "1.25rem" }} />
|
|
38
|
+
) : (
|
|
39
|
+
`${currentCount} of ${total}`
|
|
40
|
+
)}
|
|
41
|
+
</span>
|
|
42
|
+
)}
|
|
33
43
|
</div>
|
|
34
44
|
);
|
|
35
45
|
};
|
|
@@ -24,4 +24,18 @@
|
|
|
24
24
|
color: #5c5c5c;
|
|
25
25
|
margin-left: auto;
|
|
26
26
|
}
|
|
27
|
+
|
|
28
|
+
@include media("<=tablet") {
|
|
29
|
+
[data-fs-buyer-portal-internal-search] {
|
|
30
|
+
width: 100% !important;
|
|
31
|
+
}
|
|
32
|
+
& > [data-fs-bp-counter-bottom] {
|
|
33
|
+
display: none !important;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
& > [data-fs-bp-counter-bottom] {
|
|
38
|
+
display: block;
|
|
39
|
+
text-align: end;
|
|
40
|
+
}
|
|
27
41
|
}
|
|
@@ -60,9 +60,11 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
@include media("<=tablet") {
|
|
63
|
-
width:
|
|
64
|
-
min-width:
|
|
65
|
-
max-width:
|
|
63
|
+
width: 19rem !important;
|
|
64
|
+
min-width: 19rem !important;
|
|
65
|
+
max-width: 19rem !important;
|
|
66
|
+
height: 100% !important;
|
|
67
|
+
border-radius: 0 !important;
|
|
66
68
|
& > [data-fs-bp-basic-drawer-heading] {
|
|
67
69
|
padding: calc(var(--fs-spacing-3) + var(--fs-spacing-0))
|
|
68
70
|
calc(var(--fs-spacing-3) + var(--fs-spacing-0))
|