Added job login and log off functionality. BOD-183
This commit is contained in:
@@ -3,19 +3,23 @@ import LaborAllocationsTableComponent from "../labor-allocations-table/labor-all
|
||||
import TimeTicketEnterButton from "../time-ticket-enter-button/time-ticket-enter-button.component";
|
||||
import TimeTicketList from "../time-ticket-list/time-ticket-list.component";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function JobsDetailLaborContainer({
|
||||
jobId,
|
||||
joblines,
|
||||
timetickets,
|
||||
refetch,
|
||||
loading,
|
||||
techConsole,
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
return (
|
||||
<div>
|
||||
<TimeTicketEnterButton actions={{ refetch }} context={{ jobId: jobId }}>
|
||||
{t("timetickets.actions.enter")}
|
||||
</TimeTicketEnterButton>
|
||||
{techConsole ? null : (
|
||||
<TimeTicketEnterButton actions={{ refetch }} context={{ jobId: jobId }}>
|
||||
{t("timetickets.actions.enter")}
|
||||
</TimeTicketEnterButton>
|
||||
)}
|
||||
<LaborAllocationsTableComponent
|
||||
joblines={joblines}
|
||||
timetickets={timetickets}
|
||||
@@ -24,6 +28,7 @@ export default function JobsDetailLaborContainer({
|
||||
loading={loading}
|
||||
timetickets={timetickets}
|
||||
refetch={refetch}
|
||||
techConsole={techConsole}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -4,7 +4,7 @@ import { GET_LINE_TICKET_BY_PK } from "../../graphql/jobs-lines.queries";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import JobsDetailLaborComponent from "./jobs-detail-labor.component";
|
||||
|
||||
export default function JobsDetailLaborContainer({ jobId }) {
|
||||
export default function JobsDetailLaborContainer({ jobId, techConsole }) {
|
||||
const { loading, error, data, refetch } = useQuery(GET_LINE_TICKET_BY_PK, {
|
||||
variables: { id: jobId },
|
||||
skip: !!!jobId,
|
||||
@@ -19,6 +19,7 @@ export default function JobsDetailLaborContainer({ jobId }) {
|
||||
timetickets={data ? data.timetickets : []}
|
||||
joblines={data ? data.joblines : []}
|
||||
refetch={refetch}
|
||||
techConsole={techConsole}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user