fix: allow for custom info requests to be allowed or blocked
fix: improve custom info requests backend fix: add custom info requests to trigger overrides
This commit is contained in:
parent
08bcf03a1e
commit
87a3b718db
11 changed files with 167 additions and 88 deletions
|
|
@ -1,3 +1,4 @@
|
||||||
|
const authentication = require('../modules/userManagement')
|
||||||
const queries = require('../../services/customInfoRequests')
|
const queries = require('../../services/customInfoRequests')
|
||||||
const DataLoader = require('dataloader')
|
const DataLoader = require('dataloader')
|
||||||
|
|
||||||
|
|
@ -21,7 +22,10 @@ const resolvers = {
|
||||||
insertCustomInfoRequest: (...[, { customRequest }]) => queries.addCustomInfoRequest(customRequest),
|
insertCustomInfoRequest: (...[, { customRequest }]) => queries.addCustomInfoRequest(customRequest),
|
||||||
removeCustomInfoRequest: (...[, { id }]) => queries.removeCustomInfoRequest(id),
|
removeCustomInfoRequest: (...[, { id }]) => queries.removeCustomInfoRequest(id),
|
||||||
editCustomInfoRequest: (...[, { id, customRequest }]) => queries.editCustomInfoRequest(id, customRequest),
|
editCustomInfoRequest: (...[, { id, customRequest }]) => queries.editCustomInfoRequest(id, customRequest),
|
||||||
setAuthorizedCustomRequest: (...[, { customerId, infoRequestId, isAuthorized }]) => queries.setAuthorizedCustomRequest(customerId, infoRequestId, isAuthorized),
|
setAuthorizedCustomRequest: (...[, { customerId, infoRequestId, override }, context]) => {
|
||||||
|
const token = authentication.getToken(context)
|
||||||
|
return queries.setAuthorizedCustomRequest(customerId, infoRequestId, override, token)
|
||||||
|
},
|
||||||
setCustomerCustomInfoRequest: (...[, { customerId, infoRequestId, data }]) => queries.setCustomerData(customerId, infoRequestId, data)
|
setCustomerCustomInfoRequest: (...[, { customerId, infoRequestId, data }]) => queries.setCustomerData(customerId, infoRequestId, data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,9 @@ const typeDef = gql`
|
||||||
type CustomRequestData {
|
type CustomRequestData {
|
||||||
customerId: ID
|
customerId: ID
|
||||||
infoRequestId: ID
|
infoRequestId: ID
|
||||||
approved: Boolean
|
override: String
|
||||||
|
overrideAt: Date
|
||||||
|
overrideBy: ID
|
||||||
customerData: JSON
|
customerData: JSON
|
||||||
customInfoRequest: CustomInfoRequest
|
customInfoRequest: CustomInfoRequest
|
||||||
}
|
}
|
||||||
|
|
@ -47,7 +49,7 @@ const typeDef = gql`
|
||||||
insertCustomInfoRequest(customRequest: CustomRequestInput!): CustomInfoRequest @auth
|
insertCustomInfoRequest(customRequest: CustomRequestInput!): CustomInfoRequest @auth
|
||||||
removeCustomInfoRequest(id: ID!): CustomInfoRequest @auth
|
removeCustomInfoRequest(id: ID!): CustomInfoRequest @auth
|
||||||
editCustomInfoRequest(id: ID!, customRequest: CustomRequestInput!): CustomInfoRequest @auth
|
editCustomInfoRequest(id: ID!, customRequest: CustomRequestInput!): CustomInfoRequest @auth
|
||||||
setAuthorizedCustomRequest(customerId: ID!, infoRequestId: ID!, isAuthorized: Boolean!): Boolean @auth
|
setAuthorizedCustomRequest(customerId: ID!, infoRequestId: ID!, override: String!): Boolean @auth
|
||||||
setCustomerCustomInfoRequest(customerId: ID!, infoRequestId: ID!, data: JSON!): Boolean @auth
|
setCustomerCustomInfoRequest(customerId: ID!, infoRequestId: ID!, data: JSON!): Boolean @auth
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
|
||||||
|
|
@ -35,8 +35,10 @@ const getAllCustomInfoRequestsForCustomer = (customerId) => {
|
||||||
return db.any(sql, [customerId]).then(res => res.map(item => ({
|
return db.any(sql, [customerId]).then(res => res.map(item => ({
|
||||||
customerId: item.customer_id,
|
customerId: item.customer_id,
|
||||||
infoRequestId: item.info_request_id,
|
infoRequestId: item.info_request_id,
|
||||||
approved: item.approved,
|
customerData: item.customer_data,
|
||||||
customerData: item.customer_data
|
override: item.override,
|
||||||
|
overrideAt: item.override_at,
|
||||||
|
overrideBy: item.override_by
|
||||||
})))
|
})))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -46,8 +48,10 @@ const getCustomInfoRequestForCustomer = (customerId, infoRequestId) => {
|
||||||
return {
|
return {
|
||||||
customerId: item.customer_id,
|
customerId: item.customer_id,
|
||||||
infoRequestId: item.info_request_id,
|
infoRequestId: item.info_request_id,
|
||||||
approved: item.approved,
|
customerData: item.customer_data,
|
||||||
customerData: item.customer_data
|
override: item.override,
|
||||||
|
overrideAt: item.override_at,
|
||||||
|
overrideBy: item.override_by
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -61,8 +65,10 @@ const batchGetAllCustomInfoRequestsForCustomer = (customerIds) => {
|
||||||
return items.map(item => ({
|
return items.map(item => ({
|
||||||
customerId: item.customer_id,
|
customerId: item.customer_id,
|
||||||
infoRequestId: item.info_request_id,
|
infoRequestId: item.info_request_id,
|
||||||
approved: item.approved,
|
customerData: item.customer_data,
|
||||||
customerData: item.customer_data
|
override: item.override,
|
||||||
|
overrideAt: item.override_at,
|
||||||
|
overrideBy: item.override_by
|
||||||
}))
|
}))
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
@ -93,9 +99,9 @@ const batchGetCustomInfoRequest = (infoRequestIds) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const setAuthorizedCustomRequest = (customerId, infoRequestId, isAuthorized) => {
|
const setAuthorizedCustomRequest = (customerId, infoRequestId, override, token) => {
|
||||||
const sql = `UPDATE customers_custom_info_requests SET approved = $1 WHERE customer_id = $2 AND info_request_id = $3`
|
const sql = `UPDATE customers_custom_info_requests SET override = $1, override_by = $2, override_at = now() WHERE customer_id = $3 AND info_request_id = $4`
|
||||||
return db.none(sql, [isAuthorized, customerId, infoRequestId]).then(() => true)
|
return db.none(sql, [override, token, customerId, infoRequestId]).then(() => true)
|
||||||
}
|
}
|
||||||
|
|
||||||
const setCustomerData = (customerId, infoRequestId, data) => {
|
const setCustomerData = (customerId, infoRequestId, data) => {
|
||||||
|
|
@ -103,7 +109,7 @@ const setCustomerData = (customerId, infoRequestId, data) => {
|
||||||
INSERT INTO customers_custom_info_requests (customer_id, info_request_id, customer_data)
|
INSERT INTO customers_custom_info_requests (customer_id, info_request_id, customer_data)
|
||||||
VALUES ($1, $2, $3)
|
VALUES ($1, $2, $3)
|
||||||
ON CONFLICT (customer_id, info_request_id)
|
ON CONFLICT (customer_id, info_request_id)
|
||||||
DO UPDATE SET customer_data = $3, approved = null`
|
DO UPDATE SET customer_data = $3`
|
||||||
return db.none(sql, [customerId, infoRequestId, data])
|
return db.none(sql, [customerId, infoRequestId, data])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
const _ = require('lodash/fp')
|
const _ = require('lodash/fp')
|
||||||
|
const { getCustomInfoRequests } = require('./new-admin/services/customInfoRequests')
|
||||||
|
|
||||||
const namespaces = {
|
const namespaces = {
|
||||||
WALLETS: 'wallets',
|
WALLETS: 'wallets',
|
||||||
|
|
@ -107,6 +108,8 @@ const getGlobalNotifications = config => getNotifications(null, null, config)
|
||||||
const getTriggers = _.get('triggers')
|
const getTriggers = _.get('triggers')
|
||||||
|
|
||||||
const getTriggersAutomation = config => {
|
const getTriggersAutomation = config => {
|
||||||
|
return getCustomInfoRequests(true)
|
||||||
|
.then(infoRequests => {
|
||||||
const defaultAutomation = _.get('triggersConfig_automation')(config)
|
const defaultAutomation = _.get('triggersConfig_automation')(config)
|
||||||
const requirements = {
|
const requirements = {
|
||||||
sanctions: defaultAutomation,
|
sanctions: defaultAutomation,
|
||||||
|
|
@ -116,6 +119,10 @@ const getTriggersAutomation = config => {
|
||||||
usSsn: defaultAutomation
|
usSsn: defaultAutomation
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_.forEach(it => {
|
||||||
|
requirements[it.id] = defaultAutomation
|
||||||
|
}, infoRequests)
|
||||||
|
|
||||||
const overrides = _.get('triggersConfig_overrides')(config)
|
const overrides = _.get('triggersConfig_overrides')(config)
|
||||||
|
|
||||||
const requirementsOverrides = _.reduce((acc, override) => {
|
const requirementsOverrides = _.reduce((acc, override) => {
|
||||||
|
|
@ -123,6 +130,7 @@ const getTriggersAutomation = config => {
|
||||||
}, {}, overrides)
|
}, {}, overrides)
|
||||||
|
|
||||||
return _.assign(requirements, requirementsOverrides)
|
return _.assign(requirements, requirementsOverrides)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const splitGetFirst = _.compose(_.head, _.split('_'))
|
const splitGetFirst = _.compose(_.head, _.split('_'))
|
||||||
|
|
|
||||||
|
|
@ -73,7 +73,7 @@ function poll (req, res, next) {
|
||||||
const pi = plugins(settings, deviceId)
|
const pi = plugins(settings, deviceId)
|
||||||
const hasLightning = checkHasLightning(settings)
|
const hasLightning = checkHasLightning(settings)
|
||||||
|
|
||||||
const triggersAutomation = configManager.getTriggersAutomation(settings.config)
|
const triggersAutomationPromise = configManager.getTriggersAutomation(settings.config)
|
||||||
const triggersPromise = buildTriggers(configManager.getTriggers(settings.config))
|
const triggersPromise = buildTriggers(configManager.getTriggers(settings.config))
|
||||||
|
|
||||||
const operatorInfo = configManager.getOperatorInfo(settings.config)
|
const operatorInfo = configManager.getOperatorInfo(settings.config)
|
||||||
|
|
@ -84,8 +84,8 @@ function poll (req, res, next) {
|
||||||
|
|
||||||
state.pids[operatorId] = { [deviceId]: { pid, ts: Date.now() } }
|
state.pids[operatorId] = { [deviceId]: { pid, ts: Date.now() } }
|
||||||
|
|
||||||
return Promise.all([pi.pollQueries(serialNumber, deviceTime, req.query, machineVersion, machineModel), triggersPromise])
|
return Promise.all([pi.pollQueries(serialNumber, deviceTime, req.query, machineVersion, machineModel), triggersPromise, triggersAutomationPromise])
|
||||||
.then(([results, triggers]) => {
|
.then(([results, triggers, triggersAutomation]) => {
|
||||||
const cassettes = results.cassettes
|
const cassettes = results.cassettes
|
||||||
|
|
||||||
const reboot = pid && state.reboots?.[operatorId]?.[deviceId] === pid
|
const reboot = pid && state.reboots?.[operatorId]?.[deviceId] === pid
|
||||||
|
|
|
||||||
16
migrations/1642518884925-manual-custom-info-requests.js
Normal file
16
migrations/1642518884925-manual-custom-info-requests.js
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
var db = require('./db')
|
||||||
|
|
||||||
|
exports.up = function (next) {
|
||||||
|
var sql = [
|
||||||
|
`ALTER TABLE customers_custom_info_requests DROP COLUMN approved`,
|
||||||
|
`ALTER TABLE customers_custom_info_requests ADD COLUMN override verification_type NOT NULL DEFAULT 'automatic'`,
|
||||||
|
`ALTER TABLE customers_custom_info_requests ADD COLUMN override_by UUID REFERENCES users(id)`,
|
||||||
|
`ALTER TABLE customers_custom_info_requests ADD COLUMN override_at TIMESTAMPTZ`
|
||||||
|
]
|
||||||
|
|
||||||
|
db.multi(sql, next)
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.down = function (next) {
|
||||||
|
next()
|
||||||
|
}
|
||||||
|
|
@ -324,7 +324,6 @@ const CustomerData = ({
|
||||||
]
|
]
|
||||||
|
|
||||||
R.forEach(it => {
|
R.forEach(it => {
|
||||||
console.log('it', it)
|
|
||||||
customRequirements.push({
|
customRequirements.push({
|
||||||
fields: [
|
fields: [
|
||||||
{
|
{
|
||||||
|
|
@ -336,12 +335,13 @@ const CustomerData = ({
|
||||||
],
|
],
|
||||||
title: it.customInfoRequest.customRequest.name,
|
title: it.customInfoRequest.customRequest.name,
|
||||||
titleIcon: <CardIcon className={classes.cardIcon} />,
|
titleIcon: <CardIcon className={classes.cardIcon} />,
|
||||||
|
state: R.path(['override'])(it),
|
||||||
authorize: () =>
|
authorize: () =>
|
||||||
authorizeCustomRequest({
|
authorizeCustomRequest({
|
||||||
variables: {
|
variables: {
|
||||||
customerId: it.customerId,
|
customerId: it.customerId,
|
||||||
infoRequestId: it.customInfoRequest.id,
|
infoRequestId: it.customInfoRequest.id,
|
||||||
isAuthorized: true
|
override: OVERRIDE_AUTHORIZED
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
reject: () =>
|
reject: () =>
|
||||||
|
|
@ -349,7 +349,7 @@ const CustomerData = ({
|
||||||
variables: {
|
variables: {
|
||||||
customerId: it.customerId,
|
customerId: it.customerId,
|
||||||
infoRequestId: it.customInfoRequest.id,
|
infoRequestId: it.customInfoRequest.id,
|
||||||
isAuthorized: false
|
override: OVERRIDE_REJECTED
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
save: values => {
|
save: values => {
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,9 @@ const GET_CUSTOMER = gql`
|
||||||
}
|
}
|
||||||
customInfoRequests {
|
customInfoRequests {
|
||||||
customerId
|
customerId
|
||||||
approved
|
override
|
||||||
|
overrideBy
|
||||||
|
overrideAt
|
||||||
customerData
|
customerData
|
||||||
customInfoRequest {
|
customInfoRequest {
|
||||||
id
|
id
|
||||||
|
|
@ -180,12 +182,12 @@ const SET_AUTHORIZED_REQUEST = gql`
|
||||||
mutation setAuthorizedCustomRequest(
|
mutation setAuthorizedCustomRequest(
|
||||||
$customerId: ID!
|
$customerId: ID!
|
||||||
$infoRequestId: ID!
|
$infoRequestId: ID!
|
||||||
$isAuthorized: Boolean!
|
$override: String!
|
||||||
) {
|
) {
|
||||||
setAuthorizedCustomRequest(
|
setAuthorizedCustomRequest(
|
||||||
customerId: $customerId
|
customerId: $customerId
|
||||||
infoRequestId: $infoRequestId
|
infoRequestId: $infoRequestId
|
||||||
isAuthorized: $isAuthorized
|
override: $override
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
|
||||||
|
|
@ -53,12 +53,12 @@ const SET_AUTHORIZED_REQUEST = gql`
|
||||||
mutation setAuthorizedCustomRequest(
|
mutation setAuthorizedCustomRequest(
|
||||||
$customerId: ID!
|
$customerId: ID!
|
||||||
$infoRequestId: ID!
|
$infoRequestId: ID!
|
||||||
$isAuthorized: Boolean!
|
$override: String!
|
||||||
) {
|
) {
|
||||||
setAuthorizedCustomRequest(
|
setAuthorizedCustomRequest(
|
||||||
customerId: $customerId
|
customerId: $customerId
|
||||||
infoRequestId: $infoRequestId
|
infoRequestId: $infoRequestId
|
||||||
isAuthorized: $isAuthorized
|
override: $override
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,34 @@ const GET_INFO = gql`
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
|
const GET_CUSTOM_REQUESTS = gql`
|
||||||
|
query customInfoRequests {
|
||||||
|
customInfoRequests {
|
||||||
|
id
|
||||||
|
customRequest
|
||||||
|
enabled
|
||||||
|
}
|
||||||
|
}
|
||||||
|
`
|
||||||
|
|
||||||
const AdvancedTriggersSettings = memo(() => {
|
const AdvancedTriggersSettings = memo(() => {
|
||||||
const SCREEN_KEY = namespaces.TRIGGERS
|
const SCREEN_KEY = namespaces.TRIGGERS
|
||||||
const [error, setError] = useState(null)
|
const [error, setError] = useState(null)
|
||||||
const [isEditingDefault, setEditingDefault] = useState(false)
|
const [isEditingDefault, setEditingDefault] = useState(false)
|
||||||
const [isEditingOverrides, setEditingOverrides] = useState(false)
|
const [isEditingOverrides, setEditingOverrides] = useState(false)
|
||||||
|
|
||||||
const { data } = useQuery(GET_INFO)
|
const { data, loading: configLoading } = useQuery(GET_INFO)
|
||||||
|
const { data: customInfoReqData, loading: customInfoLoading } = useQuery(
|
||||||
|
GET_CUSTOM_REQUESTS
|
||||||
|
)
|
||||||
|
|
||||||
|
const customInfoRequests =
|
||||||
|
R.path(['customInfoRequests'])(customInfoReqData) ?? []
|
||||||
|
const enabledCustomInfoRequests = R.filter(R.propEq('enabled', true))(
|
||||||
|
customInfoRequests
|
||||||
|
)
|
||||||
|
|
||||||
|
const loading = configLoading || customInfoLoading
|
||||||
|
|
||||||
const [saveConfig] = useMutation(SAVE_CONFIG, {
|
const [saveConfig] = useMutation(SAVE_CONFIG, {
|
||||||
refetchQueries: () => ['getData'],
|
refetchQueries: () => ['getData'],
|
||||||
|
|
@ -67,6 +88,7 @@ const AdvancedTriggersSettings = memo(() => {
|
||||||
const onEditingOverrides = (it, editing) => setEditingOverrides(editing)
|
const onEditingOverrides = (it, editing) => setEditingOverrides(editing)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
!loading && (
|
||||||
<>
|
<>
|
||||||
<Section>
|
<Section>
|
||||||
<EditableTable
|
<EditableTable
|
||||||
|
|
@ -95,15 +117,19 @@ const AdvancedTriggersSettings = memo(() => {
|
||||||
enableCreate
|
enableCreate
|
||||||
initialValues={overridesDefaults}
|
initialValues={overridesDefaults}
|
||||||
save={saveOverrides}
|
save={saveOverrides}
|
||||||
validationSchema={getOverridesSchema(requirementsOverrides)}
|
validationSchema={getOverridesSchema(
|
||||||
|
requirementsOverrides,
|
||||||
|
enabledCustomInfoRequests
|
||||||
|
)}
|
||||||
data={requirementsOverrides}
|
data={requirementsOverrides}
|
||||||
elements={getOverrides()}
|
elements={getOverrides(enabledCustomInfoRequests)}
|
||||||
setEditing={onEditingOverrides}
|
setEditing={onEditingOverrides}
|
||||||
forceDisable={isEditingDefault}
|
forceDisable={isEditingDefault}
|
||||||
/>
|
/>
|
||||||
</Section>
|
</Section>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
)
|
||||||
})
|
})
|
||||||
|
|
||||||
export default AdvancedTriggersSettings
|
export default AdvancedTriggersSettings
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ import * as Yup from 'yup'
|
||||||
import Autocomplete from 'src/components/inputs/formik/Autocomplete.js'
|
import Autocomplete from 'src/components/inputs/formik/Autocomplete.js'
|
||||||
import { getView } from 'src/pages/Triggers/helper'
|
import { getView } from 'src/pages/Triggers/helper'
|
||||||
|
|
||||||
const advancedRequirementOptions = [
|
const buildAdvancedRequirementOptions = customInfoRequests => {
|
||||||
|
const base = [
|
||||||
{ display: 'Sanctions', code: 'sanctions' },
|
{ display: 'Sanctions', code: 'sanctions' },
|
||||||
{ display: 'ID card image', code: 'idCardPhoto' },
|
{ display: 'ID card image', code: 'idCardPhoto' },
|
||||||
{ display: 'ID data', code: 'idCardData' },
|
{ display: 'ID data', code: 'idCardData' },
|
||||||
|
|
@ -12,10 +13,20 @@ const advancedRequirementOptions = [
|
||||||
{ display: 'US SSN', code: 'usSsn' }
|
{ display: 'US SSN', code: 'usSsn' }
|
||||||
]
|
]
|
||||||
|
|
||||||
const displayRequirement = code => {
|
const custom = R.map(it => ({
|
||||||
|
display: it.customRequest.name,
|
||||||
|
code: it.id
|
||||||
|
}))(customInfoRequests)
|
||||||
|
|
||||||
|
return R.concat(base, custom)
|
||||||
|
}
|
||||||
|
|
||||||
|
const displayRequirement = (code, customInfoRequests) => {
|
||||||
return R.prop(
|
return R.prop(
|
||||||
'display',
|
'display',
|
||||||
R.find(R.propEq('code', code))(advancedRequirementOptions)
|
R.find(R.propEq('code', code))(
|
||||||
|
buildAdvancedRequirementOptions(customInfoRequests)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -29,7 +40,7 @@ const defaultSchema = Yup.object().shape({
|
||||||
.required()
|
.required()
|
||||||
})
|
})
|
||||||
|
|
||||||
const getOverridesSchema = values => {
|
const getOverridesSchema = (values, customInfoRequests) => {
|
||||||
return Yup.object().shape({
|
return Yup.object().shape({
|
||||||
id: Yup.string()
|
id: Yup.string()
|
||||||
.label('Requirement')
|
.label('Requirement')
|
||||||
|
|
@ -40,7 +51,8 @@ const getOverridesSchema = values => {
|
||||||
if (R.find(R.propEq('requirement', requirement))(values)) {
|
if (R.find(R.propEq('requirement', requirement))(values)) {
|
||||||
return this.createError({
|
return this.createError({
|
||||||
message: `Requirement ${displayRequirement(
|
message: `Requirement ${displayRequirement(
|
||||||
requirement
|
requirement,
|
||||||
|
customInfoRequests
|
||||||
)} already overriden`
|
)} already overriden`
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
@ -84,17 +96,20 @@ const getDefaultSettings = () => {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
const getOverrides = () => {
|
const getOverrides = customInfoRequests => {
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
name: 'requirement',
|
name: 'requirement',
|
||||||
header: 'Requirement',
|
header: 'Requirement',
|
||||||
width: 196,
|
width: 196,
|
||||||
size: 'sm',
|
size: 'sm',
|
||||||
view: getView(advancedRequirementOptions, 'display'),
|
view: getView(
|
||||||
|
buildAdvancedRequirementOptions(customInfoRequests),
|
||||||
|
'display'
|
||||||
|
),
|
||||||
input: Autocomplete,
|
input: Autocomplete,
|
||||||
inputProps: {
|
inputProps: {
|
||||||
options: advancedRequirementOptions,
|
options: buildAdvancedRequirementOptions(customInfoRequests),
|
||||||
labelProp: 'display',
|
labelProp: 'display',
|
||||||
valueProp: 'code'
|
valueProp: 'code'
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue