fix: soft rework Customers pages

This commit is contained in:
Taranto 2020-08-07 18:56:31 +01:00 committed by Josh Harvey
parent 246f736fa8
commit b853f366f1
27 changed files with 658 additions and 306 deletions

View file

@ -454,7 +454,7 @@ function getCustomerById (id) {
c.id_card_data, c.id_card_data_override, c.id_card_data_expiration, c.id_card_photo_path,
c.id_card_photo_override, t.tx_class, t.fiat, t.fiat_code, t.created,
row_number() over (partition by c.id order by t.created desc) as rn,
count(0) over (partition by c.id) as total_txs,
sum(case when t.id is not null then 1 else 0 end) over (partition by c.id) as total_txs,
sum(t.fiat) over (partition by c.id) as total_spent
from customers c left outer join (
select 'cashIn' as tx_class, id, fiat, fiat_code, created, customer_id