- added exception for #23;
This commit is contained in:
@@ -30,10 +30,19 @@ import { Tag } from 'primereact/tag';
|
||||
import { Calendar } from 'primereact/calendar';
|
||||
import { isNil } from 'ramda';
|
||||
|
||||
const LatestBandiBeneficiarioTableAsync = () => {
|
||||
const REACT_APP_HUB_ID = process.env.REACT_APP_HUB_ID;
|
||||
|
||||
const LatestBandiBeneficiarioTableAsync = ({ isAntiMoneylaundry = false }) => {
|
||||
const chosenCompanyId = useStoreValue('chosenCompanyId');
|
||||
const antiMoneyLaundryCalls = useStoreValue('antiMoneyLaundryCalls');
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
const [items, setItems] = useState(null);
|
||||
const [items, setItems] = useState([]);
|
||||
let filteredItems = items;
|
||||
if (REACT_APP_HUB_ID !== 't7jh5wfg9QXylNaTZkPoE') {
|
||||
filteredItems = isAntiMoneylaundry
|
||||
? items.filter(o => antiMoneyLaundryCalls.includes(o.id))
|
||||
: items.filter(o => !antiMoneyLaundryCalls.includes(o.id));
|
||||
}
|
||||
const [totalRecordsNum, setTotalRecordsNum] = useState(0);
|
||||
const [lazyState, setLazyState] = useState({
|
||||
first: 0,
|
||||
@@ -154,7 +163,7 @@ const LatestBandiBeneficiarioTableAsync = () => {
|
||||
<i className="pi pi-heart" style={{ fontSize: '1rem' }}></i>
|
||||
</button>
|
||||
<Link to={`/bandi/${rowData.id}`}>
|
||||
<Button severity="info" label={__('Partecipa', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
||||
<Button severity="info" label={__('Compila', 'gepafin')} icon="pi pi-arrow-right" size="small"
|
||||
iconPos="right"/>
|
||||
</Link></div>
|
||||
}
|
||||
@@ -217,7 +226,7 @@ const LatestBandiBeneficiarioTableAsync = () => {
|
||||
return (
|
||||
<div className="appPageSection__table">
|
||||
<DataTable
|
||||
value={items} stripedRows showGridlines
|
||||
value={filteredItems} stripedRows showGridlines
|
||||
lazy filterDisplay="menu" dataKey="id" paginator
|
||||
first={lazyState.first} rows={lazyState.rows} totalRecords={totalRecordsNum} onPage={onPage}
|
||||
onSort={onSort} sortField={lazyState.sortField} sortOrder={lazyState.sortOrder}
|
||||
|
||||
Reference in New Issue
Block a user