[ADF-2588] make comment component compatible with content (#3128)

This commit is contained in:
Mario Romano
2018-03-30 11:13:38 +01:00
committed by Eugenio Romano
parent f985dd11d5
commit 653a510a5c
46 changed files with 1186 additions and 462 deletions

View File

@@ -0,0 +1,90 @@
/*!
* @license
* Copyright 2016 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export let fakeUser1 = {
'enabled': true,
'firstName': 'firstName',
'lastName': 'lastName',
'email': 'fake-email@dom.com',
'emailNotificationsEnabled': true,
'company': {},
'id': 'fake-email@dom.com',
'avatarId': '123-123-123'
};
export let fakeUser2 = {
'enabled': true,
'firstName': 'some',
'lastName': 'one',
'email': 'some-one@somegroup.com',
'emailNotificationsEnabled': true,
'company': {},
'id': 'fake-email@dom.com',
'avatarId': '001-001-001'
};
export let fakeContentComments = {
list: {
'pagination': {
'count': 4,
'hasMoreItems': false,
'totalItems': 4,
'skipCount': 0,
'maxItems': 100
},
entries: [{
'entry': {
'createdAt': '2018-03-27T10:55:45.725+0000',
'createdBy': fakeUser1,
'edited': false,
'modifiedAt': '2018-03-27T10:55:45.725+0000',
'canEdit': true,
'modifiedBy': fakeUser1,
'canDelete': true,
'id': '35a0cea7-b6d0-4abc-9030-f4e461dd1ac7',
'content': 'fake-message-1'
}
}, {
'entry': {
'createdAt': '2018-03-27T10:55:45.725+0000',
'createdBy': fakeUser2,
'edited': false,
'modifiedAt': '2018-03-27T10:55:45.725+0000',
'canEdit': true,
'modifiedBy': fakeUser2,
'canDelete': true,
'id': '35a0cea7-b6d0-4abc-9030-f4e461dd1ac7',
'content': 'fake-message-2'
}
}
]
}
};
export let fakeContentComment = {
'entry': {
'createdAt': '2018-03-29T11:49:51.735+0000',
'createdBy': fakeUser1,
'edited': false,
'modifiedAt': '2018-03-29T11:49:51.735+0000',
'canEdit': true,
'modifiedBy': fakeUser1,
'canDelete': true,
'id': '4d07cdc5-f00c-4391-b39d-a842b12478b2',
'content': 'fake-comment-message'
}
};

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { CommentProcessModel } from '../models/comment-process.model';
import { CommentModel } from '../models/comment.model';
import { UserProcessModel } from '../models/user-process.model';
export let fakeUser1 = { id: 1, email: 'fake-email@dom.com', firstName: 'firstName', lastName: 'lastName' };
@@ -34,7 +34,7 @@ export let fakeTasksComment = {
]
};
export let fakeProcessComment = new CommentProcessModel({id: 1, message: 'Test', created: new Date('2016-11-10T03:37:30.010+0000'), createdBy: new UserProcessModel({
export let fakeProcessComment = new CommentModel({id: 1, message: 'Test', created: new Date('2016-11-10T03:37:30.010+0000'), createdBy: new UserProcessModel({
id: 13,
firstName: 'Wilbur',
lastName: 'Adams',