+ Add storyestimate page.

This commit is contained in:
caoyanyi
2023-07-27 13:53:47 +08:00
parent b731dcd067
commit a2d4e35e65
3 changed files with 193 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
window.updateAverage = function()
{
const $estimates = $('.story-estimate');
if($('.new-estimate').length > 0) $estimates = $('.new-estimate');
var summary = 0;
var count = 0;
var average = 0;
$estimates.each(function()
{
var value = $(this).val();
if(value)
{
value = parseFloat(value);
if(isNaN(value)) value = 0;
summary += value;
count += 1;
}
})
if(count) average = summary / count;
$('#average').val(average.toFixed(2));
}
window.selectRound = function(loadUrl)
{
loadModal(loadUrl.replace('%s', $('input[name="round"]').val()), 'current');
}