#1867 show warehouses on summary
gitea/salix/dev This commit looks good Details

This commit is contained in:
Joan Sanchez 2019-11-15 07:35:51 +01:00
parent 6018414fa8
commit 6e5f460fab
6 changed files with 42 additions and 24 deletions

View File

@ -36,13 +36,14 @@ vn-treeview-childs {
}
vn-treeview-child {
line-height: 38px;
font-size: 16px;
display: block;
.node {
@extend %clickable;
display: flex;
padding: 5px;
padding: 2px;
align-items: center;
}
& > div > .arrow {

View File

@ -5,7 +5,12 @@
ng-click="$ctrl.step(-1)"
class="flat">
</vn-button>
<span>{{$ctrl.firstDay | date:'MMMM yyyy'}} - {{$ctrl.lastDay | date:'MMMM yyyy'}}</span>
<div>
<span translate>{{$ctrl.firstDay | date:'MMMM'}}</span>
<span>{{$ctrl.firstDay | date:'yyyy'}} -</span>
<span translate>{{$ctrl.lastDay | date:'MMMM'}}</span>
<span>{{$ctrl.lastDay | date:'yyyy'}}</span>
</div>
<vn-button
icon="navigate_next"
ng-click="$ctrl.step(1)"

View File

@ -28,7 +28,7 @@
<vn-tbody>
<vn-tr
ng-repeat="zone in zones"
ui-sref="zone.card.location({id: zone.id})"
ui-sref="zone.card.summary({id: zone.id})"
class="clickable search-result">
<vn-td number>{{::zone.id}}</vn-td>
<vn-td expand>{{::zone.name}}</vn-td>

View File

@ -1,16 +1,21 @@
<vn-crud-model auto-load="true"
url="Zones/{{$ctrl.$params.id}}/warehouses"
include="{relation: 'warehouse'}"
data="zoneWarehouses">
</vn-crud-model>
<vn-card class="summary">
<h5>{{$ctrl.summary.name}}</h5>
<h5>#{{$ctrl.summary.id}} - {{$ctrl.summary.name}}</h5>
<vn-horizontal class="vn-pa-md">
<vn-one>
<vn-label-value label="Id"
value="{{$ctrl.summary.id}}">
</vn-label-value>
<vn-label-value label="Name"
value="{{$ctrl.summary.name}}">
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.summary.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Price"
value="{{$ctrl.summary.price | currency: 'EUR': 2}}">
</vn-label-value>
<vn-label-value label="Bonus"
value="{{$ctrl.summary.bonus | currency: 'EUR': 2}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value label="Closing hour (ETD)"
@ -19,12 +24,6 @@
<vn-label-value label="Traveling days"
value="{{$ctrl.summary.travelingDays}}">
</vn-label-value>
<vn-label-value label="Price"
value="{{$ctrl.summary.price | currency: 'EUR': 2}}">
</vn-label-value>
<vn-label-value label="Bonus"
value="{{$ctrl.summary.bonus | currency: 'EUR': 2}}">
</vn-label-value>
<vn-vertical>
<vn-check label="Volumetric" disabled="true"
ng-model="$ctrl.summary.isVolumetric">
@ -32,4 +31,21 @@
</vn-vertical>
</vn-one>
</vn-horizontal>
<vn-horizontal class="vn-pa-md">
<vn-auto>
<h4 translate>Warehouses</h4>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>Name</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="zoneWarehouse in zoneWarehouses">
<vn-td>{{zoneWarehouse.warehouse.name}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-auto>
</vn-horizontal>
</vn-card>

View File

@ -1,10 +1,7 @@
import ngModule from '../module';
import Component from 'core/lib/component';
class Controller {
constructor($http) {
this.$http = $http;
}
class Controller extends Component {
get zone() {
return this._zone;
}
@ -30,8 +27,6 @@ class Controller {
}
}
Controller.$inject = ['$http'];
ngModule.component('vnZoneSummary', {
template: require('./index.html'),
controller: Controller,

View File

@ -1,2 +1,3 @@
Choose a sample: Selecciona una plantilla
Choose a company: Selecciona una empresa
Choose a company: Selecciona una empresa
Recipient: Destinatario