fix: revert header changes
fix: null pointer check
This commit is contained in:
parent
5f259dc9d3
commit
7b069c3e7b
2 changed files with 7 additions and 7 deletions
|
|
@ -132,7 +132,7 @@ const Header = memo(({ tree, user }) => {
|
||||||
return (
|
return (
|
||||||
<NavLink
|
<NavLink
|
||||||
key={idx}
|
key={idx}
|
||||||
to={!R.isNil(it.children) ? it.children[0].route : it.route}
|
to={it.route || it.children[0].route}
|
||||||
isActive={match => {
|
isActive={match => {
|
||||||
if (!match) return false
|
if (!match) return false
|
||||||
setActive(it)
|
setActive(it)
|
||||||
|
|
|
||||||
|
|
@ -225,14 +225,14 @@ const CashCassettes = () => {
|
||||||
{
|
{
|
||||||
name: 'name',
|
name: 'name',
|
||||||
header: 'Machine',
|
header: 'Machine',
|
||||||
width: widthsByNumberOfCassettes[maxNumberOfCassettes].machine,
|
width: widthsByNumberOfCassettes[maxNumberOfCassettes]?.machine,
|
||||||
view: name => <>{name}</>,
|
view: name => <>{name}</>,
|
||||||
input: ({ field: { value: name } }) => <>{name}</>
|
input: ({ field: { value: name } }) => <>{name}</>
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'cashbox',
|
name: 'cashbox',
|
||||||
header: 'Cash box',
|
header: 'Cash box',
|
||||||
width: widthsByNumberOfCassettes[maxNumberOfCassettes].cashbox,
|
width: widthsByNumberOfCassettes[maxNumberOfCassettes]?.cashbox,
|
||||||
view: (value, { id }) => (
|
view: (value, { id }) => (
|
||||||
<CashIn
|
<CashIn
|
||||||
currency={{ code: fiatCurrency }}
|
currency={{ code: fiatCurrency }}
|
||||||
|
|
@ -253,7 +253,7 @@ const CashCassettes = () => {
|
||||||
elements.push({
|
elements.push({
|
||||||
name: `cassette${it}`,
|
name: `cassette${it}`,
|
||||||
header: `Cassette ${it}`,
|
header: `Cassette ${it}`,
|
||||||
width: widthsByNumberOfCassettes[maxNumberOfCassettes].cassette,
|
width: widthsByNumberOfCassettes[maxNumberOfCassettes]?.cassette,
|
||||||
stripe: true,
|
stripe: true,
|
||||||
doubleHeader: 'Cash-out',
|
doubleHeader: 'Cash-out',
|
||||||
view: (value, { id }) => (
|
view: (value, { id }) => (
|
||||||
|
|
@ -263,7 +263,7 @@ const CashCassettes = () => {
|
||||||
currency={{ code: fiatCurrency }}
|
currency={{ code: fiatCurrency }}
|
||||||
notes={value}
|
notes={value}
|
||||||
width={
|
width={
|
||||||
widthsByNumberOfCassettes[maxNumberOfCassettes].cassetteGraph
|
widthsByNumberOfCassettes[maxNumberOfCassettes]?.cassetteGraph
|
||||||
}
|
}
|
||||||
threshold={
|
threshold={
|
||||||
fillingPercentageSettings[`fillingPercentageCassette${it}`]
|
fillingPercentageSettings[`fillingPercentageCassette${it}`]
|
||||||
|
|
@ -274,7 +274,7 @@ const CashCassettes = () => {
|
||||||
input: CashCassetteInput,
|
input: CashCassetteInput,
|
||||||
inputProps: {
|
inputProps: {
|
||||||
decimalPlaces: 0,
|
decimalPlaces: 0,
|
||||||
width: widthsByNumberOfCassettes[maxNumberOfCassettes].cassetteGraph,
|
width: widthsByNumberOfCassettes[maxNumberOfCassettes]?.cassetteGraph,
|
||||||
inputClassName: classes.cashbox
|
inputClassName: classes.cashbox
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -286,7 +286,7 @@ const CashCassettes = () => {
|
||||||
elements.push({
|
elements.push({
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
header: 'Edit',
|
header: 'Edit',
|
||||||
width: widthsByNumberOfCassettes[maxNumberOfCassettes].editWidth,
|
width: widthsByNumberOfCassettes[maxNumberOfCassettes]?.editWidth,
|
||||||
textAlign: 'center',
|
textAlign: 'center',
|
||||||
view: (value, { id }) => {
|
view: (value, { id }) => {
|
||||||
return (
|
return (
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue