This commit is contained in:
bakhirev 2024-07-19 00:45:54 +03:00
parent 00c41b9fe4
commit 3a9e675197
9 changed files with 123 additions and 55 deletions

View file

@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import style from '../index.module.scss';
import style from '../styles/scale.module.scss';
interface HorizontalScaleProps {
max: number;

View file

@ -1,6 +1,6 @@
import React from 'react';
import style from '../index.module.scss';
import style from '../styles/index.module.scss';
interface HorizontalScaleProps {
text: number | string;

View file

@ -3,7 +3,7 @@ import React, { useState } from 'react';
import HorizontalScale from './components/HorizontalScale';
import Line from './components/Line';
import style from './index.module.scss';
import style from './styles/index.module.scss';
interface IDot {
title: string;

View file

@ -27,20 +27,6 @@
}
}
&_scale {
display: inline-block;
width: var(--temp-height);
&_wrapper {
position: absolute;
bottom: 0;
left: 0;
width: 1px;
height: 1px;
transform: rotate(-90deg);
}
}
&_line {
position: absolute;
left: var(--space-xxl);
@ -72,10 +58,6 @@
.vertical_bar {
padding: 0;
&_scale {
display: none;
}
&_line {
left: 0;
width: 100%;

View file

@ -0,0 +1,69 @@
@import 'src/styles/variables';
.vertical_bar_scale {
--temp-height: 300px;
--temp-track: var(--color-11);
--temp-thumb: var(--color-grey);
display: inline-block;
width: var(--temp-height);
-webkit-appearance: none;
appearance: none;
background: transparent;
&:focus {
outline: none;
}
&::-webkit-slider-runnable-track {
height: var(--space-s);
border-radius: var(--border-radius-m);
background-color: var(--temp-track);
}
&::-webkit-slider-thumb {
height: var(--space-l);
width: var(--space-l);
margin-top: -4px;
-webkit-appearance: none;
appearance: none;
border-radius: var(--border-radius-m);
background-color: var(--color-grey);
}
&::-moz-range-track {
height: var(--space-l);
width: var(--space-l);
margin-top: -4px;
-webkit-appearance: none;
appearance: none;
border-radius: var(--border-radius-m);
background-color: var(--color-grey);
}
&::-moz-range-thumb {
height: var(--space-s);
border-radius: var(--border-radius-m);
background-color: var(--temp-track);
}
&_wrapper {
position: absolute;
bottom: 0;
left: 0;
width: 1px;
height: 1px;
transform: rotate(-90deg);
}
}
@media print {
.vertical_bar_scale {
display: none;
}
}

View file

@ -20,6 +20,7 @@ interface IDataViewProps {
sort?: ISort[];
columnCount?: number,
className?: string,
fullScreenMode?: string,
disabledRow?: (row: any) => boolean;
converterToCsv?: Function,
updateSort?: Function,
@ -33,6 +34,7 @@ function DataView({
type,
columnCount,
className,
fullScreenMode = '',
disabledRow,
updateSort,
children,
@ -60,7 +62,6 @@ function DataView({
<div className={style.data_view_buttons}>
{!isMobile && (
<img
title={'Скачать XLSX'}
src="./assets/icons/Download.svg"
className={style.data_view_icon}
onClick={() => {
@ -76,7 +77,7 @@ function DataView({
: './assets/icons/OpenFullscreen.svg'}
className={style.data_view_icon}
onClick={() => {
fullScreen.toggle();
fullScreen.toggle(fullScreenMode);
}}
/>
)}

View file

@ -43,6 +43,7 @@ function AllPR({
updateSort={updateSort}
type={mode === 'print' ? 'cards' : undefined}
columnCount={mode === 'print' ? 2 : undefined}
fullScreenMode="all"
>
{mode === 'print' ? (
<Column

View file

@ -48,6 +48,7 @@ function Authors({ response, updateSort, rowsForExcel, mode }: IAuthorsProps) {
updateSort={updateSort}
type={mode === 'print' ? 'cards' : undefined}
columnCount={mode === 'print' ? 3 : undefined}
fullScreenMode="author"
>
<Column
isSortable

View file

@ -12,6 +12,7 @@ import getFakeLoader from 'ts/components/DataLoader/helpers/formatter';
import NothingFound from 'ts/components/NothingFound';
import Title from 'ts/components/Title';
import PageBreak from 'ts/pages/Common/components/PageBreak';
import fullScreen from 'ts/store/FullScreen';
import Total from './Total';
import Authors from './Authors';
@ -28,10 +29,16 @@ const PR = observer(({
const authorsStat = Object.values(PRbyName);
return (
<>
{!fullScreen.isOpen && (
<>
<Title title="page.team.pr.oneTaskDays"/>
<Total/>
</>
)}
{!fullScreen.isOpen || fullScreen.mode === 'author' ? (
<>
<Title title="page.team.pr.statByAuthors"/>
<DataLoader
to="response"
@ -45,8 +52,13 @@ const PR = observer(({
/>
<Pagination/>
</DataLoader>
</>
) : null}
<PageBreak/>
{!fullScreen.isOpen || fullScreen.mode === 'all' ? (
<>
<Title title="page.team.pr.longDelay"/>
<DataLoader
to="response"
@ -65,6 +77,8 @@ const PR = observer(({
{mode !== 'print' && <Pagination/>}
</DataLoader>
</>
) : null}
</>
);
});