Merge pull request '2303-fix_descriptor_show' (#300) from 2303-fix_descriptor_show into dev
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
Reviewed-by: Joan Sanchez <joan@verdnatura.es>
This commit is contained in:
commit
7d53f274de
|
@ -76,8 +76,8 @@
|
|||
<span
|
||||
ng-if="balance.isInvoice"
|
||||
title="{{'BILL' | translate: {ref: balance.ref} }}"
|
||||
vn-click-stop="invoiceOutDescriptor.show($event, balance)"
|
||||
ng-class="link">
|
||||
vn-click-stop="$ctrl.showInvoiceOutDescriptor($event, balance)"
|
||||
class="link">
|
||||
{{'BILL' | translate: {ref: balance.ref} }}
|
||||
</span>
|
||||
<span
|
||||
|
|
|
@ -72,6 +72,13 @@ class Controller extends Section {
|
|||
}
|
||||
});
|
||||
}
|
||||
|
||||
showInvoiceOutDescriptor(event, balance) {
|
||||
if (!balance.isInvoice) return;
|
||||
if (event.defaultPrevented) return;
|
||||
|
||||
this.$.invoiceOutDescriptor.show(event.target, balance.id);
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$element', '$scope'];
|
||||
|
|
|
@ -17,6 +17,20 @@ class Controller extends Section {
|
|||
]
|
||||
};
|
||||
}
|
||||
showDescriptor(event, sale) {
|
||||
this.quicklinks = {
|
||||
btnThree: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({
|
||||
id: ${sale.itemFk},
|
||||
warehouseFk: ${this.ticket.warehouseFk},
|
||||
lineFk: ${sale.id}
|
||||
})`,
|
||||
tooltip: 'Item diary'
|
||||
}
|
||||
};
|
||||
this.$.descriptor.show(event.target, sale.itemFk);
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnTicketSaleChecked', {
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<span translate class="label">Changed by</span><span class="label">: </span>
|
||||
<span
|
||||
ng-class="{'link': log.user.worker.id, 'value': !log.user.worker.id}"
|
||||
ng-click="workerDescriptor.show($event, log.user.id)"
|
||||
ng-click="$ctrl.showWorkerDescriptor($event, log.user.worker.id)"
|
||||
translate>{{::log.user.name | dashIfEmpty}}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -53,7 +53,7 @@
|
|||
<vn-td class="expendable">
|
||||
<span
|
||||
ng-class="{'link': log.user.worker.id, 'value': !log.user.worker.id}"
|
||||
ng-click="workerDescriptor.show($event, log.user.id)"
|
||||
ng-click="$ctrl.showWorkerDescriptor($event, log.user.worker.id)"
|
||||
translate>{{::log.user.name | dashIfEmpty}}
|
||||
</span>
|
||||
</vn-td>
|
||||
|
|
|
@ -57,6 +57,11 @@ export default class Controller extends Section {
|
|||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
showWorkerDescriptor(event, workerId) {
|
||||
if (!workerId) return;
|
||||
this.$.workerDescriptor.show(event.target, workerId);
|
||||
}
|
||||
}
|
||||
|
||||
ngModule.component('vnLog', {
|
||||
|
|
Loading…
Reference in New Issue