Skip to content

Commit

Permalink
Merge branch 'develop' into cicd
Browse files Browse the repository at this point in the history
  • Loading branch information
kimachinskiy committed Sep 20, 2023
2 parents 14e7522 + 65812b6 commit f1376c1
Show file tree
Hide file tree
Showing 75 changed files with 3,243 additions and 1,084 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
/.env
/.DS_Store
__pycache__/
/authentication/migrations/
/profiles/migrations/
/FrontEnd/node_modules
29 changes: 29 additions & 0 deletions FrontEnd/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions FrontEnd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"@testing-library/jest-dom": "^5.17.0",
"@testing-library/react": "^13.4.0",
"@testing-library/user-event": "^13.5.0",
"axios": "^1.5.0",
"react": "^18.2.0",
"react-cookie": "^6.1.0",
"react-dom": "^18.2.0",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions FrontEnd/public/svg/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions FrontEnd/public/svg/instagram.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions FrontEnd/public/svg/profile-view-image-empty.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions FrontEnd/public/svg/star-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion FrontEnd/src/App.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.App {
text-align: center;
/*for footer correct work*/
/* min-height: 100vh;
flex-direction: column;
Expand Down
9 changes: 2 additions & 7 deletions FrontEnd/src/App.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
//For authorization Page
//Don't forget about
//npm install validator
//npm i react-router-dom@6.4.1
//npm install react-cookie
//npm install react-hook-form
//npm install @mui/material @emotion/react @emotion/styled
import React from 'react';
import './App.css';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
Expand All @@ -17,6 +10,7 @@ import ScrollToTopButton from './components/PrivacyPolicyPage/privacy/ScrollToTo
import TermsAndConditions from './components/terms-and-conditions-app/terms_conditions/TermsAndConditionsComponent';
import ProfilePage from './components/ProfilePage/ProfilePage';
import MainPage from './components/landing-page/MainPage';
import ProfileView from "./components/ProfileView/ProfileView";


function App() {
Expand All @@ -31,6 +25,7 @@ function App() {
<Route path="/sign-up" element={<SignUpPage />} />
<Route path="/privacy-policy" element={<PrivacyPolicy />} />
<Route path="/terms-and-conditions" element={<TermsAndConditions />} />
<Route path="/profile-view" element={<ProfileView />} />
</Routes>
<Footer />
<ScrollToTopButton />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Profile(props) {
<div className={css["header-profile-section"]}>
<img className={css["header-profile__avatar"]} src={avatar_image} alt=""/>
<div className={css["header-profile-tab"]}>
<Link to='/profile' className={css["header-profile-link__text"]}>Профіль</Link>
<Link to='/profile/user-info' className={css["header-profile-link__text"]}>Профіль</Link>
</div>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const DeleteProfilePage = (props) => {
return (
<div>
<div className={css['text__for__delete']}>Видалити акаунт</div>
<button className={css['button__delete']} onClick={() => setModal(true)}>Видалити</button>
<button className={css['button__delete']} onClick={() => setModal(true)} style={{marginBottom: 400}}>Видалити</button>
<MyModal visible={modal} setVisisble={setModal}>
<DeleteProfileModal onCancel={cancelHandler} user={props.user}/>
</MyModal>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ const ERRORS = {
};

const TEXT_AREA_MAX_LENGTH = 1000;
const IMAGE_SIZE = 50 * 1024 * 1024;

const GeneralInfo = (props) => {
const [user, setUser] = useState(props.user);
Expand Down Expand Up @@ -146,9 +147,8 @@ const GeneralInfo = (props) => {

const onUpdateImageField = e => {
const file = e.target.files[0];
const allowedSize = 50 * 1024 * 1024;
if (file) {
if (file.size > allowedSize) {
if (file.size > IMAGE_SIZE) {
if (e.target.name === 'logo') {
setImageLogoError('Максимальний розмір файлу 50Mb');
} else {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import css from './ProfileContent.module.css';
import { Link, NavLink, Route, Routes, Navigate } from 'react-router-dom';

import axios from 'axios';
import AdditionalInfo from '../FormComponents/AdditionalInfo';
import ContactsInfo from '../FormComponents/ContactsInfo';
import DeleteProfilePage from '../FormComponents/DeleteProfileComponent/DeleteProfilePage';
Expand All @@ -10,6 +10,7 @@ import StartupInfo from '../FormComponents/StartupInfo';
import UserInfo from '../FormComponents/UserInfo';
import ProfileFormButton from '../UI/ProfileFormButton/ProfileFormButton';


const INFOLINKS = [
{
title: "Інформація про користувача",
Expand Down Expand Up @@ -70,15 +71,24 @@ const ProfileContent = (props) => {
</div>

<Routes>
<Route path="/" element={<Navigate to="/profile/user-info" replace />} />
<Route path="/delete" element={<DeleteProfilePage user={props.user} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[6]} />} />
{INFOLINKS.map((el, index) => (

{/* {INFOLINKS.map((el, index) => (
<Route
path={el.link}
Component={() => <el.element user={props.user} onUpdate={props.onUpdate} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[index]}/>}
key={el.title}
/>
))}
))} */}

