Compare commits
3 Commits
dev
...
1877-ticke
Author | SHA1 | Date |
---|---|---|
Alex Moreno | 6637514909 | |
Alex Moreno | 567dfd4aca | |
Alex Moreno | a5fe335e46 |
|
@ -12,7 +12,7 @@
|
||||||
<form name="form">
|
<form name="form">
|
||||||
<vn-card class="vn-w-md vn-pa-lg">
|
<vn-card class="vn-w-md vn-pa-lg">
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
vn-id="client"
|
vn-id="client"
|
||||||
required="true"
|
required="true"
|
||||||
|
@ -38,14 +38,15 @@
|
||||||
</vn-autocomplete>
|
</vn-autocomplete>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
required="true"
|
required="true"
|
||||||
data="$ctrl.addresses"
|
data="$ctrl.addresses"
|
||||||
label="Address"
|
label="Address"
|
||||||
show-field="nickname"
|
show-field="nickname"
|
||||||
value-field="id"
|
value-field="id"
|
||||||
ng-model="$ctrl.addressId"
|
ng-model="$ctrl.addressId"
|
||||||
|
on-change="$ctrl.isEditable($ctrl.addressId)"
|
||||||
order="isActive DESC">
|
order="isActive DESC">
|
||||||
<tpl-item class="address" ng-class="::{inactive: !isActive}">
|
<tpl-item class="address" ng-class="::{inactive: !isActive}">
|
||||||
<span class="inactive" translate>{{::!isActive ? '(Inactive)' : ''}}</span>
|
<span class="inactive" translate>{{::!isActive ? '(Inactive)' : ''}}</span>
|
||||||
|
@ -70,7 +71,7 @@
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
<vn-horizontal>
|
<vn-horizontal>
|
||||||
<vn-autocomplete
|
<vn-autocomplete
|
||||||
vn-one
|
vn-one
|
||||||
required="true"
|
required="true"
|
||||||
url="Companies"
|
url="Companies"
|
||||||
|
@ -109,19 +110,19 @@
|
||||||
<vn-date-picker
|
<vn-date-picker
|
||||||
vn-one
|
vn-one
|
||||||
required="true"
|
required="true"
|
||||||
label="Shipped"
|
label="Shipped"
|
||||||
ng-model="$ctrl.shipped">
|
ng-model="$ctrl.shipped">
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
<vn-input-time
|
<vn-input-time
|
||||||
vn-one
|
vn-one
|
||||||
required="true"
|
required="true"
|
||||||
label="Shipped hour"
|
label="Shipped hour"
|
||||||
ng-model="$ctrl.shipped">
|
ng-model="$ctrl.shipped">
|
||||||
</vn-input-time>
|
</vn-input-time>
|
||||||
<vn-date-picker
|
<vn-date-picker
|
||||||
vn-one
|
vn-one
|
||||||
required="true"
|
required="true"
|
||||||
label="Landed"
|
label="Landed"
|
||||||
ng-model="$ctrl.landed">
|
ng-model="$ctrl.landed">
|
||||||
</vn-date-picker>
|
</vn-date-picker>
|
||||||
</vn-horizontal>
|
</vn-horizontal>
|
||||||
|
|
|
@ -291,6 +291,17 @@ class Controller extends Component {
|
||||||
}
|
}
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isEditable() {
|
||||||
|
return this.$http.get(`Tickets/${this.ticket.id}/isEditable`).then(res => {
|
||||||
|
console.log(res.data);
|
||||||
|
if (!res.data) {
|
||||||
|
return this.vnApp.showError(
|
||||||
|
this.$t(`This ticket is not editable`)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ngModule.vnComponent('vnTicketBasicDataStepOne', {
|
ngModule.vnComponent('vnTicketBasicDataStepOne', {
|
||||||
|
|
Loading…
Reference in New Issue