Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round by 0.25 for the enhanced robogrades #48

Merged
merged 2 commits into from
Jul 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 49 additions & 9 deletions cvat-ui/src/components/annotation-page/grades-form/grades-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -440,29 +440,49 @@ export function GradesForm({ task }: Props): JSX.Element | null {
{enhancedRobogradesVisibility ? (
<Col span={10}>
<Collapse defaultActiveKey={['1']}>
<Panel header='Enhanced Robogrades' key='1'>
<Panel header='Enhanced Robogrades' key='1' className='grades-form-robogrades'>
<Typography.Text strong className='grades-form-inner-title'>
Front of Card
</Typography.Text>
<Row gutter={[8, 16]}>
<Col span={6}>
<Form.Item label='Centering' name='front_centering_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Surface' name='front_surface_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Edges' name='front_edges_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Corners' name='front_corners_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
</Row>
Expand All @@ -473,22 +493,42 @@ export function GradesForm({ task }: Props): JSX.Element | null {
<Row gutter={[8, 16]}>
<Col span={6}>
<Form.Item label='Centering' name='back_centering_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Surface' name='back_surface_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Edges' name='back_edges_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
<Col span={6}>
<Form.Item label='Corners' name='back_corners_human_grade'>
<Input type='number' max={10} min={0} step={0.5} />
<InputNumber
formatter={roundBy25}
max={10}
min={0}
step={0.25}
/>
</Form.Item>
</Col>
</Row>
Expand Down
Loading