Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
- Mostrare il testo della descrizione del Punto di contatto all'interno della card Contatti
- Modifica icona Struttura in Folder Content
- Sistemata la visualizzazione dell'etichetta "Programmato" accanto al titolo dei contenuti in Folder Content: ora viene mostrata come badge ben distinguibile dal titolo.
- Aggiunta la sezione Documenti correlati in ComeFarePer CT

## Versione 2.24.0 (10/04/2026)

Expand Down
32 changes: 0 additions & 32 deletions src/components/View/ComeFarePer/ComeFarePerAllegati.jsx

This file was deleted.

56 changes: 56 additions & 0 deletions src/components/View/ComeFarePer/ComeFarePerDocumenti.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import React from 'react';
import PropTypes from 'prop-types';
import { defineMessages, useIntl } from 'react-intl';
import { contentFolderHasItems } from 'io-sanita-theme/helpers';
import {
BackReferences,
Attachments,
} from 'io-sanita-theme/components/View/commons';

const messages = defineMessages({
allegati: {
id: 'come_fare_per_allegati',
defaultMessage: 'Allegati',
},
modulistica: { id: 'come_fare_per_modulistica', defaultMessage: 'Modulistica' },
documenti: {
id: 'come_fare_per_documenti',
defaultMessage: 'Documenti',
},
});

const ComeFarePerDocumenti = ({ content }) => {
const intl = useIntl();

return (
<>
{contentFolderHasItems(content, 'modulistica') && (
<Attachments
content={content}
folder_name={'modulistica'}
title={intl.formatMessage(messages.modulistica)}
/>
)}
{contentFolderHasItems(content, 'allegati') && (
<Attachments
content={content}
folder_name={'allegati'}
title={intl.formatMessage(messages.allegati)}
/>
)}

<BackReferences
type="Documento"
content={content}
id={'documenti_correlati'}
title={intl.formatMessage(messages.documenti)}
/>
</>
);
};

ComeFarePerDocumenti.propTypes = {
content: PropTypes.object.isRequired,
};

export default ComeFarePerDocumenti;
4 changes: 2 additions & 2 deletions src/components/View/ComeFarePer/ComeFarePerView.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ import {
import {
ComeFarePerDescrizione,
ComeFarePerAChiSiRivolge,
ComeFarePerAllegati,
ComeFarePerComeFare,
ComeFarePerApprofondimenti,
ComeFarePerUlterioriInformazioni,
ComeFarePerDocumenti,
ComeFarePerSchemaOrg,
} from 'io-sanita-theme/components/View/ComeFarePer';

export const ComeFarePerViewSectionsOrder = [
{ /* DESCRIZIONE ESTESA (Panoramica) */ component: ComeFarePerDescrizione },
{ /* A CHI SI RIVOLGE */ component: ComeFarePerAChiSiRivolge },
{ /* ALLEGATI */ component: ComeFarePerAllegati },
{ /* COME FARE */ component: ComeFarePerComeFare },
{ /* APPROFONDIMENTI */ component: ComeFarePerApprofondimenti },
{
/* ULTERIORI INFORMAZIONI (e Parliamo di) */ component:
ComeFarePerUlterioriInformazioni,
},
{ /* DOCUMENTI & ALLEGATI */ component: ComeFarePerDocumenti },
{ /* METADATA */ component: Metadata },
{ /* SCHEMA ORG*/ component: ComeFarePerSchemaOrg },
];
Expand Down
11 changes: 6 additions & 5 deletions src/components/View/ComeFarePer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,7 @@ export const ComeFarePerAChiSiRivolge = loadable(() =>
/* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerAChiSiRivolge'
),
);
export const ComeFarePerAllegati = loadable(() =>
import(
/* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerAllegati'
),
);

export const ComeFarePerComeFare = loadable(() =>
import(
/* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerComeFare'
Expand All @@ -26,6 +22,11 @@ export const ComeFarePerDescrizione = loadable(() =>
/* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerDescrizione'
),
);
export const ComeFarePerDocumenti = loadable(() =>
import(
/* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerDocumenti'
),
);
export const ComeFarePerUlterioriInformazioni = loadable(() =>
import(
/* webpackChunkName: "ISComeFarePerView" */ 'io-sanita-theme/components/View/ComeFarePer/ComeFarePerUlterioriInformazioni'
Expand Down
Loading