diff --git a/client/salix/src/components/user-configuration-popover/index.js b/client/salix/src/components/user-configuration-popover/index.js index 11904c7b0..cb70eba71 100644 --- a/client/salix/src/components/user-configuration-popover/index.js +++ b/client/salix/src/components/user-configuration-popover/index.js @@ -13,7 +13,7 @@ class Controller { set localBankFk(value) { window.localStorage.localBankFk = value; - window.localStorage.defaultCompanyFk = value; + window.localStorage.defaultBankFk = value; this.showOk(); } @@ -77,8 +77,6 @@ class Controller { if (!localStorage.getItem('localCompanyFk')) localStorage.setItem('defaultCompanyFk', res.data.companyFk); } - - console.log(localStorage.getItem('defaultWarehouseFk'), localStorage.getItem('defaultCompanyFk')); }); } diff --git a/client/salix/src/components/user-configuration-popover/index.spec.js b/client/salix/src/components/user-configuration-popover/index.spec.js index 03ab90495..87739e20e 100644 --- a/client/salix/src/components/user-configuration-popover/index.spec.js +++ b/client/salix/src/components/user-configuration-popover/index.spec.js @@ -19,32 +19,32 @@ describe('Salix', () => { controller = $componentController('vnUserConfigurationPopover', {$scope: $scope, $translate: null}); })); - describe('localBank() setter', () => { + describe('localBankFk() setter', () => { it('should set window.localStorage.localBank and call showOk', () => { spyOn(controller, 'showOk'); - controller.localBank = 4; + controller.localBankFk = 4; - expect(window.localStorage.localBank).toBe('4'); + expect(window.localStorage.localBankFk).toBe('4'); expect(controller.showOk).toHaveBeenCalledWith(); }); }); - describe('localWarehouse() setter', () => { + describe('localWarehouseFk() setter', () => { it('should set window.localStorage.localWarehouse and call showOk', () => { spyOn(controller, 'showOk'); - controller.localWarehouse = 4; + controller.localWarehouseFk = 4; - expect(window.localStorage.localWarehouse).toBe('4'); + expect(window.localStorage.localWarehouseFk).toBe('4'); expect(controller.showOk).toHaveBeenCalledWith(); }); }); - describe('localCompany() setter', () => { + describe('localCompanyFk() setter', () => { it('should set window.localStorage.localCompany and call showOk', () => { spyOn(controller, 'showOk'); - controller.localCompany = 4; + controller.localCompanyFk = 4; - expect(window.localStorage.localCompany).toBe('4'); + expect(window.localStorage.localCompanyFk).toBe('4'); expect(controller.showOk).toHaveBeenCalledWith(); }); });