Descriptor style fixes

This commit is contained in:
Juan Ferrer 2019-01-21 15:21:24 +01:00
parent 6e43b11e16
commit 09811d322a
18 changed files with 375 additions and 343 deletions

View File

@ -2,12 +2,19 @@
import Nightmare from 'nightmare';
export default function createNightmare(width = 1280, height = 720) {
const nightmare = new Nightmare({show: process.env.E2E_SHOW, typeInterval: 10, x: 0, y: 0, waitTimeout: 2000})
.viewport(width, height);
const nightmare = new Nightmare({
show: process.env.E2E_SHOW,
typeInterval: 10,
x: 0,
y: 0,
waitTimeout: 2000
}).viewport(width, height);
nightmare.on('console', (type, message) => {
nightmare.on('console', (type, message, ...args) => {
if (type === 'error')
fail(message);
else
console[type](message, ...args);
});
nightmare.header('Accept-Language', 'en');

View File

@ -35,7 +35,7 @@ export default {
cancelButton: `vn-button[href="#!/client/index"]`
},
clientDescriptor: {
moreMenu: `vn-client-descriptor > vn-card > div vn-icon-menu > div > vn-icon`,
moreMenu: `vn-client-descriptor vn-icon-menu > div > vn-icon`,
simpleTicketButton: 'vn-client-descriptor vn-popover > div > div.content > div > div.list > ul > li'
},
clientBasicData: {
@ -189,7 +189,7 @@ export default {
cancelButton: `button[ui-sref="item.index"]`
},
itemDescriptor: {
moreMenu: `vn-item-descriptor > vn-card > div vn-icon-menu > div > vn-icon`,
moreMenu: `vn-item-descriptor vn-icon-menu > div > vn-icon`,
moreMenuRegularizeButton: `vn-item-descriptor vn-icon-menu > div > vn-drop-down > vn-popover ul > li:nth-child(1)`,
regularizeQuantityInput: `vn-item-descriptor > vn-dialog > div > form > div.body > tpl-body > div > vn-textfield > div > div > div.infix > input`,
regularizeWarehouseAutocomplete: `#warehouse`,
@ -303,7 +303,7 @@ export default {
createButton: `${components.vnSubmit}`
},
ticketDescriptor: {
moreMenu: `vn-ticket-descriptor > vn-card > div vn-icon-menu > div > vn-icon`,
moreMenu: `vn-ticket-descriptor vn-icon-menu > div > vn-icon`,
moreMenuAddToTurn: `vn-ticket-descriptor vn-icon-menu > div > vn-drop-down > vn-popover ul > li:nth-child(1)`,
moreMenuDeleteTicket: `vn-ticket-descriptor vn-icon-menu > div > vn-drop-down > vn-popover ul > li:nth-child(2)`,
acceptDeleteTicketButton: `vn-ticket-descriptor button[response="ACCEPT"]`,
@ -338,7 +338,7 @@ export default {
saleDescriptorPopover: 'vn-ticket-sale vn-item-descriptor-popover > vn-popover',
saleDescriptorPopoverSummaryButton: 'vn-item-descriptor-popover a[href="#!/item/1/summary"]',
saleButton: `vn-left-menu a[ui-sref="ticket.card.sale"]`,
descriptorItemDiaryButton: `vn-item-descriptor > vn-card > div > vn-horizontal.quicklinks.ng-scope > vn-horizontal > a > vn-icon > i`,
descriptorItemDiaryButton: `vn-item-descriptor .quicklinks.ng-scope > vn-horizontal > a > vn-icon > i`,
newItemButton: 'vn-float-button[icon="add"]',
firstSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(1)`,
firstSaleThumbnailImage: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(3) > img',

View File

@ -154,7 +154,7 @@ export default class ArrayModel extends ModelProxy {
let aType = typeof a;
if (aType === typeof b)
if (aType === typeof b) {
switch (aType) {
case 'string':
return a.localeCompare(b);
@ -166,6 +166,7 @@ export default class ArrayModel extends ModelProxy {
if (a instanceof Date && b instanceof Date)
return a.getTime() - b.getTime();
}
}
if (a === undefined)
return -1;
@ -183,11 +184,12 @@ export default class ArrayModel extends ModelProxy {
let mergedWhere = [];
let wheres = [dst.where, src.where];
for (let where of wheres)
for (let where of wheres) {
if (Array.isArray(where))
mergedWhere = mergedWhere.concat(where);
else if (where)
mergedWhere.push(where);
}
switch (mergedWhere.length) {
case 0:

View File

@ -1,13 +1,13 @@
<div class="button-menu">
<button
class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored button-menu__button"
ng-click="$ctrl.onClick($event)">
class="mdl-button mdl-js-button mdl-button--raised mdl-button--colored button-menu__button">
<vn-label vn-none translate>{{::$ctrl.label}}</vn-label>
<vn-icon vn-none icon="{{::$ctrl.icon}}"></vn-icon>
<vn-icon vn-none class="button-menu__arrow_down" icon="keyboard_arrow_down"></vn-icon>
</button>
<vn-drop-down
vn-id="drop-down"
on-select="$ctrl.onDropDownSelect(value)">
on-select="$ctrl.onDropDownSelect(value)"
ng-click="$ctrl.onDropDownClick($event)">
</vn-drop-down>
</div>

View File

@ -8,6 +8,7 @@ export default class ButtonMenu extends Input {
super($element, $scope);
this.$transclude = $transclude;
this.input = this.element.querySelector('.mdl-button');
$element.on('click', e => this.onClick(e));
}
get model() {
@ -42,11 +43,16 @@ export default class ButtonMenu extends Input {
}
onClick(event) {
if (event.defaultPrevented) return;
event.preventDefault();
this.emit('open');
this.showDropDown();
}
onDropDownClick(event) {
event.preventDefault();
}
onDropDownSelect(value) {
this.field = value;
this.emit('change', {value});
@ -70,7 +76,7 @@ export default class ButtonMenu extends Input {
'limit',
'searchFunction'
]);
this.$.dropDown.show(this.input);
this.$.dropDown.show(this.element);
}
}
ButtonMenu.$inject = ['$element', '$scope', '$transclude'];

View File

@ -1,17 +1,19 @@
vn-button-menu{
vn-button-menu {
position: relative;
cursor: pointer;
.button-menu__button {
padding: 0 10px;
}
vn-label{
vn-label {
float: left;
margin-top: 1px;
}
vn-icon{
vn-icon {
float: left;
margin-top: 3px;
}
vn-icon.button-menu__arrow_down{
vn-icon.button-menu__arrow_down {
margin: 6px 0 0 5px;
}
}

View File

@ -110,8 +110,8 @@ export default class DropDown extends Component {
show(parent, search) {
this._activeOption = -1;
this.search = search;
this.buildList();
this.$.popover.show(parent || this.parent);
this.buildList();
}
/**
@ -218,6 +218,7 @@ export default class DropDown extends Component {
}
onLoadMoreClick(event) {
if (event.defaultPrevented) return;
event.preventDefault();
this.model.loadMore();
}
@ -225,7 +226,10 @@ export default class DropDown extends Component {
onContainerClick(event) {
if (event.defaultPrevented) return;
let index = getPosition(this.ul, event);
if (index != -1) this.selectOption(index);
if (index != -1) {
event.preventDefault();
this.selectOption(index);
}
}
onDocKeyDown(event) {

View File

@ -1,14 +1,11 @@
<div class="icon-menu">
<vn-icon
pointer
class="button"
ng-click="$ctrl.onClick($event)"
vn-none
icon="{{::$ctrl.icon}}">
</vn-icon>
<vn-icon
class="button"
icon="{{::$ctrl.icon}}">
</vn-icon>
<vn-drop-down
vn-id="drop-down"
on-select="$ctrl.onDropDownSelect(value)">
on-select="$ctrl.onDropDownSelect(value)"
ng-click="$ctrl.onDropDownClick($event)">
</vn-drop-down>
</div>

View File

@ -1,4 +1,6 @@
vn-icon-menu {
cursor: pointer;
vn-drop-down {
font-family: 'vn-font'
}

View File

@ -6,6 +6,7 @@
left: 0;
right: 0;
bottom: 0;
color: initial;
opacity: 0;
transform: translateY(-.6em);

View File

@ -188,59 +188,70 @@ vn-main-block {
}
.vn-descriptor {
.header {
box-shadow: 0 .1em .2em rgba(1, 1, 1, .2);
& > .header {
display: flex;
background: $main-01;
color: white;
justify-content: space-between;
align-items: stretch;
color: white;
& > vn-icon {
padding: .1em;
font-size: 2.5em;
}
& > a , & > vn-icon-menu {
& > * {
min-width: 1.8em;
@extend %clickable;
display: flex;
align-items: center;
justify-content: center;
padding: .5em;
color: white;
text-decoration: none;
& > vn-icon {
font-size: 1.8em;
}
& vn-drop-down{
color: initial;
}
}
}
.footer {
text-align: center;
& > vn-icon {
color: #666;
opacity: .4;
padding: 0 5% 0 5%;
font-size: 1.5em;
}
& > vn-icon.bright {
color: $main-01;
opacity: 1;
}
}
& > .body {
@extend .pad-small;
.quicklinks {
justify-content: center;
align-items: center;
& > * {
@extend .pad-small;
}
& > .icons {
display: flex;
align-items: center;
justify-content: center;
padding: 0;
& > a {
& > vn-icon {
font-size: 1.8em;
padding: 0;
}
@extend .pad-small;
color: #666;
opacity: .4;
font-size: 1.5em;
& > vn-icon i {
line-height: 36px
&.bright {
color: $main-01;
opacity: 1;
}
}
}
& > .quicklinks {
display: flex;
align-items: center;
justify-content: center;
padding: 0;
& > a {
@extend .pad-small;
& > vn-icon {
font-size: 1.8em;
padding: 0;
& > i {
line-height: 36px
}
}
}
}
}

View File

@ -49,13 +49,8 @@
vn-label-value > section {
margin-bottom: .3em;
& > vn-label {
display: block;
font-size: .9em;
&::after {
content: initial;
}
& > vn-label::after {
content: initial;
}
}
}

View File

@ -1,4 +1,4 @@
<vn-card class="vn-descriptor">
<div class="vn-descriptor">
<vn-horizontal class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="zone.index">
<vn-icon icon="chevron_left"></vn-icon>
@ -14,7 +14,7 @@
on-change="$ctrl.onMoreChange(value)">
</vn-icon-menu>
</vn-horizontal>
<vn-horizontal pad-medium>
<div class="body">
<vn-one>
<vn-label-value label="Id"
value="{{::$ctrl.zone.id}}">
@ -43,9 +43,8 @@
value="{{::$ctrl.zone.price | currency: '€': 2}}">
</vn-label-value>
</vn-one>
</vn-horizontal>
</vn-card>
</div>
</div>
<vn-confirm
vn-id="delete-zone"
on-response="$ctrl.returnDialog(response)"

View File

@ -1,15 +1,15 @@
<vn-card class="vn-descriptor">
<vn-horizontal class="header">
<div class="vn-descriptor">
<div class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="claim.index">
<vn-icon icon="chevron_left"></vn-icon>
</a>
<vn-icon icon=""></vn-icon>
<a translate-attr="{title: 'Preview'}" ui-sref="claim.card.summary({id: $ctrl.claim.id})">
<vn-icon icon="desktop_windows"></vn-icon>
</a>
</vn-horizontal>
<vn-vertical>
<vn-auto pad-medium>
<div></div>
</div>
<div class="body">
<div class="attributes">
<h5>{{$ctrl.claim.id}}</h5>
<vn-label-value label="Client"
value="{{::$ctrl.claim.client.name}}">
@ -29,32 +29,32 @@
<vn-label-value label="Ticket" ui-sref="ticket.card.summary({id: $ctrl.claim.ticketFk})" class="link"
value="{{$ctrl.claim.ticketFk}}">
</vn-label-value>
</vn-auto>
</vn-vertical>
<vn-horizontal pad-small class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon>
</a>
</vn-horizontal>
</vn-card>
</div>
<div class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne"
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon>
</a>
</div>
</div>
</div>

View File

@ -1,5 +1,5 @@
<vn-card class="vn-descriptor">
<vn-horizontal class="header">
<div class="vn-descriptor">
<div class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="client.index">
<vn-icon icon="chevron_left"></vn-icon>
</a>
@ -16,76 +16,78 @@
on-change="$ctrl.onMoreChange(value)"
on-open="$ctrl.onMoreOpen()">
</vn-icon-menu>
</vn-horizontal>
<div pad-medium>
<h5>{{$ctrl.client.name}}</h5>
<vn-label-value label="Id"
value="{{$ctrl.client.id}}">
</vn-label-value>
<vn-label-value label="Phone"
value="{{$ctrl.client.phone | phone}}">
</vn-label-value>
<vn-label-value label="Credit"
value="{{$ctrl.client.credit | currency: ' €': 2}}">
</vn-label-value>
<vn-label-value label="Secured credit"
value="{{$ctrl.client.creditInsurance | currency: '€ ': 2}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.client.salesPerson.firstName}} {{$ctrl.client.salesPerson.name}}">
</vn-label-value>
</div>
<vn-horizontal pad-medium class="footer">
<vn-icon
vn-tooltip="Client inactive"
icon="icon-disabled"
ng-class="{bright: $ctrl.client.isActive == false}">
</vn-icon>
<vn-icon
vn-tooltip="Client Frozen"
icon="icon-frozen"
ng-class="{bright: $ctrl.client.isFreezed == true}">
</vn-icon>
<vn-icon
vn-tooltip="Web Account inactive"
icon="icon-noweb"
ng-class="{bright: $ctrl.client.account.active == false}">
</vn-icon>
<vn-icon
vn-tooltip="Client has debt"
icon="icon-risk"
ng-class="{bright: $ctrl.client.debt > $ctrl.client.credit}">
</vn-icon>
<vn-icon
vn-tooltip="Client not checked"
icon="icon-no036"
ng-class="{bright: $ctrl.client.isTaxDataChecked == false}">
</vn-icon>
</vn-horizontal>
<vn-horizontal pad-small class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<div class="body">
<div class="attributes">
<h5>{{$ctrl.client.name}}</h5>
<vn-label-value label="Id"
value="{{$ctrl.client.id}}">
</vn-label-value>
<vn-label-value label="Phone"
value="{{$ctrl.client.phone | phone}}">
</vn-label-value>
<vn-label-value label="Credit"
value="{{$ctrl.client.credit | currency: ' €': 2}}">
</vn-label-value>
<vn-label-value label="Secured credit"
value="{{$ctrl.client.creditInsurance | currency: '€ ': 2}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.client.salesPerson.firstName}} {{$ctrl.client.salesPerson.name}}">
</vn-label-value>
</div>
<div class="icons">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
vn-tooltip="Client inactive"
icon="icon-disabled"
ng-class="{bright: $ctrl.client.isActive == false}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
vn-tooltip="Client Frozen"
icon="icon-frozen"
ng-class="{bright: $ctrl.client.isFreezed == true}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
vn-tooltip="Web Account inactive"
icon="icon-noweb"
ng-class="{bright: $ctrl.client.account.active == false}">
</vn-icon>
</a>
</vn-horizontal>
</vn-card>
<vn-icon
vn-tooltip="Client has debt"
icon="icon-risk"
ng-class="{bright: $ctrl.client.debt > $ctrl.client.credit}">
</vn-icon>
<vn-icon
vn-tooltip="Client not checked"
icon="icon-no036"
ng-class="{bright: $ctrl.client.isTaxDataChecked == false}">
</vn-icon>
</div>
<div class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne"
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon>
</a>
</div>
</div>
</div>

View File

@ -1,5 +1,5 @@
<vn-card class="vn-descriptor">
<vn-horizontal class="header">
<div class="vn-descriptor">
<div class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="item.index">
<vn-icon icon="chevron_left"></vn-icon>
</a>
@ -16,9 +16,9 @@
on-change="$ctrl.onMoreChange(value)"
on-open="$ctrl.onMoreOpen()">
</vn-icon-menu>
</vn-horizontal>
<vn-vertical>
<vn-auto style="position: relative" text-center>
</div>
<div>
<div style="position: relative" text-center>
<img
ng-src="//verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}"
zoom-image="//verdnatura.es/vn-image-data/catalog/1600x900/{{$ctrl.item.image}}"
@ -30,7 +30,7 @@
vn-visible-by="marketing, buyer">
</vn-float-button>
</a>
</vn-auto>
</div>
<vn-horizontal class="state">
<vn-one>
<p translate>Visible</p>
@ -41,7 +41,9 @@
<p>{{$ctrl.item.available}}</p>
</vn-one>
</vn-horizontal>
<vn-auto pad-medium>
</div>
<div class="body">
<div class="attributes">
<h5>{{$ctrl.item.id}}</h5>
<vn-label-value label="Name"
value="{{::$ctrl.item.name}}">
@ -54,11 +56,9 @@
label="{{tag.tag.name}}"
value="{{tag.value}}">
</vn-label-value>
</vn-auto>
</vn-vertical>
<vn-horizontal pad-small class="quicklinks">
<vn-horizontal pad-small class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne" pad-small-right
</div>
<div class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne"
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
@ -66,7 +66,7 @@
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo" pad-small-right
<a ng-if="$ctrl.quicklinks.btnTwo"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
@ -74,7 +74,7 @@
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree" pad-small-right
<a ng-if="$ctrl.quicklinks.btnThree"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
@ -82,9 +82,9 @@
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon>
</a>
</vn-horizontal>
</vn-card>
</div>
</div>
</div>
<vn-dialog
vn-id="regularize"
on-open="$ctrl.clearRegularizeDialog()"

View File

@ -1,5 +1,5 @@
<vn-card class="vn-descriptor">
<vn-horizontal class="header">
<div class="vn-descriptor">
<div class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="ticket.index">
<vn-icon icon="chevron_left"></vn-icon>
</a>
@ -16,94 +16,96 @@
on-change="$ctrl.onMoreChange(value)"
on-open="$ctrl.onMoreOpen()">
</vn-icon-menu>
</vn-horizontal>
<div pad-medium>
<h5>{{::$ctrl.client.name}}</h5>
<vn-label-value label="Id"
value="{{$ctrl.ticket.id}}">
</vn-label-value>
<vn-label-value label="Client"
value="{{$ctrl.ticket.client.name}}">
</vn-label-value>
<vn-label-value label="State"
value="{{$ctrl.ticket.state.state.name}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.ticket.client.salesPerson.firstName}} {{$ctrl.ticket.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Shipped"
value="{{$ctrl.ticket.shipped | date: 'dd/MM/yyyy HH:mm' }}">
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.ticket.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Warehouse"
value="{{$ctrl.ticket.warehouse.name}}">
</vn-label-value>
<vn-label-value label="Alias"
value="{{$ctrl.ticket.nickname}}">
</vn-label-value>
</div>
<vn-horizontal pad-medium-bottom class="footer">
<vn-icon vn-one
vn-tooltip="Client inactive"
icon="icon-disabled"
ng-class="{bright: $ctrl.ticket.client.isActive == false}">
</vn-icon>
<vn-icon vn-one
vn-tooltip="Client Frozen"
icon="icon-frozen"
ng-class="{bright: $ctrl.ticket.client.isFreezed == true}">
</vn-icon>
<vn-icon vn-one
vn-tooltip="Client has debt"
icon="icon-risk"
ng-class="{bright: $ctrl.ticket.client.debt > $ctrl.ticket.client.credit}">
</vn-icon>
<vn-icon vn-one
vn-tooltip="Client not checked"
icon="icon-no036"
ng-class="{bright: $ctrl.ticket.client.isTaxDataChecked == false}">
</vn-icon>
</vn-horizontal>
<vn-horizontal pad-small class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
<div class="body">
<div class="attributes">
<h5>{{::$ctrl.client.name}}</h5>
<vn-label-value label="Id"
value="{{$ctrl.ticket.id}}">
</vn-label-value>
<vn-label-value label="Client"
value="{{$ctrl.ticket.client.name}}">
</vn-label-value>
<vn-label-value label="State"
value="{{$ctrl.ticket.state.state.name}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.ticket.client.salesPerson.firstName}} {{$ctrl.ticket.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Shipped"
value="{{$ctrl.ticket.shipped | date: 'dd/MM/yyyy HH:mm' }}">
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.ticket.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Warehouse"
value="{{$ctrl.ticket.warehouse.name}}">
</vn-label-value>
<vn-label-value label="Alias"
value="{{$ctrl.ticket.nickname}}">
</vn-label-value>
</div>
<div class="icons">
<vn-icon vn-one
vn-tooltip="Client inactive"
icon="icon-disabled"
ng-class="{bright: $ctrl.ticket.client.isActive == false}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
<vn-icon vn-one
vn-tooltip="Client Frozen"
icon="icon-frozen"
ng-class="{bright: $ctrl.ticket.client.isFreezed == true}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
<vn-icon vn-one
vn-tooltip="Client has debt"
icon="icon-risk"
ng-class="{bright: $ctrl.ticket.client.debt > $ctrl.ticket.client.credit}">
</vn-icon>
</a>
<vn-button-menu
ng-if="$ctrl.ticket.ship.length > 1"
vn-id="stowaways-button"
icon="icon-polizon"
show-filter="false"
show-field="id"
value-field="id"
vn-tooltip="Ship stowaways"
data="$ctrl.ticket.ship"
on-change="$ctrl.goToTicket(value)">
</vn-button-menu>
</vn-horizontal>
</vn-card>
<vn-icon vn-one
vn-tooltip="Client not checked"
icon="icon-no036"
ng-class="{bright: $ctrl.ticket.client.isTaxDataChecked == false}">
</vn-icon>
</div>
<div class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne"
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon>
</a>
<vn-button-menu
ng-if="$ctrl.ticket.ship.length > 1"
vn-id="stowaways-button"
icon="icon-polizon"
show-filter="false"
show-field="id"
value-field="id"
vn-tooltip="Ship stowaways"
data="$ctrl.ticket.ship"
on-change="$ctrl.goToTicket(value)">
</vn-button-menu>
</div>
</div>
</div>
<vn-dialog class="dialog-summary"
vn-id="addTurn">
<tpl-body>

View File

@ -1,66 +1,68 @@
<vn-card class="vn-descriptor">
<vn-horizontal class="header">
<div class="vn-descriptor">
<div class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="order.index">
<vn-icon icon="chevron_left"></vn-icon>
</a>
<vn-icon icon="shopping_cart"></vn-icon>
<a translate-attr="{title: 'Preview'}" ui-sref="order.card.summary">
<vn-icon icon="desktop_windows"></vn-icon>
</a>
</vn-horizontal>
<div pad-medium>
<vn-label-value label="ID"
value="{{$ctrl.order.id}}">
</vn-label-value>
<vn-label-value label="Client"
value="{{$ctrl.order.client.name}}">
</vn-label-value>
<vn-label-value label="State"
value="{{$ctrl.order.isConfirmed ? $ctrl.translate.instant('Confirmed') : $ctrl.translate.instant('Not confirmed')}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.order.client.salesPerson.firstName}} {{$ctrl.order.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Landed"
value="{{$ctrl.order.landed | date: 'dd/MM/yyyy' }}">
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.order.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Alias"
value="{{$ctrl.order.address.nickname}}">
</vn-label-value>
<vn-label-value label="Items"
value="{{$ctrl.order.rows.length || 0}}">
</vn-label-value>
<vn-label-value label="Total"
value="{{$ctrl.order.total | currency: ' €': 2}}">
</vn-label-value>
<div></div>
</div>
<vn-horizontal pad-small class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon>
</a>
</vn-horizontal>
</vn-card>
<div class="body">
<div class="attributes">
<vn-label-value label="ID"
value="{{$ctrl.order.id}}">
</vn-label-value>
<vn-label-value label="Client"
value="{{$ctrl.order.client.name}}">
</vn-label-value>
<vn-label-value label="State"
value="{{$ctrl.order.isConfirmed ? $ctrl.translate.instant('Confirmed') : $ctrl.translate.instant('Not confirmed')}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.order.client.salesPerson.firstName}} {{$ctrl.order.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Landed"
value="{{$ctrl.order.landed | date: 'dd/MM/yyyy' }}">
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.order.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Alias"
value="{{$ctrl.order.address.nickname}}">
</vn-label-value>
<vn-label-value label="Items"
value="{{$ctrl.order.rows.length || 0}}">
</vn-label-value>
<vn-label-value label="Total"
value="{{$ctrl.order.total | currency: ' €': 2}}">
</vn-label-value>
</div>
<div class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne"
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnTwo"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon>
</a>
<a ng-if="$ctrl.quicklinks.btnThree"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon>
</a>
</div>
</div>
</div>