diff --git a/.env b/.env index fc25010..871e4c5 100644 --- a/.env +++ b/.env @@ -1,6 +1,7 @@ REACT_APP_TAB_TITLE=Gepafin REACT_APP_API_EXECUTION_ADDRESS=https://api-dev-gepafin.memento.credit/v1 REACT_APP_API_ADDRESS=https://api-dev-gepafin.memento.credit +REACT_APP_API_ADDRESS_WS=https://api-dev-gepafin.memento.credit/wss REACT_APP_LOGO_FILENAME=gepafin-logo.svg REACT_APP_FAVICON_FILENAME=gepafin-favicon.ico REACT_APP_HUB_ID=p4lk3bcx1RStqTaIVVbXs diff --git a/package.json b/package.json index e58a0a4..0783782 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "@emotion/styled": "11.13.0", "@number-flow/react": "0.4.2", "@sentry/browser": "^8.42.0", + "@stomp/stompjs": "^7.0.0", "@tanstack/react-table": "^8.20.5", "@wordpress/i18n": "5.8.0", "@wordpress/react-i18n": "4.8.0", @@ -36,6 +37,7 @@ "react-hook-form": "7.53.0", "react-router-dom": "6.26.2", "react-scripts": "5.0.1", + "sockjs-client": "^1.6.1", "validate.js": "0.13.1", "zustand": "4.5.4", "zustand-x": "3.0.4" diff --git a/src/assets/scss/components/appPage.scss b/src/assets/scss/components/appPage.scss index 9d3de37..6c2e5e2 100644 --- a/src/assets/scss/components/appPage.scss +++ b/src/assets/scss/components/appPage.scss @@ -11,7 +11,7 @@ font-weight: 600; line-height: normal; } - + .appPageLogin__wrapper { h1 { text-align: center; @@ -89,6 +89,7 @@ } .appPageSection { + position: relative; display: flex; flex-direction: column; align-items: flex-start; @@ -99,7 +100,7 @@ gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); width: 100%; - + /*> div { max-width: 50%; }*/ @@ -130,7 +131,7 @@ padding: 5px 0; width: 100%; } - + .col { display: flex; flex-direction: column; @@ -188,7 +189,7 @@ ul, ol { padding-left: 1rem; - + li { color: var(--global-textColor); } @@ -217,7 +218,7 @@ .appPageSection__pMeta { margin-bottom: 1em; - + span:nth-of-type(1) { max-width: 30%; } @@ -263,7 +264,7 @@ display: flex; flex-direction: column; gap: 1.2rem; - + div { display: flex; gap: 0.5rem; @@ -294,11 +295,11 @@ color: var(--message-info-color); border-color: var(--message-info-color); } - + .summary { font-weight: bold; } - + a { color: inherit; } @@ -401,7 +402,7 @@ gap: 10px; align-items: center; flex-wrap: wrap; - + &.lessGap { gap: 12px; } @@ -418,7 +419,7 @@ background-color: transparent; color: var(--global-textColor); padding: 0; - + &:hover { cursor: pointer; color: var(--message-info-color); @@ -434,10 +435,19 @@ } } +.appPageSection__emailTemplate { + > div { + max-width: 100%!important; + > div { + max-width: 100%!important; + } + } +} + @media (max-width: 700px) { .appPageSection { &.columns { grid-template-columns: 1fr; } } -} \ No newline at end of file +} diff --git a/src/assets/scss/components/notificationsSidebar.scss b/src/assets/scss/components/notificationsSidebar.scss new file mode 100644 index 0000000..2bc2eb8 --- /dev/null +++ b/src/assets/scss/components/notificationsSidebar.scss @@ -0,0 +1,55 @@ +.notificationsIcon { + &:hover { + cursor: pointer; + } +} + +.notificationsSidebar { + max-width: 360px; + width: 100%; +} + +.notificationsSidebar__loading { + padding: 30px 0; + display: flex; + justify-content: center; + flex-direction: column; + align-items: center; + gap: 10px; +} + +.notificationsSidebar__list { + display: flex; + flex-direction: column; + gap: 5px; + list-style: none; + padding: 0; +} + +.notificationsSidebar__listItem { + display: flex; + justify-content: space-between; + align-items: center; + gap: 5px; + padding: 15px 0; + border-bottom: 1px solid #e7e7e7; + + &:hover { + cursor: pointer; + color: var(--primary-text); + } +} + +.notificationsSidebar__listItemContent { + display: flex; + flex-direction: column; + gap: 5px; + font-size: 14px; +} + +.notificationsSidebar__listItemChosen { + display: flex; + flex-direction: column; + align-items: flex-start; + gap: 5px; +} diff --git a/src/assets/scss/theme.scss b/src/assets/scss/theme.scss index 4ad1ef5..2b48f72 100644 --- a/src/assets/scss/theme.scss +++ b/src/assets/scss/theme.scss @@ -44,4 +44,5 @@ @import "./components/error404.scss"; @import "./components/myTable.scss"; @import "./components/evaluation.scss"; -@import "./components/fieldsRepeater.scss"; \ No newline at end of file +@import "./components/fieldsRepeater.scss"; +@import "./components/notificationsSidebar.scss"; diff --git a/src/components/NotificationsSidebar/components/NotificationItem/index.js b/src/components/NotificationsSidebar/components/NotificationItem/index.js new file mode 100644 index 0000000..3d2efc5 --- /dev/null +++ b/src/components/NotificationsSidebar/components/NotificationItem/index.js @@ -0,0 +1,22 @@ +import React from 'react'; +import getDateFromISOstring from '../../../../helpers/getDateFromISOstring'; + +const NotificationItem = ({ item, clickFn }) => { + const handleClick = () => { + clickFn(item.id); + } + + return ( +
{item.title}
+ {__('ID domanda', 'gepafin')} + {data.applicationId} +
+ {__('Protocollo', 'gepafin')} + {data.protocolNumber} +
+ {__('NDG', 'gepafin')} + {data.ndg} +
+ {__('Appuntamento', 'gepafin')} + {data.appointmentId} +
+ {__('Bando', 'gepafin')} + {data.callName} +
+ {__('Referente Aziendale', 'gepafin')} + {data.beneficiary} +
+ {__('Azienda Beneficiaria', 'gepafin')} + {data.companyName} +
+ {__('Data ricezione', 'gepafin')} + {getDateFromISOstring(data.submissionDate)} +
+ {__('Data assegnazione', 'gepafin')} + {getDateFromISOstring(data.assignedAt)} +
+ {__('Scadenza Valutazione', 'gepafin')} + {getDateFromISOstring(data.evaluationEndDate)} +
+ {__('Stato', 'gepafin')} + {getBandoLabel(data.applicationStatus)} +
- {__('Beneficiario', 'gepafin')} + {__('Referente Aziendale', 'gepafin')} {data.beneficiary}
- {__('Azienda', 'gepafin')} + {__('Azienda Beneficiaria', 'gepafin')} {data.companyName}
@@ -934,4 +934,4 @@ const DomandaEditPreInstructor = () => { } -export default DomandaEditPreInstructor; \ No newline at end of file +export default DomandaEditPreInstructor; diff --git a/src/pages/Domande/components/AllDomandeTable/index.js b/src/pages/Domande/components/AllDomandeTable/index.js index 8505ff8..6159a66 100644 --- a/src/pages/Domande/components/AllDomandeTable/index.js +++ b/src/pages/Domande/components/AllDomandeTable/index.js @@ -139,7 +139,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => { ? : null} - + @@ -165,7 +165,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => { filter sortable filterPlaceholder={__('Cerca', 'gepafin')} style={{ minWidth: '10rem' }}/> - @@ -173,10 +173,10 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => { filterField="submissionDate" dataType="date" style={{ minWidth: '8rem' }} body={dateAppliedBodyTemplate} filter filterElement={dateFilterTemplate}/> - {/**/} + { ) } -export default AllDomandeTable; \ No newline at end of file +export default AllDomandeTable; diff --git a/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js b/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js index 1469191..23f988b 100644 --- a/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js +++ b/src/pages/DomandeBeneficiario/components/BeneficiarioDomandeTable/index.js @@ -165,7 +165,7 @@ const BeneficiarioDomandeTable = () => { filter sortable filterPlaceholder={__('Cerca il nome', 'gepafin')} style={{ minWidth: '8rem' }}/> - @@ -184,4 +184,4 @@ const BeneficiarioDomandeTable = () => { ) } -export default BeneficiarioDomandeTable; \ No newline at end of file +export default BeneficiarioDomandeTable; diff --git a/src/pages/SoccorsoAddPreInstructor/index.js b/src/pages/SoccorsoAddPreInstructor/index.js index bfb4745..dca2bfe 100644 --- a/src/pages/SoccorsoAddPreInstructor/index.js +++ b/src/pages/SoccorsoAddPreInstructor/index.js @@ -185,7 +185,7 @@ const SoccorsoAddPreInstructor = () => { {data.callName}
- {__('Beneficiario', 'gepafin')} + {__('Referente Aziendale', 'gepafin')} {data.beneficiaryName}
- {__('Azienda', 'gepafin')} + {__('Azienda Beneficiaria', 'gepafin')}
@@ -306,7 +306,7 @@ const SoccorsoEditBeneficiario = () => { {dataAppl.callTitle}
- {__('Azienda', 'gepafin')} + {__('Azienda Beneficiaria', 'gepafin')} {dataAppl.companyName}
@@ -327,10 +327,7 @@ const SoccorsoEditBeneficiario = () => { ?
@@ -411,26 +411,19 @@ const SoccorsoEditPreInstructor = () => {