Переписываю спорные решения

Фикс отправки отчета, проверка на массив в map в Description.js
This commit is contained in:
2023-01-17 22:14:05 +03:00
parent 42e2d0e181
commit 6b0b5e991c
21 changed files with 220 additions and 231 deletions

View File

@ -1,6 +1,6 @@
import React from 'react';
import { ActContent } from "../components/features/bookkeeping/ActContent/ActContent"
import { BookkeepingTemplete } from "../components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete"
import { ActContent } from "../../components/features/bookkeeping/ActContent/ActContent"
import { BookkeepingTemplete } from "../../components/features/bookkeeping/BookkeepingTemplete/BookkeepingTemplete"
export const ActPage = () => {
return (

View File

@ -4,8 +4,8 @@ import { WithLogout } from '../hoc/withLogout';
import Calendar from '../components/Calendar/Calendar';
const CalendarPage = () => {
const navigate = useNavigate();
return <WithLogout><Calendar onSelect={() => { navigate('/report/0') }} /></WithLogout>;
return <WithLogout><Calendar onSelect={} /></WithLogout>;
};
export default CalendarPage;

View File

@ -4,14 +4,14 @@ import { a11yDark } from 'react-syntax-highlighter/dist/esm/styles/prism';
export const CodeSnippetlighter = () => {
const [codeString, setCodeString] = useState(``)
useEffect(()=>{
fetch('/code.txt')
.then((r) => r.text())
.then(text => {
setCodeString(text)
})
}, [])
//
// useEffect(()=>{
// fetch('/code.txt')
// .then((r) => r.text())
// .then(text => {
// setCodeString(text)
// })
// }, [])
return (
<SyntaxHighlighter language={"javascript"} style={a11yDark} wrapLongLines={false} customStyle={{fontSize:14}} showLineNumbers={true}>

View File

@ -1,22 +1,25 @@
import React from 'react'
import {useDispatch, useSelector} from 'react-redux'
import {useParams, useNavigate} from 'react-router-dom'
import {
currentCandidate,
selectCurrentCandidate,
} from '../redux/outstaffingSlice'
import SVG from 'react-inlinesvg'
import {WithLogout} from '../hoc/withLogout'
import Form from '../components/Form/Form'
import {LEVELS, SKILLS} from '../constants/constants'
import {Footer} from '../components/Footer/Footer'
import arrow from '../images/right-arrow.png'
import rectangle from '../images/rectangle_secondPage.png'
import telegramIcon from '../images/telegram-icon.svg'
import {useRequest} from "../../hooks/useRequest";
import {WithLogout} from '../../hoc/withLogout'
import Form from '../../components/Form/Form'
import {Footer} from '../../components/Footer/Footer'
import arrow from '../../images/right-arrow.png'
import rectangle from '../../images/rectangle_secondPage.png'
import telegramIcon from '../../images/telegram-icon.svg'
import {LEVELS, SKILLS} from '../../constants/constants'
import {currentCandidate, selectCurrentCandidate} from '../../redux/outstaffingSlice'
import './formPage.scss'
import {useRequest} from "../hooks/useRequest";
const FormPage = () => {

View File

@ -1,7 +0,0 @@
import React from 'react';
import { WithLogout } from '../hoc/withLogout';
import Home from '../components/Home/Home';
const HomePage = () => <WithLogout><Home /></WithLogout>;
export default HomePage;

View File

@ -1,8 +0,0 @@
import React from 'react';
import { ProfileCalendar } from '../../src/components/ProfileCalendar/ProfileCalendar';
const ProfileCalendarPage = () => {
return <ProfileCalendar/>;
};
export default ProfileCalendarPage;

View File

@ -1,7 +0,0 @@
import React from 'react';
import { WithLogout } from '../hoc/withLogout';
import ReportForm from '../components/ReportForm/ReportForm';
const ReportFormPage = () => <ReportForm />;
export default ReportFormPage;

View File

@ -1,15 +1,17 @@
import React from 'react'
import { WithLogout } from '../hoc/withLogout'
import arrowLeft from '../images/right-arrow.png'
import { WithLogout } from '../../hoc/withLogout'
import arrowLeft from '../../images/right-arrow.png'
import SVG from 'react-inlinesvg'
import dateArrowIcon from '../images/dateArrow.svg'
import calendarIcon from '../images/calendar.svg'
import dateArrowIcon from '../../images/dateArrow.svg'
import calendarIcon from '../../images/calendar.svg'
import { TaskItem } from '../components/TaskItem/TaskItem'
import { TaskItem } from '../../components/TaskItem/TaskItem'
import './singleReportPage.scss'
import {useNavigate} from "react-router";
import {LogoutButton} from "../../components/LogoutButton/LogoutButton";
const tasks = [
{
@ -25,10 +27,13 @@ const tasks = [
];
const SingleReportPage = () => {
const navigate= useNavigate();
return (
<WithLogout>
<div className='single-report-page'>
<div className='single-report-page__back'>
<div onClick={()=> {navigate(-1)}} className='single-report-page__back'>
<div className='single-report-page__back-arrow'>
<img src={arrowLeft} alt='arrowLeft'/>
</div>
@ -100,8 +105,9 @@ const SingleReportPage = () => {
<div className='single-report-page__hours-text'></div>
</div>
</div>
<LogoutButton />
</div>
</WithLogout>
)
};

View File

@ -1,15 +1,14 @@
.single-report-page {
padding-top: 4.6rem;
padding: 4.6rem 20px 0;
font-family: 'GT Eesti Pro Display', sans-serif;
&__back {
display: flex;
justify-content: flex-start;
align-items: center;
cursor: pointer;
&-text {
margin-left: 3.1rem;
color: #000000;
font-family: 'GT Eesti Pro Display';
font-size: 18px;
font-weight: 300;
letter-spacing: normal;
@ -26,7 +25,6 @@
&-text {
color: #282828;
font-family: 'GT Eesti Pro Display';
font-size: 33px;
font-weight: 700;
line-height: 48.74px;
@ -52,7 +50,6 @@
border-radius: 5px;
border: 1px solid #c4c4c4;
background-color: #f0f7e0;
display: flex;
justify-content: center;
align-items: center;
@ -63,7 +60,6 @@
margin-left: 10px;
margin-bottom: 0;
color: #000000;
font-family: "GT Eesti Pro Display";
font-size: 13px;
font-weight: 300;
font-style: normal;
@ -104,7 +100,6 @@
align-items: center;
h3 {
color: #18586e;
font-family: 'GT Eesti Pro Display';
font-size: 20px;
font-weight: 500;
letter-spacing: normal;
@ -117,7 +112,6 @@
margin-top: 2.4rem;
width: 580px;
color: #000000;
font-family: 'GT Eesti Pro Display';
font-size: 15px;
font-weight: 400;
letter-spacing: normal;