* Show card in kanban.
This commit is contained in:
@@ -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: '<i class="icon icon-flag" style="color: var(--color-danger-500)"></i>'};
|
||||
|
||||
@@ -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'] ++;
|
||||
|
||||
@@ -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: '<i class="icon icon-flag" style="color: var(--color-danger-500)"></i>'};
|
||||
|
||||
@@ -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'] ++;
|
||||
|
||||
Reference in New Issue
Block a user