@vtex/faststore-plugin-buyer-portal 1.1.95 → 1.1.97

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 (58) hide show
  1. package/package.json +1 -1
  2. package/src/features/addresses/components/AddressLocationsList/AddressLocationsList.tsx +28 -39
  3. package/src/features/addresses/components/AddressRecipientsList/AddressRecipientsList.tsx +42 -42
  4. package/src/features/addresses/layouts/AddressDetailsLayout/address-details-layout.scss +285 -286
  5. package/src/features/addresses/layouts/AddressesLayout/AddressesLayout.tsx +26 -29
  6. package/src/features/addresses/layouts/AddressesLayout/addresses-layout.scss +144 -151
  7. package/src/features/budgets/components/BudgetAllocationsSelection/BudgetAllocationsSelection.tsx +61 -57
  8. package/src/features/budgets/components/BudgetAllocationsSelection/budget-allocations-selection.scss +131 -232
  9. package/src/features/budgets/components/BudgetAllocationsTable/BudgetAllocationsTable.tsx +104 -91
  10. package/src/features/budgets/components/BudgetAllocationsTable/budget-allocations-table.scss +80 -182
  11. package/src/features/budgets/components/BudgetsTable/BudgetsTable.tsx +90 -107
  12. package/src/features/budgets/components/BudgetsTable/budgets-table.scss +128 -126
  13. package/src/features/budgets/layouts/BudgetsLayout/BudgetsLayout.tsx +0 -15
  14. package/src/features/buying-policies/components/AddBuyingPolicyDrawer/AddBuyingPolicyDrawer.tsx +4 -0
  15. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/BasicBuyingPolicyDrawer.tsx +35 -4
  16. package/src/features/buying-policies/components/BasicBuyingPolicyDrawer/basic-buying-policy-drawer.scss +2 -1
  17. package/src/features/buying-policies/components/BudgetCriteriaSelector/BudgetCriteriaSelector.tsx +113 -0
  18. package/src/features/buying-policies/components/BudgetCriteriaSelector/budget-criteria-selector.scss +139 -0
  19. package/src/features/buying-policies/components/BudgetCriteriaSelector/index.ts +4 -0
  20. package/src/features/buying-policies/components/BuyingPolicyDropdownMenu/BuyingPolicyDropdownMenu.tsx +5 -0
  21. package/src/features/buying-policies/components/UpdateBuyingPolicyDrawer/UpdateBuyingPolicyDrawer.tsx +5 -0
  22. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/BuyingPoliciesLayout.tsx +66 -46
  23. package/src/features/buying-policies/layouts/BuyingPoliciesLayout/buying-policies-layout.scss +64 -70
  24. package/src/features/buying-policies/utils/index.ts +4 -1
  25. package/src/features/buying-policies/utils/orderFieldsCriteriaOptions.ts +12 -9
  26. package/src/features/collections/components/CollectionsTable/CollectionsTable.tsx +12 -18
  27. package/src/features/collections/components/CollectionsTable/collections-table.scss +138 -118
  28. package/src/features/collections/components/table/AddCollectionsDrawerTable.tsx +48 -54
  29. package/src/features/collections/components/table/add-collections-drawer-table.scss +57 -56
  30. package/src/features/credit-cards/layouts/CreditCardsLayout/CreditCardLayout.tsx +55 -61
  31. package/src/features/credit-cards/layouts/CreditCardsLayout/credit-card-layout.scss +63 -153
  32. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/AddPaymentMethodsDrawer.tsx +58 -49
  33. package/src/features/payment-methods/components/AddPaymentMethodsDrawer/add-payment-methods-drawer.scss +58 -63
  34. package/src/features/payment-methods/layouts/PaymentMethodsLayout/PaymentMethodsLayout.tsx +15 -12
  35. package/src/features/roles/layout/RoleDetailsLayout/RoleDetailsLayout.tsx +57 -26
  36. package/src/features/roles/layout/RoleDetailsLayout/role-details-layout.scss +77 -0
  37. package/src/features/roles/layout/RolesLayout/RolesLayout.tsx +4 -12
  38. package/src/features/roles/layout/RolesLayout/roles-layout.scss +8 -22
  39. package/src/features/shared/components/CustomField/table/CustomFieldTable.tsx +67 -110
  40. package/src/features/shared/components/CustomField/table/custom-field-table.scss +39 -144
  41. package/src/features/shared/components/IconBookmarked/IconBookmarked.tsx +9 -0
  42. package/src/features/shared/components/IconBookmarked/icon-bookmarked.scss +9 -0
  43. package/src/features/shared/components/Table/Table.tsx +7 -2
  44. package/src/features/shared/components/Table/TableCell/TableCell.tsx +15 -3
  45. package/src/features/shared/components/Table/TableCell/table-cell.scss +34 -0
  46. package/src/features/shared/components/Table/TableHead/TableHead.tsx +34 -6
  47. package/src/features/shared/components/Table/TableHead/table-head.scss +53 -49
  48. package/src/features/shared/components/Table/TableLoading/TableLoading.tsx +16 -6
  49. package/src/features/shared/components/Table/TableLoading/table-loading.scss +13 -8
  50. package/src/features/shared/components/Table/TableRow/TableRow.tsx +65 -42
  51. package/src/features/shared/components/Table/TableRow/table-row.scss +104 -68
  52. package/src/features/shared/components/Table/table.scss +11 -6
  53. package/src/features/shared/components/Table/utils/tableColumns.ts +30 -33
  54. package/src/features/shared/components/index.ts +1 -0
  55. package/src/features/users/layouts/UsersLayout/UsersLayout.tsx +20 -27
  56. package/src/pages/budgets.tsx +1 -1
  57. package/src/pages/buying-policies.tsx +14 -1
  58. package/src/themes/layouts.scss +1 -0