<Route path="/user-info" element={<UserInfo user={props.user} onUpdate={props.onUpdate} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[0]} />} />
<Route path="/general-info" element={<GeneralInfo user={props.user} onUpdate={props.onUpdate} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[1]} />} />
<Route path="/contacts" element={<ContactsInfo user={props.user} onUpdate={props.onUpdate} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[2]} />} />
<Route path="/products-service-info" element={<ProductServiceInfo user={props.user} onUpdate={props.onUpdate} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[3]} />} />
<Route path="/additional-info" element={<AdditionalInfo user={props.user} onUpdate={props.onUpdate} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[4]} />} />
<Route path="/startup" element={<StartupInfo user={props.user} onUpdate={props.onUpdate} currentFormNameHandler={props.currentFormNameHandler} curForm={FORM_NAMES[5]} />} />


</Routes>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
import classes from "./ProfileInfo.module.css";

const dataItems = [
{
title: "Рік заснування",
text: "2016",
},
{
title: "Розмір компанії",
text: "250 працівників",
},
{
title: "Аудит",
text: "Назва аудиту",
},
];

const ProfileInfo = ({ dataItems }) => {

return (
<div className={classes["profile-info-block"]}>
<div className={classes["profile-info-block__main"]}>
<div className={classes["profile-info-block__main-content"]}>
<div className={classes["profile-info-block__main-content-data"]}>
<div className={classes["profile-info-block__main-content-bold-title"]}>ЄДРПОУ</div>
<div className={classes["profile-info-block__main-content-text"]}>11223344</div>
</div>
<div>
{dataItems.map((item, index) => (
<div key={index} className={classes["profile-info-block__main-content-data"]}>
<div className={classes["profile-info-block__main-content-title"]}>
{item.title}
</div>
<div className={classes["profile-info-block__main-content-text"]}>
{item.text}
</div>
</div>
))}
</div>
</div>
<div className={classes["profile-info-block__main-content"]}>
<div className={classes["profile-info-block__main-content-data2"]}>
<div className={classes["profile-info-block__main-content-title"]}>Сайт</div>
<div className={classes["profile-info-block__main-content-url"]}>stakhovskywines.com</div>
</div>
<div className={classes["profile-info-block__main-content-data"]}>
<div className={classes["profile-info-block__main-content-title"]}>Телефон</div>
<div className={classes["profile-info-block__main-content-text"]}>201232323236</div>
<div className={classes["profile-info__button"]}>
<div className={classes["profile-info__button-text"]}>Показати телефон</div>
</div>
</div>
<div className={classes["profile-info-block__main-content-data"]}>
<div className={classes["profile-info-block__main-content-title"]}>Електронна пошта</div>
<div className={classes["profile-info-block__main-content-text"]}>2232323232323</div>
<div className={classes["profile-info__button"]}>
<div className={classes["profile-info__button-text"]}>Показати ел. пошту</div>
</div>
</div>
<div className={classes["profile-info-block__main-content-data2"]}>
<div className={classes["profile-info-block__main-content-title"]}>Адрес(и)</div>
<div className={classes["profile-info-block__main-content-text"]}>
Офіс:
90260, Україна, Закарпатська обл.,
Берегівський р-н,с. Мужієво,
</div>
</div>
<div className={classes["profile-info-block__main-content-data2"]}>
<div className={classes["profile-info-block__main-content-title"]}>Соціальні мережі</div>
<div className={classes["profile-info-block__main-content-icons"]}>
<img src={`${process.env.PUBLIC_URL}/svg/facebook.svg`} alt="facebook"/>
<img src={`${process.env.PUBLIC_URL}/svg/instagram.svg`} alt="instagram"/>
</div>
</div>
<div className={classes["profile-info-block__main-content-data"]}>
<div className={classes["profile-info-block__main-content-title"]}>Співпрацюємо з </div>
<div className={classes["profile-info-block__main-content-text"]}>Сільпо, Rozetka, Бюро Вин</div>
</div>
</div>
</div>
</div>
);
};

export default ProfileInfo;
Loading

0 comments on commit f1376c1

Please sign in to comment.