|
|
@ -107,19 +107,17 @@ angular.module('openproject.workPackages.helpers') |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
formatWorkPackageProperty: function(value, propertyName) { |
|
|
|
formatWorkPackageProperty: function(value, propertyName) { |
|
|
|
switch(propertyName) { |
|
|
|
var mappings = { |
|
|
|
case 'dueDate': |
|
|
|
dueDate: 'date', |
|
|
|
return this.formatValue(value, 'date'); |
|
|
|
startDate: 'date', |
|
|
|
case 'startDate': |
|
|
|
createdAt: 'datetime', |
|
|
|
return this.formatValue(value, 'date'); |
|
|
|
updatedAt: 'datetime' |
|
|
|
case 'createdAt': |
|
|
|
}; |
|
|
|
return this.formatValue(value, 'datetime'); |
|
|
|
|
|
|
|
case 'updatedAt': |
|
|
|
if (propertyName === 'estimatedTime') { |
|
|
|
return this.formatValue(value, 'datetime'); |
|
|
|
return value && value.value ? value.value + ' ' + value.units : null; |
|
|
|
case 'estimatedTime': |
|
|
|
} else { |
|
|
|
return value && value.value ? value.value + ' ' + value.units : null; |
|
|
|
return this.formatValue(value, mappings[propertyName]); |
|
|
|
default: |
|
|
|
|
|
|
|
return value; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|