mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
[ADF-3943] Remove non-working filters from Edit Task Filter Cloud (#4194)
* [ADF-3943] Remove non-working filters from Edit Task Filter Cloud and add live configuration for Task List Cloud Component * [ADF-3943] Fix unit test
This commit is contained in:
parent
eb3a45cde9
commit
6fffeef5c6
@ -62,7 +62,6 @@
|
||||
"TASK_LIST": "Task List",
|
||||
"PROCESS_LIST": "Process List",
|
||||
"PROCESS_CLOUD": "Process Cloud",
|
||||
"PROCESS_LIST_CLOUD": "Process List Cloud",
|
||||
"CARD_VIEW": "CardView",
|
||||
"PROCESS_SERVICES": "Process Services",
|
||||
"LOGIN": "Login",
|
||||
|
@ -549,5 +549,50 @@
|
||||
"sideNav": {
|
||||
"expandedSidenav": true,
|
||||
"preserveState": true
|
||||
},
|
||||
"adf-cloud-task-list": {
|
||||
"presets": {
|
||||
"default": [
|
||||
{
|
||||
"key": "entry.id",
|
||||
"type": "text",
|
||||
"title": "Id",
|
||||
"sortable": true
|
||||
},
|
||||
{
|
||||
"key": "entry.name",
|
||||
"type": "text",
|
||||
"title": "Name",
|
||||
"sortable": true,
|
||||
"cssClass": "full-width name-column ellipsis-cell"
|
||||
},
|
||||
{
|
||||
"key": "entry.status",
|
||||
"type": "text",
|
||||
"title": "Status",
|
||||
"sortable": true
|
||||
},
|
||||
{
|
||||
"key": "entry.priority",
|
||||
"type": "text",
|
||||
"title": "Priority",
|
||||
"sortable": true
|
||||
},
|
||||
{
|
||||
"key": "entry.createdDate",
|
||||
"type": "date",
|
||||
"title": "Created Date",
|
||||
"sortable": true,
|
||||
"format": "timeAgo"
|
||||
},
|
||||
{
|
||||
"key": "entry.lastModified",
|
||||
"type": "date",
|
||||
"title": "Last Modified",
|
||||
"sortable": true,
|
||||
"format": "timeAgo"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -12,14 +12,6 @@
|
||||
[assignee]="editedFilter.assignment"
|
||||
[sorting]="sortArray"
|
||||
(rowClick)="onRowClick($event)">
|
||||
<data-columns>
|
||||
<data-column key="entry.id" title="Id"></data-column>
|
||||
<data-column key="entry.name" title="Name" class="full-width name-column ellipsis-cell"></data-column>
|
||||
<data-column key="entry.status" title="Status"></data-column>
|
||||
<data-column key="entry.processDefinitionId" title="Process Definition Id"></data-column>
|
||||
<data-column key="entry.priority" title="Priority"></data-column>
|
||||
<data-column key="entry.createdDate" type="date" title="Created Date" [format]="'timeAgo'"></data-column>
|
||||
</data-columns>
|
||||
</adf-cloud-task-list>
|
||||
<adf-pagination [target]="taskCloud"
|
||||
(changePageSize)="onChangePageSize($event)">
|
||||
|
@ -41,6 +41,13 @@
|
||||
<mat-icon>info</mat-icon>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
|
||||
<mat-list-item (click)="taskListCloudConfClick()">
|
||||
<a matLine id="adf-task-list-cloud-conf">Task List Cloud</a>
|
||||
<button mat-icon-button>
|
||||
<mat-icon>info</mat-icon>
|
||||
</button>
|
||||
</mat-list-item>
|
||||
</mat-nav-list>
|
||||
|
||||
<div>
|
||||
|
@ -106,6 +106,12 @@ export class ConfigEditorComponent {
|
||||
this.indentCode();
|
||||
}
|
||||
|
||||
taskListCloudConfClick() {
|
||||
this.code = JSON.stringify(this.appConfig.config['adf-cloud-task-list']);
|
||||
this.field = 'adf-cloud-task-list';
|
||||
this.indentCode();
|
||||
}
|
||||
|
||||
indentCode() {
|
||||
setTimeout(() => {
|
||||
this.editor.getAction('editor.action.formatDocument').run();
|
||||
|
@ -93,6 +93,6 @@ With this configuration, only the four listed properties will be shown.
|
||||
|
||||
The available properties are:
|
||||
|
||||
**_appName_**, **_state_**, **_assignment_**, **_sort_**, **_order_**, **_processDefinitionId_**, **_processInstanceId_**, **_dueAfter_**, **_dueBefore_**, **_claimedDateFrom_**, **_claimedDateTo_**, **_createdDateFrom_**, **_createdDateTo_**, **_taskName_**, **_parentTaskId_**, **_priority_**, **_standAlone_**, **_lastModifiedFrom_**, **_lastModifiedTo_**, **_owner_**, **_dueDateFrom_**, **_dueDateTo_**.
|
||||
**_appName_**, **_state_**, **_assignment_**, **_sort_**, **_order_**, **_processDefinitionId_**, **_processInstanceId_**, **_taskName_**, **_parentTaskId_**, **_priority_**, **_standAlone_**, **_lastModifiedFrom_**, **_lastModifiedTo_**, **_owner_**.
|
||||
|
||||

|
||||
|
@ -265,13 +265,13 @@ describe('EditTaskFilterCloudComponent', () => {
|
||||
}));
|
||||
|
||||
it('should able to build a editTaskFilter form with given input properties', async(() => {
|
||||
getTaskFilterSpy.and.returnValue({ processInstanceId: 'process-instance-id', dueBefore: 'Fri Jan 04 2019 19:16:32 GMT+0530 (IST)' });
|
||||
getTaskFilterSpy.and.returnValue({ processInstanceId: 'process-instance-id', priority: '12' });
|
||||
component.appName = 'mock-app-name';
|
||||
component.filterProperties = ['appName', 'processInstanceId', 'dueBefore'];
|
||||
component.filterProperties = ['appName', 'processInstanceId', 'priority'];
|
||||
let change = new SimpleChange(undefined, 'mock-task-id', true);
|
||||
component.ngOnChanges({ 'id': change });
|
||||
const appController = component.editTaskFilterForm.get('appName');
|
||||
const dueDateController = component.editTaskFilterForm.get('dueBefore');
|
||||
const propertyController = component.editTaskFilterForm.get('priority');
|
||||
const processInsIdController = component.editTaskFilterForm.get('processInstanceId');
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@ -281,7 +281,7 @@ describe('EditTaskFilterCloudComponent', () => {
|
||||
expect(component.editTaskFilterForm).toBeDefined();
|
||||
expect(component.taskFilterProperties.length).toBe(3);
|
||||
expect(appController).toBeDefined();
|
||||
expect(dueDateController).toBeDefined();
|
||||
expect(propertyController.value).toBe('12');
|
||||
expect(processInsIdController).toBeDefined();
|
||||
expect(appController.value).toBe('mock-app-name');
|
||||
expect(processInsIdController.value).toBe('process-instance-id');
|
||||
|
@ -330,42 +330,6 @@ export class EditTaskFilterCloudComponent implements OnChanges {
|
||||
key: 'processInstanceId',
|
||||
value: currentTaskFilter.processInstanceId || ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_AFTER',
|
||||
type: 'date',
|
||||
key: 'dueAfter',
|
||||
value: ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_BEFORE',
|
||||
type: 'date',
|
||||
key: 'dueBefore',
|
||||
value: ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CLAIMED_DATE_FROM',
|
||||
type: 'date',
|
||||
key: 'claimedDateFrom',
|
||||
value: ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CLAIMED_DATE_TO',
|
||||
type: 'date',
|
||||
key: 'claimedDateTo',
|
||||
value: ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CREATED_DATE_FORM',
|
||||
type: 'date',
|
||||
key: 'createdDateFrom',
|
||||
value: ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.CREATED_DATE_TO',
|
||||
type: 'date',
|
||||
key: 'createdDateTo',
|
||||
value: ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.TASK_NAME',
|
||||
type: 'text',
|
||||
@ -409,18 +373,6 @@ export class EditTaskFilterCloudComponent implements OnChanges {
|
||||
type: 'text',
|
||||
key: 'owner',
|
||||
value: currentTaskFilter.owner || ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_DATE_FROM',
|
||||
type: 'date',
|
||||
key: 'dueDateFrom',
|
||||
value: ''
|
||||
}),
|
||||
new TaskFilterProperties({
|
||||
label: 'ADF_CLOUD_EDIT_TASK_FILTER.LABEL.DUE_DATE_TO',
|
||||
type: 'date',
|
||||
key: 'dueDateTo',
|
||||
value: ''
|
||||
})
|
||||
];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user