Fix up damage SVG display.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -9,11 +9,10 @@ export default function JobDetailCardsDamageComponent({ loading, data }) {
|
|||||||
return (
|
return (
|
||||||
<CardTemplate loading={loading} title={t("jobs.labels.cards.damage")}>
|
<CardTemplate loading={loading} title={t("jobs.labels.cards.damage")}>
|
||||||
{area_of_damage ? (
|
{area_of_damage ? (
|
||||||
<Car
|
<Car dmg1={area_of_damage.impact1} dmg2={area_of_damage.impact2} />
|
||||||
dmg1={area_of_damage.impact1 || null}
|
) : (
|
||||||
dmg2={area_of_damage.impact2 || null}
|
t("jobs.errors.nodamage")
|
||||||
/>
|
)}
|
||||||
) : t("jobs.errors.nodamage")}
|
|
||||||
</CardTemplate>
|
</CardTemplate>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { Form, Input, InputNumber, Select, Switch } from "antd";
|
import { Col, Form, Input, InputNumber, Row, Select, Switch } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -19,6 +19,8 @@ const mapDispatchToProps = (dispatch) => ({
|
|||||||
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
//setUserLanguage: language => dispatch(setUserLanguage(language))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const lossColFields = { sm: { span: 24 }, md: { span: 18 }, lg: { span: 20 } };
|
||||||
|
const lossColDamage = { sm: { span: 24 }, md: { span: 6 }, lg: { span: 4 } };
|
||||||
export function JobsDetailGeneral({ bodyshop, job, form }) {
|
export function JobsDetailGeneral({ bodyshop, job, form }) {
|
||||||
const { getFieldValue } = form;
|
const { getFieldValue } = form;
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
@@ -97,50 +99,54 @@ export function JobsDetailGeneral({ bodyshop, job, form }) {
|
|||||||
</Select>
|
</Select>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
</FormRow>
|
</FormRow>
|
||||||
|
<Row gutter={[16, 16]}>
|
||||||
<FormRow header={t("jobs.forms.lossinfo")} grow>
|
<Col {...lossColFields}>
|
||||||
<div style={{ display: "inline", height: "8rem" }}>
|
<FormRow header={t("jobs.forms.lossinfo")}>
|
||||||
|
<Form.Item label={t("jobs.fields.loss_desc")} name="loss_desc">
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("jobs.fields.loss_date")} name="loss_date">
|
||||||
|
<FormDatePicker />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("jobs.fields.kmin")} name="kmin">
|
||||||
|
<InputNumber precision={1} min={0} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("jobs.fields.kmout")} name="kmout">
|
||||||
|
<InputNumber precision={1} min={0} />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("jobs.fields.ponumber")} name="po_number">
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item label={t("jobs.fields.unitnumber")} name="unit_number">
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.specialcoveragepolicy")}
|
||||||
|
valuePropName="checked"
|
||||||
|
name="special_coverage_policy"
|
||||||
|
>
|
||||||
|
<Switch />
|
||||||
|
</Form.Item>
|
||||||
|
<Form.Item
|
||||||
|
label={t("jobs.fields.tax_registration_number")}
|
||||||
|
name="tax_registration_number"
|
||||||
|
>
|
||||||
|
<Input />
|
||||||
|
</Form.Item>
|
||||||
|
</FormRow>
|
||||||
|
</Col>
|
||||||
|
<Col {...lossColDamage}>
|
||||||
{job.area_of_damage ? (
|
{job.area_of_damage ? (
|
||||||
<Car
|
<Car
|
||||||
dmg1={job.area_of_damage.impact1 || null}
|
dmg1={job.area_of_damage.impact1}
|
||||||
dmg2={job.area_of_damage.impact2 || null}
|
dmg2={job.area_of_damage.impact2}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
t("jobs.errors.nodamage")
|
t("jobs.errors.nodamage")
|
||||||
)}
|
)}
|
||||||
</div>
|
</Col>
|
||||||
<Form.Item label={t("jobs.fields.loss_desc")} name="loss_desc">
|
</Row>
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label={t("jobs.fields.loss_date")} name="loss_date">
|
|
||||||
<FormDatePicker />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label={t("jobs.fields.kmin")} name="kmin">
|
|
||||||
<InputNumber precision={1} min={0} />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label={t("jobs.fields.kmout")} name="kmout">
|
|
||||||
<InputNumber precision={1} min={0} />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label={t("jobs.fields.ponumber")} name="po_number">
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item label={t("jobs.fields.unitnumber")} name="unit_number">
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("jobs.fields.specialcoveragepolicy")}
|
|
||||||
valuePropName="checked"
|
|
||||||
name="special_coverage_policy"
|
|
||||||
>
|
|
||||||
<Switch />
|
|
||||||
</Form.Item>
|
|
||||||
<Form.Item
|
|
||||||
label={t("jobs.fields.tax_registration_number")}
|
|
||||||
name="tax_registration_number"
|
|
||||||
>
|
|
||||||
<Input />
|
|
||||||
</Form.Item>
|
|
||||||
</FormRow>
|
|
||||||
<FormRow header={t("jobs.forms.appraiserinfo")}>
|
<FormRow header={t("jobs.forms.appraiserinfo")}>
|
||||||
<Form.Item label={t("jobs.fields.est_co_nm")} name="est_co_nm">
|
<Form.Item label={t("jobs.fields.est_co_nm")} name="est_co_nm">
|
||||||
<Input />
|
<Input />
|
||||||
|
|||||||
Reference in New Issue
Block a user