From e255ba211ed07bb1914c7180af54e92c60da2e33 Mon Sep 17 00:00:00 2001 From: Mauricio Navarro Miranda Date: Fri, 24 Apr 2020 02:59:38 -0500 Subject: [PATCH] feat: use the newest editableTable options fix: new editableTable takes care of setEditing() fix: new save() parameters in use --- .../src/pages/maintenance/Cashboxes.js | 22 +++++++------------ 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/new-lamassu-admin/src/pages/maintenance/Cashboxes.js b/new-lamassu-admin/src/pages/maintenance/Cashboxes.js index c765544f..3ef1609a 100644 --- a/new-lamassu-admin/src/pages/maintenance/Cashboxes.js +++ b/new-lamassu-admin/src/pages/maintenance/Cashboxes.js @@ -13,7 +13,6 @@ import { CashInFormik } from 'src/components/inputs/cashbox/Cashbox' import { mainStyles } from 'src/pages/Transactions/Transactions.styles' -import { ReactComponent as EditIcon } from 'src/styling/icons/action/edit/enabled.svg' import { ReactComponent as ErrorIcon } from 'src/styling/icons/status/tomato.svg' const ValidationSchema = Yup.object().shape({ @@ -125,20 +124,20 @@ const Cashboxes = () => { } }) - const onSave = ({ cashin, cashout1, cashout2 }, { setSubmitting }) => + const onSave = (_, { cashin, cashout1, cashout2 }) => resetCashOut({ variables: { deviceId: cashin.deviceId, action: 'resetCashOutBills', cassettes: [Number(cashout1.notes), Number(cashout2.notes)] } - }).then(() => setSubmitting(false)) + }) const elements = [ { name: 'name', header: 'Machine', - size: 254, + width: 254, textAlign: 'left', view: name => <>{name}, input: ({ field: { value: name } }) => <>{name} @@ -146,7 +145,7 @@ const Cashboxes = () => { { name: 'cashin', header: 'Cash-in', - size: 265, + width: 265, textAlign: 'left', view: props => , input: props => @@ -154,7 +153,7 @@ const Cashboxes = () => { { name: 'cashout1', header: 'Cash-out 1', - size: 265, + width: 265, textAlign: 'left', view: props => , input: CashOutFormik @@ -162,17 +161,10 @@ const Cashboxes = () => { { name: 'cashout2', header: 'Cash-out 2', - size: 265, + width: 265, textAlign: 'left', view: props => , input: CashOutFormik - }, - { - name: 'edit', - header: 'Update', - size: 151, - textAlign: 'right', - view: onclick => } ] @@ -205,6 +197,8 @@ const Cashboxes = () => {