IO-1395 Add missing info to job preview.
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
import { Carousel } from "antd";
|
import { Carousel } from "antd";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { GenerateThumbUrl } from "../jobs-documents-gallery/job-documents.utility";
|
||||||
import CardTemplate from "./job-detail-cards.template.component";
|
import CardTemplate from "./job-detail-cards.template.component";
|
||||||
import { DetermineFileType } from "../documents-upload/documents-upload.utility";
|
|
||||||
export default function JobDetailCardsDocumentsComponent({ loading, data }) {
|
export default function JobDetailCardsDocumentsComponent({ loading, data }) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
@@ -22,15 +22,7 @@ export default function JobDetailCardsDocumentsComponent({ loading, data }) {
|
|||||||
{data.documents.length > 0 ? (
|
{data.documents.length > 0 ? (
|
||||||
<Carousel autoplay>
|
<Carousel autoplay>
|
||||||
{data.documents.map((item) => (
|
{data.documents.map((item) => (
|
||||||
<img
|
<img key={item.id} src={GenerateThumbUrl(item)} alt={item.name} />
|
||||||
key={item.id}
|
|
||||||
src={`${
|
|
||||||
process.env.REACT_APP_CLOUDINARY_ENDPOINT
|
|
||||||
}/${DetermineFileType(item.type)}/upload/${
|
|
||||||
process.env.REACT_APP_CLOUDINARY_THUMB_TRANSFORMATIONS
|
|
||||||
}/${item.key}`}
|
|
||||||
alt={item.name}
|
|
||||||
/>
|
|
||||||
))}
|
))}
|
||||||
</Carousel>
|
</Carousel>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -29,20 +29,6 @@ function JobsDocumentsComponent({
|
|||||||
setIndex(index);
|
setIndex(index);
|
||||||
};
|
};
|
||||||
|
|
||||||
// useEffect(() => {
|
|
||||||
// console.log("Added event listening for reteching.");
|
|
||||||
// window.addEventListener("storage", (ev) => {
|
|
||||||
// if (ev.key === "refetch" && ev.newValue === true) {
|
|
||||||
// refetch && refetch();
|
|
||||||
// localStorage.setItem("refetch", false);
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// return () => {
|
|
||||||
// window.removeEventListener("storage");
|
|
||||||
// };
|
|
||||||
// }, [refetch]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
let documents = data.reduce(
|
let documents = data.reduce(
|
||||||
(acc, value) => {
|
(acc, value) => {
|
||||||
|
|||||||
@@ -688,6 +688,7 @@ export const QUERY_JOB_CARD_DETAILS = gql`
|
|||||||
ownr_ph1
|
ownr_ph1
|
||||||
ownr_ea
|
ownr_ea
|
||||||
ca_gst_registrant
|
ca_gst_registrant
|
||||||
|
owner_owing
|
||||||
special_coverage_policy
|
special_coverage_policy
|
||||||
available_jobs {
|
available_jobs {
|
||||||
id
|
id
|
||||||
|
|||||||
Reference in New Issue
Block a user