Merged in feature/2021-06-18 (pull request #110)

Feature/2021 06 18
This commit is contained in:
Patrick Fic
2021-06-16 19:09:02 +00:00
17 changed files with 526 additions and 104 deletions

View File

@@ -10689,6 +10689,27 @@
<folder_node> <folder_node>
<name>titles</name> <name>titles</name>
<children> <children>
<concept_node>
<name>monthlyemployeeefficiency</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node> <concept_node>
<name>monthlyjobcosting</name> <name>monthlyjobcosting</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -20772,6 +20793,69 @@
<folder_node> <folder_node>
<name>labels</name> <name>labels</name>
<children> <children>
<concept_node>
<name>actual_completion_inferred</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>actual_delivery_inferred</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node>
<name>actual_in_inferred</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node> <concept_node>
<name>additionaltotal</name> <name>additionaltotal</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>
@@ -21433,6 +21517,27 @@
</translation> </translation>
</translations> </translations>
</concept_node> </concept_node>
<concept_node>
<name>closejob</name>
<definition_loaded>false</definition_loaded>
<description></description>
<comment></comment>
<default_text></default_text>
<translations>
<translation>
<language>en-US</language>
<approved>false</approved>
</translation>
<translation>
<language>es-MX</language>
<approved>false</approved>
</translation>
<translation>
<language>fr-CA</language>
<approved>false</approved>
</translation>
</translations>
</concept_node>
<concept_node> <concept_node>
<name>contracts</name> <name>contracts</name>
<definition_loaded>false</definition_loaded> <definition_loaded>false</definition_loaded>

View File

@@ -1,17 +1,15 @@
import { useSubscription } from "@apollo/client"; import { useSubscription } from "@apollo/client";
import React from "react"; import React from "react";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { CONVERSATION_LIST_SUBSCRIPTION } from "../../graphql/conversations.queries"; import { CONVERSATION_LIST_SUBSCRIPTION } from "../../graphql/conversations.queries";
import { selectChatVisible } from "../../redux/messaging/messaging.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component"; import AlertComponent from "../alert/alert.component";
import LoadingSpinner from "../loading-spinner/loading-spinner.component"; import LoadingSpinner from "../loading-spinner/loading-spinner.component";
import ChatAffixComponent from "./chat-affix.component"; import ChatAffixComponent from "./chat-affix.component";
import { Affix } from "antd";
import "./chat-affix.styles.scss"; import "./chat-affix.styles.scss";
import { connect } from "react-redux";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import { selectChatVisible } from "../../redux/messaging/messaging.selectors";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
chatVisible: selectChatVisible, chatVisible: selectChatVisible,
@@ -31,22 +29,20 @@ export function ChatAffixContainer({ bodyshop, chatVisible }) {
if (!bodyshop || !bodyshop.messagingservicesid) return <></>; if (!bodyshop || !bodyshop.messagingservicesid) return <></>;
return ( return (
<Affix className={`chat-affix ${chatVisible ? "chat-affix-open" : ""}`}> <div className={`chat-affix ${chatVisible ? "chat-affix-open" : ""}`}>
<div> {bodyshop && bodyshop.messagingservicesid ? (
{bodyshop && bodyshop.messagingservicesid ? ( <ChatAffixComponent
<ChatAffixComponent conversationList={(data && data.conversations) || []}
conversationList={(data && data.conversations) || []} unreadCount={
unreadCount={ (data &&
(data && data.conversations.reduce((acc, val) => {
data.conversations.reduce((acc, val) => { return (acc = acc + val.messages_aggregate.aggregate.count);
return (acc = acc + val.messages_aggregate.aggregate.count); }, 0)) ||
}, 0)) || 0
0 }
} />
/> ) : null}
) : null} </div>
</div>
</Affix>
); );
} }
export default connect(mapStateToProps, null)(ChatAffixContainer); export default connect(mapStateToProps, null)(ChatAffixContainer);

View File

