- )
-}
-
export default CustomerData
diff --git a/new-lamassu-admin/src/pages/Customers/CustomerData.styles.js b/new-lamassu-admin/src/pages/Customers/CustomerData.styles.js
index 9a4e2871..373e2f0c 100644
--- a/new-lamassu-admin/src/pages/Customers/CustomerData.styles.js
+++ b/new-lamassu-admin/src/pages/Customers/CustomerData.styles.js
@@ -1,4 +1,4 @@
-import { offColor, spacer } from 'src/styling/variables'
+import { offColor } from 'src/styling/variables'
export default {
header: {
@@ -45,26 +45,5 @@ export default {
left: '100%',
marginLeft: 15
}
- },
- closeButton: {
- display: 'flex',
- padding: [[spacer * 2, spacer * 2, 0, spacer * 2]],
- paddingRight: spacer * 1.5,
- justifyContent: 'end'
- },
- dialogTitle: {
- margin: [[0, spacer * 2, spacer, spacer * 4 + spacer]]
- },
- dialogContent: {
- width: 615,
- marginLeft: 16
- },
- dialogActions: {
- padding: spacer * 4,
- paddingTop: spacer * 2
- },
- cancelButton: {
- marginRight: 8,
- padding: 0
}
}
diff --git a/new-lamassu-admin/src/pages/Customers/CustomerProfile.js b/new-lamassu-admin/src/pages/Customers/CustomerProfile.js
index 1d44c02c..4d82ebe2 100644
--- a/new-lamassu-admin/src/pages/Customers/CustomerProfile.js
+++ b/new-lamassu-admin/src/pages/Customers/CustomerProfile.js
@@ -1,18 +1,27 @@
import { useQuery, useMutation } from '@apollo/react-hooks'
-import { makeStyles, Breadcrumbs, Box } from '@material-ui/core'
+import {
+ makeStyles,
+ Breadcrumbs,
+ Box,
+ DialogActions,
+ DialogContent,
+ Dialog
+} from '@material-ui/core'
import NavigateNextIcon from '@material-ui/icons/NavigateNext'
import gql from 'graphql-tag'
import * as R from 'ramda'
import React, { memo, useState } from 'react'
import { useHistory, useParams } from 'react-router-dom'
-import { ActionButton } from 'src/components/buttons'
+import ErrorMessage from 'src/components/ErrorMessage'
+import { Button, IconButton, ActionButton } from 'src/components/buttons'
import { Switch } from 'src/components/inputs'
-import { Label1, Label2 } from 'src/components/typography'
+import { Label1, Label2, H2, Info3 } from 'src/components/typography'
import {
OVERRIDE_AUTHORIZED,
OVERRIDE_REJECTED
} from 'src/pages/Customers/components/propertyCard'
+import { ReactComponent as CloseIcon } from 'src/styling/icons/action/close/zodiac.svg'
import { ReactComponent as AuthorizeReversedIcon } from 'src/styling/icons/button/authorize/white.svg'
import { ReactComponent as AuthorizeIcon } from 'src/styling/icons/button/authorize/zodiac.svg'
import { ReactComponent as BlockReversedIcon } from 'src/styling/icons/button/block/white.svg'
@@ -280,9 +289,10 @@ const GET_ACTIVE_CUSTOM_REQUESTS = gql`
const CustomerProfile = memo(() => {
const history = useHistory()
+ const [retrieve, setRetrieve] = useState(false)
const [showCompliance, setShowCompliance] = useState(false)
const [wizard, setWizard] = useState(false)
- const [error] = useState(null)
+ const [error, setError] = useState(null)
const [clickedItem, setClickedItem] = useState('overview')
const { id: customerId } = useParams()
@@ -323,7 +333,11 @@ const CustomerProfile = memo(() => {
})
const [setCustomer] = useMutation(SET_CUSTOMER, {
- onCompleted: () => getCustomer()
+ onCompleted: () => {
+ getCustomer()
+ setRetrieve(false)
+ },
+ onError: error => setError(error)
})
const [authorizeCustomRequest] = useMutation(SET_AUTHORIZED_REQUEST, {
@@ -631,7 +645,20 @@ const CustomerProfile = memo(() => {
updateCustomRequest={setCustomerCustomInfoRequest}
authorizeCustomRequest={authorizeCustomRequest}
updateCustomEntry={updateCustomEntry}
- retrieveAdditionalData={retrieveAdditionalData}>
+ setRetrieve={setRetrieve}
+ retrieveAdditionalDataDialog={
+