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,7 +155,13 @@ export abstract class BaseEditTaskFilterCloudComponent<T> implements OnInit, OnC
|
|||||||
ngOnChanges(changes: SimpleChanges) {
|
ngOnChanges(changes: SimpleChanges) {
|
||||||
const { id } = changes;
|
const { id } = changes;
|
||||||
if (id && id.currentValue !== id.previousValue) {
|
if (id && id.currentValue !== id.previousValue) {
|
||||||
this.retrieveTaskFilterAndBuildForm();
|
if (this.taskFilter) {
|
||||||
|
this.taskFilterProperties = this.createAndFilterProperties();
|
||||||
|
this.taskFilterActions = this.createAndFilterActions();
|
||||||
|
this.buildForm(this.taskFilterProperties);
|
||||||
|
} else {
|
||||||
|
this.retrieveTaskFilterAndBuildForm();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,6 +189,7 @@ describe('EditServiceTaskFilterCloudComponent', () => {
|
|||||||
|
|
||||||
describe('Save & Delete buttons', () => {
|
describe('Save & Delete buttons', () => {
|
||||||
it('should disable save and delete button for default task filters', async () => {
|
it('should disable save and delete button for default task filters', async () => {
|
||||||
|
component.taskFilter = undefined;
|
||||||
getTaskFilterSpy.and.returnValue(
|
getTaskFilterSpy.and.returnValue(
|
||||||
of({
|
of({
|
||||||
name: 'ADF_CLOUD_SERVICE_TASK_FILTERS.ALL_SERVICE_TASKS',
|
name: 'ADF_CLOUD_SERVICE_TASK_FILTERS.ALL_SERVICE_TASKS',
|
||||||
|
@ -299,6 +299,7 @@ describe('EditTaskFilterCloudComponent', () => {
|
|||||||
|
|
||||||
describe('Save & Delete buttons', () => {
|
describe('Save & Delete buttons', () => {
|
||||||
it('should disable save and delete button for default task filters', async () => {
|
it('should disable save and delete button for default task filters', async () => {
|
||||||
|
component.taskFilter = undefined;
|
||||||
getTaskFilterSpy.and.returnValue(of(mockDefaultTaskFilter));
|
getTaskFilterSpy.and.returnValue(of(mockDefaultTaskFilter));
|
||||||
|
|
||||||
component.ngOnChanges({ id: mockTaskFilterIdChange });
|
component.ngOnChanges({ id: mockTaskFilterIdChange });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user