Humanize dates in timeline
parent
1f9aa0761c
commit
0804a62aec
|
@ -1225,6 +1225,7 @@
|
||||||
"CLIENT_REQUIREMENT": "Client Requirement",
|
"CLIENT_REQUIREMENT": "Client Requirement",
|
||||||
"BLOCKED": "Blocked",
|
"BLOCKED": "Blocked",
|
||||||
"VALUES": {
|
"VALUES": {
|
||||||
|
"NOT_SET": "not set",
|
||||||
"UNASSIGNED": "unassigned"
|
"UNASSIGNED": "unassigned"
|
||||||
},
|
},
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
|
@ -1234,6 +1235,7 @@
|
||||||
"TYPE": "type",
|
"TYPE": "type",
|
||||||
"ASSIGNED_TO": "assigned to",
|
"ASSIGNED_TO": "assigned to",
|
||||||
"ASSIGNED_USERS": "assigned users",
|
"ASSIGNED_USERS": "assigned users",
|
||||||
|
"DUE_DATE": "due date",
|
||||||
"MILESTONE": "sprint",
|
"MILESTONE": "sprint",
|
||||||
"COLOR": "color"
|
"COLOR": "color"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
a.due-date-button.button-gray.is-editable(
|
label.due-date-button.button-gray.is-editable(
|
||||||
href=""
|
|
||||||
ng-if="vm.visible()"
|
ng-if="vm.visible()"
|
||||||
ng-disabled="vm.disabled()"
|
ng-disabled="vm.disabled()"
|
||||||
ng-class="vm.color()"
|
ng-class="vm.color()"
|
||||||
|
|
|
@ -38,6 +38,11 @@
|
||||||
)
|
)
|
||||||
include history-templates/history-assigned-users
|
include history-templates/history-assigned-users
|
||||||
|
|
||||||
|
.diff-wrapper(
|
||||||
|
ng-if="vm.type == 'due_date'"
|
||||||
|
)
|
||||||
|
include history-templates/history-due-date
|
||||||
|
|
||||||
.diff-wrapper(
|
.diff-wrapper(
|
||||||
ng-if="vm.type == 'tags'"
|
ng-if="vm.type == 'tags'"
|
||||||
)
|
)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
.diff-status-wrapper
|
||||||
|
span.key(
|
||||||
|
translate="ACTIVITY.FIELDS.DUE_DATE"
|
||||||
|
)
|
||||||
|
span.diff(ng-if="vm.diff[0]") {{vm.diff[0] | momentFormat:'DD MMM YYYY'}}
|
||||||
|
span.diff(ng-if="!vm.diff[0]" translate="ACTIVITY.VALUES.NOT_SET")
|
||||||
|
|
||||||
|
tg-svg(
|
||||||
|
svg-icon="icon-arrow-right"
|
||||||
|
)
|
||||||
|
|
||||||
|
span.diff(ng-if="vm.diff[1]") {{vm.diff[1] | momentFormat:'DD MMM YYYY'}}
|
||||||
|
span.diff(ng-if="!vm.diff[1]" translate="ACTIVITY.VALUES.NOT_SET")
|
|
@ -72,6 +72,14 @@ class UserTimelineItemTitle
|
||||||
if value == null && timeline.getIn(["data", "value_diff", "key"]) == 'assigned_to'
|
if value == null && timeline.getIn(["data", "value_diff", "key"]) == 'assigned_to'
|
||||||
value = @translate.instant('ACTIVITY.VALUES.UNASSIGNED')
|
value = @translate.instant('ACTIVITY.VALUES.UNASSIGNED')
|
||||||
|
|
||||||
|
# due date
|
||||||
|
else if timeline.getIn(["data", "value_diff", "key"]) == 'due_date'
|
||||||
|
if value
|
||||||
|
prettyDate = @translate.instant("COMMON.PICKERDATE.FORMAT")
|
||||||
|
value = moment(value, "YYYY-MM-DD").format(prettyDate)
|
||||||
|
else
|
||||||
|
value = @translate.instant('ACTIVITY.VALUES.NOT_SET')
|
||||||
|
|
||||||
new_value = value
|
new_value = value
|
||||||
else
|
else
|
||||||
new_value = timeline.getIn(["data", "value_diff", "value"]).first().get(1)
|
new_value = timeline.getIn(["data", "value_diff", "value"]).first().get(1)
|
||||||
|
|
Loading…
Reference in New Issue