diff --git a/module/block/js/projectblock.ui.js b/module/block/js/projectblock.ui.js index 3755be75c6..f4d84cca00 100644 --- a/module/block/js/projectblock.ui.js +++ b/module/block/js/projectblock.ui.js @@ -2,7 +2,7 @@ window.onRenderProjectNameCell = function(result, info) { if(info.col.name === 'name' && info.row.data.delay > 0) { - const html = {html : '' + delayInfo.replace('%s', info.row.data.delay) + '', className : 'flex items-end', style : {flexDirection : "column"}}; + const html = {html : '' + delayInfo.replace('%s', info.row.data.delay) + '', className : 'flex items-end', style : {flexDirection : "column"}}; result.push(html); } diff --git a/module/execution/js/executionkanban.ui.js b/module/execution/js/executionkanban.ui.js index bee6ae836c..50e2d47a48 100644 --- a/module/execution/js/executionkanban.ui.js +++ b/module/execution/js/executionkanban.ui.js @@ -12,8 +12,8 @@ window.getItem = function(info) { if(info.item.delay) { - info.item.suffix = delayed; - info.item.suffixClass = 'label danger rounded-xl mr-8'; + info.item.suffix = delayInfo.replace('%s', info.item.delay); + info.item.suffixClass = 'label danger-pale circle size-sm nowrap mr-8'; } info.item.prefix = {component: 'ProgressCircle', props: {percent: info.item.progress, size: 24}}; info.item.titleAttrs = {'class': 'text-black clip ' + (info.item.delay ? '' : 'mr-8'), 'title' : info.item.title}; diff --git a/module/execution/ui/burn.html.php b/module/execution/ui/burn.html.php index f6a592ef02..8120517805 100644 --- a/module/execution/ui/burn.html.php +++ b/module/execution/ui/burn.html.php @@ -125,7 +125,7 @@ panel ( setClass('flex items-center justify-center'), $executionName . ' ' . $this->lang->execution->burn . '(' . zget($lang->execution->burnByList, $burnBy) . ')', - isset($execution->delay) ? label(setClass('label danger-pale ring-danger ml-3'), $lang->execution->delayed) : null + isset($execution->delay) ? label(setClass('label danger-pale circle size-sm nowrap ml-3'), sprintf($lang->project->delayInfo, $execution->delay)) : null ), echarts ( diff --git a/module/execution/ui/executionkanban.html.php b/module/execution/ui/executionkanban.html.php index 7e6c448cce..4cd545f414 100644 --- a/module/execution/ui/executionkanban.html.php +++ b/module/execution/ui/executionkanban.html.php @@ -34,7 +34,7 @@ foreach($kanbanList as $current => $region) } jsVar('privs', $privs); -jsVar('delayed', $lang->project->statusList['delay']); +jsVar('delayInfo', $lang->project->delayInfo); if(empty($kanbanList)) { diff --git a/module/execution/ui/view.html.php b/module/execution/ui/view.html.php index 8a20dffe85..ecc30f0182 100644 --- a/module/execution/ui/view.html.php +++ b/module/execution/ui/view.html.php @@ -248,8 +248,8 @@ div ) : null, isset($execution->delay) ? label ( - setClass('danger-pale ring-danger ml-2 flex-none'), - $lang->execution->delayed + setClass('danger-pale circle size-sm nowrap ml-2 flex-none'), + sprintf($lang->project->delayInfo, $execution->delay) ) : label ( setClass("status-{$execution->status} ml-2 flex-none"), diff --git a/module/program/js/kanban.ui.js b/module/program/js/kanban.ui.js index 7f9e246a09..b31c4432ae 100644 --- a/module/program/js/kanban.ui.js +++ b/module/program/js/kanban.ui.js @@ -12,8 +12,8 @@ window.getItem = function(info) { if(info.item.delay) { - info.item.suffix = delayed; - info.item.suffixClass = 'label danger rounded-xl' + (info.item.status == 'doing' ? ' mr-8' : ''); + info.item.suffix = delayInfo.replace('%s', info.item.delay); + info.item.suffixClass = 'label danger-pale circle size-sm nowrap' + (info.item.status == 'doing' ? ' mr-8' : ''); } if(info.item.status == 'doing') info.item.prefix = {component: 'ProgressCircle', props: {percent: info.item.progress, size: 24}}; if(info.item.cardType == 'doingExecutions' && privs.canViewExecution) diff --git a/module/program/ui/kanban.html.php b/module/program/ui/kanban.html.php index ca305e0f30..6d1a908631 100644 --- a/module/program/ui/kanban.html.php +++ b/module/program/ui/kanban.html.php @@ -36,8 +36,8 @@ foreach($kanbanList as $current => $region) } } -jsVar('privs', $privs); -jsVar('delayed', $lang->project->statusList['delay']); +jsVar('privs', $privs); +jsVar('delayInfo', $lang->project->delayInfo); featureBar ( diff --git a/module/program/zen.php b/module/program/zen.php index 989a8bb222..08cd985e08 100644 --- a/module/program/zen.php +++ b/module/program/zen.php @@ -282,7 +282,7 @@ class programZen extends program { foreach($projectGroup[$product->id] as $project) { - if(helper::diffDate($today, $project->end) > 0) $project->delay = 1; + if(helper::diffDate($today, $project->end) > 0) $project->delay = helper::diffDate($today, $project->end); if($project->status == 'wait') { $product->waitingProjects[$project->id] = $project; @@ -293,7 +293,7 @@ class programZen extends program if(isset($doingExecutions[$project->id])) { $doingExecution = $doingExecutions[$project->id]; - if(helper::diffDate($today, $doingExecution->end) > 0) $doingExecution->delay = 1; + if(helper::diffDate($today, $doingExecution->end) > 0) $doingExecution->delay = helper::diffDate($today, $doingExecution->end); $product->doingExecutions[$doingExecution->id] = $doingExecution; } } diff --git a/module/project/config.php b/module/project/config.php index 82362f982a..5bb97c9528 100755 --- a/module/project/config.php +++ b/module/project/config.php @@ -376,4 +376,4 @@ $config->project->statusLabelList['wait'] = 'wait lighter'; $config->project->statusLabelList['doing'] = 'doing primary-pale'; $config->project->statusLabelList['suspended'] = 'suspended gray text-white'; $config->project->statusLabelList['closed'] = 'closed success-pale'; -$config->project->statusLabelList['delay'] = 'delay danger'; +$config->project->statusLabelList['delay'] = 'delay danger-pale'; diff --git a/module/project/ui/index.html.php b/module/project/ui/index.html.php index b49b88fe63..b17acd8534 100644 --- a/module/project/ui/index.html.php +++ b/module/project/ui/index.html.php @@ -34,11 +34,12 @@ if(hasPriv('execution', 'create')) $app->loadLang('kanban'); $kanbanCards = array(); +$today = helper::today(); if(!empty($kanbanList)) { foreach($kanbanList as $kanban) { - $status = ($kanban->end < helper::today() && !in_array($kanban->status, array('done', 'closed', 'suspended'))) ? 'delay' : $kanban->status; + $status = ($kanban->end < $today && !in_array($kanban->status, array('done', 'closed', 'suspended'))) ? 'delay' : $kanban->status; $statusLabel = $config->project->statusLabelList[$status]; $count = 0; @@ -108,7 +109,7 @@ if(!empty($kanbanList)) span ( setClass("project-status label rounded-full {$statusLabel}"), - $lang->project->statusList[$status] + $status != 'delay' ? $lang->project->statusList[$status] : sprintf($lang->project->delayInfo, helper::diffDate($today, $kanban->end)) ), a (