minor updates
This commit is contained in:
parent
e5300b19f4
commit
a4819bdfdf
2 changed files with 41 additions and 42 deletions
|
|
@ -184,8 +184,7 @@ export default function LibraCartAccess() {
|
|||
Link Libra Cart Account
|
||||
</Button>
|
||||
To integrate with Libra Cart, navigate to Integrations page on Libra Cart and "Connect" to
|
||||
Adaptive Agriculture App: https://staging.cloud.agrimatics.com/grain/integrations
|
||||
{newOrgDialog()}
|
||||
Adaptive Agriculture App.
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ export default function LibraCart() {
|
|||
libracartAPI
|
||||
.listAccounts(0, 0, as)
|
||||
.then(resp => {
|
||||
let tempOrgs: Map<string, pond.JDAccount> = new Map();
|
||||
let tempOrgs: Map<string, pond.LibraCartAccount> = new Map();
|
||||
resp.data.accounts.forEach(org => {
|
||||
let organization = pond.JDAccount.fromObject(org);
|
||||
let organization = pond.LibraCartAccount.fromObject(org);
|
||||
tempOrgs.set(organization.key, organization);
|
||||
});
|
||||
setOrganizations(tempOrgs);
|
||||
|
|
@ -70,40 +70,40 @@ export default function LibraCart() {
|
|||
});
|
||||
};
|
||||
|
||||
const fieldOptions = () => {
|
||||
return (
|
||||
<React.Fragment>
|
||||
<Accordion
|
||||
expanded={fieldAccordion}
|
||||
onChange={(_, expanded) => {
|
||||
setFieldAccordion(expanded);
|
||||
}}>
|
||||
<AccordionSummary expandIcon={<ExpandMore />}>Field Data</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<Grid container direction="row" spacing={2} alignItems="center" alignContent="center">
|
||||
<Grid size={6}>
|
||||
<FormControlLabel
|
||||
label="Field Boundaries"
|
||||
control={
|
||||
<Checkbox
|
||||
checked={dataOptions.includes(pond.DataOption.DATA_OPTION_FIELDS)}
|
||||
onChange={(_, checked) => {
|
||||
//setFields(!fields);
|
||||
updateOrgData(checked, pond.DataOption.DATA_OPTION_FIELDS);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
</Grid>
|
||||
<Grid size={6}>
|
||||
View your data from Libra Cart on your visual Farm
|
||||
</Grid>
|
||||
</Grid>
|
||||
</AccordionDetails>
|
||||
</Accordion>
|
||||
</React.Fragment>
|
||||
);
|
||||
};
|
||||
// const fieldOptions = () => {
|
||||
// return (
|
||||
// <React.Fragment>
|
||||
// <Accordion
|
||||
// expanded={fieldAccordion}
|
||||
// onChange={(_, expanded) => {
|
||||
// setFieldAccordion(expanded);
|
||||
// }}>
|
||||
// <AccordionSummary expandIcon={<ExpandMore />}>Field Data</AccordionSummary>
|
||||
// <AccordionDetails>
|
||||
// <Grid container direction="row" spacing={2} alignItems="center" alignContent="center">
|
||||
// <Grid size={6}>
|
||||
// <FormControlLabel
|
||||
// label="Field Boundaries"
|
||||
// control={
|
||||
// <Checkbox
|
||||
// checked={dataOptions.includes(pond.DataOption.DATA_OPTION_FIELDS)}
|
||||
// onChange={(_, checked) => {
|
||||
// //setFields(!fields);
|
||||
// updateOrgData(checked, pond.DataOption.DATA_OPTION_FIELDS);
|
||||
// }}
|
||||
// />
|
||||
// }
|
||||
// />
|
||||
// </Grid>
|
||||
// <Grid size={6}>
|
||||
// View your data from Libra Cart
|
||||
// </Grid>
|
||||
// </Grid>
|
||||
// </AccordionDetails>
|
||||
// </Accordion>
|
||||
// </React.Fragment>
|
||||
// );
|
||||
// };
|
||||
return (
|
||||
<PageContainer>
|
||||
<LibraCartAccess />
|
||||
|
|
@ -117,7 +117,7 @@ export default function LibraCart() {
|
|||
<Grid>
|
||||
<Select
|
||||
//style={{ maxWidth: 110 }}
|
||||
title="John Deer Account"
|
||||
title="LibraCart Account"
|
||||
displayEmpty
|
||||
disableUnderline={true}
|
||||
value={currentOrg}
|
||||
|
|
@ -136,13 +136,13 @@ export default function LibraCart() {
|
|||
})}
|
||||
</Select>
|
||||
</Grid>
|
||||
<Grid>
|
||||
{/* <Grid>
|
||||
<Button onClick={submit} variant="contained" color="primary">
|
||||
Update
|
||||
</Button>
|
||||
</Grid> */}
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Box style={{ padding: 10 }}>{fieldOptions()}</Box>
|
||||
{/* <Box style={{ padding: 10 }}>{fieldOptions()}</Box> */}
|
||||
</PageContainer>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue