2021-03-26 04:22:59 +08:00
|
|
|
import gql from 'graphql-tag'
|
|
|
|
|
|
|
|
export const GET_ALL_CLIENTS = gql`
|
2021-10-01 15:37:34 +08:00
|
|
|
query getAllClients($first: Int, $after: String, $text: String, $sortBy: [String!] = ["uid"]) {
|
|
|
|
clientAll(pageSize:$first, afterCursor:$after, text:$text, sortBy:$sortBy) {
|
2021-09-27 23:45:22 +08:00
|
|
|
totalCount
|
|
|
|
pageInfo {
|
|
|
|
hasNextPage
|
|
|
|
hasPreviousPage
|
|
|
|
startCursor
|
|
|
|
endCursor
|
|
|
|
}
|
|
|
|
items {
|
2021-03-26 04:22:59 +08:00
|
|
|
uid
|
|
|
|
name
|
|
|
|
code
|
|
|
|
district {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
province {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
country{
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`;
|
|
|
|
|
|
|
|
export const SEARCH_CLIENTS = gql`
|
|
|
|
query searchClients($queryString: String!) {
|
|
|
|
clientSearch(queryString: $queryString){
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
code
|
|
|
|
district {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
province {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
country{
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`;
|
|
|
|
|
|
|
|
export const GET_CLIENT_CONTACTS_BY_CLIENT_UID = gql`
|
2023-03-19 23:21:32 +08:00
|
|
|
query getClientContactsByClientUid($clientUid: FelicityID!) {
|
2021-03-26 04:22:59 +08:00
|
|
|
clientContactByClientUid(clientUid: $clientUid){
|
|
|
|
uid
|
|
|
|
firstName
|
|
|
|
lastName
|
|
|
|
email
|
|
|
|
mobilePhone
|
|
|
|
consentSms
|
|
|
|
}
|
2021-05-07 01:32:14 +08:00
|
|
|
}`;
|
|
|
|
|
|
|
|
|
|
|
|
export const GET_CLIENT_BY_UID = gql`
|
2023-03-19 23:21:32 +08:00
|
|
|
query getClientByUid($uid: FelicityID!) {
|
2021-05-07 01:32:14 +08:00
|
|
|
clientByUid(uid: $uid){
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
code
|
|
|
|
district {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
province {
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
country{
|
|
|
|
uid
|
|
|
|
name
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`;
|