feat: customer matching on individual discounts panel
This commit is contained in:
parent
eda6decae0
commit
03fd19e0cf
5 changed files with 101 additions and 8 deletions
|
|
@ -1,6 +1,7 @@
|
|||
const anonymous = require('../../../constants').anonymousCustomer
|
||||
const customers = require('../../../customers')
|
||||
const filters = require('../../filters')
|
||||
const loyalty = require('../../../loyalty')
|
||||
|
||||
const resolvers = {
|
||||
Customer: {
|
||||
|
|
@ -9,7 +10,8 @@ const resolvers = {
|
|||
Query: {
|
||||
customers: (...[, { phone, name, address, id }]) => customers.getCustomersList(phone, name, address, id),
|
||||
customer: (...[, { customerId }]) => customers.getCustomerById(customerId),
|
||||
customerFilters: () => filters.customer()
|
||||
customerFilters: () => filters.customer(),
|
||||
getCustomersWithDiscounts: (...[, { discounts }]) => loyalty.getCustomersWithDiscounts(discounts)
|
||||
},
|
||||
Mutation: {
|
||||
setCustomer: (root, { customerId, customerInput }, context, info) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue