Commit e508580d authored by kazba anuarbekov's avatar kazba anuarbekov

#78 Исправил баги

parents 974324ed 80c7b5f7
Pipeline #324 passed with stages
in 2 minutes and 42 seconds
h4 { h4 {
margin: 2rem 0rem 1rem; margin: 2rem 0rem 1rem;
} }
.table-wrap {
margin-top: 0;
padding-top: 0;
overflow: auto;
position: relative;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
.table-image > td, overflow-y: auto;
th { height: 250px;
}
.table-image > td,th {
vertical-align: middle; vertical-align: middle;
text-align: center; text-align: center;
} }
.table thead{
margin-top: 0;
padding-top: 0;
}
.table{ .table{
height: 100%;
text-align: center;
margin: 0 auto; margin: 0 auto;
border-collapse: collapse;
font-size: 0.9em; font-size: 0.9em;
font-family: sans-serif; font-family: sans-serif;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.15); display: inline-block;
width: 100%; vertical-align: top;
max-width: 100%;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
border-collapse: collapse; width: 100%;
} }
.table>thead{ /* .table>thead{
background-color: #009879; background-color: #009879;
color: #ffffff;
text-align: left; text-align: left;
} */
.table th {
position: sticky;
top: 0;
color: #ffffff;
background:#424141;
}
.table td, th {
padding: 0 5px;
box-sizing: border-box;
height: 40px;
} }
.table,td,th { .table,td,th {
border: 1px solid black; border: 1px solid black;
border-collapse: collapse;
padding: 5px;
height: 100%;
text-align: center; text-align: center;
} }
.flex-space { .flex-space {
...@@ -63,13 +88,7 @@ th { ...@@ -63,13 +88,7 @@ th {
box-shadow: 0 0 0 4px rgba(0, 0, 255, .2); box-shadow: 0 0 0 4px rgba(0, 0, 255, .2);
} }
/* .dropdown {
position: relative;
display: inline-block;
} */
.dropdown-content { .dropdown-content {
/* display: none; */
position: absolute; position: absolute;
background-color: #f1f1f1; background-color: #f1f1f1;
min-width: 160px; min-width: 160px;
...@@ -85,6 +104,21 @@ th { ...@@ -85,6 +104,21 @@ th {
display: block; display: block;
} }
.dropdown a:hover {background-color: #ddd;} .dropdown a:hover {background-color: #ddd;} */
.show {display: block;} .show {display: block;}
/* @media screen and (max-width: 600px){
.table-wrap {
overflow: auto;
position: relative;
}
.table{
display: inline-block;
vertical-align: top;
max-width: 100%;
overflow-x: auto;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
}
} */
\ No newline at end of file
...@@ -25,6 +25,7 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s ...@@ -25,6 +25,7 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s
return ( return (
<> <>
<div className="table-wrap">
<table className="table"> <table className="table">
<thead> <thead>
<tr> <tr>
...@@ -32,7 +33,7 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s ...@@ -32,7 +33,7 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s
<th>Дата платежа</th> <th>Дата платежа</th>
<th>Компания</th> <th>Компания</th>
<th>Назначение</th> <th>Назначение</th>
<th>Основание договора/счета</th> <th>Договор/Счет</th>
<th>Контрагент</th> <th>Контрагент</th>
<th>Приоритет</th> <th>Приоритет</th>
<th>Сумма платежа</th> <th>Сумма платежа</th>
...@@ -107,6 +108,7 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s ...@@ -107,6 +108,7 @@ const Account = ({ registry, payments, approve, cancelApprove, pay, cancelPay, s
))} ))}
</tbody> </tbody>
</table> </table>
</div>
{showModal.show && <Modal src={showModal.src} close={closeModal} />} {showModal.show && <Modal src={showModal.src} close={closeModal} />}
</> </>
); );
......
.Header { .Header {
background: #2c2c2e; background: #2c2c2e;
padding: 5px 50px; padding: 10px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 16px;
color: #c7c7cc; color: #c7c7cc;
margin-left: 20px;
text-transform: capitalize; text-transform: capitalize;
margin: 10px auto;
} }
.Header__link:active { .Header__link:active {
color: #FF077D; color: #FF077D;
...@@ -30,9 +30,65 @@ ...@@ -30,9 +30,65 @@
margin-left: 10px; margin-left: 10px;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
margin-bottom: 20px;
} }
.Header__button-link { .Header__button-link {
text-decoration: none; text-decoration: none;
font-size: 12px; font-size: 12px;
color: white; color: white;
} }
.Header__menu{
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
position: absolute;
right: 0;
left: 0;
z-index: 100;
background: #2c2c2e;
top:36px;
border-top: 1px solid red;
}
.Header__menu--none{
display: none;
}
.Header__accaunt{
top:52px;
justify-content: flex-end;
padding: 10px 10px 10px 10px;
z-index: 100;
border-bottom: 1px solid red;
}
@media screen and (min-width:600px){
.Header__menu{
flex-direction: row;
}
.Header__link{
margin:0 20px 0 0;
}
.Header{
padding: 10px 50px;
}
.Header__button{
margin-bottom: 0;
}
}
@media screen and (min-width:1500px) {
.Header__menu{
position:unset;
display: flex;
padding-top:0;
background: inherit;
border-top: none;
}
.Header__accaunt{
border-bottom:none;
}
.Header{
padding: 5px 50px;
}
}
\ No newline at end of file
import { Button, Menu, MenuItem } from "@material-ui/core"; import { Button, Menu, MenuItem } from "@material-ui/core";
import React, { Fragment } from "react"; import React, { Fragment, useEffect, useState } from "react";
import { NavLink } from "react-router-dom"; import { NavLink } from "react-router-dom";
import logo from "../../assets/images/logo-white.svg"; import logo from "../../assets/images/logo-white.svg";
import "./Header.css"; import "./Header.css";
...@@ -8,6 +8,23 @@ import UserMenu from "./Menus/UserMenu/UserMenu"; ...@@ -8,6 +8,23 @@ import UserMenu from "./Menus/UserMenu/UserMenu";
const Header = ({ user }) => { const Header = ({ user }) => {
const [anchorEl, setAnchorEl] = React.useState(null); const [anchorEl, setAnchorEl] = React.useState(null);
const [state,setState]=useState({menuShow:false,accauntShow:false})
const classNameOfAccaunt=state.accauntShow ? 'Header__menu Header__accaunt': 'Header__menu--none';
const classNameOfMenu=state.menuShow? 'Header__menu': 'Header__menu--none';
const [windowWidth,setWindowWidth]=useState(window.innerWidth);
const handleResize=e=>{
setWindowWidth(e.target.window.innerWidth);
}
useEffect(()=>{
window.addEventListener("resize", handleResize);
},[]);
useEffect(()=>{
if(windowWidth>1500){
setState({menuShow:true,accauntShow:true});
}
},[windowWidth])
const handleClick = (event) => { const handleClick = (event) => {
setAnchorEl(event.currentTarget); setAnchorEl(event.currentTarget);
...@@ -16,12 +33,37 @@ const Header = ({ user }) => { ...@@ -16,12 +33,37 @@ const Header = ({ user }) => {
const handleClose = () => { const handleClose = () => {
setAnchorEl(null); setAnchorEl(null);
}; };
const menuClick=()=>{
if(!state.menuShow){
setState(prevState=>{
return {...prevState,menuShow:true}
})
}
else{
setState(prevState=>{
return {...prevState,menuShow:false}
})
}
};
const accauntClick=()=>{
if(!state.accauntShow){
setState(prevState=>{
return {...prevState,accauntShow:true}
})
}
else{
setState(prevState=>{
return {...prevState,accauntShow:false}
})
}
}
return ( return (
<div className="Header"> <div className="Header">
<NavLink to="/"> <NavLink to="/">
<img src={logo} alt="logo" /> <img src={logo} alt="logo" />
</NavLink> </NavLink>
<menu> <button className={windowWidth>1500? 'Header__menu--none':"UserMenu__btn Header__burger"} onClick={menuClick}>Menu</button>
<menu className={classNameOfMenu}>
{user && user.role.includes("viewAllPayments") && ( {user && user.role.includes("viewAllPayments") && (
<Fragment> <Fragment>
<Button <Button
...@@ -112,7 +154,8 @@ const Header = ({ user }) => { ...@@ -112,7 +154,8 @@ const Header = ({ user }) => {
)} )}
</menu> </menu>
<div>{user ? <UserMenu user={user} /> : <AnonymousMenu />}</div> <button className={windowWidth>1500? 'Header__menu--none':"UserMenu__btn Header__burger"} onClick={accauntClick}>Профиль</button>
<div className={classNameOfAccaunt}>{user ? <UserMenu user={user} /> : <AnonymousMenu />}</div>
</div> </div>
); );
}; };
......
.UserMenu__title { .UserMenu__title {
color: white; color: white;
margin: 0; margin: 0;
font-size: 16px;
} }
.UserMenu__btn { .UserMenu__btn {
border-radius: 18px; border-radius: 18px;
...@@ -13,3 +14,8 @@ ...@@ -13,3 +14,8 @@
outline: none; outline: none;
cursor: pointer; cursor: pointer;
} }
@media screen and (min-width:1200px){
.UserMenu__title{
font-size: 20px;
}
}
.Redirect { .Redirect {
max-width: 500px; max-width: 500px;
margin: 0 auto; margin: 50px auto;
}
.Redirect__inside{
display: flex;
flex-wrap: wrap;
} }
.btn { .btn {
text-decoration: none; text-decoration: none;
...@@ -8,5 +12,19 @@ ...@@ -8,5 +12,19 @@
padding: 10px; padding: 10px;
background: linear-gradient(64.35deg,#ff7488 9.2%,#ff077d 89.76%); background: linear-gradient(64.35deg,#ff7488 9.2%,#ff077d 89.76%);
color: white; color: white;
border-radius: 10px border-radius: 10px;
/* display: inline; */
}
.Redirect__title{
font-size: 18px;
}
@media screen and (min-width:600){
.Redirect__title{
font-size: 20px;
}
}
@media screen and (min-width:1500) {
.Redirect{
margin: 20px auto;
}
} }
\ No newline at end of file
...@@ -6,11 +6,15 @@ const RedirectToAuth = () => { ...@@ -6,11 +6,15 @@ const RedirectToAuth = () => {
return ( return (
<Fragment> <Fragment>
<div className='Redirect'> <div className='Redirect'>
<h1>Добро пожаловать во froot.kz</h1> <h1 className='Redirect__title'>Добро пожаловать во froot.kz</h1>
<p>Если у вас еще нет аккаунта, пройдите по странице <div className='Redirect__inside'>
<NavLink className='btn' to='/register'> Регистрация <p className='Redirect__text'>Если у вас еще нет аккаунта, пройдите по странице</p>
<NavLink className='btn' to='/register'> Регистрация</NavLink>
</NavLink></p><p> Если у вас уже имеется аккаунт <NavLink className='btn' to='/login'>Войти</NavLink></p> </div>
<div className='Redirect__inside'>
<p> Если у вас уже имеется аккаунт </p>
<NavLink className='btn' to='/login'>Войти</NavLink>
</div>
</div> </div>
</Fragment> </Fragment>
) )
......
.ButtonClose {
padding: 3px 3px 0 3px;
border-radius: 3px;
background: white;
margin-left: auto;
}
.ButtonClose:hover {
box-shadow: 0 0 10px 1px #9d9ea0;
}
\ No newline at end of file
import React from 'react'
import icon from '../../../../assets/images/icon-close.png'
import './ButtonClose.css'
const ButtonClose = ({onClickHandler}) => {
return (
<button className="ButtonClose" onClick={onClickHandler}>
<img className="icon" src={icon}/>
</button>
)
}
export default ButtonClose
.Modal { .Modal {
width: 80%;
padding: 20px;
z-index: 500; z-index: 500;
border: 1px solid #ccc; border: 1px solid #ccc;
background-color: white; background-color: white;
...@@ -12,8 +14,22 @@ ...@@ -12,8 +14,22 @@
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} }
.Modal__container { .Modal__container {
padding: 20px; padding: 10px;
display: flex;
justify-content: space-between;
align-items: start;
}
.Modal__img {
width: 100%;
display: block;
}
@media screen and (max-width: 900px){
.Modal, .Modal__img {
width: 100%;
}
} }
.Modal__content { @media screen and (max-width: 600px){
padding: 20px 0; .Modal, .Modal__img {
max-width: 100%;
}
} }
\ No newline at end of file
import { RadioButtonChecked } from "@material-ui/icons";
import React, { Fragment } from "react"; import React, { Fragment } from "react";
import Backdrop from "../Backdrop/Backdrop"; import Backdrop from "../Backdrop/Backdrop";
import ButtonClose from "../Buttons/ButtonClose/ButtonClose"
import "./Modal.css"; import "./Modal.css";
const Modal = ({ src, body, close}) => { const Modal = ({ src, body, close}) => {
...@@ -8,11 +10,8 @@ const Modal = ({ src, body, close}) => { ...@@ -8,11 +10,8 @@ const Modal = ({ src, body, close}) => {
<Backdrop close={close}/> <Backdrop close={close}/>
<div className="Modal"> <div className="Modal">
<div className="Modal__container"> <div className="Modal__container">
<button onClick={close}> {src? <img className="Modal__img" src={src}/> : body }
Close <ButtonClose onClickHandler={close}/>
</button>
{src? <img src={src}/> : body }
</div> </div>
</div> </div>
</Fragment> </Fragment>
......
...@@ -13,10 +13,3 @@ ...@@ -13,10 +13,3 @@
margin: 0; margin: 0;
margin-bottom: 10px; margin-bottom: 10px;
} }
.AddPayment__close {
margin-left: auto;
padding: 3px 3px 0 3px;
border-radius: 3px;
background: white;
}
import React from "react"; import React from "react";
import { useDispatch } from "react-redux"; import { useDispatch } from "react-redux";
import { createPayment } from "../../store/actions/paymentAction"; import { createPayment } from "../../store/actions/paymentAction";
import icon from"../../assets/images/icon-close.png"
import {push} from 'connected-react-router' import {push} from 'connected-react-router'
import PaymentForm from "../../components/UI/Forms/PaymentForm/PaymentForm"; import PaymentForm from "../../components/UI/Forms/PaymentForm/PaymentForm";
import './AddPayment.css'; import './AddPayment.css';
import ButtonClose from "../../components/UI/Buttons/ButtonClose/ButtonClose";
const AddPayment = () => { const AddPayment = () => {
const dispatch = useDispatch(); const dispatch = useDispatch();
...@@ -18,9 +18,7 @@ const AddPayment = () => { ...@@ -18,9 +18,7 @@ const AddPayment = () => {
<div className="AddPayment"> <div className="AddPayment">
<div className="flex-center"> <div className="flex-center">
<h1 className="AddPayment__title">Создание заявки</h1> <h1 className="AddPayment__title">Создание заявки</h1>
<div className="AddPayment__close" onClick={closeHandler}> <ButtonClose onClickHandler={closeHandler}/>
<img className="icon" src={icon}/>
</div>
</div> </div>
<PaymentForm <PaymentForm
onSubmit={paymentFormSubmit}/> onSubmit={paymentFormSubmit}/>
......
commit 9cef7ddbfb05fda524fd5df7409da6023752a9bf (HEAD -> test-deploy, origin/test-deploy)
Author: Elena Tsoy <ltsoy1120@gmail.com>
Date: Mon May 17 17:58:16 2021 +0600
#86 добавлены стили и адаптив таблице
commit f5122f1e99a049954e7999911aa5e0319507cad4
Author: Elena Tsoy <ltsoy1120@gmail.com>
Date: Fri May 14 22:13:51 2021 +0600
#84 тестирование api-news
commit bdd6f2ee527ff972deada1627a7afa26a6693808
Author: Elena Tsoy <ltsoy1120@gmail.com>
Date: Fri May 14 19:14:50 2021 +0600
#84 тестирование api-users
commit 6eb1a123a71d59bb0a9ee5b9a67acd790d714812
Author: Elena Tsoy <ltsoy1120@gmail.com>
Date: Fri May 14 12:54:39 2021 +0600
#84 тестирование api-payments
commit 6b9cd4cd20508c1f359e727576c96be89409b1da
Author: Askar Amantayev <askar.amantayev@gmail.com>
Date: Thu May 13 12:41:12 2021 +0600
#78 - в конфиг файле gitlab cicd добавил настройки для jest тестов
commit 53c8abac7c291f2ac68310a156c4d495f6e36b16
Author: Askar Amantayev <askar.amantayev@gmail.com>
Date: Thu May 13 12:37:11 2021 +0600
#78 - в конфиг файле фронта вернул настройки чтоб смотрел на сервер
commit 5a57a383d4a64924d5b018fbf5693fe558faf2f6
Author: Askar Amantayev <askar.amantayev@gmail.com>
Date: Thu May 13 12:33:54 2021 +0600
#78 - исправления - после отката на пред.версию вернул тесты jest на бэк
commit 023f99ad8777f75231196fe500933caebcda0d78
Author: dmitriy <calloftrust@gmail.com>
Date: Sun May 9 17:28:23 2021 +0600
#78 проверка cicd
commit c20d7c212509a802e6271237a1152bd7b6af28c6
Author: dmitriy <calloftrust@gmail.com>
Date: Sun May 9 17:18:27 2021 +0600
#78 проверка cicd
commit f357a604b042cd0f24dba71b60b9da0c35ffcd4b
Author: dmitriy <calloftrust@gmail.com>
Date: Sun May 9 17:14:22 2021 +0600
#78 проверка cicd
commit cae5d8c4477895181acbf1685a7c9032ac8c6187
Author: dmitriy <calloftrust@gmail.com>
Date: Sun May 9 17:08:36 2021 +0600
#78 проверка cicd
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment