diff --git a/module/product/js/kanban.ui.js b/module/product/js/kanban.ui.js index bf013e84cd..df6ee10a61 100644 --- a/module/product/js/kanban.ui.js +++ b/module/product/js/kanban.ui.js @@ -16,19 +16,19 @@ window.getItem = function(info) info.item.suffixClass = 'label danger rounded-xl' + (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.type == 'doingExecution' && privs.canViewExecution) + if(info.item.cardType == 'doingExecution' && privs.canViewExecution) { info.item.titleUrl = $.createLink('execution', 'task', `id=${info.item.id}`); } - else if(info.item.type == 'doingProject' && privs.canViewProject) + else if(info.item.cardType == 'doingProject' && privs.canViewProject) { info.item.titleUrl = $.createLink('project', 'index', `id=${info.item.id}`); } - else if(info.item.type == 'unexpiredPlan' && privs.canViewPlan) + else if(info.item.cardType == 'unexpiredPlan' && privs.canViewPlan) { info.item.titleUrl = $.createLink('productplan', 'view', `id=${info.item.id}`); } - else if(info.item.type == 'normalRelease' && privs.canViewRelease) + else if(info.item.cardType == 'normalRelease' && privs.canViewRelease) { info.item.titleUrl = $.createLink('release', 'view', `id=${info.item.id}`); if(info.item.marker == '1') info.item.suffix = {html: ''}; diff --git a/module/product/zen.php b/module/product/zen.php index 7106ff8012..13ae543c85 100644 --- a/module/product/zen.php +++ b/module/product/zen.php @@ -1044,7 +1044,7 @@ class productZen extends product $cardList = !empty($laneData->{$columnKey}) ? $laneData->{$columnKey} : array(); foreach($cardList as $card) { - $items[$laneKey][$columnKey][] = array('id' => $card->id, 'name' => $card->id, 'title' => isset($card->name) ? $card->name : $card->title, 'status' => isset($card->status) ? $card->status : '', 'type' => $columnKey, 'delay' => !empty($card->delay) ? $card->delay : 0, 'progress' => isset($card->progress) ? $card->progress : 0, 'marker' => isset($card->marker) ? $card->marker : 0); + $items[$laneKey][$columnKey][] = array('id' => $card->id, 'name' => $card->id, 'title' => isset($card->name) ? $card->name : $card->title, 'status' => isset($card->status) ? $card->status : '', 'cardType' => $columnKey, 'delay' => !empty($card->delay) ? $card->delay : 0, 'progress' => isset($card->progress) ? $card->progress : 0, 'marker' => isset($card->marker) ? $card->marker : 0); if(!isset($columnCards[$columnKey])) $columnCards[$columnKey] = 0; $columnCards[$columnKey] ++; @@ -1054,7 +1054,7 @@ class productZen extends product if(!empty($latestExecutions[$card->id])) { $execution = $latestExecutions[$card->id]; - $items[$laneKey]['doingExecution'][] = array('id' => $execution->id, 'name' => $execution->id, 'title' => $execution->name, 'status' => $execution->status, 'type' => 'doingExecution', 'delay' => !empty($execution->delay) ? $execution->delay : 0, 'progress' => $execution->progress); + $items[$laneKey]['doingExecution'][] = array('id' => $execution->id, 'name' => $execution->id, 'title' => $execution->name, 'status' => $execution->status, 'cardType' => 'doingExecution', 'delay' => !empty($execution->delay) ? $execution->delay : 0, 'progress' => $execution->progress); if(!isset($columnCards['doingExecution'])) $columnCards['doingExecution'] = 0; $columnCards['doingExecution'] ++; diff --git a/module/program/js/kanban.ui.js b/module/program/js/kanban.ui.js index be375d039f..7f9e246a09 100644 --- a/module/program/js/kanban.ui.js +++ b/module/program/js/kanban.ui.js @@ -16,19 +16,19 @@ window.getItem = function(info) info.item.suffixClass = 'label danger rounded-xl' + (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.type == 'doingExecutions' && privs.canViewExecution) + if(info.item.cardType == 'doingExecutions' && privs.canViewExecution) { info.item.titleUrl = $.createLink('execution', 'task', `id=${info.item.id}`); } - else if(['waitingProjects', 'doingProjects'].includes(info.item.type) && privs.canViewProject) + else if(['waitingProjects', 'doingProjects'].includes(info.item.cardType) && privs.canViewProject) { info.item.titleUrl = $.createLink('project', 'index', `id=${info.item.id}`); } - else if(info.item.type == 'unexpiredPlans' && privs.canViewPlan) + else if(info.item.cardType == 'unexpiredPlans' && privs.canViewPlan) { info.item.titleUrl = $.createLink('productplan', 'view', `id=${info.item.id}`); } - else if(info.item.type == 'normalReleases' && privs.canViewRelease) + else if(info.item.cardType == 'normalReleases' && privs.canViewRelease) { info.item.titleUrl = $.createLink('release', 'view', `id=${info.item.id}`); if(info.item.marker == '1') info.item.suffix = {html: ''}; diff --git a/module/program/zen.php b/module/program/zen.php index 5c10d5ce79..6a69a83487 100644 --- a/module/program/zen.php +++ b/module/program/zen.php @@ -213,7 +213,7 @@ class programZen extends program $cardList = !empty($laneData->{$columnKey}) ? $laneData->{$columnKey} : array(); foreach($cardList as $card) { - $items[$laneKey][$columnKey][] = array('id' => $card->id, 'name' => $card->id, 'title' => isset($card->name) ? $card->name : $card->title, 'status' => isset($card->status) ? $card->status : '', 'type' => $columnKey, 'delay' => !empty($card->delay) ? $card->delay : 0, 'progress' => isset($card->progress) ? $card->progress : 0, 'marker' => isset($card->marker) ? $card->marker : 0); + $items[$laneKey][$columnKey][] = array('id' => $card->id, 'name' => $card->id, 'title' => isset($card->name) ? $card->name : $card->title, 'status' => isset($card->status) ? $card->status : '', 'cardType' => $columnKey, 'delay' => !empty($card->delay) ? $card->delay : 0, 'progress' => isset($card->progress) ? $card->progress : 0, 'marker' => isset($card->marker) ? $card->marker : 0); if(!isset($columnCards[$columnKey])) $columnCards[$columnKey] = 0; $columnCards[$columnKey] ++; @@ -223,7 +223,7 @@ class programZen extends program if(!empty($latestExecutions[$card->id])) { $execution = $latestExecutions[$card->id]; - $items[$laneKey]['doingExecutions'][] = array('id' => $execution->id, 'name' => $execution->id, 'title' => $execution->name, 'status' => $execution->status, 'type' => 'doingExecution', 'delay' => !empty($execution->delay) ? $execution->delay : 0, 'progress' => $execution->progress); + $items[$laneKey]['doingExecutions'][] = array('id' => $execution->id, 'name' => $execution->id, 'title' => $execution->name, 'status' => $execution->status, 'cardType' => 'doingExecution', 'delay' => !empty($execution->delay) ? $execution->delay : 0, 'progress' => $execution->progress); if(!isset($columnCards['doingExecutions'])) $columnCards['doingExecutions'] = 0; $columnCards['doingExecutions'] ++;