chore: use map instead of foreach
This commit is contained in:
parent
8f8e95c292
commit
ae0d90dd99
1 changed files with 25 additions and 28 deletions
|
|
@ -99,7 +99,6 @@ const CustomerData = ({
|
||||||
const customInfoRequests = sortByName(
|
const customInfoRequests = sortByName(
|
||||||
R.path(['customInfoRequests'])(customer) ?? []
|
R.path(['customInfoRequests'])(customer) ?? []
|
||||||
)
|
)
|
||||||
const externalCompliance = []
|
|
||||||
|
|
||||||
const phone = R.path(['phone'])(customer)
|
const phone = R.path(['phone'])(customer)
|
||||||
const email = R.path(['email'])(customer)
|
const email = R.path(['email'])(customer)
|
||||||
|
|
@ -400,34 +399,32 @@ const CustomerData = ({
|
||||||
})
|
})
|
||||||
}, R.keys(smsData) ?? [])
|
}, R.keys(smsData) ?? [])
|
||||||
|
|
||||||
R.forEach(it => {
|
const externalCompliance = R.map(it => ({
|
||||||
externalCompliance.push({
|
fields: [
|
||||||
fields: [
|
{
|
||||||
{
|
name: 'externalId',
|
||||||
name: 'externalId',
|
label: 'Third Party ID',
|
||||||
label: 'Third Party ID',
|
editable: false
|
||||||
editable: false
|
},
|
||||||
},
|
{
|
||||||
{
|
name: 'lastKnownStatus',
|
||||||
name: 'lastKnownStatus',
|
label: 'Last Known Status',
|
||||||
label: 'Last Known Status',
|
editable: false
|
||||||
editable: false
|
},
|
||||||
},
|
{
|
||||||
{
|
name: 'lastUpdated',
|
||||||
name: 'lastUpdated',
|
label: 'Last Updated',
|
||||||
label: 'Last Updated',
|
editable: false
|
||||||
editable: false
|
|
||||||
}
|
|
||||||
],
|
|
||||||
titleIcon: <CardIcon className={classes.cardIcon} />,
|
|
||||||
title: `External Info [${it.service}]`,
|
|
||||||
initialValues: it ?? {
|
|
||||||
externalId: '',
|
|
||||||
lastKnownStatus: '',
|
|
||||||
lastUpdated: ''
|
|
||||||
}
|
}
|
||||||
})
|
],
|
||||||
})(customer.externalCompliance ?? [])
|
titleIcon: <CardIcon className={classes.cardIcon} />,
|
||||||
|
title: `External Info [${it.service}]`,
|
||||||
|
initialValues: it ?? {
|
||||||
|
externalId: '',
|
||||||
|
lastKnownStatus: '',
|
||||||
|
lastUpdated: ''
|
||||||
|
}
|
||||||
|
}))(customer.externalCompliance ?? [])
|
||||||
|
|
||||||
const editableCard = (
|
const editableCard = (
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue