Merged in feature/IO-3014-Timeticket-UI-Sort (pull request #1875)

IO-3014 TimeTicket UI Sort

Approved-by: Dave Richer
This commit is contained in:
Allan Carr
2024-10-31 17:54:36 +00:00
committed by Dave Richer
2 changed files with 3 additions and 6 deletions

View File

@@ -39,7 +39,7 @@ export function TimeTicketList({
extra extra
}) { }) {
const [state, setState] = useState({ const [state, setState] = useState({
sortedInfo: {}, sortedInfo: { columnKey: 'date', order: 'descend' },
filteredInfo: { text: "" } filteredInfo: { text: "" }
}); });

View File

@@ -2,7 +2,7 @@ import { gql } from "@apollo/client";
export const QUERY_TICKETS_BY_JOBID = gql` export const QUERY_TICKETS_BY_JOBID = gql`
query QUERY_TICKETS_BY_JOBID($jobid: uuid!) { query QUERY_TICKETS_BY_JOBID($jobid: uuid!) {
timetickets(where: { jobid: { _eq: $jobid } }, order_by: { date: desc_nulls_first }) { timetickets(where: { jobid: { _eq: $jobid } }) {
actualhrs actualhrs
cost_center cost_center
ciecacode ciecacode
@@ -26,7 +26,7 @@ export const QUERY_TICKETS_BY_JOBID = gql`
export const QUERY_TIME_TICKETS_IN_RANGE = gql` export const QUERY_TIME_TICKETS_IN_RANGE = gql`
query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) { query QUERY_TIME_TICKETS_IN_RANGE($start: date!, $end: date!) {
timetickets(where: { date: { _gte: $start, _lte: $end } }, order_by: { date: desc_nulls_first }) { timetickets(where: { date: { _gte: $start, _lte: $end } }) {
actualhrs actualhrs
ciecacode ciecacode
clockoff clockoff
@@ -69,7 +69,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
) { ) {
timetickets( timetickets(
where: { date: { _gte: $start, _lte: $end }, employeeid: { _eq: $employeeid } } where: { date: { _gte: $start, _lte: $end }, employeeid: { _eq: $employeeid } }
order_by: { date: desc_nulls_first }
) { ) {
actualhrs actualhrs
ciecacode ciecacode
@@ -101,7 +100,6 @@ export const QUERY_TIME_TICKETS_TECHNICIAN_IN_RANGE = gql`
} }
fixedperiod: timetickets( fixedperiod: timetickets(
where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, employeeid: { _eq: $employeeid } } where: { date: { _gte: $fixedStart, _lte: $fixedEnd }, employeeid: { _eq: $employeeid } }
order_by: { date: desc_nulls_first }
) { ) {
actualhrs actualhrs
ciecacode ciecacode
@@ -333,7 +331,6 @@ export const UPDATE_TIME_TICKETS = gql`
export const QUERY_ACTIVE_TIME_TICKETS = gql` export const QUERY_ACTIVE_TIME_TICKETS = gql`
query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) { query QUERY_ACTIVE_TIME_TICKETS($employeeId: uuid) {
timetickets( timetickets(
order_by: { date: desc_nulls_first }
where: { where: {
_and: { _and: {
clockoff: { _is_null: true } clockoff: { _is_null: true }