mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-4156] Regression - Return ISO format for date properties on Task List Component (#4393)
This commit is contained in:
committed by
Eugenio Romano
parent
fb11cc879d
commit
a0007d82b2
@@ -123,9 +123,9 @@ describe('TaskListComponent', () => {
|
||||
expect(component.rows[0]['assignee'].firstName).toEqual('firstNameFake1');
|
||||
expect(component.rows[0]['assignee'].lastName).toEqual('lastNameFake1');
|
||||
expect(component.rows[0][('assignee')].email).toEqual('emailFake1');
|
||||
expect(component.rows[0]['created']).toEqual('Mar 1, 2017');
|
||||
expect(component.rows[0]['dueDate']).toEqual('Apr 2, 2017');
|
||||
expect(component.rows[0]['endDate']).toEqual('May 3, 2017');
|
||||
expect(component.rows[0]['created'].toISOString()).toEqual('2017-03-01T12:25:17.189Z');
|
||||
expect(component.rows[0]['dueDate'].toISOString()).toEqual('2017-04-02T12:25:17.189Z');
|
||||
expect(component.rows[0]['endDate'].toISOString()).toEqual('2017-05-03T12:25:31.129Z');
|
||||
expect(component.rows[0]['duration']).toEqual(13940);
|
||||
expect(component.rows[0]['priority']).toEqual(50);
|
||||
expect(component.rows[0]['parentTaskId']).toEqual(1);
|
||||
|
@@ -38,7 +38,6 @@ import moment from 'moment-es6';
|
||||
export class TaskListComponent extends DataTableSchema implements OnChanges, AfterContentInit, PaginatedComponent {
|
||||
|
||||
static PRESET_KEY = 'adf-task-list.presets';
|
||||
public FORMAT_DATE: string = 'll';
|
||||
|
||||
@ContentChild(CustomEmptyContentTemplateDirective)
|
||||
customEmptyContent: CustomEmptyContentTemplateDirective;
|
||||
@@ -347,15 +346,6 @@ export class TaskListComponent extends DataTableSchema implements OnChanges, Aft
|
||||
if (!task.name) {
|
||||
task.name = 'No name';
|
||||
}
|
||||
if (task.created) {
|
||||
task.created = moment(task.created).format(this.FORMAT_DATE);
|
||||
}
|
||||
if (task.dueDate) {
|
||||
task.dueDate = moment(task.dueDate).format(this.FORMAT_DATE);
|
||||
}
|
||||
if (task.endDate) {
|
||||
task.endDate = moment(task.endDate).format(this.FORMAT_DATE);
|
||||
}
|
||||
return task;
|
||||
});
|
||||
return instances;
|
||||
|
Reference in New Issue
Block a user