Merge pull request 'descriptor can now have 4 quicklinks' (#332) from 2295-add_quicklinks into dev
gitea/salix/pipeline/head This commit has test failures Details

Reviewed-on: #332
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
This commit is contained in:
Carlos Jimenez Ruiz 2020-07-03 14:55:34 +00:00
commit 6a88ce2779
5 changed files with 25 additions and 4 deletions

View File

@ -94,7 +94,8 @@ ngModule.vnComponent('vnDescriptor', {
transclude: {
btnOne: '?btnOne',
btnTwo: '?btnTwo',
btnThree: '?btnThree'
btnThree: '?btnThree',
btnFour: '?btnFour'
}
});

View File

@ -88,7 +88,7 @@ vn-descriptor-content {
display: flex;
align-items: center;
justify-content: center;
padding: 0 $spacing-md;
padding: 0 $spacing-sm;
margin: 0 $spacing-sm;
& > vn-icon {

View File

@ -146,6 +146,20 @@
</vn-quick-link>
</div>
<div ng-transclude="btnTwo">
<vn-quick-link
tooltip="Client ticket list"
state="['ticket.index', {q: $ctrl.filter}]"
icon="icon-ticket">
</vn-quick-link>
</div>
<div ng-transclude="btnThree">
<vn-quick-link
tooltip="New order"
state="['order.create', {clientFk: $ctrl.ticket.clientFk}]"
icon="icon-basketadd">
</vn-quick-link>
</div>
<div ng-transclude="btnFour">
<vn-quick-link
ng-if="$ctrl.ticket.stowaway"
tooltip="Ship stowaways"
@ -153,7 +167,7 @@
icon="icon-stowaway">
</vn-quick-link>
</div>
<div ng-transclude="btnThree">
<div ng-transclude="btnFour">
<vn-quick-link
ng-if="$ctrl.ticket.ship"
tooltip="Stowaway"

View File

@ -38,6 +38,12 @@ class Controller extends Descriptor {
return this.ticket.stowaway || this.ticket.ship;
}
get filter() {
if (this.ticket)
return JSON.stringify({clientFk: this.ticket.clientFk});
return null;
}
isTicketEditable() {
this.$http.get(`Tickets/${this.$state.params.id}/isEditable`).then(res => {
this.isEditable = res.data;

View File

@ -11,5 +11,5 @@ clientSignature: Firma del cliente
claim: Reclamación {0}
sections:
agency:
description: 'Para agilizar tu recogida, por favor, pónte en contacto con la oficina
description: 'Para agilizar su recogida, por favor, póngase en contacto con la oficina
de integrados. <br/> Tlf: 96 166 77 88 - Ana Gómez (Ext. 2113) <em>(agomezf@integra2.es)</em>'