- added message for beneficiary about requirement of adding company;
This commit is contained in:
@@ -276,6 +276,10 @@
|
|||||||
.summary {
|
.summary {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@container section_with_border (max-width: 600px) {
|
@container section_with_border (max-width: 600px) {
|
||||||
|
|||||||
@@ -28,6 +28,14 @@ body {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: inherit;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#root, .wrapper {
|
#root, .wrapper {
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React, { useState, useEffect} from 'react';
|
import React, { useState, useEffect} from 'react';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { is, uniq, isNil } from 'ramda';
|
import { is, uniq, isNil, isEmpty } from 'ramda';
|
||||||
import { wrap } from 'object-path-immutable';
|
import { wrap } from 'object-path-immutable';
|
||||||
|
|
||||||
// store
|
// store
|
||||||
@@ -28,6 +28,7 @@ import set404FromErrorResponse from '../../../../helpers/set404FromErrorResponse
|
|||||||
|
|
||||||
|
|
||||||
const AllBandiAccordion = () => {
|
const AllBandiAccordion = () => {
|
||||||
|
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||||
const isAsyncRequest = useStore().main.isAsyncRequest();
|
const isAsyncRequest = useStore().main.isAsyncRequest();
|
||||||
const [items, setItems] = useState(null);
|
const [items, setItems] = useState(null);
|
||||||
const [filters, setFilters] = useState(null);
|
const [filters, setFilters] = useState(null);
|
||||||
@@ -113,11 +114,11 @@ const AllBandiAccordion = () => {
|
|||||||
<div className="p-3">
|
<div className="p-3">
|
||||||
{renderHtmlContent(data.descriptionShort)}
|
{renderHtmlContent(data.descriptionShort)}
|
||||||
<p>{__('Scadenza', 'gepafin')}: {getDateFromISOstring(data.dates[1])}</p>
|
<p>{__('Scadenza', 'gepafin')}: {getDateFromISOstring(data.dates[1])}</p>
|
||||||
{!data.confidi
|
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && !data.confidi
|
||||||
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||||
{__('Partecipa', 'gepafin')}
|
{__('Partecipa', 'gepafin')}
|
||||||
</Button> : null}
|
</Button> : null}
|
||||||
{data.confidi
|
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0 && data.confidi
|
||||||
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
? <Button onClick={() => goToBandoPage(data.id)} severity="info">
|
||||||
{__('Mostra', 'gepafin')}
|
{__('Mostra', 'gepafin')}
|
||||||
</Button> : null}
|
</Button> : null}
|
||||||
|
|||||||
@@ -1,13 +1,17 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
|
|
||||||
// components
|
// components
|
||||||
import AllBandiAccordion from './components/AllBandiAccordion';
|
import AllBandiAccordion from './components/AllBandiAccordion';
|
||||||
import { Button } from 'primereact/button';
|
import { Button } from 'primereact/button';
|
||||||
|
import { isEmpty } from 'ramda';
|
||||||
|
import { useStore } from '../../store';
|
||||||
|
|
||||||
const BandiBeneficiario = () => {
|
const BandiBeneficiario = () => {
|
||||||
return(
|
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||||
|
|
||||||
|
return (
|
||||||
<div className="appPage">
|
<div className="appPage">
|
||||||
<div className="appPage__pageHeader">
|
<div className="appPage__pageHeader">
|
||||||
<h1>{__('Bandi disponibili', 'gepafin')}</h1>
|
<h1>{__('Bandi disponibili', 'gepafin')}</h1>
|
||||||
@@ -15,6 +19,19 @@ const BandiBeneficiario = () => {
|
|||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
|
{isEmpty(chosenCompanyId) || chosenCompanyId === 0
|
||||||
|
? <>
|
||||||
|
<div className="appPageSection__message warning">
|
||||||
|
<i className="pi pi-exclamation-triangle"></i>
|
||||||
|
<span className="summary">{__('Attenzione', 'gepafin')}</span>
|
||||||
|
<span>
|
||||||
|
{__('Per applicare ai bandi devi Registare un Azienda clicca', 'gepafin')}
|
||||||
|
<Link to={`/agguingi-azienda`} style={{marginLeft: '0.5ch'}}>{__('qua', 'gepafin')}</Link>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="appPage__spacer"></div>
|
||||||
|
</> : null}
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<AllBandiAccordion/>
|
<AllBandiAccordion/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import React, { useState, useEffect } from 'react';
|
import React, { useState, useEffect } from 'react';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { uniq } from 'ramda';
|
import { uniq, isEmpty } from 'ramda';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
|
|
||||||
// store
|
// store
|
||||||
import { storeSet } from '../../../../store';
|
import { storeSet, useStore } from '../../../../store';
|
||||||
|
|
||||||
// api
|
// api
|
||||||
import BandoService from '../../../../service/bando-service';
|
import BandoService from '../../../../service/bando-service';
|
||||||
@@ -22,6 +22,7 @@ import ProperBandoLabel from '../../../../components/ProperBandoLabel';
|
|||||||
|
|
||||||
|
|
||||||
const LatestBandiTable = () => {
|
const LatestBandiTable = () => {
|
||||||
|
const chosenCompanyId = useStore().main.chosenCompanyId();
|
||||||
const [items, setItems] = useState(null);
|
const [items, setItems] = useState(null);
|
||||||
const [filters, setFilters] = useState(null);
|
const [filters, setFilters] = useState(null);
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
@@ -145,8 +146,9 @@ const LatestBandiTable = () => {
|
|||||||
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
body={dateEndBodyTemplate} filter filterElement={dateFilterTemplate}/>
|
||||||
<Column field="status" header={__('Stato', 'gepafin')}
|
<Column field="status" header={__('Stato', 'gepafin')}
|
||||||
style={{ minWidth: '7rem' }} body={statusBodyTemplate} />
|
style={{ minWidth: '7rem' }} body={statusBodyTemplate} />
|
||||||
<Column header={__('Azioni', 'gepafin')}
|
{!isEmpty(chosenCompanyId) && chosenCompanyId !== 0
|
||||||
body={actionsBodyTemplate}/>
|
? <Column header={__('Azioni', 'gepafin')}
|
||||||
|
body={actionsBodyTemplate}/> : null}
|
||||||
</DataTable>
|
</DataTable>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import React, { useEffect, useState } from 'react';
|
import React, { useEffect, useState } from 'react';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __, sprintf } from '@wordpress/i18n';
|
||||||
import { useNavigate } from 'react-router-dom';
|
import { Link, useNavigate } from 'react-router-dom';
|
||||||
import { head, pathOr } from 'ramda';
|
import { head, isEmpty, pathOr } from 'ramda';
|
||||||
import NumberFlow from '@number-flow/react';
|
import NumberFlow from '@number-flow/react';
|
||||||
|
|
||||||
// store
|
// store
|
||||||
@@ -35,7 +35,8 @@ const DashboardBeneficiario = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const errGetStats = () => {}
|
const errGetStats = () => {
|
||||||
|
}
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const existingCompany = head(companies.filter(o => o.id === chosenCompanyId));
|
const existingCompany = head(companies.filter(o => o.id === chosenCompanyId));
|
||||||
@@ -45,7 +46,7 @@ const DashboardBeneficiario = () => {
|
|||||||
}
|
}
|
||||||
}, [companies, chosenCompanyId]);
|
}, [companies, chosenCompanyId]);
|
||||||
|
|
||||||
return(
|
return (
|
||||||
<div className="appPage">
|
<div className="appPage">
|
||||||
<div className="appPage__pageHeader">
|
<div className="appPage__pageHeader">
|
||||||
<h1>{__('Dashboard', 'gepafin')}</h1>
|
<h1>{__('Dashboard', 'gepafin')}</h1>
|
||||||
@@ -61,21 +62,21 @@ const DashboardBeneficiario = () => {
|
|||||||
<span><NumberFlow
|
<span><NumberFlow
|
||||||
value={getStatValue('numberOfApplications', 0)}
|
value={getStatValue('numberOfApplications', 0)}
|
||||||
format={{ notation: 'compact' }}
|
format={{ notation: 'compact' }}
|
||||||
locales="it-IT" /></span>
|
locales="it-IT"/></span>
|
||||||
</div>
|
</div>
|
||||||
<div className="statsBigBadges__gridItem">
|
<div className="statsBigBadges__gridItem">
|
||||||
<span>{__('Bandi osservati', 'gepafin')}</span>
|
<span>{__('Bandi osservati', 'gepafin')}</span>
|
||||||
<span><NumberFlow
|
<span><NumberFlow
|
||||||
value={getStatValue('numberOfCalls', 0)}
|
value={getStatValue('numberOfCalls', 0)}
|
||||||
format={{ notation: 'compact' }}
|
format={{ notation: 'compact' }}
|
||||||
locales="it-IT" /></span>
|
locales="it-IT"/></span>
|
||||||
</div>
|
</div>
|
||||||
<div className="statsBigBadges__gridItem">
|
<div className="statsBigBadges__gridItem">
|
||||||
<span>{__('Documenti da integrare', 'gepafin')}</span>
|
<span>{__('Documenti da integrare', 'gepafin')}</span>
|
||||||
<span><NumberFlow
|
<span><NumberFlow
|
||||||
value={getStatValue('numberOfIntegratedDocuments', 0)}
|
value={getStatValue('numberOfIntegratedDocuments', 0)}
|
||||||
format={{ notation: 'compact' }}
|
format={{ notation: 'compact' }}
|
||||||
locales="it-IT" /></span>
|
locales="it-IT"/></span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -89,6 +90,19 @@ const DashboardBeneficiario = () => {
|
|||||||
|
|
||||||
<div className="appPage__spacer"></div>
|
<div className="appPage__spacer"></div>
|
||||||
|
|
||||||
|
{isEmpty(chosenCompanyId) || chosenCompanyId === 0
|
||||||
|
? <>
|
||||||
|
<div className="appPageSection__message warning">
|
||||||
|
<i className="pi pi-exclamation-triangle"></i>
|
||||||
|
<span className="summary">{__('Attenzione', 'gepafin')}</span>
|
||||||
|
<span>
|
||||||
|
{__('Per applicare ai bandi devi Registare un Azienda clicca', 'gepafin')}
|
||||||
|
<Link to={`/agguingi-azienda`} style={{marginLeft: '0.5ch'}}>{__('qua', 'gepafin')}</Link>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div className="appPage__spacer"></div>
|
||||||
|
</> : null}
|
||||||
|
|
||||||
<div className="appPageSection">
|
<div className="appPageSection">
|
||||||
<h2>{__('Bandi disponibili', 'gepafin')}</h2>
|
<h2>{__('Bandi disponibili', 'gepafin')}</h2>
|
||||||
<LatestBandiTable/>
|
<LatestBandiTable/>
|
||||||
|
|||||||
Reference in New Issue
Block a user