Commit a157b254 authored by System Administrator's avatar System Administrator

[etersoft] Cherry-pick 7da229e6

parent 526f3282
...@@ -354,8 +354,23 @@ window.addEventListener("load", function() { ...@@ -354,8 +354,23 @@ window.addEventListener("load", function() {
const estimatedTimeElement = document.querySelector('#estimated_time'); const estimatedTimeElement = document.querySelector('#estimated_time');
const workedTimeElement = document.querySelector('.bz_time_tracking_table > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(3)'); const workedTimeElement = document.querySelector('.bz_time_tracking_table > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(3)');
<<<<<<< HEAD
if (estimatedTimeElement && workedTimeElement) { if (estimatedTimeElement && workedTimeElement) {
const estimatedTime = Number(estimatedTimeElement.value); const estimatedTime = Number(estimatedTimeElement.value);
=======
// получаем отработанное время
const workedTime = Number(document.querySelector('.bz_time_tracking_table > tbody:nth-child(1) > tr:nth-child(2) > td:nth-child(3)').innerText);
// пересчитанное отработанное время
const updatedWorkedTime = ((workedTime * 100) + (workTimeValue * 100)) / 100;
console.log("UPDATED", updatedWorkedTime);
// считаем сколько осталось
const remainingTimeValue = Math.ceil(((estimatedTime * 100) - (updatedWorkedTime * 100))) / 100;
console.log("REMAINING", remainingTimeValue)
>>>>>>> 7da229e67 ([fix] #14867: fix bug with recounting remaining time)
// получаем отработанное время // получаем отработанное время
const workedTime = Number(workedTimeElement.innerText); const workedTime = Number(workedTimeElement.innerText);
......
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