refactor travel
gitea/salix/dev This commit looks good Details

This commit is contained in:
Bernat 2019-10-25 14:06:32 +02:00
parent b415adff41
commit 35966afad0
3 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
<mg-ajax path="api/Travels/{{patch.params.id}}" options="vnPatch"></mg-ajax> <mg-ajax path="Travels/{{patch.params.id}}" options="vnPatch"></mg-ajax>
<vn-watcher <vn-watcher
vn-id="watcher" vn-id="watcher"
data="$ctrl.travel" data="$ctrl.travel"
@ -16,7 +16,7 @@
<vn-autocomplete <vn-autocomplete
vn-one vn-one
ng-model="$ctrl.travel.agencyModeFk" ng-model="$ctrl.travel.agencyModeFk"
url="api/AgencyModes" url="AgencyModes"
show-field="name" show-field="name"
value-field="id" value-field="id"
label="Agency"> label="Agency">
@ -38,7 +38,7 @@
<vn-autocomplete <vn-autocomplete
vn-one vn-one
ng-model="$ctrl.travel.warehouseOutFk" ng-model="$ctrl.travel.warehouseOutFk"
url="api/Warehouses" url="Warehouses"
show-field="name" show-field="name"
value-field="id" value-field="id"
label="Warehouse Out"> label="Warehouse Out">
@ -46,7 +46,7 @@
<vn-autocomplete <vn-autocomplete
vn-one vn-one
ng-model="$ctrl.travel.warehouseInFk" ng-model="$ctrl.travel.warehouseInFk"
url="api/Warehouses" url="Warehouses"
show-field="name" show-field="name"
value-field="id" value-field="id"
label="Warehouse In"> label="Warehouse In">

View File

@ -30,7 +30,7 @@ export default class Controller {
getCard() { getCard() {
const params = {filter: this.filter}; const params = {filter: this.filter};
this.$http.get(`/api/Travels/${this.$stateParams.id}`, {params}).then(response => { this.$http.get(`Travels/${this.$stateParams.id}`, {params}).then(response => {
this.travel = response.data; this.travel = response.data;
}); });
} }

View File

@ -1 +1 @@
<vn-log url="api/TravelLogs" origin-id="$ctrl.$stateParams.id"></vn-log> <vn-log url="TravelLogs" origin-id="$ctrl.$stateParams.id"></vn-log>