Merged in release/2021-11-19 (pull request #267)
release/2021-11-19 Approved-by: Patrick Fic
This commit is contained in:
@@ -34961,6 +34961,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ats</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>bodyhours</name>
|
<name>bodyhours</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -35024,6 +35045,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>clm_no</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>compact</name>
|
<name>compact</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -35108,6 +35150,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ins_co_nm</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>jobdetail</name>
|
<name>jobdetail</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -35171,6 +35234,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>ownr_nm</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>paintpriority</name>
|
<name>paintpriority</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -35192,6 +35276,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>production_note</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>refinishhours</name>
|
<name>refinishhours</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -35213,6 +35318,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>scheduled_completion</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>selectview</name>
|
<name>selectview</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { WarningFilled } from "@ant-design/icons";
|
import { WarningFilled } from "@ant-design/icons";
|
||||||
import { Form, Input, InputNumber, Space } from "antd";
|
import { Form, Input, InputNumber, Space, Switch } from "antd";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
@@ -42,7 +42,6 @@ export default function ContractFormComponent({
|
|||||||
<ContractStatusSelector />
|
<ContractStatusSelector />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("contracts.fields.start")}
|
label={t("contracts.fields.start")}
|
||||||
name="start"
|
name="start"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { EyeFilled, CalendarOutlined } from "@ant-design/icons";
|
import { CalendarOutlined, EyeFilled } from "@ant-design/icons";
|
||||||
import { Card, Col, Row, Space, Typography } from "antd";
|
import { Card, Col, Row, Space } from "antd";
|
||||||
import React, { useState } from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
@@ -16,8 +16,8 @@ export default function ProductionBoardCard(
|
|||||||
cardSettings
|
cardSettings
|
||||||
) {
|
) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [flipped, setFlipped] = useState(false);
|
|
||||||
let employee_body, employee_prep, employee_refinish, employee_csr;
|
let employee_body, employee_prep, employee_refinish; //employee_csr;
|
||||||
if (card.employee_body) {
|
if (card.employee_body) {
|
||||||
employee_body = bodyshop.employees.find((e) => e.id === card.employee_body);
|
employee_body = bodyshop.employees.find((e) => e.id === card.employee_body);
|
||||||
}
|
}
|
||||||
@@ -29,125 +29,36 @@ export default function ProductionBoardCard(
|
|||||||
(e) => e.id === card.employee_refinish
|
(e) => e.id === card.employee_refinish
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (card.employee_csr) {
|
// if (card.employee_csr) {
|
||||||
employee_csr = bodyshop.employees.find((e) => e.id === card.employee_csr);
|
// employee_csr = bodyshop.employees.find((e) => e.id === card.employee_csr);
|
||||||
}
|
// }
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
className="react-kanban-card imex-kanban-card tight-antd-rows"
|
className="react-kanban-card imex-kanban-card"
|
||||||
onDoubleClick={() => setFlipped(!flipped)}
|
size="small"
|
||||||
>
|
title={
|
||||||
<div style={{ display: "flex" }}>
|
<Space>
|
||||||
<span style={{ fontWeight: "bold", flex: 1 }}>
|
<ProductionAlert record={card} key="alert" />
|
||||||
{card.ro_number || t("general.labels.na")}
|
<span style={{ fontWeight: "bolder" }}>
|
||||||
</span>
|
{card.ro_number || t("general.labels.na")}
|
||||||
<Space size="small" align="start">
|
</span>
|
||||||
{cardSettings && cardSettings.alert && (
|
|
||||||
<ProductionAlert record={card} key="alert" />
|
|
||||||
)}
|
|
||||||
{technician ? (
|
|
||||||
<Link to={`/tech/joblookup?selected=${card.id}`}>
|
|
||||||
<EyeFilled />
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
<Link to={`/manage/jobs/${card.id}`}>
|
|
||||||
<EyeFilled />
|
|
||||||
</Link>
|
|
||||||
)}
|
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
}
|
||||||
{flipped ? (
|
extra={
|
||||||
<Row>
|
technician ? (
|
||||||
{cardSettings && cardSettings.clm_no === "back" && (
|
<Link to={`/tech/joblookup?selected=${card.id}`}>
|
||||||
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
<EyeFilled />
|
||||||
<div className="ellipses">{card.clm_no || ""}</div>
|
</Link>
|
||||||
</Col>
|
) : (
|
||||||
)}
|
<Link to={`/manage/jobs/${card.id}`}>
|
||||||
{cardSettings && cardSettings.ins_co_nm === "back" && (
|
<EyeFilled />
|
||||||
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
</Link>
|
||||||
<div className="ellipses">{card.ins_co_nm || ""}</div>
|
)
|
||||||
</Col>
|
}
|
||||||
)}
|
>
|
||||||
{cardSettings && cardSettings.laborhrs === "back" && (
|
<Row>
|
||||||
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
{cardSettings && cardSettings.ownr_nm && (
|
||||||
<Space
|
|
||||||
size="small"
|
|
||||||
direction={
|
|
||||||
cardSettings && cardSettings.compact
|
|
||||||
? "horizontal"
|
|
||||||
: "vertical"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div>{`B: ${card.labhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
|
||||||
<div>{`R: ${card.larhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
|
||||||
</Space>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.employeeassignments === "back" && (
|
|
||||||
<Col span={12}>
|
|
||||||
<Space
|
|
||||||
direction="vertical"
|
|
||||||
wrap={cardSettings && cardSettings.compact}
|
|
||||||
>
|
|
||||||
<div>{`B: ${
|
|
||||||
employee_body
|
|
||||||
? `${employee_body.first_name} ${employee_body.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
<div>{`P: ${
|
|
||||||
employee_prep
|
|
||||||
? `${employee_prep.first_name} ${employee_prep.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
<div>{`R: ${
|
|
||||||
employee_refinish
|
|
||||||
? `${employee_refinish.first_name} ${employee_refinish.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
<div>{`CSR: ${
|
|
||||||
employee_csr
|
|
||||||
? `${employee_csr.first_name} ${employee_csr.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
</Space>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.scheduled_completion === "back" && (
|
|
||||||
<Col span={12}>
|
|
||||||
<Space>
|
|
||||||
<CalendarOutlined />
|
|
||||||
<DateTimeFormatter format="MM/DD">
|
|
||||||
{card.scheduled_completion}
|
|
||||||
</DateTimeFormatter>
|
|
||||||
</Space>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.ats === "back" && (
|
|
||||||
<Col span={12}>
|
|
||||||
<Col span={cardSettings && cardSettings.compact ? 24 : 6}>
|
|
||||||
<div>{card.alt_transport || ""}</div>
|
|
||||||
</Col>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{cardSettings && cardSettings.sublets === "back" && (
|
|
||||||
<Col span={12}>
|
|
||||||
<ProductionSubletsManageComponent
|
|
||||||
subletJobLines={card.subletLines}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.production_note === "back" && (
|
|
||||||
<Col span={24}>
|
|
||||||
{cardSettings && cardSettings.production_note === "back" && (
|
|
||||||
<ProductionListColumnProductionNote record={card} />
|
|
||||||
)}
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
</Row>
|
|
||||||
) : (
|
|
||||||
<Row>
|
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
{cardSettings && cardSettings.compact ? (
|
{cardSettings && cardSettings.compact ? (
|
||||||
<div className="ellipses">{`${card.ownr_ln || ""} ${
|
<div className="ellipses">{`${card.ownr_ln || ""} ${
|
||||||
@@ -159,68 +70,74 @@ export default function ProductionBoardCard(
|
|||||||
} ${card.ownr_co_nm || ""}`}</div>
|
} ${card.ownr_co_nm || ""}`}</div>
|
||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
<Col span={24}>
|
)}
|
||||||
<div className="ellipses">{`${card.v_model_yr || ""} ${
|
<Col span={24}>
|
||||||
card.v_make_desc || ""
|
<div className="ellipses">{`${card.v_model_yr || ""} ${
|
||||||
} ${card.v_model_desc || ""}`}</div>
|
card.v_make_desc || ""
|
||||||
|
} ${card.v_model_desc || ""}`}</div>
|
||||||
|
</Col>
|
||||||
|
{cardSettings && cardSettings.ins_co_nm && card.ins_co_nm && (
|
||||||
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
||||||
|
<div className="ellipses">{card.ins_co_nm || ""}</div>
|
||||||
</Col>
|
</Col>
|
||||||
|
)}
|
||||||
|
{cardSettings && cardSettings.clm_no && card.clm_no && (
|
||||||
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
||||||
|
<div className="ellipses">{card.clm_no || ""}</div>
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
|
|
||||||
{cardSettings && cardSettings.clm_no === "front" && (
|
{cardSettings && cardSettings.employeeassignments && (
|
||||||
|
<Col span={24}>
|
||||||
|
<Row>
|
||||||
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`B: ${
|
||||||
|
employee_body
|
||||||
|
? `${employee_body.first_name.substr(
|
||||||
|
0,
|
||||||
|
3
|
||||||
|
)} ${employee_body.last_name.charAt(0)}`
|
||||||
|
: ""
|
||||||
|
} ${card.labhrs.aggregate.sum.mod_lb_hrs || "?"}h`}</Col>
|
||||||
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`P: ${
|
||||||
|
employee_prep
|
||||||
|
? `${employee_prep.first_name.substr(
|
||||||
|
0,
|
||||||
|
3
|
||||||
|
)} ${employee_prep.last_name.charAt(0)}`
|
||||||
|
: ""
|
||||||
|
}`}</Col>
|
||||||
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`R: ${
|
||||||
|
employee_refinish
|
||||||
|
? `${employee_refinish.first_name.substr(
|
||||||
|
0,
|
||||||
|
3
|
||||||
|
)} ${employee_refinish.last_name.charAt(0)}`
|
||||||
|
: ""
|
||||||
|
} ${card.larhrs.aggregate.sum.mod_lb_hrs || "?"}h`}</Col>
|
||||||
|
{/* <Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`C: ${
|
||||||
|
employee_csr
|
||||||
|
? `${employee_csr.first_name} ${employee_csr.last_name}`
|
||||||
|
: ""
|
||||||
|
}`}</Col> */}
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
|
{/* {cardSettings && cardSettings.laborhrs && (
|
||||||
|
<Col span={24}>
|
||||||
|
<Row>
|
||||||
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`B: ${
|
||||||
|
card.labhrs.aggregate.sum.mod_lb_hrs || "?"
|
||||||
|
} hrs`}</Col>
|
||||||
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>{`R: ${
|
||||||
|
card.larhrs.aggregate.sum.mod_lb_hrs || "?"
|
||||||
|
} hrs`}</Col>
|
||||||
|
</Row>
|
||||||
|
</Col>
|
||||||
|
)} */}
|
||||||
|
{cardSettings &&
|
||||||
|
cardSettings.scheduled_completion &&
|
||||||
|
card.scheduled_completion && (
|
||||||
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
||||||
<div className="ellipses">{card.clm_no || ""}</div>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.ins_co_nm === "front" && (
|
|
||||||
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
|
||||||
<div className="ellipses">{card.ins_co_nm || ""}</div>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.laborhrs === "front" && (
|
|
||||||
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
|
||||||
<Space
|
|
||||||
size="small"
|
|
||||||
direction={
|
|
||||||
cardSettings && cardSettings.compact
|
|
||||||
? "horizontal"
|
|
||||||
: "vertical"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div>{`B: ${card.labhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
|
||||||
<div>{`R: ${card.larhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
|
||||||
</Space>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.employeeassignments === "front" && (
|
|
||||||
<Col span={24}>
|
|
||||||
<Space
|
|
||||||
direction="vertical"
|
|
||||||
wrap={cardSettings && cardSettings.compact}
|
|
||||||
>
|
|
||||||
<div>{`B: ${
|
|
||||||
employee_body
|
|
||||||
? `${employee_body.first_name} ${employee_body.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
<div>{`P: ${
|
|
||||||
employee_prep
|
|
||||||
? `${employee_prep.first_name} ${employee_prep.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
<div>{`R: ${
|
|
||||||
employee_refinish
|
|
||||||
? `${employee_refinish.first_name} ${employee_refinish.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
<div>{`CSR: ${
|
|
||||||
employee_csr
|
|
||||||
? `${employee_csr.first_name} ${employee_csr.last_name}`
|
|
||||||
: ""
|
|
||||||
}`}</div>
|
|
||||||
</Space>
|
|
||||||
</Col>
|
|
||||||
)}
|
|
||||||
{cardSettings && cardSettings.scheduled_completion === "front" && (
|
|
||||||
<Col span={12}>
|
|
||||||
<Space>
|
<Space>
|
||||||
<CalendarOutlined />
|
<CalendarOutlined />
|
||||||
<DateTimeFormatter format="MM/DD">
|
<DateTimeFormatter format="MM/DD">
|
||||||
@@ -229,27 +146,26 @@ export default function ProductionBoardCard(
|
|||||||
</Space>
|
</Space>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
{cardSettings && cardSettings.ats === "front" && (
|
{cardSettings && cardSettings.ats && card.alt_transport && (
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<div>{card.alt_transport || ""}</div>
|
<div>{card.alt_transport || ""}</div>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
{cardSettings && cardSettings.sublets === "front" && (
|
{cardSettings && cardSettings.sublets && (
|
||||||
<Col span={12}>
|
<Col span={12}>
|
||||||
<ProductionSubletsManageComponent
|
<ProductionSubletsManageComponent
|
||||||
subletJobLines={card.subletLines}
|
subletJobLines={card.subletLines}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
{cardSettings && cardSettings.production_note === "front" && (
|
{cardSettings && cardSettings.production_note && (
|
||||||
<Col span={24}>
|
<Col span={24}>
|
||||||
{cardSettings && cardSettings.production_note === "front" && (
|
{cardSettings && cardSettings.production_note && (
|
||||||
<ProductionListColumnProductionNote record={card} />
|
<ProductionListColumnProductionNote record={card} />
|
||||||
)}
|
)}
|
||||||
</Col>
|
</Col>
|
||||||
)}
|
)}
|
||||||
</Row>
|
</Row>
|
||||||
)}
|
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,85 +63,74 @@ export default function ProductionBoardKanbanCardSettings({
|
|||||||
>
|
>
|
||||||
<Switch />
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("production.labels.clm_no")} name="clm_no">
|
<Form.Item
|
||||||
<Radio.Group>
|
valuePropName="checked"
|
||||||
<Radio value="front">Front</Radio>
|
label={t("production.labels.ownr_nm")}
|
||||||
<Radio value="back">Back</Radio>
|
name="ownr_nm"
|
||||||
<Radio value="off">Off</Radio>
|
>
|
||||||
</Radio.Group>
|
<Switch />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
valuePropName="checked"
|
||||||
|
label={t("production.labels.clm_no")}
|
||||||
|
name="clm_no"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
valuePropName="checked"
|
||||||
label={t("production.labels.ins_co_nm")}
|
label={t("production.labels.ins_co_nm")}
|
||||||
name="ins_co_nm"
|
name="ins_co_nm"
|
||||||
>
|
>
|
||||||
<Radio.Group>
|
<Switch />
|
||||||
<Radio value="front">Front</Radio>
|
|
||||||
<Radio value="back">Back</Radio>
|
|
||||||
<Radio value="off">Off</Radio>
|
|
||||||
</Radio.Group>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
{/* <Form.Item
|
||||||
|
valuePropName="checked"
|
||||||
label={t("production.labels.laborhrs")}
|
label={t("production.labels.laborhrs")}
|
||||||
name="laborhrs"
|
name="laborhrs"
|
||||||
>
|
>
|
||||||
<Radio.Group>
|
<Switch />
|
||||||
<Radio value="front">Front</Radio>
|
</Form.Item> */}
|
||||||
<Radio value="back">Back</Radio>
|
|
||||||
<Radio value="off">Off</Radio>
|
|
||||||
</Radio.Group>
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
valuePropName="checked"
|
||||||
label={t("production.labels.employeeassignments")}
|
label={t("production.labels.employeeassignments")}
|
||||||
name="employeeassignments"
|
name="employeeassignments"
|
||||||
>
|
>
|
||||||
<Radio.Group>
|
<Switch />
|
||||||
<Radio value="front">Front</Radio>
|
|
||||||
<Radio value="back">Back</Radio>
|
|
||||||
<Radio value="off">Off</Radio>
|
|
||||||
</Radio.Group>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
<Col span={12}>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
valuePropName="checked"
|
||||||
label={t("production.labels.scheduled_completion")}
|
label={t("production.labels.scheduled_completion")}
|
||||||
name="scheduled_completion"
|
name="scheduled_completion"
|
||||||
>
|
>
|
||||||
<Radio.Group>
|
<Switch />
|
||||||
<Radio value="front">Front</Radio>
|
|
||||||
<Radio value="back">Back</Radio>
|
|
||||||
<Radio value="off">Off</Radio>
|
|
||||||
</Radio.Group>
|
|
||||||
</Form.Item>{" "}
|
|
||||||
</Col>
|
|
||||||
<Col span={12}>
|
|
||||||
<Form.Item label={t("production.labels.ats")} name="ats">
|
|
||||||
<Radio.Group>
|
|
||||||
<Radio value="front">Front</Radio>
|
|
||||||
<Radio value="back">Back</Radio>
|
|
||||||
<Radio value="off">Off</Radio>
|
|
||||||
</Radio.Group>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
|
valuePropName="checked"
|
||||||
|
label={t("production.labels.ats")}
|
||||||
|
name="ats"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
valuePropName="checked"
|
||||||
label={t("production.labels.production_note")}
|
label={t("production.labels.production_note")}
|
||||||
name="production_note"
|
name="production_note"
|
||||||
>
|
>
|
||||||
<Radio.Group>
|
<Switch />
|
||||||
<Radio value="front">Front</Radio>
|
|
||||||
<Radio value="back">Back</Radio>
|
|
||||||
<Radio value="off">Off</Radio>
|
|
||||||
</Radio.Group>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("production.labels.alert")} name="alert">
|
{/* <Form.Item
|
||||||
<Radio.Group>
|
valuePropName='checked' label={t("production.labels.alert")} name="alert">
|
||||||
<Radio value="front">Front</Radio>
|
<Switch/>
|
||||||
<Radio value="back">Back</Radio>
|
</Form.Item> */}
|
||||||
<Radio value="off">Off</Radio>
|
<Form.Item
|
||||||
</Radio.Group>
|
valuePropName="checked"
|
||||||
</Form.Item>
|
label={t("production.labels.sublets")}
|
||||||
<Form.Item label={t("production.labels.sublets")} name="sublets">
|
name="sublets"
|
||||||
<Radio.Group>
|
>
|
||||||
<Radio value="front">Front</Radio>
|
<Switch />
|
||||||
<Radio value="back">Back</Radio>
|
|
||||||
<Radio value="off">Off</Radio>
|
|
||||||
</Radio.Group>
|
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { useApolloClient } from "@apollo/client";
|
|||||||
import Board, { moveCard } from "@asseinfo/react-kanban";
|
import Board, { moveCard } from "@asseinfo/react-kanban";
|
||||||
//import "@asseinfo/react-kanban/dist/styles.css";
|
//import "@asseinfo/react-kanban/dist/styles.css";
|
||||||
import "./production-board-kanban.styles.scss";
|
import "./production-board-kanban.styles.scss";
|
||||||
import { notification, PageHeader, Space, Statistic } from "antd";
|
import { Grid, notification, PageHeader, Space, Statistic } from "antd";
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -145,22 +145,42 @@ export function ProductionBoardKanbanComponent({
|
|||||||
0
|
0
|
||||||
)
|
)
|
||||||
.toFixed(1);
|
.toFixed(1);
|
||||||
|
const selectedBreakpoint = Object.entries(Grid.useBreakpoint())
|
||||||
|
.filter((screen) => !!screen[1])
|
||||||
|
.slice(-1)[0];
|
||||||
|
|
||||||
|
const standardSizes = {
|
||||||
|
xs: "250",
|
||||||
|
sm: "250",
|
||||||
|
md: "250",
|
||||||
|
lg: "250",
|
||||||
|
xl: "250",
|
||||||
|
xxl: "250",
|
||||||
|
};
|
||||||
|
const compactSizes = {
|
||||||
|
xs: "150",
|
||||||
|
sm: "150",
|
||||||
|
md: "150",
|
||||||
|
lg: "150",
|
||||||
|
xl: "155",
|
||||||
|
xxl: "155",
|
||||||
|
};
|
||||||
|
|
||||||
|
const width = selectedBreakpoint
|
||||||
|
? associationSettings &&
|
||||||
|
associationSettings.kanban_settings &&
|
||||||
|
associationSettings.kanban_settings.compact
|
||||||
|
? compactSizes[selectedBreakpoint[0]]
|
||||||
|
: standardSizes[selectedBreakpoint[0]]
|
||||||
|
: "250";
|
||||||
|
|
||||||
const Container = styled.div`
|
const Container = styled.div`
|
||||||
.react-kanban-card-skeleton,
|
.react-kanban-card-skeleton,
|
||||||
.react-kanban-card,
|
.react-kanban-card,
|
||||||
.react-kanban-card-adder-form {
|
.react-kanban-card-adder-form {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
max-width: ${associationSettings &&
|
max-width: ${width}px;
|
||||||
associationSettings.kanban_settings &&
|
min-width: ${width}px;
|
||||||
associationSettings.kanban_settings.compact
|
|
||||||
? "145"
|
|
||||||
: "250"}px;
|
|
||||||
min-width: ${associationSettings &&
|
|
||||||
associationSettings.kanban_settings &&
|
|
||||||
associationSettings.kanban_settings.compact
|
|
||||||
? "145"
|
|
||||||
: "250"}px;
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
|||||||
@@ -56,7 +56,10 @@ export default function ProductionSubletsManageComponent({ subletJobLines }) {
|
|||||||
<Button
|
<Button
|
||||||
key="complete"
|
key="complete"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onClick={() => handleSubletMark(s, "complete")}
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
handleSubletMark(s, "complete");
|
||||||
|
}}
|
||||||
type={s.sublet_completed ? "primary" : "ghost"}
|
type={s.sublet_completed ? "primary" : "ghost"}
|
||||||
>
|
>
|
||||||
<CheckCircleFilled
|
<CheckCircleFilled
|
||||||
@@ -66,7 +69,10 @@ export default function ProductionSubletsManageComponent({ subletJobLines }) {
|
|||||||
<Button
|
<Button
|
||||||
key="sublet"
|
key="sublet"
|
||||||
loading={loading}
|
loading={loading}
|
||||||
onClick={() => handleSubletMark(s, "ignore")}
|
onClick={(e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
handleSubletMark(s, "ignore");
|
||||||
|
}}
|
||||||
type={s.sublet_ignored ? "primary" : "ghost"}
|
type={s.sublet_ignored ? "primary" : "ghost"}
|
||||||
>
|
>
|
||||||
<EyeInvisibleFilled
|
<EyeInvisibleFilled
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { Button, Col, PageHeader, Row } from "antd";
|
import { Button, Col, PageHeader, Row, Space, Form, Switch } from "antd";
|
||||||
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import ContractCarsContainer from "../../components/contract-cars/contract-cars.container";
|
import ContractCarsContainer from "../../components/contract-cars/contract-cars.container";
|
||||||
@@ -13,14 +14,25 @@ export default function ContractCreatePageComponent({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const CreateButton = (
|
const CreateButton = (
|
||||||
<Button
|
<Space size="large">
|
||||||
disabled={!selectedJobState[0] || !selectedCarState[0]}
|
{selectedJobState[0] && selectedCarState[0] && (
|
||||||
type="primary"
|
<Form.Item
|
||||||
onClick={() => form.submit()}
|
label={t("jobs.actions.addtoproduction")}
|
||||||
loading={loading}
|
name="addtoproduction"
|
||||||
>
|
valuePropName="checked"
|
||||||
{t("general.actions.create")}
|
>
|
||||||
</Button>
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
)}
|
||||||
|
<Button
|
||||||
|
disabled={!selectedJobState[0] || !selectedCarState[0]}
|
||||||
|
type="primary"
|
||||||
|
onClick={() => form.submit()}
|
||||||
|
loading={loading}
|
||||||
|
>
|
||||||
|
{t("general.actions.create")}
|
||||||
|
</Button>
|
||||||
|
</Space>
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { useHistory, useLocation } from "react-router-dom";
|
|||||||
import { createStructuredSelector } from "reselect";
|
import { createStructuredSelector } from "reselect";
|
||||||
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
import RbacWrapper from "../../components/rbac-wrapper/rbac-wrapper.component";
|
||||||
import { INSERT_NEW_CONTRACT } from "../../graphql/cccontracts.queries";
|
import { INSERT_NEW_CONTRACT } from "../../graphql/cccontracts.queries";
|
||||||
|
import { UPDATE_JOB } from "../../graphql/jobs.queries";
|
||||||
import {
|
import {
|
||||||
setBreadcrumbs,
|
setBreadcrumbs,
|
||||||
setSelectedHeader,
|
setSelectedHeader,
|
||||||
@@ -37,8 +38,9 @@ export function ContractCreatePageContainer({
|
|||||||
(location.state && location.state.jobId) || null
|
(location.state && location.state.jobId) || null
|
||||||
);
|
);
|
||||||
const [insertContract] = useMutation(INSERT_NEW_CONTRACT);
|
const [insertContract] = useMutation(INSERT_NEW_CONTRACT);
|
||||||
|
const [intakeJob] = useMutation(UPDATE_JOB);
|
||||||
|
|
||||||
const handleFinish = async (values) => {
|
const handleFinish = async ({ addtoproduction, ...values }) => {
|
||||||
if (!!selectedCarState[0] && !!selectedJobState[0]) {
|
if (!!selectedCarState[0] && !!selectedJobState[0]) {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
const result = await insertContract({
|
const result = await insertContract({
|
||||||
@@ -54,12 +56,35 @@ export function ContractCreatePageContainer({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!result.errors) {
|
if (!result.errors) {
|
||||||
//Update the courtesy car to have the damage.
|
//Update the courtesy car to have the damage.
|
||||||
notification["success"]({
|
notification["success"]({
|
||||||
message: t("contracts.successes.saved"),
|
message: t("contracts.successes.saved"),
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Intake the job if required
|
||||||
|
if (addtoproduction) {
|
||||||
|
const result2 = await intakeJob({
|
||||||
|
variables: {
|
||||||
|
jobId: selectedJobState[0],
|
||||||
|
job: {
|
||||||
|
actual_in: new Date(),
|
||||||
|
inproduction: true,
|
||||||
|
status: bodyshop.md_ro_statuses.default_arrived,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
if (result2.errors) {
|
||||||
|
notification["error"]({
|
||||||
|
message: t("jobs.errors.saving", {
|
||||||
|
error: JSON.stringify(!result2.errors),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
form.resetFields();
|
form.resetFields();
|
||||||
history.push(
|
history.push(
|
||||||
|
|||||||
@@ -2085,18 +2085,24 @@
|
|||||||
"alert": "Alert",
|
"alert": "Alert",
|
||||||
"alertoff": "Remove alert from job",
|
"alertoff": "Remove alert from job",
|
||||||
"alerton": "Add alert to job",
|
"alerton": "Add alert to job",
|
||||||
|
"ats": "Alternative Transportation",
|
||||||
"bodyhours": "B",
|
"bodyhours": "B",
|
||||||
"bodypriority": "B/P",
|
"bodypriority": "B/P",
|
||||||
"cardsettings": "Card Settings",
|
"cardsettings": "Card Settings",
|
||||||
|
"clm_no": "Claim Number",
|
||||||
"compact": "Compact Cards",
|
"compact": "Compact Cards",
|
||||||
"detailpriority": "D/P",
|
"detailpriority": "D/P",
|
||||||
"employeeassignments": "Employee Assignments",
|
"employeeassignments": "Employee Assignments",
|
||||||
"employeesearch": "Employee Search",
|
"employeesearch": "Employee Search",
|
||||||
|
"ins_co_nm": "Insurance Company Name",
|
||||||
"jobdetail": "Job Details",
|
"jobdetail": "Job Details",
|
||||||
"laborhrs": "Labor Hours",
|
"laborhrs": "Labor Hours",
|
||||||
"note": "Production Note",
|
"note": "Production Note",
|
||||||
|
"ownr_nm": "Owner Name",
|
||||||
"paintpriority": "P/P",
|
"paintpriority": "P/P",
|
||||||
|
"production_note": "Production Note",
|
||||||
"refinishhours": "R",
|
"refinishhours": "R",
|
||||||
|
"scheduled_completion": "Scheduled Completion",
|
||||||
"selectview": "Select a View",
|
"selectview": "Select a View",
|
||||||
"sublets": "Sublets",
|
"sublets": "Sublets",
|
||||||
"totalhours": "Total Hrs ",
|
"totalhours": "Total Hrs ",
|
||||||
|
|||||||
@@ -2085,18 +2085,24 @@
|
|||||||
"alert": "",
|
"alert": "",
|
||||||
"alertoff": "",
|
"alertoff": "",
|
||||||
"alerton": "",
|
"alerton": "",
|
||||||
|
"ats": "",
|
||||||
"bodyhours": "",
|
"bodyhours": "",
|
||||||
"bodypriority": "",
|
"bodypriority": "",
|
||||||
"cardsettings": "",
|
"cardsettings": "",
|
||||||
|
"clm_no": "",
|
||||||
"compact": "",
|
"compact": "",
|
||||||
"detailpriority": "",
|
"detailpriority": "",
|
||||||
"employeeassignments": "",
|
"employeeassignments": "",
|
||||||
"employeesearch": "",
|
"employeesearch": "",
|
||||||
|
"ins_co_nm": "",
|
||||||
"jobdetail": "",
|
"jobdetail": "",
|
||||||
"laborhrs": "",
|
"laborhrs": "",
|
||||||
"note": "",
|
"note": "",
|
||||||
|
"ownr_nm": "",
|
||||||
"paintpriority": "",
|
"paintpriority": "",
|
||||||
|
"production_note": "",
|
||||||
"refinishhours": "",
|
"refinishhours": "",
|
||||||
|
"scheduled_completion": "",
|
||||||
"selectview": "",
|
"selectview": "",
|
||||||
"sublets": "",
|
"sublets": "",
|
||||||
"totalhours": "",
|
"totalhours": "",
|
||||||
|
|||||||
@@ -2085,18 +2085,24 @@
|
|||||||
"alert": "",
|
"alert": "",
|
||||||
"alertoff": "",
|
"alertoff": "",
|
||||||
"alerton": "",
|
"alerton": "",
|
||||||
|
"ats": "",
|
||||||
"bodyhours": "",
|
"bodyhours": "",
|
||||||
"bodypriority": "",
|
"bodypriority": "",
|
||||||
"cardsettings": "",
|
"cardsettings": "",
|
||||||
|
"clm_no": "",
|
||||||
"compact": "",
|
"compact": "",
|
||||||
"detailpriority": "",
|
"detailpriority": "",
|
||||||
"employeeassignments": "",
|
"employeeassignments": "",
|
||||||
"employeesearch": "",
|
"employeesearch": "",
|
||||||
|
"ins_co_nm": "",
|
||||||
"jobdetail": "",
|
"jobdetail": "",
|
||||||
"laborhrs": "",
|
"laborhrs": "",
|
||||||
"note": "",
|
"note": "",
|
||||||
|
"ownr_nm": "",
|
||||||
"paintpriority": "",
|
"paintpriority": "",
|
||||||
|
"production_note": "",
|
||||||
"refinishhours": "",
|
"refinishhours": "",
|
||||||
|
"scheduled_completion": "",
|
||||||
"selectview": "",
|
"selectview": "",
|
||||||
"sublets": "",
|
"sublets": "",
|
||||||
"totalhours": "",
|
"totalhours": "",
|
||||||
|
|||||||
Reference in New Issue
Block a user