fix: remove logs
fix: move variable to constants
This commit is contained in:
parent
cddb8e5bee
commit
864a83d5e0
3 changed files with 11 additions and 7 deletions
|
|
@ -272,7 +272,7 @@ const CashCassettes = () => {
|
||||||
<TitleSection
|
<TitleSection
|
||||||
title="Cash Cassettes"
|
title="Cash Cassettes"
|
||||||
button={{
|
button={{
|
||||||
text: 'Cashbox history a',
|
text: 'Cashbox history',
|
||||||
icon: HistoryIcon,
|
icon: HistoryIcon,
|
||||||
inverseIcon: ReverseHistoryIcon,
|
inverseIcon: ReverseHistoryIcon,
|
||||||
toggle: setShowHistory
|
toggle: setShowHistory
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ import React, { useState } from 'react'
|
||||||
import * as Yup from 'yup'
|
import * as Yup from 'yup'
|
||||||
|
|
||||||
import Modal from 'src/components/Modal'
|
import Modal from 'src/components/Modal'
|
||||||
|
import { MAX_NUMBER_OF_CASSETTES } from 'src/utils/constants'
|
||||||
import { defaultToZero } from 'src/utils/number'
|
import { defaultToZero } from 'src/utils/number'
|
||||||
|
|
||||||
import WizardSplash from './WizardSplash'
|
import WizardSplash from './WizardSplash'
|
||||||
|
|
@ -12,9 +13,6 @@ const MODAL_WIDTH = 554
|
||||||
const MODAL_HEIGHT = 520
|
const MODAL_HEIGHT = 520
|
||||||
const CASHBOX_DEFAULT_CAPACITY = 500
|
const CASHBOX_DEFAULT_CAPACITY = 500
|
||||||
|
|
||||||
// Maximum number of cassettes, to create the necessary fields for the back-end
|
|
||||||
const MAX_NUMBER_OF_CASSETTES = 4
|
|
||||||
|
|
||||||
const CASSETTE_FIELDS = R.map(
|
const CASSETTE_FIELDS = R.map(
|
||||||
it => `cassette${it}`,
|
it => `cassette${it}`,
|
||||||
R.range(1, MAX_NUMBER_OF_CASSETTES + 1)
|
R.range(1, MAX_NUMBER_OF_CASSETTES + 1)
|
||||||
|
|
@ -69,8 +67,6 @@ const Wizard = ({ machine, cashoutSettings, locale, onClose, save, error }) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('AAA', CASSETTE_FIELDS)
|
|
||||||
|
|
||||||
const makeCassetteSteps = R.pipe(
|
const makeCassetteSteps = R.pipe(
|
||||||
R.add(1),
|
R.add(1),
|
||||||
R.range(1),
|
R.range(1),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,14 @@
|
||||||
const CURRENCY_MAX = 9999999
|
const CURRENCY_MAX = 9999999
|
||||||
|
const MIN_NUMBER_OF_CASSETTES = 2
|
||||||
|
const MAX_NUMBER_OF_CASSETTES = 4
|
||||||
|
|
||||||
const AUTOMATIC = 'automatic'
|
const AUTOMATIC = 'automatic'
|
||||||
const MANUAL = 'manual'
|
const MANUAL = 'manual'
|
||||||
|
|
||||||
export { CURRENCY_MAX, AUTOMATIC, MANUAL }
|
export {
|
||||||
|
CURRENCY_MAX,
|
||||||
|
MIN_NUMBER_OF_CASSETTES,
|
||||||
|
MAX_NUMBER_OF_CASSETTES,
|
||||||
|
AUTOMATIC,
|
||||||
|
MANUAL
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue