Added ticket pictures section #430
This commit is contained in:
parent
781fc1b70b
commit
8ce1e5ebf7
|
@ -39,6 +39,11 @@
|
|||
</vn-horizontal>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal ng-if="model.data.length == 0">
|
||||
<vn-one ad-small translate>
|
||||
No results
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
<vn-float-button
|
||||
ng-if="$ctrl.canCreateNew()"
|
||||
|
|
|
@ -23,6 +23,11 @@
|
|||
{{::note.text}}
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
<vn-horizontal ng-if="model.data.length == 0">
|
||||
<vn-one ad-small translate>
|
||||
No results
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
|
||||
|
|
|
@ -19,7 +19,9 @@
|
|||
item="::item">
|
||||
</vn-order-product>
|
||||
|
||||
<vn-one style="text-align: center" pad-small translate>No results</vn-one>
|
||||
<vn-one style="text-align: center" pad-small translate ng-if="model.data.length == 0">
|
||||
No results
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import ngModule from '../module';
|
||||
import './style.scss';
|
||||
|
||||
class Controller {
|
||||
constructor($scope, $stateParams) {
|
||||
|
|
|
@ -10,3 +10,4 @@ import './misc.scss';
|
|||
import './summary.scss';
|
||||
import './colors.scss';
|
||||
import './effects.scss';
|
||||
import './order-product.scss';
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@import "./colors";
|
||||
|
||||
|
||||
vn-order-catalogue {
|
||||
|
||||
@media screen and (max-width: 1920px){
|
||||
vn-order-product {
|
||||
width: 25%;
|
||||
|
@ -108,4 +108,3 @@ vn-order-catalogue {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -200,6 +200,18 @@
|
|||
"menu": {
|
||||
"icon": "assignment"
|
||||
}
|
||||
},
|
||||
{
|
||||
"url" : "/picture",
|
||||
"state": "ticket.card.picture",
|
||||
"component": "vn-ticket-picture",
|
||||
"description": "Pictures",
|
||||
"params": {
|
||||
"ticket": "$ctrl.ticket"
|
||||
},
|
||||
"menu": {
|
||||
"icon": "image"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -52,6 +52,7 @@ Worker: Trabajador
|
|||
VAT: IVA
|
||||
Hour: Hora
|
||||
The quantity do not match: Las cantidades no coinciden
|
||||
by: por
|
||||
|
||||
#sections
|
||||
List: Listado
|
||||
|
@ -67,3 +68,4 @@ Tracking: Revisión
|
|||
Sale checked: Control clientes
|
||||
Components: Componentes
|
||||
Sale tracking: Líneas preparadas
|
||||
Pictures: Imágenes
|
||||
|
|
|
@ -0,0 +1,76 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="/ticket/api/sales"
|
||||
link="{ticketFk: $ctrl.$stateParams.id}"
|
||||
filter="::$ctrl.filter"
|
||||
limit="20"
|
||||
data="sales">
|
||||
</vn-crud-model>
|
||||
|
||||
<vn-vertical>
|
||||
<vn-card pad-large>
|
||||
<vn-vertical>
|
||||
<vn-title>Pictures</vn-title>
|
||||
<vn-horizontal class="catalogue list" pad-small>
|
||||
<vn-order-product ng-repeat="sale in sales">
|
||||
<vn-one>
|
||||
<vn-horizontal>
|
||||
<vn-one class="image">
|
||||
<img
|
||||
ng-src="//verdnatura.es/vn-image-data/catalog/200x200/{{::sale.item.image}}"
|
||||
zoom-image="//verdnatura.es/vn-image-data/catalog/1600x900/{{::sale.item.image}}"
|
||||
on-error-src pointer/>
|
||||
</vn-one>
|
||||
<vn-one pad-small class="description ellipsize">
|
||||
<vn-vertical>
|
||||
<h2 class="ellipsize link" vn-tooltip="{{::sale.item.name}}"
|
||||
ng-click="$ctrl.showDescriptor($event, sale.item.id)">
|
||||
{{::sale.item.name}}
|
||||
</h2>
|
||||
<span class="ellipsize" vn-tooltip="{{::sale.item.subName}}">
|
||||
{{::sale.item.subName}}
|
||||
</span>
|
||||
|
||||
<vn-label-value
|
||||
label="{{::sale.item.tag5}}"
|
||||
value="{{::sale.item.value5}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="{{::sale.item.tag6}}"
|
||||
value="{{::sale.item.value6}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="{{::sale.item.tag7}}"
|
||||
value="{{::sale.item.value7}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="{{::sale.item.tag8}}"
|
||||
value="{{::sale.item.value8}}">
|
||||
</vn-label-value>
|
||||
|
||||
<vn-horizontal class="price">
|
||||
<vn-one>
|
||||
<span>{{::sale.quantity}}</span>
|
||||
<span translate>by</span>
|
||||
<span>{{::sale.price | currency: ' €': 2}}</span>
|
||||
</vn-one>
|
||||
</section>
|
||||
</vn-vertical>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-one>
|
||||
</vn-order-product>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal ng-if="model.data.length == 0">
|
||||
<vn-one pad-small-v translate>
|
||||
No results
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
<vn-pagination
|
||||
model="model"
|
||||
scroll-selector="ui-view">
|
||||
</vn-pagination>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
<vn-item-descriptor-popover vn-id="descriptor"></vn-item-descriptor-popover>
|
|
@ -0,0 +1,34 @@
|
|||
import ngModule from '../module';
|
||||
|
||||
class Controller {
|
||||
constructor($scope, $stateParams, $http) {
|
||||
this.$scope = $scope;
|
||||
this.$stateParams = $stateParams;
|
||||
this.$http = $http;
|
||||
this.filter = {
|
||||
include: {
|
||||
relation: 'item',
|
||||
scope: {
|
||||
field: ['name', 'image']
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
showDescriptor(event, itemFk) {
|
||||
this.$scope.descriptor.itemFk = itemFk;
|
||||
this.$scope.descriptor.parent = event.target;
|
||||
this.$scope.descriptor.show();
|
||||
}
|
||||
|
||||
onDescriptorLoad() {
|
||||
this.$scope.popover.relocate();
|
||||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$scope', '$stateParams', '$http'];
|
||||
|
||||
ngModule.component('vnTicketPicture', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller
|
||||
});
|
|
@ -21,3 +21,4 @@ import './fetched-tags';
|
|||
import './sale-checked';
|
||||
import './component';
|
||||
import './sale-tracking';
|
||||
import './picture';
|
||||
|
|
Loading…
Reference in New Issue