Added formrow components and for fields changed components + reformatted couple of job detail screens. BOD-160 BOD-155
This commit is contained in:
@@ -5831,6 +5831,27 @@
|
|||||||
</translation>
|
</translation>
|
||||||
</translations>
|
</translations>
|
||||||
</concept_node>
|
</concept_node>
|
||||||
|
<concept_node>
|
||||||
|
<name>unsavedchangespopup</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>
|
||||||
@@ -10709,6 +10730,95 @@
|
|||||||
</concept_node>
|
</concept_node>
|
||||||
</children>
|
</children>
|
||||||
</folder_node>
|
</folder_node>
|
||||||
|
<folder_node>
|
||||||
|
<name>forms</name>
|
||||||
|
<children>
|
||||||
|
<concept_node>
|
||||||
|
<name>appraiserinfo</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>claiminfo</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>inscoinfo</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>lossinfo</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>
|
||||||
<folder_node>
|
<folder_node>
|
||||||
<name>labels</name>
|
<name>labels</name>
|
||||||
<children>
|
<children>
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
.breadcrumb-container {
|
.breadcrumb-container {
|
||||||
margin: 1rem 4rem;
|
margin: 0.5rem 4rem;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ 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 { Affix } from "antd";
|
||||||
|
import "./chat-affix.styles.scss";
|
||||||
export default function ChatAffixContainer() {
|
export default function ChatAffixContainer() {
|
||||||
const { loading, error, data } = useSubscription(
|
const { loading, error, data } = useSubscription(
|
||||||
CONVERSATION_LIST_SUBSCRIPTION
|
CONVERSATION_LIST_SUBSCRIPTION
|
||||||
@@ -14,7 +14,7 @@ export default function ChatAffixContainer() {
|
|||||||
if (error) return <AlertComponent message={error.message} type='error' />;
|
if (error) return <AlertComponent message={error.message} type='error' />;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Affix offsetBottom={5}>
|
<Affix className='chat-affix'>
|
||||||
<div>
|
<div>
|
||||||
<ChatAffixComponent
|
<ChatAffixComponent
|
||||||
conversationList={(data && data.conversations) || []}
|
conversationList={(data && data.conversations) || []}
|
||||||
|
|||||||
4
client/src/components/chat-affix/chat-affix.styles.scss
Normal file
4
client/src/components/chat-affix/chat-affix.styles.scss
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
.chat-affix {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 2vh;
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { Form } from "antd";
|
||||||
|
import { useTranslation } from "react-i18next";
|
||||||
|
import AlertComponent from "../alert/alert.component";
|
||||||
|
import { Prompt, useLocation } from "react-router-dom";
|
||||||
|
|
||||||
|
export default function FormsFieldChanged({ form }) {
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const handleReset = () => {
|
||||||
|
form.resetFields();
|
||||||
|
};
|
||||||
|
const loc = useLocation();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Form.Item shouldUpdate style={{ margin: 0, padding: 0 }}>
|
||||||
|
{() => {
|
||||||
|
if (form.isFieldsTouched())
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<Prompt
|
||||||
|
when={true}
|
||||||
|
message={(location) => {
|
||||||
|
console.log("location", location);
|
||||||
|
if (loc.pathname === location.pathname) return false;
|
||||||
|
return t("general.messages.unsavedchangespopup");
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<AlertComponent
|
||||||
|
type='warning'
|
||||||
|
message={
|
||||||
|
<div>
|
||||||
|
<span>{t("general.messages.unsavedchanges")}</span>
|
||||||
|
<span
|
||||||
|
onClick={handleReset}
|
||||||
|
style={{
|
||||||
|
cursor: "pointer",
|
||||||
|
textDecoration: "underline",
|
||||||
|
}}>
|
||||||
|
{t("general.actions.reset")}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
return null;
|
||||||
|
}}
|
||||||
|
</Form.Item>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@ function FormItemEmail(props, ref) {
|
|||||||
<Input
|
<Input
|
||||||
{...props}
|
{...props}
|
||||||
addonAfter={
|
addonAfter={
|
||||||
props.defaultValue ? (
|
props.defaultValue || props.value ? (
|
||||||
<a href={`mailto:${props.defaultValue}`}>
|
<a href={`mailto:${props.defaultValue || props.value}`}>
|
||||||
<MailFilled />
|
<MailFilled />
|
||||||
</a>
|
</a>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
export default ({ dmg1, dmg2 }) => (
|
export default ({ dmg1, dmg2 }) => (
|
||||||
<svg
|
<svg
|
||||||
|
style={{ maxHeight: "100%", display: "inline-block" }}
|
||||||
id='svg166'
|
id='svg166'
|
||||||
version='1.1'
|
version='1.1'
|
||||||
viewBox='0 0 1668 1160'
|
viewBox='0 0 1668 1160'
|
||||||
|
|||||||
@@ -1,46 +1,47 @@
|
|||||||
import { Form, Input, Switch } from "antd";
|
import { Form, Input, Switch, InputNumber, Typography } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import FormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
|
||||||
export default function JobsDetailClaims({ job }) {
|
export default function JobsDetailClaims({ job }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Form.Item label={t("jobs.fields.csr")} name="csr">
|
<FormRow>
|
||||||
<Input />
|
<Form.Item label={t("jobs.fields.csr")} name='csr'>
|
||||||
</Form.Item>
|
<Input />
|
||||||
<Form.Item label={t("jobs.fields.loss_desc")} name="loss_desc">
|
</Form.Item>
|
||||||
<Input />
|
<Form.Item label={t("jobs.fields.ponumber")} name='po_number'>
|
||||||
</Form.Item>
|
<Input />
|
||||||
TODO How to handle different taxes and marking them as exempt?
|
</Form.Item>
|
||||||
{
|
<Form.Item label={t("jobs.fields.unitnumber")} name='unit_number'>
|
||||||
// <Form.Item label={t("jobs.fields.exempt")}>
|
<Input />
|
||||||
// {getFieldDecorator("exempt", {
|
</Form.Item>
|
||||||
// initialValue: job.exempt
|
</FormRow>
|
||||||
// })(<Input name='exempt' />)}
|
|
||||||
// </Form.Item>
|
<FormRow>
|
||||||
}
|
<Form.Item label={t("jobs.fields.kmin")} name='kmin'>
|
||||||
<Form.Item label={t("jobs.fields.ponumber")} name="po_number">
|
<InputNumber precision={1} />
|
||||||
<Input />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item label={t("jobs.fields.kmout")} name='kmout'>
|
||||||
<Form.Item label={t("jobs.fields.unitnumber")} name="unit_number">
|
<InputNumber precision={1} />
|
||||||
<Input />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item
|
||||||
<Form.Item
|
label={t("jobs.fields.exempt")}
|
||||||
label={t("jobs.fields.specialcoveragepolicy")}
|
valuePropName='checked'
|
||||||
valuePropName="checked"
|
name='exempt'>
|
||||||
name="special_coverage_policy"
|
<Switch />
|
||||||
>
|
</Form.Item>
|
||||||
<Switch />
|
<Form.Item
|
||||||
</Form.Item>
|
label={t("jobs.fields.specialcoveragepolicy")}
|
||||||
<Form.Item label={t("jobs.fields.kmin")} name="kmin">
|
valuePropName='checked'
|
||||||
<Input />
|
name='special_coverage_policy'>
|
||||||
</Form.Item>
|
<Switch />
|
||||||
<Form.Item label={t("jobs.fields.kmout")} name="kmout">
|
</Form.Item>
|
||||||
<Input />
|
</FormRow>
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label={t("jobs.fields.referralsource")} name="referral_source">
|
<Form.Item label={t("jobs.fields.referralsource")} name='referral_source'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,117 +1,133 @@
|
|||||||
import { DatePicker, Divider, Form, Input } from "antd";
|
import { DatePicker, Divider, Form, Input, Typography } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
import FormItemEmail from "../form-items-formatted/email-form-item.component";
|
||||||
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
|
import FormItemPhone from "../form-items-formatted/phone-form-item.component";
|
||||||
|
import FormRow from "../layout-form-row/layout-form-row.component";
|
||||||
|
import Car from "../job-damage-visual/job-damage-visual.component";
|
||||||
|
|
||||||
export default function JobsDetailInsurance({ job, form }) {
|
export default function JobsDetailInsurance({ job, form }) {
|
||||||
const { getFieldValue } = form;
|
const { getFieldValue } = form;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
//initialValue: job.loss_date ? moment(job.loss_date) : null
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Form.Item label={t("jobs.fields.ins_co_id")} name="ins_co_id">
|
<FormRow header={t("jobs.forms.inscoinfo")}>
|
||||||
<Input />
|
<Form.Item label={t("jobs.fields.ins_co_id")} name='ins_co_id'>
|
||||||
</Form.Item>
|
<Input />
|
||||||
<Form.Item label={t("jobs.fields.policy_no")} name="policy_no">
|
</Form.Item>
|
||||||
<Input />
|
<Form.Item label={t("jobs.fields.ins_co_nm")} name='ins_co_nm'>
|
||||||
</Form.Item>
|
<Input />
|
||||||
<Form.Item label={t("jobs.fields.clm_no")} name="clm_no">
|
</Form.Item>
|
||||||
<Input />
|
<Form.Item label={t("jobs.fields.ins_addr1")} name='ins_addr1'>
|
||||||
</Form.Item>
|
<Input />
|
||||||
<Form.Item label={t("jobs.fields.regie_number")} name="regie_number">
|
</Form.Item>
|
||||||
<Input />
|
<Form.Item label={t("jobs.fields.ins_city")} name='ins_city'>
|
||||||
</Form.Item>
|
<Input />
|
||||||
TODO: missing KOL field???
|
</Form.Item>
|
||||||
<Form.Item label={t("jobs.fields.loss_date")} name="loss_date">
|
</FormRow>
|
||||||
<DatePicker />
|
<FormRow>
|
||||||
</Form.Item>
|
<Form.Item label={t("jobs.fields.ins_ct_ln")} name='ins_ct_ln'>
|
||||||
DAMAGE {JSON.stringify(job.area_of_damage)}
|
<Input />
|
||||||
CAA # seems not correct based on field mapping Class seems not correct
|
</Form.Item>
|
||||||
based on field mapping
|
<Form.Item label={t("jobs.fields.ins_ct_fn")} name='ins_ct_fn'>
|
||||||
<Form.Item label={t("jobs.fields.ins_co_nm")} name="ins_co_nm">
|
<Input />
|
||||||
<Input />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item label={t("jobs.fields.ins_ph1")} name='ins_ph1'>
|
||||||
<Form.Item label={t("jobs.fields.ins_addr1")} name="ins_addr1">
|
<FormItemPhone customInput={Input} />
|
||||||
<Input />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item
|
||||||
<Form.Item label={t("jobs.fields.ins_city")} name="ins_city">
|
label={t("jobs.fields.ins_ea")}
|
||||||
<Input />
|
name='ins_ea'
|
||||||
</Form.Item>
|
rules={[
|
||||||
<Form.Item label={t("jobs.fields.ins_ct_ln")} name="ins_ct_ln">
|
{
|
||||||
<Input />
|
type: "email",
|
||||||
</Form.Item>
|
message: "This is not a valid email address.",
|
||||||
<Form.Item label={t("jobs.fields.ins_ct_fn")} name="ins_ct_fn">
|
},
|
||||||
<Input />
|
]}>
|
||||||
</Form.Item>
|
<FormItemEmail email={getFieldValue("ins_ea")} />
|
||||||
<Form.Item label={t("jobs.fields.ins_ph1")} name="ins_ph1">
|
</Form.Item>
|
||||||
<FormItemPhone customInput={Input} />
|
</FormRow>
|
||||||
</Form.Item>
|
<FormRow header={t("jobs.forms.claiminfo")}>
|
||||||
<Form.Item
|
<Form.Item label={t("jobs.fields.clm_no")} name='clm_no'>
|
||||||
label={t("jobs.fields.ins_ea")}
|
<Input />
|
||||||
name="ins_ea"
|
</Form.Item>
|
||||||
rules={[
|
<Form.Item label={t("jobs.fields.policy_no")} name='policy_no'>
|
||||||
{
|
<Input />
|
||||||
type: "email",
|
</Form.Item>
|
||||||
message: "This is not a valid email address.",
|
<Form.Item label={t("jobs.fields.regie_number")} name='regie_number'>
|
||||||
},
|
<Input />
|
||||||
]}
|
</Form.Item>
|
||||||
>
|
</FormRow>
|
||||||
<FormItemEmail email={getFieldValue("ins_ea")} />
|
<FormRow header={t("jobs.forms.lossinfo")}>
|
||||||
</Form.Item>
|
<div style={{ display: "inline", height: "8rem" }}>
|
||||||
<Divider />
|
{job.area_of_damage ? (
|
||||||
Appraiser Info
|
<Car
|
||||||
<Form.Item label={t("jobs.fields.est_co_nm")} name="est_co_nm">
|
dmg1={job.area_of_damage.impact1 || null}
|
||||||
<Input />
|
dmg2={job.area_of_damage.impact2 || null}
|
||||||
</Form.Item>
|
/>
|
||||||
<Form.Item label={t("jobs.fields.est_ct_fn")} name="est_ct_fn">
|
) : (
|
||||||
<Input />
|
t("jobs.errors.nodamage")
|
||||||
</Form.Item>
|
)}
|
||||||
<Form.Item label={t("jobs.fields.est_ct_ln")} name="est_ct_ln">
|
</div>
|
||||||
<Input />
|
<Form.Item label={t("jobs.fields.loss_desc")} name='loss_desc'>
|
||||||
</Form.Item>
|
<Input />
|
||||||
TODO: Field is pay date but title is inspection date. Likely incorrect?
|
</Form.Item>
|
||||||
<Form.Item label={t("jobs.fields.pay_date")} name="pay_date">
|
<Form.Item label={t("jobs.fields.loss_date")} name='loss_date'>
|
||||||
<Input />
|
<DatePicker />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item label={t("jobs.fields.est_ph1")} name="est_ph1">
|
</FormRow>
|
||||||
<Input />
|
<FormRow header={t("jobs.forms.appraiserinfo")}>
|
||||||
</Form.Item>
|
<Form.Item label={t("jobs.fields.est_co_nm")} name='est_co_nm'>
|
||||||
<Form.Item
|
<Input />
|
||||||
label={t("jobs.fields.est_ea")}
|
</Form.Item>
|
||||||
name="est_ea"
|
<Form.Item label={t("jobs.fields.est_ct_fn")} name='est_ct_fn'>
|
||||||
rules={[
|
<Input />
|
||||||
{
|
</Form.Item>
|
||||||
type: "email",
|
<Form.Item label={t("jobs.fields.est_ct_ln")} name='est_ct_ln'>
|
||||||
message: "This is not a valid email address.",
|
<Input />
|
||||||
},
|
</Form.Item>
|
||||||
]}
|
<Form.Item label={t("jobs.fields.est_ph1")} name='est_ph1'>
|
||||||
>
|
<Input />
|
||||||
<FormItemEmail email={getFieldValue("est_ea")} />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item
|
||||||
<Form.Item label={t("jobs.fields.selling_dealer")} name="selling_dealer">
|
label={t("jobs.fields.est_ea")}
|
||||||
<Input />
|
name='est_ea'
|
||||||
</Form.Item>
|
rules={[
|
||||||
<Form.Item
|
{
|
||||||
label={t("jobs.fields.servicing_dealer")}
|
type: "email",
|
||||||
name="servicing_dealer"
|
message: "This is not a valid email address.",
|
||||||
>
|
},
|
||||||
<Input />
|
]}>
|
||||||
</Form.Item>
|
<FormItemEmail email={getFieldValue("est_ea")} />
|
||||||
<Form.Item
|
</Form.Item>
|
||||||
label={t("jobs.fields.selling_dealer_contact")}
|
</FormRow>
|
||||||
name="selling_dealer_contact"
|
<FormRow header='TODO: TO BE PLACED'>
|
||||||
>
|
<Form.Item label={t("jobs.fields.pay_date")} name='pay_date'>
|
||||||
<Input />
|
<Input />
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
label={t("jobs.fields.servicing_dealer_contact")}
|
label={t("jobs.fields.selling_dealer")}
|
||||||
name="servicing_dealer_contact"
|
name='selling_dealer'>
|
||||||
>
|
<Input />
|
||||||
<Input />
|
</Form.Item>
|
||||||
</Form.Item>
|
<Form.Item
|
||||||
TODO: Adding servicing/selling dealer contact info?
|
label={t("jobs.fields.servicing_dealer")}
|
||||||
|
name='servicing_dealer'>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.selling_dealer_contact")}
|
||||||
|
name='selling_dealer_contact'>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.servicing_dealer_contact")}
|
||||||
|
name='servicing_dealer_contact'>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
TODO: Adding servicing/selling dealer contact info?
|
||||||
|
</FormRow>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import React from "react";
|
||||||
|
import { Row, Col, Typography } from "antd";
|
||||||
|
|
||||||
|
export default function LayoutFormRow({ header, children }) {
|
||||||
|
if (!!!children.length) {
|
||||||
|
//We have only one element. It's going to get the whole thing.
|
||||||
|
return children;
|
||||||
|
}
|
||||||
|
const rowGutter = { gutter: [32, 32] };
|
||||||
|
const colSpan = (maxspan) => {
|
||||||
|
console.log("maxspan", maxspan);
|
||||||
|
return {
|
||||||
|
xs: {
|
||||||
|
span: 24,
|
||||||
|
},
|
||||||
|
md: {
|
||||||
|
span: !!maxspan ? Math.min(12, maxspan) : 12,
|
||||||
|
},
|
||||||
|
lg: {
|
||||||
|
span: !!maxspan
|
||||||
|
? Math.min(Math.max(24 / children.length, 6), maxspan)
|
||||||
|
: Math.max(24 / children.length, 6),
|
||||||
|
},
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
{header ? <Typography.Title level={4}>{header}</Typography.Title> : null}
|
||||||
|
<Row {...rowGutter}>
|
||||||
|
{children.map((c, idx) => (
|
||||||
|
<Col key={idx} {...colSpan(c.props && c.props.maxspan)}>
|
||||||
|
{c}
|
||||||
|
</Col>
|
||||||
|
))}
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -5,7 +5,6 @@ import { Calendar, momentLocalizer } from "react-big-calendar";
|
|||||||
import { useHistory, useLocation } from "react-router-dom";
|
import { useHistory, useLocation } from "react-router-dom";
|
||||||
import Event from "../schedule-event/schedule-event.container";
|
import Event from "../schedule-event/schedule-event.container";
|
||||||
import HeaderComponent from "./schedule-calendar-header.component";
|
import HeaderComponent from "./schedule-calendar-header.component";
|
||||||
//import "react-big-calendar/lib/css/react-big-calendar.css";
|
|
||||||
import "./schedule-calendar.styles.scss";
|
import "./schedule-calendar.styles.scss";
|
||||||
|
|
||||||
const localizer = momentLocalizer(moment);
|
const localizer = momentLocalizer(moment);
|
||||||
@@ -45,7 +44,6 @@ export default function ScheduleCalendarWrapperComponent({
|
|||||||
components={{
|
components={{
|
||||||
event: (e) => Event({ event: e.event, refetch: refetch }),
|
event: (e) => Event({ event: e.event, refetch: refetch }),
|
||||||
header: HeaderComponent,
|
header: HeaderComponent,
|
||||||
toolbar: null,
|
|
||||||
}}
|
}}
|
||||||
{...otherProps}
|
{...otherProps}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import React from "react";
|
|||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
import { setModalContext } from "../../redux/modals/modals.actions";
|
import { setModalContext } from "../../redux/modals/modals.actions";
|
||||||
//import "react-big-calendar/lib/css/react-big-calendar.css";
|
|
||||||
import ScheduleCalendarWrapperComponent from "../schedule-calendar-wrapper/scheduler-calendar-wrapper.component";
|
import ScheduleCalendarWrapperComponent from "../schedule-calendar-wrapper/scheduler-calendar-wrapper.component";
|
||||||
import ScheduleModal from "../schedule-job-modal/schedule-job-modal.container";
|
import ScheduleModal from "../schedule-job-modal/schedule-job-modal.container";
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import "react-big-calendar/lib/css/react-big-calendar.css";
|
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import ScheduleCalendarWrapperComponent from "../schedule-calendar-wrapper/scheduler-calendar-wrapper.component";
|
import ScheduleCalendarWrapperComponent from "../schedule-calendar-wrapper/scheduler-calendar-wrapper.component";
|
||||||
|
|
||||||
|
|||||||
@@ -54,10 +54,6 @@ export function SignInComponent({
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleLogin = () => {
|
|
||||||
form.submit();
|
|
||||||
};
|
|
||||||
|
|
||||||
if (currentUser.authorized === true) return <Redirect to='/manage' />;
|
if (currentUser.authorized === true) return <Redirect to='/manage' />;
|
||||||
return (
|
return (
|
||||||
<div className='login-container'>
|
<div className='login-container'>
|
||||||
|
|||||||
@@ -23,6 +23,7 @@ import { createStructuredSelector } from "reselect";
|
|||||||
import { CalculateJob } from "../../components/job-totals-table/job-totals.utility";
|
import { CalculateJob } from "../../components/job-totals-table/job-totals.utility";
|
||||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||||
|
import FormFieldsChanged from "../../components/form-fields-changed-alert/form-fields-changed-alert.component";
|
||||||
|
|
||||||
const JobsLinesContainer = lazy(() =>
|
const JobsLinesContainer = lazy(() =>
|
||||||
import("../../components/job-detail-lines/job-lines.container")
|
import("../../components/job-detail-lines/job-lines.container")
|
||||||
@@ -96,14 +97,8 @@ export function JobsDetailPage({
|
|||||||
|
|
||||||
const search = queryString.parse(useLocation().search);
|
const search = queryString.parse(useLocation().search);
|
||||||
const formItemLayout = {
|
const formItemLayout = {
|
||||||
labelCol: {
|
layout: "vertical",
|
||||||
xs: { span: 12 },
|
// size: "small",
|
||||||
sm: { span: 5 },
|
|
||||||
},
|
|
||||||
wrapperCol: {
|
|
||||||
xs: { span: 24 },
|
|
||||||
sm: { span: 12 },
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleFinish = (values) => {
|
const handleFinish = (values) => {
|
||||||
@@ -134,7 +129,6 @@ export function JobsDetailPage({
|
|||||||
<JobLineUpsertModalContainer />
|
<JobLineUpsertModalContainer />
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
//onFieldsChange={(a, b) => console.log("a,b", a, b)}
|
|
||||||
name='JobDetailForm'
|
name='JobDetailForm'
|
||||||
onFinish={handleFinish}
|
onFinish={handleFinish}
|
||||||
{...formItemLayout}
|
{...formItemLayout}
|
||||||
@@ -143,6 +137,8 @@ export function JobsDetailPage({
|
|||||||
...job,
|
...job,
|
||||||
loss_date: job.loss_date ? moment(job.loss_date) : null,
|
loss_date: job.loss_date ? moment(job.loss_date) : null,
|
||||||
}}>
|
}}>
|
||||||
|
<FormFieldsChanged form={form} />
|
||||||
|
|
||||||
<JobsDetailHeader
|
<JobsDetailHeader
|
||||||
job={job}
|
job={job}
|
||||||
mutationConvertJob={mutationConvertJob}
|
mutationConvertJob={mutationConvertJob}
|
||||||
@@ -221,7 +217,7 @@ export function JobsDetailPage({
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
key='dates'>
|
key='dates'>
|
||||||
<JobsDetailDatesComponent job={job} />}
|
<JobsDetailDatesComponent job={job} />
|
||||||
</Tabs.TabPane>
|
</Tabs.TabPane>
|
||||||
<Tabs.TabPane
|
<Tabs.TabPane
|
||||||
tab={
|
tab={
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import ChatAffixContainer from "../../components/chat-affix/chat-affix.container
|
|||||||
import ConflictComponent from "../../components/conflict/conflict.component";
|
import ConflictComponent from "../../components/conflict/conflict.component";
|
||||||
import ErrorBoundary from "../../components/error-boundary/error-boundary.component";
|
import ErrorBoundary from "../../components/error-boundary/error-boundary.component";
|
||||||
import FcmNotification from "../../components/fcm-notification/fcm-notification.component";
|
import FcmNotification from "../../components/fcm-notification/fcm-notification.component";
|
||||||
import FooterComponent from "../../components/footer/footer.component";
|
//import FooterComponent from "../../components/footer/footer.component";
|
||||||
//Component Imports
|
//Component Imports
|
||||||
import HeaderContainer from "../../components/header/header.container";
|
import HeaderContainer from "../../components/header/header.container";
|
||||||
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
import LoadingSpinner from "../../components/loading-spinner/loading-spinner.component";
|
||||||
@@ -110,7 +110,7 @@ const ShopCsiPageContainer = lazy(() =>
|
|||||||
import("../shop-csi/shop-csi.container.page")
|
import("../shop-csi/shop-csi.container.page")
|
||||||
);
|
);
|
||||||
|
|
||||||
const { Content, Footer } = Layout;
|
const { Content } = Layout;
|
||||||
|
|
||||||
const stripePromise = new Promise((resolve, reject) => {
|
const stripePromise = new Promise((resolve, reject) => {
|
||||||
client.query({ query: QUERY_STRIPE_ID }).then((resp) => {
|
client.query({ query: QUERY_STRIPE_ID }).then((resp) => {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
.content-container {
|
.content-container {
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
margin: 0.5rem 1.5rem;
|
margin: 0rem 1.5rem;
|
||||||
padding: 1.5rem;
|
padding: 0.5rem 1.5rem;
|
||||||
|
border-radius: 12px;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -347,7 +347,7 @@
|
|||||||
"edit": "Edit",
|
"edit": "Edit",
|
||||||
"login": "Login",
|
"login": "Login",
|
||||||
"refresh": "Refresh",
|
"refresh": "Refresh",
|
||||||
"reset": "Reset to original.",
|
"reset": " Reset your changes.",
|
||||||
"save": "Save",
|
"save": "Save",
|
||||||
"saveandnew": "Save and New",
|
"saveandnew": "Save and New",
|
||||||
"submit": "Submit",
|
"submit": "Submit",
|
||||||
@@ -385,7 +385,8 @@
|
|||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"exception": "$t(titles.app) has encountered an error. Please try again. If the problem persists, please submit a support ticket or contact us.",
|
"exception": "$t(titles.app) has encountered an error. Please try again. If the problem persists, please submit a support ticket or contact us.",
|
||||||
"unsavedchanges": "You have unsaved changes."
|
"unsavedchanges": "You have unsaved changes.",
|
||||||
|
"unsavedchangespopup": "You have unsaved changes. Are you sure you want to leave?"
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
"invalidemail": "Please enter a valid email.",
|
"invalidemail": "Please enter a valid email.",
|
||||||
@@ -617,7 +618,7 @@
|
|||||||
"pap": "EOM Partial",
|
"pap": "EOM Partial",
|
||||||
"par": "Re-cored",
|
"par": "Re-cored",
|
||||||
"pas": "Sublet",
|
"pas": "Sublet",
|
||||||
"pay_date": "Inspection Date",
|
"pay_date": "Pay Date",
|
||||||
"phoneshort": "PH",
|
"phoneshort": "PH",
|
||||||
"policy_no": "Policy #",
|
"policy_no": "Policy #",
|
||||||
"ponumber": "PO Number",
|
"ponumber": "PO Number",
|
||||||
@@ -665,6 +666,12 @@
|
|||||||
"uploaded_by": "Uploaded By",
|
"uploaded_by": "Uploaded By",
|
||||||
"vehicle": "Vehicle"
|
"vehicle": "Vehicle"
|
||||||
},
|
},
|
||||||
|
"forms": {
|
||||||
|
"appraiserinfo": "Appraiser Info",
|
||||||
|
"claiminfo": "Claim Information",
|
||||||
|
"inscoinfo": "Insurance Company Information",
|
||||||
|
"lossinfo": "Loss Information"
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"allocations": "Allocations",
|
"allocations": "Allocations",
|
||||||
"appointmentconfirmation": "Send confirmation to customer?",
|
"appointmentconfirmation": "Send confirmation to customer?",
|
||||||
|
|||||||
@@ -347,7 +347,7 @@
|
|||||||
"edit": "Editar",
|
"edit": "Editar",
|
||||||
"login": "",
|
"login": "",
|
||||||
"refresh": "",
|
"refresh": "",
|
||||||
"reset": "Restablecer a original.",
|
"reset": " Restablecer a original.",
|
||||||
"save": "Salvar",
|
"save": "Salvar",
|
||||||
"saveandnew": "",
|
"saveandnew": "",
|
||||||
"submit": "",
|
"submit": "",
|
||||||
@@ -385,7 +385,8 @@
|
|||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"exception": "",
|
"exception": "",
|
||||||
"unsavedchanges": "Usted tiene cambios no guardados."
|
"unsavedchanges": "Usted tiene cambios no guardados.",
|
||||||
|
"unsavedchangespopup": ""
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
"invalidemail": "Por favor introduzca una dirección de correo electrónico válida.",
|
"invalidemail": "Por favor introduzca una dirección de correo electrónico válida.",
|
||||||
@@ -617,7 +618,7 @@
|
|||||||
"pap": "",
|
"pap": "",
|
||||||
"par": "",
|
"par": "",
|
||||||
"pas": "",
|
"pas": "",
|
||||||
"pay_date": "Fecha de inspección",
|
"pay_date": "Fecha de Pay",
|
||||||
"phoneshort": "PH",
|
"phoneshort": "PH",
|
||||||
"policy_no": "Política #",
|
"policy_no": "Política #",
|
||||||
"ponumber": "numero postal",
|
"ponumber": "numero postal",
|
||||||
@@ -665,6 +666,12 @@
|
|||||||
"uploaded_by": "Subido por",
|
"uploaded_by": "Subido por",
|
||||||
"vehicle": "Vehículo"
|
"vehicle": "Vehículo"
|
||||||
},
|
},
|
||||||
|
"forms": {
|
||||||
|
"appraiserinfo": "",
|
||||||
|
"claiminfo": "",
|
||||||
|
"inscoinfo": "",
|
||||||
|
"lossinfo": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"allocations": "",
|
"allocations": "",
|
||||||
"appointmentconfirmation": "¿Enviar confirmación al cliente?",
|
"appointmentconfirmation": "¿Enviar confirmación al cliente?",
|
||||||
|
|||||||
@@ -347,7 +347,7 @@
|
|||||||
"edit": "modifier",
|
"edit": "modifier",
|
||||||
"login": "",
|
"login": "",
|
||||||
"refresh": "",
|
"refresh": "",
|
||||||
"reset": "Rétablir l'original.",
|
"reset": " Rétablir l'original.",
|
||||||
"save": "sauvegarder",
|
"save": "sauvegarder",
|
||||||
"saveandnew": "",
|
"saveandnew": "",
|
||||||
"submit": "",
|
"submit": "",
|
||||||
@@ -385,7 +385,8 @@
|
|||||||
},
|
},
|
||||||
"messages": {
|
"messages": {
|
||||||
"exception": "",
|
"exception": "",
|
||||||
"unsavedchanges": "Vous avez des changements non enregistrés."
|
"unsavedchanges": "Vous avez des changements non enregistrés.",
|
||||||
|
"unsavedchangespopup": ""
|
||||||
},
|
},
|
||||||
"validation": {
|
"validation": {
|
||||||
"invalidemail": "S'il vous plaît entrer un email valide.",
|
"invalidemail": "S'il vous plaît entrer un email valide.",
|
||||||
@@ -617,7 +618,7 @@
|
|||||||
"pap": "",
|
"pap": "",
|
||||||
"par": "",
|
"par": "",
|
||||||
"pas": "",
|
"pas": "",
|
||||||
"pay_date": "Date d'inspection",
|
"pay_date": "Date d'Pay",
|
||||||
"phoneshort": "PH",
|
"phoneshort": "PH",
|
||||||
"policy_no": "Politique #",
|
"policy_no": "Politique #",
|
||||||
"ponumber": "Numéro de bon de commande",
|
"ponumber": "Numéro de bon de commande",
|
||||||
@@ -665,6 +666,12 @@
|
|||||||
"uploaded_by": "Telechargé par",
|
"uploaded_by": "Telechargé par",
|
||||||
"vehicle": "Véhicule"
|
"vehicle": "Véhicule"
|
||||||
},
|
},
|
||||||
|
"forms": {
|
||||||
|
"appraiserinfo": "",
|
||||||
|
"claiminfo": "",
|
||||||
|
"inscoinfo": "",
|
||||||
|
"lossinfo": ""
|
||||||
|
},
|
||||||
"labels": {
|
"labels": {
|
||||||
"allocations": "",
|
"allocations": "",
|
||||||
"appointmentconfirmation": "Envoyer une confirmation au client?",
|
"appointmentconfirmation": "Envoyer une confirmation au client?",
|
||||||
|
|||||||
Reference in New Issue
Block a user