-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Merge pull request #368 from UniversalDataTool/labelhelp-and-ema…
…il-prompt Crowd Label Refactor + Upload Fix
- Loading branch information
Showing
7 changed files
with
371 additions
and
280 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React from "react" | ||
|
||
import Box from "@material-ui/core/Box" | ||
import Table from "@material-ui/core/Table" | ||
import TableBody from "@material-ui/core/TableBody" | ||
import TableRow from "@material-ui/core/TableRow" | ||
import TableCell from "@material-ui/core/TableCell" | ||
import Button from "@material-ui/core/Button" | ||
|
||
import useDatasetProperty from "../../hooks/use-dataset-property" | ||
|
||
const usdFormatter = new Intl.NumberFormat("en-US", { | ||
style: "currency", | ||
currency: "USD", | ||
}) | ||
|
||
export const LabelHelpCompleted = ({ onChangeActiveStep }) => { | ||
const { labelHelp, updateLabelHelp } = useDatasetProperty("labelHelp") | ||
return ( | ||
<Box> | ||
<Table> | ||
<TableBody> | ||
<TableRow> | ||
<TableCell>Percent Complete</TableCell> | ||
<TableCell>100%</TableCell> | ||
</TableRow> | ||
{labelHelp?.totalCost && ( | ||
<TableRow> | ||
<TableCell>Total Cost</TableCell> | ||
<TableCell>{usdFormatter.format(labelHelp?.totalCost)}</TableCell> | ||
</TableRow> | ||
)} | ||
</TableBody> | ||
</Table> | ||
<Box display="flex" marginTop={2} justifyContent="flex-end"> | ||
<Button | ||
onClick={() => { | ||
updateLabelHelp(null) | ||
onChangeActiveStep("setup") | ||
}} | ||
variant="outlined" | ||
> | ||
Restart | ||
</Button> | ||
{/* TODO sync samples merges samples from link */} | ||
{/* <Button | ||
style={{ marginLeft: 12 }} | ||
variant="outlined" | ||
color="primary" | ||
> | ||
Sync Samples | ||
</Button> */} | ||
</Box> | ||
</Box> | ||
) | ||
} | ||
|
||
export default LabelHelpCompleted |
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.