Merge branch 'libracart' into staging_environment
This commit is contained in:
commit
a4982af00e
3 changed files with 46 additions and 21 deletions
|
|
@ -15,7 +15,7 @@ import {
|
|||
import ResponsiveDialog from "common/ResponsiveDialog";
|
||||
import { teamScope, User } from "models";
|
||||
import { pond } from "protobuf-ts/pond";
|
||||
import { useSnackbar, useUserAPI } from "providers";
|
||||
import { useGlobalState, useSnackbar, useUserAPI } from "providers";
|
||||
import { useLibraCartProxyAPI } from "providers/pond/libracartProxyAPI";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import TeamSearch from "teams/TeamSearch";
|
||||
|
|
@ -33,7 +33,7 @@ export default function LibraCartAccess() {
|
|||
const libracartAPI = useLibraCartProxyAPI();
|
||||
//const [dataOps, setDataOps] = useState<pond.DataOption[]>([]);
|
||||
const { openSnack } = useSnackbar();
|
||||
//const [{ as }] = useGlobalState();
|
||||
const [{ as }] = useGlobalState();
|
||||
|
||||
|
||||
const submitNewOrganization = () => {
|
||||
|
|
@ -174,28 +174,45 @@ export default function LibraCartAccess() {
|
|||
|
||||
return (
|
||||
<Box style={{ padding: 10 }}>
|
||||
<Grid container direction="row" alignContent="center" alignItems="center" wrap="nowrap">
|
||||
<Grid>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
window.open(`https://staging.cloud.agrimatics.com/grain/integrations`, "_blank");
|
||||
}}>
|
||||
Link Libra Cart Account
|
||||
</Button>
|
||||
<Grid container direction="row" alignContent="center" alignItems="center" wrap="nowrap" width="100%" justifyContent="space-between">
|
||||
<Grid container direction="row" alignContent="center" alignItems="center" wrap="nowrap">
|
||||
<Grid>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
onClick={e => {
|
||||
e.preventDefault();
|
||||
window.open(`https://staging.cloud.agrimatics.com/grain/integrations`, "_blank");
|
||||
}}>
|
||||
Link Libra Cart Account
|
||||
</Button>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Tooltip
|
||||
title='The integration can be found by selecting my account in the corner,
|
||||
selecting the "Manage Account" option and then selecting integrations in the left side menu'>
|
||||
<Help />
|
||||
</Tooltip>
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Grid>
|
||||
<Tooltip
|
||||
title='The integration can be found by selecting my account in the corner, selecting the "Manage Account" option and then selecting integrations in the left side menu'
|
||||
>
|
||||
<Help />
|
||||
<Tooltip title={"This will Sync the data for all LibraCart accounts linked to " + (as ? "this team" : "your account")}>
|
||||
<Button
|
||||
variant="contained"
|
||||
color="primary"
|
||||
onClick={e => {
|
||||
libracartAPI.syncData().then(resp => {}).catch(err => {})
|
||||
}}>
|
||||
Sync
|
||||
</Button>
|
||||
</Tooltip>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
<Box paddingTop={2}>
|
||||
<Typography>
|
||||
LibraCart data will sync every 6 hours, if the data is needed immediately you can select the Sync button. It may take up to 15 minutes for the data to appear in our platform.
|
||||
</Typography>
|
||||
</Box>
|
||||
|
||||
{newOrgDialog()}
|
||||
</Box>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue