IO-1224 IO-1297 IO-1298 Adjust decimal place displays in various locations
This commit is contained in:
@@ -10,7 +10,7 @@ import { alphaSort } from "../../utils/sorters";
|
|||||||
import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component";
|
import LaborAllocationsAdjustmentEdit from "../labor-allocations-adjustment-edit/labor-allocations-adjustment-edit.component";
|
||||||
import "./labor-allocations-table.styles.scss";
|
import "./labor-allocations-table.styles.scss";
|
||||||
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
|
import { CalculateAllocationsTotals } from "./labor-allocations-table.utility";
|
||||||
|
import _ from "lodash";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
technician: selectTechnician,
|
technician: selectTechnician,
|
||||||
@@ -113,7 +113,7 @@ export function LaborAllocationsTable({
|
|||||||
color: record.difference >= 0 ? "green" : "red",
|
color: record.difference >= 0 ? "green" : "red",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{record.difference}
|
{_.round(record.difference, 1)}
|
||||||
</strong>
|
</strong>
|
||||||
),
|
),
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import {
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
import * as Utils from "../scoreboard-targets-table/scoreboard-targets-table.util";
|
||||||
|
import _ from "lodash";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
});
|
});
|
||||||
@@ -52,17 +52,20 @@ export function ScoreboardChart({ sbEntriesByDate, bodyshop }) {
|
|||||||
|
|
||||||
const theValue = {
|
const theValue = {
|
||||||
date: moment(val).format("D dd"),
|
date: moment(val).format("D dd"),
|
||||||
paintHrs: dayhrs.painthrs,
|
paintHrs: _.round(dayhrs.painthrs, 1),
|
||||||
bodyHrs: dayhrs.bodyhrs,
|
bodyHrs: _.round(dayhrs.bodyhrs),
|
||||||
accTargetHrs: Utils.AsOfDateTargetHours(
|
accTargetHrs: _.round(
|
||||||
bodyshop.scoreboard_target.dailyBodyTarget +
|
Utils.AsOfDateTargetHours(
|
||||||
bodyshop.scoreboard_target.dailyPaintTarget,
|
bodyshop.scoreboard_target.dailyBodyTarget +
|
||||||
val
|
bodyshop.scoreboard_target.dailyPaintTarget,
|
||||||
|
val
|
||||||
|
)
|
||||||
),
|
),
|
||||||
accHrs:
|
accHrs: _.round(
|
||||||
acc.length > 0
|
acc.length > 0
|
||||||
? acc[acc.length - 1].accHrs + dayhrs.painthrs + dayhrs.bodyhrs
|
? acc[acc.length - 1].accHrs + dayhrs.painthrs + dayhrs.bodyhrs
|
||||||
: dayhrs.painthrs + dayhrs.bodyhrs,
|
: dayhrs.painthrs + dayhrs.bodyhrs
|
||||||
|
),
|
||||||
};
|
};
|
||||||
|
|
||||||
return [...acc, theValue];
|
return [...acc, theValue];
|
||||||
|
|||||||
@@ -40,17 +40,21 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
|
|
||||||
const [costOptions, setCostOptions] = useState(
|
const [costOptions, setCostOptions] = useState(
|
||||||
[
|
[
|
||||||
...(form
|
...((form.getFieldValue(["md_responsibility_centers", "costs"]) &&
|
||||||
.getFieldValue(["md_responsibility_centers", "costs"])
|
form
|
||||||
.map((i) => i && i.name) || []),
|
.getFieldValue(["md_responsibility_centers", "costs"])
|
||||||
|
.map((i) => i && i.name)) ||
|
||||||
|
[]),
|
||||||
] || []
|
] || []
|
||||||
);
|
);
|
||||||
|
|
||||||
const [profitOptions, setProfitOptions] = useState(
|
const [profitOptions, setProfitOptions] = useState(
|
||||||
[
|
[
|
||||||
...(form
|
...((form.getFieldValue(["md_responsibility_centers", "profits"]) &&
|
||||||
.getFieldValue(["md_responsibility_centers", "profits"])
|
form
|
||||||
.map((i) => i && i.name) || []),
|
.getFieldValue(["md_responsibility_centers", "profits"])
|
||||||
|
.map((i) => i && i.name)) ||
|
||||||
|
[]),
|
||||||
] || []
|
] || []
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import RbacWrapper, {
|
|||||||
} from "../rbac-wrapper/rbac-wrapper.component";
|
} from "../rbac-wrapper/rbac-wrapper.component";
|
||||||
import TimeTicketEnterButton from "../time-ticket-enter-button/time-ticket-enter-button.component";
|
import TimeTicketEnterButton from "../time-ticket-enter-button/time-ticket-enter-button.component";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
|
import _ from "lodash";
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
authLevel: selectAuthLevel,
|
authLevel: selectAuthLevel,
|
||||||
@@ -268,8 +268,12 @@ export function TimeTicketList({
|
|||||||
<Table.Summary.Cell />
|
<Table.Summary.Cell />
|
||||||
<Table.Summary.Cell />
|
<Table.Summary.Cell />
|
||||||
<Table.Summary.Cell />
|
<Table.Summary.Cell />
|
||||||
<Table.Summary.Cell>{totals.productivehrs}</Table.Summary.Cell>
|
<Table.Summary.Cell>
|
||||||
<Table.Summary.Cell>{totals.actualhrs}</Table.Summary.Cell>
|
{_.round(totals.productivehrs, 1)}
|
||||||
|
</Table.Summary.Cell>
|
||||||
|
<Table.Summary.Cell>
|
||||||
|
{_.round(totals.actualhrs, 1)}
|
||||||
|
</Table.Summary.Cell>
|
||||||
<Table.Summary.Cell>
|
<Table.Summary.Cell>
|
||||||
{totals.actualhrs === 0 || !totals.actualhrs
|
{totals.actualhrs === 0 || !totals.actualhrs
|
||||||
? "∞"
|
? "∞"
|
||||||
|
|||||||
Reference in New Issue
Block a user