Merge branch 'sprint/183_xt_card' of https://gitlab.zcorp.cc/easycorp/zentaopms into card

This commit is contained in:
tianshujie
2022-01-25 09:26:10 +08:00
2 changed files with 15 additions and 8 deletions
+1
View File
@@ -109,6 +109,7 @@
.label-wait {background: #EFEFEF !important; color: #838A9D;}
.label-doing {background: #f8d2d2 !important; color: #e64b4c;}
.label-suspended {background: #fff3d9 !important; color: #ff9800;}
.label-future {background: #EFEFEF !important; color: #838A9D; border-radius: 9px}
.label-closed, .label-terminate {background: #e5e5e5 !important; color: #b8b8b8;}
.label-deleted {background: #ff5d5d !important; color: #fff;}
.label-normal {background: #e1e8d9 !important; color: #9abe76;}
+14 -8
View File
@@ -578,15 +578,21 @@ function renderProductplanItem(item, $item)
}
}
/* Display product plan date. */
var $date = $info.children('.date');
var productplanDate = $.zui.createDate(item.date);
var today = new Date();
var labelType = productplanDate.toLocaleDateString() == today.toLocaleDateString() ? 'light' : 'wait';
if(!$date.length) $date = $('<span class="date label label-' + labelType + '"></span>').appendTo($info);
/* Display deadline of product plan. */
var $date = $info.children('.date');
var begin = $.zui.createDate(item.begin);
var end = $.zui.createDate(item.end);
var today = new Date();
var labelType = 'wait';
var labelTitle = $.zui.formatDate(begin, 'MM-dd') + ' ' + productplanLang.to + ' ' + $.zui.formatDate(end, 'MM-dd');
$date.text($.zui.formatDate(productplanDate, 'yyyy-MM-dd')).attr('title', $.zui.formatDate(productplanDate, 'yyyy-MM-dd')).show();
if(labelType == 'light') $date.css('background-color', 'rgba(210, 50, 61, 0.3)');
if((item.begin == '2030-01-01' || item.end == '2030-01-01'))
{
labelType = 'future';
labelTitle = productplanLang.future;
}
if(!$date.length) $date = $('<span class="date label label-' + labelType + '"></span>').appendTo($info);
$date.text(labelTitle).attr('title', labelTitle).show();
/* Display avatars of creator. */
var $user = $info.children('.user');