fix descriptors
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Bernat Exposito Domenech 2020-06-08 11:05:17 +02:00
parent 56c9b08101
commit e24c5b00e9
4 changed files with 23 additions and 7 deletions

View File

@ -29,7 +29,7 @@
</vn-td>
<vn-td number>
<span
ng-click="descriptor.show($event, sale.id)"
ng-click="$ctrl.showDescriptor($event, sale)"
class="link">
{{::sale.itemFk | zeroFill:6}}
</span>

View File

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

View File

@ -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>
@ -52,8 +52,8 @@
</vn-td>
<vn-td class="expendable">
<span
ng-class="{'link': log.user.id, 'value': !log.user.id}"
ng-click="clientDescriptor.show($event, log.user.id)"
ng-class="{'link': log.user.worker.id, 'value': !log.user.worker.id}"
ng-click="$ctrl.showWorkerDescriptor($event, log.user.worker.id)"
translate>{{::log.user.name | dashIfEmpty}}
</span>
</vn-td>
@ -101,6 +101,3 @@
<vn-worker-descriptor-popover
vn-id="workerDescriptor">
</vn-worker-descriptor-popover>
<vn-client-descriptor-popover
vn-id="clientDescriptor">
</vn-client-descriptor-popover>

View File

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