Merge pull request #790 from josepfo/fix/clean-filters-button-styling

Fix: search filter section according to spec
This commit is contained in:
Rafael Taranto 2021-11-11 18:29:39 +00:00 committed by GitHub
commit 750bca63e5
9 changed files with 163 additions and 45 deletions

View file

@ -2,7 +2,7 @@ const db = require('../db')
const cashInTx = require('../cash-in/cash-in-tx')
const { CASH_OUT_TRANSACTION_STATES } = require('../cash-out/cash-out-helper')
function transaction() {
function transaction () {
const sql = `SELECT DISTINCT * FROM (
SELECT 'type' AS type, 'Cash In' AS value UNION
SELECT 'type' AS type, 'Cash Out' AS value UNION
@ -27,7 +27,7 @@ function transaction() {
return db.any(sql)
}
function customer() {
function customer () {
const sql = `SELECT DISTINCT * FROM (
SELECT 'phone' AS type, phone AS value FROM customers WHERE phone IS NOT NULL UNION
SELECT 'name' AS type, id_card_data::json->>'firstName' AS value FROM customers WHERE id_card_data::json->>'firstName' IS NOT NULL AND id_card_data::json->>'lastName' IS NULL UNION

View file

@ -1,7 +1,6 @@
const anonymous = require('../../../constants').anonymousCustomer
const customers = require('../../../customers')
const filters = require('../../filters')
const loyalty = require('../../../loyalty')
const resolvers = {
Customer: {