* Fix bug #48262.
This commit is contained in:
@@ -236,6 +236,7 @@ $config->program->browse->dtable->fieldList['budget']['name'] = 'budget';
|
||||
$config->program->browse->dtable->fieldList['budget']['title'] = $lang->program->budget;
|
||||
$config->program->browse->dtable->fieldList['budget']['width'] = 90;
|
||||
$config->program->browse->dtable->fieldList['budget']['type'] = 'format';
|
||||
$config->program->browse->dtable->fieldList['budget']['align'] = 'right';
|
||||
$config->program->browse->dtable->fieldList['budget']['sortType'] = true;
|
||||
$config->program->browse->dtable->fieldList['budget']['show'] = true;
|
||||
$config->program->browse->dtable->fieldList['budget']['group'] = 3;
|
||||
@@ -245,6 +246,7 @@ $config->program->browse->dtable->fieldList['invested']['title'] = $lang->pro
|
||||
$config->program->browse->dtable->fieldList['invested']['minWidth'] = 70;
|
||||
$config->program->browse->dtable->fieldList['invested']['width'] = 70;
|
||||
$config->program->browse->dtable->fieldList['invested']['type'] = 'format';
|
||||
$config->program->browse->dtable->fieldList['invested']['align'] = 'right';
|
||||
$config->program->browse->dtable->fieldList['invested']['sortType'] = false;
|
||||
$config->program->browse->dtable->fieldList['invested']['show'] = true;
|
||||
$config->program->browse->dtable->fieldList['invested']['group'] = 3;
|
||||
|
||||
@@ -7,31 +7,36 @@ window.renderCell = function(result, {col, row})
|
||||
return result;
|
||||
}
|
||||
|
||||
if(col.name === 'budget' && typeof(row.data.exceedBudget) != 'undefined')
|
||||
if(col.name === 'budget')
|
||||
{
|
||||
let iconSign = ' <span class="icon icon-exclamation mr-2 text-danger"></span>';
|
||||
let menu = '<menu class="dropdown-menu custom">';
|
||||
let dropMenu = menu;
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + projectBudgetLang + ': </span><span class="font-bold">' + row.data.rawBudget + '</span></div>';
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + remainingBudgetLang + ': </span><span class="font-bold">' + row.data.remainingBudget + '</span></div>';
|
||||
dropMenu += '<div class="text-danger">' + exceededBudgetLang + ': <span class="font-bold">' + row.data.exceedBudget + '</span></div>';
|
||||
|
||||
if(row.data.type == 'program')
|
||||
let budgetHtml = `<div>${row.data.budget}</div>`;
|
||||
if(typeof(row.data.exceedBudget) != 'undefined')
|
||||
{
|
||||
if(row.data.parent == 0) iconSign = ' <span class="icon icon-exclamation-sign mr-2 text-danger"></span>';
|
||||
dropMenu = menu;
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + programBudgetLang + ': </span><span class="font-bold">' + row.data.rawBudget + '</span></div>';
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + sumSubBudgetLang + ': </span><span class="font-bold">' + row.data.subBudget + '</span></div>';
|
||||
dropMenu += '<div class="text-danger">' + exceededBudgetLang + ': <span class="font-bold">' + row.data.exceedBudget + '</span></div>';
|
||||
let iconSign = ' <span class="icon icon-exclamation text-danger"></span>';
|
||||
let menu = '<menu class="dropdown-menu custom">';
|
||||
let dropMenu = menu;
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + projectBudgetLang + ': </span><span class="font-bold">' + row.data.rawBudget + '</span></div>';
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + remainingBudgetLang + ': </span><span class="font-bold">' + row.data.remainingBudget + '</span></div>';
|
||||
dropMenu += '<div class="text-danger">' + exceededBudgetLang + ': <span class="font-bold">' + row.data.exceedBudget + '</span></div>';
|
||||
|
||||
if(row.data.type == 'program')
|
||||
{
|
||||
if(row.data.parent == 0) iconSign = ' <span class="icon icon-exclamation-sign text-danger"></span>';
|
||||
dropMenu = menu;
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + programBudgetLang + ': </span><span class="font-bold">' + row.data.rawBudget + '</span></div>';
|
||||
dropMenu += '<div class="mb-1"><span class="text-gray">' + sumSubBudgetLang + ': </span><span class="font-bold">' + row.data.subBudget + '</span></div>';
|
||||
dropMenu += '<div class="text-danger">' + exceededBudgetLang + ': <span class="font-bold">' + row.data.exceedBudget + '</span></div>';
|
||||
}
|
||||
iconSign = '<span data-toggle="dropdown" data-trigger="hover" data-placement="right-start">' + iconSign + '</span>';
|
||||
budgetHtml = `<div>${row.data.budget}${iconSign}${dropMenu}</div>`
|
||||
}
|
||||
iconSign = '<span data-toggle="dropdown" data-trigger="hover" data-placement="right-start">' + iconSign + '</span>';
|
||||
result[0] = {html: '<div>' + row.data.budget + iconSign + dropMenu + '</div>', className:'flex items-end w-full items-end', style:{flexDirection:"column"}};
|
||||
result[0] = {html: budgetHtml, className:'flex w-full items-end mr-1', style:{flexDirection:"column"}};
|
||||
return result;
|
||||
}
|
||||
|
||||
if(col.name === 'invested')
|
||||
{
|
||||
result[0] = {html: '<div>' + row.data.invested + ' <small class="text-gray">' + langManDay + '</small></div>', className:'flex items-end w-full items-end', style:{flexDirection:"column"}};
|
||||
result[0] = {html: '<div>' + row.data.invested + ' <small class="text-gray">' + langManDay + '</small></div>', className:'flex w-full items-end', style:{flexDirection:"column"}};
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user