@@ -2,241 +2,140 @@
2
2
  @import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
3
3
 
4
4
  [data-fs-bp-budget-allocation-table] {
5
- @import "../../../shared/components/Pagination/pagination.scss";
6
- @import "@faststore/ui/src/components/molecules/Table/styles.scss";
7
- @import "@faststore/ui/src/components/atoms/Skeleton/styles.scss";
8
- @import "@faststore/ui/src/components/atoms/Button/styles.scss";
9
- @import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
10
- @import "../../../shared/components/InternalSearch/internal-search.scss";
11
- @import "../../../shared/components/Tag/tag.scss";
12
- [data-fs-table] {
13
- overflow-x: visible;
14
- }
15
-
16
- [data-fs-bp-custom-fields-empty-state] {
17
- display: flex;
18
- flex-direction: column;
19
- justify-content: center;
20
- align-items: center;
21
- gap: var(--fs-spacing-1);
22
- height: 18.75rem;
23
- padding: 0rem 20rem;
24
- color: #858585;
25
- font-weight: var(--fs-text-weight-semibold);
26
-
27
- [data-fs-icon] {
28
- width: var(--fs-spacing-6);
29
- height: var(--fs-spacing-6);
30
- margin: 0;
31
- }
32
- }
33
-
34
- [data-fs-bp-pagination-tag] {
35
- width: 100%;
36
- height: var(--fs-spacing-6);
37
- display: flex;
38
- flex-direction: row;
39
- align-items: center;
40
- [data-fs-bp-pagination-tag-wrapper] {
41
- display: flex;
42
- flex-direction: row;
43
- align-items: center;
44
- gap: 0.625rem;
45
-
46
- font-weight: var(--fs-text-weight-medium);
47
- font-size: var(--fs-text-size-1);
48
- line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
49
-
50
- [data-fs-bp-pagination-tag-uncheck-button] {
51
- cursor: pointer;
52
- }
53
- }
54
- }
55
-
56
- [data-fs-bp-budget-allocation-row-name] {
57
- width: fit-content;
58
- display: flex;
59
- flex-direction: row;
60
- align-items: center;
61
- gap: var(--fs-spacing-3);
62
- }
63
- [data-fs-bp-budget-allocation-row-name-td] {
64
- width: 19.375rem;
65
- }
66
- [data-fs-bp-budget-allocation-wrapper] {
67
- display: flex;
68
- flex-direction: row;
69
- margin-bottom: var(--fs-spacing-4);
70
- align-items: baseline;
71
- gap: var(--fs-spacing-1);
72
- }
73
-
74
- [data-fs-button] {
75
- [data-fs-button-wrapper] {
76
- padding-left: 0rem;
77
- & > span {
78
- display: flex;
79
- flex-direction: row;
80
- align-items: center;
81
- font-size: var(--fs-text-size-2);
82
- gap: var(--fs-spacing-2);
83
-
84
- font-weight: var(--fs-text-weight-semibold);
85
- color: #000000 !important;
86
- }
87
- }
88
-
89
- [data-fs-bp-budget-allocation-select-current-icon] {
90
- color: #000000;
91
- transform: rotate(90deg);
92
- }
93
- }
94
- [data-fs-bp-budget-allocation-row-checked] {
95
- width: 1.125rem;
96
- height: 1.125rem;
97
- margin-top: 0.1875rem;
98
- }
99
-
100
- [data-fs-buyer-portal-budget-allocation-filter] {
101
- display: flex;
102
- gap: var(--fs-spacing-1);
103
- margin-bottom: var(--fs-spacing-4);
104
- justify-content: space-between;
105
- align-items: center;
106
- }
107
-
108
- [data-fs-bp-pagination-span] {
109
- color: #707070;
110
- font-weight: var(--fs-text-weight-medium);
111
- font-size: var(--fs-text-size-1);
112
- line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
113
- }
114
-
115
- [data-fs-table-head="true"] {
116
- [data-fs-table-row="true"] {
117
- [data-fs-table-cell="header"] {
118
- height: var(--fs-spacing-6);
119
- padding: 0 var(--fs-spacing-1);
120
-
121
- font-weight: var(--fs-text-weight-regular);
122
- color: #5c5c5c;
123
- font-size: var(--fs-text-size-1);
124
- }
125
- }
126
- }
127
-
128
- [data-fs-table-body="true"] {
129
- [data-fs-table-row="true"] {
130
- &:first-child {
131
- border-top: var(--fs-border-width) solid #d6d6d6;
132
- }
133
- &:last-child {
134
- border-bottom: none;
135
- }
136
-
137
- &:hover {
138
- background-color: #f5f5f5;
139
- }
140
- [data-fs-table-cell] {
141
- height: var(--fs-spacing-8);
142
- font-weight: var(--fs-text-weight-medium);
143
- color: #1f1f1f;
144
- font-size: var(--fs-text-size-1);
145
- padding: var(--fs-spacing-1);
146
-
147
- &:nth-child(1) {
148
- width: var(--fs-spacing-6);
149
- }
150
- &:nth-child(2) {
151
- width: 17rem;
152
- }
153
-
154
- [data-fs-icon] {
155
- display: inline-block;
156
- color: #0366dd;
157
- width: var(--fs-spacing-4);
158
- height: var(--fs-spacing-4);
159
- margin: 0;
160
- }
161
-
162
- [data-fs-button] {
163
- width: 3rem;
164
- height: 3rem;
165
-
166
- &[data-fs-bp-budget-allocation-dropdown-button] {
167
- cursor: pointer;
168
- }
169
-
170
- [data-fs-button-wrapper] {
171
- border-radius: var(--fs-border-radius-pill);
172
- padding: 0;
173
- }
174
- }
175
-
176
- &:first-child {
177
- width: var(--fs-spacing-6);
178
- text-align: center;
179
-
180
- > svg {
181
- margin: 0;
182
- }
183
- }
184
- }
185
- }
186
-
187
- [data-fs-bp-budget-allocation-row-selection="true"] {
188
- background-color: #f1f8fd;
189
- }
190
-
191
- [data-fs-bp-budget-allocation-dropdown-trigger] {
192
- &[data-fs-bp-basic-dropdown-menu-trigger] {
193
- [data-fs-icon] {
194
- color: #1f1f1f;
195
- }
196
- }
197
- }
198
- }
199
-
200
- [data-fs-skeleton] {
201
- display: inline-block;
202
- }
203
-
204
- [data-fs-tooltip] {
205
- --fs-tooltip-background: #1f1f1f;
206
-
207
- [data-fs-tooltip-wrapper] {
208
- position: absolute;
209
- }
210
- }
5
+ @import "../../../shared/components/Pagination/pagination.scss";
6
+ @import "@faststore/ui/src/components/atoms/Button/styles.scss";
7
+ @import "@faststore/ui/src/components/molecules/Tooltip/styles.scss";
8
+ @import "../../../shared/components/InternalSearch/internal-search.scss";
9
+ @import "../../../shared/components/Tag/tag.scss";
10
+ @import "../../../shared/components/Table/table.scss";
11
+ @import "@faststore/ui/src/components/atoms/Checkbox/styles.scss";
12
+
13
+ [data-fs-table] {
14
+ overflow-x: visible;
15
+ }
16
+
17
+ [data-fs-bp-custom-fields-empty-state] {
18
+ display: flex;
19
+ flex-direction: column;
20
+ justify-content: center;
21
+ align-items: center;
22
+ gap: var(--fs-spacing-1);
23
+ height: 18.75rem;
24
+ padding: 0rem 20rem;
25
+ color: #858585;
26
+ font-weight: var(--fs-text-weight-semibold);
27
+
28
+ [data-fs-icon] {
29
+ width: var(--fs-spacing-6);
30
+ height: var(--fs-spacing-6);
31
+ margin: 0;
32
+ }
33
+ }
34
+
35
+ [data-fs-bp-pagination-tag] {
36
+ width: 100%;
37
+ height: var(--fs-spacing-6);
38
+ display: flex;
39
+ flex-direction: row;
40
+ align-items: center;
41
+ [data-fs-bp-pagination-tag-wrapper] {
42
+ display: flex;
43
+ flex-direction: row;
44
+ align-items: center;
45
+ gap: 0.625rem;
46
+
47
+ font-weight: var(--fs-text-weight-medium);
48
+ font-size: var(--fs-text-size-1);
49
+ line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
50
+
51
+ [data-fs-bp-pagination-tag-uncheck-button] {
52
+ cursor: pointer;
53
+ }
54
+ }
55
+ }
56
+ [data-fs-bp-budget-allocation-wrapper] {
57
+ display: flex;
58
+ flex-direction: row;
59
+ margin-bottom: var(--fs-spacing-4);
60
+ align-items: baseline;
61
+ gap: var(--fs-spacing-1);
62
+ }
63
+
64
+ [data-fs-button] {
65
+ [data-fs-button-wrapper] {
66
+ padding-left: 0rem;
67
+ & > span {
68
+ display: flex;
69
+ flex-direction: row;
70
+ align-items: center;
71
+ font-size: var(--fs-text-size-2);
72
+ gap: var(--fs-spacing-2);
73
+
74
+ font-weight: var(--fs-text-weight-semibold);
75
+ color: #000000 !important;
76
+ }
77
+ }
78
+
79
+ [data-fs-bp-budget-allocation-select-current-icon] {
80
+ color: #000000;
81
+ transform: rotate(90deg);
82
+ }
83
+ }
84
+ [data-fs-bp-budget-allocation-row-checked] {
85
+ margin: 0 auto;
86
+ }
87
+
88
+ [data-fs-buyer-portal-budget-allocation-filter] {
89
+ display: flex;
90
+ gap: var(--fs-spacing-1);
91
+ margin-bottom: var(--fs-spacing-4);
92
+ justify-content: space-between;
93
+ align-items: center;
94
+ }
95
+
96
+ [data-fs-bp-pagination-span] {
97
+ color: #707070;
98
+ font-weight: var(--fs-text-weight-medium);
99
+ font-size: var(--fs-text-size-1);
100
+ line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
101
+ }
102
+
103
+ [data-fs-tooltip] {
104
+ --fs-tooltip-background: #1f1f1f;
105
+
106
+ [data-fs-tooltip-wrapper] {
107
+ position: absolute;
108
+ }
109
+ }
211
110
  }
