Skip to content

Commit

Permalink
Merge pull request #113 from ConductionNL/feature/XW-90/duplicate-att…
Browse files Browse the repository at this point in the history
…achement

feature/XW-90/duplicate-attachement
  • Loading branch information
remko48 authored Oct 12, 2023
2 parents cf62aa7 + 72e96dd commit e24a91d
Showing 1 changed file with 16 additions and 18 deletions.
34 changes: 16 additions & 18 deletions pwa/src/templates/wooItemDetailTemplate/WOOItemDetailTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,45 +125,43 @@ export const WOOItemDetailTemplate: React.FC<WOOItemDetailTemplateProps> = ({ wo
</TableRow>
)}

{getItems.data.URL_informatieverzoek && (
{getItems.data?.embedded?.informatieverzoek && (
<TableRow className={styles.tableRow}>
<TableCell>{t("Information request")}</TableCell>
<TableCell>
<Link href={getItems.data.URL_informatieverzoek} target="blank">
{getBijlageTitleFromURL(
getItems.data.URL_informatieverzoek,
getItems.data?.embedded?.Bijlagen,
) ?? getPDFName(getItems.data.URL_informatieverzoek)}
<Link href={getItems.data?.embedded?.informatieverzoek.URL_Bijlage} target="blank">
{getItems.data?.embedded?.informatieverzoek?.Titel_Bijlage}
</Link>
</TableCell>
</TableRow>
)}

{(getItems.data.Besluit || getItems.data.URL_besluit) && (
{(getItems.data.Besluit || (getItems.data?.embedded?.besluit ?? getItems.data.URL_besluit)) && (
<TableRow className={styles.tableRow}>
<TableCell>{t("Decision")}</TableCell>
<TableCell>
{getItems.data.Besluit}
{getItems.data.Besluit && getItems.data.URL_besluit && ","}{" "}
{getItems.data.URL_besluit && (
<Link href={getItems.data.URL_besluit} target="blank">
{getBijlageTitleFromURL(getItems.data.URL_besluit, getItems.data?.embedded?.Bijlagen) ??
getPDFName(getItems.data.URL_besluit)}
{getItems.data.Besluit &&
(getItems.data?.embedded?.besluit ?? getItems.data.URL_besluit) &&
","}{" "}
{(getItems.data?.embedded?.besluit ?? getItems.data.URL_besluit) && (
<Link
href={getItems.data?.embedded?.besluit?.URL_Bijlage ?? getItems.data.URL_besluit}
target="blank"
>
{getItems.data?.embedded?.besluit?.Titel_Bijlage ?? getPDFName(getItems.data.URL_besluit)}
</Link>
)}
</TableCell>
</TableRow>
)}

{getItems.data.URL_inventarisatielijst && (
{getItems.data?.embedded?.inventarisatielijst && (
<TableRow className={styles.tableRow}>
<TableCell>{t("Inventory list")}</TableCell>
<TableCell>
<Link href={getItems.data.URL_inventarisatielijst} target="blank">
{getBijlageTitleFromURL(
getItems.data.URL_inventarisatielijst,
getItems.data?.embedded?.Bijlagen,
) ?? getPDFName(getItems.data.URL_inventarisatielijst)}
<Link href={getItems.data?.embedded?.inventarisatielijst?.URL_Bijlage} target="blank">
{getItems.data?.embedded?.inventarisatielijst?.Titel_Bijlage}
</Link>
</TableCell>
</TableRow>
Expand Down

0 comments on commit e24a91d

Please sign in to comment.