mirror of
https://github.com/beak-insights/felicity-lims.git
synced 2025-02-23 16:33:11 +08:00
92 lines
2.3 KiB
TypeScript
92 lines
2.3 KiB
TypeScript
import gql from 'graphql-tag';
|
|
|
|
export const GET_ALL_CLIENTS = gql`
|
|
query getAllClients($first: Int, $after: String, $text: String, $sortBy: [String!] = ["uid"]) {
|
|
clientAll(pageSize: $first, afterCursor: $after, text: $text, sortBy: $sortBy) {
|
|
totalCount
|
|
pageInfo {
|
|
hasNextPage
|
|
hasPreviousPage
|
|
startCursor
|
|
endCursor
|
|
}
|
|
items {
|
|
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`
|
|
query getClientContactsByClientUid($clientUid: String!) {
|
|
clientContactByClientUid(clientUid: $clientUid) {
|
|
uid
|
|
firstName
|
|
lastName
|
|
email
|
|
mobilePhone
|
|
consentSms
|
|
}
|
|
}
|
|
`;
|
|
|
|
export const GET_CLIENT_BY_UID = gql`
|
|
query getClientByUid($uid: String!) {
|
|
clientByUid(uid: $uid) {
|
|
uid
|
|
name
|
|
code
|
|
districtUid
|
|
district {
|
|
uid
|
|
name
|
|
provinceUid
|
|
province {
|
|
uid
|
|
name
|
|
countryUid
|
|
country {
|
|
uid
|
|
name
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
`;
|