Replaced null coalescence. Updated dates components.
This commit is contained in:
@@ -1,26 +1,24 @@
|
||||
import React, { useState } from "react";
|
||||
import { Link } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useQuery } from "@apollo/react-hooks";
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import { Button, Icon, PageHeader, Tag } from "antd";
|
||||
import React, { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Link } from "react-router-dom";
|
||||
import { QUERY_JOB_CARD_DETAILS } from "../../graphql/jobs.queries";
|
||||
import { PageHeader, Button, Descriptions, Tag, Icon } from "antd";
|
||||
|
||||
import AlertComponent from "../alert/alert.component";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
|
||||
//import JobDetailCardsHeaderComponent from "./job-detail-cards.header.component";
|
||||
import JobDetailCardsCustomerComponent from "./job-detail-cards.customer.component";
|
||||
import JobDetailCardsVehicleComponent from "./job-detail-cards.vehicle.component";
|
||||
import JobDetailCardsInsuranceComponent from "./job-detail-cards.insurance.component";
|
||||
import JobDetailCardsDatesComponent from "./job-detail-cards.dates.component";
|
||||
import JobDetailCardsPartsComponent from "./job-detail-cards.parts.component";
|
||||
import JobDetailCardsNotesComponent from "./job-detail-cards.notes.component";
|
||||
import JobDetailCardsDamageComponent from "./job-detail-cards.damage.component";
|
||||
import JobDetailCardsTotalsComponent from "./job-detail-cards.totals.component";
|
||||
import JobDetailCardsDatesComponent from "./job-detail-cards.dates.component";
|
||||
import JobDetailCardsDocumentsComponent from "./job-detail-cards.documents.component";
|
||||
import LoadingSpinner from "../loading-spinner/loading-spinner.component";
|
||||
|
||||
import JobDetailCardsInsuranceComponent from "./job-detail-cards.insurance.component";
|
||||
import JobDetailCardsNotesComponent from "./job-detail-cards.notes.component";
|
||||
import JobDetailCardsPartsComponent from "./job-detail-cards.parts.component";
|
||||
import "./job-detail-cards.styles.scss";
|
||||
import LoadingSkeleton from "../loading-skeleton/loading-skeleton.component";
|
||||
import NoteUpsertModal from "../note-upsert-modal/note-upsert-modal.container";
|
||||
import JobDetailCardsTotalsComponent from "./job-detail-cards.totals.component";
|
||||
|
||||
|
||||
|
||||
export default function JobDetailCards({ selectedJob }) {
|
||||
const { loading, error, data, refetch } = useQuery(QUERY_JOB_CARD_DETAILS, {
|
||||
@@ -95,33 +93,38 @@ export default function JobDetailCards({ selectedJob }) {
|
||||
{t("jobs.actions.postInvoices")}
|
||||
</Button>
|
||||
]}>
|
||||
{loading ? (
|
||||
<LoadingSkeleton />
|
||||
) : (
|
||||
<Descriptions size='small' column={3}>
|
||||
<Descriptions.Item label='Created'>Lili Qu</Descriptions.Item>
|
||||
<Descriptions.Item label='Association'>421421</Descriptions.Item>
|
||||
<Descriptions.Item label='Creation Time'>
|
||||
2017-01-10
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label='Effective Time'>
|
||||
2017-10-10
|
||||
</Descriptions.Item>
|
||||
<Descriptions.Item label='Remarks'>
|
||||
Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
||||
</Descriptions.Item>
|
||||
</Descriptions>
|
||||
)}
|
||||
{
|
||||
// loading ? (
|
||||
// <LoadingSkeleton />
|
||||
// ) : (
|
||||
// <Descriptions size='small' column={3}>
|
||||
// <Descriptions.Item label='Created'>Lili Qu</Descriptions.Item>
|
||||
// <Descriptions.Item label='Association'>421421</Descriptions.Item>
|
||||
// <Descriptions.Item label='Creation Time'>
|
||||
// 2017-01-10
|
||||
// </Descriptions.Item>
|
||||
// <Descriptions.Item label='Effective Time'>
|
||||
// 2017-10-10
|
||||
// </Descriptions.Item>
|
||||
// <Descriptions.Item label='Remarks'>
|
||||
// Gonghu Road, Xihu District, Hangzhou, Zhejiang, China
|
||||
// </Descriptions.Item>
|
||||
// </Descriptions>
|
||||
// )
|
||||
}
|
||||
|
||||
<section className='job-cards'>
|
||||
<JobDetailCardsCustomerComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
<JobDetailCardsVehicleComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
/>
|
||||
{
|
||||
// <JobDetailCardsVehicleComponent
|
||||
// loading={loading}
|
||||
// data={data ? data.jobs_by_pk : null}
|
||||
// />
|
||||
}
|
||||
|
||||
<JobDetailCardsInsuranceComponent
|
||||
loading={loading}
|
||||
data={data ? data.jobs_by_pk : null}
|
||||
|
||||
Reference in New Issue
Block a user