fix: add missing custom requirement data on customer data communication with machine
fix: create function to reset the override flag in custom requirement data
This commit is contained in:
parent
45173e7c0e
commit
81d74eb40b
3 changed files with 18 additions and 3 deletions
|
|
@ -520,7 +520,11 @@ function getCustomersList (phone = null, name = null, address = null, id = null)
|
|||
AND ($7 IS NULL OR id_card_data::json->>'documentNumber' = $7)
|
||||
limit $3`
|
||||
return db.any(sql, [ passableErrorCodes, anonymous.uuid, NUM_RESULTS, phone, name, address, id ])
|
||||
.then(customers => Promise.all(_.map(camelizeDeep, customers)))
|
||||
.then(customers => Promise.all(_.map(customer =>
|
||||
getCustomInfoRequestsData(customer)
|
||||
.then(camelizeDeep), customers)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -569,6 +573,7 @@ function getCustomerById (id) {
|
|||
) AS cl WHERE rn = 1`
|
||||
return db.oneOrNone(sql, [passableErrorCodes, id])
|
||||
.then(assignCustomerData)
|
||||
.then(getCustomInfoRequestsData)
|
||||
.then(camelizeDeep)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue