Compare commits

...

3 Commits

Author SHA1 Message Date
Alex Moreno 6637514909 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 1877-ticket_basic-data
gitea/salix/pipeline/head This commit looks good Details
2023-07-25 08:47:12 +02:00
Alex Moreno 567dfd4aca feat
gitea/salix/pipeline/head This commit looks good Details
2022-12-28 07:55:09 +01:00
Alex Moreno a5fe335e46 feat(ticket_basic-data): address isEditable 2022-12-28 07:54:55 +01:00
2 changed files with 19 additions and 7 deletions

View File

@ -46,6 +46,7 @@
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>

View File

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