Merge branch 'master' into feature/payroll

This commit is contained in:
Patrick Fic
2023-07-06 13:04:50 -07:00
37 changed files with 516 additions and 174 deletions

View File

@@ -1,37 +1,5 @@
import { gql } from "@apollo/client";
export const CONVERSATION_LIST_SUBSCRIPTION = gql`
subscription CONVERSATION_LIST_SUBSCRIPTION($offset: Int!) {
conversations(
order_by: { updated_at: desc }
limit: 1
offset: $offset
where: { archived: { _eq: false } }
) {
phone_num
id
updated_at
unreadcnt
messages_aggregate(
where: { read: { _eq: false }, isoutbound: { _eq: false } }
) {
aggregate {
count
}
}
job_conversations {
job {
id
ro_number
ownr_fn
ownr_ln
ownr_co_nm
}
}
}
}
`;
export const UNREAD_CONVERSATION_COUNT = gql`
query UNREAD_CONVERSATION_COUNT {
messages_aggregate(
@@ -44,18 +12,6 @@ export const UNREAD_CONVERSATION_COUNT = gql`
}
`;
export const UNREAD_CONVERSATION_COUNT_SUBSCRIPTION = gql`
subscription UNREAD_CONVERSATION_COUNT_SUBSCRIPTION {
messages_aggregate(
where: { read: { _eq: false }, isoutbound: { _eq: false } }
) {
aggregate {
count
}
}
}
`;
export const CONVERSATION_LIST_QUERY = gql`
query CONVERSATION_LIST_QUERY($offset: Int!) {
conversations(

View File

@@ -1250,10 +1250,10 @@ export const ACTIVE_JOBS_FOR_AUTOCOMPLETE = gql`
query ACTIVE_JOBS_FOR_AUTOCOMPLETE($statuses: [String!]!) {
jobs(where: { status: { _in: $statuses } }) {
id
ownr_co_nm
ownr_fn
ownr_ln
ro_number
vehicleid
v_make_desc
v_model_desc
@@ -1281,6 +1281,7 @@ export const SEARCH_JOBS_FOR_AUTOCOMPLETE = gql`
}
) {
id
ownr_co_nm
ownr_fn
ownr_ln
ro_number
@@ -1297,6 +1298,7 @@ export const SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE = gql`
query SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE($id: uuid!) {
jobs_by_pk(id: $id) {
id
ownr_co_nm
ownr_fn
ownr_ln
ro_number
@@ -1315,6 +1317,7 @@ export const SEARCH_FOR_JOBS = gql`
search_jobs(args: { search: $search }, limit: 25) {
id
ro_number
ownr_co_nm
ownr_fn
ownr_ln
}