Added order parts link to job drawer BOD-210
This commit is contained in:
@@ -10,6 +10,7 @@ import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import { connect } from "react-redux";
|
||||
import { createStructuredSelector } from "reselect";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import { onlyUnique } from "../../utils/arrayHelper";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop,
|
||||
@@ -85,9 +86,16 @@ export function TimeTicketsSummaryEmployees({
|
||||
{t("timetickets.labels.jobhours")}
|
||||
</Typography.Title>
|
||||
}
|
||||
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 (
|
||||
<List.Item
|
||||
key={idx}
|
||||
actions={[
|
||||
<Button
|
||||
onClick={() => handlePrintEmployeeTicket(item.employee.id)}>
|
||||
onClick={() => handlePrintEmployeeTicket(item.employee.id)}
|
||||
>
|
||||
{t("timetickets.actions.printemployee")}
|
||||
</Button>,
|
||||
]}>
|
||||
]}
|
||||
>
|
||||
<LoadingSkeleton loading={loading}>
|
||||
<List.Item.Meta
|
||||
title={`${item.employee.first_name} ${item.employee.last_name}`}
|
||||
description="cost center?"
|
||||
/>
|
||||
<Space>
|
||||
<Statistic
|
||||
@@ -145,15 +157,15 @@ export function TimeTicketsSummaryEmployees({
|
||||
</LoadingSkeleton>
|
||||
</List.Item>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
})}
|
||||
</List>
|
||||
<List
|
||||
header={
|
||||
<Typography.Title level={3}>
|
||||
{t("timetickets.labels.clockhours")}
|
||||
</Typography.Title>
|
||||
}
|
||||
itemLayout='horizontal'
|
||||
itemLayout="horizontal"
|
||||
dataSource={shiftTickets}
|
||||
renderItem={(item) => {
|
||||
const clockHrs = item.tickets.reduce((acc, val) => {
|
||||
@@ -169,10 +181,12 @@ export function TimeTicketsSummaryEmployees({
|
||||
<List.Item
|
||||
actions={[
|
||||
<Button
|
||||
onClick={() => handlePrintEmployeeTicket(item.employee.id)}>
|
||||
onClick={() => handlePrintEmployeeTicket(item.employee.id)}
|
||||
>
|
||||
{t("timetickets.actions.printemployee")}
|
||||
</Button>,
|
||||
]}>
|
||||
]}
|
||||
>
|
||||
<LoadingSkeleton loading={loading}>
|
||||
<List.Item.Meta
|
||||
title={`${item.employee.first_name} ${item.employee.last_name}`}
|
||||
|
||||
Reference in New Issue
Block a user