IO-1533 Kanban Customizations
This commit is contained in:
@@ -34872,6 +34872,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>settings</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>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
@@ -35003,6 +35024,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>compact</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>detailpriority</name>
|
<name>detailpriority</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -35024,6 +35066,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>employeeassignments</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>employeesearch</name>
|
<name>employeesearch</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
@@ -35066,6 +35129,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>laborhrs</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>note</name>
|
<name>note</name>
|
||||||
<definition_loaded>false</definition_loaded>
|
<definition_loaded>false</definition_loaded>
|
||||||
|
|||||||
@@ -1,14 +1,13 @@
|
|||||||
import React from "react";
|
import { EyeFilled, CalendarOutlined } from "@ant-design/icons";
|
||||||
import { Card, Row, Col, Dropdown } from "antd";
|
import { Card, Col, Row, Space, Typography } from "antd";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Link } from "react-router-dom";
|
||||||
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
import { DateTimeFormatter } from "../../utils/DateFormatter";
|
||||||
import ProductionAlert from "../production-list-columns/production-list-columns.alert.component";
|
import ProductionAlert from "../production-list-columns/production-list-columns.alert.component";
|
||||||
import { EyeFilled } from "@ant-design/icons";
|
|
||||||
import { Link } from "react-router-dom";
|
|
||||||
import "./production-board-card.styles.scss";
|
|
||||||
import ProductionRemoveButton from "../production-remove-button/production-remove-button.component";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import ProductionSubletsManageComponent from "../production-sublets-manage/production-sublets-manage.component";
|
|
||||||
import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component";
|
import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component";
|
||||||
|
import ProductionSubletsManageComponent from "../production-sublets-manage/production-sublets-manage.component";
|
||||||
|
import "./production-board-card.styles.scss";
|
||||||
|
|
||||||
export default function ProductionBoardCard(
|
export default function ProductionBoardCard(
|
||||||
technician,
|
technician,
|
||||||
@@ -17,13 +16,7 @@ export default function ProductionBoardCard(
|
|||||||
cardSettings
|
cardSettings
|
||||||
) {
|
) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const menu = (
|
const [flipped, setFlipped] = useState(false);
|
||||||
<div>
|
|
||||||
<Card title={t("general.labels.actions")}>
|
|
||||||
<ProductionRemoveButton jobId={card.id} />
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
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);
|
||||||
@@ -41,36 +34,62 @@ export default function ProductionBoardCard(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Dropdown overlay={menu} trigger={["contextMenu"]}>
|
<Card
|
||||||
<Card
|
className="react-kanban-card imex-kanban-card tight-antd-rows"
|
||||||
className="react-kanban-card imex-kanban-card tight-antd-rows"
|
onDoubleClick={() => setFlipped(!flipped)}
|
||||||
title={`${card.ro_number || t("general.labels.na")} - ${
|
>
|
||||||
card.v_model_yr
|
<div style={{ display: "flex" }}>
|
||||||
} ${card.v_make_desc || ""} ${card.v_model_desc || ""}`}
|
<span style={{ fontWeight: "bold", flex: 1 }}>
|
||||||
>
|
{card.ro_number || t("general.labels.na")}
|
||||||
|
</span>
|
||||||
|
<Space size="small" align="start">
|
||||||
|
{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>
|
||||||
|
</div>
|
||||||
|
{flipped ? (
|
||||||
<Row>
|
<Row>
|
||||||
<Col span={24}>
|
{cardSettings && cardSettings.clm_no === "back" && (
|
||||||
<div className="ellipses">{`${card.ownr_fn || ""} ${
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
||||||
card.ownr_ln || ""
|
<div className="ellipses">{card.clm_no || ""}</div>
|
||||||
} ${card.ownr_co_nm || ""}`}</div>
|
</Col>
|
||||||
</Col>
|
)}
|
||||||
</Row>
|
{cardSettings && cardSettings.ins_co_nm === "back" && (
|
||||||
<Row>
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
||||||
<Col span={12}>
|
<div className="ellipses">{card.ins_co_nm || ""}</div>
|
||||||
<div className="ellipses">{card.clm_no || ""}</div>
|
</Col>
|
||||||
</Col>
|
)}
|
||||||
<Col span={12}>
|
{cardSettings && cardSettings.laborhrs === "back" && (
|
||||||
<div className="ellipses">{card.ins_co_nm || ""}</div>
|
<Col span={cardSettings && cardSettings.compact ? 24 : 12}>
|
||||||
</Col>
|
<Space
|
||||||
</Row>
|
size="small"
|
||||||
<Row>
|
direction={
|
||||||
<Col span={24}>
|
cardSettings && cardSettings.compact
|
||||||
<div className="imex-flex-row imex-flex-row__flex-space-around">
|
? "horizontal"
|
||||||
<div className="mex-flex-row__margin">
|
: "vertical"
|
||||||
|
}
|
||||||
|
>
|
||||||
<div>{`B: ${card.labhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
<div>{`B: ${card.labhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
||||||
<div>{`R: ${card.larhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
<div>{`R: ${card.larhrs.aggregate.sum.mod_lb_hrs || "?"}`}</div>
|
||||||
</div>
|
</Space>
|
||||||
<div className="mex-flex-row__margin">
|
</Col>
|
||||||
|
)}
|
||||||
|
{cardSettings && cardSettings.employeeassignments === "back" && (
|
||||||
|
<Col span={12}>
|
||||||
|
<Space
|
||||||
|
direction="vertical"
|
||||||
|
wrap={cardSettings && cardSettings.compact}
|
||||||
|
>
|
||||||
<div>{`B: ${
|
<div>{`B: ${
|
||||||
employee_body
|
employee_body
|
||||||
? `${employee_body.first_name} ${employee_body.last_name}`
|
? `${employee_body.first_name} ${employee_body.last_name}`
|
||||||
@@ -91,35 +110,146 @@ export default function ProductionBoardCard(
|
|||||||
? `${employee_csr.first_name} ${employee_csr.last_name}`
|
? `${employee_csr.first_name} ${employee_csr.last_name}`
|
||||||
: ""
|
: ""
|
||||||
}`}</div>
|
}`}</div>
|
||||||
</div>
|
</Space>
|
||||||
</div>
|
</Col>
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
<Row>
|
|
||||||
<Col span={18}>
|
|
||||||
<DateTimeFormatter>{card.scheduled_completion}</DateTimeFormatter>
|
|
||||||
</Col>
|
|
||||||
<Col span={6}>
|
|
||||||
<div>{card.alt_transport || ""}</div>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
<div>
|
|
||||||
<ProductionListColumnProductionNote record={card} />
|
|
||||||
</div>
|
|
||||||
<div className="imex-flex-row imex-flex-row__flex-space-around">
|
|
||||||
<ProductionAlert record={card} key="alert" />
|
|
||||||
<ProductionSubletsManageComponent subletJobLines={card.subletLines} />
|
|
||||||
{technician ? (
|
|
||||||
<Link to={`/tech/joblookup?selected=${card.id}`}>
|
|
||||||
<EyeFilled />
|
|
||||||
</Link>
|
|
||||||
) : (
|
|
||||||
<Link to={`/manage/jobs/${card.id}`}>
|
|
||||||
<EyeFilled />
|
|
||||||
</Link>
|
|
||||||
)}
|
)}
|
||||||
</div>
|
{cardSettings && cardSettings.scheduled_completion === "back" && (
|
||||||
</Card>
|
<Col span={12}>
|
||||||
</Dropdown>
|
<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}>
|
||||||
|
{cardSettings && cardSettings.compact ? (
|
||||||
|
<div className="ellipses">{`${card.ownr_ln || ""} ${
|
||||||
|
card.ownr_co_nm || ""
|
||||||
|
}`}</div>
|
||||||
|
) : (
|
||||||
|
<div className="ellipses">{`${card.ownr_ln || ""}, ${
|
||||||
|
card.ownr_fn || ""
|
||||||
|
} ${card.ownr_co_nm || ""}`}</div>
|
||||||
|
)}
|
||||||
|
</Col>
|
||||||
|
<Col span={24}>
|
||||||
|
<div className="ellipses">{`${card.v_model_yr || ""} ${
|
||||||
|
card.v_make_desc || ""
|
||||||
|
} ${card.v_model_desc || ""}`}</div>
|
||||||
|
</Col>
|
||||||
|
|
||||||
|
{cardSettings && cardSettings.clm_no === "front" && (
|
||||||
|
<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>
|
||||||
|
<CalendarOutlined />
|
||||||
|
<DateTimeFormatter format="MM/DD">
|
||||||
|
{card.scheduled_completion}
|
||||||
|
</DateTimeFormatter>
|
||||||
|
</Space>
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
|
{cardSettings && cardSettings.ats === "front" && (
|
||||||
|
<Col span={12}>
|
||||||
|
<div>{card.alt_transport || ""}</div>
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
|
{cardSettings && cardSettings.sublets === "front" && (
|
||||||
|
<Col span={12}>
|
||||||
|
<ProductionSubletsManageComponent
|
||||||
|
subletJobLines={card.subletLines}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
|
{cardSettings && cardSettings.production_note === "front" && (
|
||||||
|
<Col span={24}>
|
||||||
|
{cardSettings && cardSettings.production_note === "front" && (
|
||||||
|
<ProductionListColumnProductionNote record={card} />
|
||||||
|
)}
|
||||||
|
</Col>
|
||||||
|
)}
|
||||||
|
</Row>
|
||||||
|
)}
|
||||||
|
</Card>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
import { useMutation } from "@apollo/client";
|
import { useMutation } from "@apollo/client";
|
||||||
import { Button, Card, Dropdown, Form, Switch } from "antd";
|
import {
|
||||||
import React, { useEffect } from "react";
|
Button,
|
||||||
|
Card,
|
||||||
|
Col,
|
||||||
|
Form,
|
||||||
|
notification,
|
||||||
|
Popover,
|
||||||
|
Radio,
|
||||||
|
Row,
|
||||||
|
Switch,
|
||||||
|
} from "antd";
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { UPDATE_KANBAN_SETTINGS } from "../../graphql/user.queries";
|
import { UPDATE_KANBAN_SETTINGS } from "../../graphql/user.queries";
|
||||||
|
|
||||||
@@ -8,70 +18,149 @@ export default function ProductionBoardKanbanCardSettings({
|
|||||||
associationSettings,
|
associationSettings,
|
||||||
}) {
|
}) {
|
||||||
const [form] = Form.useForm();
|
const [form] = Form.useForm();
|
||||||
|
const [visible, setVisible] = useState(false);
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
const [updateKbSettings] = useMutation(UPDATE_KANBAN_SETTINGS);
|
const [updateKbSettings] = useMutation(UPDATE_KANBAN_SETTINGS);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
form.setFieldsValue(
|
form.setFieldsValue(
|
||||||
associationSettings && associationSettings.kanban_settings
|
associationSettings && associationSettings.kanban_settings
|
||||||
);
|
);
|
||||||
}, [form, associationSettings]);
|
}, [form, associationSettings, visible]);
|
||||||
|
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const handleFinish = async (values) => {
|
const handleFinish = async (values) => {
|
||||||
await updateKbSettings({
|
setLoading(true);
|
||||||
|
const result = await updateKbSettings({
|
||||||
variables: {
|
variables: {
|
||||||
id: associationSettings && associationSettings.id,
|
id: associationSettings && associationSettings.id,
|
||||||
ks: values,
|
ks: values,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
if (result.errors) {
|
||||||
|
notification.open({
|
||||||
|
type: "error",
|
||||||
|
message: t("production.errors.settings", {
|
||||||
|
error: JSON.stringify(result.errors),
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
setVisible(false);
|
||||||
|
setLoading(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
const overlay = (
|
const overlay = (
|
||||||
<div>
|
<div>
|
||||||
<Card>
|
<Card>
|
||||||
<Form form={form} onFinish={handleFinish}>
|
<Form form={form} onFinish={handleFinish} layout="vertical">
|
||||||
<Form.Item
|
<Row gutter={[16, 16]}>
|
||||||
label={t("production.labels.compact")}
|
<Col span={12}>
|
||||||
name="compact"
|
<Form.Item
|
||||||
valuePropName="checked"
|
label={t("production.labels.compact")}
|
||||||
>
|
name="compact"
|
||||||
<Switch />
|
valuePropName="checked"
|
||||||
</Form.Item>
|
>
|
||||||
<Form.Item
|
<Switch />
|
||||||
label={t("production.labels.laborhrs")}
|
</Form.Item>
|
||||||
name="laborhrs"
|
<Form.Item label={t("production.labels.clm_no")} name="clm_no">
|
||||||
valuePropName="checked"
|
<Radio.Group>
|
||||||
>
|
<Radio value="front">Front</Radio>
|
||||||
<Switch />
|
<Radio value="back">Back</Radio>
|
||||||
</Form.Item>
|
<Radio value="off">Off</Radio>
|
||||||
<Form.Item
|
</Radio.Group>
|
||||||
label={t("production.labels.employeeassignments")}
|
</Form.Item>
|
||||||
name="employeeassignments"
|
<Form.Item
|
||||||
valuePropName="checked"
|
label={t("production.labels.ins_co_nm")}
|
||||||
>
|
name="ins_co_nm"
|
||||||
<Switch />
|
>
|
||||||
</Form.Item>
|
<Radio.Group>
|
||||||
<Form.Item
|
<Radio value="front">Front</Radio>
|
||||||
label={t("production.labels.alert")}
|
<Radio value="back">Back</Radio>
|
||||||
name="alert"
|
<Radio value="off">Off</Radio>
|
||||||
valuePropName="checked"
|
</Radio.Group>
|
||||||
>
|
</Form.Item>
|
||||||
<Switch />
|
<Form.Item
|
||||||
</Form.Item>
|
label={t("production.labels.laborhrs")}
|
||||||
<Form.Item
|
name="laborhrs"
|
||||||
label={t("production.labels.sublets")}
|
>
|
||||||
name="sublets"
|
<Radio.Group>
|
||||||
valuePropName="checked"
|
<Radio value="front">Front</Radio>
|
||||||
>
|
<Radio value="back">Back</Radio>
|
||||||
<Switch />
|
<Radio value="off">Off</Radio>
|
||||||
</Form.Item>
|
</Radio.Group>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("production.labels.employeeassignments")}
|
||||||
|
name="employeeassignments"
|
||||||
|
>
|
||||||
|
<Radio.Group>
|
||||||
|
<Radio value="front">Front</Radio>
|
||||||
|
<Radio value="back">Back</Radio>
|
||||||
|
<Radio value="off">Off</Radio>
|
||||||
|
</Radio.Group>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("production.labels.scheduled_completion")}
|
||||||
|
name="scheduled_completion"
|
||||||
|
>
|
||||||
|
<Radio.Group>
|
||||||
|
<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
|
||||||
|
label={t("production.labels.production_note")}
|
||||||
|
name="production_note"
|
||||||
|
>
|
||||||
|
<Radio.Group>
|
||||||
|
<Radio value="front">Front</Radio>
|
||||||
|
<Radio value="back">Back</Radio>
|
||||||
|
<Radio value="off">Off</Radio>
|
||||||
|
</Radio.Group>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("production.labels.alert")} name="alert">
|
||||||
|
<Radio.Group>
|
||||||
|
<Radio value="front">Front</Radio>
|
||||||
|
<Radio value="back">Back</Radio>
|
||||||
|
<Radio value="off">Off</Radio>
|
||||||
|
</Radio.Group>
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("production.labels.sublets")} name="sublets">
|
||||||
|
<Radio.Group>
|
||||||
|
<Radio value="front">Front</Radio>
|
||||||
|
<Radio value="back">Back</Radio>
|
||||||
|
<Radio value="off">Off</Radio>
|
||||||
|
</Radio.Group>
|
||||||
|
</Form.Item>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
</Form>
|
</Form>
|
||||||
|
<Button
|
||||||
|
onClick={() => {
|
||||||
|
form.submit();
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{t("general.actions.save")}
|
||||||
|
</Button>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
<Dropdown trigger="click" overlay={overlay}>
|
<Popover content={overlay} visible={visible}>
|
||||||
<Button>{t("production.labels.cardsettings")}</Button>
|
<Button loading={loading} onClick={() => setVisible(true)}>
|
||||||
</Dropdown>
|
{t("production.labels.cardsettings")}
|
||||||
|
</Button>
|
||||||
|
</Popover>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import { selectTechnician } from "../../redux/tech/tech.selectors";
|
|||||||
import { insertAuditTrail } from "../../redux/application/application.actions";
|
import { insertAuditTrail } from "../../redux/application/application.actions";
|
||||||
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
import AuditTrailMapping from "../../utils/AuditTrailMappings";
|
||||||
import ProductionBoardKanbanCardSettings from "./production-board-kanban.card-settings.component";
|
import ProductionBoardKanbanCardSettings from "./production-board-kanban.card-settings.component";
|
||||||
|
import styled from "styled-components";
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
bodyshop: selectBodyshop,
|
bodyshop: selectBodyshop,
|
||||||
@@ -145,8 +146,26 @@ export function ProductionBoardKanbanComponent({
|
|||||||
)
|
)
|
||||||
.toFixed(1);
|
.toFixed(1);
|
||||||
|
|
||||||
|
const Container = styled.div`
|
||||||
|
.react-kanban-card-skeleton,
|
||||||
|
.react-kanban-card,
|
||||||
|
.react-kanban-card-adder-form {
|
||||||
|
box-sizing: border-box;
|
||||||
|
max-width: ${associationSettings &&
|
||||||
|
associationSettings.kanban_settings &&
|
||||||
|
associationSettings.kanban_settings.compact
|
||||||
|
? "145"
|
||||||
|
: "250"}px;
|
||||||
|
min-width: ${associationSettings &&
|
||||||
|
associationSettings.kanban_settings &&
|
||||||
|
associationSettings.kanban_settings.compact
|
||||||
|
? "145"
|
||||||
|
: "250"}px;
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<Container>
|
||||||
<IndefiniteLoading loading={isMoving} />
|
<IndefiniteLoading loading={isMoving} />
|
||||||
<PageHeader
|
<PageHeader
|
||||||
title={
|
title={
|
||||||
@@ -183,12 +202,12 @@ export function ProductionBoardKanbanComponent({
|
|||||||
technician,
|
technician,
|
||||||
card,
|
card,
|
||||||
bodyshop,
|
bodyshop,
|
||||||
associationSettings.kanban_settings
|
associationSettings && associationSettings.kanban_settings
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
onCardDragEnd={handleDragEnd}
|
onCardDragEnd={handleDragEnd}
|
||||||
/>
|
/>
|
||||||
</div>
|
</Container>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
export default connect(
|
export default connect(
|
||||||
|
|||||||
@@ -4,23 +4,16 @@
|
|||||||
.react-kanban-card {
|
.react-kanban-card {
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding: 10px;
|
padding: 4px;
|
||||||
margin-bottom: 7px;
|
margin-bottom: 7px;
|
||||||
}
|
}
|
||||||
.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: 250px;
|
// max-width: 145px;
|
||||||
min-width: 250px;
|
// min-width: 145px;
|
||||||
}
|
// }
|
||||||
.react-kanban-card-skeleton-compact,
|
|
||||||
.react-kanban-card-compact,
|
|
||||||
.react-kanban-card-adder-form-compact {
|
|
||||||
box-sizing: border-box;
|
|
||||||
max-width: 120px;
|
|
||||||
min-width: 120px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.react-kanban-card--dragging {
|
.react-kanban-card--dragging {
|
||||||
box-shadow: 2px 2px grey;
|
box-shadow: 2px 2px grey;
|
||||||
@@ -36,7 +29,7 @@
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
.react-kanban-column {
|
.react-kanban-column {
|
||||||
padding: 15px;
|
padding: 10px;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
background-color: #eee;
|
background-color: #eee;
|
||||||
margin: 5px;
|
margin: 5px;
|
||||||
|
|||||||
@@ -1385,7 +1385,7 @@ export function ShopInfoResponsibilityCenterComponent({ bodyshop, form }) {
|
|||||||
},
|
},
|
||||||
({ getFieldValue }) => ({
|
({ getFieldValue }) => ({
|
||||||
validator(rule, value) {
|
validator(rule, value) {
|
||||||
if (costOptions.includes(value)) {
|
if (profitOptions.includes(value)) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
return Promise.reject(
|
return Promise.reject(
|
||||||
|
|||||||
@@ -2078,7 +2078,8 @@
|
|||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"boardupdate": "Error encountered updating job. {{message}}",
|
"boardupdate": "Error encountered updating job. {{message}}",
|
||||||
"removing": "Error removing from production board. {{error}}"
|
"removing": "Error removing from production board. {{error}}",
|
||||||
|
"settings": "Error saving board settings: {{error}}"
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"alert": "Alert",
|
"alert": "Alert",
|
||||||
@@ -2087,9 +2088,12 @@
|
|||||||
"bodyhours": "B",
|
"bodyhours": "B",
|
||||||
"bodypriority": "B/P",
|
"bodypriority": "B/P",
|
||||||
"cardsettings": "Card Settings",
|
"cardsettings": "Card Settings",
|
||||||
|
"compact": "Compact Cards",
|
||||||
"detailpriority": "D/P",
|
"detailpriority": "D/P",
|
||||||
|
"employeeassignments": "Employee Assignments",
|
||||||
"employeesearch": "Employee Search",
|
"employeesearch": "Employee Search",
|
||||||
"jobdetail": "Job Details",
|
"jobdetail": "Job Details",
|
||||||
|
"laborhrs": "Labor Hours",
|
||||||
"note": "Production Note",
|
"note": "Production Note",
|
||||||
"paintpriority": "P/P",
|
"paintpriority": "P/P",
|
||||||
"refinishhours": "R",
|
"refinishhours": "R",
|
||||||
|
|||||||
@@ -2078,7 +2078,8 @@
|
|||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"boardupdate": "",
|
"boardupdate": "",
|
||||||
"removing": ""
|
"removing": "",
|
||||||
|
"settings": ""
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"alert": "",
|
"alert": "",
|
||||||
@@ -2087,9 +2088,12 @@
|
|||||||
"bodyhours": "",
|
"bodyhours": "",
|
||||||
"bodypriority": "",
|
"bodypriority": "",
|
||||||
"cardsettings": "",
|
"cardsettings": "",
|
||||||
|
"compact": "",
|
||||||
"detailpriority": "",
|
"detailpriority": "",
|
||||||
|
"employeeassignments": "",
|
||||||
"employeesearch": "",
|
"employeesearch": "",
|
||||||
"jobdetail": "",
|
"jobdetail": "",
|
||||||
|
"laborhrs": "",
|
||||||
"note": "",
|
"note": "",
|
||||||
"paintpriority": "",
|
"paintpriority": "",
|
||||||
"refinishhours": "",
|
"refinishhours": "",
|
||||||
|
|||||||
@@ -2078,7 +2078,8 @@
|
|||||||
},
|
},
|
||||||
"errors": {
|
"errors": {
|
||||||
"boardupdate": "",
|
"boardupdate": "",
|
||||||
"removing": ""
|
"removing": "",
|
||||||
|
"settings": ""
|
||||||
},
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"alert": "",
|
"alert": "",
|
||||||
@@ -2087,9 +2088,12 @@
|
|||||||
"bodyhours": "",
|
"bodyhours": "",
|
||||||
"bodypriority": "",
|
"bodypriority": "",
|
||||||
"cardsettings": "",
|
"cardsettings": "",
|
||||||
|
"compact": "",
|
||||||
"detailpriority": "",
|
"detailpriority": "",
|
||||||
|
"employeeassignments": "",
|
||||||
"employeesearch": "",
|
"employeesearch": "",
|
||||||
"jobdetail": "",
|
"jobdetail": "",
|
||||||
|
"laborhrs": "",
|
||||||
"note": "",
|
"note": "",
|
||||||
"paintpriority": "",
|
"paintpriority": "",
|
||||||
"refinishhours": "",
|
"refinishhours": "",
|
||||||
|
|||||||
@@ -12,7 +12,9 @@ export function DateFormatter(props) {
|
|||||||
|
|
||||||
export function DateTimeFormatter(props) {
|
export function DateTimeFormatter(props) {
|
||||||
return props.children
|
return props.children
|
||||||
? moment(props.children).format("MM/DD/YYYY hh:mm a")
|
? moment(props.children).format(
|
||||||
|
props.format ? props.format : "MM/DD/YYYY hh:mm a"
|
||||||
|
)
|
||||||
: null;
|
: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user