Added intake checklist modification to shop management BOD-128
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<babeledit_project be_version="2.6.1" version="1.2">
|
||||
<babeledit_project version="1.2" be_version="2.6.1">
|
||||
<!--
|
||||
|
||||
BabelEdit project file
|
||||
@@ -6449,6 +6449,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>required</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>search</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -8721,6 +8742,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>intake</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>manualnew</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -10012,6 +10054,74 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<folder_node>
|
||||
<name>intake</name>
|
||||
<children>
|
||||
<concept_node>
|
||||
<name>label</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>name</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>type</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>
|
||||
</folder_node>
|
||||
<concept_node>
|
||||
<name>kmin</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
@@ -12678,6 +12788,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>intake</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>job</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -1,29 +1,16 @@
|
||||
import React from "react";
|
||||
import CheckboxFormItem from "./checkbox/checkbox.component";
|
||||
import Slider from "./slider/slider.component";
|
||||
import Text from "./text/text.component";
|
||||
import Textarea from "./textarea/textarea.component";
|
||||
import Rate from "./rate/rate.component";
|
||||
import FormTypes from "./config-form-types";
|
||||
|
||||
export default function ConfirmFormComponents({ componentList, readOnly }) {
|
||||
return (
|
||||
<div>
|
||||
{componentList.map((f, idx) => {
|
||||
switch (f.type) {
|
||||
case "checkbox":
|
||||
return (
|
||||
<CheckboxFormItem key={idx} formItem={f} readOnly={readOnly} />
|
||||
);
|
||||
case "slider":
|
||||
return <Slider key={idx} formItem={f} readOnly={readOnly} />;
|
||||
case "text":
|
||||
return <Text key={idx} formItem={f} readOnly={readOnly} />;
|
||||
case "textarea":
|
||||
return <Textarea key={idx} formItem={f} readOnly={readOnly} />;
|
||||
case "rate":
|
||||
return <Rate key={idx} formItem={f} readOnly={readOnly} />;
|
||||
default:
|
||||
return <div key={idx}>Error</div>;
|
||||
const Comp = FormTypes[f.type];
|
||||
|
||||
if (!!Comp) {
|
||||
return <Comp key={idx} formItem={f} readOnly={readOnly} />;
|
||||
} else {
|
||||
return <div key={idx}>Error</div>;
|
||||
}
|
||||
})}
|
||||
</div>
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import CheckboxFormItem from "./checkbox/checkbox.component";
|
||||
import Rate from "./rate/rate.component";
|
||||
import Slider from "./slider/slider.component";
|
||||
import Text from "./text/text.component";
|
||||
import Textarea from "./textarea/textarea.component";
|
||||
|
||||
export default {
|
||||
checkbox: CheckboxFormItem,
|
||||
slider: Slider,
|
||||
text: Text,
|
||||
textarea: Textarea,
|
||||
rate: Rate,
|
||||
};
|
||||
@@ -56,6 +56,11 @@ export function JobsDetailHeaderActions({
|
||||
}}>
|
||||
{t("jobs.actions.schedule")}
|
||||
</Menu.Item>
|
||||
<Menu.Item>
|
||||
<Link to={`/manage/jobs/${job.id}/intake`}>
|
||||
{t("jobs.actions.intake")}
|
||||
</Link>
|
||||
</Menu.Item>
|
||||
<Menu.Item
|
||||
key='enterpayments'
|
||||
onClick={() => {
|
||||
|
||||
@@ -15,6 +15,7 @@ import ShopInfoOrderStatusComponent from "./shop-info.orderstatus.component";
|
||||
import ShopInfoResponsibilityCenterComponent from "./shop-info.responsibilitycenters.component";
|
||||
import ShopInfoSchedulingComponent from "./shop-info.scheduling.component";
|
||||
import LayoutFormRow from "../layout-form-row/layout-form-row.component";
|
||||
import ShopInfoIntakeChecklistComponent from "./shop-info.intake.component";
|
||||
|
||||
export default function ShopInfoComponent({ form }) {
|
||||
const { t } = useTranslation();
|
||||
@@ -296,6 +297,12 @@ export default function ShopInfoComponent({ form }) {
|
||||
>
|
||||
<ShopInfoResponsibilityCenterComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
<Collapse.Panel
|
||||
key="intake"
|
||||
header={t("bodyshop.labels.intake")}
|
||||
>
|
||||
<ShopInfoIntakeChecklistComponent form={form} />
|
||||
</Collapse.Panel>
|
||||
</Collapse>
|
||||
</div>
|
||||
);
|
||||
|
||||
131
client/src/components/shop-info/shop-info.intake.component.jsx
Normal file
131
client/src/components/shop-info/shop-info.intake.component.jsx
Normal file
@@ -0,0 +1,131 @@
|
||||
import { DeleteFilled } from "@ant-design/icons";
|
||||
import { Button, Form, Input, Select, Switch } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import styled from "styled-components";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import ConfigFormTypes from "../config-form-components/config-form-types";
|
||||
|
||||
const SelectorDiv = styled.div`
|
||||
.ant-form-item .ant-select {
|
||||
width: 200px;
|
||||
}
|
||||
`;
|
||||
//TODO Fix up styles.
|
||||
export default function ShopInfoIntakeChecklistComponent({ form }) {
|
||||
const { t } = useTranslation();
|
||||
|
||||
return (
|
||||
<div>
|
||||
<Form.List name={["intakechecklist", "form"]}>
|
||||
{(fields, { add, remove }) => {
|
||||
return (
|
||||
<div>
|
||||
{fields.map((field, index) => (
|
||||
<Form.Item key={field.key} style={{ padding: 0, margin: 2 }}>
|
||||
<div className='imex-flex-row'>
|
||||
<Form.Item
|
||||
className='imex-flex-row__margin'
|
||||
label={t("jobs.fields.intake.name")}
|
||||
key={`${index}name`}
|
||||
name={[field.name, "name"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
className='imex-flex-row__margin'
|
||||
label={t("jobs.fields.intake.type")}
|
||||
key={`${index}type`}
|
||||
name={[field.name, "type"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}>
|
||||
<Select>
|
||||
{Object.keys(ConfigFormTypes).map((i, idx) => (
|
||||
<Select.Option key={i} value={i}>
|
||||
{i}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
className='imex-flex-row__margin'
|
||||
label={t("jobs.fields.intake.label")}
|
||||
key={`${index}label`}
|
||||
name={[field.name, "label"]}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
},
|
||||
]}>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
className='imex-flex-row__margin'
|
||||
label={t("general.fields.required")}
|
||||
key={`${index}required`}
|
||||
name={[field.name, "required"]}
|
||||
valuePropName='checked'>
|
||||
<Switch />
|
||||
</Form.Item>
|
||||
|
||||
<DeleteFilled
|
||||
onClick={() => {
|
||||
remove(field.name);
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</Form.Item>
|
||||
))}
|
||||
<Form.Item>
|
||||
<Button
|
||||
type='dashed'
|
||||
onClick={() => {
|
||||
add();
|
||||
}}
|
||||
style={{ width: "100%" }}>
|
||||
{t("general.actions.add")}
|
||||
</Button>
|
||||
</Form.Item>
|
||||
</div>
|
||||
);
|
||||
}}
|
||||
</Form.List>
|
||||
|
||||
<SelectorDiv>
|
||||
<Form.Item
|
||||
name={["intakechecklist", "templates"]}
|
||||
label={t("bodyshop.fields.statuses.open_statuses")}
|
||||
rules={[
|
||||
{
|
||||
required: true,
|
||||
message: t("general.validation.required"),
|
||||
type: "array",
|
||||
},
|
||||
]}>
|
||||
<Select mode='multiple'>
|
||||
{Object.keys(TemplateList).map((i) => (
|
||||
<Select.Option
|
||||
key={TemplateList[i].key}
|
||||
value={TemplateList[i].key}>
|
||||
{TemplateList[i].title}
|
||||
</Select.Option>
|
||||
))}
|
||||
</Select>
|
||||
</Form.Item>
|
||||
</SelectorDiv>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -46,6 +46,7 @@ export const QUERY_BODYSHOP = gql`
|
||||
scoreboard_target
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
@@ -100,6 +101,7 @@ export const UPDATE_SHOP = gql`
|
||||
scoreboard_target
|
||||
md_referral_sources
|
||||
md_messaging_presets
|
||||
intakechecklist
|
||||
employees {
|
||||
id
|
||||
first_name
|
||||
|
||||
@@ -426,6 +426,7 @@
|
||||
"passwordresetsuccess_sub": "You should receive this email in the next few minutes. Please check your email including any junk or spam folders. ",
|
||||
"passwordsdonotmatch": "The passwords you have entered do not match.",
|
||||
"print": "Print",
|
||||
"required": "Required",
|
||||
"search": "Search...",
|
||||
"selectdate": "Select date...",
|
||||
"sendagain": "Send Again",
|
||||
@@ -580,6 +581,7 @@
|
||||
"export": "Export",
|
||||
"exportselected": "Export Selected",
|
||||
"gotojob": "Go to Job",
|
||||
"intake": "Intake",
|
||||
"manualnew": "Create New Job Manually",
|
||||
"mark": "Mark",
|
||||
"postInvoices": "Post Invoices",
|
||||
@@ -645,6 +647,11 @@
|
||||
"ins_ct_ln": "File Handler Last Name",
|
||||
"ins_ea": "File Handler Email",
|
||||
"ins_ph1": "File Handler Phone #",
|
||||
"intake": {
|
||||
"label": "Label",
|
||||
"name": "Name",
|
||||
"type": "Type"
|
||||
},
|
||||
"kmin": "Mileage In",
|
||||
"kmout": "Mileage Out",
|
||||
"la1": "LA1",
|
||||
@@ -779,6 +786,7 @@
|
||||
"hrs_claimed": "Hours Claimed",
|
||||
"hrs_total": "Hours Total",
|
||||
"inproduction": "In Production",
|
||||
"intake": "Job Intake",
|
||||
"job": "Job Details",
|
||||
"jobcosting": "Job Costing",
|
||||
"laborallocations": "Labor Allocations",
|
||||
|
||||
@@ -426,6 +426,7 @@
|
||||
"passwordresetsuccess_sub": "",
|
||||
"passwordsdonotmatch": "",
|
||||
"print": "",
|
||||
"required": "",
|
||||
"search": "Buscar...",
|
||||
"selectdate": "",
|
||||
"sendagain": "",
|
||||
@@ -580,6 +581,7 @@
|
||||
"export": "",
|
||||
"exportselected": "",
|
||||
"gotojob": "",
|
||||
"intake": "",
|
||||
"manualnew": "",
|
||||
"mark": "",
|
||||
"postInvoices": "Contabilizar facturas",
|
||||
@@ -645,6 +647,11 @@
|
||||
"ins_ct_ln": "Apellido del manejador de archivos",
|
||||
"ins_ea": "Correo electrónico del controlador de archivos",
|
||||
"ins_ph1": "File Handler Phone #",
|
||||
"intake": {
|
||||
"label": "",
|
||||
"name": "",
|
||||
"type": ""
|
||||
},
|
||||
"kmin": "Kilometraje en",
|
||||
"kmout": "Kilometraje",
|
||||
"la1": "",
|
||||
@@ -779,6 +786,7 @@
|
||||
"hrs_claimed": "",
|
||||
"hrs_total": "",
|
||||
"inproduction": "",
|
||||
"intake": "",
|
||||
"job": "",
|
||||
"jobcosting": "",
|
||||
"laborallocations": "",
|
||||
|
||||
@@ -426,6 +426,7 @@
|
||||
"passwordresetsuccess_sub": "",
|
||||
"passwordsdonotmatch": "",
|
||||
"print": "",
|
||||
"required": "",
|
||||
"search": "Chercher...",
|
||||
"selectdate": "",
|
||||
"sendagain": "",
|
||||
@@ -580,6 +581,7 @@
|
||||
"export": "",
|
||||
"exportselected": "",
|
||||
"gotojob": "",
|
||||
"intake": "",
|
||||
"manualnew": "",
|
||||
"mark": "",
|
||||
"postInvoices": "Poster des factures",
|
||||
@@ -645,6 +647,11 @@
|
||||
"ins_ct_ln": "Nom du gestionnaire de fichiers",
|
||||
"ins_ea": "Courriel du gestionnaire de fichiers",
|
||||
"ins_ph1": "Numéro de téléphone du gestionnaire de fichiers",
|
||||
"intake": {
|
||||
"label": "",
|
||||
"name": "",
|
||||
"type": ""
|
||||
},
|
||||
"kmin": "Kilométrage en",
|
||||
"kmout": "Kilométrage hors",
|
||||
"la1": "",
|
||||
@@ -779,6 +786,7 @@
|
||||
"hrs_claimed": "",
|
||||
"hrs_total": "",
|
||||
"inproduction": "",
|
||||
"intake": "",
|
||||
"job": "",
|
||||
"jobcosting": "",
|
||||
"laborallocations": "",
|
||||
|
||||
Reference in New Issue
Block a user