mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
AAE-30162 Don't retreive task filter if present (#10575)
This commit is contained in:
parent
51f60535e3
commit
dd1bbdffd6
@ -155,9 +155,15 @@ export abstract class BaseEditTaskFilterCloudComponent<T> implements OnInit, OnC
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
const { id } = changes;
|
||||
if (id && id.currentValue !== id.previousValue) {
|
||||
if (this.taskFilter) {
|
||||
this.taskFilterProperties = this.createAndFilterProperties();
|
||||
this.taskFilterActions = this.createAndFilterActions();
|
||||
this.buildForm(this.taskFilterProperties);
|
||||
} else {
|
||||
this.retrieveTaskFilterAndBuildForm();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
createFilterActions(): TaskFilterAction[] {
|
||||
return [
|
||||
|
@ -189,6 +189,7 @@ describe('EditServiceTaskFilterCloudComponent', () => {
|
||||
|
||||
describe('Save & Delete buttons', () => {
|
||||
it('should disable save and delete button for default task filters', async () => {
|
||||
component.taskFilter = undefined;
|
||||
getTaskFilterSpy.and.returnValue(
|
||||
of({
|
||||
name: 'ADF_CLOUD_SERVICE_TASK_FILTERS.ALL_SERVICE_TASKS',
|
||||
|
@ -299,6 +299,7 @@ describe('EditTaskFilterCloudComponent', () => {
|
||||
|
||||
describe('Save & Delete buttons', () => {
|
||||
it('should disable save and delete button for default task filters', async () => {
|
||||
component.taskFilter = undefined;
|
||||
getTaskFilterSpy.and.returnValue(of(mockDefaultTaskFilter));
|
||||
|
||||
component.ngOnChanges({ id: mockTaskFilterIdChange });
|
||||
|
Loading…
x
Reference in New Issue
Block a user