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