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