- enabled creation of appl for the same user/company after one being rejected;
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import React, { useState, useEffect, useRef } from 'react';
|
import React, { useState, useEffect, useRef } from 'react';
|
||||||
import { __ } from '@wordpress/i18n';
|
import { __ } from '@wordpress/i18n';
|
||||||
import { useNavigate, useParams } from 'react-router-dom';
|
import { useNavigate, useParams } from 'react-router-dom';
|
||||||
import { is, isEmpty, isNil } from 'ramda';
|
import { head, is, isEmpty, isNil } from 'ramda';
|
||||||
import 'quill/dist/quill.core.css';
|
import 'quill/dist/quill.core.css';
|
||||||
|
|
||||||
// store
|
// store
|
||||||
@@ -244,7 +244,10 @@ const BandoViewBeneficiario = () => {
|
|||||||
const getApplCallback = (data) => {
|
const getApplCallback = (data) => {
|
||||||
if (data.status === 'SUCCESS') {
|
if (data.status === 'SUCCESS') {
|
||||||
if (data.data.length) {
|
if (data.data.length) {
|
||||||
setApplicationObj(data.data[0]);
|
const nonRejectedAppl = head(data.data.filter(o => !['REJECTED'].includes(o.status)));
|
||||||
|
if (nonRejectedAppl) {
|
||||||
|
setApplicationObj(nonRejectedAppl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
storeSet.main.unsetAsyncRequest();
|
storeSet.main.unsetAsyncRequest();
|
||||||
|
|||||||
Reference in New Issue
Block a user