import gql from "graphql-tag";

export const REPORTING_GET_JOBS = gql`
  query REPORTING_GET_JOBS($startDate: date, $endDate: date) {
    jobs(
      where: {
        _and: [
          { close_date: { _gte: $startDate } }
          { close_date: { _lte: $endDate } }
          { close_date: { _is_null: false } }
        ]
      }
    ) {
      ownr_ln
      ownr_fn
      ins_co_nm
      group
      group_verified
      sgi_rcc
      clm_total
      clm_no
      close_date
      id
      loss_date
      updated_at
      created_at
      v_age
      v_makedesc
      v_model
      v_model_yr
      v_vin
      v_type
      requires_reimport
      v_mileage
      joblines {
        act_price
        db_price
        part_qty
        part_type
        price_diff
        price_diff_pc
        updated_at
        oem_partno
        line_no
        line_ind
        line_desc
        ignore
        id
        db_ref
        unq_seq
        alerts
      }
    }
  }
`;
