diff --git a/new-lamassu-admin/src/components/layout/TitleSection.js b/new-lamassu-admin/src/components/layout/TitleSection.js
index 85031c06..4b7555fe 100644
--- a/new-lamassu-admin/src/components/layout/TitleSection.js
+++ b/new-lamassu-admin/src/components/layout/TitleSection.js
@@ -4,13 +4,21 @@ import React from 'react'
import ErrorMessage from 'src/components/ErrorMessage'
import Title from 'src/components/Title'
+import { SubpageButton } from 'src/components/buttons'
import { Label1 } from 'src/components/typography'
import styles from './TitleSection.styles'
const useStyles = makeStyles(styles)
-const TitleSection = ({ className, title, error, labels, children }) => {
+const TitleSection = ({
+ className,
+ title,
+ error,
+ labels,
+ button,
+ children
+}) => {
const classes = useStyles()
return (
@@ -19,6 +27,15 @@ const TitleSection = ({ className, title, error, labels, children }) => {
{error && (
Failed to save
)}
+ {button && (
+
+ {button.text}
+
+ )}
{(labels ?? []).map(({ icon, label }, idx) => (
diff --git a/new-lamassu-admin/src/components/layout/TitleSection.styles.js b/new-lamassu-admin/src/components/layout/TitleSection.styles.js
index 8df5d97e..7b03e635 100644
--- a/new-lamassu-admin/src/components/layout/TitleSection.styles.js
+++ b/new-lamassu-admin/src/components/layout/TitleSection.styles.js
@@ -6,11 +6,15 @@ export default {
flexDirection: 'row'
},
titleAndButtonsContainer: {
- display: 'flex'
+ display: 'flex',
+ alignItems: 'center'
},
error: {
marginLeft: 12
},
+ subpageButton: {
+ marginLeft: 12
+ },
icon: {
marginRight: 6
},
diff --git a/new-lamassu-admin/src/pages/Commissions/Commissions.js b/new-lamassu-admin/src/pages/Commissions/Commissions.js
index a6357a3e..d80a6ed8 100644
--- a/new-lamassu-admin/src/pages/Commissions/Commissions.js
+++ b/new-lamassu-admin/src/pages/Commissions/Commissions.js
@@ -1,13 +1,12 @@
import { useQuery, useMutation } from '@apollo/react-hooks'
-import { makeStyles, Box } from '@material-ui/core'
import gql from 'graphql-tag'
import * as R from 'ramda'
import React, { useState } from 'react'
-import { SubpageButton } from 'src/components/buttons'
import TitleSection from 'src/components/layout/TitleSection'
import { ReactComponent as ExeceptionViewIcon } from 'src/styling/icons/circle buttons/exception-view/white.svg'
import { ReactComponent as ListingViewIcon } from 'src/styling/icons/circle buttons/listing-view/zodiac.svg'
+import { ReactComponent as OverrideLabelIcon } from 'src/styling/icons/status/spring2.svg'
import { fromNamespace, toNamespace, namespaces } from 'src/utils/config'
import CommissionsDetails from './components/CommissionsDetails'
@@ -34,36 +33,7 @@ const SAVE_CONFIG = gql`
}
`
-const styles = {
- titleWrapper: {
- display: 'flex',
- alignItems: 'center',
- flexDirection: 'row'
- },
- subpageButton: {
- marginLeft: 12
- },
- colorLabel: {
- display: 'flex',
- flexDirection: 'row',
- alignSelf: 'flex-end',
- alignItems: 'center',
- marginLeft: 'auto',
- '& div': {
- width: 12,
- height: 12,
- borderRadius: 3,
- marginRight: 8,
- backgroundColor: '#44e188'
- }
- }
-}
-
-const useStyles = makeStyles(styles)
-
const Commissions = ({ name: SCREEN_KEY }) => {
- const classes = useStyles()
-
const [showMachines, setShowMachines] = useState(false)
const { data } = useQuery(GET_DATA)
const [saveConfig, { error }] = useMutation(SAVE_CONFIG, {
@@ -109,24 +79,28 @@ const Commissions = ({ name: SCREEN_KEY }) => {
return saveConfig({ variables: { config } })
}
+ const labels = showMachines
+ ? [
+ {
+ label: 'Override value',
+ icon:
+ }
+ ]
+ : []
+
return (
<>
-
-
-
- List view
-
- {showMachines && (
-
- )}
-
+
+
{!showMachines && (
+
\ No newline at end of file