IO-2721 Owners Note in Owners Card
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
|||||||
WarningFilled,
|
WarningFilled,
|
||||||
} from "@ant-design/icons";
|
} from "@ant-design/icons";
|
||||||
import { Card, Col, Divider, Row, Space, Tag, Tooltip } from "antd";
|
import { Card, Col, Divider, Row, Space, Tag, Tooltip } from "antd";
|
||||||
|
import moment from "moment";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
@@ -26,7 +27,6 @@ import ProductionListColumnComment from "../production-list-columns/production-l
|
|||||||
import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component";
|
import ProductionListColumnProductionNote from "../production-list-columns/production-list-columns.productionnote.component";
|
||||||
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
import VehicleVinDisplay from "../vehicle-vin-display/vehicle-vin-display.component";
|
||||||
import "./jobs-detail-header.styles.scss";
|
import "./jobs-detail-header.styles.scss";
|
||||||
import moment from "moment";
|
|
||||||
|
|
||||||
const mapStateToProps = createStructuredSelector({
|
const mapStateToProps = createStructuredSelector({
|
||||||
jobRO: selectJobReadOnly,
|
jobRO: selectJobReadOnly,
|
||||||
@@ -101,7 +101,11 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
|||||||
{job.status === bodyshop.md_ro_statuses.default_scheduled &&
|
{job.status === bodyshop.md_ro_statuses.default_scheduled &&
|
||||||
job.scheduled_in ? (
|
job.scheduled_in ? (
|
||||||
<Tag>
|
<Tag>
|
||||||
<Link to={`/manage/schedule?date=${moment(job.scheduled_in).format('YYYY-MM-DD')}`}>
|
<Link
|
||||||
|
to={`/manage/schedule?date=${moment(
|
||||||
|
job.scheduled_in
|
||||||
|
).format("YYYY-MM-DD")}`}
|
||||||
|
>
|
||||||
<DateTimeFormatter>{job.scheduled_in}</DateTimeFormatter>
|
<DateTimeFormatter>{job.scheduled_in}</DateTimeFormatter>
|
||||||
</Link>
|
</Link>
|
||||||
</Tag>
|
</Tag>
|
||||||
@@ -221,6 +225,12 @@ export function JobsDetailHeader({ job, bodyshop, disabled }) {
|
|||||||
{job.owner?.tax_number || ""}
|
{job.owner?.tax_number || ""}
|
||||||
</DataLabel>
|
</DataLabel>
|
||||||
)}
|
)}
|
||||||
|
<DataLabel
|
||||||
|
label={t("owners.fields.note")}
|
||||||
|
valueStyle={{ overflow: "hidden", textOverflow: "ellipsis" }}
|
||||||
|
>
|
||||||
|
{job.owner?.note || ""}
|
||||||
|
</DataLabel>
|
||||||
</div>
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
</Col>
|
</Col>
|
||||||
|
|||||||
@@ -704,6 +704,7 @@ export const GET_JOB_BY_PK = gql`
|
|||||||
other_amount_payable
|
other_amount_payable
|
||||||
owner {
|
owner {
|
||||||
id
|
id
|
||||||
|
note
|
||||||
ownr_fn
|
ownr_fn
|
||||||
ownr_ln
|
ownr_ln
|
||||||
ownr_co_nm
|
ownr_co_nm
|
||||||
|
|||||||
Reference in New Issue
Block a user