mirror of
https://github.com/bakhirev/assayo.git
synced 2024-11-16 08:11:40 +00:00
update
This commit is contained in:
parent
0674fbdc92
commit
780ff751df
File diff suppressed because one or more lines are too long
|
@ -79,7 +79,7 @@ export default class DataGripByTimestamp {
|
|||
for (let author in this.commitsByAuthor) {
|
||||
const statistic = this.#getTotalInfo(this.commitsByAuthor[author]);
|
||||
statistic.weekendPayment = this.#getWeekendPaymentByAuthor(statistic, dataGripByAuthor.statisticByName[author]);
|
||||
this.statisticByAuthor[author] = statistic;
|
||||
this.statisticByAuthor[author] = statistic; // TODO: странный результат, неверный расчёт?
|
||||
this.statistic.weekendPayment += statistic.weekendPayment;
|
||||
}
|
||||
}
|
||||
|
@ -119,7 +119,8 @@ export default class DataGripByTimestamp {
|
|||
|
||||
#getWeekendPaymentByAuthor(statistic: any, dataGripByAuthor: any) {
|
||||
if (dataGripByAuthor.isStaff) return 0;
|
||||
const salaryInDay = userSettings.getCurrentSalaryInMonth(dataGripByAuthor.author); // TODO: need middle salary in month
|
||||
const salaryInMonth = userSettings.getCurrentSalaryInMonth(dataGripByAuthor.author);
|
||||
const salaryInDay = (salaryInMonth / 22) * 2; // TODO: только по ТК РФ
|
||||
const saturday = statistic.workByDay[5] * salaryInDay;
|
||||
const sunday = statistic.workByDay[6] * salaryInDay;
|
||||
return saturday + sunday;
|
||||
|
|
|
@ -30,22 +30,10 @@ const Total = observer((): React.ReactElement => {
|
|||
<Title title="page.team.total.titleA"/>
|
||||
<div>
|
||||
<CardWithIcon
|
||||
value={statistic.daysWorked}
|
||||
icon="./assets/cards/work_days.png"
|
||||
title="page.team.total.daysWorked.title"
|
||||
description="page.team.total.daysWorked.description"
|
||||
/>
|
||||
<CardWithIcon
|
||||
value={statistic.commits}
|
||||
icon="./assets/cards/commits.png"
|
||||
title="page.team.total.commits.title"
|
||||
description="page.team.total.commits.description"
|
||||
/>
|
||||
<CardWithIcon
|
||||
value={statistic.daysLosses}
|
||||
icon="./assets/cards/lazy.png"
|
||||
title="page.team.total.daysLosses.title"
|
||||
description="page.team.total.daysLosses.description"
|
||||
value={workSpeed}
|
||||
icon="./assets/cards/tasks_month.png"
|
||||
title="page.team.total.workSpeed.title"
|
||||
description="page.team.total.workSpeed.description"
|
||||
/>
|
||||
<CardWithIcon
|
||||
value={`${employment.active.length} / ${employment.dismissed.length}`}
|
||||
|
@ -53,12 +41,24 @@ const Total = observer((): React.ReactElement => {
|
|||
title="page.team.total.employment.title"
|
||||
description="page.team.total.employment.description"
|
||||
/>
|
||||
<CardWithIcon
|
||||
value={statistic.daysWorked}
|
||||
icon="./assets/cards/work_days.png"
|
||||
title="page.team.total.daysWorked.title"
|
||||
description="page.team.total.daysWorked.description"
|
||||
/>
|
||||
<CardWithIcon
|
||||
value={statistic.daysLosses}
|
||||
icon="./assets/cards/lazy.png"
|
||||
title="page.team.total.daysLosses.title"
|
||||
description="page.team.total.daysLosses.description"
|
||||
/>
|
||||
<CardWithIcon
|
||||
size="l"
|
||||
value={workSpeed}
|
||||
icon="./assets/cards/tasks_month.png"
|
||||
title="page.team.total.workSpeed.title"
|
||||
description="page.team.total.workSpeed.description"
|
||||
value={statistic.commits}
|
||||
icon="./assets/cards/commits.png"
|
||||
title="page.team.total.commits.title"
|
||||
description="page.team.total.commits.description"
|
||||
/>
|
||||
</div>
|
||||
<Description
|
||||
|
|
Loading…
Reference in a new issue