Framework for entering time tickets BOD-183 BOD-185

This commit is contained in:
Patrick Fic
2020-07-02 15:01:44 -07:00
parent 044fb4b9e0
commit c89e0565a0
11 changed files with 224 additions and 18 deletions

View File

@@ -52,7 +52,7 @@ export const QUERY_INVOICES_FOR_EXPORT = gql`
export const QUERY_PAYMENTS_FOR_EXPORT = gql`
query QUERY_PAYMENTS_FOR_EXPORT {
payments(
where: { exportedat: { _eq: null } }
where: { exportedat: { _is_null: true } }
order_by: { created_at: desc }
) {
id

View File

@@ -371,6 +371,72 @@ export const QUERY_JOB_CARD_DETAILS = gql`
}
`;
export const QUERY_TECH_JOB_DETAILS = gql`
query QUERY_TECH_JOB_DETAILS($id: uuid!) {
jobs_by_pk(id: $id) {
ownr_fn
ownr_ln
v_model_yr
v_make_desc
v_model_desc
v_color
plate_no
actual_completion
actual_delivery
actual_in
est_number
id
ins_co_nm
clm_no
status
job_totals
area_of_damage
ro_number
scheduled_completion
scheduled_in
scheduled_delivery
date_invoiced
date_open
date_exported
date_closed
date_scheduled
date_estimated
joblines {
id
unq_seq
line_ind
tax_part
line_desc
prt_dsmk_p
prt_dsmk_m
part_type
oem_partno
db_price
act_price
part_qty
mod_lbr_ty
db_hrs
mod_lb_hrs
lbr_op
lbr_amt
op_code_desc
}
notes {
id
text
critical
private
created_at
}
updated_at
documents(order_by: { created_at: desc }) {
id
key
}
}
}
`;
export const UPDATE_JOB = gql`
mutation UPDATE_JOB($jobId: uuid!, $job: jobs_set_input!) {
update_jobs(where: { id: { _eq: $jobId } }, _set: $job) {

View File

@@ -46,3 +46,18 @@ export const UPDATE_TIME_TICKET = gql`
}
}
`;
export const QUERY_ACTIVE_TIME_TICKETS = gql`
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
timetickets(
where: {
_and: { clockoff: { _is_null: true }, employeeid: { _eq: $employeeId } }
}
) {
id
job {
ro_number
}
}
}
`;