diff --git a/pwa/src/apiService/resources/availableFilters.ts b/pwa/src/apiService/resources/availableFilters.ts index 05b33510..0a488ffe 100644 --- a/pwa/src/apiService/resources/availableFilters.ts +++ b/pwa/src/apiService/resources/availableFilters.ts @@ -14,7 +14,7 @@ export default class AvailableFilters { let endpoint = "/openWOO?_queries[]=Categorie"; if (window.sessionStorage.getItem("OIDN_NUMBER")) { - endpoint += `&oidn=${window.sessionStorage.getItem("OIDN_NUMBER")}`; + endpoint += `&behandelendBestuursorgaan.oidn=${window.sessionStorage.getItem("OIDN_NUMBER")}`; } const { data } = await this._send(this._instance, "GET", endpoint); diff --git a/pwa/src/apiService/resources/openWoo.ts b/pwa/src/apiService/resources/openWoo.ts index 277bc315..f9ee2e18 100644 --- a/pwa/src/apiService/resources/openWoo.ts +++ b/pwa/src/apiService/resources/openWoo.ts @@ -20,7 +20,7 @@ export default class OpenWoo { )}&_order[Publicatiedatum]=desc&_limit=${limit}&_page=${currentPage}`; if (window.sessionStorage.getItem("OIDN_NUMBER")) { - endpoint += `&oidn=${window.sessionStorage.getItem("OIDN_NUMBER")}`; + endpoint += `&behandelendBestuursorgaan.oidn=${window.sessionStorage.getItem("OIDN_NUMBER")}`; } const { data } = await this._send(this._instance, "GET", endpoint); diff --git a/pwa/src/templates/templateParts/cardsResultsTemplate/CardsResultsTemplate.tsx b/pwa/src/templates/templateParts/cardsResultsTemplate/CardsResultsTemplate.tsx index 5628260f..e187b557 100644 --- a/pwa/src/templates/templateParts/cardsResultsTemplate/CardsResultsTemplate.tsx +++ b/pwa/src/templates/templateParts/cardsResultsTemplate/CardsResultsTemplate.tsx @@ -18,24 +18,24 @@ export const CardsResultsTemplate: React.FC = ({ requ
{requests.map((request) => ( navigate(request.id)} + onClick={() => navigate(request._self.id)} tabIndex={0} - aria-label={`${request.Titel}, ${request.Samenvatting}, ${ - request.Publicatiedatum ? translateDate(i18n.language, request.Publicatiedatum) : t("N/A") + aria-label={`${request.titel}, ${request.samenvatting}, ${ + request.publicatiedatum ? translateDate(i18n.language, request.publicatiedatum) : t("N/A") }`} > - {request.Publicatiedatum ? translateDate(i18n.language, request.Publicatiedatum) : t("N/A")} + {request.publicatiedatum ? translateDate(i18n.language, request.publicatiedatum) : t("N/A")} - {request.Titel ?? t("No title available")} + {request.titel ?? t("No title available")} - {request.Samenvatting} + {request.samenvatting} ))}
diff --git a/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx b/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx index 13e2a5e9..94a48869 100644 --- a/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx +++ b/pwa/src/templates/templateParts/tableResultsTemplate/TableResultsTemplate.tsx @@ -39,20 +39,20 @@ export const TableResultsTemplate: React.FC = ({ requ {requests.map((request) => ( navigate(request.id)} + key={request._self.id} + onClick={() => navigate(request._self.id)} tabIndex={0} - aria-label={`${request.Titel}, ${ - request.Publicatiedatum ? translateDate(i18n.language, request.Publicatiedatum) : t("N/A") - }, ${request.Samenvatting}`} + aria-label={`${request.titel}, ${ + request.publicatiedatum ? translateDate(i18n.language, request.publicatiedatum) : t("N/A") + }, ${request.samenvatting}`} > - {request.Titel ?? t("No subject available")} + {request.titel ?? t("No subject available")} - {request.Publicatiedatum - ? translateDate(i18n.language, request.Publicatiedatum) + {request.publicatiedatum + ? translateDate(i18n.language, request.publicatiedatum) : t("No publication date available")} - {request.Samenvatting ?? t("No summary available")} + {request.samenvatting ?? t("No summary available")} ))} diff --git a/pwa/src/templates/wooItemDetailTemplate/WOOItemDetailTemplate.tsx b/pwa/src/templates/wooItemDetailTemplate/WOOItemDetailTemplate.tsx index ff84d306..a5dbf859 100644 --- a/pwa/src/templates/wooItemDetailTemplate/WOOItemDetailTemplate.tsx +++ b/pwa/src/templates/wooItemDetailTemplate/WOOItemDetailTemplate.tsx @@ -53,7 +53,7 @@ export const WOOItemDetailTemplate: React.FC = ({ wo {getItems.isSuccess && ( <> - {getItems.data.Titel !== "" ? getItems.data.Titel : t("No title available")} + {getItems.data.titel !== "" ? getItems.data.titel : t("No title available")} = ({ wo > - {getItems.data.ID && ( + {getItems.data.id && ( {t("Feature")} - {isUUID(getItems.data.ID) ? getItems.data.Object_ID : getItems.data.ID} + + {isUUID(getItems.data._self.id) ? getItems.data.id : getItems.data._self.id} + )} - {getItems.data.Titel && ( + {getItems.data.titel && ( {t("Category")} - {getItems.data.Categorie ?? "-"} + {getItems.data.categorie ?? "-"} )} - {getItems.data.Samenvatting && ( + {getItems.data.samenvatting && ( {t("Summary")} - {getItems.data.Samenvatting} + {getItems.data.samenvatting} )} - {getItems.data.Beschrijving && ( + {getItems.data.beschrijving && ( {t("Description")} - {getItems.data.Beschrijving} + {getItems.data.beschrijving} )} - {getItems.data.Termijnoverschrijding && ( + {getItems.data.termijnoverschrijding && ( {t("Exceeding the term")} - {getItems.data.Termijnoverschrijding} + {getItems.data.termijnoverschrijding} )} - {getItems.data.Publicatiedatum && ( + {getItems.data.publicatiedatum && ( {t("Publication date")} - {getItems.data.Publicatiedatum - ? translateDate(i18n.language, getItems.data.Publicatiedatum) + {getItems.data.publicatiedatum + ? translateDate(i18n.language, getItems.data.publicatiedatum) : "-"} )} - {getItems.data.Ontvangstdatum && ( + {getItems.data.ontvangstdatum && ( {t("Registration date")} - {translateDate(i18n.language, getItems.data.Ontvangstdatum) ?? "-"} + {translateDate(i18n.language, getItems.data.ontvangstdatum) ?? "-"} )} - {getItems.data.Besluitdatum && ( + {getItems.data.embedded?.metadata?.besluitdatum && ( {t("Decision date")} - {translateDate(i18n.language, getItems.data.Besluitdatum) ?? "-"} + + {translateDate(i18n.language, getItems.data.embedded?.metadata?.besluitdatum) ?? "-"} + )} - {getItems.data?.embedded?.Themas && ( + {getItems.data?.embedded?.themas && ( {t("Themes")} - {getItems.data?.embedded?.Themas.map((thema: any, idx: number) => ( + {getItems.data?.embedded?.themas.map((thema: any, idx: number) => ( - {thema.Hoofdthema + (idx !== getItems.data?.embedded?.Themas.length - 1 ? ", " : "")} + {thema.hoofdthema + (idx !== getItems.data?.embedded?.themas?.length - 1 ? ", " : "")} ))} @@ -141,27 +145,25 @@ export const WOOItemDetailTemplate: React.FC = ({ wo {t("Information request")} - - {getItems.data?.embedded?.informatieverzoek?.Titel_Bijlage} + + {getItems.data?.embedded?.informatieverzoek?.titel} )} - {(getItems.data.Besluit || (getItems.data?.embedded?.besluit ?? getItems.data.URL_besluit)) && ( + {(getItems.data?.besluit || + (getItems.data?.embedded?.besluit ?? getItems.data?.embedded?.besluit?.url)) && ( {t("Decision")} - {getItems.data.Besluit} - {getItems.data.Besluit && - (getItems.data?.embedded?.besluit ?? getItems.data.URL_besluit) && - ","}{" "} - {(getItems.data?.embedded?.besluit ?? getItems.data.URL_besluit) && ( + {(getItems.data?.embedded?.besluit ?? getItems.data?.embedded?.besluit?.url) && ( - {getItems.data?.embedded?.besluit?.Titel_Bijlage ?? getPDFName(getItems.data.URL_besluit)} + {getItems.data?.embedded?.besluit?.titel ?? + getPDFName(getItems.data?.embedded?.besluit?.url)} )} @@ -172,28 +174,31 @@ export const WOOItemDetailTemplate: React.FC = ({ wo {t("Inventory list")} - - {getItems.data?.embedded?.inventarisatielijst?.Titel_Bijlage} + + {getItems.data?.embedded?.inventarisatielijst?.titel} )} - {getItems.data?.embedded?.Bijlagen && ( + {getItems.data?.embedded?.bijlagen && ( {t("Attachments")} - {getItems.data?.embedded?.Bijlagen.map((bijlage: any, idx: number) => ( - - - {bijlage.Titel_Bijlage} - - - ))} + {getItems.data?.embedded?.bijlagen.map( + (bijlage: any, idx: number) => + bijlage.titel && ( + + + {bijlage.titel} + + + ), + )}