Bug #1194 configuracion de usuario, buscar por id
This commit is contained in:
parent
bbe8e7988e
commit
1bf7aa112a
|
@ -1,9 +1,3 @@
|
|||
<vn-crud-model
|
||||
url="/api/Banks"
|
||||
vn-id="banks"
|
||||
data="banksData"
|
||||
order="bank">
|
||||
</vn-crud-model>
|
||||
<vn-crud-model
|
||||
url="/api/Warehouses"
|
||||
vn-id="warehouses"
|
||||
|
@ -33,11 +27,12 @@
|
|||
label="Local bank"
|
||||
id="localBank"
|
||||
field="$ctrl.localBankFk"
|
||||
data="banksData"
|
||||
url="/api/Banks"
|
||||
select-fields="['id','bank']"
|
||||
show-field="bank"
|
||||
order="id"
|
||||
value-field="id">
|
||||
value-field="id"
|
||||
search-function="{or: [{id: $search}, {bank: {like: '%'+ $search +'%'}}]}">
|
||||
<tpl-item>{{id}}: {{bank}}</tpl-item>
|
||||
</vn-autocomplete>
|
||||
<vn-autocomplete
|
||||
|
|
|
@ -31,6 +31,13 @@ class Controller {
|
|||
}
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
if (window.localStorage.localBankFk && window.localStorage.localBankFk !== 'null')
|
||||
window.localStorage.defaultBankFk = window.localStorage.localBankFk;
|
||||
else
|
||||
localStorage.removeItem('defaultBankFk');
|
||||
}
|
||||
|
||||
set lang(value) {
|
||||
this._lang = value;
|
||||
this.$translate.use(value);
|
||||
|
@ -105,7 +112,6 @@ class Controller {
|
|||
}
|
||||
|
||||
show(event) {
|
||||
this.$scope.banks.refresh();
|
||||
this.$scope.warehouses.refresh();
|
||||
this.$scope.companies.refresh();
|
||||
this.$scope.popover.parent = event.target;
|
||||
|
@ -139,11 +145,8 @@ class Controller {
|
|||
});
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
if (window.localStorage.localBankFk && window.localStorage.localBankFk !== 'null')
|
||||
window.localStorage.defaultBankFk = window.localStorage.localBankFk;
|
||||
else
|
||||
localStorage.removeItem('defaultBankFk');
|
||||
searchLocalBank(a, b) {
|
||||
return angular.equals(a.id, b.id);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue