feature/IO-3182-Phone-Number-Consent - Checkpoint
This commit is contained in:
@@ -1,48 +0,0 @@
|
||||
import { gql } from "@apollo/client";
|
||||
|
||||
export const GET_PHONE_NUMBER_CONSENT = gql`
|
||||
query GET_PHONE_NUMBER_CONSENT($bodyshopid: uuid!, $phone_number: String!) {
|
||||
phone_number_consent(where: { bodyshopid: { _eq: $bodyshopid }, phone_number: { _eq: $phone_number } }) {
|
||||
id
|
||||
bodyshopid
|
||||
phone_number
|
||||
consent_status
|
||||
created_at
|
||||
updated_at
|
||||
consent_updated_at
|
||||
phone_number_consent_history(order_by: { changed_at: desc }, limit: 1) {
|
||||
id
|
||||
reason
|
||||
changed_at
|
||||
old_value
|
||||
new_value
|
||||
changed_by
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_PHONE_NUMBER_CONSENTS = gql`
|
||||
query GET_PHONE_NUMBER_CONSENTS($bodyshopid: uuid!, $search: String) {
|
||||
phone_number_consent(
|
||||
where: { bodyshopid: { _eq: $bodyshopid }, phone_number: { _ilike: $search } }
|
||||
order_by: [{ phone_number: asc }, { consent_updated_at: desc }]
|
||||
) {
|
||||
id
|
||||
bodyshopid
|
||||
phone_number
|
||||
consent_status
|
||||
created_at
|
||||
updated_at
|
||||
consent_updated_at
|
||||
phone_number_consent_history(order_by: { changed_at: desc }, limit: 1) {
|
||||
id
|
||||
reason
|
||||
changed_at
|
||||
old_value
|
||||
new_value
|
||||
changed_by
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
28
client/src/graphql/phone-number-opt-out.queries.js
Normal file
28
client/src/graphql/phone-number-opt-out.queries.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import { gql } from "@apollo/client";
|
||||
|
||||
export const GET_PHONE_NUMBER_OPT_OUT = gql`
|
||||
query GET_PHONE_NUMBER_OPT_OUT($bodyshopid: uuid!, $phone_number: String!) {
|
||||
phone_number_consent(where: { bodyshopid: { _eq: $bodyshopid }, phone_number: { _eq: $phone_number } }) {
|
||||
id
|
||||
bodyshopid
|
||||
phone_number
|
||||
created_at
|
||||
updated_at
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GET_PHONE_NUMBER_OPT_OUTS = gql`
|
||||
query GET_PHONE_NUMBER_OPT_OUTS($bodyshopid: uuid!, $search: String) {
|
||||
phone_number_consent(
|
||||
where: { bodyshopid: { _eq: $bodyshopid }, phone_number: { _ilike: $search } }
|
||||
order_by: [{ phone_number: asc }, { consent_updated_at: desc }]
|
||||
) {
|
||||
id
|
||||
bodyshopid
|
||||
phone_number
|
||||
created_at
|
||||
updated_at
|
||||
}
|
||||
}
|
||||
`;
|
||||
Reference in New Issue
Block a user