modules summary were not updating view data #978

This commit is contained in:
Joan Sanchez 2019-01-18 14:04:12 +01:00
parent cb650bbdbc
commit 9cb298fb08
6 changed files with 54 additions and 56 deletions

View File

@ -10,7 +10,7 @@
value="{{$ctrl.summary.claim.created | dateTime: 'dd/MM/yyyy'}}"> value="{{$ctrl.summary.claim.created | dateTime: 'dd/MM/yyyy'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="State" <vn-label-value label="State"
value="{{::$ctrl.summary.claim.claimState.description}}"> value="{{$ctrl.summary.claim.claimState.description}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Salesperson" <vn-label-value label="Salesperson"
value="{{$ctrl.summary.claim.client.salesPerson.firstName}} {{$ctrl.summary.claim.client.salesPerson.name}}"> value="{{$ctrl.summary.claim.client.salesPerson.firstName}} {{$ctrl.summary.claim.client.salesPerson.name}}">
@ -65,14 +65,14 @@
{{("000000"+saleClaimed.sale.itemFk).slice(-6)}} {{("000000"+saleClaimed.sale.itemFk).slice(-6)}}
</span> </span>
</vn-td> </vn-td>
<vn-td number>{{saleClaimed.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td> <vn-td number>{{::saleClaimed.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
<vn-td number>{{saleClaimed.sale.quantity}}</vn-td> <vn-td number>{{::saleClaimed.sale.quantity}}</vn-td>
<vn-td number>{{saleClaimed.quantity}}</vn-td> <vn-td number>{{::saleClaimed.quantity}}</vn-td>
<vn-td number>{{saleClaimed.sale.concept}}</vn-td> <vn-td number>{{::saleClaimed.sale.concept}}</vn-td>
<vn-td number>{{saleClaimed.sale.price | currency:'€':2}}</vn-td> <vn-td number>{{::saleClaimed.sale.price | currency:'€':2}}</vn-td>
<vn-td number>{{saleClaimed.sale.discount}} %</vn-td> <vn-td number>{{::saleClaimed.sale.discount}} %</vn-td>
<vn-td number> <vn-td number>
{{(saleClaimed.sale.quantity * saleClaimed.sale.price) - {{::(saleClaimed.sale.quantity * saleClaimed.sale.price) -
((saleClaimed.sale.discount * ((saleClaimed.sale.discount *
(saleClaimed.sale.quantity * saleClaimed.sale.price))/100) | currency:'€':2 (saleClaimed.sale.quantity * saleClaimed.sale.price))/100) | currency:'€':2
}} }}
@ -100,11 +100,11 @@
</vn-thead> </vn-thead>
<vn-tbody> <vn-tbody>
<vn-tr ng-repeat="development in $ctrl.summary.developments"> <vn-tr ng-repeat="development in $ctrl.summary.developments">
<vn-td number>{{development.claimReason.description}}</vn-td> <vn-td number>{{::development.claimReason.description}}</vn-td>
<vn-td number>{{development.claimResult.description}}</vn-td> <vn-td number>{{::development.claimResult.description}}</vn-td>
<vn-td number>{{development.claimResponsible.description}}</vn-td> <vn-td number>{{::development.claimResponsible.description}}</vn-td>
<vn-td number>{{development.worker.firstName}}</vn-td> <vn-td number>{{::development.worker.firstName}}</vn-td>
<vn-td number>{{development.claimRedelivery.description}}</vn-td> <vn-td number>{{::development.claimRedelivery.description}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate> <vn-empty-rows ng-if="model.data.length === 0" translate>
@ -138,15 +138,15 @@
{{("000000"+action.sale.itemFk).slice(-6)}} {{("000000"+action.sale.itemFk).slice(-6)}}
</span> </span>
</vn-td> </vn-td>
<vn-td number>{{action.sale.id}}</vn-td> <vn-td number>{{::action.sale.id}}</vn-td>
<vn-td number>{{action.claimBeggining.description}}</vn-td> <vn-td number>{{::action.claimBeggining.description}}</vn-td>
<vn-td number>{{action.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td> <vn-td number>{{::action.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
<vn-td number>{{action.sale.quantity}}</vn-td> <vn-td number>{{::action.sale.quantity}}</vn-td>
<vn-td number>{{action.sale.concept}}</vn-td> <vn-td number>{{::action.sale.concept}}</vn-td>
<vn-td number>{{action.sale.price}}</vn-td> <vn-td number>{{::action.sale.price}}</vn-td>
<vn-td number>{{action.sale.discount}} %</vn-td> <vn-td number>{{::action.sale.discount}} %</vn-td>
<vn-td number> <vn-td number>
{{(action.sale.quantity * action.sale.price) - {{::(action.sale.quantity * action.sale.price) -
((action.sale.discount * ((action.sale.discount *
(action.sale.quantity * action.sale.price))/100) | currency:'€':2 (action.sale.quantity * action.sale.price))/100) | currency:'€':2
}} }}

View File

@ -1,5 +1,4 @@
import ngModule from '../module'; import ngModule from '../module';
import './style.scss';
export default class Controller { export default class Controller {
constructor($scope) { constructor($scope) {

View File

@ -1,7 +0,0 @@
vn-order-index {
vn-dialog.summary {
div {
min-width: 900px;
}
}
}

View File

@ -6,43 +6,43 @@
<vn-horizontal class="ticketSummary__data" pad-medium-v> <vn-horizontal class="ticketSummary__data" pad-medium-v>
<vn-one> <vn-one>
<vn-label-value label="Id" <vn-label-value label="Id"
value="{{::$ctrl.summary.id}}"> value="{{$ctrl.summary.id}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Nickname" <vn-label-value label="Nickname"
value="{{::$ctrl.summary.address.nickname}}"> value="{{$ctrl.summary.address.nickname}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Confirmed" <vn-label-value label="Confirmed"
value="{{::$ctrl.summary.isConfirmed}}"> value="{{$ctrl.summary.isConfirmed}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Warehouse" <vn-label-value label="Warehouse"
value="{{::$ctrl.summary.sourceApp}}"> value="{{$ctrl.summary.sourceApp}}">
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-label-value label="Created" <vn-label-value label="Created"
value="{{::$ctrl.summary.created | date: 'dd/MM/yyyy HH:mm'}}"> value="{{$ctrl.summary.created | date: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Confirmed" <vn-label-value label="Confirmed"
value="{{::$ctrl.summary.confirmed | date: 'dd/MM/yyyy'}}"> value="{{$ctrl.summary.confirmed | date: 'dd/MM/yyyy'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Address" <vn-label-value label="Address"
value="{{::$ctrl.formattedAddress}}"> value="{{$ctrl.formattedAddress}}">
<vn-label-value label="Phone" <vn-label-value label="Phone"
value="{{::$ctrl.summary.address.phone}}"> value="{{$ctrl.summary.address.phone}}">
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-label-value label="{{'Notes'}}" <vn-label-value label="{{'Notes'}}"
value="{{::$ctrl.summary.note}}"> value="{{$ctrl.summary.note}}">
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one class="ticketSummary__taxes"> <vn-one class="ticketSummary__taxes">
<section> <section>
<p><vn-label translate>Subtotal</vn-label> {{::$ctrl.summary.subTotal | currency:' €':2}}</p> <p><vn-label translate>Subtotal</vn-label> {{$ctrl.summary.subTotal | currency:' €':2}}</p>
<p><vn-label translate>VAT</vn-label> {{::$ctrl.summary.VAT | currency:' €':2}}</p> <p><vn-label translate>VAT</vn-label> {{$ctrl.summary.VAT | currency:' €':2}}</p>
<p><vn-label><strong>Total</strong></vn-label> <strong>{{::$ctrl.summary.total | currency:' €':2}}</strong></p> <p><vn-label><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency:' €':2}}</strong></p>
</section> </section>
</vn-one> </vn-one>
</vn-horizontal> </vn-horizontal>

View File

@ -1,3 +1,9 @@
vn-dialog {
vn-order-summary vn-one {
min-width: 10em;
}
}
.ticketSummary { .ticketSummary {
.ticketSummary__data { .ticketSummary__data {
vn-one { vn-one {

View File

@ -6,48 +6,48 @@
<vn-horizontal class="ticketSummary__data" pad-medium-v> <vn-horizontal class="ticketSummary__data" pad-medium-v>
<vn-one> <vn-one>
<vn-label-value label="State" <vn-label-value label="State"
value="{{::$ctrl.summary.state.state.name}}"> value="{{$ctrl.summary.state.state.name}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Comercial Name" <vn-label-value label="Comercial Name"
value="{{::$ctrl.summary.client.salesPerson.firstName}} {{$ctrl.summary.client.salesPerson.name}}"> value="{{$ctrl.summary.client.salesPerson.firstName}} {{$ctrl.summary.client.salesPerson.name}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Agency" <vn-label-value label="Agency"
value="{{::$ctrl.summary.agencyMode.name}}"> value="{{$ctrl.summary.agencyMode.name}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Warehouse" <vn-label-value label="Warehouse"
value="{{::$ctrl.summary.warehouse.name}}"> value="{{$ctrl.summary.warehouse.name}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Package size" <vn-label-value label="Package size"
value="{{::$ctrl.summary.packages}}"> value="{{$ctrl.summary.packages}}">
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one> <vn-one>
<vn-label-value label="Shipped" <vn-label-value label="Shipped"
value="{{::$ctrl.summary.shipped | date: 'dd/MM/yyyy HH:mm'}}"> value="{{$ctrl.summary.shipped | date: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Landed" <vn-label-value label="Landed"
value="{{::$ctrl.summary.landed | date: 'dd/MM/yyyy'}}"> value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy'}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Route" <vn-label-value label="Route"
value="{{::$ctrl.summary.routeFk}}"> value="{{$ctrl.summary.routeFk}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Address" <vn-label-value label="Address"
value="{{::$ctrl.formattedAddress}}"> value="{{$ctrl.formattedAddress}}">
</vn-label-value> </vn-label-value>
<vn-label-value label="Phone" <vn-label-value label="Phone"
value="{{::$ctrl.summary.address.phone}}"> value="{{$ctrl.summary.address.phone}}">
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one class="ticketSummary__notes"> <vn-one class="ticketSummary__notes">
<vn-label-value label="{{::note.observationType.description}}" ng-repeat="note in $ctrl.summary.notes track by note.id" <vn-label-value label="{{note.observationType.description}}" ng-repeat="note in $ctrl.summary.notes track by note.id"
value="{{::note.description}}"> value="{{note.description}}">
</vn-label-value> </vn-label-value>
</vn-one> </vn-one>
<vn-one class="ticketSummary__taxes"> <vn-one class="ticketSummary__taxes">
<section> <section>
<p><vn-label translate>Subtotal</vn-label> {{::$ctrl.summary.subTotal | currency:' €':2}}</p> <p><vn-label translate>Subtotal</vn-label> {{$ctrl.summary.subTotal | currency:' €':2}}</p>
<p><vn-label translate>VAT</vn-label> {{::$ctrl.summary.VAT | currency:' €':2}}</p> <p><vn-label translate>VAT</vn-label> {{$ctrl.summary.VAT | currency:' €':2}}</p>
<p><vn-label><strong>Total</strong></vn-label> <strong>{{::$ctrl.summary.total | currency:' €':2}}</strong></p> <p><vn-label><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency:' €':2}}</strong></p>
</section> </section>
</vn-one> </vn-one>
</vn-horizontal> </vn-horizontal>