Added dashboard framework. Components are not yet created nor is the query finalized. BOD-79
Missed in previous commit. BOD-79
This commit is contained in:
@@ -3,6 +3,13 @@ import gql from "graphql-tag";
|
||||
export const QUERY_BODYSHOP = gql`
|
||||
query QUERY_BODYSHOP {
|
||||
bodyshops(where: { associations: { active: { _eq: true } } }) {
|
||||
associations {
|
||||
user {
|
||||
authid
|
||||
email
|
||||
dashboardlayout
|
||||
}
|
||||
}
|
||||
address1
|
||||
address2
|
||||
city
|
||||
@@ -114,3 +121,36 @@ export const QUERY_STRIPE_ID = gql`
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const QUERY_DASHBOARD_DETAILS = gql`
|
||||
query QUERY_DASHBOARD_DETAILS {
|
||||
query
|
||||
QUERY_DASHBOARD_DETAILS {
|
||||
jobs {
|
||||
id
|
||||
clm_total
|
||||
scheduled_completion
|
||||
date_invoiced
|
||||
ins_co_nm
|
||||
}
|
||||
compJobs: jobs(where: { inproduction: { _eq: true } }) {
|
||||
id
|
||||
scheduled_completion
|
||||
labhrs: joblines_aggregate(where: { mod_lbr_ty: { _eq: "LAB" } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
larhrs: joblines_aggregate(where: { mod_lbr_ty: { _eq: "LAR" } }) {
|
||||
aggregate {
|
||||
sum {
|
||||
mod_lb_hrs
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
@@ -828,6 +828,8 @@ export const QUERY_ALL_JOBS_PAGINATED = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
|
||||
export const QUERY_JOB_CLOSE_DETAILS = gql`
|
||||
query QUERY_JOB_CLOSE_DETAILS($id: uuid!) {
|
||||
jobs_by_pk(id: $id) {
|
||||
|
||||
@@ -13,6 +13,18 @@ export const UPSERT_USER = gql`
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_DASHBOARD_LAYOUT = gql`
|
||||
mutation UPDATE_DASHBOARD_LAYOUT($email: String!, $layout: jsonb!) {
|
||||
update_users_by_pk(
|
||||
pk_columns: { email: $email }
|
||||
_set: { dashboardlayout: $layout }
|
||||
) {
|
||||
email
|
||||
dashboardlayout
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const UPDATE_FCM_TOKEN = gql`
|
||||
mutation UPDATE_FCM_TOKEN($authEmail: String!, $token: jsonb!) {
|
||||
update_users(
|
||||
|
||||
Reference in New Issue
Block a user