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'; import Nightmare from 'nightmare';
export default function createNightmare(width = 1280, height = 720) { 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}) const nightmare = new Nightmare({
.viewport(width, height); 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') if (type === 'error')
fail(message); fail(message);
else
console[type](message, ...args);
}); });
nightmare.header('Accept-Language', 'en'); nightmare.header('Accept-Language', 'en');

View File

@ -35,7 +35,7 @@ export default {
cancelButton: `vn-button[href="#!/client/index"]` cancelButton: `vn-button[href="#!/client/index"]`
}, },
clientDescriptor: { 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' simpleTicketButton: 'vn-client-descriptor vn-popover > div > div.content > div > div.list > ul > li'
}, },
clientBasicData: { clientBasicData: {
@ -189,7 +189,7 @@ export default {
cancelButton: `button[ui-sref="item.index"]` cancelButton: `button[ui-sref="item.index"]`
}, },
itemDescriptor: { 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)`, 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`, regularizeQuantityInput: `vn-item-descriptor > vn-dialog > div > form > div.body > tpl-body > div > vn-textfield > div > div > div.infix > input`,
regularizeWarehouseAutocomplete: `#warehouse`, regularizeWarehouseAutocomplete: `#warehouse`,
@ -303,7 +303,7 @@ export default {
createButton: `${components.vnSubmit}` createButton: `${components.vnSubmit}`
}, },
ticketDescriptor: { 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)`, 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)`, 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"]`, acceptDeleteTicketButton: `vn-ticket-descriptor button[response="ACCEPT"]`,
@ -338,7 +338,7 @@ export default {
saleDescriptorPopover: 'vn-ticket-sale vn-item-descriptor-popover > vn-popover', saleDescriptorPopover: 'vn-ticket-sale vn-item-descriptor-popover > vn-popover',
saleDescriptorPopoverSummaryButton: 'vn-item-descriptor-popover a[href="#!/item/1/summary"]', saleDescriptorPopoverSummaryButton: 'vn-item-descriptor-popover a[href="#!/item/1/summary"]',
saleButton: `vn-left-menu a[ui-sref="ticket.card.sale"]`, 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"]', newItemButton: 'vn-float-button[icon="add"]',
firstSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(1)`, firstSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(1)`,
firstSaleThumbnailImage: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(3) > img', 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; let aType = typeof a;
if (aType === typeof b) if (aType === typeof b) {
switch (aType) { switch (aType) {
case 'string': case 'string':
return a.localeCompare(b); return a.localeCompare(b);
@ -166,6 +166,7 @@ export default class ArrayModel extends ModelProxy {
if (a instanceof Date && b instanceof Date) if (a instanceof Date && b instanceof Date)
return a.getTime() - b.getTime(); return a.getTime() - b.getTime();
} }
}
if (a === undefined) if (a === undefined)
return -1; return -1;
@ -183,11 +184,12 @@ export default class ArrayModel extends ModelProxy {
let mergedWhere = []; let mergedWhere = [];
let wheres = [dst.where, src.where]; let wheres = [dst.where, src.where];
for (let where of wheres) for (let where of wheres) {
if (Array.isArray(where)) if (Array.isArray(where))
mergedWhere = mergedWhere.concat(where); mergedWhere = mergedWhere.concat(where);
else if (where) else if (where)
mergedWhere.push(where); mergedWhere.push(where);
}
switch (mergedWhere.length) { switch (mergedWhere.length) {
case 0: case 0:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
<vn-card class="vn-descriptor"> <div class="vn-descriptor">
<vn-horizontal class="header"> <div class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="client.index"> <a translate-attr="{title: 'Return to module index'}" ui-sref="client.index">
<vn-icon icon="chevron_left"></vn-icon> <vn-icon icon="chevron_left"></vn-icon>
</a> </a>
@ -16,76 +16,78 @@
on-change="$ctrl.onMoreChange(value)" on-change="$ctrl.onMoreChange(value)"
on-open="$ctrl.onMoreOpen()"> on-open="$ctrl.onMoreOpen()">
</vn-icon-menu> </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> </div>
<vn-horizontal pad-medium class="footer"> <div class="body">
<vn-icon <div class="attributes">
vn-tooltip="Client inactive" <h5>{{$ctrl.client.name}}</h5>
icon="icon-disabled" <vn-label-value label="Id"
ng-class="{bright: $ctrl.client.isActive == false}"> value="{{$ctrl.client.id}}">
</vn-icon> </vn-label-value>
<vn-icon <vn-label-value label="Phone"
vn-tooltip="Client Frozen" value="{{$ctrl.client.phone | phone}}">
icon="icon-frozen" </vn-label-value>
ng-class="{bright: $ctrl.client.isFreezed == true}"> <vn-label-value label="Credit"
</vn-icon> value="{{$ctrl.client.credit | currency: ' €': 2}}">
<vn-icon </vn-label-value>
vn-tooltip="Web Account inactive" <vn-label-value label="Secured credit"
icon="icon-noweb" value="{{$ctrl.client.creditInsurance | currency: '€ ': 2}}">
ng-class="{bright: $ctrl.client.account.active == false}"> </vn-label-value>
</vn-icon> <vn-label-value label="Sales person"
<vn-icon value="{{$ctrl.client.salesPerson.firstName}} {{$ctrl.client.salesPerson.name}}">
vn-tooltip="Client has debt" </vn-label-value>
icon="icon-risk" </div>
ng-class="{bright: $ctrl.client.debt > $ctrl.client.credit}"> <div class="icons">
</vn-icon> <vn-icon
<vn-icon vn-tooltip="Client inactive"
vn-tooltip="Client not checked" icon="icon-disabled"
icon="icon-no036" ng-class="{bright: $ctrl.client.isActive == false}">
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">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon> </vn-icon>
</a> <vn-icon
<a ng-if="$ctrl.quicklinks.btnTwo" pad-small-right vn-tooltip="Client Frozen"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}" icon="icon-frozen"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank"> ng-class="{bright: $ctrl.client.isFreezed == true}">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon> </vn-icon>
</a> <vn-icon
<a ng-if="$ctrl.quicklinks.btnThree" pad-small-right vn-tooltip="Web Account inactive"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}" icon="icon-noweb"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank"> ng-class="{bright: $ctrl.client.account.active == false}">
<vn-icon
class="mdl-button mdl-js-button mdl-button--colored"
icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon> </vn-icon>
</a> <vn-icon
</vn-horizontal> vn-tooltip="Client has debt"
</vn-card> 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"> <div class="vn-descriptor">
<vn-horizontal class="header"> <div class="header">
<a translate-attr="{title: 'Return to module index'}" ui-sref="item.index"> <a translate-attr="{title: 'Return to module index'}" ui-sref="item.index">
<vn-icon icon="chevron_left"></vn-icon> <vn-icon icon="chevron_left"></vn-icon>
</a> </a>
@ -16,9 +16,9 @@
on-change="$ctrl.onMoreChange(value)" on-change="$ctrl.onMoreChange(value)"
on-open="$ctrl.onMoreOpen()"> on-open="$ctrl.onMoreOpen()">
</vn-icon-menu> </vn-icon-menu>
</vn-horizontal> </div>
<vn-vertical> <div>
<vn-auto style="position: relative" text-center> <div style="position: relative" text-center>
<img <img
ng-src="//verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}" ng-src="//verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}"
zoom-image="//verdnatura.es/vn-image-data/catalog/1600x900/{{$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-visible-by="marketing, buyer">
</vn-float-button> </vn-float-button>
</a> </a>
</vn-auto> </div>
<vn-horizontal class="state"> <vn-horizontal class="state">
<vn-one> <vn-one>
<p translate>Visible</p> <p translate>Visible</p>
@ -41,7 +41,9 @@
<p>{{$ctrl.item.available}}</p> <p>{{$ctrl.item.available}}</p>
</vn-one> </vn-one>
</vn-horizontal> </vn-horizontal>
<vn-auto pad-medium> </div>
<div class="body">
<div class="attributes">
<h5>{{$ctrl.item.id}}</h5> <h5>{{$ctrl.item.id}}</h5>
<vn-label-value label="Name" <vn-label-value label="Name"
value="{{::$ctrl.item.name}}"> value="{{::$ctrl.item.name}}">
@ -54,11 +56,9 @@
label="{{tag.tag.name}}" label="{{tag.tag.name}}"
value="{{tag.value}}"> value="{{tag.value}}">
</vn-label-value> </vn-label-value>
</vn-auto> </div>
</vn-vertical> <div class="quicklinks">
<vn-horizontal pad-small class="quicklinks"> <a ng-if="$ctrl.quicklinks.btnOne"
<vn-horizontal pad-small class="quicklinks">
<a ng-if="$ctrl.quicklinks.btnOne" pad-small-right
vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}" vn-tooltip="{{::$ctrl.quicklinks.btnOne.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank"> ui-sref="{{::$ctrl.quicklinks.btnOne.state}}" target="_blank">
<vn-icon <vn-icon
@ -66,7 +66,7 @@
icon="{{::$ctrl.quicklinks.btnOne.icon}}"> icon="{{::$ctrl.quicklinks.btnOne.icon}}">
</vn-icon> </vn-icon>
</a> </a>
<a ng-if="$ctrl.quicklinks.btnTwo" pad-small-right <a ng-if="$ctrl.quicklinks.btnTwo"
vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}" vn-tooltip="{{::$ctrl.quicklinks.btnTwo.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank"> ui-sref="{{::$ctrl.quicklinks.btnTwo.state}}" target="_blank">
<vn-icon <vn-icon
@ -74,7 +74,7 @@
icon="{{::$ctrl.quicklinks.btnTwo.icon}}"> icon="{{::$ctrl.quicklinks.btnTwo.icon}}">
</vn-icon> </vn-icon>
</a> </a>
<a ng-if="$ctrl.quicklinks.btnThree" pad-small-right <a ng-if="$ctrl.quicklinks.btnThree"
vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}" vn-tooltip="{{::$ctrl.quicklinks.btnThree.tooltip}}"
ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank"> ui-sref="{{::$ctrl.quicklinks.btnThree.state}}" target="_blank">
<vn-icon <vn-icon
@ -82,9 +82,9 @@
icon="{{::$ctrl.quicklinks.btnThree.icon}}"> icon="{{::$ctrl.quicklinks.btnThree.icon}}">
</vn-icon> </vn-icon>
</a> </a>
</vn-horizontal> </div>
</vn-card> </div>
</div>
<vn-dialog <vn-dialog
vn-id="regularize" vn-id="regularize"
on-open="$ctrl.clearRegularizeDialog()" on-open="$ctrl.clearRegularizeDialog()"

View File

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

View File

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