Merge pull request #1041 from josepfo/feat/manual-entry-populate-existing-requirement
feat: enable custom entries and custom information requirements
This commit is contained in:
commit
abcce7ff06
11 changed files with 525 additions and 192 deletions
|
|
@ -21,7 +21,7 @@ const resolvers = {
|
|||
return customers.updateCustomer(customerId, customerInput, token)
|
||||
},
|
||||
addCustomField: (...[, { customerId, label, value }]) => customers.addCustomField(customerId, label, value),
|
||||
saveCustomField: (...[, { customerId, fieldId, newValue }]) => customers.saveCustomField(customerId, fieldId, newValue),
|
||||
saveCustomField: (...[, { customerId, fieldId, value }]) => customers.saveCustomField(customerId, fieldId, value),
|
||||
removeCustomField: (...[, [ { customerId, fieldId } ]]) => customers.removeCustomField(customerId, fieldId),
|
||||
editCustomer: async (root, { customerId, customerEdit }, context) => {
|
||||
const token = authentication.getToken(context)
|
||||
|
|
|
|||
|
|
@ -1,12 +1,6 @@
|
|||
const { gql } = require('apollo-server-express')
|
||||
|
||||
const typeDef = gql`
|
||||
type CustomerCustomField {
|
||||
id: ID
|
||||
label: String
|
||||
value: String
|
||||
}
|
||||
|
||||
type Customer {
|
||||
id: ID!
|
||||
authorizedOverride: String
|
||||
|
|
@ -86,6 +80,12 @@ const typeDef = gql`
|
|||
content: String
|
||||
}
|
||||
|
||||
type CustomerCustomField {
|
||||
id: ID
|
||||
label: String
|
||||
value: String
|
||||
}
|
||||
|
||||
type Query {
|
||||
customers(phone: String, name: String, address: String, id: String): [Customer] @auth
|
||||
customer(customerId: ID!): Customer @auth
|
||||
|
|
@ -94,9 +94,9 @@ const typeDef = gql`
|
|||
|
||||
type Mutation {
|
||||
setCustomer(customerId: ID!, customerInput: CustomerInput): Customer @auth
|
||||
addCustomField(customerId: ID!, label: String!, value: String!): CustomerCustomField @auth
|
||||
saveCustomField(customerId: ID!, fieldId: ID!, value: String!): CustomerCustomField @auth
|
||||
removeCustomField(customerId: ID!, fieldId: ID!): CustomerCustomField @auth
|
||||
addCustomField(customerId: ID!, label: String!, value: String!): Boolean @auth
|
||||
saveCustomField(customerId: ID!, fieldId: ID!, value: String!): Boolean @auth
|
||||
removeCustomField(customerId: ID!, fieldId: ID!): Boolean @auth
|
||||
editCustomer(customerId: ID!, customerEdit: CustomerEdit): Customer @auth
|
||||
deleteEditedData(customerId: ID!, customerEdit: CustomerEdit): Customer @auth
|
||||
replacePhoto(customerId: ID!, photoType: String, newPhoto: UploadGQL): Customer @auth
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue