#1022 solved bug doesent overiding old data in localstorage if users had ben using the old version of this component
This commit is contained in:
parent
f4839cb642
commit
e55bcaecfd
|
@ -78,11 +78,17 @@ class Controller {
|
|||
getUserConfig() {
|
||||
this.$http.get('/api/UserConfigs/getUserConfig')
|
||||
.then(res => {
|
||||
if (res.data && res.data.warehouseFk)
|
||||
if (res.data && res.data.warehouseFk) {
|
||||
this.warehouse = res.data.warehouseFk;
|
||||
if (!window.localStorage.defaultWarehouseFk || window.localStorage.defaultWarehouseFk === 'null')
|
||||
window.localStorage.defaultWarehouseFk = res.data.warehouseFk;
|
||||
}
|
||||
|
||||
if (res.data && res.data.companyFk)
|
||||
if (res.data && res.data.companyFk) {
|
||||
this.company = res.data.companyFk;
|
||||
if (!window.localStorage.defaultCompanyFk || window.localStorage.defaultCompanyFk === 'null')
|
||||
window.localStorage.defaultCompanyFk = res.data.companyFk;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue