diff --git a/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx b/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx
index d47be4d1f..d62d849a1 100644
--- a/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx
+++ b/client/src/components/owner-detail-jobs/owner-detail-jobs.component.jsx
@@ -6,7 +6,8 @@ import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
-import { alphaSort, statusSort } from "../../utils/sorters";
+import { DateTimeFormatter } from "../../utils/DateFormatter";
+import { alphaSort, dateSort, statusSort } from "../../utils/sorters";
import OwnerDetailUpdateJobsComponent from "../owner-detail-update-jobs/owner-detail-update-jobs.component";
const mapStateToProps = createStructuredSelector({
@@ -86,7 +87,18 @@ function OwnerDetailJobsComponent({ bodyshop, owner }) {
})),
onFilter: (value, record) => value.includes(record.status),
},
-
+ {
+ title: t("jobs.fields.actual_completion"),
+ dataIndex: "actual_completion",
+ key: "actual_completion",
+ render: (text, record) => (
+ {record.actual_completion}
+ ),
+ sorter: (a, b) => dateSort(a.actual_completion, b.actual_completion),
+ sortOrder:
+ state.sortedInfo.columnKey === "actual_completion" &&
+ state.sortedInfo.order,
+ },
{
title: t("jobs.fields.clm_total"),
dataIndex: "clm_total",
diff --git a/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx b/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx
index 370142a2a..98be8d233 100644
--- a/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx
+++ b/client/src/components/vehicle-detail-jobs/vehicle-detail-jobs.component.jsx
@@ -6,7 +6,8 @@ import { Link } from "react-router-dom";
import { createStructuredSelector } from "reselect";
import { selectBodyshop } from "../../redux/user/user.selectors";
import CurrencyFormatter from "../../utils/CurrencyFormatter";
-import { alphaSort, statusSort } from "../../utils/sorters";
+import { DateTimeFormatter } from "../../utils/DateFormatter";
+import { alphaSort, dateSort, statusSort } from "../../utils/sorters";
import OwnerNameDisplay, {
OwnerNameDisplayFunction,
} from "../owner-name-display/owner-name-display.component";
@@ -79,7 +80,18 @@ export function VehicleDetailJobsComponent({ vehicle, bodyshop }) {
})),
onFilter: (value, record) => value.includes(record.status),
},
-
+ {
+ title: t("jobs.fields.actual_completion"),
+ dataIndex: "actual_completion",
+ key: "actual_completion",
+ render: (text, record) => (
+ {record.actual_completion}
+ ),
+ sorter: (a, b) => dateSort(a.actual_completion, b.actual_completion),
+ sortOrder:
+ state.sortedInfo.columnKey === "actual_completion" &&
+ state.sortedInfo.order,
+ },
{
title: t("jobs.fields.clm_total"),
dataIndex: "clm_total",
diff --git a/client/src/graphql/owners.queries.js b/client/src/graphql/owners.queries.js
index ea0062cd5..aba6d2dfa 100644
--- a/client/src/graphql/owners.queries.js
+++ b/client/src/graphql/owners.queries.js
@@ -71,6 +71,7 @@ export const QUERY_OWNER_BY_ID = gql`
tax_number
jobs(order_by: { date_open: desc }) {
id
+ actual_completion
ro_number
clm_no
status
diff --git a/client/src/graphql/vehicles.queries.js b/client/src/graphql/vehicles.queries.js
index 1daccc7f5..930af12e5 100644
--- a/client/src/graphql/vehicles.queries.js
+++ b/client/src/graphql/vehicles.queries.js
@@ -30,6 +30,7 @@ export const QUERY_VEHICLE_BY_ID = gql`
notes
jobs(order_by: { date_open: desc }) {
id
+ actual_completion
ro_number
ownr_co_nm
ownr_fn