This commit is contained in:
parent
dcbe8c5f7a
commit
eff46c1cec
|
@ -24,7 +24,7 @@ describe('Route basic Data path', () => {
|
|||
const form = 'vn-route-basic-data form';
|
||||
const values = {
|
||||
worker: 'adminBossNick',
|
||||
vehicle: '1111-IMK - Warehouse One',
|
||||
vehicle: '1111-IMK',
|
||||
created: nextMonth,
|
||||
kmStart: 1,
|
||||
kmEnd: 2,
|
||||
|
|
|
@ -28,7 +28,8 @@
|
|||
data="$ctrl.vehicles"
|
||||
show-field="numberPlate"
|
||||
value-field="id"
|
||||
order="false">
|
||||
order="false"
|
||||
vn-name="vehicle">
|
||||
<tpl-item>{{::numberPlate}} - {{::name}}</tpl-item>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
|
|
|
@ -2,22 +2,17 @@ import ngModule from '../module';
|
|||
import Section from 'salix/components/section';
|
||||
|
||||
class Controller extends Section {
|
||||
onSubmit() {
|
||||
this.$.watcher.submit().then(() =>
|
||||
this.card.reload()
|
||||
);
|
||||
}
|
||||
constructor($element, $) {
|
||||
super($element, $);
|
||||
this.$http.get(`UserConfigs/getUserConfig`)
|
||||
.then(res => {
|
||||
if (res.data) {
|
||||
this.$http.post(`Vehicles/sorted`, {warehouseFk: res.data.warehouseFk})
|
||||
$onInit() {
|
||||
this.$http.post(`Vehicles/sorted`, {warehouseFk: this.vnConfig.warehouseFk})
|
||||
.then(res => {
|
||||
this.vehicles = res.data;
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
onSubmit() {
|
||||
this.$.watcher.submit().then(() =>
|
||||
this.card.reload()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue