BOD-53 added owner popover for tag on detail.
This commit is contained in:
@@ -4240,6 +4240,27 @@
|
||||
</translation>
|
||||
</translations>
|
||||
</concept_node>
|
||||
<concept_node>
|
||||
<name>nodamage</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>nodates</name>
|
||||
<definition_loaded>false</definition_loaded>
|
||||
|
||||
@@ -8,7 +8,12 @@ export default function JobDetailCardsDamageComponent({ loading, data }) {
|
||||
const { area_of_damage } = data;
|
||||
return (
|
||||
<CardTemplate loading={loading} title={t("jobs.labels.cards.damage")}>
|
||||
<Car dmg1={area_of_damage.impact1} dmg2={area_of_damage.impact2} />
|
||||
{area_of_damage ? (
|
||||
<Car
|
||||
dmg1={area_of_damage.impact1 || null}
|
||||
dmg2={area_of_damage.impact2 || null}
|
||||
/>
|
||||
) : t("jobs.errors.nodamage")}
|
||||
</CardTemplate>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,16 @@
|
||||
import { DownCircleFilled } from "@ant-design/icons";
|
||||
import { Avatar, Badge, Button, Checkbox, Descriptions, Dropdown, Menu, notification, PageHeader, Tag } from "antd";
|
||||
import {
|
||||
Avatar,
|
||||
Badge,
|
||||
Button,
|
||||
Checkbox,
|
||||
Descriptions,
|
||||
Dropdown,
|
||||
Menu,
|
||||
notification,
|
||||
PageHeader,
|
||||
Tag
|
||||
} from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import Moment from "react-moment";
|
||||
@@ -10,6 +21,7 @@ import CarImage from "../../assets/car.svg";
|
||||
import { selectBodyshop } from "../../redux/user/user.selectors";
|
||||
import CurrencyFormatter from "../../utils/CurrencyFormatter";
|
||||
import BarcodePopup from "../barcode-popup/barcode-popup.component";
|
||||
import OwnerTagPopoverComponent from "../owner-tag-popover/owner-tag-popover.component";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({
|
||||
bodyshop: selectBodyshop
|
||||
@@ -100,16 +112,7 @@ export default connect(
|
||||
tags={
|
||||
<span key="job-status">
|
||||
{job.status ? <Tag color="blue">{job.status}</Tag> : null}
|
||||
<Tag color="red">
|
||||
{job.owner ? (
|
||||
<Link to={`/manage/owners/${job.owner.id}`}>
|
||||
{`${job.ownr_co_nm || ""}${job.ownr_fn || ""} ${job.ownr_ln ||
|
||||
""}`}
|
||||
</Link>
|
||||
) : (
|
||||
t("jobs.errors.noowner")
|
||||
)}
|
||||
</Tag>
|
||||
<OwnerTagPopoverComponent job={job} />
|
||||
<Tag color="green">
|
||||
{job.vehicle ? (
|
||||
<Link to={`/manage/vehicles/${job.vehicle.id}`}>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
import { Button, Col, Popover, Row, Tag } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router-dom";
|
||||
|
||||
export default function OwnerTagPopoverComponent({ job }) {
|
||||
const { t } = useTranslation();
|
||||
const content = (
|
||||
<div>
|
||||
The Content
|
||||
<Row>
|
||||
<Col span={12}>Claim Info</Col>
|
||||
<Col span={12}>Owner Info</Col>
|
||||
</Row>
|
||||
<Link to={`/manage/owners/${job.owner.id}`}>
|
||||
<Button>{t("owners.actions.update")}</Button>
|
||||
</Link>
|
||||
</div>
|
||||
);
|
||||
|
||||
return (
|
||||
<Popover placement="bottom" content={content}>
|
||||
<Tag color="red">
|
||||
{job.owner
|
||||
? `${job.ownr_co_nm || ""}${job.ownr_fn || ""} ${job.ownr_ln || ""}`
|
||||
: t("jobs.errors.noowner")}
|
||||
</Tag>
|
||||
</Popover>
|
||||
);
|
||||
}
|
||||
@@ -33,7 +33,7 @@ function JobsCreateContainer({ bodyshop }) {
|
||||
variables: { id: state.owner.selectedid }
|
||||
});
|
||||
}
|
||||
}, [state.owner.selectedid]);
|
||||
}, [state.owner.selectedid, loadOwner]);
|
||||
|
||||
const runInsertJob = job => {
|
||||
console.log("Job To Save", job);
|
||||
|
||||
@@ -312,6 +312,7 @@
|
||||
"creating": "Error encountered while creating job. {{error}}",
|
||||
"deleted": "Error deleting job.",
|
||||
"noaccess": "This job does not exist or you do not have access to it.",
|
||||
"nodamage": "No damage points on estimate.",
|
||||
"nodates": "No dates specified for this job.",
|
||||
"nojobselected": "No job is selected.",
|
||||
"noowner": "No owner associated.",
|
||||
|
||||
@@ -312,6 +312,7 @@
|
||||
"creating": "",
|
||||
"deleted": "Error al eliminar el trabajo.",
|
||||
"noaccess": "Este trabajo no existe o no tiene acceso a él.",
|
||||
"nodamage": "",
|
||||
"nodates": "No hay fechas especificadas para este trabajo.",
|
||||
"nojobselected": "No hay trabajo seleccionado.",
|
||||
"noowner": "Ningún propietario asociado.",
|
||||
|
||||
@@ -312,6 +312,7 @@
|
||||
"creating": "",
|
||||
"deleted": "Erreur lors de la suppression du travail.",
|
||||
"noaccess": "Ce travail n'existe pas ou vous n'y avez pas accès.",
|
||||
"nodamage": "",
|
||||
"nodates": "Aucune date spécifiée pour ce travail.",
|
||||
"nojobselected": "Aucun travail n'est sélectionné.",
|
||||
"noowner": "Aucun propriétaire associé.",
|
||||
|
||||
Reference in New Issue
Block a user