212
111
 
213
112
  [data-fs-dropdown-menu] {
214
- width: auto;
215
- background-color: #ffffff !important;
216
- padding: var(--fs-spacing-1) 0;
217
- min-width: 16.5rem;
218
-
219
- [data-fs-dropdown-item] {
220
- display: flex;
221
- padding: var(--fs-spacing-1) calc(var(--fs-spacing-4) + var(--fs-spacing-0));
222
-
223
- font-weight: var(--fs-text-weight-medium);
224
- font-size: var(--fs-text-size-1);
225
- line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
226
- color: #1f1f1f;
227
- }
113
+ width: auto;
114
+ background-color: #ffffff !important;
115
+ padding: var(--fs-spacing-1) 0;
116
+ min-width: 16.5rem;
117
+
118
+ [data-fs-dropdown-item] {
119
+ display: flex;
120
+ padding: var(--fs-spacing-1) calc(var(--fs-spacing-4) + var(--fs-spacing-0));
121
+
122
+ font-weight: var(--fs-text-weight-medium);
123
+ font-size: var(--fs-text-size-1);
124
+ line-height: calc(var(--fs-spacing-3) + var(--fs-spacing-0));
125
+ color: #1f1f1f;
126
+ }
228
127
  }
229
128
  [data-fs-bp-budget-allocation-select-item] {
230
- padding: 16px;
231
-
232
- &[data-fs-bp-budget-allocation-selected="true"] {
233
- color: #0366dd !important;
234
- }
235
- [data-fs-bp-budget-allocation-selected-wrapper] {
236
- display: flex;
237
- flex-direction: row;
238
- align-items: center;
239
- justify-content: space-between;
240
- width: 100%;
241
- }
129
+ padding: var(--fs-spacing-3);
130
+
131
+ &[data-fs-bp-budget-allocation-selected="true"] {
132
+ color: #0366dd !important;
133
+ }
134
+ [data-fs-bp-budget-allocation-selected-wrapper] {
135
+ display: flex;
136
+ flex-direction: row;
137
+ align-items: center;
138
+ justify-content: space-between;
139
+ width: 100%;
140
+ }
242
141
  }
