-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
Added Grouping functionality for Review Data (#446)
- Loading branch information
Showing
16 changed files
with
155 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 9 additions & 3 deletions
12
apps/api/src/app/review/usecases/get-upload-data/get-upload-data.usecase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
apps/widget/src/components/widget/Phases/Phase3/Styles.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
apps/widget/src/design-system/SegmentedControl/SegmentedControl.styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { colors } from '../../config/colors.config'; | ||
import { createStyles } from '@mantine/core'; | ||
|
||
export default createStyles(() => { | ||
return { | ||
label: { | ||
marginBottom: 0, | ||
}, | ||
control: { | ||
'&:last-of-type .mantine-SegmentedControl-label': { | ||
color: colors.red, | ||
}, | ||
}, | ||
}; | ||
}); |
36 changes: 36 additions & 0 deletions
36
apps/widget/src/design-system/SegmentedControl/SegmentedControl.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { ReviewDataTypesEnum } from '@impler/shared'; | ||
import { SegmentedControl as MantineSegmentedControl } from '@mantine/core'; | ||
|
||
import useStyles from './SegmentedControl.styles'; | ||
|
||
interface SegmentedControlProps { | ||
value: string; | ||
allDataLength?: string; | ||
validDataLength?: string; | ||
invalidDataLength?: string; | ||
onChange: (value: ReviewDataTypesEnum) => void; | ||
} | ||
|
||
export function SegmentedControl({ | ||
onChange, | ||
value, | ||
allDataLength = '', | ||
validDataLength = '', | ||
invalidDataLength = '', | ||
}: SegmentedControlProps) { | ||
const { classes } = useStyles(); | ||
|
||
return ( | ||
<MantineSegmentedControl | ||
data={[ | ||
{ value: 'all', label: `All ${allDataLength}` }, | ||
{ value: 'valid', label: `Valid ${validDataLength}` }, | ||
{ value: 'invalid', label: `Invalid ${invalidDataLength}` }, | ||
]} | ||
radius="xl" | ||
value={value} | ||
onChange={onChange} | ||
classNames={classes} | ||
/> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './SegmentedControl'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.