From 3001a97568327cfe054bc2fa681655d7551e3e68 Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Tue, 8 Oct 2024 10:36:53 +0200 Subject: [PATCH] - env url changed to https; --- environments/prod/prod.env | 2 +- src/assets/scss/components/appForm.scss | 24 +++++ src/pages/ProfileCompany/index.js | 111 ++++++++++++++++++++++-- 3 files changed, 129 insertions(+), 8 deletions(-) diff --git a/environments/prod/prod.env b/environments/prod/prod.env index eef4c1c..8fb4182 100644 --- a/environments/prod/prod.env +++ b/environments/prod/prod.env @@ -1,3 +1,3 @@ REACT_APP_TAB_TITLE=Gepafin -REACT_APP_API_EXECUTION_ADDRESS=http://bandi-api.gepafin.it/v1 +REACT_APP_API_EXECUTION_ADDRESS=https://bandi-api.gepafin.it/v1 REACT_APP_LOGO_FILENAME=logo.svg \ No newline at end of file diff --git a/src/assets/scss/components/appForm.scss b/src/assets/scss/components/appForm.scss index 10e9017..4420fbe 100644 --- a/src/assets/scss/components/appForm.scss +++ b/src/assets/scss/components/appForm.scss @@ -255,4 +255,28 @@ li[data-list="bullet"] { list-style: disc; } +} + +.appForm__delegaForm { + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + padding: 30px; + gap: 40px; + + legend { + font-size: 21px; + font-style: normal; + font-weight: 700; + line-height: normal; + } + + .appForm__cols { + gap: 2em; + } +} + +.appForm__delegaFormHeader { + text-align: center; } \ No newline at end of file diff --git a/src/pages/ProfileCompany/index.js b/src/pages/ProfileCompany/index.js index 8b595ef..f10968b 100644 --- a/src/pages/ProfileCompany/index.js +++ b/src/pages/ProfileCompany/index.js @@ -17,7 +17,7 @@ import BlockingOverlay from '../../components/BlockingOverlay'; import CompanyService from '../../service/company-service'; // tools -import { isPIVA } from '../../helpers/validators'; +import { isPIVA, isCodiceFiscale } from '../../helpers/validators'; import set404FromErrorResponse from '../../helpers/set404FromErrorResponse'; const ProfileCompany = () => { @@ -31,7 +31,9 @@ const ProfileCompany = () => { handleSubmit, formState: { errors }, setValue, - getValues + getValues, + watch, + register } = useForm({ defaultValues: useMemo(() => { return formInitialData; @@ -40,6 +42,7 @@ const ProfileCompany = () => { }); const values = getValues(); const emptyValues = Object.values(values).filter(v => isEmpty(v) || isNil(v)).length; + const isLegalRepresentant = watch('isLegalRepresentant') const setEmptyValues = () => { const formData = { @@ -153,7 +156,7 @@ const ProfileCompany = () => {
-
+

{__('Informazioni aziendali', 'gepafin')}

@@ -174,6 +177,7 @@ const ProfileCompany = () => { {
{
-
+
+ +
+ + + {!isLegalRepresentant + ?
+
+ {__('Compilazione Delega', 'gepafin')} +

{__('Per procedere come delegato, compila il form seguente, scarica il documento della delega, fallo firmare dal rappresentante legale e ricaricalo.', 'gepafin')}

+
+ +
+ + + + + +
+ +
+
+ + + +
+
+
: null}
{__('Azioni rapide', 'gepafin')} @@ -265,12 +362,12 @@ const ProfileCompany = () => {
-
)