fix: migrations and front-end issues
This commit is contained in:
parent
21b88f182e
commit
e58acdb8be
9 changed files with 137 additions and 201 deletions
|
|
@ -43,7 +43,7 @@ const SNAKE_CASE_BILL_FIELDS = [
|
||||||
'provisioned_recycler_6'
|
'provisioned_recycler_6'
|
||||||
]
|
]
|
||||||
|
|
||||||
const BILL_FIELDS = _.map(_.camelCase, BILL_FIELDS)
|
const BILL_FIELDS = _.map(_.camelCase, SNAKE_CASE_BILL_FIELDS)
|
||||||
|
|
||||||
module.exports = { redeemableTxs, toObj, toDb, REDEEMABLE_AGE, CASH_OUT_TRANSACTION_STATES }
|
module.exports = { redeemableTxs, toObj, toDb, REDEEMABLE_AGE, CASH_OUT_TRANSACTION_STATES }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,80 +2,84 @@ const db = require('./db')
|
||||||
|
|
||||||
exports.up = function (next) {
|
exports.up = function (next) {
|
||||||
var sql = [
|
var sql = [
|
||||||
`ALTER TABLE cash_out_actions
|
|
||||||
RENAME COLUMN provisioned_1f TO provisioned_recycler_1,
|
|
||||||
RENAME COLUMN provisioned_1r TO provisioned_recycler_2,
|
|
||||||
RENAME COLUMN provisioned_2f TO provisioned_recycler_3,
|
|
||||||
RENAME COLUMN provisioned_2r TO provisioned_recycler_4,
|
|
||||||
RENAME COLUMN provisioned_3f TO provisioned_recycler_5,
|
|
||||||
RENAME COLUMN provisioned_3r TO provisioned_recycler_6,
|
|
||||||
RENAME COLUMN dispensed_1f TO dispensed_recycler_1,
|
|
||||||
RENAME COLUMN dispensed_1r TO dispensed_recycler_2,
|
|
||||||
RENAME COLUMN dispensed_2f TO dispensed_recycler_3,
|
|
||||||
RENAME COLUMN dispensed_2r TO dispensed_recycler_4,
|
|
||||||
RENAME COLUMN dispensed_3f TO dispensed_recycler_5,
|
|
||||||
RENAME COLUMN dispensed_3r TO dispensed_recycler_6,
|
|
||||||
RENAME COLUMN rejected_1f TO rejected_recycler_1,
|
|
||||||
RENAME COLUMN rejected_1r TO rejected_recycler_2,
|
|
||||||
RENAME COLUMN rejected_2f TO rejected_recycler_3,
|
|
||||||
RENAME COLUMN rejected_2r TO rejected_recycler_4,
|
|
||||||
RENAME COLUMN rejected_3f TO rejected_recycler_5,
|
|
||||||
RENAME COLUMN rejected_3r TO rejected_recycler_6,
|
|
||||||
RENAME COLUMN denomination_1f TO denomination_recycler_1,
|
|
||||||
RENAME COLUMN denomination_1r TO denomination_recycler_2,
|
|
||||||
RENAME COLUMN denomination_2f TO denomination_recycler_3,
|
|
||||||
RENAME COLUMN denomination_2r TO denomination_recycler_4,
|
|
||||||
RENAME COLUMN denomination_3f TO denomination_recycler_5,
|
|
||||||
RENAME COLUMN denomination_3r TO denomination_recycler_6`,
|
|
||||||
`ALTER TABLE devices
|
|
||||||
RENAME COLUMN stacker1f TO recycler1,
|
|
||||||
RENAME COLUMN stacker1r TO recycler2,
|
|
||||||
RENAME COLUMN stacker2f TO recycler3,
|
|
||||||
RENAME COLUMN stacker2r TO recycler4,
|
|
||||||
RENAME COLUMN stacker3f TO recycler5,
|
|
||||||
RENAME COLUMN stacker3r TO recycler6,
|
|
||||||
RENAME COLUMN number_of_stackers TO number_of_recyclers`,
|
|
||||||
`ALTER TABLE cash_out_txs
|
|
||||||
RENAME COLUMN provisioned_1f TO provisioned_recycler_1,
|
|
||||||
RENAME COLUMN provisioned_1r TO provisioned_recycler_2,
|
|
||||||
RENAME COLUMN provisioned_2f TO provisioned_recycler_3,
|
|
||||||
RENAME COLUMN provisioned_2r TO provisioned_recycler_4,
|
|
||||||
RENAME COLUMN provisioned_3f TO provisioned_recycler_5,
|
|
||||||
RENAME COLUMN provisioned_3r TO provisioned_recycler_6,
|
|
||||||
RENAME COLUMN denomination_1f TO denomination_recycler_1,
|
|
||||||
RENAME COLUMN denomination_1r TO denomination_recycler_2,
|
|
||||||
RENAME COLUMN denomination_2f TO denomination_recycler_3,
|
|
||||||
RENAME COLUMN denomination_2r TO denomination_recycler_4,
|
|
||||||
RENAME COLUMN denomination_3f TO denomination_recycler_5,
|
|
||||||
RENAME COLUMN denomination_3r TO denomination_recycler_6`,
|
|
||||||
`ALTER TYPE cash_unit
|
|
||||||
RENAME VALUE 'stacker1f' TO 'recycler1',
|
|
||||||
RENAME VALUE 'stacker1r' TO 'recycler2',
|
|
||||||
RENAME VALUE 'stacker2f' TO 'recycler3',
|
|
||||||
RENAME VALUE 'stacker2r' TO 'recycler4',
|
|
||||||
RENAME VALUE 'stacker3f' TO 'recycler5',
|
|
||||||
RENAME VALUE 'stacker3r' TO 'recycler6',
|
|
||||||
`,
|
|
||||||
`ALTER TYPE cash_unit_operation_type
|
|
||||||
RENAME VALUE 'cash-stacker-1f-refill' TO 'cash-recycler-1-refill',
|
|
||||||
RENAME VALUE 'cash-stacker-1f-empty' TO 'cash-recycler-1-empty',
|
|
||||||
RENAME VALUE 'cash-stacker-1f-count-change' TO 'cash-recycler-1-count-change',
|
|
||||||
RENAME VALUE 'cash-stacker-1r-refill' TO 'cash-recycler-2-refill',
|
|
||||||
RENAME VALUE 'cash-stacker-1r-empty' TO 'cash-recycler-2-empty',
|
|
||||||
RENAME VALUE 'cash-stacker-1r-count-change' TO 'cash-recycler-2-count-change',
|
|
||||||
RENAME VALUE 'cash-stacker-2f-refill' TO 'cash-recycler-3-refill',
|
|
||||||
RENAME VALUE 'cash-stacker-2f-empty' TO 'cash-recycler-3-empty',
|
|
||||||
RENAME VALUE 'cash-stacker-2f-count-change' TO 'cash-recycler-3-count-change',
|
|
||||||
RENAME VALUE 'cash-stacker-2r-refill' TO 'cash-recycler-4-refill',
|
|
||||||
RENAME VALUE 'cash-stacker-2r-empty' TO 'cash-recycler-4-empty',
|
|
||||||
RENAME VALUE 'cash-stacker-2r-count-change' TO 'cash-recycler-4-count-change',
|
|
||||||
RENAME VALUE 'cash-stacker-3f-refill' TO 'cash-recycler-5-refill',
|
|
||||||
RENAME VALUE 'cash-stacker-3f-empty' TO 'cash-recycler-5-empty',
|
|
||||||
RENAME VALUE 'cash-stacker-3f-count-change' TO 'cash-recycler-5-count-change',
|
|
||||||
RENAME VALUE 'cash-stacker-3r-refill' TO 'cash-recycler-6-refill',
|
|
||||||
RENAME VALUE 'cash-stacker-3r-empty' TO 'cash-recycler-6-empty',
|
|
||||||
RENAME VALUE 'cash-stacker-3r-count-change' TO 'cash-recycler-6-count-change',
|
|
||||||
`
|
`
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN provisioned_1f TO provisioned_recycler_1;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN provisioned_1r TO provisioned_recycler_2;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN provisioned_2f TO provisioned_recycler_3;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN provisioned_2r TO provisioned_recycler_4;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN provisioned_3f TO provisioned_recycler_5;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN provisioned_3r TO provisioned_recycler_6;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN dispensed_1f TO dispensed_recycler_1;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN dispensed_1r TO dispensed_recycler_2;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN dispensed_2f TO dispensed_recycler_3;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN dispensed_2r TO dispensed_recycler_4;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN dispensed_3f TO dispensed_recycler_5;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN dispensed_3r TO dispensed_recycler_6;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN rejected_1f TO rejected_recycler_1;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN rejected_1r TO rejected_recycler_2;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN rejected_2f TO rejected_recycler_3;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN rejected_2r TO rejected_recycler_4;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN rejected_3f TO rejected_recycler_5;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN rejected_3r TO rejected_recycler_6;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN denomination_1f TO denomination_recycler_1;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN denomination_1r TO denomination_recycler_2;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN denomination_2f TO denomination_recycler_3;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN denomination_2r TO denomination_recycler_4;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN denomination_3f TO denomination_recycler_5;
|
||||||
|
ALTER TABLE cash_out_actions RENAME COLUMN denomination_3r TO denomination_recycler_6;
|
||||||
|
`,
|
||||||
|
`
|
||||||
|
ALTER TABLE devices RENAME COLUMN stacker1f TO recycler1;
|
||||||
|
ALTER TABLE devices RENAME COLUMN stacker1r TO recycler2;
|
||||||
|
ALTER TABLE devices RENAME COLUMN stacker2f TO recycler3;
|
||||||
|
ALTER TABLE devices RENAME COLUMN stacker2r TO recycler4;
|
||||||
|
ALTER TABLE devices RENAME COLUMN stacker3f TO recycler5;
|
||||||
|
ALTER TABLE devices RENAME COLUMN stacker3r TO recycler6;
|
||||||
|
ALTER TABLE devices RENAME COLUMN number_of_stackers TO number_of_recyclers;
|
||||||
|
`,
|
||||||
|
`
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN provisioned_1f TO provisioned_recycler_1;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN provisioned_1r TO provisioned_recycler_2;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN provisioned_2f TO provisioned_recycler_3;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN provisioned_2r TO provisioned_recycler_4;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN provisioned_3f TO provisioned_recycler_5;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN provisioned_3r TO provisioned_recycler_6;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN denomination_1f TO denomination_recycler_1;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN denomination_1r TO denomination_recycler_2;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN denomination_2f TO denomination_recycler_3;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN denomination_2r TO denomination_recycler_4;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN denomination_3f TO denomination_recycler_5;
|
||||||
|
ALTER TABLE cash_out_txs RENAME COLUMN denomination_3r TO denomination_recycler_6;
|
||||||
|
`,
|
||||||
|
`
|
||||||
|
ALTER TYPE cash_unit RENAME VALUE 'stacker1f' TO 'recycler1';
|
||||||
|
ALTER TYPE cash_unit RENAME VALUE 'stacker1r' TO 'recycler2';
|
||||||
|
ALTER TYPE cash_unit RENAME VALUE 'stacker2f' TO 'recycler3';
|
||||||
|
ALTER TYPE cash_unit RENAME VALUE 'stacker2r' TO 'recycler4';
|
||||||
|
ALTER TYPE cash_unit RENAME VALUE 'stacker3f' TO 'recycler5';
|
||||||
|
ALTER TYPE cash_unit RENAME VALUE 'stacker3r' TO 'recycler6';
|
||||||
|
`,
|
||||||
|
`
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-1f-refill' TO 'cash-recycler-1-refill';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-1f-empty' TO 'cash-recycler-1-empty';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-1f-count-change' TO 'cash-recycler-1-count-change';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-1r-refill' TO 'cash-recycler-2-refill';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-1r-empty' TO 'cash-recycler-2-empty';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-1r-count-change' TO 'cash-recycler-2-count-change';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-2f-refill' TO 'cash-recycler-3-refill';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-2f-empty' TO 'cash-recycler-3-empty';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-2f-count-change' TO 'cash-recycler-3-count-change';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-2r-refill' TO 'cash-recycler-4-refill';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-2r-empty' TO 'cash-recycler-4-empty';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-2r-count-change' TO 'cash-recycler-4-count-change';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-3f-refill' TO 'cash-recycler-5-refill';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-3f-empty' TO 'cash-recycler-5-empty';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-3f-count-change' TO 'cash-recycler-5-count-change';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-3r-refill' TO 'cash-recycler-6-refill';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-3r-empty' TO 'cash-recycler-6-empty';
|
||||||
|
ALTER TYPE cash_unit_operation_type RENAME VALUE 'cash-stacker-3r-count-change' TO 'cash-recycler-6-count-change';
|
||||||
|
`,
|
||||||
|
`UPDATE devices SET number_of_recyclers = number_of_recyclers * 2;`
|
||||||
]
|
]
|
||||||
|
|
||||||
db.multi(sql, next)
|
db.multi(sql, next)
|
||||||
|
|
|
||||||
|
|
@ -178,8 +178,6 @@ const Accounting = () => {
|
||||||
) ?? 0
|
) ?? 0
|
||||||
).toNumber()
|
).toNumber()
|
||||||
|
|
||||||
console.log(opData)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
!loading && (
|
!loading && (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,7 @@ const MODAL_HEIGHT = 520
|
||||||
|
|
||||||
const Wizard = ({ machine, locale, onClose, save, error }) => {
|
const Wizard = ({ machine, locale, onClose, save, error }) => {
|
||||||
// Each stacker counts as two steps, one for front and another for rear
|
// Each stacker counts as two steps, one for front and another for rear
|
||||||
const LAST_STEP =
|
const LAST_STEP = machine.numberOfCassettes + machine.numberOfRecyclers + 1
|
||||||
machine.numberOfCassettes + machine.numberOfRecyclers * 2 + 1
|
|
||||||
const [{ step, config }, setState] = useState({
|
const [{ step, config }, setState] = useState({
|
||||||
step: 0,
|
step: 0,
|
||||||
config: { active: true }
|
config: { active: true }
|
||||||
|
|
@ -63,31 +62,18 @@ const Wizard = ({ machine, locale, onClose, save, error }) => {
|
||||||
}),
|
}),
|
||||||
R.range(1, machine.numberOfCassettes + 1)
|
R.range(1, machine.numberOfCassettes + 1)
|
||||||
),
|
),
|
||||||
R.chain(
|
R.map(
|
||||||
it => [
|
it => ({
|
||||||
{
|
type: `recycler${it}`,
|
||||||
type: `recycler${it * 2 - 1}`,
|
model: 'recycler',
|
||||||
model: 'recycler',
|
display: `Recycler ${it}`,
|
||||||
display: `Recycler ${it}`,
|
component: Autocomplete,
|
||||||
component: Autocomplete,
|
inputProps: {
|
||||||
inputProps: {
|
options: options,
|
||||||
options: options,
|
labelProp: 'display',
|
||||||
labelProp: 'display',
|
valueProp: 'code'
|
||||||
valueProp: 'code'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
type: `recycler${it * 2}`,
|
|
||||||
model: 'recycler',
|
|
||||||
display: `Recycler ${it}`,
|
|
||||||
component: Autocomplete,
|
|
||||||
inputProps: {
|
|
||||||
options: options,
|
|
||||||
labelProp: 'display',
|
|
||||||
valueProp: 'code'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
],
|
}),
|
||||||
R.range(1, machine.numberOfRecyclers + 1)
|
R.range(1, machine.numberOfRecyclers + 1)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -141,31 +141,28 @@ const getElements = (machines, locale = {}, classes) => {
|
||||||
)
|
)
|
||||||
|
|
||||||
R.until(
|
R.until(
|
||||||
R.gt(
|
R.gt(R.__, Math.ceil(maxNumberOfRecyclers / 2)),
|
||||||
R.__,
|
it => {
|
||||||
Math.ceil(maxNumberOfRecyclers),
|
elements.push({
|
||||||
it => {
|
names: [`recycler${it * 2 - 1}`, `recycler${it * 2}`],
|
||||||
elements.push({
|
header: `Recyclers ${it * 2 - 1} - ${it * 2}`,
|
||||||
names: [`recycler${it * 2 - 1}`, `recycler${it * 2}`],
|
size: 'sm',
|
||||||
header: `Recyclers ${it * 2 - 1} ${it * 2}`,
|
stripe: true,
|
||||||
size: 'sm',
|
textAlign: 'right',
|
||||||
stripe: true,
|
width: widthsByNumberOfUnits[numberOfCashUnits]?.cassette,
|
||||||
textAlign: 'right',
|
suffix: fiatCurrency,
|
||||||
width: widthsByNumberOfUnits[numberOfCashUnits]?.cassette,
|
bold: bold,
|
||||||
suffix: fiatCurrency,
|
input: options?.length > 0 ? Autocomplete : NumberInput,
|
||||||
bold: bold,
|
inputProps: cassetteProps,
|
||||||
input: options?.length > 0 ? Autocomplete : NumberInput,
|
doubleHeader: 'Denominations of Cassettes & Recyclers',
|
||||||
inputProps: cassetteProps,
|
isHidden: machine =>
|
||||||
doubleHeader: 'Denominations of Cassettes & Recyclers',
|
it >
|
||||||
isHidden: machine =>
|
machines.find(({ deviceId }) => deviceId === machine.id)
|
||||||
it >
|
.numberOfRecyclers
|
||||||
machines.find(({ deviceId }) => deviceId === machine.id)
|
})
|
||||||
.numberOfRecyclers
|
return R.add(1, it)
|
||||||
})
|
},
|
||||||
return R.add(1, it)
|
1
|
||||||
},
|
|
||||||
1
|
|
||||||
)
|
|
||||||
)
|
)
|
||||||
|
|
||||||
return elements
|
return elements
|
||||||
|
|
|
||||||
|
|
@ -174,9 +174,13 @@ const CashUnitDetails = ({
|
||||||
{R.map(it => (
|
{R.map(it => (
|
||||||
<>
|
<>
|
||||||
<div className={classes.col}>
|
<div className={classes.col}>
|
||||||
<Label1 noMargin className={classes.label}>{`Recycler ${it *
|
<Label1 noMargin className={classes.label}>
|
||||||
2 -
|
{`Recycler ${
|
||||||
1}`}</Label1>
|
machine.model === 'aveiro'
|
||||||
|
? `${it} f/r`
|
||||||
|
: `${it * 2 - 1} - ${it * 2}`
|
||||||
|
}`}
|
||||||
|
</Label1>
|
||||||
<div className={classes.loadingBoxes}>
|
<div className={classes.loadingBoxes}>
|
||||||
<CashOut
|
<CashOut
|
||||||
width={60}
|
width={60}
|
||||||
|
|
@ -185,7 +189,7 @@ const CashUnitDetails = ({
|
||||||
notes={machine.cashUnits[`recycler${it * 2 - 1}`]}
|
notes={machine.cashUnits[`recycler${it * 2 - 1}`]}
|
||||||
denomination={
|
denomination={
|
||||||
getCashoutSettings(machine.id ?? machine.deviceId)[
|
getCashoutSettings(machine.id ?? machine.deviceId)[
|
||||||
`recycler${it}`
|
`recycler${it * 2 - 1}`
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
threshold={
|
threshold={
|
||||||
|
|
@ -214,7 +218,7 @@ const CashUnitDetails = ({
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{it !== machine.numberOfRecyclers && (
|
{it !== machine.numberOfRecyclers / 2 && (
|
||||||
<span className={classes.verticalLine} />
|
<span className={classes.verticalLine} />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
|
|
@ -120,58 +120,6 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => {
|
||||||
}))
|
}))
|
||||||
)
|
)
|
||||||
|
|
||||||
// const makeStackerSteps = R.pipe(
|
|
||||||
// R.add(1),
|
|
||||||
// R.range(1),
|
|
||||||
// R.chain(i => [
|
|
||||||
// {
|
|
||||||
// type: `stacker ${i}f`,
|
|
||||||
// schema: Yup.object().shape({
|
|
||||||
// [`stacker${i}f`]: Yup.number()
|
|
||||||
// .label('Bill count')
|
|
||||||
// .positive()
|
|
||||||
// .integer()
|
|
||||||
// .required()
|
|
||||||
// .min(0)
|
|
||||||
// .max(
|
|
||||||
// i === 1
|
|
||||||
// ? cashUnitCapacity[machine.model].stacker -
|
|
||||||
// cashUnitCapacity[machine.model].escrow
|
|
||||||
// : cashUnitCapacity[machine.model].stacker,
|
|
||||||
// i === 1
|
|
||||||
// ? `${
|
|
||||||
// modelPrettifier[machine.model]
|
|
||||||
// } maximum stacker capacity for the escrow unit is ${cashUnitCapacity[
|
|
||||||
// machine.model
|
|
||||||
// ].stacker - cashUnitCapacity[machine.model].escrow} bills`
|
|
||||||
// : `${
|
|
||||||
// modelPrettifier[machine.model]
|
|
||||||
// } maximum stacker capacity is ${
|
|
||||||
// cashUnitCapacity[machine.model].stacker
|
|
||||||
// } bills`
|
|
||||||
// )
|
|
||||||
// })
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// type: `stacker ${i}r`,
|
|
||||||
// schema: Yup.object().shape({
|
|
||||||
// [`stacker${i}r`]: Yup.number()
|
|
||||||
// .label('Bill count')
|
|
||||||
// .positive()
|
|
||||||
// .integer()
|
|
||||||
// .required()
|
|
||||||
// .min(0)
|
|
||||||
// .max(
|
|
||||||
// cashUnitCapacity[machine.model].stacker,
|
|
||||||
// `${modelPrettifier[machine.model]} maximum stacker capacity is ${
|
|
||||||
// cashUnitCapacity[machine.model].stacker
|
|
||||||
// } bills`
|
|
||||||
// )
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// ])
|
|
||||||
// )
|
|
||||||
|
|
||||||
const makeCassettesInitialValues = () =>
|
const makeCassettesInitialValues = () =>
|
||||||
!R.isEmpty(cashoutSettings)
|
!R.isEmpty(cashoutSettings)
|
||||||
? R.reduce(
|
? R.reduce(
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,6 @@ const getElements = (
|
||||||
widths,
|
widths,
|
||||||
setMachineId
|
setMachineId
|
||||||
) => {
|
) => {
|
||||||
console.log(config)
|
|
||||||
const fillingPercentageSettings = fromNamespace('notifications', config)
|
const fillingPercentageSettings = fromNamespace('notifications', config)
|
||||||
const locale = fromNamespace('locale')(config)
|
const locale = fromNamespace('locale')(config)
|
||||||
const cashout = fromNamespace('cashOut')(config)
|
const cashout = fromNamespace('cashOut')(config)
|
||||||
|
|
@ -107,7 +106,7 @@ const getElements = (
|
||||||
}
|
}
|
||||||
capacity={getCashUnitCapacity(m.model, 'recycler')}
|
capacity={getCashUnitCapacity(m.model, 'recycler')}
|
||||||
/>
|
/>
|
||||||
{it !== m.numberOfRecyclers && (
|
{it !== m.numberOfRecyclers / 2 && (
|
||||||
<span className={classes.verticalLine} />
|
<span className={classes.verticalLine} />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
|
|
|
||||||
30
package-lock.json
generated
30
package-lock.json
generated
|
|
@ -737,7 +737,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -1194,7 +1194,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -1422,7 +1422,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -1815,7 +1815,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -1832,7 +1832,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-message": {
|
"bitcoinjs-message": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
"version": "npm:bitcoinjs-message@1.0.0-master.2",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2013,7 +2013,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2030,7 +2030,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-message": {
|
"bitcoinjs-message": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
"version": "npm:bitcoinjs-message@1.0.0-master.2",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2210,7 +2210,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2227,7 +2227,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-message": {
|
"bitcoinjs-message": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
"version": "npm:bitcoinjs-message@1.0.0-master.2",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2407,7 +2407,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2424,7 +2424,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-message": {
|
"bitcoinjs-message": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
"version": "npm:bitcoinjs-message@1.0.0-master.2",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2604,7 +2604,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2621,7 +2621,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-message": {
|
"bitcoinjs-message": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
"version": "npm:bitcoinjs-message@1.0.0-master.2",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2897,7 +2897,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-lib": {
|
"bitcoinjs-lib": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-lib@7.1.0-master.6",
|
"version": "npm:bitcoinjs-lib@7.1.0-master.6",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-lib/-/bitcoinjs-lib-7.1.0-master.6.tgz",
|
||||||
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
"integrity": "sha512-Cvf0odjJKy4frbcmVfTuRpQmAhu5wIFNmYNhJg3qxrV8pdR5WDbRICfGvrorxofZgB8Cv4UDTmbeoOF/ggmXnA==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
@ -2914,7 +2914,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bitcoinjs-message": {
|
"bitcoinjs-message": {
|
||||||
"version": "npm:@bitgo-forks/bitcoinjs-message@1.0.0-master.2",
|
"version": "npm:bitcoinjs-message@1.0.0-master.2",
|
||||||
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
"resolved": "https://registry.npmjs.org/@bitgo-forks/bitcoinjs-message/-/bitcoinjs-message-1.0.0-master.2.tgz",
|
||||||
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
"integrity": "sha512-XSDGM3rA75vcDxeKqHPexika/TgWUFWdfKTv1lV8TZTb5XFHHD6ARckLdMOBiCf29eZSzbJQvF/OIWqNqMl/2A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue