Hasura changes to add searching + indexing. Header and card changes.
This commit is contained in:
@@ -56,11 +56,17 @@ export default function JobDetailCards({ selectedJob }) {
|
||||
</span>
|
||||
}
|
||||
title={
|
||||
loading
|
||||
? t("general.labels.loading")
|
||||
: data.jobs_by_pk.ro_number
|
||||
? `${t("jobs.fields.ro_number")} ${data.jobs_by_pk.ro_number}`
|
||||
: `${t("jobs.fields.est_number")} ${data.jobs_by_pk.est_number}`
|
||||
loading ? (
|
||||
t("general.labels.loading")
|
||||
) : (
|
||||
<Link to={`/manage/jobs/${data.jobs_by_pk.id}`}>
|
||||
{data.jobs_by_pk.ro_number
|
||||
? `${t("jobs.fields.ro_number")} ${data.jobs_by_pk.ro_number}`
|
||||
: `${t("jobs.fields.est_number")} ${
|
||||
data.jobs_by_pk.est_number
|
||||
}`}{" "}
|
||||
</Link>
|
||||
)
|
||||
}
|
||||
extra={[
|
||||
<Link
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Carousel } from "antd";
|
||||
import React from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import CardTemplate from "./job-detail-cards.template.component";
|
||||
import { Carousel } from "antd";
|
||||
import "./job-detail-cards.styles.scss";
|
||||
import CardTemplate from "./job-detail-cards.template.component";
|
||||
|
||||
export default function JobDetailCardsDocumentsComponent({ loading, data }) {
|
||||
const { t } = useTranslation();
|
||||
@@ -19,15 +19,17 @@ export default function JobDetailCardsDocumentsComponent({ loading, data }) {
|
||||
loading={loading}
|
||||
title={t("jobs.labels.cards.documents")}
|
||||
extraLink={`/manage/jobs/${data.id}#documents`}>
|
||||
{data.documents ? (
|
||||
{data.documents.count > 0 ? (
|
||||
<Carousel autoplay>
|
||||
{data.documents.map(item => (
|
||||
<div key={item.id}>
|
||||
<img src={item.thumb_url} />
|
||||
<img src={item.thumb_url} alt={item.name} />
|
||||
</div>
|
||||
))}
|
||||
</Carousel>
|
||||
) : null}
|
||||
) : (
|
||||
<div>{t("documents.errors.nodocuments")}</div>
|
||||
)}
|
||||
</CardTemplate>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user