diff --git a/bodyshop_translations.babel b/bodyshop_translations.babel index 797cb30cd..e54117a86 100644 --- a/bodyshop_translations.babel +++ b/bodyshop_translations.babel @@ -25448,6 +25448,27 @@ dms + + damageto + false + + + + + + en-US + false + + + es-MX + false + + + fr-CA + false + + + defaultstory false diff --git a/client/src/components/dms-post-form/dms-post-form.component.jsx b/client/src/components/dms-post-form/dms-post-form.component.jsx index a5f454d4c..86425750d 100644 --- a/client/src/components/dms-post-form/dms-post-form.component.jsx +++ b/client/src/components/dms-post-form/dms-post-form.component.jsx @@ -2,7 +2,6 @@ import { DeleteFilled, DownOutlined } from "@ant-design/icons"; import { Button, Card, - DatePicker, Divider, Dropdown, Form, @@ -15,6 +14,7 @@ import { Typography, } from "antd"; import Dinero from "dinero.js"; +import moment from "moment"; import React from "react"; import { useTranslation } from "react-i18next"; import { connect } from "react-redux"; @@ -23,9 +23,9 @@ import { determineDmsType } from "../../pages/dms/dms.container"; import { selectBodyshop } from "../../redux/user/user.selectors"; import DmsCdkMakes from "../dms-cdk-makes/dms-cdk-makes.component"; import DmsCdkMakesRefetch from "../dms-cdk-makes/dms-cdk-makes.refetch.component"; +import FormDatePicker from "../form-date-picker/form-date-picker.component"; import CurrencyInput from "../form-items-formatted/currency-form-item.component"; import LayoutFormRow from "../layout-form-row/layout-form-row.component"; -import moment from "moment"; const mapStateToProps = createStructuredSelector({ bodyshop: selectBodyshop, @@ -80,11 +80,25 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) { layout="vertical" onFinish={handleFinish} initialValues={{ - story: t("jobs.labels.dms.defaultstory", { + story: `${t("jobs.labels.dms.defaultstory", { ro_number: job.ro_number, - area_of_damage: - (job.area_of_damage && job.area_of_damage.impact1) || "UNKNOWN", - }).substr(0, 239), + ownr_nm: `${job.ownr_fn || ""} ${job.ownr_ln || ""} ${ + job.ownr_co_nm || "" + }`, + ins_co_nm: job.ins_co_nm || "N/A", + clm_po: `${job.clm_no ? `${job.clm_no} ` : ""}${ + job.po_number || "" + }`, + })}.${ + job.area_of_damage && job.area_of_damage.impact1 + ? " " + + t("jobs.labels.dms.damageto", { + area_of_damage: + (job.area_of_damage && job.area_of_damage.impact1) || + "UNKNOWN", + }) + : "" + }`.substr(0, 239), inservicedate: moment("2019-01-01"), }} > @@ -162,7 +176,7 @@ export function DmsPostForm({ bodyshop, socket, job, logsRef }) { name="inservicedate" label={t("jobs.fields.dms.inservicedate")} > - +