@@ -2,20 +2,14 @@ import { useState } from "react";
2
2
 
3
3
  import { useSearchParams } from "next/navigation";
4
4
 
5
- import {
6
- Table,
7
- TableBody,
8
- TableCell,
9
- TableHead,
10
- TableRow,
11
- } from "@faststore/ui";
12
-
13
- import { Icon, InternalSearch } from "../../../shared/components";
5
+ import { IconButton } from "@faststore/ui";
6
+
7
+ import { Icon, InternalSearch, Table } from "../../../shared/components";
14
8
  import { EmptyState } from "../../../shared/components/EmptyState/EmptyState";
15
9
  import { Pagination } from "../../../shared/components/Pagination/Pagination";
10
+ import { getTableColumns } from "../../../shared/components/Table/utils/tableColumns";
16
11
  import { useDrawerProps, useQueryParams } from "../../../shared/hooks";
17
12
  import { IPagination } from "../../../shared/types";
18
- import BudgetSkeleton from "../BudgetSkeleton/BudgetSkeleton";
19
13
  import { CreateBudgetAllocationDrawer } from "../CreateBudgetAllocationDrawer/CreateBudgetAllocationDrawer";
20
14
  import { DeleteBudgetAllocationDrawer } from "../DeleteBudgetAllocationDrawer/DeleteBudgetAllocationDrawer";
