|
|
@ -28,7 +28,7 @@ |
|
|
|
|
|
|
|
|
|
|
|
angular.module('openproject.workPackages.helpers') |
|
|
|
angular.module('openproject.workPackages.helpers') |
|
|
|
|
|
|
|
|
|
|
|
.factory('WorkPackagesHelper', ['dateFilter', 'currencyFilter', 'CustomFieldHelper', function(dateFilter, currencyFilter, CustomFieldHelper) { |
|
|
|
.factory('WorkPackagesHelper', ['TimezoneService', 'currencyFilter', 'CustomFieldHelper', function(TimezoneService, currencyFilter, CustomFieldHelper) { |
|
|
|
var WorkPackagesHelper = { |
|
|
|
var WorkPackagesHelper = { |
|
|
|
getRowObjectContent: function(object, option) { |
|
|
|
getRowObjectContent: function(object, option) { |
|
|
|
var content; |
|
|
|
var content; |
|
|
@ -97,15 +97,20 @@ angular.module('openproject.workPackages.helpers') |
|
|
|
formatValue: function(value, dataType) { |
|
|
|
formatValue: function(value, dataType) { |
|
|
|
switch(dataType) { |
|
|
|
switch(dataType) { |
|
|
|
case 'datetime': |
|
|
|
case 'datetime': |
|
|
|
return value ? dateFilter(WorkPackagesHelper.parseDateTime(value), 'medium') : ''; |
|
|
|
var dateTime; |
|
|
|
|
|
|
|
if (value) { |
|
|
|
|
|
|
|
dateTime = TimezoneService.formattedDate(value) + " " + TimezoneService.formattedTime(value); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return dateTime || ''; |
|
|
|
case 'date': |
|
|
|
case 'date': |
|
|
|
return value ? dateFilter(WorkPackagesHelper.parseDateTime(value), 'mediumDate') : ''; |
|
|
|
return value ? TimezoneService.formattedDate(value) : ''; |
|
|
|
case 'currency': |
|
|
|
case 'currency': |
|
|
|
return currencyFilter(value, 'EUR '); |
|
|
|
return currencyFilter(value, 'EUR '); |
|
|
|
default: |
|
|
|
default: |
|
|
|
return value; |
|
|
|
return value; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
formatWorkPackageProperty: function(value, propertyName) { |
|
|
|
formatWorkPackageProperty: function(value, propertyName) { |
|
|
|
var mappings = { |
|
|
|
var mappings = { |
|
|
|
dueDate: 'date', |
|
|
|
dueDate: 'date', |
|
|
|