Skip to content

Commit ed0b25a

Browse files
committed
dev pull
2 parents 6ddbaf1 + 30da3cd commit ed0b25a

File tree

11 files changed

+179
-158
lines changed

11 files changed

+179
-158
lines changed

src/ui/components/Filters/index.tsx

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const getInitialFilterState = () => {
4141
type: 'string',
4242
},
4343
{
44-
value: 'isShared',
44+
value: 'is_shared',
4545
label: 'Shared',
4646
type: 'boolean',
4747
},
@@ -81,18 +81,28 @@ export const getInitialFilterState = () => {
8181
type: 'string',
8282
},
8383
{
84-
value: 'greater',
84+
value: 'gt',
8585
label: 'Greater than',
8686
type: 'date',
8787
},
8888
{
89-
value: 'less',
89+
value: 'lt',
9090
label: 'Less than',
9191
type: 'date',
9292
},
93+
{
94+
value: 'gte',
95+
label: 'Greater than and Equal',
96+
type: 'date',
97+
},
98+
{
99+
value: 'lte',
100+
label: 'Less than and Equal',
101+
type: 'date',
102+
},
93103
{
94104
value: 'equal_date',
95-
label: 'Equal',
105+
label: 'Equals',
96106
type: 'date',
97107
},
98108
{
@@ -185,9 +195,19 @@ export const getInitialFilterStateForPipeline = () => {
185195
label: 'Less than',
186196
type: 'date',
187197
},
198+
{
199+
value: 'gte',
200+
label: 'Greater than and Equal',
201+
type: 'date',
202+
},
203+
{
204+
value: 'lte',
205+
label: 'Less than and Equal',
206+
type: 'date',
207+
},
188208
{
189209
value: 'equal_date',
190-
label: 'equals',
210+
label: 'Equals',
191211
type: 'date',
192212
},
193213
{
@@ -330,18 +350,28 @@ export const getInitialFilterStateForRuns = () => {
330350
type: 'string',
331351
},
332352
{
333-
value: 'greater',
353+
value: 'gt',
334354
label: 'Greater than',
335355
type: 'date',
336356
},
337357
{
338-
value: 'less',
358+
value: 'lt',
339359
label: 'Less than',
340360
type: 'date',
341361
},
362+
{
363+
value: 'gte',
364+
label: 'Greater than and Equal',
365+
type: 'date',
366+
},
367+
{
368+
value: 'lte',
369+
label: 'Less than and Equal',
370+
type: 'date',
371+
},
342372
{
343373
value: 'equal_date',
344-
label: 'Equal',
374+
label: 'Equals',
345375
type: 'date',
346376
},
347377
{
@@ -490,7 +520,9 @@ const FilterComponent = ({
490520
<Box style={{ width: '146px' }}>
491521
<DatePicker
492522
selected={filter.filterValue}
493-
onChange={(value: any) => handleValueFieldChange(filter, value)}
523+
onChange={(value: any) => {
524+
handleValueFieldChange(filter, value);
525+
}}
494526
customInput={<ExampleCustomInput />}
495527
/>
496528
</Box>
@@ -662,7 +694,7 @@ const FilterComponent = ({
662694
/>
663695
</FlexBox.Row>
664696
</>
665-
) : filter?.column?.selectedValue?.value === 'isShared' ? (
697+
) : filter?.column?.selectedValue?.value === 'is_shared' ? (
666698
<>
667699
<FlexBox.Row className="mb-1">
668700
<FormTextField

src/ui/layouts/common/Pagination/index.tsx

Lines changed: 19 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import React, {
2-
forwardRef,
3-
useImperativeHandle,
4-
} from 'react';
1+
import React, { forwardRef, useImperativeHandle } from 'react';
52
import { FlexBox, Box, icons } from '../../../components';
63
import styles from './index.module.scss';
74
import { joinClassNames, addStyle } from '../../../../utils';
@@ -30,7 +27,10 @@ const PaginationItem = (props: {
3027
addStyle(props.isActive, styles.active),
3128
)}
3229
>
33-
<span className={styles.paginationText} style={{ color: props.isActive ? '#fff' : '#333' }} >
30+
<span
31+
className={styles.paginationText}
32+
style={{ color: props.isActive ? '#fff' : '#333' }}
33+
>
3434
{props.index}
3535
</span>
3636
</div>
@@ -51,7 +51,7 @@ const PaginationNavigationItem = (props: {
5151
addStyle(!props.hasNext, styles.hidden),
5252
)}
5353
>
54-
<props.icon color="black" size="sml" />
54+
<props.icon color="black" size="sml" />
5555
</div>
5656
);
5757

@@ -200,21 +200,20 @@ export const Pagination: React.FC<Props> = forwardRef((props, ref) => {
200200
</Box>
201201
))}
202202
</FlexBox>
203-
204-
203+
205204
<PaginationNavigationItem
206-
hasNext={props.pageIndex + 1 < props.totalOfPages}
207-
onClick={() => {
208-
onChange(
209-
props.pageIndex + 2,
210-
props.itemPerPage,
211-
componentName,
212-
props.filters,
213-
);
214-
props.setPageIndex(props.pageIndex + 1);
215-
}}
216-
icon={icons.paginationNext}
217-
/>
205+
hasNext={props.pageIndex + 1 < props.totalOfPages}
206+
onClick={() => {
207+
onChange(
208+
props.pageIndex + 2,
209+
props.itemPerPage,
210+
componentName,
211+
props.filters,
212+
);
213+
props.setPageIndex(props.pageIndex + 1);
214+
}}
215+
icon={icons.paginationNext}
216+
/>
218217
<PaginationNavigationItem
219218
hasNext={props.pageIndex + 1 < props.totalOfPages}
220219
onClick={() => {

0 commit comments

Comments
 (0)