From 478af11cb999f753bcfcecc5ccac2636029c156e Mon Sep 17 00:00:00 2001 From: Vitalii Kiiko Date: Fri, 27 Sep 2024 09:09:48 +0200 Subject: [PATCH] - updated login page; - updated registration page; - created profile page; - created company profile page; --- environments/prod/prod.env | 2 +- src/assets/scss/components/appForm.scss | 4 + src/components/TopBarProfileMenu/index.js | 14 +- src/pages/BandoApplication/index.js | 2 +- src/pages/Login/index.js | 51 +++++- src/pages/Profile/index.js | 179 ++++++++++++++++++++-- src/pages/ProfileCompany/index.js | 111 ++++++++++++++ src/pages/Registration/index.js | 61 ++++++-- src/routes.js | 5 + src/service/authentication-service.js | 8 + src/service/user-service.js | 10 ++ 11 files changed, 406 insertions(+), 41 deletions(-) create mode 100644 src/pages/ProfileCompany/index.js create mode 100644 src/service/user-service.js diff --git a/environments/prod/prod.env b/environments/prod/prod.env index b470092..eef4c1c 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.gepafin.it/v1 +REACT_APP_API_EXECUTION_ADDRESS=http://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 142c6df..8051ea1 100644 --- a/src/assets/scss/components/appForm.scss +++ b/src/assets/scss/components/appForm.scss @@ -41,6 +41,10 @@ background: var(--button-secondary-borderColor); } } + + input[disabled], div.p-disabled { + background-color: #e3e3e3; + } } .appForm__fieldItem { diff --git a/src/components/TopBarProfileMenu/index.js b/src/components/TopBarProfileMenu/index.js index ab98319..e574e61 100644 --- a/src/components/TopBarProfileMenu/index.js +++ b/src/components/TopBarProfileMenu/index.js @@ -1,5 +1,6 @@ import React, { useRef } from 'react'; import { __ } from '@wordpress/i18n'; +import { useNavigate } from 'react-router-dom'; // store import { storeSet, useTrackedStore } from '../../store'; @@ -9,6 +10,7 @@ import { Menu } from 'primereact/menu'; import { Avatar } from 'primereact/avatar'; const TopBarProfileMenu = ({ menuLeftRef }) => { + const navigate = useNavigate(); const userData = useTrackedStore().main.userData(); const fulleName = `${userData.firstName} ${userData.lastName}`; @@ -26,12 +28,18 @@ const TopBarProfileMenu = ({ menuLeftRef }) => { ); } }, - /*{ + { label: __('Il mio profilo', 'gepafin'), command: () => { - console.log('go to profile page') + navigate('/profilo') } - },*/ + }, + { + label: __('Profilo aziendale', 'gepafin'), + command: () => { + navigate('/profilo-aziendale') + } + }, { separator: true }, diff --git a/src/pages/BandoApplication/index.js b/src/pages/BandoApplication/index.js index 8fd6167..308b60b 100644 --- a/src/pages/BandoApplication/index.js +++ b/src/pages/BandoApplication/index.js @@ -379,7 +379,7 @@ const BandoApplication = () => { iconPos="right"/> : null}