- saving progress - amendment page works for both instructor and beneficiary;
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { __ } from '@wordpress/i18n';
|
||||
import { is, uniq } from 'ramda';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Link, useLocation } from 'react-router-dom';
|
||||
|
||||
// api
|
||||
import ApplicationService from '../../../../service/application-service';
|
||||
@@ -21,6 +21,7 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
||||
const [filters, setFilters] = useState(null);
|
||||
const [localAsyncRequest, setLocalAsyncRequest] = useState(false);
|
||||
const [, setStatuses] = useState([]);
|
||||
const location = useLocation();
|
||||
|
||||
useEffect(() => {
|
||||
setLocalAsyncRequest(true);
|
||||
@@ -113,14 +114,15 @@ const AllDomandeTable = ({ openDialogFn, updaterString = '' }) => {
|
||||
|
||||
const actionsBodyTemplate = (rowData) => {
|
||||
return <div className="appPageSection__tableActions lessGap">
|
||||
{openDialogFn
|
||||
{openDialogFn && rowData.applicationStatus === 'SUBMIT'
|
||||
? <Button severity="info"
|
||||
onClick={() => openDialogFn(rowData.id)}
|
||||
label={__('Assegnare', 'gepafin')}
|
||||
icon="pi pi-pencil" size="small" iconPos="right"/>
|
||||
: <Link to={'/domande'}>
|
||||
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
|
||||
</Link>}
|
||||
: location.pathname !== '/domande'
|
||||
? <Link to={'/domande'}>
|
||||
<Button severity="info" label={__('Gestire', 'gepafin')} size="small"/>
|
||||
</Link> : null}
|
||||
<Link to={`/domande/${rowData.id}`}>
|
||||
<Button severity="info" label={__('Anteprima', 'gepafin')} icon="pi pi-eye" size="small"
|
||||
iconPos="right"/>
|
||||
|
||||
Reference in New Issue
Block a user