Fix: remove unneeded fragments

This commit is contained in:
Cesar 2020-12-29 14:23:35 +00:00 committed by Josh Harvey
parent 6b6d52d7b0
commit c7a01f840f
5 changed files with 493 additions and 412 deletions

View file

@ -240,6 +240,8 @@ const typeDefs = gql`
created: Date created: Date
age: Float age: Float
deviceTime: Date deviceTime: Date
}
type Rate { type Rate {
code: String code: String
name: String name: String

View file

@ -36,7 +36,7 @@ function batch (from = new Date(0).toISOString(), until = new Date().toISOString
c.front_camera_path as customer_front_camera_path, c.front_camera_path as customer_front_camera_path,
c.id_card_photo_path as customer_id_card_photo_path, c.id_card_photo_path as customer_id_card_photo_path,
((not txs.send_confirmed) and (txs.created <= now() - interval $1)) as expired ((not txs.send_confirmed) and (txs.created <= now() - interval $1)) as expired
from cash_in_txs as txs from cash_in_txs as txs
left outer join customers c on txs.customer_id = c.id left outer join customers c on txs.customer_id = c.id
where txs.created >= $2 and txs.created <= $3 ${ where txs.created >= $2 and txs.created <= $3 ${
id !== null ? `and txs.device_id = $6` : `` id !== null ? `and txs.device_id = $6` : ``
@ -54,7 +54,7 @@ function batch (from = new Date(0).toISOString(), until = new Date().toISOString
c.front_camera_path as customer_front_camera_path, c.front_camera_path as customer_front_camera_path,
c.id_card_photo_path as customer_id_card_photo_path, c.id_card_photo_path as customer_id_card_photo_path,
(extract(epoch from (now() - greatest(txs.created, txs.confirmed_at))) * 1000) >= $1 as expired (extract(epoch from (now() - greatest(txs.created, txs.confirmed_at))) * 1000) >= $1 as expired
from cash_out_txs txs from cash_out_txs txs
inner join cash_out_actions actions on txs.id = actions.tx_id inner join cash_out_actions actions on txs.id = actions.tx_id
and actions.action = 'provisionAddress' and actions.action = 'provisionAddress'
left outer join customers c on txs.customer_id = c.id left outer join customers c on txs.customer_id = c.id

View file

@ -43,9 +43,8 @@ const RightSide = () => {
} }
return ( return (
<> <Grid item xs={6}>
<Grid item xs={6}> {/* <CollapsibleCard
{/* <CollapsibleCard
className={classes.alertsCard} className={classes.alertsCard}
state={alertsSize} state={alertsSize}
shrunkComponent={ shrunkComponent={
@ -64,26 +63,25 @@ const RightSide = () => {
size={alertsSize} size={alertsSize}
/> />
</CollapsibleCard> */} </CollapsibleCard> */}
<CollapsibleCard <CollapsibleCard
state={systemStatusSize} state={systemStatusSize}
shrunkComponent={ shrunkComponent={
<ShrunkCard <ShrunkCard
title={'System status'} title={'System status'}
buttonName={'Show machines'} buttonName={'Show machines'}
onUnshrink={onReset} onUnshrink={onReset}
/>
}>
<SystemStatus
onExpand={() => {
setSystemStatusSize(cardState.EXPANDED)
// setAlertsSize(cardState.SHRUNK)
}}
onReset={onReset}
size={systemStatusSize}
/> />
</CollapsibleCard> }>
</Grid> <SystemStatus
</> onExpand={() => {
setSystemStatusSize(cardState.EXPANDED)
// setAlertsSize(cardState.SHRUNK)
}}
onReset={onReset}
size={systemStatusSize}
/>
</CollapsibleCard>
</Grid>
) )
} }

View file

@ -155,19 +155,17 @@ const Transactions = ({ id }) => {
} }
return ( return (
<> <DataTable
<DataTable extraHeight={extraHeight}
extraHeight={extraHeight} onClick={handleClick}
onClick={handleClick} loading={loading || id === null}
loading={loading || id === null} emptyText="No transactions so far"
emptyText="No transactions so far" elements={elements}
elements={elements} // need to splice because back end query could return double NUM_LOG_RESULTS because it doesnt merge the txIn and the txOut results before applying the limit
// need to splice because back end query could return double NUM_LOG_RESULTS because it doesnt merge the txIn and the txOut results before applying the limit data={R.path(['transactions'])(txResponse)} // .splice(0,NUM_LOG_RESULTS)}
data={R.path(['transactions'])(txResponse)} // .splice(0,NUM_LOG_RESULTS)} Details={DetailsRow}
Details={DetailsRow} expandable
expandable />
/>
</>
) )
} }

833
package-lock.json generated

File diff suppressed because it is too large Load diff