21
15
 
@@ -64,6 +58,105 @@ export const BudgetAllocationsTable = ({
64
58
  ...allocationDrawerProps
65
59
  } = useDrawerProps();
66
60
 
61
+ const columns = getTableColumns({
62
+ nameColumnSize: "14rem",
63
+ actionsLength: 1,
64
+ extraColumns: [
65
+ {
66
+ label: "Type",
67
+ key: "type",
68
+ size: "8.25rem",
69
+ align: "left",
70
+ hideOnScreenSize: "tablet",
71
+ },
72
+ {
73
+ label: "Contract",
74
+ key: "contract",
75
+ size: "100%",
76
+ align: "left",
77
+ hideOnScreenSize: "phonemid",
78
+ },
79
+ ],
80
+ });
81
+
82
+ const renderPagination = () => (
83
+ <span data-fs-bp-pagination-span>
84
+ <Pagination
85
+ currentCount={pagination.current}
86
+ total={pagination.total}
87
+ loading={pagination.loading || loading}
88
+ showMore={pagination.loadMore}
89
+ variant={data.length < pagination.total ? "default" : "onlyText"}
90
+ />
91
+ </span>
92
+ );
93
+
94
+ const renderLoading = () => (
95
+ <>
96
+ <Table layoutFixed>
97
+ <Table.Head columns={columns} />
98
+ <Table.Body>
99
+ <Table.Loading columns={columns.length} />
100
+ </Table.Body>
101
+ </Table>
102
+ {renderPagination()}
103
+ </>
104
+ );
105
+
106
+ const renderEmptyState = () => (
107
+ <EmptyState
108
+ title="No allocations yet"
109
+ description="Add at least one allocation so that this budget can be used at checkout."
110
+ />
111
+ );
112
+
113
+ function renderContent() {
114
+ if (loading) {
115
+ return renderLoading();
116
+ }
117
+
118
+ if (!data || data.length === 0) {
119
+ return renderEmptyState();
120
+ }
121
+
122
+ return (
123
+ <>
124
+ <Table layoutFixed>
125
+ <Table.Head columns={columns} />
126
+ <Table.Body>
127
+ {data.map((option) => (
128
+ <Table.Row
129
+ key={option.id}
130
+ title={option.name}
131
+ iconName="TableEdit"
132
+ iconSize={24}
133
+ actionIcons={
134
+ <IconButton
135
+ data-fs-bp-budget-allocation-table-trash-icon
136
+ aria-label="remove-allocation"
137
+ icon={<Icon name="Trash" width={20} height={20} />}
138
+ onClick={() => {
139
+ setSelectedAllocation(option);
140
+ openAllocationDeleteDrawerProps();
141
+ }}
142
+ />
143
+ }
144
+ >
145
+ <Table.Cell align="left" hideOnScreenSize="tablet">
146
+ {option.type}
147
+ </Table.Cell>
148
+ <Table.Cell align="left" hideOnScreenSize="phonemid">
149
+ {option.contract}
150
+ </Table.Cell>
151
+ </Table.Row>
152
+ ))}
153
+ </Table.Body>
154
+ </Table>
155
+ {renderPagination()}
156
+ </>
157
+ );
158
+ }
159
+
67
160
  return (
68
161
  <div data-fs-bp-budget-details-allocation-table>
69
162
  <div data-fs-budget-details-allocation-table-edit-line>
@@ -92,87 +185,7 @@ export const BudgetAllocationsTable = ({
92
185
  />
93
186
  </div>
94
187
 
95
- {data && !data.length && !loading ? (
96
- <EmptyState
97
- title="No allocations yet"
98
- description="Add at least one allocation so that this budget can be used at checkout."
99
- />
100
- ) : (
101
- <>
102
- <Table variant="bordered">
103
- <TableHead>
104
- <TableRow>
105
- <TableCell scope="col" variant="header" align="left">
106
- Name
107
- </TableCell>
108
- <TableCell scope="col" variant="header" align="left">
109
- Type
110
- </TableCell>
111
- <TableCell scope="col" variant="header" align="left">
112
- Contract
113
- </TableCell>
114
- <TableCell scope="col" variant="header" align="left" />
115
- <TableCell scope="col" variant="header" align="right" />
116
- </TableRow>
117
- </TableHead>
118
- <TableBody>
119
- {loading ? (
120
- <BudgetSkeleton fullWidth={true} />
121
- ) : (
122
- <>
123
- {data.map((option) => (
124
- <TableRow key={option.id}>
125
- <TableCell
126
- align="center"
127
- data-fs-bp-budget-allocation-table-row-name-td
128
- >
129
- <div data-fs-bp-budget-allocation-table-row-name>
130
- <Icon
131
- name="TableEdit"
132
- width={24}
133
- height={24}
134
- data-fs-bp-budget-allocation-table-icon
135
- />
136
- {option.name}
137
- </div>
138
- </TableCell>
139
- <TableCell align="left" style={{ width: "7rem" }}>
140
- {option.type}
141
- </TableCell>
142
- <TableCell align="left" style={{ width: "7rem" }}>
143
- {option.contract}
144
- </TableCell>
145
-
146
- <TableCell align="right">
147
- <Icon
148
- onClick={() => {
149
- setSelectedAllocation(option);
150
- openAllocationDeleteDrawerProps();
151
- }}
152
- name="Trash"
153
- width={20}
154
- height={20}
155
- data-fs-bp-budget-allocation-table-trash-icon
156
- />
157
- </TableCell>
158
- </TableRow>
159
- ))}
160
- </>
161
- )}
162
- </TableBody>
163
- </Table>
164
-
165
- <span data-fs-bp-pagination-span>
166
- <Pagination
167
- currentCount={pagination.current}
168
- total={pagination.total}
169
- loading={pagination.loading || loading}
170
- showMore={pagination.loadMore}
171
- variant={data.length < pagination.total ? "default" : "onlyText"}
172
- />
173
- </span>
174
- </>
175
- )}
188
+ {renderContent()}
176
189
 
177
190
  {isAddAllocationDrawerOpen && (
178
191
  <CreateBudgetAllocationDrawer