- hid console message;
- fixed adding company page;
This commit is contained in:
@@ -22,7 +22,7 @@ import CompanyService from '../../service/company-service';
|
|||||||
import { isPIVA, isEmail, isEmailPEC } from '../../helpers/validators';
|
import { isPIVA, isEmail, isEmailPEC } from '../../helpers/validators';
|
||||||
import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
import set404FromErrorResponse from '../../helpers/set404FromErrorResponse';
|
||||||
|
|
||||||
const APP_EVALUATION_FLOW_ID = process.env.REACT_APP_EVALUATION_FLOW_ID;
|
//const APP_EVALUATION_FLOW_ID = process.env.REACT_APP_EVALUATION_FLOW_ID;
|
||||||
|
|
||||||
const AddCompany = () => {
|
const AddCompany = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
@@ -140,10 +140,10 @@ const AddCompany = () => {
|
|||||||
storeSet.main.unsetAsyncRequest();
|
storeSet.main.unsetAsyncRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
const shouldDisableFiscalCode = () => {
|
/*const shouldDisableFiscalCode = () => {
|
||||||
const formData = getValues();
|
const formData = getValues();
|
||||||
return !formData.type || formData.type && formData.type === 'giuridica';
|
return !formData.type || formData.type && formData.type === 'giuridica';
|
||||||
}
|
}*/
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setInputPiva(isPiva);
|
setInputPiva(isPiva);
|
||||||
@@ -152,7 +152,7 @@ const AddCompany = () => {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
checkVatNumber(debouncedPivaValue);
|
checkVatNumber(debouncedPivaValue);
|
||||||
}, [debouncedPivaValue])
|
}, [debouncedPivaValue])
|
||||||
console.log('APP_EVALUATION_FLOW_ID', APP_EVALUATION_FLOW_ID)
|
|
||||||
return (
|
return (
|
||||||
<div className="appPage">
|
<div className="appPage">
|
||||||
<div className="appPage__pageHeader">
|
<div className="appPage__pageHeader">
|
||||||
@@ -183,7 +183,7 @@ console.log('APP_EVALUATION_FLOW_ID', APP_EVALUATION_FLOW_ID)
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{APP_EVALUATION_FLOW_ID === '2'
|
{/*{APP_EVALUATION_FLOW_ID === '2'
|
||||||
? <div className="appForm__cols">
|
? <div className="appForm__cols">
|
||||||
<FormField
|
<FormField
|
||||||
type="radio"
|
type="radio"
|
||||||
@@ -198,7 +198,7 @@ console.log('APP_EVALUATION_FLOW_ID', APP_EVALUATION_FLOW_ID)
|
|||||||
{ name: 'fisica', label: 'Fisica' },
|
{ name: 'fisica', label: 'Fisica' },
|
||||||
]}
|
]}
|
||||||
/>
|
/>
|
||||||
</div> : null}
|
</div> : null}*/}
|
||||||
|
|
||||||
<div className="appForm__cols">
|
<div className="appForm__cols">
|
||||||
<FormField
|
<FormField
|
||||||
@@ -210,7 +210,16 @@ console.log('APP_EVALUATION_FLOW_ID', APP_EVALUATION_FLOW_ID)
|
|||||||
config={{ required: __('È obbligatorio', 'gepafin') }}
|
config={{ required: __('È obbligatorio', 'gepafin') }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{APP_EVALUATION_FLOW_ID === '1'
|
<FormField
|
||||||
|
type="textinput"
|
||||||
|
disabled
|
||||||
|
fieldName="codiceFiscale"
|
||||||
|
label={__('Codice fiscale', 'gepafin')}
|
||||||
|
control={control}
|
||||||
|
errors={errors}
|
||||||
|
config={{ required: __('È obbligatorio', 'gepafin') }}
|
||||||
|
/>
|
||||||
|
{/*{APP_EVALUATION_FLOW_ID === '1'
|
||||||
? <FormField
|
? <FormField
|
||||||
type="textinput"
|
type="textinput"
|
||||||
disabled
|
disabled
|
||||||
@@ -228,7 +237,7 @@ console.log('APP_EVALUATION_FLOW_ID', APP_EVALUATION_FLOW_ID)
|
|||||||
control={control}
|
control={control}
|
||||||
errors={errors}
|
errors={errors}
|
||||||
config={{ required: __('È obbligatorio', 'gepafin') }}
|
config={{ required: __('È obbligatorio', 'gepafin') }}
|
||||||
/>}
|
/>}*/}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="appForm__cols">
|
<div className="appForm__cols">
|
||||||
|
|||||||
Reference in New Issue
Block a user