diff --git a/client/src/components/job-detail-cards/job-detail-cards.component.jsx b/client/src/components/job-detail-cards/job-detail-cards.component.jsx
index 2cfb25e78..6a8cd0fb1 100644
--- a/client/src/components/job-detail-cards/job-detail-cards.component.jsx
+++ b/client/src/components/job-detail-cards/job-detail-cards.component.jsx
@@ -1,6 +1,6 @@
import { PrinterFilled } from "@ant-design/icons";
import { useQuery } from "@apollo/react-hooks";
-import { Button, Col, Drawer, Grid, PageHeader, Row, Tag } from "antd";
+import { Button, Col, Drawer, Grid, PageHeader, Row, Tag, Space } from "antd";
import queryString from "query-string";
import React from "react";
import { useTranslation } from "react-i18next";
@@ -75,20 +75,22 @@ export function JobDetailCards({ setPrintCenterContext }) {
visible={!!selected}
destroyOnClose
width={drawerPercentage}
- placement='right'
- onClose={handleDrawerClose}>
+ placement="right"
+ onClose={handleDrawerClose}
+ >
{loading ? : null}
- {error ? : null}
+ {error ? : null}
{data ? (
,
- ,
+ ,
+ ,
+ color="#f50"
+ key="production"
+ style={{ display: data.jobs_by_pk.inproduction ? "" : "none" }}
+ >
{t("jobs.labels.inproduction")}
,
]}
@@ -103,20 +105,27 @@ export function JobDetailCards({ setPrintCenterContext }) {
}
subTitle={data.jobs_by_pk.status}
extra={
-
- }>
+
+
+
+
+
+
+ }
+ >
}
- itemLayout='horizontal'
- dataSource={jobTickets}
- renderItem={(item) => {
+ itemLayout="horizontal"
+ //dataSource={jobTickets}
+ >
+ {jobTickets.map((item, idx) => {
+ const costCenters = item.tickets
+ .map((i) => i.cost_center)
+ .filter(onlyUnique);
+
+ console.log("costCenters", costCenters);
+
const actHrs = item.tickets.reduce(
(acc, val) => acc + val.actualhrs,
0
@@ -109,15 +117,19 @@ export function TimeTicketsSummaryEmployees({
return (
handlePrintEmployeeTicket(item.employee.id)}>
+ onClick={() => handlePrintEmployeeTicket(item.employee.id)}
+ >
{t("timetickets.actions.printemployee")}
,
- ]}>
+ ]}
+ >
);
- }}
- />
+ })}
+
{t("timetickets.labels.clockhours")}
}
- itemLayout='horizontal'
+ itemLayout="horizontal"
dataSource={shiftTickets}
renderItem={(item) => {
const clockHrs = item.tickets.reduce((acc, val) => {
@@ -169,10 +181,12 @@ export function TimeTicketsSummaryEmployees({
handlePrintEmployeeTicket(item.employee.id)}>
+ onClick={() => handlePrintEmployeeTicket(item.employee.id)}
+ >
{t("timetickets.actions.printemployee")}
,
- ]}>
+ ]}
+ >