diff --git a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx index 99e7b6c21..63c2df033 100644 --- a/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx +++ b/client/src/components/labor-allocations-table/labor-allocations-table.component.jsx @@ -5,6 +5,7 @@ import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; import { createStructuredSelector } from "reselect"; import { selectBodyshop } from "../../redux/user/user.selectors"; +import { selectTechnician } from "../../redux/tech/tech.selectors"; import { alphaSort } from "../../utils/sorters"; import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component"; import "./labor-allocations-table.styles.scss"; @@ -12,6 +13,7 @@ import { CalculateAllocationsTotals } from "./labor-allocations-table.utility"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, + technician: selectTechnician, }); export function LaborAllocationsTable({ @@ -20,6 +22,7 @@ export function LaborAllocationsTable({ timetickets, bodyshop, adjustments, + technician, }) { const { t } = useTranslation(); const [totals, setTotals] = useState([]); @@ -83,13 +86,15 @@ export function LaborAllocationsTable({ render: (text, record) => ( {record.adjustments.toFixed(1)} - - - + {!technician && ( + + + + )} ), }, diff --git a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx index a36c9a856..5a253c0d2 100644 --- a/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx +++ b/client/src/components/tech-job-clock-out-button/tech-job-clock-out-button.component.jsx @@ -1,5 +1,14 @@ import { useMutation } from "@apollo/client"; -import { Button, Card, Form, notification, Popover, Select } from "antd"; +import { + Button, + Card, + Col, + Form, + notification, + Popover, + Row, + Select, +} from "antd"; import axios from "axios"; import React, { useState } from "react"; import { useTranslation } from "react-i18next"; @@ -11,6 +20,7 @@ import { selectTechnician } from "../../redux/tech/tech.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors"; import InputNumberCalculator from "../form-input-number-calculator/form-input-number-calculator.component"; import TechJobClockoutDelete from "../tech-job-clock-out-delete/tech-job-clock-out-delete.component"; +import { LaborAllocationContainer } from "../time-ticket-modal/time-ticket-modal.component"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -20,6 +30,7 @@ const mapStateToProps = createStructuredSelector({ export function TechClockOffButton({ bodyshop, technician, + jobId, timeTicketId, completedCallback, isShiftTicket, @@ -34,8 +45,6 @@ export function TechClockOffButton({ (e) => e.id === (technician && technician.id) )[0]; - console.log(emps && emps.rates); - const handleFinish = async (values) => { logImEXEvent("tech_clock_out_job"); @@ -80,67 +89,77 @@ export function TechClockOffButton({ : null, }} > - {!isShiftTicket ? ( -
- - - - - - -
- ) : null} + + + {!isShiftTicket ? ( +
+ + + + + + +
+ ) : null} - - - - - + + + + + + + + {!isShiftTicket && ( + + + + )} +
diff --git a/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx b/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx index 63e82d82d..37742b55b 100644 --- a/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx +++ b/client/src/components/tech-job-clocked-in-list/tech-job-clocked-in-list.component.jsx @@ -67,6 +67,7 @@ export function TechClockedInList({ technician }) { } actions={[ , diff --git a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx index dce0e0456..c5e825649 100644 --- a/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx +++ b/client/src/components/time-ticket-modal/time-ticket-modal.component.jsx @@ -145,7 +145,7 @@ export default function TimeTicketModalComponent({ ); } -function LaborAllocationContainer({ jobid }) { +export function LaborAllocationContainer({ jobid }) { const { loading, data: lineTicketData } = useQuery(GET_LINE_TICKET_BY_PK, { variables: { id: jobid }, skip: !jobid, diff --git a/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx b/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx index b24576518..47e3d8f4c 100644 --- a/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx +++ b/client/src/components/time-ticket-shift-active/time-ticket-shift-active.component.jsx @@ -32,17 +32,20 @@ export default function TimeTicketShiftActive({ timetickets, refetch }) { title={t(ticket.memo)} actions={[ , - ]}> + ]} + > {ticket.clockon} - )}> + )} + > ) : null} diff --git a/client/src/graphql/timetickets.queries.js b/client/src/graphql/timetickets.queries.js index ae34bf326..3b85ddec0 100644 --- a/client/src/graphql/timetickets.queries.js +++ b/client/src/graphql/timetickets.queries.js @@ -10,6 +10,7 @@ export const QUERY_TICKETS_BY_JOBID = gql` productivehrs id memo + jobid employee { employee_number first_name @@ -116,9 +117,9 @@ export const QUERY_ACTIVE_TIME_TICKETS = gql` clockon memo cost_center + jobid job { id - ownr_fn ownr_ln ownr_co_nm @@ -146,9 +147,9 @@ export const QUERY_ACTIVE_SHIFT_TIME_TICKETS = gql` id clockon memo + jobid job { id - ownr_fn ownr_ln ownr_co_nm