From 57465967cab48ec62524b112cfd083d58a1eb389 Mon Sep 17 00:00:00 2001 From: DianaUzun Date: Tue, 3 Oct 2023 20:59:28 +0300 Subject: [PATCH 01/12] start working --- .../src/components/ProfilePage/ProfilePage.js | 69 ++++++++++++++++--- .../ProfilePageComponents/Description.js | 1 - authentication/serializers.py | 2 + 3 files changed, 61 insertions(+), 11 deletions(-) diff --git a/FrontEnd/src/components/ProfilePage/ProfilePage.js b/FrontEnd/src/components/ProfilePage/ProfilePage.js index a87c7f7da..768f08918 100644 --- a/FrontEnd/src/components/ProfilePage/ProfilePage.js +++ b/FrontEnd/src/components/ProfilePage/ProfilePage.js @@ -3,11 +3,14 @@ import Description from './ProfilePageComponents/Description'; import ProfileContent from './ProfilePageComponents/ProfileContent'; import { useState } from 'react'; import BreadCrumbs from '../BreadCrumbs/BreadCrumbs'; +import { useAuth } from "../../hooks/"; +import axios from 'axios'; +import { useEffect } from 'react'; const USER = { 'email': 'ex@gmail.com', - 'companyEmail': '', + 'companyEmail': '', 'password': '12345678', 'confirmPassword': '12345678', 'surname': 'Василенко', @@ -24,18 +27,18 @@ const USER = { 'categories': [], 'regions': '', 'bannerImage': '', - 'logo': '', + 'logo': '', 'slogan': '', 'companyInfo': '', 'productInfo': '', 'serviceInfo': '', 'logisticProductService': '', 'cooperationFormat': '', - 'competitiveAdvantage': '', + 'competitiveAdvantage': '', 'foundationYear': '', 'companySize': '', 'topClients': '', - 'passedAudit': '', + 'passedAudit': '', 'startupName': '', 'investmentAmount': '', 'cooperationGoals': [], @@ -43,7 +46,7 @@ const USER = { 'competitiveAdvantageIdea': '', 'risks': '', 'searchPartners': '', - 'startupIdea': '' , + 'startupIdea': '', 'phoneNumber': '', 'companySite': '', 'address': '', @@ -51,28 +54,74 @@ const USER = { 'Instagram': '', 'Tiktok': '', 'LinkedIn': '', - 'Youtube': '', + 'Youtube': '', }; const ProfilePage = () => { + const authToken = localStorage.getItem("Token"); const [mainUser, setMainUser] = useState(USER); + + const [backUser, setBackUser] = useState(null); + const [mainProfile, setMainProfile] = useState(null); const [formName, setFormName] = useState(''); + const [isLoading, setIsLoading] = useState(true); + const currentFormNameHandler = (currentName) => { setFormName(currentName); }; + useEffect(() => { + axios.get(`${process.env.REACT_APP_BASE_API_URL}/api/auth/users/me`, { + headers: { + 'Authorization': `token ${authToken}` + } + }) + .then((res) => { + setBackUser(res.data); + }) + .catch((error) => { + console.error(error); + }); + }, []); + + useEffect(() => { + if (backUser) { + axios.get(`${process.env.REACT_APP_BASE_API_URL}/api/profiles/${backUser.profile_id}`, { + headers: { + 'Authorization': `token ${authToken}` + } + }) + .then((res) => { + setMainProfile(res.data); + }) + .catch((error) => { + console.error(error); + }) + .finally(() => { + setIsLoading(false); + }); + } + + }, [backUser]); + + const profileUpdateHandler = (myUser) => { console.log('in app'); console.log(myUser); setMainUser((prev) => { - return {...prev, ...myUser} + return { ...prev, ...myUser } }); }; return (
- - - + + {isLoading + ?
Loading...
+ : + <> + + + }
); }; diff --git a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/Description.js b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/Description.js index 381759303..d04be0491 100644 --- a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/Description.js +++ b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/Description.js @@ -18,7 +18,6 @@ const Description = (props) => {
{props.companyName.toUpperCase()}
-
{props.brend}
{props.formName in DESCRIPTIONS ? DESCRIPTIONS[props.formName] : generalDesc}
diff --git a/authentication/serializers.py b/authentication/serializers.py index 24d6b6d49..1d08b2cfb 100644 --- a/authentication/serializers.py +++ b/authentication/serializers.py @@ -78,6 +78,7 @@ def create(self, validated_data): class UserListSerializer(UserSerializer): + profile_id = serializers.PrimaryKeyRelatedField(source='profile', read_only=True) class Meta(UserSerializer.Meta): model = User fields = ( @@ -85,4 +86,5 @@ class Meta(UserSerializer.Meta): "email", "name", "surname", + 'profile_id' ) From 08d4b3705873985596025d3276fad9c4888709ac Mon Sep 17 00:00:00 2001 From: DianaUzun Date: Tue, 3 Oct 2023 22:23:39 +0300 Subject: [PATCH 02/12] add the logic of updating user info --- .../ProfilePage/FormComponents/UserInfo.js | 21 +++-- .../src/components/ProfilePage/ProfilePage.js | 76 ++++--------------- .../ProfilePageComponents/ProfileContent.js | 14 +--- 3 files changed, 31 insertions(+), 80 deletions(-) diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js b/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js index a9e055265..7ef6c3a0a 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js @@ -5,7 +5,7 @@ import { useState, useEffect } from 'react'; const LABELS = { 'surname': 'Прізвище', 'name': 'Ім‘я', - 'position': 'Посада в компанії чи стартапі', + 'person_position': 'Посада в компанії чи стартапі', 'email': 'Електронна пошта', }; @@ -22,6 +22,7 @@ const ERRORS = { const UserInfo = (props) => { const [user, setUser] = useState(props.user); + const [profile, setProfile] = useState(props.profile); const [formStateErr, setFormStateErr] = useState(ERRORS); useEffect(() => { @@ -50,9 +51,15 @@ const UserInfo = (props) => { }; const onUpdateField = e => { - setUser((prevState) => { - return { ...prevState, [e.target.name]: e.target.value }; - }); + if (e.target.name === 'person_position') { + setProfile((prevState) => { + return { ...prevState, [e.target.name]: e.target.value }; + }); + } else { + setUser((prevState) => { + return { ...prevState, [e.target.name]: e.target.value }; + }); + } }; const handleSubmit = (event) => { @@ -92,11 +99,11 @@ const UserInfo = (props) => {
{ const authToken = localStorage.getItem("Token"); - const [mainUser, setMainUser] = useState(USER); - const [backUser, setBackUser] = useState(null); const [mainProfile, setMainProfile] = useState(null); const [formName, setFormName] = useState(''); @@ -98,20 +46,22 @@ const ProfilePage = () => { console.error(error); }) .finally(() => { - setIsLoading(false); + setIsLoading(false); }); } }, [backUser]); - - const profileUpdateHandler = (myUser) => { - console.log('in app'); - console.log(myUser); - setMainUser((prev) => { - return { ...prev, ...myUser } - }); + + const userUpdateHandler = (myUser) => { + axios.patch(`${process.env.REACT_APP_BASE_API_URL}/api/auth/users/me/`, { + name: myUser.name, + surname: myUser.surname, + }) + .then(response => console.log(response.data)) + .catch(error => console.error(error)); }; + return (
@@ -119,9 +69,9 @@ const ProfilePage = () => { ?
Loading...
: <> - - - } + + + }
); }; diff --git a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js index cd21a0363..ede7ca1bb 100644 --- a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js +++ b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js @@ -14,32 +14,26 @@ const INFOLINKS = [ { title: "Інформація про користувача", link: "/user-info", - element: UserInfo, }, { title: "Загальна інформація", link: "/general-info", - element: GeneralInfo, }, { title: "Контакти", link: "/contacts", - element: ContactsInfo, }, { title: "Інформація про товари/ послуги", link: "/products-service-info", - element: ProductServiceInfo, }, { title: "Додаткова інформація", link: "/additional-info", - element: AdditionalInfo, }, { title: "Стартап", link: "/startup", - element: StartupInfo, }, ]; @@ -70,13 +64,13 @@ const ProfileContent = (props) => {
- } /> - } /> - } /> + {/* } /> */} + } /> + {/* } /> } /> } /> } /> - } /> + } /> */} From aeb55c6e9473ffe762555ed02a9efb333474412a Mon Sep 17 00:00:00 2001 From: DianaUzun Date: Thu, 5 Oct 2023 16:37:33 +0300 Subject: [PATCH 03/12] userinfo logic was connected --- .../src/components/BreadCrumbs/BreadCrumbs.js | 15 ++++-- .../ProfilePage/FormComponents/UserInfo.js | 24 ++++----- .../src/components/ProfilePage/ProfilePage.js | 50 ++++++++++++------- .../ProfilePageComponents/ProfileContent.js | 42 ++++++++-------- 4 files changed, 75 insertions(+), 56 deletions(-) diff --git a/FrontEnd/src/components/BreadCrumbs/BreadCrumbs.js b/FrontEnd/src/components/BreadCrumbs/BreadCrumbs.js index 5786cc821..84f2c3393 100644 --- a/FrontEnd/src/components/BreadCrumbs/BreadCrumbs.js +++ b/FrontEnd/src/components/BreadCrumbs/BreadCrumbs.js @@ -1,7 +1,7 @@ import css from './BreadCrumbs.module.css'; import { Link, useNavigate } from 'react-router-dom'; -const BreadCrumbs = (props) => { +const BreadCrumbs = ({currentPage}) => { const navigate = useNavigate(); const GoBackHandler = () => { @@ -9,10 +9,15 @@ const BreadCrumbs = (props) => { }; return (
- - Головна - -
{props.currentPage}
+ + Головна + +
{currentPage}
); }; diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js b/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js index 7ef6c3a0a..27552592f 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js @@ -38,12 +38,12 @@ const UserInfo = (props) => { newFormState[key] = { 'error': true, 'message': 'Обов’язкове поле', - } + }; } else { newFormState[key] = { 'error': false, 'message': '', - } + }; } } setFormStateErr({ ...formStateErr, ...newFormState }); @@ -65,7 +65,7 @@ const UserInfo = (props) => { const handleSubmit = (event) => { event.preventDefault(); if (checkRequiredFields()) { - props.onUpdate(user); + props.onUpdate(user, profile); // TODO something } else { // TODO something @@ -74,12 +74,12 @@ const UserInfo = (props) => { return (
-
+
{ value={user.surname} /> {
{ - const authToken = localStorage.getItem("Token"); + const authToken = localStorage.getItem('Token'); const [backUser, setBackUser] = useState(null); const [mainProfile, setMainProfile] = useState(null); const [formName, setFormName] = useState(''); @@ -35,42 +35,56 @@ const ProfilePage = () => { useEffect(() => { if (backUser) { axios.get(`${process.env.REACT_APP_BASE_API_URL}/api/profiles/${backUser.profile_id}`, { - headers: { - 'Authorization': `token ${authToken}` - } }) .then((res) => { setMainProfile(res.data); + setIsLoading(false); }) .catch((error) => { console.error(error); - }) - .finally(() => { - setIsLoading(false); }); } }, [backUser]); - const userUpdateHandler = (myUser) => { - axios.patch(`${process.env.REACT_APP_BASE_API_URL}/api/auth/users/me/`, { - name: myUser.name, - surname: myUser.surname, - }) - .then(response => console.log(response.data)) - .catch(error => console.error(error)); + const userInfoUpdateHandler = (myUser, myProfile) => { + if ((myUser.name != backUser.name) || (myUser.surname != backUser.surname)) { + axios.patch(`${process.env.REACT_APP_BASE_API_URL}/api/auth/users/me/`, { + name: myUser.name, + surname: myUser.surname, + }) + .then(response => { + setBackUser(response.data); + }) + .catch(error => console.error(error)); + } + + if (myProfile.person_position != mainProfile.person_position) { + axios.patch(`${process.env.REACT_APP_BASE_API_URL}/api/profiles/${myUser.profile_id}`, { + person_position: myProfile.person_position, + }) + .then(response => { + setMainProfile(response.data); + }) + .catch(error => console.error(error)); + } }; return (
- + {isLoading - ?
Loading...
+ ? : <> - + }
); diff --git a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js index ede7ca1bb..f15f915b4 100644 --- a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js +++ b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js @@ -1,39 +1,39 @@ import css from './ProfileContent.module.css'; -import { Link, NavLink, Route, Routes, Navigate } from 'react-router-dom'; -import AdditionalInfo from '../FormComponents/AdditionalInfo'; -import ContactsInfo from '../FormComponents/ContactsInfo'; -import DeleteProfilePage from '../FormComponents/DeleteProfileComponent/DeleteProfilePage'; -import GeneralInfo from '../FormComponents/GeneralInfo'; -import ProductServiceInfo from '../FormComponents/ProductServiceInfo'; -import StartupInfo from '../FormComponents/StartupInfo'; +import { Link, NavLink, Route, Routes } from 'react-router-dom'; +// import AdditionalInfo from '../FormComponents/AdditionalInfo'; +// import ContactsInfo from '../FormComponents/ContactsInfo'; +// import DeleteProfilePage from '../FormComponents/DeleteProfileComponent/DeleteProfilePage'; +// import GeneralInfo from '../FormComponents/GeneralInfo'; +// import ProductServiceInfo from '../FormComponents/ProductServiceInfo'; +// import StartupInfo from '../FormComponents/StartupInfo'; import UserInfo from '../FormComponents/UserInfo'; import ProfileFormButton from '../UI/ProfileFormButton/ProfileFormButton'; const INFOLINKS = [ { - title: "Інформація про користувача", - link: "/user-info", + title: 'Інформація про користувача', + link: '/user-info', }, { - title: "Загальна інформація", - link: "/general-info", + title: 'Загальна інформація', + link: '/general-info', }, { - title: "Контакти", - link: "/contacts", + title: 'Контакти', + link: '/contacts', }, { - title: "Інформація про товари/ послуги", - link: "/products-service-info", + title: 'Інформація про товари/ послуги', + link: '/products-service-info', }, { - title: "Додаткова інформація", - link: "/additional-info", + title: 'Додаткова інформація', + link: '/additional-info', }, { - title: "Стартап", - link: "/startup", + title: 'Стартап', + link: '/startup', }, ]; @@ -60,12 +60,12 @@ const ProfileContent = (props) => { >{element.title} ))}
- Видалити профіль + Видалити профіль
{/* } /> */} - } /> + } /> {/* } /> } /> } /> From c4bfb02ffca410b6cbb5697baffdcdc038cab64d Mon Sep 17 00:00:00 2001 From: DianaUzun Date: Thu, 5 Oct 2023 22:51:30 +0300 Subject: [PATCH 04/12] connect some fields of general info --- .../FormFields/MultipleSelectChip.js | 16 +- .../ProfilePage/FormComponents/GeneralInfo.js | 281 ++++++++++-------- .../src/components/ProfilePage/ProfilePage.js | 21 +- .../ProfilePageComponents/ProfileContent.js | 20 +- 4 files changed, 197 insertions(+), 141 deletions(-) diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/MultipleSelectChip.js b/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/MultipleSelectChip.js index 2fd0c2531..937d73f05 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/MultipleSelectChip.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/FormFields/MultipleSelectChip.js @@ -41,8 +41,12 @@ export default function MultipleSelectChip(props) { {props.label}
- - {props.defaultValue} + + + {props.defaultValue} + { onChange={emailChangeHandler} />
+ {(!isCorrectEmail) && +
+ Некоректна пошта +
+ }
{
- +
diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfileModal.module.css b/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfileModal.module.css index d8fe26e59..c3a09d244 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfileModal.module.css +++ b/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfileModal.module.css @@ -119,7 +119,6 @@ border-radius: 2px; background: var(--main-white, #FFF); border: 1px solid #D9D9D9; - margin-bottom: 30px; } .fields__field--input { @@ -150,3 +149,18 @@ .delete__cancelButton { cursor: pointer; } + +.error-message { + display: flex; + padding: 1px 0px; + align-items: flex-start; + gap: 10px; + align-self: stretch; + flex: 1 0 0; + color: var(--red-red-100, #F34444); + font-family: Roboto; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; +} diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.js b/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.js index 487e41f42..2e66332ac 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.js @@ -18,11 +18,11 @@ const DeleteProfilePage = (props) => {
Видалити акаунт
- + ); diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.module.css b/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.module.css index 860db0722..cfdbb9bc2 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.module.css +++ b/FrontEnd/src/components/ProfilePage/FormComponents/DeleteProfileComponent/DeleteProfilePage.module.css @@ -16,6 +16,7 @@ line-height: 20px; letter-spacing: -0.01em; text-align: center; + margin-bottom: 400px; } .text__for__delete { diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/GeneralInfo.js b/FrontEnd/src/components/ProfilePage/FormComponents/GeneralInfo.js index cc90e1a72..62f1ab6c9 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/GeneralInfo.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/GeneralInfo.js @@ -6,7 +6,6 @@ import { useUser, useProfile } from '../../../hooks/'; import CheckBoxField from './FormFields/CheckBoxField'; import FullField from './FormFields/FullField'; import HalfFormField from './FormFields/HalfFormField'; -// import ImageField from './FormFields/ImageField'; import MultipleSelectChip from './FormFields/MultipleSelectChip'; import OneSelectChip from './FormFields/OneSelectChip'; import TextField from './FormFields/TextField'; @@ -41,7 +40,6 @@ const ERRORS = { }; const TEXT_AREA_MAX_LENGTH = 1000; -// const IMAGE_SIZE = 50 * 1024 * 1024; const fetcher = (...args) => fetch(...args).then(res => res.json()); @@ -51,7 +49,6 @@ const GeneralInfo = (props) => { const [profile, setProfile] = useState(props.profile); const [formStateErr, setFormStateErr] = useState(ERRORS); const [edrpouError, setEdrpouError] = useState(null); - // const [imageBannerError, setImageBannerError] = useState(null); const { data: fetchedRegions, isLoading: isRegionLoading } = useSWR(`${process.env.REACT_APP_BASE_API_URL}/api/regions/`, fetcher); const { data: fetchedActivities, isLoading: isActivitiesLoading } = useSWR(`${process.env.REACT_APP_BASE_API_URL}/api/activities/`, fetcher); @@ -112,34 +109,6 @@ const GeneralInfo = (props) => { } }; - // const onUpdateImageField = e => { - // const file = e.target.files[0]; - // if (file) { - // if (file.size > IMAGE_SIZE) { - // if (e.target.name === 'logo') { - // setImageLogoError('Максимальний розмір файлу 50Mb'); - // } else { - // setImageBannerError('Максимальний розмір файлу 50Mb'); - // } - // } else { - // if (e.target.name === 'logo') { - // setImageLogoError(null); - // } else { - // setImageBannerError(null); - // } - // setProfile((prevState) => { - // return { ...prevState, [e.target.name]: file }; - // }); - // } - // } - // }; - - // const deleteImageHandler = (name) => { - // setProfile((prevState) => { - // return { ...prevState, [name]: '' }; - // }); - // }; - const onChangeCheckbox = e => { if (e.target.name === 'is_startup') { setProfile((prevState) => { @@ -226,121 +195,109 @@ const GeneralInfo = (props) => {
{(user && profile && mainProfile) ? - <> -
-
-
- -
- +
+
+ +
+ +
+ -
- + : + el.key === profile.region)?.value ?? ''} /> - {isRegionLoading - ? - - : - el.key === profile.region)?.value ?? ''} - /> - } -
-
- {isActivitiesLoading - ? - - : - obj.name) ?? ''} - defaultValue="Оберіть" - error={formStateErr['activities']['error'] - ? - formStateErr['activities']['message'] - : - null} - /> - } - {isCategoriesLoading - ? - - : - obj.name) ?? ''} - defaultValue="Оберіть" - error={formStateErr['categories']['error'] - ? - formStateErr['categories']['message'] - : - null} - /> - } -
- {/* */} - - + } +
+
+ {isActivitiesLoading + ? + + : + obj.name) ?? ''} + defaultValue="Оберіть" + error={formStateErr['activities']['error'] + ? + formStateErr['activities']['message'] + : + null} + /> + } + {isCategoriesLoading + ? + + : + obj.name) ?? ''} + defaultValue="Оберіть" + error={formStateErr['categories']['error'] + ? + formStateErr['categories']['message'] + : + null} + /> + }
- - + + +
+ : }
); diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/ProductServiceInfo.js b/FrontEnd/src/components/ProfilePage/FormComponents/ProductServiceInfo.js index f8658e06c..8c7fe4e52 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/ProductServiceInfo.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/ProductServiceInfo.js @@ -58,28 +58,26 @@ const ProductServiceInfo = (props) => {
{(user && profile && mainProfile) ? - <> -
-
- - -
-
- +
+
+ + +
+
: }
); diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/StartupInfo.js b/FrontEnd/src/components/ProfilePage/FormComponents/StartupInfo.js index 1ce31dcd6..f2332fd73 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/StartupInfo.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/StartupInfo.js @@ -56,20 +56,18 @@ const StartupInfo = (props) => {
{(user && profile && mainProfile) ? - <> -
-
- -
-
- +
+
+ +
+
: }
); diff --git a/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js b/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js index 0281794f5..6e2876211 100644 --- a/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js +++ b/FrontEnd/src/components/ProfilePage/FormComponents/UserInfo.js @@ -118,49 +118,47 @@ const UserInfo = (props) => {
{(updateUser && user && profile && updateProfile) ? - <> -
-
-
- - -
-
- - -
+ +
+
+ +
- - +
+ + +
+
+ : }
diff --git a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js index 8019be4fd..6af3a8eac 100644 --- a/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js +++ b/FrontEnd/src/components/ProfilePage/ProfilePageComponents/ProfileContent.js @@ -1,8 +1,8 @@ import css from './ProfileContent.module.css'; -import { NavLink, Route, Routes } from 'react-router-dom'; +import { Link, NavLink, Route, Routes } from 'react-router-dom'; import AdditionalInfo from '../FormComponents/AdditionalInfo'; import ContactsInfo from '../FormComponents/ContactsInfo'; -// import DeleteProfilePage from '../FormComponents/DeleteProfileComponent/DeleteProfilePage'; +import DeleteProfilePage from '../FormComponents/DeleteProfileComponent/DeleteProfilePage'; import GeneralInfo from '../FormComponents/GeneralInfo'; import ProductServiceInfo from '../FormComponents/ProductServiceInfo'; import StartupInfo from '../FormComponents/StartupInfo'; @@ -60,21 +60,19 @@ const ProfileContent = (props) => { >{element.title} ))}
- {/* Видалити профіль - */} +
- {/* } /> */} + curForm={FORM_NAMES[6]} />} /> Date: Sat, 2 Dec 2023 13:43:32 +0100 Subject: [PATCH 12/12] correct styles applied --- .../ProfileDetail/DetailedInfo/ReadMore.module.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css index c0a33aeb5..4aeed2767 100644 --- a/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css +++ b/FrontEnd/src/components/ProfileDetail/DetailedInfo/ReadMore.module.css @@ -8,4 +8,15 @@ line-height: 22px; letter-spacing: -0.14px; cursor: pointer; +} + +.read-more { + color: var(--main-grey-90, #25292C); + font-feature-settings: 'calt' off; + font-family: Inter; + font-size: 14px; + font-style: normal; + font-weight: 400; + line-height: 22px; + letter-spacing: -0.14px; } \ No newline at end of file