IO-1894 Add scheduled return to all cc list.

This commit is contained in:
Patrick Fic
2022-05-20 08:53:37 -07:00
parent 43b6bdb024
commit bd8b961bda
2 changed files with 13 additions and 0 deletions

View File

@@ -3,6 +3,7 @@ import { Button, Card, Input, Space, Table } from "antd";
import React, { useState } from "react"; import React, { useState } from "react";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { DateTimeFormatter } from "../../utils/DateFormatter";
import { alphaSort } from "../../utils/sorters"; import { alphaSort } from "../../utils/sorters";
import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component"; import { OwnerNameDisplayFunction } from "../owner-name-display/owner-name-display.component";
@@ -105,6 +106,17 @@ export default function CourtesyCarsList({ loading, courtesycars, refetch }) {
</Link> </Link>
) : null, ) : null,
}, },
{
title: t("contracts.fields.scheduledreturn"),
dataIndex: "scheduledreturn",
key: "scheduledreturn",
render: (text, record) =>
record.cccontracts.length === 1 && (
<DateTimeFormatter>
{record.cccontracts[0].scheduledreturn}
</DateTimeFormatter>
),
},
]; ];
const handleTableChange = (pagination, filters, sorter) => { const handleTableChange = (pagination, filters, sorter) => {

View File

@@ -86,6 +86,7 @@ export const QUERY_ALL_CC = gql`
limit: 1 limit: 1
) { ) {
id id
scheduledreturn
job { job {
id id
ro_number ro_number