Feat: make dashboard and machine profile page

This commit is contained in:
Cesar 2020-11-17 12:13:10 +00:00 committed by Josh Harvey
parent 1df90c3196
commit c21cdb13e1
29 changed files with 717 additions and 135 deletions

View file

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

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.id_card_photo_path as customer_id_card_photo_path,
((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
where txs.created >= $2 and txs.created <= $3 ${
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.id_card_photo_path as customer_id_card_photo_path,
(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
and actions.action = 'provisionAddress'
left outer join customers c on txs.customer_id = c.id