@@ -1,6 +1,11 @@
.chat-affix { .chat-affix {
position: absolute; position: fixed;
left: 2vw;
bottom: 2vh; bottom: 2vh;
z-index: 999;
-webkit-box-shadow: 0px 0px 2px 0px rgba(69, 69, 69, 1);
-moz-box-shadow: 0px 0px 2px 0px rgba(69, 69, 69, 1);
box-shadow: 0px 0px 2px 0px rgba(69, 69, 69, 1);
} }
.chat-affix-open { .chat-affix-open {

View File

@@ -0,0 +1,166 @@
import { Card } from "antd";
import _ from "lodash";
import moment from "moment";
import React from "react";
import { useTranslation } from "react-i18next";
import {
Bar,
CartesianGrid,
ComposedChart,
Legend,
Line,
ResponsiveContainer,
Tooltip,
XAxis,
YAxis,
} from "recharts";
import * as Utils from "../../scoreboard-targets-table/scoreboard-targets-table.util";
import DashboardRefreshRequired from "../refresh-required.component";
export default function DashboardMonthlyEmployeeEfficiency({
data,
...cardProps
}) {
const { t } = useTranslation();
if (!data) return null;
if (!data.monthly_employee_efficiency)
return <DashboardRefreshRequired {...cardProps} />;
const ticketsByDate = _.groupBy(data.monthly_employee_efficiency, (item) =>
moment(item.date).format("YYYY-MM-DD")
);
const listOfDays = Utils.ListOfDaysInCurrentMonth();
const chartData = listOfDays.reduce((acc, val) => {
//Sum up the current day.
let dailyHrs;
if (!!ticketsByDate[val]) {
dailyHrs = ticketsByDate[val].reduce(
(dayAcc, dayVal) => {
return {
actual: dayAcc.actual + dayVal.actualhrs,
productive: dayAcc.actual + dayVal.productivehrs,
};
},
{ actual: 0, productive: 0 }
);
} else {
dailyHrs = { actual: 0, productive: 0 };
}
const dailyEfficiency =
((dailyHrs.productive - dailyHrs.actual) / dailyHrs.productive + 1) * 100;
const theValue = {
date: moment(val).format("DD"),
...dailyHrs,
dailyEfficiency: isNaN(dailyEfficiency) ? 0 : dailyEfficiency.toFixed(1),
accActual:
acc.length > 0
? acc[acc.length - 1].accActual + dailyHrs.actual
: dailyHrs.actual,
accProductive:
acc.length > 0
? acc[acc.length - 1].accProductive + dailyHrs.productive
: dailyHrs.productive,
accEfficiency: 0,
};
theValue.accEfficiency = (
((theValue.accProductive - theValue.accActual) /
(theValue.accProductive || 1) +
1) *
100
).toFixed(1);
return [...acc, theValue];
}, []);
return (
<Card
title={t("dashboard.titles.monthlyemployeeefficiency")}
{...cardProps}
>
<div style={{ height: "100%" }}>
<ResponsiveContainer width="100%" height="100%">
<ComposedChart
data={chartData}
margin={{ top: 20, right: 20, bottom: 20, left: 20 }}
>
<CartesianGrid stroke="#f5f5f5" />
<XAxis dataKey="date" />
<YAxis
yAxisId="left"
orientation="left"
stroke="#8884d8"
unit=" hrs"
/>
<YAxis
yAxisId="right"
orientation="right"
stroke="#82ca9d"
unit="%"
/>
<Tooltip />
<Legend />
<Line
yAxisId="right"
name="Accumulated Efficiency"
type="monotone"
unit="%"
dataKey="accEfficiency"
stroke="#152228"
connectNulls
// activeDot={{ r: 8 }}
/>
<Line
name="Daily Efficiency"
yAxisId="right"
unit="%"
type="monotone"
connectNulls
dataKey="dailyEfficiency"
stroke="#d31717"
/>
<Bar
name="Actual Hours"
dataKey="actual"
yAxisId="left"
unit=" hrs"
//stackId="day"
barSize={20}
fill="#102568"
/>
<Bar
name="Productive Hours"
dataKey="productive"
yAxisId="left"
unit=" hrs"
//stackId="day"
barSize={20}
fill="#017664"
/>
</ComposedChart>
</ResponsiveContainer>
</div>
</Card>
);
}
export const DashboardMonthlyEmployeeEfficiencyGql = `
monthly_employee_efficiency: timetickets(where: {_and: [{date: {_gte: "${moment()
.startOf("month")
.format("YYYY-MM-DD")}"}},{date: {_lte: "${moment()
.endOf("month")
.format("YYYY-MM-DD")}"}} ]}) {
actualhrs
productivehrs
employeeid
employee {
first_name
last_name
}
date
}
`;

View File

@@ -42,11 +42,17 @@ export function DashboardTotalProductionHours({
return ( return (
<Card {...cardProps} title={t("dashboard.titles.prodhrssummary")}> <Card {...cardProps} title={t("dashboard.titles.prodhrssummary")}>
<Space wrap style={{ flex: 1 }}> <Space wrap style={{ flex: 1 }}>
<Statistic title={t("dashboard.labels.bodyhrs")} value={hours.body} /> <Statistic
<Statistic title={t("dashboard.labels.refhrs")} value={hours.ref} /> title={t("dashboard.labels.bodyhrs")}
value={hours.body.toFixed(1)}
/>
<Statistic
title={t("dashboard.labels.refhrs")}
value={hours.ref.toFixed(1)}
/>
<Statistic <Statistic
title={t("dashboard.labels.prodhrs")} title={t("dashboard.labels.prodhrs")}
value={hours.total} value={hours.total.toFixed(1)}
valueStyle={{ color: aboveTargetHours ? "green" : "red" }} valueStyle={{ color: aboveTargetHours ? "green" : "red" }}
/> />
</Space> </Space>

View File

@@ -1,6 +1,7 @@
import Icon, { SyncOutlined } from "@ant-design/icons"; import Icon, { SyncOutlined } from "@ant-design/icons";
import { gql, useMutation, useQuery } from "@apollo/client"; import { gql, useMutation, useQuery } from "@apollo/client";
import { Button, Dropdown, Menu, notification, PageHeader, Space } from "antd"; import { Button, Dropdown, Menu, notification, PageHeader, Space } from "antd";
import i18next from "i18next";
import _ from "lodash"; import _ from "lodash";
import moment from "moment"; import moment from "moment";
import React, { useState } from "react"; import React, { useState } from "react";
@@ -16,6 +17,9 @@ import {
selectCurrentUser, selectCurrentUser,
} from "../../redux/user/user.selectors"; } from "../../redux/user/user.selectors";
import AlertComponent from "../alert/alert.component"; import AlertComponent from "../alert/alert.component";
import DashboardMonthlyEmployeeEfficiency, {
DashboardMonthlyEmployeeEfficiencyGql,
} from "../dashboard-components/monthly-employee-efficiency/monthly-employee-efficiency.component";
import DashboardMonthlyJobCosting from "../dashboard-components/monthly-job-costing/monthly-job-costing.component"; import DashboardMonthlyJobCosting from "../dashboard-components/monthly-job-costing/monthly-job-costing.component";
import DashboardMonthlyLaborSales from "../dashboard-components/monthly-labor-sales/monthly-labor-sales.component"; import DashboardMonthlyLaborSales from "../dashboard-components/monthly-labor-sales/monthly-labor-sales.component";
import DashboardMonthlyPartsSales from "../dashboard-components/monthly-parts-sales/monthly-parts-sales.component"; import DashboardMonthlyPartsSales from "../dashboard-components/monthly-parts-sales/monthly-parts-sales.component";
@@ -195,7 +199,7 @@ export default connect(
const componentList = { const componentList = {
ProductionDollars: { ProductionDollars: {
label: "Production Dollars", label: i18next.t("dashboard.titles.productiondollars"),
component: DashboardTotalProductionDollars, component: DashboardTotalProductionDollars,
gqlFragment: null, gqlFragment: null,
w: 1, w: 1,
@@ -204,7 +208,7 @@ const componentList = {
minH: 1, minH: 1,
}, },
ProductionHours: { ProductionHours: {
label: "Production Hours", label: i18next.t("dashboard.titles.productionhours"),
component: DashboardTotalProductionHours, component: DashboardTotalProductionHours,
gqlFragment: DashboardTotalProductionHoursGql, gqlFragment: DashboardTotalProductionHoursGql,
w: 3, w: 3,
@@ -213,7 +217,7 @@ const componentList = {
minH: 1, minH: 1,
}, },
ProjectedMonthlySales: { ProjectedMonthlySales: {
label: "Projected Monthly Sales", label: i18next.t("dashboard.titles.projectedmonthlysales"),
component: DashboardProjectedMonthlySales, component: DashboardProjectedMonthlySales,
gqlFragment: DashboardProjectedMonthlySalesGql, gqlFragment: DashboardProjectedMonthlySalesGql,
w: 2, w: 2,
@@ -222,7 +226,7 @@ const componentList = {
minH: 1, minH: 1,
}, },
MonthlyRevenueGraph: { MonthlyRevenueGraph: {
label: "Monthly Sales Graph", label: i18next.t("dashboard.titles.monthlyrevenuegraph"),
component: DashboardMonthlyRevenueGraph, component: DashboardMonthlyRevenueGraph,
gqlFragment: DashboardMonthlyRevenueGraphGql, gqlFragment: DashboardMonthlyRevenueGraphGql,
w: 4, w: 4,
@@ -231,7 +235,7 @@ const componentList = {
minH: 2, minH: 2,
}, },
MonthlyJobCosting: { MonthlyJobCosting: {
label: "Monthly Job Costing", label: i18next.t("dashboard.titles.monthlyjobcosting"),
component: DashboardMonthlyJobCosting, component: DashboardMonthlyJobCosting,
gqlFragment: null, gqlFragment: null,
minW: 6, minW: 6,
@@ -240,7 +244,7 @@ const componentList = {
h: 3, h: 3,
}, },
MonthlyPartsSales: { MonthlyPartsSales: {
label: "Monthly Parts Sales", label: i18next.t("dashboard.titles.productiondollars"),
component: DashboardMonthlyPartsSales, component: DashboardMonthlyPartsSales,
gqlFragment: null, gqlFragment: null,
minW: 2, minW: 2,
@@ -249,7 +253,7 @@ const componentList = {
h: 2, h: 2,
}, },
MonthlyLaborSales: { MonthlyLaborSales: {
label: "Monthly Parts Sales", label: i18next.t("dashboard.titles.monthlypartssales"),
component: DashboardMonthlyLaborSales, component: DashboardMonthlyLaborSales,
gqlFragment: null, gqlFragment: null,
minW: 2, minW: 2,
@@ -257,6 +261,15 @@ const componentList = {
w: 2, w: 2,
h: 2, h: 2,
}, },
MonthlyEmployeeEfficency: {
label: i18next.t("dashboard.titles.monthlyemployeeefficiency"),
component: DashboardMonthlyEmployeeEfficiency,
gqlFragment: DashboardMonthlyEmployeeEfficiencyGql,
minW: 2,
minH: 2,
w: 2,
h: 2,
},
}; };
const createDashboardQuery = (state) => { const createDashboardQuery = (state) => {

View File

@@ -1,5 +1,4 @@
import Icon, { import Icon, {
FileAddOutlined,
BankFilled, BankFilled,
BarChartOutlined, BarChartOutlined,
CarFilled, CarFilled,
@@ -9,6 +8,7 @@ import Icon, {
ExportOutlined, ExportOutlined,
FieldTimeOutlined, FieldTimeOutlined,
FileAddFilled, FileAddFilled,
FileAddOutlined,
FileFilled, FileFilled,
GlobalOutlined, GlobalOutlined,
HomeFilled, HomeFilled,
@@ -85,7 +85,6 @@ function Header({
mode="horizontal" mode="horizontal"
//theme="light" //theme="light"
theme={"dark"} theme={"dark"}
style={{ flex: "auto" }}
selectedKeys={[selectedHeader]} selectedKeys={[selectedHeader]}
onClick={handleMenuClick} onClick={handleMenuClick}
subMenuCloseDelay={0.3} subMenuCloseDelay={0.3}
@@ -263,7 +262,6 @@ function Header({
{t("menus.header.temporarydocs")} {t("menus.header.temporarydocs")}
</Link> </Link>
</Menu.Item> </Menu.Item>
<Menu.SubMenu <Menu.SubMenu
key="shopsubmenu" key="shopsubmenu"
title={t("menus.header.shop")} title={t("menus.header.shop")}
@@ -300,7 +298,6 @@ function Header({
</Menu.Item> </Menu.Item>
</Menu.SubMenu> </Menu.SubMenu>
<Menu.SubMenu <Menu.SubMenu
style={{ float: "right" }}
key="user" key="user"
title={ title={
currentUser.displayName || currentUser.displayName ||
@@ -317,7 +314,9 @@ function Header({
window.open("https://help.imex.online/", "_blank"); window.open("https://help.imex.online/", "_blank");
}} }}
icon={<Icon component={QuestionCircleFilled} />} icon={<Icon component={QuestionCircleFilled} />}
/> >
{t("menus.header.help")}
</Menu.Item>
<Menu.Item <Menu.Item
key="rescue" key="rescue"
onClick={() => { onClick={() => {
@@ -352,12 +351,7 @@ function Header({
</Menu.Item> </Menu.Item>
</Menu.SubMenu> </Menu.SubMenu>
</Menu.SubMenu> </Menu.SubMenu>
<Menu.SubMenu key="recent" title={<ClockCircleFilled />}>
<Menu.SubMenu
key="recent"
style={{ float: "right" }}
title={<ClockCircleFilled />}
>
{recentItems.map((i, idx) => ( {recentItems.map((i, idx) => (
<Menu.Item key={idx}> <Menu.Item key={idx}>
<Link to={i.url}>{i.label}</Link> <Link to={i.url}>{i.label}</Link>

View File

@@ -1,4 +1,4 @@
import { Collapse, Form, Input, Select, Switch } from "antd"; import { Collapse, Form, Input, InputNumber, Select, Switch } from "antd";
import React from "react"; import React from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
@@ -240,6 +240,26 @@ export function JobsCreateJobsInfo({ bodyshop, form, selected }) {
<CurrencyInput /> <CurrencyInput />
</Form.Item> </Form.Item>
</LayoutFormRow> </LayoutFormRow>
<LayoutFormRow>
<Form.Item
label={t("jobs.fields.federal_tax_rate")}
name="federal_tax_rate"
>
<InputNumber min={0} max={1} precision={2} />
</Form.Item>
<Form.Item
label={t("jobs.fields.state_tax_rate")}
name="state_tax_rate"
>
<InputNumber min={0} max={1} precision={2} />
</Form.Item>
<Form.Item
label={t("jobs.fields.local_tax_rate")}
name="local_tax_rate"
>
<InputNumber min={0} max={1} precision={2} />
</Form.Item>
</LayoutFormRow>
<LayoutFormRow> <LayoutFormRow>
<Form.Item label={t("jobs.fields.rate_lab")} name="rate_lab"> <Form.Item label={t("jobs.fields.rate_lab")} name="rate_lab">
<CurrencyInput /> <CurrencyInput />

View File

@@ -53,7 +53,7 @@ export function ScheduleCalendarHeaderGraph({ bodyshop, loadData }) {
name="Ideal Load" name="Ideal Load"
dataKey="target" dataKey="target"
stroke="darkgreen" stroke="darkgreen"
fill="whitr" fill="white"
fillOpacity={0} fillOpacity={0}
/> />
<Radar <Radar

View File

@@ -1696,6 +1696,12 @@ export const QUERY_JOB_CLOSE_DETAILS = gql`
date_exported date_exported
date_invoiced date_invoiced
voided voided
scheduled_completion
actual_completion
scheduled_delivery
actual_delivery
scheduled_in
actual_in
joblines(where: { removed: { _eq: false } }) { joblines(where: { removed: { _eq: false } }) {
id id
removed removed

View File

@@ -1,5 +1,14 @@
import { useApolloClient, useMutation } from "@apollo/client"; import { useApolloClient, useMutation } from "@apollo/client";
import { Button, Form, notification, Popconfirm, Space } from "antd"; import {
Button,
Form,
notification,
Popconfirm,
Space,
Alert,
Divider,
PageHeader,
} from "antd";
import React, { useState } from "react"; import React, { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { connect } from "react-redux"; import { connect } from "react-redux";
@@ -13,6 +22,9 @@ import { generateJobLinesUpdatesForInvoicing } from "../../graphql/jobs-lines.qu
import { UPDATE_JOB } from "../../graphql/jobs.queries"; import { UPDATE_JOB } from "../../graphql/jobs.queries";
import { selectJobReadOnly } from "../../redux/application/application.selectors"; import { selectJobReadOnly } from "../../redux/application/application.selectors";
import { selectBodyshop } from "../../redux/user/user.selectors"; import { selectBodyshop } from "../../redux/user/user.selectors";
import LayoutFormRow from "../../components/layout-form-row/layout-form-row.component";
import DateTimePicker from "../../components/form-date-time-picker/form-date-time-picker.component";
import moment from "moment";
const mapStateToProps = createStructuredSelector({ const mapStateToProps = createStructuredSelector({
bodyshop: selectBodyshop, bodyshop: selectBodyshop,
jobRO: selectJobReadOnly, jobRO: selectJobReadOnly,
@@ -82,31 +94,110 @@ export function JobsCloseComponent({ job, bodyshop, jobRO }) {
layout="vertical" layout="vertical"
form={form} form={form}
onFinish={handleFinish} onFinish={handleFinish}
initialValues={{ joblines: job.joblines }} initialValues={{
joblines: job.joblines,
actual_in: job.actual_in
? moment(job.actual_in)
: job.scheduled_in && moment(job.scheduled_in),
actual_completion: job.actual_completion
? moment(job.actual_completion)
: job.scheduled_completion && moment(job.scheduled_completion),
actual_delivery: job.actual_delivery
? moment(job.actual_delivery)
: job.scheduled_delivery && moment(job.scheduled_delivery),
}}
scrollToFirstError scrollToFirstError
> >
<Space> <PageHeader
<JobsCloseAutoAllocate title={t("jobs.labels.closejob", { ro_number: job.ro_number })}
joblines={job.joblines} extra={
form={form} <Space>
disabled={!!job.date_exported || jobRO} <JobsCloseAutoAllocate
/> joblines={job.joblines}
form={form}
disabled={!!job.date_exported || jobRO}
/>
<Popconfirm <Popconfirm
onConfirm={() => form.submit()} onConfirm={() => form.submit()}
disabled={jobRO} disabled={jobRO}
okText={t("general.labels.yes")} okText={t("general.labels.yes")}
cancelText={t("general.labels.no")} cancelText={t("general.labels.no")}
title={t("jobs.labels.closeconfirm")} title={t("jobs.labels.closeconfirm")}
> >
<Button loading={loading} type="danger" disabled={jobRO}> <Button loading={loading} type="danger" disabled={jobRO}>
{t("general.actions.close")} {t("general.actions.close")}
</Button> </Button>
</Popconfirm> </Popconfirm>
<JobsScoreboardAdd job={job} disabled={false} /> <JobsScoreboardAdd job={job} disabled={false} />
</Space>
}
/>
<Space wrap direction="vertical">
<FormsFieldChanged form={form} />
{!job.actual_in && job.scheduled_in && (
<Alert
type="warning"
message={t("jobs.labels.actual_in_inferred")}
/>
)}
{!job.actual_completion && job.scheduled_completion && (
<Alert
type="warning"
message={t("jobs.labels.actual_completion_inferred")}
/>
)}
{!job.actual_delivery && job.scheduled_delivery && (
<Alert
type="warning"
message={t("jobs.labels.actual_delivery_inferred")}
/>
)}
</Space> </Space>
<FormsFieldChanged form={form} /> <LayoutFormRow>
<Form.Item
label={t("jobs.fields.actual_in")}
rules={[
{
required: true,
},
]}
name="actual_in"
>
<DateTimePicker disabled={jobRO} />
</Form.Item>
<Form.Item shouldUpdate>
{() => {
return (
<Form.Item
label={t("jobs.fields.actual_completion")}
name="actual_completion"
rules={[
{
required: true,
},
]}
>
<DateTimePicker disabled={jobRO} />
</Form.Item>
);
}}
</Form.Item>
<Form.Item
label={t("jobs.fields.actual_delivery")}
name="actual_delivery"
rules={[
{
required: true,
},
]}
>
<DateTimePicker disabled={jobRO} />
</Form.Item>
</LayoutFormRow>
<Divider />
<JobsCloseLines job={job} /> <JobsCloseLines job={job} />
</Form> </Form>
</div> </div>

View File

@@ -162,6 +162,9 @@ function JobsCreateContainer({ bodyshop, setBreadcrumbs, setSelectedHeader }) {
tax_sub_rt: bodyshop.bill_tax_rates.state_tax_rate / 100, tax_sub_rt: bodyshop.bill_tax_rates.state_tax_rate / 100,
tax_lbr_rt: bodyshop.bill_tax_rates.state_tax_rate / 100, tax_lbr_rt: bodyshop.bill_tax_rates.state_tax_rate / 100,
tax_levies_rt: bodyshop.bill_tax_rates.state_tax_rate / 100, tax_levies_rt: bodyshop.bill_tax_rates.state_tax_rate / 100,
federal_tax_rate: bodyshop.bill_tax_rates.federal_tax_rate / 100,
state_tax_rate: bodyshop.bill_tax_rates.state_tax_rate / 100,
local_tax_rate: bodyshop.bill_tax_rates.local_tax_rate / 100,
parts_tax_rates: { parts_tax_rates: {
PAA: { PAA: {
prt_type: "PAA", prt_type: "PAA",

View File

@@ -378,41 +378,43 @@ export function Manage({ match, conflict, bodyshop }) {
else PageContent = AppRouteTable; else PageContent = AppRouteTable;
return ( return (
<Layout className="layout-container"> <>
<HeaderContainer /> <ChatAffixContainer />
<Layout className="layout-container">
<HeaderContainer />
<Content className="content-container"> <Content className="content-container">
<FcmNotification /> <FcmNotification />
<PartnerPingComponent /> <PartnerPingComponent />
<ErrorBoundary>{PageContent}</ErrorBoundary> <ErrorBoundary>{PageContent}</ErrorBoundary>
<ChatAffixContainer /> <BackTop />
<BackTop /> <Footer>
<Footer> <div
<div style={{
style={{ display: "flex",
display: "flex", flexDirection: "column",
flexDirection: "column", justifyContent: "center",
justifyContent: "center", alignItems: "center",
alignItems: "center", margin: "1rem 0rem",
margin: "1rem 0rem", }}
}} >
> <div style={{ display: "flex" }}>
<div style={{ display: "flex" }}> <div>
<div> {`ImEX Online ${
{`ImEX Online ${ process.env.REACT_APP_GIT_SHA
process.env.REACT_APP_GIT_SHA } - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`}
} - ${preval`module.exports = new Date().toLocaleString("en-US", {timeZone: "America/Los_Angeles"});`}`} </div>
<div id="noticeable-widget" style={{ marginLeft: "1rem" }} />
</div> </div>
<div id="noticeable-widget" style={{ marginLeft: "1rem" }} /> <Link to="/about" target="_blank" style={{ color: "#ccc" }}>
Disclaimer & Notices
</Link>
<JiraSupportComponent />
</div> </div>
<Link to="/about" target="_blank" style={{ color: "#ccc" }}> </Footer>
Disclaimer </Content>
</Link> </Layout>
<JiraSupportComponent /> </>
</div>
</Footer>
</Content>
</Layout>
); );
} }
export default connect(mapStateToProps, null)(Manage); export default connect(mapStateToProps, null)(Manage);

View File

@@ -3,6 +3,6 @@
} }
.layout-container { .layout-container {
height: 100vh; // height: 100vh;
overflow-y: auto; // overflow-y: auto;
} }

View File

@@ -674,18 +674,19 @@
}, },
"labels": { "labels": {
"bodyhrs": "Body Hrs", "bodyhrs": "Body Hrs",
"dollarsinproduction": "Dollars in Production'", "dollarsinproduction": "Dollars in Production",
"prodhrs": "Production Hrs", "prodhrs": "Production Hrs",
"refhrs": "Refinish Hrs" "refhrs": "Refinish Hrs"
}, },
"titles": { "titles": {
"monthlyemployeeefficiency": "Monthly Employee Efficiency",
"monthlyjobcosting": "Monthly Job Costing ", "monthlyjobcosting": "Monthly Job Costing ",
"monthlylaborsales": "Monthly Labor Sales", "monthlylaborsales": "Monthly Labor Sales",
"monthlypartssales": "Monthly Parts Sales", "monthlypartssales": "Monthly Parts Sales",
"monthlyrevenuegraph": "Monthly Revenue Graph", "monthlyrevenuegraph": "Monthly Revenue Graph",
"prodhrssummary": "Production Hours Summary", "prodhrssummary": "Production Hours Summary",
"productiondollars": "Total dollars in production", "productiondollars": "Total dollars in Production",
"productionhours": "Total hours in production", "productionhours": "Total hours in Production",
"projectedmonthlysales": "Projected Monthly Sales" "projectedmonthlysales": "Projected Monthly Sales"
} }
}, },
@@ -1249,6 +1250,9 @@
"scheddates": "Schedule Dates" "scheddates": "Schedule Dates"
}, },
"labels": { "labels": {
"actual_completion_inferred": "$t(jobs.fields.actual_completion) inferred using $t(jobs.fields.scheduled_completion).",
"actual_delivery_inferred": "$t(jobs.fields.actual_delivery) inferred using $t(jobs.fields.scheduled_delivery).",
"actual_in_inferred": "$t(jobs.fields.actual_in) inferred using $t(jobs.fields.scheduled_in).",
"additionaltotal": "Additional Total", "additionaltotal": "Additional Total",
"adjustmentrate": "Adjustment Rate", "adjustmentrate": "Adjustment Rate",
"adjustments": "Adjustments", "adjustments": "Adjustments",
@@ -1284,6 +1288,7 @@
"checklistdocuments": "Checklist Documents", "checklistdocuments": "Checklist Documents",
"checklists": "Checklists", "checklists": "Checklists",
"closeconfirm": "Are you sure you want to close this job? This cannot be easily undone.", "closeconfirm": "Are you sure you want to close this job? This cannot be easily undone.",
"closejob": "Close Job {{ro_number}}",
"contracts": "CC Contracts", "contracts": "CC Contracts",
"cost": "Cost", "cost": "Cost",
"cost_labor": "Cost - Labor", "cost_labor": "Cost - Labor",

View File

@@ -679,6 +679,7 @@
"refhrs": "" "refhrs": ""
}, },
"titles": { "titles": {
"monthlyemployeeefficiency": "",
"monthlyjobcosting": "", "monthlyjobcosting": "",
"monthlylaborsales": "", "monthlylaborsales": "",
"monthlypartssales": "", "monthlypartssales": "",
@@ -1249,6 +1250,9 @@
"scheddates": "" "scheddates": ""
}, },
"labels": { "labels": {
"actual_completion_inferred": "",
"actual_delivery_inferred": "",
"actual_in_inferred": "",
"additionaltotal": "", "additionaltotal": "",
"adjustmentrate": "", "adjustmentrate": "",
"adjustments": "", "adjustments": "",
@@ -1284,6 +1288,7 @@
"checklistdocuments": "", "checklistdocuments": "",
"checklists": "", "checklists": "",
"closeconfirm": "", "closeconfirm": "",
"closejob": "",
"contracts": "", "contracts": "",
"cost": "", "cost": "",
"cost_labor": "", "cost_labor": "",

View File

@@ -679,6 +679,7 @@
"refhrs": "" "refhrs": ""
}, },
"titles": { "titles": {
"monthlyemployeeefficiency": "",
"monthlyjobcosting": "", "monthlyjobcosting": "",
"monthlylaborsales": "", "monthlylaborsales": "",
"monthlypartssales": "", "monthlypartssales": "",
@@ -1249,6 +1250,9 @@
"scheddates": "" "scheddates": ""
}, },
"labels": { "labels": {
"actual_completion_inferred": "",
"actual_delivery_inferred": "",
"actual_in_inferred": "",
"additionaltotal": "", "additionaltotal": "",
"adjustmentrate": "", "adjustmentrate": "",
"adjustments": "", "adjustments": "",
@@ -1284,6 +1288,7 @@
"checklistdocuments": "", "checklistdocuments": "",
"checklists": "", "checklists": "",
"closeconfirm": "", "closeconfirm": "",
"closejob": "",
"contracts": "", "contracts": "",
"cost": "", "cost": "",
"cost_labor": "", "cost_labor": "",