refs #5066 e2e fix, vnConfig
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-06-26 07:43:36 +02:00
parent dcbe8c5f7a
commit eff46c1cec
3 changed files with 10 additions and 14 deletions

View File

@ -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,

View File

@ -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>

View File

@ -2,23 +2,18 @@ import ngModule from '../module';
import Section from 'salix/components/section';
class Controller extends Section {
$onInit() {
this.$http.post(`Vehicles/sorted`, {warehouseFk: this.vnConfig.warehouseFk})
.then(res => {
this.vehicles = res.data;
});
}
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})
.then(res => {
this.vehicles = res.data;
});
}
});
}
}
ngModule.vnComponent('vnRouteBasicData', {