Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into dev
This commit is contained in:
commit
d109e480a9
|
@ -73,17 +73,17 @@ let actions = {
|
|||
},
|
||||
|
||||
changeLanguageToEnglish: function(done) {
|
||||
this.wait('#lang')
|
||||
.evaluate(selector => {
|
||||
return document.querySelector(selector).title;
|
||||
}, '#lang')
|
||||
.then(title => {
|
||||
if (title === 'Change language') {
|
||||
let langSelector = 'vn-user-configuration-popover vn-autocomplete[field="$ctrl.lang"]';
|
||||
|
||||
this.waitToClick('#user')
|
||||
.wait(langSelector)
|
||||
.waitToGetProperty(`${langSelector} input`, 'value')
|
||||
.then(lang => {
|
||||
if (lang === 'English') {
|
||||
this.then(done)
|
||||
.catch(done);
|
||||
} else {
|
||||
this.click('#lang')
|
||||
.click('vn-main-menu [vn-id="langs-menu"] ul > li[name="en"]')
|
||||
this.autocompleteSearch(langSelector, 'English')
|
||||
.then(done)
|
||||
.catch(done);
|
||||
}
|
||||
|
|
|
@ -270,11 +270,11 @@ export default {
|
|||
warehouseAutocomplete: 'vn-item-diary vn-autocomplete[field="$ctrl.warehouseFk"]',
|
||||
},
|
||||
ticketSummary: {
|
||||
sale: 'vn-ticket-summary [name="sales"] table > tbody > tr',
|
||||
firstSaleItemId: 'vn-ticket-summary [name="sales"] table > tbody > tr > td:nth-child(2) > span',
|
||||
sale: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr',
|
||||
firstSaleItemId: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-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)'
|
||||
firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4)',
|
||||
firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)'
|
||||
},
|
||||
ticketsIndex: {
|
||||
newTicketButton: 'vn-ticket-index > a',
|
||||
|
|
|
@ -44,7 +44,7 @@ describe('Claim detail', () => {
|
|||
.waitToGetProperty(selectors.claimDetail.totalClaimed, 'innerText');
|
||||
|
||||
expect(claimedQuantity).toEqual('10');
|
||||
expect(totalClaimed).toEqual('29.50 €');
|
||||
expect(totalClaimed).toContain('29.50');
|
||||
});
|
||||
|
||||
it('should delete the second item from the claim', async() => {
|
||||
|
|
|
@ -65,7 +65,7 @@ describe('Client risk path', () => {
|
|||
|
||||
|
||||
expect(company).toEqual('VNL');
|
||||
expect(firstRiskLineBalance).toEqual('0.00 €');
|
||||
expect(firstRiskLineBalance).toContain('0.00');
|
||||
});
|
||||
|
||||
it('should now click the new payment button', async() => {
|
||||
|
@ -91,7 +91,7 @@ describe('Client risk path', () => {
|
|||
let result = await nightmare
|
||||
.waitToGetProperty(selectors.clientRisk.firstRiskLineBalance, 'innerText');
|
||||
|
||||
expect(result).toEqual('100.00 €');
|
||||
expect(result).toContain('100.00');
|
||||
});
|
||||
|
||||
it('should again click the new payment button', async() => {
|
||||
|
@ -117,7 +117,7 @@ describe('Client risk path', () => {
|
|||
let result = await nightmare
|
||||
.waitToGetProperty(selectors.clientRisk.firstRiskLineBalance, 'innerText');
|
||||
|
||||
expect(result).toEqual('-50.00 €');
|
||||
expect(result).toContain('-€50.00');
|
||||
});
|
||||
|
||||
it('should now click on the Clients button of the top bar menu', async() => {
|
||||
|
|
|
@ -73,7 +73,7 @@ describe('Ticket Edit basic data path', () => {
|
|||
.wait(1900)
|
||||
.waitToGetProperty(selectors.ticketBasicData.stepTwoTotalPriceDif, 'innerText');
|
||||
|
||||
expect(result).toContain('-187.75 €');
|
||||
expect(result).toContain('-€187.75');
|
||||
});
|
||||
|
||||
it(`should then click next to move on to step three`, async() => {
|
||||
|
|
|
@ -11,6 +11,7 @@ import './style.scss';
|
|||
* @property {Array} data Static data for the autocomplete
|
||||
* @property {Object} intialData A initial data to avoid the server request used to get the selection
|
||||
* @property {Boolean} multiple Wether to allow multiple selection
|
||||
* @property {Object} selection Current object selected
|
||||
*
|
||||
* @event change Thrown when value is changed
|
||||
*/
|
||||
|
@ -293,7 +294,7 @@ ngModule.component('vnAutocomplete', {
|
|||
valueField: '@?',
|
||||
initialData: '<?',
|
||||
showFilter: '<?',
|
||||
selection: '<?',
|
||||
selection: '=?',
|
||||
multiple: '<?',
|
||||
data: '<?',
|
||||
url: '@?',
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
icon="remove"
|
||||
ng-click="$ctrl.remove()"
|
||||
tabindex="-1"
|
||||
title="Remove number">
|
||||
translate-attr="{title: 'Remove'}">
|
||||
</vn-icon-button>
|
||||
</div>
|
||||
<div class="infix">
|
||||
|
@ -29,7 +29,7 @@
|
|||
icon="add"
|
||||
ng-click="$ctrl.add()"
|
||||
tabindex="-1"
|
||||
title="Add number">
|
||||
translate-attr="{title: 'Add'}">
|
||||
</vn-icon-button>
|
||||
<i class="material-icons"
|
||||
ng-if="$ctrl.hasInfo"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@import "padding";
|
||||
|
||||
vn-searchbar {
|
||||
padding-top: 6px;
|
||||
display: block;
|
||||
|
@ -6,3 +8,11 @@ vn-searchbar {
|
|||
color: black;
|
||||
}
|
||||
}
|
||||
|
||||
.search-panel {
|
||||
max-height: 44em;
|
||||
|
||||
& > form {
|
||||
@extend .pad-large;
|
||||
}
|
||||
}
|
|
@ -5,15 +5,29 @@ import ngModule from '../module';
|
|||
*
|
||||
* @return {String} The formated number
|
||||
*/
|
||||
export default function currency() {
|
||||
return function(input, symbol, fractionSize) {
|
||||
if (!fractionSize)
|
||||
fractionSize = 2;
|
||||
if (typeof input == 'number' && fractionSize) {
|
||||
input = input.toFixed(fractionSize);
|
||||
return `${input} ${symbol}`;
|
||||
}
|
||||
return undefined;
|
||||
|
||||
export default function currency($translate) {
|
||||
function currency(input, symbol = 'EUR', fractionSize = 2) {
|
||||
let options = {
|
||||
style: 'currency',
|
||||
currency: symbol,
|
||||
minimumFractionDigits: fractionSize,
|
||||
maximumFractionDigits: fractionSize
|
||||
};
|
||||
|
||||
if (typeof input == 'number') {
|
||||
return new Intl.NumberFormat($translate.use(), options)
|
||||
.format(input);
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
currency.$stateful = true;
|
||||
|
||||
return currency;
|
||||
}
|
||||
|
||||
currency.$inject = ['$translate'];
|
||||
|
||||
ngModule.filter('currency', currency);
|
||||
|
|
|
@ -12,28 +12,28 @@ describe('Currency filter', () => {
|
|||
};
|
||||
|
||||
it('should return a ONE decimal number as per the argument', () => {
|
||||
let html = `<div id="test" >{{200 | currency: '€': 1}}</div>`;
|
||||
let html = `<div id="test" >{{200 | currency: 'EUR': 1}}</div>`;
|
||||
compile(html);
|
||||
|
||||
expect($element[0].innerHTML).toEqual('200.0 €');
|
||||
expect($element[0].innerHTML).toContain('200.0');
|
||||
});
|
||||
|
||||
it('should return a TWO decimals number as per the argument', () => {
|
||||
let html = `<div id="test" >{{200 | currency: '€': 2}}</div>`;
|
||||
let html = `<div id="test" >{{200 | currency: 'EUR': 2}}</div>`;
|
||||
compile(html);
|
||||
|
||||
expect($element[0].innerHTML).toEqual('200.00 €');
|
||||
expect($element[0].innerHTML).toContain('200.00');
|
||||
});
|
||||
|
||||
it('should return a TEN decimals number as per the argument', () => {
|
||||
let html = `<div id="test" >{{200 | currency: '€': 10}}</div>`;
|
||||
let html = `<div id="test" >{{200 | currency: 'EUR': 10}}</div>`;
|
||||
compile(html);
|
||||
|
||||
expect($element[0].innerHTML).toEqual('200.0000000000 €');
|
||||
expect($element[0].innerHTML).toContain('200.0000000000');
|
||||
});
|
||||
|
||||
it('sould return nothing when the value is not set', () => {
|
||||
let html = `<div id="test" >{{null | currency: '€': 2}}</div>`;
|
||||
let html = `<div id="test" >{{null | currency: 'EUR': 2}}</div>`;
|
||||
compile(html);
|
||||
|
||||
expect($element[0].innerHTML).toEqual('');
|
||||
|
|
|
@ -3,16 +3,22 @@
|
|||
<img src="./logo.svg" alt="Logo"></img>
|
||||
</a>
|
||||
<vn-icon
|
||||
ng-if="$ctrl.showMenuButton"
|
||||
ng-if="$ctrl.showLeftMenuButton"
|
||||
class="show-menu"
|
||||
icon="menu"
|
||||
ng-click="$ctrl.showMenu()">
|
||||
ng-click="$ctrl.showLeftMenu()">
|
||||
</vn-icon>
|
||||
<div class="main-title" translate>
|
||||
{{$ctrl.$state.current.description}}
|
||||
</div>
|
||||
<vn-spinner enable="$ctrl.vnApp.loading"></vn-spinner>
|
||||
<vn-main-menu></vn-main-menu>
|
||||
<vn-icon
|
||||
ng-if="$ctrl.rightMenu"
|
||||
class="show-menu"
|
||||
icon="menu"
|
||||
ng-click="$ctrl.showRightMenu()">
|
||||
</vn-icon>
|
||||
</vn-topbar>
|
||||
<div ui-view
|
||||
class="main-view"
|
||||
|
@ -21,7 +27,7 @@
|
|||
</div>
|
||||
<div
|
||||
class="background"
|
||||
ng-class="{shown: $ctrl.menuShown}"
|
||||
ng-click="$ctrl.hideMenu()">
|
||||
ng-class="{shown: $ctrl.leftMenuShown || $ctrl.rightMenuShown}"
|
||||
ng-click="$ctrl.hideMenus()">
|
||||
</div>
|
||||
<vn-snackbar vn-id="snackbar"></vn-snackbar>
|
|
@ -12,8 +12,8 @@ export default class App {
|
|||
|
||||
$transitions.onStart({}, transition => {
|
||||
let state = transition.targetState().name();
|
||||
this.showMenuButton = state.split('.').length >= 3;
|
||||
if (this.menuShown) this.hideMenu();
|
||||
this.showLeftMenuButton = state.split('.').length >= 3;
|
||||
this.hideMenus();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -30,22 +30,31 @@ export default class App {
|
|||
return state && state != 'login';
|
||||
}
|
||||
|
||||
get leftBlock() {
|
||||
return this.$element[0].querySelector('.left-block');
|
||||
get leftMenu() {
|
||||
return this.$element[0].querySelector('.left-menu');
|
||||
}
|
||||
|
||||
showMenu() {
|
||||
let leftBlock = this.leftBlock;
|
||||
if (!leftBlock) return;
|
||||
leftBlock.classList.add('shown');
|
||||
this.menuShown = true;
|
||||
showLeftMenu() {
|
||||
if (!this.leftMenu) return;
|
||||
this.leftMenu.classList.add('shown');
|
||||
this.leftMenuShown = true;
|
||||
}
|
||||
|
||||
hideMenu() {
|
||||
this.menuShown = false;
|
||||
let leftBlock = this.leftBlock;
|
||||
if (!leftBlock) return;
|
||||
leftBlock.classList.remove('shown');
|
||||
showRightMenu() {
|
||||
if (!this.rightMenu) return;
|
||||
this.rightMenu.classList.add('shown');
|
||||
this.rightMenuShown = true;
|
||||
}
|
||||
|
||||
hideMenus() {
|
||||
if (this.leftMenuShown) {
|
||||
this.leftMenu.classList.remove('shown');
|
||||
this.leftMenuShown = false;
|
||||
}
|
||||
if (this.rightMenuShown) {
|
||||
this.rightMenu.classList.remove('shown');
|
||||
this.rightMenuShown = false;
|
||||
}
|
||||
}
|
||||
|
||||
showMessage(message) {
|
||||
|
|
|
@ -20,14 +20,14 @@ vn-app {
|
|||
z-index: 2;
|
||||
box-shadow: 0 .1em .2em rgba(1, 1, 1, .2);
|
||||
height: $topbar-height;
|
||||
padding: .3em;
|
||||
padding: .4em;
|
||||
|
||||
& > header {
|
||||
& > * {
|
||||
padding: .3em;
|
||||
}
|
||||
& > .logo > img {
|
||||
height: 1.6em;
|
||||
height: 1.4em;
|
||||
display: block;
|
||||
}
|
||||
& > .show-menu {
|
||||
|
@ -58,26 +58,6 @@ vn-app {
|
|||
&.padding {
|
||||
padding-top: $topbar-height;
|
||||
}
|
||||
.index-block {
|
||||
@extend .margin-medium;
|
||||
}
|
||||
vn-main-block {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding-left: $menu-width;
|
||||
|
||||
.left-block {
|
||||
position: fixed;
|
||||
z-index: 5;
|
||||
top: $topbar-height;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: $menu-width;
|
||||
min-width: $menu-width;
|
||||
background-color: white;
|
||||
box-shadow: 0 .1em .2em rgba(1, 1, 1, .2);
|
||||
overflow: auto;
|
||||
}
|
||||
.content-block {
|
||||
@extend .margin-medium;
|
||||
|
||||
|
@ -87,12 +67,32 @@ vn-app {
|
|||
}
|
||||
}
|
||||
}
|
||||
.right-block {
|
||||
vn-main-block {
|
||||
display: block;
|
||||
margin: 0 auto;
|
||||
padding-left: $menu-width;
|
||||
|
||||
%side-menu {
|
||||
display: block;
|
||||
position: fixed;
|
||||
z-index: 5;
|
||||
bottom: 0;
|
||||
width: $menu-width;
|
||||
min-width: $menu-width;
|
||||
padding-left: 1em;
|
||||
background-color: white;
|
||||
box-shadow: 0 .1em .2em rgba(1, 1, 1, .2);
|
||||
overflow: auto;
|
||||
}
|
||||
.left-menu {
|
||||
@extend %side-menu;
|
||||
top: $topbar-height;
|
||||
left: 0;
|
||||
}
|
||||
.right-menu {
|
||||
@extend %side-menu;
|
||||
top: $topbar-height;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
& > .background {
|
||||
|
@ -118,22 +118,6 @@ vn-app {
|
|||
}
|
||||
}
|
||||
& > .main-view {
|
||||
.index-block {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
vn-main-block {
|
||||
padding-left: 0;
|
||||
|
||||
.left-block {
|
||||
top: 0;
|
||||
transform: translateZ(0) translateX(-$menu-width);
|
||||
transition: transform 200ms ease-out;
|
||||
|
||||
&.shown {
|
||||
transform: translateZ(0) translateX(0);
|
||||
}
|
||||
}
|
||||
.content-block {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
|
@ -142,6 +126,25 @@ vn-app {
|
|||
flex-direction: column;
|
||||
}
|
||||
}
|
||||
vn-main-block {
|
||||
padding-left: 0;
|
||||
|
||||
%side-menu-mobile {
|
||||
top: 0;
|
||||
transition: transform 200ms ease-out;
|
||||
|
||||
&.shown {
|
||||
transform: translateZ(0) translateX(0);
|
||||
}
|
||||
}
|
||||
.left-menu {
|
||||
@extend %side-menu-mobile;
|
||||
transform: translateZ(0) translateX(-$menu-width);
|
||||
}
|
||||
.right-menu {
|
||||
@extend %side-menu-mobile;
|
||||
transform: translateZ(0) translateX($menu-width);
|
||||
}
|
||||
}
|
||||
}
|
||||
& > .background.shown {
|
||||
|
|
|
@ -9,14 +9,14 @@
|
|||
<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'> </span>
|
||||
-->
|
||||
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -57,9 +57,9 @@ vn-home {
|
|||
color: white;
|
||||
margin: 0;
|
||||
|
||||
& > .bind-letter {
|
||||
/* & > .bind-letter {
|
||||
color: #FD0;
|
||||
}
|
||||
} */
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,22 +5,6 @@
|
|||
class="unselectable">
|
||||
{{currentUserName}}
|
||||
</div>
|
||||
<vn-icon
|
||||
id="lang"
|
||||
icon="language"
|
||||
vn-popover="langs-menu"
|
||||
translate-attr="{title: 'Change language'}">
|
||||
</vn-icon>
|
||||
<vn-menu vn-id="langs-menu">
|
||||
<ul pad-small>
|
||||
<li
|
||||
ng-repeat="lang in ::$ctrl.langs"
|
||||
name="{{::lang.code}}"
|
||||
ng-click="$ctrl.onChangeLangClick(lang.code)">
|
||||
<span>{{::lang.name}}</span>
|
||||
</li>
|
||||
</ul>
|
||||
</vn-menu>
|
||||
<vn-icon
|
||||
id="apps"
|
||||
icon="apps"
|
||||
|
|
|
@ -1,16 +1,6 @@
|
|||
import ngModule from '../../module';
|
||||
import './style.scss';
|
||||
|
||||
let languages = {
|
||||
es: 'Español',
|
||||
en: 'English',
|
||||
ca: 'Català',
|
||||
pt: 'Português',
|
||||
fr: 'Français',
|
||||
nl: 'Nederlands',
|
||||
mn: 'Монгол хэл'
|
||||
};
|
||||
|
||||
export default class MainMenu {
|
||||
constructor($translate, $scope, $http, $window, vnModules, vnAuth) {
|
||||
this.$ = $scope;
|
||||
|
@ -18,15 +8,11 @@ export default class MainMenu {
|
|||
this.$translate = $translate;
|
||||
this.$window = $window;
|
||||
this.modules = vnModules.get();
|
||||
this.langs = [];
|
||||
this.vnAuth = vnAuth;
|
||||
|
||||
for (let code of $translate.getAvailableLanguageKeys()) {
|
||||
this.langs.push({
|
||||
code: code,
|
||||
name: languages[code] ? languages[code] : code
|
||||
});
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
this.getCurrentUserName();
|
||||
}
|
||||
|
||||
getCurrentUserName() {
|
||||
|
@ -43,14 +29,6 @@ export default class MainMenu {
|
|||
onLogoutClick() {
|
||||
this.vnAuth.logout();
|
||||
}
|
||||
|
||||
onChangeLangClick(lang) {
|
||||
this.$translate.use(lang);
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
this.getCurrentUserName();
|
||||
}
|
||||
}
|
||||
MainMenu.$inject = ['$translate', '$scope', '$http', '$window', 'vnModules', 'vnAuth'];
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ vn-main-menu {
|
|||
|
||||
& > * {
|
||||
cursor: pointer;
|
||||
padding-left: .1em;
|
||||
padding-left: .3em;
|
||||
|
||||
&:hover {
|
||||
color: $main-01;
|
||||
|
@ -21,7 +21,7 @@ vn-main-menu {
|
|||
& > #user {
|
||||
vertical-align: middle;
|
||||
font-weight: bold;
|
||||
padding-right: .6em;
|
||||
padding-right: .4em;
|
||||
}
|
||||
& > vn-icon,
|
||||
& > a > vn-icon {
|
||||
|
@ -41,6 +41,7 @@ vn-main-menu {
|
|||
padding: .8em;
|
||||
border-radius: .1em;
|
||||
min-width: 8em;
|
||||
white-space: nowrap;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
|
|
|
@ -16,11 +16,8 @@
|
|||
data="companiesData"
|
||||
order="code">
|
||||
</vn-crud-model>
|
||||
|
||||
<vn-popover vn-id="popover">
|
||||
<vn-vertical class="body">
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()">
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Local warehouse"
|
||||
|
@ -31,8 +28,6 @@
|
|||
show-field="name"
|
||||
value-field="id">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Local bank"
|
||||
|
@ -45,8 +40,6 @@
|
|||
value-field="id">
|
||||
<tpl-item>{{id}}: {{bank}}</tpl-item>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Local company"
|
||||
|
@ -57,8 +50,6 @@
|
|||
show-field="code"
|
||||
value-field="id">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="User warehouse"
|
||||
|
@ -69,8 +60,6 @@
|
|||
show-field="name"
|
||||
value-field="id">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="User company"
|
||||
|
@ -81,7 +70,13 @@
|
|||
show-field="code"
|
||||
value-field="id">
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
</form>
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
label="Language"
|
||||
field="$ctrl.lang"
|
||||
data="$ctrl.langs"
|
||||
show-field="name"
|
||||
value-field="code">
|
||||
</vn-autocomplete>
|
||||
</vn-vertical>
|
||||
</vn-popover>
|
|
@ -1,6 +1,16 @@
|
|||
import ngModule from '../../module';
|
||||
import './style.scss';
|
||||
|
||||
let languages = {
|
||||
es: 'Español',
|
||||
en: 'English',
|
||||
ca: 'Català',
|
||||
pt: 'Português',
|
||||
fr: 'Français',
|
||||
nl: 'Nederlands',
|
||||
mn: 'Монгол хэл'
|
||||
};
|
||||
|
||||
class Controller {
|
||||
constructor($scope, $http, $state, vnApp, $translate) {
|
||||
this.$scope = $scope;
|
||||
|
@ -9,6 +19,25 @@ class Controller {
|
|||
this.vnApp = vnApp;
|
||||
this.$translate = $translate;
|
||||
this.getUserConfig();
|
||||
|
||||
this.lang = $translate.use();
|
||||
this.langs = [];
|
||||
|
||||
for (let code of $translate.getAvailableLanguageKeys()) {
|
||||
this.langs.push({
|
||||
code: code,
|
||||
name: languages[code] ? languages[code] : code
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
set lang(value) {
|
||||
this._lang = value;
|
||||
this.$translate.use(value);
|
||||
}
|
||||
|
||||
get lang() {
|
||||
return this._lang;
|
||||
}
|
||||
|
||||
set localBankFk(value) {
|
||||
|
|
|
@ -11,7 +11,7 @@ describe('Salix', () => {
|
|||
beforeEach(angular.mock.inject(($componentController, _$httpBackend_, $rootScope) => {
|
||||
$httpBackend = _$httpBackend_;
|
||||
$scope = $rootScope.$new();
|
||||
controller = $componentController('vnUserConfigurationPopover', {$scope: $scope, $translate: null});
|
||||
controller = $componentController('vnUserConfigurationPopover', {$scope});
|
||||
}));
|
||||
|
||||
describe('localBankFk() setter', () => {
|
||||
|
|
|
@ -28,6 +28,8 @@ Order by: Ordenar por
|
|||
Order: Orden
|
||||
Ascendant: Ascendente
|
||||
Descendant: Descendente
|
||||
Add: Añadir
|
||||
Remove: Quitar
|
||||
|
||||
# Modules
|
||||
|
||||
|
|
|
@ -50,6 +50,7 @@ function backWatch(done) {
|
|||
|
||||
nodemon({
|
||||
exec: commands.join(' && '),
|
||||
ext: 'js html css',
|
||||
args: ['backOnly'],
|
||||
watch: backSources,
|
||||
done: done
|
||||
|
|
|
@ -30,5 +30,6 @@
|
|||
"You can't create a ticket for a inactive client": "You can't create a ticket for a inactive client",
|
||||
"Worker cannot be blank": "Worker cannot be blank",
|
||||
"You must delete the claim id %d first": "You must delete the claim id %d first",
|
||||
"You don't have enough privileges": "You don't have enough privileges"
|
||||
"You don't have enough privileges": "You don't have enough privileges",
|
||||
"Tag value cannot be blank": "Tag value cannot be blank"
|
||||
}
|
|
@ -58,11 +58,12 @@
|
|||
"You can't create an order for a inactive client": "You can't create an order for a inactive client",
|
||||
"You can't create an order for a client that doesn't has tax data verified": "You can't create an order for a client that doesn't has tax data verified",
|
||||
"You must delete the claim id %d first": "Antes debes borrar la reclamacion %d",
|
||||
"You don't have enough privileges": "You don't have enough privileges",
|
||||
"You don't have enough privileges": "No tienes suficientes permisos",
|
||||
"Cannot check VIES and Equalization Tax": "No puedes marcar VIES y RE al mismo",
|
||||
"Cannot check Equalization Tax in this NIF/CIF": "No se puede marcar RE en este NIF/CIF",
|
||||
"You can't make changes on the basic data of an confirmed order or with rows": "No puedes cambiar los datos basicos de una orden con artículos",
|
||||
"INVALID_USER_NAME": "El nombre de usuario solo debe contener letras minúsculas o, a partir del segundo carácter, números o subguiones, no esta permitido el uso de la letra ñ",
|
||||
"You can't create a ticket for a frozen client": "No puedes crear un ticket para un cliente congelado",
|
||||
"You can't create a ticket for a inactive client": "No puedes crear un ticket para un cliente inactivo"
|
||||
"You can't create a ticket for a inactive client": "No puedes crear un ticket para un cliente inactivo",
|
||||
"Tag value cannot be blank": "El valor del tag no puede quedar en blanco"
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<vn-main-block>
|
||||
<div class="left-block">
|
||||
<div class="left-menu">
|
||||
<vn-zone-descriptor zone="$ctrl.zone"></vn-zone-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</div>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
form="form"
|
||||
save="post">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" margin-medium>
|
||||
<div style="max-width: 50em; margin: 0 auto;">
|
||||
<div class="content-block">
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-two vn-focus
|
||||
|
@ -66,5 +66,5 @@
|
|||
<vn-submit label="Create"></vn-submit>
|
||||
<vn-button ui-sref="zone.index" label="Cancel"></vn-button>
|
||||
</vn-button-bar>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -35,10 +35,10 @@
|
|||
value="{{$ctrl.zone.travelingDays}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Price"
|
||||
value="{{$ctrl.zone.price | currency: '€': 2}}">
|
||||
value="{{$ctrl.zone.price | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Bonus"
|
||||
value="{{$ctrl.zone.price | currency: '€': 2}}">
|
||||
value="{{$ctrl.zone.price | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
data="zones"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
|
@ -37,7 +37,7 @@
|
|||
<vn-td>{{::zone.agencyMode.name}}</vn-td>
|
||||
<vn-td>{{::zone.warehouse.name}}</vn-td>
|
||||
<vn-td>{{::zone.hour | date: 'HH:mm'}}</vn-td>
|
||||
<vn-td number>{{::zone.price | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{::zone.price | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td>
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.preview($event, zone)"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
"url": "/index?q",
|
||||
"state": "zone.index",
|
||||
"component": "vn-zone-index",
|
||||
"description": "Zones",
|
||||
"acl": ["developer"]
|
||||
"description": "Zones"
|
||||
}, {
|
||||
"url": "/create",
|
||||
"state": "zone.create",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -24,10 +24,10 @@
|
|||
value="{{::$ctrl.summary.travelingDays}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Price"
|
||||
value="{{::$ctrl.summary.price | currency: '€': 2}}">
|
||||
value="{{::$ctrl.summary.price | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Bonus"
|
||||
value="{{::$ctrl.summary.price | currency: '€': 2}}">
|
||||
value="{{::$ctrl.summary.price | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
<vn-horizontal>
|
||||
<div class="totalBox" ng-show="$ctrl.salesClaimed.length > 0">
|
||||
<vn-label-value label="Total claimed"
|
||||
value="{{$ctrl.claimedTotal | currency:'€':2}}">
|
||||
value="{{$ctrl.claimedTotal | currency: 'EUR':2}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
</vn-horizontal>
|
||||
|
@ -75,12 +75,12 @@
|
|||
<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.sale.concept}}</vn-td>
|
||||
<vn-td number>{{saleClaimed.sale.price | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{saleClaimed.sale.price | currency: 'EUR':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
|
||||
(saleClaimed.sale.quantity * saleClaimed.sale.price))/100) | currency: 'EUR':2
|
||||
}}
|
||||
</vn-td>
|
||||
<vn-td number>
|
||||
|
@ -138,10 +138,10 @@
|
|||
<vn-td number>{{sale.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td number>{{sale.quantity}}</vn-td>
|
||||
<vn-td number>{{sale.concept}}</vn-td>
|
||||
<vn-td number>{{sale.price | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{sale.price | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td number>{{sale.discount}} %</vn-td>
|
||||
<vn-td number>
|
||||
{{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency:'€':2}}
|
||||
{{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<vn-main-block>
|
||||
<div class="left-block">
|
||||
<div class="left-menu">
|
||||
<vn-claim-descriptor claim="$ctrl.claim"></vn-claim-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</div>
|
||||
|
|
|
@ -12,10 +12,10 @@
|
|||
<vn-horizontal>
|
||||
<div class="totalBox">
|
||||
<vn-label-value label="Total"
|
||||
value="{{$ctrl.paidTotal | currency:'€':2}}">
|
||||
value="{{$ctrl.paidTotal | currency: 'EUR':2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Total claimed"
|
||||
value="{{$ctrl.claimedTotal | currency:'€':2}}">
|
||||
value="{{$ctrl.claimedTotal | currency: 'EUR':2}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
</vn-horizontal>
|
||||
|
@ -52,10 +52,10 @@
|
|||
</vn-textfield>
|
||||
</vn-td>
|
||||
<vn-td>{{::saleClaimed.sale.concept}}</vn-td>
|
||||
<vn-td number>{{::saleClaimed.sale.price | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{::saleClaimed.sale.price | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td number>{{::saleClaimed.sale.discount}} %</vn-td>
|
||||
<vn-td number>
|
||||
{{::$ctrl.getSaleTotal(saleClaimed.sale) | currency:'€':2}}
|
||||
{{::$ctrl.getSaleTotal(saleClaimed.sale) | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
<vn-td number>
|
||||
<vn-icon-button
|
||||
|
@ -104,10 +104,10 @@
|
|||
<vn-td number>{{sale.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td number>{{sale.quantity}}</vn-td>
|
||||
<vn-td number>{{sale.concept}}</vn-td>
|
||||
<vn-td number>{{sale.price | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{sale.price | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td number>{{sale.discount}} %</vn-td>
|
||||
<vn-td number>
|
||||
{{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency:'€':2}}
|
||||
{{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
data="claims"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -63,12 +63,12 @@
|
|||
<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.price | currency: 'EUR':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
|
||||
(saleClaimed.sale.quantity * saleClaimed.sale.price))/100) | currency: 'EUR':2
|
||||
}}
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
|
@ -138,7 +138,7 @@
|
|||
<vn-td number>
|
||||
{{(action.sale.quantity * action.sale.price) -
|
||||
((action.sale.discount *
|
||||
(action.sale.quantity * action.sale.price))/100) | currency:'€':2
|
||||
(action.sale.quantity * action.sale.price))/100) | currency: 'EUR':2
|
||||
}}
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
|
|
|
@ -7,7 +7,7 @@ describe('Client activeWorkersWithRole', () => {
|
|||
|
||||
let isSalesPerson = await app.models.Account.hasRole(result[0].id, 'salesPerson');
|
||||
|
||||
expect(result.length).toEqual(10);
|
||||
expect(result.length).toEqual(11);
|
||||
expect(isSalesPerson).toBeTruthy();
|
||||
});
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@ describe('Client listWorkers', () => {
|
|||
.then(result => {
|
||||
let amountOfEmployees = Object.keys(result).length;
|
||||
|
||||
expect(amountOfEmployees).toEqual(43);
|
||||
expect(amountOfEmployees).toEqual(44);
|
||||
done();
|
||||
})
|
||||
.catch(done.fail);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<vn-main-block>
|
||||
<div class="left-block">
|
||||
<div class="left-menu">
|
||||
<vn-client-descriptor client="$ctrl.client"></vn-client-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</div>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
form="form"
|
||||
save="post">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" margin-medium>
|
||||
<div style="max-width: 50em; margin: 0 auto;">
|
||||
<div class="content-block">
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield vn-two label="Comercial Name" field="$ctrl.client.name" vn-focus></vn-textfield>
|
||||
|
@ -87,5 +87,5 @@
|
|||
<vn-submit label="Create"></vn-submit>
|
||||
<vn-button ui-sref="client.index" label="Cancel"></vn-button>
|
||||
</vn-button-bar>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="insurance in insurances">
|
||||
<vn-td number>{{::insurance.credit | currency: ' €': 2}}</vn-td>
|
||||
<vn-td number>{{::insurance.credit | currency: 'EUR': 2}}</vn-td>
|
||||
<vn-td number>{{::insurance.grade}}</vn-td>
|
||||
<vn-td>{{::insurance.created | date: 'dd/MM/yyyy'}}</vn-td>
|
||||
</vn-tr>
|
||||
|
|
|
@ -27,10 +27,10 @@
|
|||
value="{{$ctrl.client.phone | phone}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Credit"
|
||||
value="{{$ctrl.client.credit | currency: ' €': 2}}">
|
||||
value="{{$ctrl.client.credit | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Secured credit"
|
||||
value="{{$ctrl.client.creditInsurance | currency: '€ ': 2}}">
|
||||
value="{{$ctrl.client.creditInsurance | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Sales person"
|
||||
value="{{$ctrl.client.salesPerson.user.nickname}}">
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<vn-horizontal>
|
||||
<div class="totalBox" ng-if="model.data.length > 0">
|
||||
<vn-label-value label="Total"
|
||||
value="{{edit.model.sumAmount | currency: ' €': 2}}">
|
||||
value="{{edit.model.sumAmount | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
</vn-horizontal>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<vn-tr ng-repeat="greuge in greuges">
|
||||
<vn-td>{{::greuge.shipped | date:'dd/MM/yyyy HH:mm' }}</vn-td>
|
||||
<vn-td>{{::greuge.description}}</vn-td>
|
||||
<vn-td>{{::greuge.amount | currency: ' €': 2}}</vn-td>
|
||||
<vn-td>{{::greuge.amount | currency: 'EUR': 2}}</vn-td>
|
||||
<vn-td>{{::greuge.greugeType.name}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
data="clients"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
</vn-td>
|
||||
<vn-td>{{::recovery.started | date:'dd/MM/yyyy' }}</vn-td>
|
||||
<vn-td>{{recovery.finished | date:'dd/MM/yyyy' }}</vn-td>
|
||||
<vn-td>{{::recovery.amount | currency:' €': 0}}</vn-td>
|
||||
<vn-td>{{::recovery.amount | currency: 'EUR': 0}}</vn-td>
|
||||
<vn-td>{{::recovery.period}}</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
<vn-auto ng-repeat="riskByCompany in riskTotal">
|
||||
<vn-label-value
|
||||
label="{{riskByCompany.company.code}}"
|
||||
value="{{riskByCompany.amount | currency:'€':2}}">
|
||||
value="{{riskByCompany.amount | currency: 'EUR':2}}">
|
||||
</vn-label-value>
|
||||
</vn-auto>
|
||||
</div>
|
||||
|
@ -65,9 +65,9 @@
|
|||
<span ng-show="risk.ref" translate>BILL</span> {{::risk.ref}}
|
||||
</vn-td>
|
||||
<vn-td number>{{::risk.bankFk}}</vn-td>
|
||||
<vn-td number>{{::risk.debit | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{::risk.credit | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{risk.balance | currency:'€':2}}</vn-td>
|
||||
<vn-td number>{{::risk.debit | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td number>{{::risk.credit | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td number>{{risk.balance | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td center>
|
||||
<vn-check
|
||||
field="risk.isConciliate"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -149,16 +149,16 @@
|
|||
<vn-one>
|
||||
<h4 translate>Business data</h4>
|
||||
<vn-label-value label="Total greuge"
|
||||
value="{{$ctrl.summary.totalGreuge | currency:'€':2}}">
|
||||
value="{{$ctrl.summary.totalGreuge | currency: 'EUR':2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Mana"
|
||||
value="{{$ctrl.summary.mana.mana | currency:'€':2}}">
|
||||
value="{{$ctrl.summary.mana.mana | currency: 'EUR':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}}">
|
||||
value="{{$ctrl.summary.averageInvoiced.invoiced | currency: 'EUR':2}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Claims"
|
||||
value="{{$ctrl.summary.claimsRatio[0].claimingRate | percentage}}">
|
||||
|
@ -167,26 +167,26 @@
|
|||
<vn-one>
|
||||
<h4 translate>Financial information</h4>
|
||||
<vn-label-value label="Risk"
|
||||
value="{{$ctrl.summary.debt.debt | currency:'€':2}}"
|
||||
value="{{$ctrl.summary.debt.debt | currency: 'EUR':2}}"
|
||||
ng-class="{alert: $ctrl.summary.debt.debt > $ctrl.summary.credit}"
|
||||
info="Invoices minus payments plus orders not yet invoiced">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Credit"
|
||||
value="{{$ctrl.summary.credit | currency:'€':2 }} "
|
||||
value="{{$ctrl.summary.credit | currency: 'EUR':2 }} "
|
||||
ng-class="{alert: $ctrl.summary.credit > $ctrl.summary.creditInsurance ||
|
||||
($ctrl.summary.credit && $ctrl.summary.creditInsurance == null)}"
|
||||
info="Verdnatura's maximum risk">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Secured credit"
|
||||
value="{{$ctrl.summary.creditInsurance | currency:'€':2}} ({{$ctrl.summary.classifications[0].insurances[0].grade}})"
|
||||
value="{{$ctrl.summary.creditInsurance | currency: 'EUR':2}} ({{$ctrl.summary.classifications[0].insurances[0].grade}})"
|
||||
info="Solunion's maximum risk">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Balance"
|
||||
value="{{$ctrl.summary.sumRisk | currency:'€':2}}"
|
||||
value="{{$ctrl.summary.sumRisk | currency: 'EUR':2}}"
|
||||
info="Invoices minus payments">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Balance due"
|
||||
value="{{$ctrl.summary.defaulters[0].amount | currency:'€':2}}"
|
||||
value="{{$ctrl.summary.defaulters[0].amount | currency: 'EUR':2}}"
|
||||
ng-class="{alert: $ctrl.summary.defaulters[0].amount}"
|
||||
info="Deviated invoices minus payments">
|
||||
</vn-label-value>
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
</vn-icon>
|
||||
</vn-td>
|
||||
<vn-td>{{::transaction.id}}</vn-td>
|
||||
<vn-td number>{{::transaction.amount | currency: '€':2}}</vn-td>
|
||||
<vn-td number>{{::transaction.amount | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td>{{::transaction.created | dateTime:'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td style="width: 3em; text-align: center">
|
||||
<vn-icon-button
|
||||
|
|
|
@ -11,7 +11,8 @@ describe('item getLastEntries()', () => {
|
|||
|
||||
it('should return three entries for a given item', async() => {
|
||||
let date = new Date();
|
||||
date.setMonth(date.getMonth() - 2);
|
||||
|
||||
date.setMonth(date.getMonth() - 2, 15);
|
||||
let filter = {where: {itemFk: 1, date: date}};
|
||||
let result = await app.models.Item.getLastEntries(filter);
|
||||
|
||||
|
|
|
@ -3,6 +3,12 @@ let UserError = require('vn-loopback/util/user-error');
|
|||
module.exports = Self => {
|
||||
require('../methods/item-tag/filterItemTags')(Self);
|
||||
|
||||
Self.rewriteDbError(function(err) {
|
||||
if (err.code === 'ER_BAD_NULL_ERROR')
|
||||
return new UserError(`Tag value cannot be blank`);
|
||||
return err;
|
||||
});
|
||||
|
||||
Self.rewriteDbError(function(err) {
|
||||
if (err.code === 'ER_DUP_ENTRY')
|
||||
return new UserError(`The tag can't be repeated`);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<vn-main-block>
|
||||
<div class="left-block">
|
||||
<div class="left-menu">
|
||||
<vn-item-descriptor item="$ctrl.item"></vn-item-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</div>
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
form="form"
|
||||
save="post">
|
||||
</vn-watcher>
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" margin-medium>
|
||||
<div compact>
|
||||
<div class="content-block">
|
||||
<form name="form" ng-submit="$ctrl.onSubmit()" compact>
|
||||
<vn-card pad-large>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
@ -61,5 +61,5 @@
|
|||
>Cancel
|
||||
</button>
|
||||
</vn-button-bar>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
data="items"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
|
|
|
@ -34,6 +34,7 @@ Add barcode: Añadir código de barras
|
|||
Remove barcode: Quitar código de barras
|
||||
Buyer: Comprador
|
||||
No results: Sin resultados
|
||||
Enter a new search: Introduce una nueva búsqueda
|
||||
Tag: Etiqueta
|
||||
Worker: Trabajador
|
||||
Available: Disponible
|
||||
|
@ -46,14 +47,16 @@ Density: Densidad
|
|||
|
||||
# Sections
|
||||
Items: Artículos
|
||||
List: Listado
|
||||
New item: Nuevo artículo
|
||||
Summary: Vista previa
|
||||
Basic data: Datos básicos
|
||||
Tax: IVA
|
||||
History: Historial
|
||||
Niches: Nichos
|
||||
Botanical: Botánico
|
||||
Barcodes: Códigos de barras
|
||||
Diary: Registro
|
||||
Diary: Histórico
|
||||
Item diary: Registro de compra-venta
|
||||
Last entries: Últimas entradas
|
||||
Tags: Etiquetas
|
|
@ -1,6 +1,6 @@
|
|||
<mg-ajax path="/item/api/Tags" options="mgIndex as tags"></mg-ajax>
|
||||
<div style="min-width: 30em; max-height: 540px; overflow: auto;">
|
||||
<form pad-large ng-submit="$ctrl.onSearch()">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
vn-one
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<vn-main-block>
|
||||
<div class="left-block">
|
||||
<div class="left-menu">
|
||||
<vn-order-descriptor order="$ctrl.order"></vn-order-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</div>
|
||||
|
|
|
@ -5,13 +5,12 @@
|
|||
limit="50"
|
||||
data="items" on-data-change="$ctrl.onDataChange()" >
|
||||
</vn-crud-model>
|
||||
<vn-horizontal>
|
||||
<vn-vertical vn-one>
|
||||
<div class="items">
|
||||
<vn-card>
|
||||
<vn-vertical>
|
||||
<vn-horizontal class="catalog-header" pad-medium-h>
|
||||
<vn-one ng-if="model.moreRows">
|
||||
<span translate>More than</span> {{model.limit}} <span translate>results</span></vn-one>
|
||||
<span translate>More than</span> {{model.limit}} <span translate>results</span>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-horizontal>
|
||||
<vn-autocomplete vn-id="field" vn-one
|
||||
|
@ -75,7 +74,7 @@
|
|||
<vn-one>
|
||||
<span>{{::item.available}}</span>
|
||||
<span translate>from</span>
|
||||
<span>{{::item.price | currency: ' €': 2}}</span>
|
||||
<span>{{::item.price | currency: 'EUR': 2}}</span>
|
||||
</vn-one>
|
||||
<vn-auto>
|
||||
<a href="" vn-tooltip="Add">
|
||||
|
@ -94,16 +93,13 @@
|
|||
No results
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
<vn-pagination margin-small-v model="model"></vn-pagination>
|
||||
</vn-vertical>
|
||||
|
||||
<vn-auto class="right-block">
|
||||
<vn-catalog-filter order="$ctrl.order"></vn-catalog-filter>
|
||||
</vn-auto>
|
||||
</vn-horizontal>
|
||||
|
||||
</div>
|
||||
<vn-catalog-filter
|
||||
class="right-menu"
|
||||
order="$ctrl.order">
|
||||
</vn-catalog-filter>
|
||||
<vn-order-prices-popover
|
||||
vn-id="pricesPopover"
|
||||
order="$ctrl.order">
|
||||
|
|
|
@ -125,5 +125,5 @@ ngModule.component('vnOrderCatalog', {
|
|||
controller: Controller,
|
||||
bindings: {
|
||||
order: '<',
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
|
@ -8,13 +8,18 @@ vn-order-catalog {
|
|||
vn-one:first-child {
|
||||
padding-top: 2em;
|
||||
}
|
||||
|
||||
vn-one:nth-child(2) {
|
||||
padding-top: 0.5em;
|
||||
}
|
||||
|
||||
span {
|
||||
color: $secondary-font-color
|
||||
}
|
||||
}
|
||||
& > .items {
|
||||
padding-right: 16em;
|
||||
|
||||
@media screen and (max-width: 800px) {
|
||||
padding-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
<div margin-medium>
|
||||
<div style="max-width: 70em; margin: 0 auto;" >
|
||||
<div class="content-block">
|
||||
<div compact>
|
||||
<vn-card pad-large>
|
||||
<vn-order-create-card vn-id="card" on-save=""></vn-order-create-card>
|
||||
</vn-card>
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
value="{{$ctrl.order.rows.length || 0}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value label="Total"
|
||||
value="{{$ctrl.order.total | currency: ' €': 2}}">
|
||||
value="{{$ctrl.order.total | currency: 'EUR': 2}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
<div class="quicklinks">
|
||||
|
|
|
@ -1,17 +1,14 @@
|
|||
<vn-crud-model
|
||||
vn-id="model"
|
||||
url="/order/api/ItemCategories"
|
||||
data="categories" auto-load="true">
|
||||
data="categories"
|
||||
auto-load="true">
|
||||
</vn-crud-model>
|
||||
<vn-horizontal>
|
||||
<vn-vertical vn-one>
|
||||
<vn-card >
|
||||
<vn-vertical>
|
||||
<vn-horizontal pad-medium class="item-category">
|
||||
<vn-one margin-small-v ng-repeat="category in categories">
|
||||
<div>
|
||||
<vn-horizontal class="item-category">
|
||||
<vn-one ng-repeat="category in categories">
|
||||
<vn-icon
|
||||
ng-class="{'active': $ctrl.category.id == category.id}"
|
||||
pad-small
|
||||
icon="{{::category.icon}}"
|
||||
vn-tooltip="{{::category.name}}"
|
||||
ng-click="$ctrl.category = {
|
||||
|
@ -21,8 +18,9 @@
|
|||
</vn-icon>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal pad-medium class="catalog-header">
|
||||
<vn-autocomplete vn-one
|
||||
<vn-horizontal class="input">
|
||||
<vn-autocomplete
|
||||
vn-one
|
||||
vn-id="type"
|
||||
data="$ctrl.itemTypes"
|
||||
on-change="$ctrl.type = {
|
||||
|
@ -45,10 +43,9 @@
|
|||
</t-right-icons>
|
||||
</vn-autocomplete>
|
||||
</vn-horizontal>
|
||||
|
||||
<vn-horizontal pad-medium class="catalog-header">
|
||||
<vn-one>
|
||||
<vn-horizontal class="input">
|
||||
<vn-textfield
|
||||
vn-one
|
||||
vn-id="search"
|
||||
ng-keyUp="$ctrl.onSearch($event)"
|
||||
label="Search tag"
|
||||
|
@ -64,38 +61,33 @@
|
|||
</i>
|
||||
</t-right-icons>
|
||||
</vn-textfield>
|
||||
|
||||
</vn-horizontal>
|
||||
<vn-popover
|
||||
vn-id="popover"
|
||||
on-close="$ctrl.onPopoverClose()">
|
||||
<vn-order-catalog-search-panel/>
|
||||
</vn-popover>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
|
||||
<vn-horizontal pad-medium style="flex-wrap: wrap">
|
||||
<vn-horizontal class="chips" style="flex-wrap: wrap">
|
||||
<vn-chip
|
||||
ng-if="$ctrl.category"
|
||||
vn-tooltip="Category"
|
||||
on-remove="$ctrl.category = null" ellipsize>
|
||||
on-remove="$ctrl.category = null"
|
||||
ellipsize>
|
||||
<span translate>{{$ctrl.category.value}}</span>
|
||||
</vn-chip>
|
||||
|
||||
<vn-chip
|
||||
ng-if="$ctrl.type"
|
||||
vn-tooltip="Type"
|
||||
on-remove="$ctrl.type = null" ellipsize>
|
||||
on-remove="$ctrl.type = null"
|
||||
ellipsize>
|
||||
<span translate>{{$ctrl.type.value}}</span>
|
||||
</vn-chip>
|
||||
|
||||
<vn-chip
|
||||
ng-repeat="tag in $ctrl.tags"
|
||||
vn-tooltip="Value"
|
||||
on-remove="$ctrl.remove($index)" ellipsize>
|
||||
on-remove="$ctrl.remove($index)"
|
||||
ellipsize>
|
||||
<span translate>{{::tag.value}}</span>
|
||||
</vn-chip>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
</vn-card>
|
||||
</vn-vertical>
|
||||
</vn-horizontal>
|
||||
</div>
|
|
@ -2,7 +2,8 @@ import ngModule from '../module';
|
|||
import './style.scss';
|
||||
|
||||
class Controller {
|
||||
constructor($http, $scope, $state, $compile, $transitions, $window) {
|
||||
constructor($element, $http, $scope, $state, $compile, $transitions) {
|
||||
this.$element = $element;
|
||||
this.$http = $http;
|
||||
this.$scope = $scope;
|
||||
this.$state = $state;
|
||||
|
@ -13,6 +14,14 @@ class Controller {
|
|||
this.tags = [];
|
||||
}
|
||||
|
||||
$onInit() {
|
||||
this.app.rightMenu = this.$element[0];
|
||||
}
|
||||
|
||||
$onDestroy() {
|
||||
this.app.rightMenu = null;
|
||||
}
|
||||
|
||||
get order() {
|
||||
return this._order;
|
||||
}
|
||||
|
@ -159,15 +168,16 @@ class Controller {
|
|||
}
|
||||
}
|
||||
|
||||
Controller.$inject = ['$http', '$scope', '$state', '$compile', '$transitions', '$window'];
|
||||
Controller.$inject = ['$element', '$http', '$scope', '$state', '$compile', '$transitions'];
|
||||
|
||||
ngModule.component('vnCatalogFilter', {
|
||||
template: require('./index.html'),
|
||||
controller: Controller,
|
||||
require: {
|
||||
catalog: '^vnOrderCatalog',
|
||||
app: '^vnApp'
|
||||
},
|
||||
bindings: {
|
||||
order: '<',
|
||||
},
|
||||
}
|
||||
});
|
||||
|
|
|
@ -17,7 +17,7 @@ describe('Order', () => {
|
|||
$state.params.category = '{"id": 1, "value": "My Category"}';
|
||||
$state.params.type = '{"id": 1, "value": "My type"}';
|
||||
$state.current.name = 'my.current.state';
|
||||
controller = $componentController('vnCatalogFilter', {$scope, $state});
|
||||
controller = $componentController('vnCatalogFilter', {$element: null, $scope, $state});
|
||||
controller.catalog = {
|
||||
$scope: $scope,
|
||||
getOrderBy: () => {
|
||||
|
|
|
@ -1,31 +1,44 @@
|
|||
@import "colors";
|
||||
@import "padding";
|
||||
|
||||
vn-catalog-filter {
|
||||
vn-catalog-filter > div {
|
||||
& > .input {
|
||||
@extend .pad-medium-h;
|
||||
border-color: $lines;
|
||||
border-bottom: 1px solid rgba($lines, 0.5);
|
||||
}
|
||||
.item-category {
|
||||
@extend .pad-small;
|
||||
justify-content: flex-start;
|
||||
align-items: flex-start;
|
||||
flex-wrap: wrap;
|
||||
|
||||
vn-icon {
|
||||
& > vn-one {
|
||||
@extend .pad-small;
|
||||
min-width: 33.33%;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
|
||||
& > vn-icon {
|
||||
@extend .pad-small;
|
||||
background-color: $secondary-font-color;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
|
||||
i:before {
|
||||
&.active {
|
||||
background-color: $main-01;
|
||||
color: #FFF
|
||||
}
|
||||
& > i:before {
|
||||
font-size: 32pt;
|
||||
width: 1em;
|
||||
height: 1em;
|
||||
}
|
||||
}
|
||||
|
||||
vn-icon.active {
|
||||
background-color: $main-01;
|
||||
color: #FFF
|
||||
}
|
||||
|
||||
& > vn-one {
|
||||
width: 33.33%;
|
||||
text-align: center
|
||||
}
|
||||
}
|
||||
.chips {
|
||||
flex-wrap: wrap;
|
||||
@extend .pad-medium;
|
||||
}
|
||||
}
|
|
@ -5,7 +5,7 @@
|
|||
limit="20"
|
||||
data="orders" auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar auto-load="false"
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
<vn-horizontal>
|
||||
<div class="totalBox">
|
||||
<vn-label translate>Subtotal</vn-label>
|
||||
<span>{{$ctrl.subtotal | currency:'€':2}}</span>
|
||||
<span>{{$ctrl.subtotal | currency: 'EUR':2}}</span>
|
||||
<p>
|
||||
<vn-label translate>VAT</vn-label>
|
||||
<span>{{$ctrl.VAT | currency:'€':2}}</span>
|
||||
<span>{{$ctrl.VAT | currency: 'EUR':2}}</span>
|
||||
</p>
|
||||
<vn-label><strong>Total</strong></vn-label>
|
||||
<strong>{{$ctrl.order.total | currency:'€':2}}</strong>
|
||||
<strong>{{$ctrl.order.total | currency: 'EUR':2}}</strong>
|
||||
</div>
|
||||
</vn-horizontal>
|
||||
<vn-table>
|
||||
|
@ -49,7 +49,7 @@
|
|||
<vn-td>{{row.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
||||
<vn-td number>{{row.quantity}}</vn-td>
|
||||
<vn-td number>
|
||||
{{row.price | currency:'€':2}}
|
||||
{{row.price | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
<vn-td ng-if="!$ctrl.order.isConfirmed">
|
||||
<vn-icon-button
|
||||
|
|
|
@ -3,12 +3,19 @@ Catalog: Catálogo
|
|||
from: desde
|
||||
results: resultados
|
||||
More than: Más de
|
||||
No results: Sin resultados
|
||||
Enter a new search: Introduce una nueva búsqueda
|
||||
Plant: Planta
|
||||
Flower: Flor
|
||||
Handmade: Confección
|
||||
Green: Verde
|
||||
Lines: Lineas
|
||||
Accessories: Complemento
|
||||
Category: Reino
|
||||
Search tag: Buscar etiqueta
|
||||
Order by: Ordenar por
|
||||
Order: Orden
|
||||
Price: Precio
|
||||
Ascendant: Ascendente
|
||||
Descendant: Descendente
|
||||
Created from: Creado desde
|
|
@ -1,6 +1,6 @@
|
|||
<vn-popover vn-id="popover" on-close="$ctrl.clear()">
|
||||
<vn-card class="vn-descriptor">
|
||||
<vn-horizontal class="header">
|
||||
<div class="vn-descriptor">
|
||||
<div class="header">
|
||||
<a translate-attr="{title: 'Return to module index'}" ui-sref="item.index">
|
||||
<vn-icon icon="chevron_left"></vn-icon>
|
||||
</a>
|
||||
|
@ -8,7 +8,7 @@
|
|||
<a translate-attr="{title: 'Preview'}" ui-sref="item.card.summary({id: $ctrl.item.id})">
|
||||
<vn-icon icon="desktop_windows"></vn-icon>
|
||||
</a>
|
||||
</vn-horizontal>
|
||||
</div>
|
||||
<div pad-medium>
|
||||
<vn-horizontal>
|
||||
<h5>{{$ctrl.item.id}}</h5>
|
||||
|
@ -39,7 +39,7 @@
|
|||
ng-repeat="price in $ctrl.prices">
|
||||
<vn-one class="ellipsize text" title="{{::price.warehouse}}">{{::price.warehouse}}</vn-one>
|
||||
<vn-one class="number text">
|
||||
<span orange ng-click="$ctrl.addQuantity(price)" class="link unselectable">{{::price.grouping}}</span><span> x {{::price.price | currency: ' €': 2}}</span>
|
||||
<span orange ng-click="$ctrl.addQuantity(price)" class="link unselectable">{{::price.grouping}}</span><span> x {{::price.price | currency: 'EUR': 2}}</span>
|
||||
</vn-one>
|
||||
<vn-one>
|
||||
<vn-input-number
|
||||
|
@ -59,12 +59,32 @@
|
|||
</vn-vertical>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal class="buttons-bar">
|
||||
<vn-one
|
||||
vn-tooltip="Last entries"
|
||||
tooltip-position="down">
|
||||
<vn-button ui-sref="item.card.diary({id: $ctrl.item.id})" icon="icon-transaction">
|
||||
</vn-button>
|
||||
</vn-one>
|
||||
<div class="quicklinks" vn-one>
|
||||
<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>
|
||||
<vn-one>
|
||||
<vn-submit
|
||||
label="Save"
|
||||
|
@ -73,5 +93,5 @@
|
|||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</div>
|
||||
</vn-card>
|
||||
</div>
|
||||
</vn-popover>
|
||||
|
|
|
@ -26,6 +26,13 @@ class Controller {
|
|||
order: 'priority ASC',
|
||||
include: {relation: 'tag'}
|
||||
};
|
||||
this.quicklinks = {
|
||||
btnOne: {
|
||||
icon: 'icon-transaction',
|
||||
state: `item.card.diary({id: ${this.item.id}})`,
|
||||
tooltip: 'Diary'
|
||||
}
|
||||
};
|
||||
this.$http.get(`/item/api/ItemTags?filter=${JSON.stringify(filter)}`).then(response => {
|
||||
this.tags = response.data;
|
||||
});
|
||||
|
|
|
@ -44,11 +44,17 @@ vn-order-prices-popover {
|
|||
vn-one.text{
|
||||
padding-top:10px!important;
|
||||
}
|
||||
|
||||
vn-horizontal.buttons-bar{
|
||||
padding-top: 16px;
|
||||
text-align: center;
|
||||
}
|
||||
.quicklinks vn-icon {
|
||||
font-size: 1.8em !important;
|
||||
padding: 0 !important;
|
||||
& > i {
|
||||
line-height: 36px
|
||||
}
|
||||
}
|
||||
vn-one.error{
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -34,9 +34,9 @@
|
|||
</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>
|
||||
<p><vn-label translate>Subtotal</vn-label> {{$ctrl.summary.subTotal | currency: 'EUR':2}}</p>
|
||||
<p><vn-label translate>VAT</vn-label> {{$ctrl.summary.VAT | currency: 'EUR':2}}</p>
|
||||
<p><vn-label><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency: 'EUR':2}}</strong></p>
|
||||
</vn-one>
|
||||
<vn-auto>
|
||||
<table class="vn-grid">
|
||||
|
@ -70,8 +70,8 @@
|
|||
</td>
|
||||
<td><vn-fetched-tags max-length="6" item="row.item"/></td>
|
||||
<td number>{{::row.quantity}}</td>
|
||||
<td number>{{::row.price | currency:'€':2}}</td>
|
||||
<td number>{{::row.quantity * row.price | currency:'€':2}}</td>
|
||||
<td number>{{::row.price | currency: 'EUR':2}}</td>
|
||||
<td number>{{::row.quantity * row.price | currency: 'EUR':2}}</td>
|
||||
</tr>
|
||||
<tr ng-if="!$ctrl.summary.rows" class="list list-element">
|
||||
<td colspan="8" style="text-align: center" translate>No results</td>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<vn-main-block>
|
||||
<div class="left-block">
|
||||
<div class="left-menu">
|
||||
<vn-ticket-descriptor ticket="$ctrl.ticket"></vn-ticket-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</div>
|
||||
|
|
|
@ -24,17 +24,17 @@
|
|||
<tfoot>
|
||||
<tr>
|
||||
<td number colspan="7">
|
||||
<span translate>Base</span> {{$ctrl.base() | currency:'€':3}}
|
||||
<span translate>Base</span> {{$ctrl.base() | currency: 'EUR':3}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td number colspan="7">
|
||||
<span translate>Margin</span> {{$ctrl.profitMargin() | currency:'€':3}}
|
||||
<span translate>Margin</span> {{$ctrl.profitMargin() | currency: 'EUR':3}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td number colspan="7">
|
||||
<span translate>Total</span> {{$ctrl.total() | currency:'€':3}}
|
||||
<span translate>Total</span> {{$ctrl.total() | currency: 'EUR':3}}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
@ -66,10 +66,10 @@
|
|||
}">{{::component.componentRate.name}}</td>
|
||||
<td ng-class="::{
|
||||
first: $index == 0,last: $index == sale.components.length - 1
|
||||
}" number>{{::component.value | currency:'€':3}}</td>
|
||||
}" number>{{::component.value | currency: 'EUR':3}}</td>
|
||||
<td ng-class="::{
|
||||
first: $index == 0,last: $index == sale.components.length - 1
|
||||
}" number>{{::sale.quantity * component.value | currency:'€':3}}</td>
|
||||
}" number>{{::sale.quantity * component.value | currency: 'EUR':3}}</td>
|
||||
</tr>
|
||||
<tr ng-if="model.data.length === 0" class="list list-element">
|
||||
<td colspan="7" style="text-align: center" translate>No results</td>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<div margin-medium>
|
||||
<div style="max-width: 70em; margin: 0 auto;" >
|
||||
<div class="content-block">
|
||||
<div compact>
|
||||
<vn-card pad-large>
|
||||
<vn-ticket-create-card vn-id="card" on-save=""></vn-ticket-create-card>
|
||||
</vn-card>
|
||||
|
|
|
@ -17,17 +17,17 @@
|
|||
<td number>{{("000000"+sale.itemFk).slice(-6)}}</td>
|
||||
<td><vn-fetched-tags max-length="6" item="sale.item"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.price | currency: '€': 2}}</td>
|
||||
<td number>{{::sale.component.newPrice | currency: '€': 2}}</td>
|
||||
<td number>{{::sale.component.difference | currency: '€': 2}}</td>
|
||||
<td number>{{::sale.price | currency: 'EUR': 2}}</td>
|
||||
<td number>{{::sale.component.newPrice | currency: 'EUR': 2}}</td>
|
||||
<td number>{{::sale.component.difference | currency: 'EUR': 2}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3"></td>
|
||||
<td number><strong>{{$ctrl.totalPrice | currency: '€': 2}}</strong></td>
|
||||
<td number><strong>{{$ctrl.totalNewPrice | currency: '€': 2}}</strong></td>
|
||||
<td number><strong>{{$ctrl.totalPriceDifference | currency: '€': 2}}</strong></td>
|
||||
<td number><strong>{{$ctrl.totalPrice | currency: 'EUR': 2}}</strong></td>
|
||||
<td number><strong>{{$ctrl.totalNewPrice | currency: 'EUR': 2}}</strong></td>
|
||||
<td number><strong>{{$ctrl.totalPriceDifference | currency: 'EUR': 2}}</strong></td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
order="shipped ASC"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-horizontal>
|
||||
|
@ -73,7 +73,7 @@
|
|||
<vn-td class="{{$ctrl.stateColor(ticket)}}">{{::ticket.state}}</vn-td>
|
||||
<vn-td>{{::ticket.agencyMode}}</vn-td>
|
||||
<vn-td>{{::ticket.warehouse}}</vn-td>
|
||||
<vn-td number>{{::ticket.total | currency: '€': 2}}</vn-td>
|
||||
<vn-td number>{{::ticket.total | currency: 'EUR': 2}}</vn-td>
|
||||
<vn-td>
|
||||
<vn-icon-button
|
||||
ng-click="$ctrl.preview($event, ticket)"
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
<vn-one>
|
||||
<span>{{::sale.quantity}}</span>
|
||||
<span translate>by</span>
|
||||
<span>{{::sale.price | currency: ' €': 2}}</span>
|
||||
<span>{{::sale.price | currency: 'EUR': 2}}</span>
|
||||
</vn-one>
|
||||
</vn-horizontal>
|
||||
</vn-vertical>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
<vn-td>{{::request.requester.user.nickname}}</vn-td>
|
||||
<vn-td>{{::request.atender.user.nickname}}</vn-td>
|
||||
<vn-td number>{{::request.quantity}}</vn-td>
|
||||
<vn-td number>{{::request.price | currency: '€': 2}}</vn-td>
|
||||
<vn-td number>{{::request.price | currency: 'EUR': 2}}</vn-td>
|
||||
<vn-td number>
|
||||
<span
|
||||
ng-show="::request.saleFk"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<vn-horizontal pad-medium class="header">
|
||||
<h5>MANÁ: {{$ctrl.mana | currency:' €':0}}</h5>
|
||||
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
|
||||
</vn-horizontal>
|
||||
<div pad-medium>
|
||||
<vn-textfield
|
||||
|
@ -15,6 +15,6 @@
|
|||
<p class="simulatorTitle" translate>New price</p>
|
||||
<p>{{($ctrl.edit[0].quantity * $ctrl.edit[0].price)
|
||||
- (($ctrl.newDiscount * ($ctrl.edit[0].quantity * $ctrl.edit[0].price))/100)
|
||||
| currency:' €':2}}</p>
|
||||
| currency: 'EUR':2}}</p>
|
||||
</div>
|
||||
</div>
|
|
@ -116,10 +116,10 @@
|
|||
ng-click="$ctrl.showEditPricePopover($event, sale)"
|
||||
pointer
|
||||
vn-tooltip="Edit price">
|
||||
{{sale.price | currency:'€':2}}
|
||||
{{sale.price | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
<vn-td number ng-if="!$ctrl.isEditable">
|
||||
{{sale.price | currency:'€':2}}
|
||||
{{sale.price | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
<vn-td number
|
||||
ng-if="$ctrl.isEditable"
|
||||
|
@ -134,7 +134,7 @@
|
|||
{{sale.discount}} %
|
||||
</vn-td>
|
||||
<vn-td number>
|
||||
{{$ctrl.getSaleTotal(sale) | currency:'€':2}}
|
||||
{{$ctrl.getSaleTotal(sale) | currency: 'EUR':2}}
|
||||
</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
|
@ -146,15 +146,15 @@
|
|||
ng-if="$ctrl.sales.length > 0">
|
||||
<p>
|
||||
<vn-label translate>Subtotal</vn-label>
|
||||
<span>{{$ctrl.subTotal | currency:'€':2}}</span>
|
||||
<span>{{$ctrl.subTotal | currency: 'EUR':2}}</span>
|
||||
</p>
|
||||
<p>
|
||||
<vn-label translate>VAT</vn-label>
|
||||
<span>{{$ctrl.VAT | currency:'€':2}}</span>
|
||||
<span>{{$ctrl.VAT | currency: 'EUR':2}}</span>
|
||||
</p>
|
||||
<p>
|
||||
<vn-label><strong>Total</strong></vn-label>
|
||||
<strong>{{$ctrl.total | currency:'€':2}}</strong>
|
||||
<strong>{{$ctrl.total | currency: 'EUR':2}}</strong>
|
||||
</p>
|
||||
</div>
|
||||
</vn-vertical>
|
||||
|
@ -169,7 +169,7 @@
|
|||
vn-id="editPricePopover"
|
||||
on-open="$ctrl.getManaSalespersonMana()">
|
||||
<vn-horizontal pad-medium class="header">
|
||||
<h5>MANÁ: {{$ctrl.mana | currency:'€':0}}</h5>
|
||||
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
|
||||
</vn-horizontal>
|
||||
<div pad-medium>
|
||||
<vn-textfield
|
||||
|
@ -185,7 +185,7 @@
|
|||
<p class="simulatorTitle" translate>New price</p>
|
||||
<p>{{($ctrl.sale.quantity * $ctrl.editedPrice)
|
||||
- (($ctrl.sale.discount * ($ctrl.sale.quantity * $ctrl.editedPrice))/100)
|
||||
| currency:'€':2}}</p>
|
||||
| currency: 'EUR':2}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</vn-popover>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -46,27 +46,27 @@
|
|||
</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>
|
||||
<p><vn-label translate>Subtotal</vn-label> {{$ctrl.summary.subTotal | currency: 'EUR':2}}</p>
|
||||
<p><vn-label translate>VAT</vn-label> {{$ctrl.summary.VAT | currency: 'EUR':2}}</p>
|
||||
<p><vn-label><strong>Total</strong></vn-label> <strong>{{$ctrl.summary.total | currency: 'EUR':2}}</strong></p>
|
||||
</vn-one>
|
||||
<vn-auto name="sales">
|
||||
<h4 translate>Sale</h4>
|
||||
<table class="vn-grid">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th number translate>Item</th>
|
||||
<th translate>Description</th>
|
||||
<th number translate>Quantity</th>
|
||||
<th number translate>Price</th>
|
||||
<th number translate>Discount</th>
|
||||
<th number translate>Amount</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="sale in $ctrl.summary.sales track by sale.id">
|
||||
<td>
|
||||
<vn-table class="vn-grid">
|
||||
<vn-thead>
|
||||
<vn-tr>
|
||||
<vn-th></vn-th>
|
||||
<vn-th number>Item</vn-th>
|
||||
<vn-th>Description</vn-th>
|
||||
<vn-th number>Quantity</vn-th>
|
||||
<vn-th number>Price</vn-th>
|
||||
<vn-th number>Discount</vn-th>
|
||||
<vn-th number>Amount</vn-th>
|
||||
</vn-tr>
|
||||
</vn-thead>
|
||||
<vn-tbody>
|
||||
<vn-tr ng-repeat="sale in $ctrl.summary.sales track by sale.id">
|
||||
<vn-td>
|
||||
<a ui-sref="claim.card.basicData({id: sale.claimBeginning.claimFk})">
|
||||
<vn-icon
|
||||
ng-show="sale.claimBeginning.claimFk"
|
||||
|
@ -82,25 +82,25 @@
|
|||
vn-tooltip="Visible: {{::sale.visible || 0}} <br> {{::$ctrl.translate.instant('Available')}} {{::sale.available || 0}}">
|
||||
</vn-icon>
|
||||
<vn-icon ng-show="sale.reserved" icon="icon-reserva"></vn-icon>
|
||||
</td>
|
||||
<td number>
|
||||
</vn-td>
|
||||
<vn-td number>
|
||||
<span
|
||||
ng-click="$ctrl.showDescriptor($event, sale.itemFk)"
|
||||
class="link" pointer>
|
||||
{{sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</td>
|
||||
<td><vn-fetched-tags max-length="6" item="sale.item" title="sale.concept"/></td>
|
||||
<td number>{{::sale.quantity}}</td>
|
||||
<td number>{{::sale.price | currency:'€':2}}</td>
|
||||
<td number>{{::sale.discount}} %</td>
|
||||
<td number>{{::sale.quantity * sale.price | currency:'€':2}}</td>
|
||||
</tr>
|
||||
<tr ng-if="!$ctrl.summary.sales" class="list list-element">
|
||||
<td colspan="8" style="text-align: center" translate>No results</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</vn-td>
|
||||
<vn-td><vn-fetched-tags max-length="6" item="sale.item" title="sale.concept"/></vn-td>
|
||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||
<vn-td number>{{::sale.price | currency: 'EUR':2}}</vn-td>
|
||||
<vn-td number>{{::sale.discount}} %</vn-td>
|
||||
<vn-td number>{{::sale.quantity * sale.price | currency: 'EUR':2}}</vn-td>
|
||||
</vn-tr>
|
||||
<vn-tr ng-if="!$ctrl.summary.sales" class="list list-element">
|
||||
<vn-td colspan="8" style="text-align: center" translate>No results</vn-td>
|
||||
</vn-tr>
|
||||
</vn-tbody>
|
||||
</vn-table>
|
||||
</vn-auto>
|
||||
<vn-one ng-if="$ctrl.summary.packagings.length != 0">
|
||||
<h4 translate>Packages</h4>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
data="travels"
|
||||
auto-load="false">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "personDepartment"
|
||||
"table": "workerDepartment"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
"base": "VnModel",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "personMedia"
|
||||
"table": "workerMedia"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<vn-main-block>
|
||||
<div class="left-block">
|
||||
<div class="left-menu">
|
||||
<vn-worker-descriptor worker="$ctrl.worker"></vn-worker-descriptor>
|
||||
<vn-left-menu></vn-left-menu>
|
||||
</div>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
limit="20"
|
||||
data="workers">
|
||||
</vn-crud-model>
|
||||
<div class="index-block">
|
||||
<div class="content-block">
|
||||
<div class="vn-list">
|
||||
<vn-card pad-medium-h>
|
||||
<vn-searchbar
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div pad-large style="min-width: 30em">
|
||||
<div class="search-panel">
|
||||
<form ng-submit="$ctrl.onSearch()">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
|
|
@ -34,8 +34,8 @@
|
|||
}
|
||||
|
||||
.row {
|
||||
margin-bottom: 15px;
|
||||
overflow: hidden
|
||||
white-space: nowrap;
|
||||
margin-bottom: 15px
|
||||
}
|
||||
|
||||
.row.small {
|
||||
|
@ -52,10 +52,6 @@
|
|||
box-sizing: border-box
|
||||
}
|
||||
|
||||
.row .text, .row .control {
|
||||
overflow: hidden
|
||||
}
|
||||
|
||||
.row .description {
|
||||
position: relative;
|
||||
padding-top: 2px;
|
||||
|
@ -87,17 +83,18 @@
|
|||
}
|
||||
|
||||
.row.inline .text {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
width: 40%;
|
||||
float: left
|
||||
|
||||
}
|
||||
|
||||
.row.inline .control {
|
||||
display: inline-block;
|
||||
font-weight: bold;
|
||||
padding-left: 20px;
|
||||
color: #000;
|
||||
width: 60%;
|
||||
float: left
|
||||
width: 60%
|
||||
}
|
||||
|
||||
.row.inline .description {
|
||||
|
@ -105,36 +102,29 @@
|
|||
overflow: visible
|
||||
}
|
||||
|
||||
.grid {
|
||||
border-bottom: 3px solid #888888
|
||||
}
|
||||
|
||||
.grid .row {
|
||||
padding: 5px;
|
||||
margin-bottom: 0
|
||||
}
|
||||
|
||||
.grid .header {
|
||||
border-bottom: 1px solid #808080;
|
||||
border-top: 1px solid #808080;
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
.grid .row.inline > section {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.panel {
|
||||
border: 1px solid #DDD;
|
||||
margin-bottom: 10px;
|
||||
position: relative;
|
||||
padding:20px
|
||||
position: relative
|
||||
}
|
||||
|
||||
.panel .header {
|
||||
background-color: #FFF;
|
||||
position:absolute;
|
||||
left: 17.5px;
|
||||
top: -12px;
|
||||
padding: 2.5px 5px;
|
||||
|
||||
font-weight: bold;
|
||||
margin-top: -20px
|
||||
}
|
||||
|
||||
.panel .body {
|
||||
border: 1px solid #CCC;
|
||||
margin-top: 10px;
|
||||
overflow: hidden;
|
||||
padding: 20px
|
||||
}
|
||||
|
||||
.panel .body h3 {
|
||||
margin-top: 0
|
||||
}
|
||||
|
||||
.box {
|
||||
|
@ -162,3 +152,54 @@
|
|||
.pull-right {
|
||||
float: right
|
||||
}
|
||||
|
||||
.verticalText {
|
||||
-moz-transform: rotate(90deg);
|
||||
-webkit-transform: rotate(90deg);
|
||||
transform: rotate(90deg);
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
font-size: .65em;
|
||||
width: 200px;
|
||||
border: 2px solid #000;
|
||||
right: -110px;
|
||||
top: 50%
|
||||
}
|
||||
|
||||
vn-table {
|
||||
border-collapse: collapse;
|
||||
margin: 20px 0;
|
||||
display: table;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
vn-thead {
|
||||
border-bottom: 1px solid #808080;
|
||||
border-top: 1px solid #808080;
|
||||
display: table-header-group
|
||||
}
|
||||
|
||||
vn-tbody {
|
||||
border-top: 3px solid #888888;
|
||||
display: table-row-group
|
||||
}
|
||||
|
||||
vn-tfoot {
|
||||
border-top: 1px solid #808080;
|
||||
display: table-footer-group
|
||||
}
|
||||
|
||||
vn-tr {
|
||||
display: table-row
|
||||
}
|
||||
|
||||
vn-th {
|
||||
font-weight: bold
|
||||
}
|
||||
|
||||
vn-td, vn-th {
|
||||
vertical-align: middle;
|
||||
display: table-cell;
|
||||
text-align: left;
|
||||
padding: 5px 0
|
||||
}
|
||||
|
|
|
@ -8,6 +8,8 @@
|
|||
{"type": "report", "name": "delivery-note"},
|
||||
{"type": "report", "name": "invoice"},
|
||||
{"type": "report", "name": "rpt-claim-pickup-order"},
|
||||
{"type": "report", "name": "rpt-letter-debtor"},
|
||||
{"type": "report", "name": "rpt-sepa-core"},
|
||||
{"type": "static", "name": "email-header"},
|
||||
{"type": "static", "name": "email-footer"},
|
||||
{"type": "static", "name": "report-header"},
|
||||
|
|
|
@ -95,9 +95,10 @@ module.exports = {
|
|||
|
||||
const template = await fs.readFile(templatePath, 'utf8');
|
||||
const css = require(stylePath);
|
||||
const cssOptions = {inlinePseudoElements: true};
|
||||
|
||||
component.i18n = require(localePath);
|
||||
component.template = juice.inlineContent(template, css);
|
||||
component.template = juice.inlineContent(template, css, cssOptions);
|
||||
},
|
||||
|
||||
async toPdf(name, ctx) {
|
||||
|
|
|
@ -16,8 +16,8 @@ module.exports = app => {
|
|||
|
||||
app.get(`/api/report/${name}`, (request, response, next) => {
|
||||
reportEngine.toPdf(name, request).then(stream => {
|
||||
response.setHeader('Content-Disposition', `attachment; filename="${name}.pdf"`);
|
||||
response.setHeader('Content-type', 'application/pdf');
|
||||
// response.setHeader('Content-Disposition', `attachment; filename="${name}.pdf"`);
|
||||
// response.setHeader('Content-type', 'application/pdf');
|
||||
stream.pipe(response);
|
||||
}).catch(e => {
|
||||
next(e);
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
const database = require(`${appPath}/lib/database`);
|
||||
const emailHeader = require('../email-header');
|
||||
const emailFooter = require('../email-footer');
|
||||
const UserException = require(`${appPath}/lib/exceptions/userException`);
|
||||
|
||||
module.exports = {
|
||||
|
@ -42,7 +40,7 @@ module.exports = {
|
|||
},
|
||||
},
|
||||
components: {
|
||||
'email-header': emailHeader,
|
||||
'email-footer': emailFooter,
|
||||
'email-header': require('../email-header'),
|
||||
'email-footer': require('../email-footer'),
|
||||
},
|
||||
};
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue