mirror of
https://github.com/bakhirev/assayo.git
synced 2025-01-19 00:47:48 +00:00
update
This commit is contained in:
parent
84bee540ba
commit
d019985d14
File diff suppressed because one or more lines are too long
|
@ -1,15 +1,20 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { t } from 'ts/helpers/Localization';
|
||||||
|
import { getShortNumber } from 'ts/helpers/formatter';
|
||||||
|
|
||||||
import style from '../styles/info.module.scss';
|
import style from '../styles/info.module.scss';
|
||||||
|
|
||||||
interface IInfoProps {
|
interface IInfoProps {
|
||||||
title: string;
|
title: string;
|
||||||
duration: number;
|
duration: number;
|
||||||
|
taskInDay: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
function Info({
|
function Info({
|
||||||
title,
|
title,
|
||||||
duration,
|
duration,
|
||||||
|
taskInDay,
|
||||||
}: IInfoProps): React.ReactElement | null {
|
}: IInfoProps): React.ReactElement | null {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
@ -17,6 +22,7 @@ function Info({
|
||||||
style={{
|
style={{
|
||||||
animationDelay: `${duration + 1}s`,
|
animationDelay: `${duration + 1}s`,
|
||||||
}}
|
}}
|
||||||
|
title={`${getShortNumber(taskInDay)} ${t('page.team.total.workSpeed.title')}`}
|
||||||
>
|
>
|
||||||
{title}
|
{title}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -14,6 +14,7 @@ interface ITrackProps {
|
||||||
title: string;
|
title: string;
|
||||||
position: string;
|
position: string;
|
||||||
speed: number;
|
speed: number;
|
||||||
|
taskInDay: number;
|
||||||
type?: string;
|
type?: string;
|
||||||
canStart?: boolean;
|
canStart?: boolean;
|
||||||
}
|
}
|
||||||
|
@ -22,6 +23,7 @@ function Track({
|
||||||
title,
|
title,
|
||||||
position,
|
position,
|
||||||
speed,
|
speed,
|
||||||
|
taskInDay,
|
||||||
type,
|
type,
|
||||||
canStart,
|
canStart,
|
||||||
}: ITrackProps): React.ReactElement | null {
|
}: ITrackProps): React.ReactElement | null {
|
||||||
|
@ -39,6 +41,7 @@ function Track({
|
||||||
<Info
|
<Info
|
||||||
title={position}
|
title={position}
|
||||||
duration={duration}
|
duration={duration}
|
||||||
|
taskInDay={taskInDay}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<Car
|
<Car
|
||||||
|
|
|
@ -33,6 +33,7 @@ function Races({
|
||||||
title={track.title}
|
title={track.title}
|
||||||
position={track.position}
|
position={track.position}
|
||||||
speed={track.speed}
|
speed={track.speed}
|
||||||
|
taskInDay={track.taskInDay}
|
||||||
canStart={showAnimation}
|
canStart={showAnimation}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
|
@ -21,6 +21,7 @@ const TeamBuilding = observer((): React.ReactElement => {
|
||||||
const tracks = tracksAuth.map((statistic: any) => ({
|
const tracks = tracksAuth.map((statistic: any) => ({
|
||||||
title: statistic.author,
|
title: statistic.author,
|
||||||
position: order.indexOf(statistic.taskInDay) + 1,
|
position: order.indexOf(statistic.taskInDay) + 1,
|
||||||
|
taskInDay: statistic.taskInDay,
|
||||||
speed: statistic.taskInDay / order[0],
|
speed: statistic.taskInDay / order[0],
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue