Summary style fixes

This commit is contained in:
Juan Ferrer 2019-01-20 16:47:04 +01:00
parent 9cb298fb08
commit 2df9579f2c
30 changed files with 832 additions and 893 deletions

View File

@ -261,12 +261,12 @@ export default {
submitBotanicalButton: `${components.vnSubmit}`
},
itemSummary: {
basicData: `vn-item-summary vn-vertical[name="basicData"]`,
vat: `vn-item-summary vn-vertical[name="tax"]`,
tags: `vn-item-summary vn-vertical[name="tags"]`,
niche: `vn-item-summary vn-vertical[name="niche"]`,
botanical: `vn-item-summary vn-vertical[name="botanical"]`,
barcode: `vn-item-summary vn-vertical[name="barcode"]`
basicData: `vn-item-summary [name="basicData"]`,
vat: `vn-item-summary [name="tax"]`,
tags: `vn-item-summary [name="tags"]`,
niche: `vn-item-summary [name="niche"]`,
botanical: `vn-item-summary [name="botanical"]`,
barcode: `vn-item-summary [name="barcode"]`
},
itemDiary: {
thirdTicketId: 'vn-item-diary > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(3) > vn-td:nth-child(2) > span',
@ -275,11 +275,11 @@ export default {
warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]',
},
ticketSummary: {
sale: 'vn-ticket-summary > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-one > table > tbody > tr',
firstSaleItemId: 'vn-ticket-summary > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-one > table > tbody > tr > td:nth-child(2) > span',
popoverDiaryButton: 'vn-ticket-summary > vn-item-descriptor-popover vn-item-descriptor vn-icon[icon="icon-transaction"]',
firstSaleQuantity: 'vn-ticket-summary > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-one > table > tbody > tr > td:nth-child(4)',
firstSaleDiscount: 'vn-ticket-summary > vn-card > div > vn-vertical > vn-horizontal:nth-child(3) > vn-one > table > tbody > tr > td:nth-child(6)'
sale: 'vn-ticket-summary [name="sales"] table > tbody > tr',
firstSaleItemId: 'vn-ticket-summary [name="sales"] table > tbody > tr > td:nth-child(2) > span',
popoverDiaryButton: 'vn-ticket-summary vn-item-descriptor-popover vn-item-descriptor vn-icon[icon="icon-transaction"]',
firstSaleQuantity: 'vn-ticket-summary [name="sales"] table > tbody > tr > td:nth-child(4)',
firstSaleDiscount: 'vn-ticket-summary [name="sales"] table > tbody > tr > td:nth-child(6)'
},
ticketsIndex: {
newTicketButton: 'body > vn-app > vn-vertical > vn-vertical > ui-view > vn-ticket-index > a',

View File

@ -35,34 +35,34 @@ describe('Item summary path', () => {
it(`should check the item summary preview shows fields from basic data`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Object1 Gem1 5')
.waitForTextInElement(selectors.itemSummary.basicData, 'Object1 Gem1 5')
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
expect(result).toContain('Name: Object1 Gem1 5');
expect(result).toContain('Object1 Gem1 5');
});
it(`should check the item summary preview shows fields from tags`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.tags, 'Color: Yellow')
.waitForTextInElement(selectors.itemSummary.tags, 'Yellow')
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
expect(result).toContain('Color: Yellow');
expect(result).toContain('Yellow');
});
it(`should check the item summary preview shows fields from niche`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.niche, 'Warehouse One: A1')
.waitForTextInElement(selectors.itemSummary.niche, 'A1')
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
expect(result).toContain('Warehouse One: A1');
expect(result).toContain('A1');
});
it(`should check the item summary preview shows fields from botanical`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: Hedera helix')
.waitForTextInElement(selectors.itemSummary.botanical, 'Hedera helix')
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
expect(result).toContain('Botanical: Hedera helix');
expect(result).toContain('Hedera helix');
});
it(`should check the item summary preview shows fields from barcode`, async() => {
@ -83,7 +83,7 @@ describe('Item summary path', () => {
it('should search for other item', async() => {
const result = await nightmare
.clearInput('body > vn-app > vn-vertical > vn-vertical > ui-view > vn-item-index > div > div > vn-card:nth-child(1) > div > vn-searchbar > form > vn-horizontal > vn-textfield > div > div > div.infix > input')
.clearInput('vn-item-index vn-searchbar input')
.click(selectors.itemsIndex.searchButton)
.type(selectors.itemsIndex.searchItemInput, 'Object2 Gem2 3')
.click(selectors.itemsIndex.searchButton)
@ -109,34 +109,34 @@ describe('Item summary path', () => {
it(`should now check the item summary preview shows fields from basic data`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Object2 Gem2 3')
.waitForTextInElement(selectors.itemSummary.basicData, 'Object2 Gem2 3')
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
expect(result).toContain('Name: Object2 Gem2 3');
expect(result).toContain('Object2 Gem2 3');
});
it(`should now check the item summary preview shows fields from tags`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.tags, 'Color: Red')
.waitForTextInElement(selectors.itemSummary.tags, 'Red')
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
expect(result).toContain('Color: Red');
expect(result).toContain('Red');
});
it(`should now check the item summary preview shows fields from niche`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.niche, 'Warehouse One: A4')
.waitForTextInElement(selectors.itemSummary.niche, 'A4')
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
expect(result).toContain('Warehouse One: A4');
expect(result).toContain('A4');
});
it(`should now check the item summary preview shows fields from botanical`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.botanical, 'Botanical: -')
.waitForTextInElement(selectors.itemSummary.botanical, '-')
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
expect(result).toContain('Botanical: -');
expect(result).toContain('-');
});
it(`should now check the item summary preview shows fields from barcode`, async() => {
@ -166,31 +166,31 @@ describe('Item summary path', () => {
it(`should check the item summary shows fields from basic data section`, async() => {
const result = await nightmare
.waitForTextInElement(selectors.itemSummary.basicData, 'Name: Object2 Gem2 3')
.waitForTextInElement(selectors.itemSummary.basicData, 'Object2 Gem2 3')
.waitToGetProperty(selectors.itemSummary.basicData, 'innerText');
expect(result).toContain('Name: Object2 Gem2 3');
expect(result).toContain('Object2 Gem2 3');
});
it(`should check the item summary shows fields from tags section`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemSummary.tags, 'innerText');
expect(result).toContain('Color: Red');
expect(result).toContain('Red');
});
it(`should check the item summary shows fields from niches section`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemSummary.niche, 'innerText');
expect(result).toContain('Warehouse One: A4');
expect(result).toContain('One A4');
});
it(`should check the item summary shows fields from botanical section`, async() => {
const result = await nightmare
.waitToGetProperty(selectors.itemSummary.botanical, 'innerText');
expect(result).toContain('Botanical: -');
expect(result).toContain('-');
});
it(`should check the item summary shows fields from barcodes section`, async() => {

View File

@ -13,6 +13,8 @@
background-color: rgba(0, 0, 0, .6);
opacity: 0;
transition: opacity 300ms ease-in-out;
padding: 3em;
box-sizing: border-box;
&.shown {
opacity: 1;
@ -25,6 +27,7 @@
overflow: auto;
padding: 2em;
box-sizing: border-box;
max-height: 100%;
tpl-body {
display: block;
@ -67,50 +70,4 @@
}
}
}
&.dialog-summary {
vn-card {
border: none;
box-shadow: none;
padding: 0;
& > div > vn-vertical {
padding: 0;
margin: 0
}
}
& > div > button.close > vn-icon {
color: $main-01;
}
& > div {
padding: 0
}
tpl-body {
width:auto;
background-color: transparent;
padding: 0 2em
}
.body {
overflow: auto;
margin-top: 2em;
max-height: 700px;
}
form {
min-width: 680px;
}
.buttons {
margin-top: 2em
}
vn-check label span {
font-size: .9em
}
}
}

View File

@ -2,7 +2,8 @@
<vn-one>{{::$ctrl.item.name}}</vn-one>
<vn-auto>
<section
class="inline-tag ellipsize" ng-class="{'empty': !fetchedTag.value}"
class="inline-tag ellipsize"
ng-class="::{empty: !fetchedTag.value}"
ng-repeat="fetchedTag in $ctrl.tags track by $index"
vn-tooltip="{{::fetchedTag.name}}: {{::fetchedTag.value}}">
{{::fetchedTag.value}}

View File

@ -4,59 +4,35 @@ vn-fetched-tags {
&.noTitle vn-one {
display: none !important;
}
& > vn-horizontal {
align-items: center;
@media screen and (max-width: 1600px){
& vn-horizontal {
@media screen and (max-width: 1600px) {
flex-direction: column;
text-align: center;
& > vn-one {
padding: 0 0 0.2em 0;
}
& > vn-two {
text-align: center;
margin: 0 auto
}
.inline-tag {
font-size: 0.7em;
padding: 0.3em
padding-bottom: .2em;
}
}
}
& > vn-one {
min-width: 12em;
}
& > vn-auto > .inline-tag {
display: inline-block;
color: $secondary-font-color;
margin-right: .4em;
text-align: center;
font-size: .8em;
height: 1.25em;
padding: .1em;
border-radius: .1em;
width: 4em;
border: 1px solid $secondary-font-color;
@media screen and (max-width: 1200px){
& vn-horizontal {
.inline-tag {
font-size: 0.6em;
padding: 0.2em
&.empty {
border: 1px solid $main-bg;
}
}
}
& vn-one {
padding-top: 0.2em
}
& vn-two {
white-space: nowrap
}
& .inline-tag {
background-color: $color-white;
display: inline-block;
color: $secondary-font-color;
margin-right: 0.4em;
text-align: center;
font-size: 0.8em;
height: 1.25em;
padding: 0.3em;
width: 5em;
border: 1px solid $secondary-font-color;
}
& .inline-tag.empty {
border: 1px solid $main-bg
}
}

View File

@ -8,7 +8,7 @@ export default class Controller {
}
set label(value) {
let label = this.element.querySelector('vn-label');
label.textContent = this._.instant(value) + ':';
label.textContent = this._.instant(value);
this._label = value;
}
get label() {

View File

@ -3,6 +3,10 @@
vn-label-value > section {
& > vn-label {
color: $secondary-font-color;
&::after {
content: ':';
}
}
& > span {
color: $main-font-color;

View File

@ -1,18 +1,22 @@
<div ng-if="$ctrl.state.current.name === 'home'">
<div ng-if="$ctrl.$state.current.name === 'home'">
<div class="modules">
<a
ng-repeat="mod in ::$ctrl.modules"
ui-sref="{{::mod.route.state}}"
translate-attr="{title: '{{::mod.name}}'}"
translate-attr="::{title: mod.name}"
class="mdl-shadow--4dp">
<vn-icon icon="{{::mod.icon}}"></vn-icon>
<h4 translate>{{::mod.name}}</h4>
<div>
<vn-icon icon="{{::mod.icon || 'photo'}}"></vn-icon>
</div>
<h4 ng-bind-html="$ctrl.getModuleName(mod)"></h4>
<!--
<span
ng-show='mod.keyBind'
vn-tooltip="Ctrl + Alt + {{mod.keyBind}}">
({{::mod.keyBind}})
</span>
<span ng-show='!mod.keyBind'>&nbsp;</span>
-->
</a>
</div>
</div>

View File

@ -3,26 +3,42 @@ import './style.scss';
import keybindings from '../../global-keybindings.yml';
export default class Controller {
constructor(modulesFactory, $state, $translate, $scope) {
constructor(modulesFactory, $state, $translate, $sce) {
this.modules = modulesFactory.getModules();
this.state = $state;
this.$translate = $translate;
this.$scope = $scope;
this.$state = $state;
this._ = $translate;
this.$sce = $sce;
this.keybindings = keybindings;
}
$onInit() {
this.modules.map(module => {
this.modules.map(mod => {
let keyBind = this.keybindings.find(keyBind => {
return keyBind.sref == module.route.state;
return keyBind.sref == mod.route.state;
});
if (keyBind)
module.keyBind = keyBind.key.toUpperCase();
mod.keyBind = keyBind.key.toUpperCase();
});
}
getModuleName(mod) {
let getName = mod => {
let name = this._.instant(mod.name);
let lower = name.toUpperCase();
if (!mod.keyBind) return name;
let index = lower.indexOf(mod.keyBind);
if (index === -1) return name;
let newName = name.substr(0, index);
newName += `<span class="bind-letter">${name.substr(index, 1)}</span>`;
newName += name.substr(index + 1);
return newName;
};
return this.$sce.trustAsHtml(getName(mod));
}
}
Controller.$inject = ['modulesFactory', '$state', '$translate', '$scope'];
Controller.$inject = ['modulesFactory', '$state', '$translate', '$sce'];
ngModule.component('vnHome', {
template: require('./home.html'),

View File

@ -15,6 +15,8 @@ vn-home {
flex-direction: row;
justify-content: center;
flex-wrap: wrap;
max-width: 40em;
margin: 0 auto;
& > a {
@extend %clickable-light;
@ -30,18 +32,17 @@ vn-home {
padding: 1em;
justify-content: center;
& > vn-icon {
font-size: 4em;
}
& > div {
height: 70px;
display: flex;
align-items: center;
justify-content: center;
& > vn-icon i[class="material-icons"] {
line-height: 75px;
& > vn-icon {
display: block;
font-size: 3.5em;
}
}
& > vn-icon, & > vn-icon i, & > vn-icon i::before {
max-height: 75px;
}
& > span {
font-size: 0.9em;
text-align: center;
@ -53,6 +54,11 @@ vn-home {
white-space: nowrap;
overflow: hidden;
color: white;
margin: 0;
& > .bind-letter {
color: #FD0;
}
}
}
}

View File

@ -22,7 +22,7 @@
<vn-menu vn-id="apps-menu">
<ul pad-small>
<li ng-repeat="mod in ::$ctrl.modules" ui-sref="{{::mod.route.state}}">
<vn-icon icon="{{::mod.icon}}"></vn-icon>
<vn-icon icon="{{::mod.icon || 'photo'}}"></vn-icon>
<span translate>{{::mod.name}}</span>
</li>
</ul>

View File

@ -4,9 +4,8 @@ function modulesFactory(aclService) {
function getMainRoute(routeCollection) {
let cant = routeCollection.length;
for (let i = 0; i < cant; i++) {
if (!routeCollection[i].abstract) {
if (!routeCollection[i].abstract)
return routeCollection[i];
}
}
return null;
}
@ -16,7 +15,7 @@ function modulesFactory(aclService) {
for (let file in window.routes) {
let card = {
name: routes[file].name || routes[file].module,
icon: routes[file].icon || ''
icon: routes[file].icon || null
};
let mainRoute = getMainRoute(window.routes[file].routes);
if (mainRoute && aclService.routeHasPermission(mainRoute)) {

View File

@ -1,18 +1,64 @@
@import "./colors";
@import "./margin";
@import "./padding";
.summary{
h5:not(.title) {
padding: 7px;
background-color: $main-01-03;
border-bottom: 2px solid $main-01;
font-family: unset !important;
text-transform: uppercase;
}
.title, p.title {
border: none;
background: $main-01;
color: $color-white;
margin: 0!important;
.summary {
margin: 0 auto;
max-width: 950px;
& > div {
& > h5 {
@extend .pad-small;
border: none;
background: $main-01;
color: $color-white;
margin: 0;
text-align: center;
line-height: 1.3em;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
& > vn-horizontal {
flex-wrap: wrap;
@extend .pad-medium;
h4 {
@extend .margin-medium-bottom;
text-transform: uppercase;
font-size: 15pt;
line-height: 1;
padding: 7px;
padding-bottom: 4px; /* Bottom line-height fix */
font-family: unset;
background-color: $main-01-03;
border-bottom: .1em solid $main-01;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
& > * {
@extend .margin-small;
min-width: 14em;
overflow: hidden;
padding: 0;
}
& > vn-auto {
width: 100%;
}
vn-label-value > section {
margin-bottom: .3em;
& > vn-label {
display: block;
font-size: .9em;
&::after {
content: initial;
}
}
}
}
}
p:after {
content: ' ';
@ -20,42 +66,50 @@
display: block;
clear: both
}
}
vn-label-value > section {
margin-bottom: .3em
.vn-dialog.dialog-summary {
vn-card {
border: none;
box-shadow: none;
}
& > div > button.close {
display: none;
}
& > div {
padding: 0
}
tpl-body {
width: auto;
}
.buttons {
display: none;
}
vn-check label span {
font-size: .9em
}
}
.state {
@extend .summary;
padding: 5px;
background-color: $main-01;
vn-one:nth-child(1){
border-right: 1px solid white;
}
color: white;
p {
font-size: 12px;
line-height: 15px!important;
padding: 0 0 2px 0;
}
h5 {
line-height: 10px!important;
font-size: 13px;
line-height: 15px;
text-align: center;
margin: .1em 0;
&:nth-child(1) {
text-transform: uppercase;
}
}
vn-one {
padding: 0;
}
vn-one > h5{
padding-bottom: 7px;
}
}
vn-item-descriptor .state{
@extend .state;
vn-one > p{
padding-top: 5px;
}
vn-one > h5{
padding-bottom: 12px;
&:nth-child(1) {
border-right: .1em solid white;
}
}
}

View File

@ -26,5 +26,6 @@
"Warehouse cannot be blank": "Warehouse cannot be blank",
"Agency cannot be blank": "Agency cannot be blank",
"The IBAN does not have the correct format": "The IBAN does not have the correct format",
"You can't make changes on the basic data of an confirmed order or with rows": "You can't make changes on the basic data of an confirmed order or with rows"
"You can't make changes on the basic data of an confirmed order or with rows": "You can't make changes on the basic data of an confirmed order or with rows",
"You can't create a ticket for a inactive client": "You can't create a ticket for a inactive client"
}

View File

@ -1,167 +1,162 @@
<vn-vertical vn-one>
<vn-card class="summary" pad-medium compact>
<vn-vertical margin-medium>
<vn-auto>
<h5 text-center pad-small-v class="title">{{$ctrl.summary.claim.id}} - {{$ctrl.summary.claim.client.name}}</h5>
</vn-auto>
<vn-horizontal pad-medium-v>
<vn-one>
<vn-label-value label="Created"
value="{{$ctrl.summary.claim.created | dateTime: 'dd/MM/yyyy'}}">
</vn-label-value>
<vn-label-value label="State"
value="{{$ctrl.summary.claim.claimState.description}}">
</vn-label-value>
<vn-label-value label="Salesperson"
value="{{$ctrl.summary.claim.client.salesPerson.firstName}} {{$ctrl.summary.claim.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Attended by"
value="{{$ctrl.summary.claim.worker.firstName}} {{$ctrl.summary.claim.worker.name}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-textarea
vn-three
disabled="true"
label="Observation"
model="$ctrl.summary.claim.observation">
</vn-textarea>
</vn-one>
<vn-one>
<vn-input-range
vn-one
disabled="true"
label="Responsability"
value="$ctrl.summary.claim.responsibility"
max="5"
min="1"
step="1"
vn-acl="salesAssistant">
</vn-input-range>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one margin-medium-v>
<h5 translate>Detail</h5>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
<vn-th number>Landed</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th number>Claimed</vn-th>
<vn-th number>Description</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Disc.</vn-th>
<vn-th number>Total</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="saleClaimed in $ctrl.summary.salesClaimed">
<vn-td number>
<span
ng-click="$ctrl.showDescriptor($event, saleClaimed.sale.itemFk)"
pointer class="link">
{{("000000"+saleClaimed.sale.itemFk).slice(-6)}}
</span>
</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.quantity}}</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.discount}} %</vn-td>
<vn-td number>
{{::(saleClaimed.sale.quantity * saleClaimed.sale.price) -
((saleClaimed.sale.discount *
(saleClaimed.sale.quantity * saleClaimed.sale.price))/100) | currency:'€':2
}}
</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one margin-medium-v>
<h5 translate>Development</h5>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Reason</vn-th>
<vn-th number>Result</vn-th>
<vn-th number>Responsible</vn-th>
<vn-th number>Worker</vn-th>
<vn-th number>Redelivery</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="development in $ctrl.summary.developments">
<vn-td number>{{::development.claimReason.description}}</vn-td>
<vn-td number>{{::development.claimResult.description}}</vn-td>
<vn-td number>{{::development.claimResponsible.description}}</vn-td>
<vn-td number>{{::development.worker.firstName}}</vn-td>
<vn-td number>{{::development.claimRedelivery.description}}</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one margin-medium-v>
<h5 translate>Action</h5>
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
<vn-th number>Destination</vn-th>
<vn-th number>Landed</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th number>Description</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Disc.</vn-th>
<vn-th number>Total</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="action in $ctrl.summary.actions">
<vn-td number>
<span
ng-click="$ctrl.showDescriptor($event, action.sale.itemFk)"
pointer class="link">
{{("000000"+action.sale.itemFk).slice(-6)}}
</span>
</vn-td>
<vn-td number>{{::action.sale.id}}</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.quantity}}</vn-td>
<vn-td number>{{::action.sale.concept}}</vn-td>
<vn-td number>{{::action.sale.price}}</vn-td>
<vn-td number>{{::action.sale.discount}} %</vn-td>
<vn-td number>
{{::(action.sale.quantity * action.sale.price) -
((action.sale.discount *
(action.sale.quantity * action.sale.price))/100) | currency:'€':2
}}
</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</vn-one>
</vn-horizontal>
</vn-vertical>
</vn-card>
</vn-vertical>
<vn-item-descriptor-popover vn-id="descriptor"
quicklinks="$ctrl.quicklinks">
<vn-card class="summary">
<h5>{{$ctrl.summary.claim.id}} - {{$ctrl.summary.claim.client.name}}</h5>
<vn-horizontal>
<vn-one>
<vn-label-value label="Created"
value="{{$ctrl.summary.claim.created | dateTime: 'dd/MM/yyyy'}}">
</vn-label-value>
<vn-label-value label="State"
value="{{$ctrl.summary.claim.claimState.description}}">
</vn-label-value>
<vn-label-value label="Salesperson"
value="{{$ctrl.summary.claim.client.salesPerson.firstName}} {{$ctrl.summary.claim.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Attended by"
value="{{$ctrl.summary.claim.worker.firstName}} {{$ctrl.summary.claim.worker.name}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-textarea
vn-three
disabled="true"
label="Observation"
model="$ctrl.summary.claim.observation">
</vn-textarea>
</vn-one>
<vn-one>
<vn-input-range
vn-one
disabled="true"
label="Responsability"
value="$ctrl.summary.claim.responsibility"
max="5"
min="1"
step="1"
vn-acl="salesAssistant">
</vn-input-range>
</vn-one>
<vn-auto>
<h4 translate>Detail</h4>
<div style="overflow: auto">
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
<vn-th>Landed</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th number>Claimed</vn-th>
<vn-th>Description</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Disc.</vn-th>
<vn-th number>Total</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="saleClaimed in $ctrl.summary.salesClaimed">
<vn-td number>
<span
ng-click="$ctrl.showDescriptor($event, saleClaimed.sale.itemFk)"
pointer class="link">
{{("000000"+saleClaimed.sale.itemFk).slice(-6)}}
</span>
</vn-td>
<vn-td>{{saleClaimed.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
<vn-td number>{{saleClaimed.sale.quantity}}</vn-td>
<vn-td number>{{saleClaimed.quantity}}</vn-td>
<vn-td>{{saleClaimed.sale.concept}}</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.quantity * saleClaimed.sale.price) -
((saleClaimed.sale.discount *
(saleClaimed.sale.quantity * saleClaimed.sale.price))/100) | currency:'€':2
}}
</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</div>
</vn-auto>
<vn-auto>
<h4 translate>Development</h4>
<div style="overflow: auto">
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th>Reason</vn-th>
<vn-th>Result</vn-th>
<vn-th>Responsible</vn-th>
<vn-th>Worker</vn-th>
<vn-th>Redelivery</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="development in $ctrl.summary.developments">
<vn-td>{{development.claimReason.description}}</vn-td>
<vn-td>{{development.claimResult.description}}</vn-td>
<vn-td>{{development.claimResponsible.description}}</vn-td>
<vn-td>{{development.worker.firstName}}</vn-td>
<vn-td>{{development.claimRedelivery.description}}</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</div>
</vn-auto>
<vn-auto>
<h4 translate>Action</h4>
<div style="overflow: auto">
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
<vn-th number>Destination</vn-th>
<vn-th number>Landed</vn-th>
<vn-th number>Quantity</vn-th>
<vn-th number>Description</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Disc.</vn-th>
<vn-th number>Total</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr ng-repeat="action in $ctrl.summary.actions">
<vn-td number>
<span
ng-click="$ctrl.showDescriptor($event, action.sale.itemFk)"
pointer class="link">
{{("000000"+action.sale.itemFk).slice(-6)}}
</span>
</vn-td>
<vn-td number>{{action.sale.id}}</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.quantity}}</vn-td>
<vn-td number>{{action.sale.concept}}</vn-td>
<vn-td number>{{action.sale.price}}</vn-td>
<vn-td number>{{action.sale.discount}} %</vn-td>
<vn-td number>
{{(action.sale.quantity * action.sale.price) -
((action.sale.discount *
(action.sale.quantity * action.sale.price))/100) | currency:'€':2
}}
</vn-td>
</vn-tr>
</vn-tbody>
<vn-empty-rows ng-if="model.data.length === 0" translate>
No results
</vn-empty-rows>
</vn-table>
</div>
</vn-auto>
</vn-horizontal>
</vn-card>
<vn-item-descriptor-popover
vn-id="descriptor"
quicklinks="$ctrl.quicklinks">
</vn-item-descriptor-popover>

View File

@ -33,7 +33,7 @@ List: Listado
New client: Nuevo cliente
Summary: Vista previa
Basic data: Datos básicos
Fiscal data: Datos Fiscales
Fiscal data: Datos fiscales
Pay method: Forma de pago
Addresses: Consignatarios
New address: Nuevo consignatario

View File

@ -1,208 +1,195 @@
<vn-vertical vn-one>
<vn-card class="summary" pad-medium>
<vn-vertical margin-medium>
<vn-auto>
<h5 text-center pad-small-v class="title">{{$ctrl.summary.name}} - {{$ctrl.summary.id}} - {{$ctrl.summary.salesPerson.firstName}} {{$ctrl.summary.salesPerson.name}}</h5>
</vn-auto>
<vn-horizontal vn-one>
<vn-one margin-medium>
<h5 translate>Basic data</h5>
<vn-label-value label="Id"
value="{{$ctrl.summary.id}}">
</vn-label-value>
<vn-label-value label="Comercial Name"
value="{{$ctrl.summary.name}}">
</vn-label-value>
<vn-label-value label="Contact"
value="{{$ctrl.summary.contact}}">
</vn-label-value>
<vn-label-value label="Phone"
value="{{$ctrl.summary.phone}}">
</vn-label-value>
<vn-label-value label="Mobile"
value="{{$ctrl.summary.mobile}}">
</vn-label-value>
<vn-label-value label="Email" ellipsize="false"
value="{{$ctrl.summary.email}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.summary.salesPerson.firstName}} {{$ctrl.summary.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Channel"
value="{{$ctrl.summary.contactChannel.name}}">
</vn-label-value>
</vn-one>
<vn-one margin-medium>
<h5 translate>Fiscal data</h5>
<vn-label-value label="Social name"
value="{{$ctrl.summary.socialName}}">
</vn-label-value>
<vn-label-value label="NIF / CIF"
value="{{$ctrl.summary.fi}}">
</vn-label-value>
<vn-label-value label="Street" ellipsize="false"
value="{{$ctrl.summary.street}}">
</vn-label-value>
<vn-label-value label="City"
value="{{$ctrl.summary.city}}">
</vn-label-value>
<vn-label-value label="Postcode"
value="{{$ctrl.summary.postcode}}">
</vn-label-value>
<vn-label-value label="Province"
value="{{$ctrl.summary.province.name}}">
</vn-label-value>
<vn-label-value label="Country"
value="{{$ctrl.summary.country.country}}">
</vn-label-value>
<vn-vertical>
<vn-check vn-one
label="Is equalizated"
field="$ctrl.summary.isEqualizated"
disabled="true">
</vn-check>
<vn-check vn-one
label="Active"
field="$ctrl.summary.isActive"
disabled="true">
</vn-check>
<vn-check vn-one
label="Invoice by address"
field="$ctrl.summary.hasToInvoiceByAddress"
disabled="true">
</vn-check>
<vn-check vn-one
label="Verified data"
field="$ctrl.summary.isTaxDataChecked"
disabled="true">
</vn-check>
<vn-check vn-one
label="Has to invoice"
field="$ctrl.summary.hasToInvoice"
disabled="true">
</vn-check>
<vn-check vn-one
label="Invoice by mail"
field="$ctrl.summary.isToBeMailed"
disabled="true">
</vn-check>
<vn-check vn-one
label="Vies"
field="$ctrl.summary.isVies"
disabled="true">
</vn-check>
</vn-vertical>
</vn-one>
<vn-one margin-medium>
<h5 translate>Pay method</h5>
<vn-label-value label="Pay method"
value="{{$ctrl.summary.payMethod.name}}">
</vn-label-value>
<vn-label-value label="IBAN"
value="{{$ctrl.summary.iban}}">
</vn-label-value>
<vn-label-value label="Due day"
value="{{$ctrl.summary.dueDay}}">
</vn-label-value>
<vn-vertical>
<vn-check vn-one
label="Received LCR"
field="$ctrl.summary.hasLcr"
disabled="true">
</vn-check>
<vn-check vn-one
label="Received core VNL"
field="$ctrl.summary.hasCoreVnl"
disabled="true">
</vn-check>
<vn-check vn-one
label="Received B2B VNL"
field="$ctrl.summary.hasSepaVnl"
disabled="true">
</vn-check>
</vn-vertical>
</vn-one>
</vn-horizontal>
<vn-horizontal vn-one>
<vn-one margin-medium>
<h5 translate>Default address</h5>
<vn-label-value label="Name"
value="{{$ctrl.summary.addresses[0].nickname}}">
</vn-label-value>
<vn-label-value label="Street" ellipsize="false"
value="{{$ctrl.summary.addresses[0].street}}">
</vn-label-value>
<vn-label-value label="City"
value="{{$ctrl.summary.addresses[0].city}}">
</vn-label-value>
</vn-one>
<vn-one margin-medium>
<h5 translate>Web access</h5>
<vn-label-value label="User"
value="{{$ctrl.summary.account.name}}">
</vn-label-value>
<vn-vertical>
<vn-check vn-one
label="Enable web access"
field="$ctrl.summary.account.active"
disabled="true">
</vn-check>
</vn-vertical>
</vn-one>
<vn-one margin-medium>
<h5 translate>Business data</h5>
<vn-label-value label="Total greuge"
value="{{$ctrl.summary.totalGreuge | currency:'€ ':2}}">
</vn-label-value>
<vn-label-value label="Mana"
value="{{$ctrl.summary.mana.mana | currency:'€ ':2}}">
</vn-label-value>
<vn-label-value label="Rate"
value="{{$ctrl.summary.claimsRatio[0].priceIncreasing | percentage}}">
</vn-label-value>
<vn-label-value label="Average invoiced"
value="{{$ctrl.summary.averageInvoiced.invoiced | currency:'€ ':2}}">
</vn-label-value>
<vn-label-value label="Claims"
value="{{$ctrl.summary.claimsRatio[0].claimingRate | percentage}}">
</vn-label-value>
</vn-one>
<vn-one margin-medium>
<h5 translate>Financial information</h5>
<vn-label-value label="Risk"
value="{{$ctrl.summary.debt.debt | currency:'€ ':2}}"
ng-class="{bold: $ctrl.summary.debt.debt > $ctrl.summary.credit}">
</vn-label-value>
<vn-label-value label="Credit"
value="{{$ctrl.summary.credit | currency:'€ ':2 }} "
ng-class="{bold: $ctrl.summary.credit > $ctrl.summary.creditInsurance ||
($ctrl.summary.credit && $ctrl.summary.creditInsurance == null)}">
</vn-label-value>
<vn-label-value label="Secured credit"
value="{{$ctrl.summary.creditInsurance | currency:'€ ':2}} ({{$ctrl.summary.classifications[0].insurances[0].grade}})">
</vn-label-value>
<vn-label-value label="Balance"
value="{{$ctrl.summary.sumRisk | currency:'€ ':2}}">
</vn-label-value>
<vn-label-value label="Balance due"
value="{{$ctrl.summary.defaulters[0].amount | currency:'€ ':2}}"
ng-class="{bold: $ctrl.summary.defaulters[0].amount}">
</vn-label-value>
<vn-vertical ng-if="$ctrl.summary.recovery.started">
<vn-label-value label="Recovery since"
value="{{$ctrl.summary.recovery.started | date:'dd/MM/yyyy'}}">
</vn-label-value>
</vn-vertical>
</vn-one>
</vn-horizontal>
<vn-card class="summary">
<h5>{{$ctrl.summary.name}} - {{$ctrl.summary.id}} - {{$ctrl.summary.salesPerson.firstName}} {{$ctrl.summary.salesPerson.name}}</h5>
<vn-horizontal>
<vn-one>
<h4 translate>Basic data</h4>
<vn-label-value label="Id"
value="{{$ctrl.summary.id}}">
</vn-label-value>
<vn-label-value label="Comercial Name"
value="{{$ctrl.summary.name}}">
</vn-label-value>
<vn-label-value label="Contact"
value="{{$ctrl.summary.contact}}">
</vn-label-value>
<vn-label-value label="Phone"
value="{{$ctrl.summary.phone}}">
</vn-label-value>
<vn-label-value label="Mobile"
value="{{$ctrl.summary.mobile}}">
</vn-label-value>
<vn-label-value label="Email" ellipsize="false"
value="{{$ctrl.summary.email}}">
</vn-label-value>
<vn-label-value label="Sales person"
value="{{$ctrl.summary.salesPerson.firstName}} {{$ctrl.summary.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Channel"
value="{{$ctrl.summary.contactChannel.name}}">
</vn-label-value>
</vn-one>
<vn-one>
<h4 translate>Fiscal address</h4>
<vn-label-value label="Social name"
value="{{$ctrl.summary.socialName}}">
</vn-label-value>
<vn-label-value label="NIF / CIF"
value="{{$ctrl.summary.fi}}">
</vn-label-value>
<vn-label-value label="Street" ellipsize="false"
value="{{$ctrl.summary.street}}">
</vn-label-value>
<vn-label-value label="City"
value="{{$ctrl.summary.city}}">
</vn-label-value>
<vn-label-value label="Postcode"
value="{{$ctrl.summary.postcode}}">
</vn-label-value>
<vn-label-value label="Province"
value="{{$ctrl.summary.province.name}}">
</vn-label-value>
<vn-label-value label="Country"
value="{{$ctrl.summary.country.country}}">
</vn-label-value>
</vn-one>
<vn-one>
<h4 translate>Fiscal data</h4>
<vn-vertical>
<vn-check
label="Is equalizated"
field="$ctrl.summary.isEqualizated"
disabled="true">
</vn-check>
<vn-check
label="Active"
field="$ctrl.summary.isActive"
disabled="true">
</vn-check>
<vn-check
label="Invoice by address"
field="$ctrl.summary.hasToInvoiceByAddress"
disabled="true">
</vn-check>
<vn-check
label="Verified data"
field="$ctrl.summary.isTaxDataChecked"
disabled="true">
</vn-check>
<vn-check
label="Has to invoice"
field="$ctrl.summary.hasToInvoice"
disabled="true">
</vn-check>
<vn-check
label="Invoice by mail"
field="$ctrl.summary.isToBeMailed"
disabled="true">
</vn-check>
<vn-check
label="Vies"
field="$ctrl.summary.isVies"
disabled="true">
</vn-check>
</vn-vertical>
</vn-one>
<vn-one>
<h4 translate>Pay method</h4>
<vn-label-value label="Pay method"
value="{{$ctrl.summary.payMethod.name}}">
</vn-label-value>
<vn-label-value label="IBAN"
value="{{$ctrl.summary.iban}}">
</vn-label-value>
<vn-label-value label="Due day"
value="{{$ctrl.summary.dueDay}}">
</vn-label-value>
<vn-vertical>
<vn-check
label="Received LCR"
field="$ctrl.summary.hasLcr"
disabled="true">
</vn-check>
<vn-check
label="Received core VNL"
field="$ctrl.summary.hasCoreVnl"
disabled="true">
</vn-check>
<vn-check
label="Received B2B VNL"
field="$ctrl.summary.hasSepaVnl"
disabled="true">
</vn-check>
</vn-vertical>
</vn-one>
<vn-one>
<h4 translate>Default address</h4>
<vn-label-value label="Name"
value="{{$ctrl.summary.addresses[0].nickname}}">
</vn-label-value>
<vn-label-value label="Street" ellipsize="false"
value="{{$ctrl.summary.addresses[0].street}}">
</vn-label-value>
<vn-label-value label="City"
value="{{$ctrl.summary.addresses[0].city}}">
</vn-label-value>
</vn-one>
<vn-one>
<h4 translate>Web access</h4>
<vn-label-value label="User"
value="{{$ctrl.summary.account.name}}">
</vn-label-value>
<vn-vertical>
<vn-check
label="Enable web access"
field="$ctrl.summary.account.active"
disabled="true">
</vn-check>
</vn-vertical>
</vn-one>
<vn-one>
<h4 translate>Business data</h4>
<vn-label-value label="Total greuge"
value="{{$ctrl.summary.totalGreuge | currency:'€':2}}">
</vn-label-value>
<vn-label-value label="Mana"
value="{{$ctrl.summary.mana.mana | currency:'€':2}}">
</vn-label-value>
<vn-label-value label="Rate"
value="{{$ctrl.summary.claimsRatio[0].priceIncreasing | percentage}}">
</vn-label-value>
<vn-label-value label="Average invoiced"
value="{{$ctrl.summary.averageInvoiced.invoiced | currency:'€':2}}">
</vn-label-value>
<vn-label-value label="Claims"
value="{{$ctrl.summary.claimsRatio[0].claimingRate | percentage}}">
</vn-label-value>
</vn-one>
<vn-one>
<h4 translate>Financial information</h4>
<vn-label-value label="Risk"
value="{{$ctrl.summary.debt.debt | currency:'€':2}}"
ng-class="{bold: $ctrl.summary.debt.debt > $ctrl.summary.credit}">
</vn-label-value>
<vn-label-value label="Credit"
value="{{$ctrl.summary.credit | currency:'€':2 }} "
ng-class="{bold: $ctrl.summary.credit > $ctrl.summary.creditInsurance ||
($ctrl.summary.credit && $ctrl.summary.creditInsurance == null)}">
</vn-label-value>
<vn-label-value label="Secured credit"
value="{{$ctrl.summary.creditInsurance | currency:'€':2}} ({{$ctrl.summary.classifications[0].insurances[0].grade}})">
</vn-label-value>
<vn-label-value label="Balance"
value="{{$ctrl.summary.sumRisk | currency:'€':2}}">
</vn-label-value>
<vn-label-value label="Balance due"
value="{{$ctrl.summary.defaulters[0].amount | currency:'€':2}}"
ng-class="{bold: $ctrl.summary.defaulters[0].amount}">
</vn-label-value>
<vn-vertical ng-if="$ctrl.summary.recovery.started">
<vn-label-value label="Recovery since"
value="{{$ctrl.summary.recovery.started | date:'dd/MM/yyyy'}}">
</vn-label-value>
</vn-vertical>
</vn-card>
</vn-vertical>
</vn-one>
</vn-horizontal>
</vn-card>

View File

@ -11,3 +11,4 @@ Balance due: Saldo vencido
Rate: Tarifa
Business data: Datos comerciales
Recovery since: Recobro desde
Fiscal address: Dirección fiscal

View File

@ -1,9 +1,3 @@
vn-dialog {
vn-client-summary vn-one {
min-width: 10em;
}
}
vn-client-summary {
.bold {
font-family: vn-font-bold;

View File

@ -31,16 +31,16 @@
</vn-float-button>
</a>
</vn-auto>
<vn-horizontal class="state">
<vn-one>
<p class="title" uppercase text-center>Visible</p>
<h5 class="title" text-center>{{$ctrl.item.visible}}</h5>
</vn-one>
<vn-one>
<p class="title" uppercase translate text-center>Available</p>
<h5 text-center class="title">{{$ctrl.item.available}}</h5>
</vn-one>
</vn-horizontal>
<vn-horizontal class="state">
<vn-one>
<p translate>Visible</p>
<p>{{$ctrl.item.visible}}</p>
</vn-one>
<vn-one>
<p translate>Available</p>
<p>{{$ctrl.item.available}}</p>
</vn-one>
</vn-horizontal>
<vn-auto pad-medium>
<h5>{{$ctrl.item.id}}</h5>
<vn-label-value label="Name"

View File

@ -1,127 +1,110 @@
<vn-card class="summary">
<vn-vertical pad-medium>
<vn-horizontal>
<vn-auto margin-medium>
<vn-vertical>
<vn-one>
<h5 text-center pad-small-v class="title">{{$ctrl.item.id}}</h5>
</vn-one>
<vn-one>
<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}}" on-error-src/>
</vn-one>
<vn-horizontal class="state">
<vn-one>
<p class="title" uppercase text-center>Visible</p>
<h5 class="title" text-center>{{$ctrl.summary.visible}}</h5>
</vn-one>
<vn-one>
<p class="title" uppercase translate text-center>Available</p>
<h5 text-center class="title">{{$ctrl.summary.available}}</h5>
</vn-one>
</vn-horizontal>
</vn-vertical>
</vn-auto>
<vn-one margin-medium>
<vn-vertical name="basicData">
<h5 translate>Basic data</h5>
<vn-label-value label="Name"
value="{{$ctrl.summary.item.name}}">
</vn-label-value>
<vn-label-value label="Full name"
value="{{$ctrl.summary.item.longName}}">
</vn-label-value>
<vn-label-value label="Type"
value="{{$ctrl.summary.item.itemType.name}}">
</vn-label-value>
<vn-label-value label="Size"
value="{{$ctrl.summary.item.itemType.size}}">
</vn-label-value>
<vn-label-value label="Origin"
value="{{$ctrl.summary.item.origin.name}}">
</vn-label-value>
<vn-label-value label="stems"
value="{{$ctrl.summary.item.origin.stems}}">
</vn-label-value>
<vn-label-value label="Buyer"
value="{{$ctrl.summary.item.itemType.worker.firstName}} {{$ctrl.summary.item.itemType.worker.name}}">
</vn-label-value>
</vn-vertical>
<h5>{{$ctrl.item.id}} - {{$ctrl.summary.item.name}}</h5>
<vn-horizontal>
<vn-one>
<vn-one>
<img style="width: 100%"
ng-src="//verdnatura.es/vn-image-data/catalog/200x200/{{$ctrl.item.image}}"
zoom-image="//verdnatura.es/vn-image-data/catalog/1600x900/{{$ctrl.item.image}}" on-error-src/>
</vn-one>
<vn-one margin-medium>
<vn-vertical name="otherData">
<h5 translate>Other data</h5>
<vn-label-value label="Intrastat code"
value="{{$ctrl.summary.item.intrastat.id}}">
</vn-label-value>
<vn-label-value label="Intrastat"
value="{{$ctrl.summary.item.intrastat.description}}">
</vn-label-value>
<vn-label-value label="Reference"
value="{{$ctrl.summary.item.comment}}">
</vn-label-value>
<vn-label-value label="Relevancy"
value="{{$ctrl.summary.item.relevancy}}">
</vn-label-value>
<vn-label-value label="Density"
value="{{$ctrl.summary.item.density}}">
</vn-label-value>
<vn-label-value label="Compression"
value="{{$ctrl.summary.item.compression}}">
</vn-label-value>
<vn-label-value label="Expence"
value="{{$ctrl.summary.item.expence.name}}">
</vn-label-value>
</vn-one>
<vn-one margin-medium>
<vn-vertical name="tags">
<h5 translate>Tags</h5>
<vn-label-value label="{{tag.priority}} {{tag.tag.name}}" ng-repeat="tag in $ctrl.summary.tags track by tag.id"
value="{{tag.value}}">
</vn-label-value>
</vn-vertical>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one margin-medium>
<vn-vertical name="tax">
<h5 translate>Tax</h5>
<vn-label-value label="{{tax.country.country}}" ng-repeat="tax in $ctrl.summary.item.taxes"
value="{{tax.taxClass.description}}">
</vn-label-value>
</vn-vertical>
</vn-one>
<vn-one margin-medium>
<vn-vertical name="niche">
<h5 translate>Niche</h5>
<vn-label-value label="{{niche.warehouse.name}}" ng-repeat="niche in $ctrl.summary.niches"
value="{{niche.code}}">
</vn-label-value>
</vn-vertical>
</vn-one>
<vn-one margin-medium>
<vn-vertical name="botanical">
<h5 translate>Botanical</h5>
<vn-label-value label="Botanical"
value="{{$ctrl.summary.botanical.botanical}}">
</vn-label-value>
<vn-label-value label="Genus"
value="{{$ctrl.summary.botanical.genus.latin_genus_name}}">
</vn-label-value>
<vn-label-value label="Specie"
value="{{$ctrl.summary.botanical.specie.latin_species_name}}">
</vn-label-value>
</vn-vertical>
</vn-one>
<vn-one margin-medium>
<vn-vertical name="barcode">
<h5 translate>Barcode</h5>
<p ng-repeat="barcode in $ctrl.summary.item.itemBarcode track by $index">
<b>{{barcode.code}}</b>
</p>
</vn-vertical>
</vn-one>
</vn-horizontal>
</vn-vertical>
<vn-horizontal class="state">
<vn-one>
<p translate>Visible</p>
<p>{{$ctrl.summary.visible}}</p>
</vn-one>
<vn-one>
<p translate>Available</p>
<p>{{$ctrl.summary.available}}</p>
</vn-one>
</vn-horizontal>
</vn-one>
<vn-one name="basicData">
<h4 translate>Basic data</h4>
<vn-label-value label="Name"
value="{{$ctrl.summary.item.name}}">
</vn-label-value>
<vn-label-value label="Full name"
value="{{$ctrl.summary.item.longName}}">
</vn-label-value>
<vn-label-value label="Type"
value="{{$ctrl.summary.item.itemType.name}}">
</vn-label-value>
<vn-label-value label="Size"
value="{{$ctrl.summary.item.itemType.size}}">
</vn-label-value>
<vn-label-value label="Origin"
value="{{$ctrl.summary.item.origin.name}}">
</vn-label-value>
<vn-label-value label="stems"
value="{{$ctrl.summary.item.origin.stems}}">
</vn-label-value>
<vn-label-value label="Buyer"
value="{{$ctrl.summary.item.itemType.worker.firstName}} {{$ctrl.summary.item.itemType.worker.name}}">
</vn-label-value>
</vn-one>
<vn-one name="otherData">
<h4 translate>Other data</h4>
<vn-label-value label="Intrastat code"
value="{{$ctrl.summary.item.intrastat.id}}">
</vn-label-value>
<vn-label-value label="Intrastat"
value="{{$ctrl.summary.item.intrastat.description}}">
</vn-label-value>
<vn-label-value label="Reference"
value="{{$ctrl.summary.item.comment}}">
</vn-label-value>
<vn-label-value label="Relevancy"
value="{{$ctrl.summary.item.relevancy}}">
</vn-label-value>
<vn-label-value label="Density"
value="{{$ctrl.summary.item.density}}">
</vn-label-value>
<vn-label-value label="Compression"
value="{{$ctrl.summary.item.compression}}">
</vn-label-value>
<vn-label-value label="Expence"
value="{{$ctrl.summary.item.expence.name}}">
</vn-label-value>
</vn-one>
<vn-one name="tags">
<h4 translate>Tags</h4>
<vn-label-value
label="{{tag.priority}} {{tag.tag.name}}"
ng-repeat="tag in $ctrl.summary.tags.slice(3, 6) track by tag.id"
value="{{tag.value}}">
</vn-label-value>
</vn-one>
<vn-one name="tax">
<h4 translate>Tax</h4>
<vn-label-value label="{{tax.country.country}}"
ng-repeat="tax in $ctrl.summary.item.taxes"
value="{{tax.taxClass.description}}">
</vn-label-value>
</vn-one>
<vn-one name="niche">
<h4 translate>Niche</h4>
<vn-label-value label="{{niche.warehouse.name}}"
ng-repeat="niche in $ctrl.summary.niches"
value="{{niche.code}}">
</vn-label-value>
</vn-one>
<vn-one name="botanical">
<h4 translate>Botanical</h4>
<vn-label-value label="Botanical"
value="{{$ctrl.summary.botanical.botanical}}">
</vn-label-value>
<vn-label-value label="Genus"
value="{{$ctrl.summary.botanical.genus.latin_genus_name}}">
</vn-label-value>
<vn-label-value label="Specie"
value="{{$ctrl.summary.botanical.specie.latin_species_name}}">
</vn-label-value>
</vn-one>
<vn-one name="barcode">
<h4 translate>Barcode</h4>
<p ng-repeat="barcode in $ctrl.summary.item.itemBarcode track by $index">
<b>{{barcode.code}}</b>
</p>
</vn-one>
</vn-horizontal>
</vn-card>

View File

@ -1,5 +1,5 @@
vn-item-summary {
p{
p {
margin: 0;
}
}

View File

@ -10,9 +10,10 @@ class Controller {
this.$translate = $translate;
this.moreOptions = [
{callback: this.showAddTurnDialog, name: 'Add turn', show: true},
{callback: this.showDeleteTicketDialog, name: 'Delete ticket', show: true},
{callback: this.showDeleteTicketDialog, name: 'Delete ticket', show: true}/* ,
{callback: this.showAddStowaway, name: 'Add stowaway', show: true},
{callback: this.showRemoveStowaway, name: 'Remove stowaway', show: () => this.shouldShowRemoveStowaway()}
{callback: this.showRemoveStowaway, name: 'Remove stowaway', show: false}
*/
];
}
@ -109,8 +110,7 @@ class Controller {
tooltip: 'Ship'
};
}
console.log(value.ship);
/*
if (value.ship.length == 1) {
links.btnThree = {
icon: 'icon-polizon',
@ -119,7 +119,7 @@ class Controller {
};
} else if (value.ship.length > 1)
this.shipStowaways = value.ship;
*/
this._quicklinks = links;
}

View File

@ -70,18 +70,14 @@
</vn-pagination>
</div>
<a ui-sref="order.create" vn-bind="+" vn-tooltip="New order" fixed-bottom-right>
<vn-float-button icon="add"></vn-float-button>
<vn-float-button icon="add"></vn-float-button>
</a>
<vn-client-descriptor-popover vn-id="descriptor"></vn-client-descriptor-popover>
<vn-dialog class="dialog-summary"
vn-id="order-summary-dialog">
<tpl-body>
<vn-order-summary order="$ctrl.order"></vn-order-summary>
</tpl-body>
</vn-dialog>
<vn-client-descriptor-popover
vn-id="descriptor">
</vn-client-descriptor-popover>
<vn-dialog
vn-id="summary"
class="dialog-summary summary">
class="dialog-summary">
<tpl-body>
<vn-order-summary order="$ctrl.selectedOrder"></vn-order-summary>
</tpl-body>

View File

@ -1,52 +1,45 @@
<vn-card class="summary ticketSummary" pad-medium>
<vn-vertical margin-medium>
<vn-card class="summary">
<h5>{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} - {{$ctrl.summary.client.salesPerson.id}}</h5>
<vn-horizontal class="ticketSummary__data">
<vn-one>
<vn-label-value label="Id"
value="{{$ctrl.summary.id}}">
</vn-label-value>
<vn-label-value label="Nickname"
value="{{$ctrl.summary.address.nickname}}">
</vn-label-value>
<vn-label-value label="Confirmed"
value="{{$ctrl.summary.isConfirmed}}">
</vn-label-value>
<vn-label-value label="Warehouse"
value="{{$ctrl.summary.sourceApp}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value label="Created"
value="{{$ctrl.summary.created | date: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value>
<vn-label-value label="Confirmed"
value="{{$ctrl.summary.confirmed | date: 'dd/MM/yyyy'}}">
</vn-label-value>
<vn-label-value label="Address"
value="{{$ctrl.formattedAddress}}">
<vn-label-value label="Phone"
value="{{$ctrl.summary.address.phone}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value label="{{'Notes'}}"
value="{{$ctrl.summary.note}}">
</vn-label-value>
</vn-one>
<vn-one class="taxes">
<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><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency:' €':2}}</strong></p>
</vn-one>
<vn-auto>
<h5 text-center pad-small-v class="title">{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} - {{$ctrl.summary.client.salesPerson.id}}</h5>
</vn-auto>
<vn-horizontal class="ticketSummary__data" pad-medium-v>
<vn-one>
<vn-label-value label="Id"
value="{{$ctrl.summary.id}}">
</vn-label-value>
<vn-label-value label="Nickname"
value="{{$ctrl.summary.address.nickname}}">
</vn-label-value>
<vn-label-value label="Confirmed"
value="{{$ctrl.summary.isConfirmed}}">
</vn-label-value>
<vn-label-value label="Warehouse"
value="{{$ctrl.summary.sourceApp}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value label="Created"
value="{{$ctrl.summary.created | date: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value>
<vn-label-value label="Confirmed"
value="{{$ctrl.summary.confirmed | date: 'dd/MM/yyyy'}}">
</vn-label-value>
<vn-label-value label="Address"
value="{{$ctrl.formattedAddress}}">
<vn-label-value label="Phone"
value="{{$ctrl.summary.address.phone}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value label="{{'Notes'}}"
value="{{$ctrl.summary.note}}">
</vn-label-value>
</vn-one>
<vn-one class="ticketSummary__taxes">
<section>
<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><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency:' €':2}}</strong></p>
</section>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<div style="overflow: auto">
<table class="vn-grid">
<thead>
<tr>
@ -86,9 +79,11 @@
</tr>
</tbody>
</table>
</vn-horizontal>
</vn-vertical>
</div>
</vn-auto>
</vn-horizontal>
</vn-card>
<vn-item-descriptor-popover vn-id="descriptor"
<vn-item-descriptor-popover
vn-id="descriptor"
quicklinks="$ctrl.quicklinks">
</vn-item-descriptor-popover>

View File

@ -1,31 +1,14 @@
vn-dialog {
vn-order-summary vn-one {
min-width: 10em;
}
}
vn-order-summary .summary > div > vn-horizontal > vn-one {
min-width: 10em !important;
.ticketSummary {
.ticketSummary__data {
vn-one {
padding-right: 20px
}
&.taxes {
border: .1em solid #CCC;
text-align: right;
padding: .5em !important;
vn-one:last-child {
padding-right: 0
}
}
.ticketSummary__notes {
max-width: 18em
}
.ticketSummary__taxes {
max-width: 15em;
& section {
border: 1px solid #CCC;
text-align: right;
padding: 10px
& > p {
font-size: 1.2em;
margin: .2em;
}
}
}

View File

@ -7,9 +7,9 @@ class Controller {
this.filter = {
include: [
{relation: 'warehouse', scope: {fields: ['name']}},
{relation: 'ship'},
// {relation: 'ship'},
{relation: 'agencyMode', scope: {fields: ['name']}},
{relation: 'stowaway'},
// {relation: 'stowaway'},
{
relation: 'client',
scope: {

View File

@ -1,59 +1,55 @@
<vn-card class="summary ticketSummary" pad-medium>
<vn-vertical margin-medium>
<vn-auto>
<h5 text-center pad-small-v class="title">{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} - {{$ctrl.summary.nickname}}</h5>
</vn-auto>
<vn-horizontal class="ticketSummary__data" pad-medium-v>
<vn-one>
<vn-label-value label="State"
value="{{$ctrl.summary.state.state.name}}">
</vn-label-value>
<vn-label-value label="Comercial Name"
value="{{$ctrl.summary.client.salesPerson.firstName}} {{$ctrl.summary.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.summary.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Warehouse"
value="{{$ctrl.summary.warehouse.name}}">
</vn-label-value>
<vn-label-value label="Package size"
value="{{$ctrl.summary.packages}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value label="Shipped"
value="{{$ctrl.summary.shipped | date: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value>
<vn-label-value label="Landed"
value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy'}}">
</vn-label-value>
<vn-label-value label="Route"
value="{{$ctrl.summary.routeFk}}">
</vn-label-value>
<vn-label-value label="Address"
value="{{$ctrl.formattedAddress}}">
</vn-label-value>
<vn-label-value label="Phone"
value="{{$ctrl.summary.address.phone}}">
</vn-label-value>
</vn-one>
<vn-one class="ticketSummary__notes">
<vn-label-value label="{{note.observationType.description}}" ng-repeat="note in $ctrl.summary.notes track by note.id"
value="{{note.description}}">
</vn-label-value>
</vn-one>
<vn-one class="ticketSummary__taxes">
<section>
<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><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency:' €':2}}</strong></p>
</section>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one margin-medium-v>
<h5 translate>Sale</h5>
<vn-card class="summary">
<h5 >{{$ctrl.summary.id}} - {{$ctrl.summary.client.name}} - {{$ctrl.summary.nickname}}</h5>
<vn-horizontal>
<vn-one>
<vn-label-value label="State"
value="{{$ctrl.summary.state.state.name}}">
</vn-label-value>
<vn-label-value label="Comercial Name"
value="{{$ctrl.summary.client.salesPerson.firstName}} {{$ctrl.summary.client.salesPerson.name}}">
</vn-label-value>
<vn-label-value label="Agency"
value="{{$ctrl.summary.agencyMode.name}}">
</vn-label-value>
<vn-label-value label="Warehouse"
value="{{$ctrl.summary.warehouse.name}}">
</vn-label-value>
<vn-label-value label="Package size"
value="{{$ctrl.summary.packages}}">
</vn-label-value>
</vn-one>
<vn-one>
<vn-label-value label="Shipped"
value="{{$ctrl.summary.shipped | date: 'dd/MM/yyyy HH:mm'}}">
</vn-label-value>
<vn-label-value label="Landed"
value="{{$ctrl.summary.landed | date: 'dd/MM/yyyy'}}">
</vn-label-value>
<vn-label-value label="Route"
value="{{$ctrl.summary.routeFk}}">
</vn-label-value>
<vn-label-value label="Address"
value="{{$ctrl.formattedAddress}}">
</vn-label-value>
<vn-label-value label="Phone"
value="{{$ctrl.summary.address.phone}}">
</vn-label-value>
</vn-one>
<vn-one class="notes">
<vn-label-value
label="{{note.observationType.description}}"
ng-repeat="note in $ctrl.summary.notes track by note.id"
value="{{note.description}}">
</vn-label-value>
</vn-one>
<vn-one class="taxes">
<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><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency:' €':2}}</strong></p>
</vn-one>
<vn-auto name="sales">
<h4 translate>Sale</h4>
<div style="overflow: auto">
<table class="vn-grid">
<thead>
<tr>
@ -89,7 +85,7 @@
<span
ng-click="$ctrl.showDescriptor($event, sale.itemFk)"
class="link" pointer>
{{("000000"+sale.itemFk).slice(-6)}}
{{sale.itemFk | zeroFill:6}}
</span>
</td>
<td><vn-fetched-tags max-length="6" item="sale.item"/></td>
@ -103,11 +99,11 @@
</tr>
</tbody>
</table>
</vn-one>
</vn-horizontal>
<vn-horizontal>
<vn-one margin-medium-v ng-if="$ctrl.summary.packagings.length != 0">
<h5 translate>Packages</h5>
</div>
</vn-auto>
<vn-one ng-if="$ctrl.summary.packagings.length != 0">
<h4 translate>Packages</h4>
<div style="overflow: auto">
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -127,9 +123,11 @@
No results
</vn-empty-rows>
</vn-table>
</vn-one>
<vn-one margin-medium ng-if="$ctrl.summary.services.length != 0">
<h5 translate>Service</h5>
</div>
</vn-one>
<vn-one ng-if="$ctrl.summary.services.length != 0">
<h4 translate>Service</h4>
<div style="overflow: auto">
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -153,11 +151,11 @@
No results
</vn-empty-rows>
</vn-table>
</vn-one>
</vn-horizontal>
<vn-horizontal ng-if="$ctrl.summary.requests.length != 0">
<vn-one margin-medium-v>
<h5 translate>Purchase request</h5>
</div>
</vn-one>
<vn-auto ng-if="$ctrl.summary.requests.length != 0">
<h4 translate>Purchase request</h4>
<div style="overflow: auto">
<vn-table model="model">
<vn-thead>
<vn-tr>
@ -199,10 +197,11 @@
No results
</vn-empty-rows>
</vn-table>
</vn-one>
</vn-horizontal>
</vn-vertical>
</div>
</vn-auto>
</vn-card>
<vn-item-descriptor-popover vn-id="descriptor"
<vn-item-descriptor-popover
vn-id="descriptor"
quicklinks="$ctrl.quicklinks">
</vn-item-descriptor-popover>

View File

@ -1,25 +1,14 @@
.ticketSummary {
.ticketSummary__data {
vn-one {
padding-right: 20px
}
vn-ticket-summary .summary > div > vn-horizontal > vn-one {
min-width: 10em !important;
vn-one:last-child {
padding-right: 0
}
}
&.taxes {
border: .1em solid #CCC;
text-align: right;
padding: .5em !important;
.ticketSummary__notes {
max-width: 18em
}
.ticketSummary__taxes {
max-width: 15em;
& section {
border: 1px solid #CCC;
text-align: right;
padding: 10px
& > p {
font-size: 1.2em;
margin: .2em;
}
}
}

View File

@ -1,7 +1,6 @@
{
"module": "travel",
"name": "Travels",
"icon": "icon-travels",
"validations": true,
"routes": [
{