diff --git a/modules/claim/front/main/index.js b/modules/claim/front/main/index.js index a9fad2eeb..0c5c7d728 100644 --- a/modules/claim/front/main/index.js +++ b/modules/claim/front/main/index.js @@ -1,13 +1,7 @@ import ngModule from '../module'; import ModuleMain from 'salix/components/module-main'; -export default class Claims extends ModuleMain { - constructor($element, $) { - super($element, $); - } -} - ngModule.vnComponent('vnClaim', { - controller: Claims, + controller: ModuleMain, template: require('./index.html') }); diff --git a/modules/claim/front/summary/index.js b/modules/claim/front/summary/index.js index cc9799f05..721f51846 100644 --- a/modules/claim/front/summary/index.js +++ b/modules/claim/front/summary/index.js @@ -25,7 +25,7 @@ class Controller extends Summary { .then(() => { if (this.card) this.card.reload(); - // Refresh index model + if (this.parentReload) this.parentReload(); }); diff --git a/modules/claim/front/summary/index.spec.js b/modules/claim/front/summary/index.spec.js index 02bdf21d2..8540a3a97 100644 --- a/modules/claim/front/summary/index.spec.js +++ b/modules/claim/front/summary/index.spec.js @@ -29,7 +29,7 @@ describe('Claim', () => { }); describe('changeState()', () => { - it('should make an HTTP post query, then call the showSuccess(), reload() and resetChanges() methods', () => { + it('should make an HTTP post query, then call the showSuccess()', () => { jest.spyOn(controller.vnApp, 'showSuccess').mockReturnThis(); const expectedParams = {id: 1, claimStateFk: 1}; @@ -43,7 +43,7 @@ describe('Claim', () => { }); describe('$onChanges()', () => { - it('should call loadData when item.id is defined', () => { + it('should call loadData when $onChanges is called', () => { jest.spyOn(controller, 'loadData'); controller.$onChanges();