From f4f4eb13357f4a283a90eb4b59dc24499c982292 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Oliveira?= Date: Mon, 17 Jan 2022 16:57:37 +0000 Subject: [PATCH] fix: disable unfinished features --- .../graphql/resolvers/customer.resolver.js | 2 +- new-lamassu-admin/src/components/Carousel.js | 6 ++++ .../src/pages/Customers/CustomerData.js | 31 +++++++++++-------- .../src/pages/Customers/CustomerProfile.js | 11 ++++--- .../Customers/components/EditableCard.js | 24 +++++++------- .../src/pages/Customers/helper.js | 30 +++++++++++++----- 6 files changed, 67 insertions(+), 37 deletions(-) diff --git a/lib/new-admin/graphql/resolvers/customer.resolver.js b/lib/new-admin/graphql/resolvers/customer.resolver.js index d3563669..bbe46195 100644 --- a/lib/new-admin/graphql/resolvers/customer.resolver.js +++ b/lib/new-admin/graphql/resolvers/customer.resolver.js @@ -21,7 +21,7 @@ const resolvers = { return customers.updateCustomer(customerId, customerInput, token) }, addCustomField: (...[, { customerId, label, value }]) => customers.addCustomField(customerId, label, value), - saveCustomField: (...[, { customerId, fieldId, newValue }]) => customers.saveCustomField(customerId, fieldId, newValue), + saveCustomField: (...[, { customerId, fieldId, value }]) => customers.saveCustomField(customerId, fieldId, value), removeCustomField: (...[, [ { customerId, fieldId } ]]) => customers.removeCustomField(customerId, fieldId), editCustomer: async (root, { customerId, customerEdit }, context) => { const token = authentication.getToken(context) diff --git a/new-lamassu-admin/src/components/Carousel.js b/new-lamassu-admin/src/components/Carousel.js index f751cd1f..35f4ef20 100644 --- a/new-lamassu-admin/src/components/Carousel.js +++ b/new-lamassu-admin/src/components/Carousel.js @@ -38,6 +38,12 @@ export const Carousel = memo(({ photosData, slidePhoto }) => { opacity: 1 } }} + // navButtonsWrapperProps={{ + // style: { + // background: 'linear-gradient(to right, black 10%, transparent 80%)', + // opacity: '0.4' + // } + // }} autoPlay={false} indicators={false} navButtonsAlwaysVisible={true} diff --git a/new-lamassu-admin/src/pages/Customers/CustomerData.js b/new-lamassu-admin/src/pages/Customers/CustomerData.js index 3f792db3..1a06b233 100644 --- a/new-lamassu-admin/src/pages/Customers/CustomerData.js +++ b/new-lamassu-admin/src/pages/Customers/CustomerData.js @@ -360,19 +360,24 @@ const CustomerData = ({

{'Customer data'}

- setListView(false)} - /> - setListView(true)}> + {// TODO: Remove false condition for next release + false && ( + <> + setListView(false)} + /> + setListView(true)}> + + )}
{!listView && customer && ( diff --git a/new-lamassu-admin/src/pages/Customers/CustomerProfile.js b/new-lamassu-admin/src/pages/Customers/CustomerProfile.js index 71b24ba2..8ea827a1 100644 --- a/new-lamassu-admin/src/pages/Customers/CustomerProfile.js +++ b/new-lamassu-admin/src/pages/Customers/CustomerProfile.js @@ -18,8 +18,8 @@ import { ReactComponent as BlockReversedIcon } from 'src/styling/icons/button/bl import { ReactComponent as BlockIcon } from 'src/styling/icons/button/block/zodiac.svg' import { ReactComponent as DataReversedIcon } from 'src/styling/icons/button/data/white.svg' import { ReactComponent as DataIcon } from 'src/styling/icons/button/data/zodiac.svg' -import { ReactComponent as DiscountReversedIcon } from 'src/styling/icons/button/discount/white.svg' -import { ReactComponent as Discount } from 'src/styling/icons/button/discount/zodiac.svg' +// import { ReactComponent as DiscountReversedIcon } from 'src/styling/icons/button/discount/white.svg' +// import { ReactComponent as Discount } from 'src/styling/icons/button/discount/zodiac.svg' import { fromNamespace, namespaces } from 'src/utils/config' import CustomerData from './CustomerData' @@ -494,14 +494,17 @@ const CustomerProfile = memo(() => { onClick={() => setWizard(true)}> {`Manual data entry`} - {}}> {`Add individual discount`} - + */ + } {isSuspended && ( {!editing && (
-
- deleteEditedData()}> - {`Delete`} - -
- + {// TODO: Remove false condition for next release + false && ( +
+ deleteEditedData()}> + {`Delete`} + +
+ )} *:last-child': { + marginBottom: 24 + } } }) @@ -183,9 +188,11 @@ const EntryType = ({ customInfoRequirementOptions }) => { component={RadioGroup} name="requirement" options={ - !R.isEmpty(customInfoRequirementOptions) - ? updateRequirementOptions(requirementOptions) - : requirementOptions + requirementOptions + // TODO: Enable once custom info requirement manual entry is finished + // !R.isEmpty(customInfoRequirementOptions) + // ? updateRequirementOptions(requirementOptions) + // : requirementOptions } labelClassName={classes.label} radioClassName={classes.radio} @@ -248,11 +255,18 @@ const ManualDataEntry = ({ selectedValues, customInfoRequirementOptions }) => { }} /> )} - {!upload && - !isCustomInfoRequirement && - elements.options.map(({ label, name }) => ( - - ))} +
+ {!upload && + !isCustomInfoRequirement && + elements.options.map(({ label, name }) => ( + + ))} +
{upload && (