IO-1043 Date sort fixes.

This commit is contained in:
Patrick Fic
2021-05-07 15:05:51 -07:00
parent c6f2aaeca6
commit cc541293eb
5 changed files with 28 additions and 9 deletions

View File

@@ -2,7 +2,10 @@ import { gql } from "@apollo/client";
export const QUERY_TICKETS_BY_JOBID = gql`
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
timetickets(where: { jobid: { _eq: $jobid } }) {
timetickets(
where: { jobid: { _eq: $jobid } }
order_by: { date: desc_nulls_first }
) {
actualhrs
cost_center
ciecacode
@@ -104,6 +107,7 @@ export const UPDATE_TIME_TICKET = gql`
export const QUERY_ACTIVE_TIME_TICKETS = gql`
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
timetickets(
order_by: { date: desc_nulls_first }
where: {
_and: {
clockoff: { _is_null: true }