feat: added the compliance/customers route

feat: added customers list page

feat: created the Customer type on the gql server and consume it

Currently only with the 'name' property

feat: added query on gql to get the customers list with the needed props

feat: added the currently available props to the front end table

fix: consider only sent txs for the aggregations on the customers list

fix: replace ExpTable with a non-expandable one

fix: remove unused properties from gql and front-end

fix: fixed the customers list columns width

fix: the last active table column was reading the wrong property

chore: remove debug logging

fix: use the correct table columns to check for txs that should be
considered on the customers list page

fix: use the international format for phone numbers

feat: added the search box

fix: remove ordering from the gql customers list query and moved it to
the front-end)

fix: removed the search box

chore: refactor the customers list table into a new component

chore: cleanup code

fix: fixed styles from customer list page header
This commit is contained in:
Liordino Neto 2020-02-06 20:36:56 -03:00 committed by Josh Harvey
parent 4320df2d61
commit 507027cdee
10 changed files with 327 additions and 4 deletions

View file

@ -4,6 +4,7 @@ const { GraphQLJSON, GraphQLJSONObject } = require('graphql-type-json')
const got = require('got')
const machineLoader = require('../../machine-loader')
const customers = require('../../customers')
const { machineAction } = require('../machines')
const logs = require('../../logs')
const supportLogs = require('../../support_logs')
@ -58,6 +59,17 @@ const typeDefs = gql`
statuses: [MachineStatus]
}
type Customer {
name: String!
phone: String
totalTxs: Int
totalSpent: String
lastActive: Date
lastTxFiat: String
lastTxFiatCode: String
lastTxClass: String
}
type Account {
code: String!
display: String!
@ -146,6 +158,7 @@ const typeDefs = gql`
accounts: [Account]
cryptoCurrencies: [CryptoCurrency]
machines: [Machine]
customers: [Customer]
machineLogs(deviceId: ID!): [MachineLog]
funding: [CoinFunds]
serverVersion: String!
@ -190,6 +203,7 @@ const resolvers = {
accounts: () => accounts,
cryptoCurrencies: () => coins,
machines: () => machineLoader.getMachineNames(),
customers: () => customers.getCustomersList(),
funding: () => funding.getFunding(),
machineLogs: (...[, { deviceId }]) => logs.simpleGetMachineLogs(deviceId),
serverVersion: () => serverVersion,