@vtex/faststore-plugin-buyer-portal 1.1.95 → 1.1.96
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/package.json +1 -1
- package/src/features/addresses/components/AddressLocationsList/AddressLocationsList.tsx +28 -39
- package/src/features/addresses/components/AddressRecipientsList/AddressRecipientsList.tsx +42 -42
- package/src/features/addresses/layouts/AddressDetailsLayout/address-details-layout.scss +285 -286
- package/src/features/addresses/layouts/AddressesLayout/AddressesLayout.tsx +26 -29
- package/src/features/addresses/layouts/AddressesLayout/addresses-layout.scss +144 -151
- package/src/features/budgets/components/BudgetAllocationsSelection/BudgetAllocationsSelection.tsx +61 -57
- package/src/features/budgets/components/BudgetAllocationsSelection/budget-allocations-selection.scss +131 -232
- package/src/features/budgets/components/BudgetAllocationsTable/BudgetAllocationsTable.tsx +104 -91
- package/src/features/budgets/components/BudgetAllocationsTable/budget-allocations-table.scss +80 -182
- package/src/features/budgets/components/BudgetsTable/BudgetsTable.tsx +90 -107
- package/src/features/budgets/components/BudgetsTable/budgets-table.scss +128 -126
- package/src/features/budgets/layouts/BudgetsLayout/BudgetsLayout.tsx +0 -15
- package/src/features/buying-policies/layouts/BuyingPoliciesLayout/BuyingPoliciesLayout.tsx +61 -46
- package/src/features/buying-policies/layouts/BuyingPoliciesLayout/buying-policies-layout.scss +64 -70
- package/src/features/collections/components/CollectionsTable/CollectionsTable.tsx +12 -18
- package/src/features/collections/components/CollectionsTable/collections-table.scss +138 -118
- package/src/features/collections/components/table/AddCollectionsDrawerTable.tsx +48 -54
- package/src/features/collections/components/table/add-collections-drawer-table.scss +57 -56
- package/src/features/credit-cards/layouts/CreditCardsLayout/CreditCardLayout.tsx +55 -61
- package/src/features/credit-cards/layouts/CreditCardsLayout/credit-card-layout.scss +63 -153
- package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +58 -49
- package/src/features/payment-methods/components/AddPaymentMethodsDrawer/add-payment-methods-drawer.scss +58 -63
- package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +15 -12
- package/src/features/roles/layout/RoleDetailsLayout/RoleDetailsLayout.tsx +57 -26
- package/src/features/roles/layout/RoleDetailsLayout/role-details-layout.scss +77 -0
- package/src/features/roles/layout/RolesLayout/RolesLayout.tsx +4 -12
- package/src/features/roles/layout/RolesLayout/roles-layout.scss +8 -22
- package/src/features/shared/components/CustomField/table/CustomFieldTable.tsx +67 -110
- package/src/features/shared/components/CustomField/table/custom-field-table.scss +39 -144
- package/src/features/shared/components/IconBookmarked/IconBookmarked.tsx +9 -0
- package/src/features/shared/components/IconBookmarked/icon-bookmarked.scss +9 -0
- package/src/features/shared/components/Table/Table.tsx +7 -2
- package/src/features/shared/components/Table/TableCell/TableCell.tsx +15 -3
- package/src/features/shared/components/Table/TableCell/table-cell.scss +34 -0
- package/src/features/shared/components/Table/TableHead/TableHead.tsx +34 -6
- package/src/features/shared/components/Table/TableHead/table-head.scss +53 -49
- package/src/features/shared/components/Table/TableLoading/TableLoading.tsx +16 -6
- package/src/features/shared/components/Table/TableLoading/table-loading.scss +13 -8
- package/src/features/shared/components/Table/TableRow/TableRow.tsx +65 -42
- package/src/features/shared/components/Table/TableRow/table-row.scss +104 -68
- package/src/features/shared/components/Table/table.scss +11 -6
- package/src/features/shared/components/Table/utils/tableColumns.ts +30 -33
- package/src/features/shared/components/index.ts +1 -0
- package/src/features/users/layouts/UsersLayout/UsersLayout.tsx +20 -27
- package/src/themes/layouts.scss +1 -0
|
@@ -1,128 +1,130 @@
|
|
|
1
|
-
@import "../BudgetProgressBar/budget-progress-bar.scss";
|
|
2
1
|
[data-fs-bp-budgets-table] {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
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
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
2
|
+
@import "../BudgetProgressBar/budget-progress-bar.scss";
|
|
3
|
+
@import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
|
|
4
|
+
@import "../../../shared/components/Table/table.scss";
|
|
5
|
+
|
|
6
|
+
width: 100%;
|
|
7
|
+
|
|
8
|
+
[data-fs-table] {
|
|
9
|
+
overflow-x: visible;
|
|
10
|
+
}
|
|
11
|
+
[data-fs-bp-table-row] {
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
[data-fs-bp-head-row] {
|
|
16
|
+
border-bottom: var(--fs-table-bordered-border-width) solid
|
|
17
|
+
var(--fs-table-bordered-border-color);
|
|
18
|
+
|
|
19
|
+
color: #5c5c5c;
|
|
20
|
+
height: var(--fs-spacing-8);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
[data-fs-table-head="true"] {
|
|
24
|
+
[data-fs-bp-head-row="true"] {
|
|
25
|
+
&:hover {
|
|
26
|
+
background-color: initial;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-fs-table-cell-content] {
|
|
32
|
+
width: 99%;
|
|
33
|
+
height: 1.875rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-fs-tooltip] {
|
|
37
|
+
--fs-tooltip-background: #1f1f1f;
|
|
38
|
+
border-bottom: none;
|
|
39
|
+
text-wrap: balance;
|
|
40
|
+
text-align: justify;
|
|
41
|
+
|
|
42
|
+
[data-fs-tooltip-placement="left-center"] {
|
|
43
|
+
[data-fs-tooltip-indicator="true"] {
|
|
44
|
+
margin-left: -0.1%;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
[data-fs-tooltip-placement="top-center"] {
|
|
48
|
+
[data-fs-tooltip-indicator="true"] {
|
|
49
|
+
margin-top: -1%;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-fs-table-row] {
|
|
55
|
+
height: var(--fs-spacing-8);
|
|
56
|
+
cursor: pointer;
|
|
57
|
+
padding: 0 var(--fs-spacing-4);
|
|
58
|
+
|
|
59
|
+
&:hover {
|
|
60
|
+
background-color: var(--fs-color-neutral-bkg);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-fs-table-cell="header"] {
|
|
64
|
+
display: flex;
|
|
65
|
+
height: var(--fs-spacing-8);
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
align-items: center;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@include media("<tablet") {
|
|
71
|
+
[data-fs-table-cell] {
|
|
72
|
+
display: none;
|
|
73
|
+
|
|
74
|
+
&:first-child {
|
|
75
|
+
display: flex;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&:last-child {
|
|
79
|
+
display: table-cell;
|
|
80
|
+
padding-right: 0;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@include media("<notebook") {
|
|
86
|
+
[data-fs-table-cell="data"]:not(:first-of-type) {
|
|
87
|
+
text-align: right;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
[data-fs-bp-cell-remaining] {
|
|
91
|
+
opacity: 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
[data-fs-bp-cell-currency] {
|
|
95
|
+
display: none;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
[data-fs-table-cell-width] {
|
|
100
|
+
width: 13.75rem;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
[data-fs-bp-text-medium] {
|
|
104
|
+
font-weight: var(--fs-text-weight-medium);
|
|
105
|
+
font-size: var(--fs-text-size-1);
|
|
106
|
+
line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
107
|
+
letter-spacing: -1%;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-fs-bp-budgets-dropdown-trigger] [data-fs-icon] {
|
|
111
|
+
margin-right: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
[data-fs-bp-table-row-options] {
|
|
115
|
+
width: var(--fs-spacing-8);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
[data-fs-bp-icon-cell] {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
height: inherit;
|
|
122
|
+
|
|
123
|
+
&[data-fs-table-cell] {
|
|
124
|
+
[data-fs-icon] {
|
|
125
|
+
width: var(--fs-spacing-4);
|
|
126
|
+
height: var(--fs-spacing-4);
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
}
|
|
128
130
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
import { useCallback, useState } from "react";
|
|
2
2
|
|
|
3
|
-
import { useRouter } from "next/router";
|
|
4
|
-
|
|
5
3
|
import { IconButton } from "@faststore/ui";
|
|
6
4
|
|
|
7
5
|
import { HeaderInside, Icon, InternalSearch } from "../../../shared/components";
|
|
@@ -13,7 +11,6 @@ import {
|
|
|
13
11
|
useQueryParams,
|
|
14
12
|
} from "../../../shared/hooks";
|
|
15
13
|
import { FinanceTabsLayout, GlobalLayout } from "../../../shared/layouts";
|
|
16
|
-
import { buyerPortalRoutes } from "../../../shared/utils/buyerPortalRoutes";
|
|
17
14
|
import { BudgetDeleteDrawer } from "../../components/BudgetDeleteDrawer/BudgetDeleteDrawer";
|
|
18
15
|
import { BudgetsTable } from "../../components/BudgetsTable/BudgetsTable";
|
|
19
16
|
import { CreateBudgetAllocationDrawer } from "../../components/CreateBudgetAllocationDrawer/CreateBudgetAllocationDrawer";
|
|
@@ -41,7 +38,6 @@ export const BudgetsLayout = ({ data }: BudgetsLayoutProps) => {
|
|
|
41
38
|
currentOrgUnit: orgUnit,
|
|
42
39
|
currentContract: contract,
|
|
43
40
|
} = useBuyerPortal();
|
|
44
|
-
const route = useRouter();
|
|
45
41
|
const [paginationLoading, setPaginationLoading] = useState<boolean>(false);
|
|
46
42
|
const [loading, setLoading] = useState<boolean>(false);
|
|
47
43
|
const [page, setPage] = useState<number>(1);
|
|
@@ -54,16 +50,6 @@ export const BudgetsLayout = ({ data }: BudgetsLayoutProps) => {
|
|
|
54
50
|
useState<BudgetAllocationListResponse>();
|
|
55
51
|
const [budgetsToEdit, setBudgetToEdit] = useState<Budget>();
|
|
56
52
|
|
|
57
|
-
const handleEditPage = (budgetId: string) => {
|
|
58
|
-
route.push(
|
|
59
|
-
buyerPortalRoutes.budgetsDetails({
|
|
60
|
-
orgUnitId: orgUnit?.id ?? "",
|
|
61
|
-
contractId: contract?.id ?? "",
|
|
62
|
-
budgetId,
|
|
63
|
-
})
|
|
64
|
-
);
|
|
65
|
-
};
|
|
66
|
-
|
|
67
53
|
const {
|
|
68
54
|
open: openDeleteDrawer,
|
|
69
55
|
close: closeDeleteDrawer,
|
|
@@ -186,7 +172,6 @@ export const BudgetsLayout = ({ data }: BudgetsLayoutProps) => {
|
|
|
186
172
|
total={Number(total ?? 0)}
|
|
187
173
|
onClickAllocationPage={handleAddAllocation}
|
|
188
174
|
onClickEditBudget={handleBudgetEditPage}
|
|
189
|
-
onClickDetailsPage={handleEditPage}
|
|
190
175
|
openDeleteDrawer={(budgetId) => {
|
|
191
176
|
setSelectedBudgetId(budgetId);
|
|
192
177
|
openDeleteDrawer();
|
|
@@ -82,6 +82,66 @@ export const BuyingPoliciesLayout = ({
|
|
|
82
82
|
...addBuyingPolicyDrawerProps
|
|
83
83
|
} = useDrawerProps();
|
|
84
84
|
|
|
85
|
+
const columns = getTableColumns({
|
|
86
|
+
actionsLength: 1,
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
const renderLoading = () => (
|
|
90
|
+
<Table layoutFixed>
|
|
91
|
+
<Table.Head columns={columns} />
|
|
92
|
+
<Table.Body>
|
|
93
|
+
<Table.Loading columns={columns.length} />
|
|
94
|
+
</Table.Body>
|
|
95
|
+
</Table>
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
const renderEmptyState = () => (
|
|
99
|
+
<EmptyState
|
|
100
|
+
title="No buying policies yet"
|
|
101
|
+
iconName="Rebase"
|
|
102
|
+
iconSize={40}
|
|
103
|
+
/>
|
|
104
|
+
);
|
|
105
|
+
|
|
106
|
+
function renderContent() {
|
|
107
|
+
if (isLoading) {
|
|
108
|
+
return renderLoading();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
if (buyingPolicies.length > 0) {
|
|
112
|
+
return renderEmptyState();
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
return (
|
|
116
|
+
<Table layoutFixed>
|
|
117
|
+
<Table.Head columns={columns} />
|
|
118
|
+
<Table.Body>
|
|
119
|
+
{buyingPolicies.map((buyingPolicy) => (
|
|
120
|
+
<Table.Row
|
|
121
|
+
key={buyingPolicy.id}
|
|
122
|
+
title={buyingPolicy.name}
|
|
123
|
+
iconName="Rebase"
|
|
124
|
+
iconSize={24}
|
|
125
|
+
href={buyerPortalRoutes.buyingPolicyDetails({
|
|
126
|
+
contractId: currentContract?.id ?? "",
|
|
127
|
+
orgUnitId: currentOrgUnit?.id ?? "",
|
|
128
|
+
buyingPolicyId: buyingPolicy.id,
|
|
129
|
+
})}
|
|
130
|
+
dropdownMenu={
|
|
131
|
+
<BuyingPolicyDropdownMenu
|
|
132
|
+
id={buyingPolicy.id}
|
|
133
|
+
name={buyingPolicy.name}
|
|
134
|
+
onUpdate={handleRefetchBuyingPolicies}
|
|
135
|
+
onDelete={handleRefetchBuyingPolicies}
|
|
136
|
+
/>
|
|
137
|
+
}
|
|
138
|
+
/>
|
|
139
|
+
))}
|
|
140
|
+
</Table.Body>
|
|
141
|
+
</Table>
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
|
|
85
145
|
return (
|
|
86
146
|
<GlobalLayout>
|
|
87
147
|
<FinanceTabsLayout pageName="Finance and Compliance">
|
|
@@ -101,52 +161,7 @@ export const BuyingPoliciesLayout = ({
|
|
|
101
161
|
/>
|
|
102
162
|
</div>
|
|
103
163
|
|
|
104
|
-
{
|
|
105
|
-
<Table>
|
|
106
|
-
<Table.Head
|
|
107
|
-
columns={getTableColumns({
|
|
108
|
-
withType: false,
|
|
109
|
-
withActions: false,
|
|
110
|
-
})}
|
|
111
|
-
/>{" "}
|
|
112
|
-
<Table.Body>
|
|
113
|
-
<Table.Loading />
|
|
114
|
-
</Table.Body>
|
|
115
|
-
</Table>
|
|
116
|
-
) : buyingPolicies.length === 0 ? (
|
|
117
|
-
<EmptyState
|
|
118
|
-
title="No buying policies yet"
|
|
119
|
-
iconName="Rebase"
|
|
120
|
-
iconSize={40}
|
|
121
|
-
/>
|
|
122
|
-
) : (
|
|
123
|
-
<Table>
|
|
124
|
-
<Table.Head columns={getTableColumns({ withType: false })} />
|
|
125
|
-
<Table.Body>
|
|
126
|
-
{buyingPolicies.map((buyingPolicy) => (
|
|
127
|
-
<Table.Row
|
|
128
|
-
key={buyingPolicy.id}
|
|
129
|
-
title={buyingPolicy.name}
|
|
130
|
-
iconName="Rebase"
|
|
131
|
-
iconSize={24}
|
|
132
|
-
href={buyerPortalRoutes.buyingPolicyDetails({
|
|
133
|
-
contractId: currentContract?.id ?? "",
|
|
134
|
-
orgUnitId: currentOrgUnit?.id ?? "",
|
|
135
|
-
buyingPolicyId: buyingPolicy.id,
|
|
136
|
-
})}
|
|
137
|
-
dropdownMenu={
|
|
138
|
-
<BuyingPolicyDropdownMenu
|
|
139
|
-
id={buyingPolicy.id}
|
|
140
|
-
name={buyingPolicy.name}
|
|
141
|
-
onUpdate={handleRefetchBuyingPolicies}
|
|
142
|
-
onDelete={handleRefetchBuyingPolicies}
|
|
143
|
-
/>
|
|
144
|
-
}
|
|
145
|
-
/>
|
|
146
|
-
))}
|
|
147
|
-
</Table.Body>
|
|
148
|
-
</Table>
|
|
149
|
-
)}
|
|
164
|
+
{renderContent()}
|
|
150
165
|
|
|
151
166
|
<div data-fs-bp-buying-policies-paginator>
|
|
152
167
|
{totalBuyingPolicies > buyingPolicies.length ? (
|
package/src/features/buying-policies/layouts/BuyingPoliciesLayout/buying-policies-layout.scss
CHANGED
|
@@ -4,83 +4,77 @@
|
|
|
4
4
|
@import "../../components/AddBuyingPolicyDrawer/add-buying-policy-drawer.scss";
|
|
5
5
|
|
|
6
6
|
[data-fs-buying-policies-section] {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
7
|
+
@import "../../../shared/components/HeaderInside/header-inside.scss";
|
|
8
|
+
@import "../../../shared/components/InternalSearch/internal-search.scss";
|
|
9
|
+
@import "../../../shared/components/Table/table.scss";
|
|
10
|
+
@import "../../../shared/components/LevelDivider/level-divider.scss";
|
|
11
|
+
@import "../../../shared/components/Paginator/paginator.scss";
|
|
12
|
+
@import "../../../shared/components/EmptyState/empty-state.scss";
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
min-height: 100%;
|
|
15
|
+
display: flex;
|
|
16
|
+
flex-direction: column;
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
@include media("<=tablet") {
|
|
19
|
+
padding-bottom: var(--fs-spacing-7);
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
[data-fs-bp-header-inside] {
|
|
22
|
+
[data-fs-header-inside-button] {
|
|
23
|
+
position: fixed;
|
|
24
|
+
bottom: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
25
|
+
right: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
|
|
26
|
+
padding: var(--fs-spacing-2);
|
|
27
|
+
cursor: pointer;
|
|
28
|
+
z-index: 10;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
32
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
[data-fs-empty-state-section] {
|
|
34
|
+
flex: 1;
|
|
35
|
+
color: #858585;
|
|
36
|
+
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
38
|
+
[data-fs-buying-policies-filter] {
|
|
39
|
+
display: flex;
|
|
40
|
+
justify-content: space-between;
|
|
41
|
+
padding: 0 0 var(--fs-spacing-4);
|
|
42
|
+
[data-fs-bp-paginator-counter] {
|
|
43
|
+
font-size: var(--fs-text-size-1);
|
|
44
|
+
color: #5c5c5c;
|
|
45
|
+
display: block;
|
|
46
|
+
}
|
|
47
47
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
@include media("<=tablet") {
|
|
49
|
+
[data-fs-buyer-portal-internal-search] {
|
|
50
|
+
width: 100%;
|
|
51
|
+
}
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
[data-fs-bp-paginator-counter] {
|
|
54
|
+
display: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
59
|
+
[data-fs-buying-policies-heading] {
|
|
60
|
+
display: flex;
|
|
61
|
+
font-weight: var(--fs-text-weight-regular);
|
|
62
|
+
font-size: var(--fs-text-size-1);
|
|
63
|
+
line-height: calc(var(--fs-spacing-4) - var(--fs-spacing-0));
|
|
64
|
+
color: #5c5c5c;
|
|
65
|
+
margin-bottom: var(--fs-spacing-1);
|
|
66
|
+
}
|
|
67
67
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
[data-fs-bp-table] {
|
|
82
|
-
td {
|
|
83
|
-
padding: var(--fs-spacing-1) 0;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
68
|
+
[data-fs-bp-buying-policies-paginator] {
|
|
69
|
+
display: none;
|
|
70
|
+
@include media("<=tablet") {
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
margin-top: var(--fs-spacing-0);
|
|
75
|
+
padding: var(--fs-spacing-2) 0;
|
|
76
|
+
font-size: var(--fs-text-size-1);
|
|
77
|
+
color: #5c5c5c;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
86
80
|
}
|
|
@@ -2,7 +2,7 @@ import { useState } from "react";
|
|
|
2
2
|
|
|
3
3
|
import { useSearchParams } from "next/navigation";
|
|
4
4
|
|
|
5
|
-
import { Tooltip } from "@faststore/ui";
|
|
5
|
+
import { IconButton, Tooltip } from "@faststore/ui";
|
|
6
6
|
|
|
7
7
|
import { Icon, Table } from "../../../shared/components";
|
|
8
8
|
import { getTableColumns } from "../../../shared/components/Table/utils/tableColumns";
|
|
@@ -45,10 +45,12 @@ export function CollectionsTable({
|
|
|
45
45
|
openRemoveCollectionDrawer();
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
const columns = getTableColumns({ actionsLength: 1 });
|
|
49
|
+
|
|
48
50
|
return (
|
|
49
51
|
<div data-fs-bp-collection-table>
|
|
50
|
-
<Table>
|
|
51
|
-
<Table.Head columns={
|
|
52
|
+
<Table layoutFixed>
|
|
53
|
+
<Table.Head columns={columns} />
|
|
52
54
|
<Table.Body>
|
|
53
55
|
{collections.map((item) => (
|
|
54
56
|
<Table.Row
|
|
@@ -57,34 +59,26 @@ export function CollectionsTable({
|
|
|
57
59
|
key={item.id}
|
|
58
60
|
iconSize={24}
|
|
59
61
|
searchTerm={searchTerm ?? undefined}
|
|
60
|
-
|
|
61
|
-
<Table.Cell data-fs-bp-table-row-options align="right">
|
|
62
|
+
actionIcons={
|
|
62
63
|
<Tooltip
|
|
63
64
|
content={removeTooltipContent}
|
|
64
65
|
placement={"left-center"}
|
|
65
66
|
>
|
|
66
|
-
<
|
|
67
|
+
<IconButton
|
|
67
68
|
data-fs-collections-row-action-button
|
|
68
|
-
|
|
69
|
+
icon={<Icon name={"MinusCircle"} width={20} height={20} />}
|
|
69
70
|
aria-label="Remove collections"
|
|
70
|
-
|
|
71
|
+
disabled={removeDisabled}
|
|
71
72
|
onClick={() =>
|
|
72
73
|
handleRemoveSelectedCollection({
|
|
73
74
|
id: item.id,
|
|
74
75
|
name: item.name,
|
|
75
76
|
})
|
|
76
77
|
}
|
|
77
|
-
|
|
78
|
-
<Icon
|
|
79
|
-
data-fs-icon
|
|
80
|
-
name={"MinusCircle"}
|
|
81
|
-
width={20}
|
|
82
|
-
height={20}
|
|
83
|
-
/>
|
|
84
|
-
</button>
|
|
78
|
+
/>
|
|
85
79
|
</Tooltip>
|
|
86
|
-
|
|
87
|
-
|
|
80
|
+
}
|
|
81
|
+
/>
|
|
88
82
|
))}
|
|
89
83
|
</Table.Body>
|
|
90
84
|
</Table>
|