added zone name to ticket summary
gitea/salix/1995-ticket_summary_with_zone This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-01-13 07:42:41 +01:00
parent de05cadef4
commit 048fcb733d
3 changed files with 8 additions and 4 deletions

View File

@ -51,6 +51,7 @@ module.exports = Self => {
include: [
{relation: 'warehouse', scope: {fields: ['name']}},
{relation: 'agencyMode', scope: {fields: ['name']}},
{relation: 'zone', scope: {fields: ['name']}},
{
relation: 'client',
scope: {

View File

@ -24,12 +24,12 @@
<vn-label-value label="Agency"
value="{{$ctrl.summary.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Zone"
value="{{$ctrl.summary.zone.name}}">
</vn-label-value>
<vn-label-value label="Warehouse"
value="{{$ctrl.summary.warehouse.name}}">
</vn-label-value>
<vn-label-value label="Package size"
value="{{$ctrl.summary.packages}}">
</vn-label-value>
<vn-label-value label="Invoice"
value="{{$ctrl.summary.refFk}}">
</vn-label-value>
@ -46,6 +46,9 @@
{{$ctrl.summary.routeFk}}
</a>
</vn-label-value>
<vn-label-value label="Package size"
value="{{$ctrl.summary.packages}}">
</vn-label-value>
<vn-label-value label="Address"
value="{{$ctrl.formattedAddress}}">
</vn-label-value>

View File

@ -21,7 +21,7 @@ class Controller {
}
get formattedAddress() {
if (!this.summary) return;
if (!this.summary) return '';
let address = this.summary.address;
let province = address.province ? `(${address.province.name})` : '';