diff --git a/back/model-config.json b/back/model-config.json
index 7a7b7af56..0a0772b04 100644
--- a/back/model-config.json
+++ b/back/model-config.json
@@ -38,7 +38,7 @@
"Vehicle": {
"dataSource": "vn"
},
- "UserTableConfiguration": {
+ "UserConfigView": {
"dataSource": "vn"
}
}
diff --git a/back/models/user-table-configuration.json b/back/models/user-config-view.json
similarity index 71%
rename from back/models/user-table-configuration.json
rename to back/models/user-config-view.json
index 084d64e27..1cb933079 100644
--- a/back/models/user-table-configuration.json
+++ b/back/models/user-config-view.json
@@ -1,9 +1,9 @@
{
- "name": "UserTableConfiguration",
+ "name": "UserConfigView",
"base": "VnModel",
"options": {
"mysql": {
- "table": "salix.userTableConfiguration"
+ "table": "salix.userConfigView"
}
},
"properties": {
@@ -21,10 +21,10 @@
}
},
"relations": {
- "worker": {
+ "user": {
"type": "belongsTo",
- "model": "Worker",
- "foreignKey": "workerFk"
+ "model": "Account",
+ "foreignKey": "userFk"
}
}
}
diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js
index b3b937f48..bc0135e40 100644
--- a/e2e/helpers/selectors.js
+++ b/e2e/helpers/selectors.js
@@ -164,7 +164,7 @@ export default {
newPaymentButton: `${components.vnFloatButton}`,
newPaymentBankInut: `vn-client-risk-create vn-textfield[field="$ctrl.receipt.bankFk"] input`,
newPaymentAmountInput: `vn-client-risk-create vn-textfield[field="$ctrl.receipt.amountPaid"] input`,
- saveButton: `${components.vnSubmit}`,
+ saveButton: `vn-client-risk-create vn-button[label="Save"]`,
firstRiskLineBalance: 'vn-client-risk-index vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(8)'
},
diff --git a/front/core/components/dialog/dialog.js b/front/core/components/dialog/dialog.js
index fb904f2f0..7ea588a27 100644
--- a/front/core/components/dialog/dialog.js
+++ b/front/core/components/dialog/dialog.js
@@ -47,9 +47,6 @@ export default class Dialog extends Component {
if (this.onOpen)
this.onOpen();
-
- let firstFocusable = this.element.querySelector('input, textarea');
- if (firstFocusable) firstFocusable.focus();
}
/**
diff --git a/front/salix/styles/index.js b/front/salix/styles/index.js
index 6149668b8..7f919436a 100644
--- a/front/salix/styles/index.js
+++ b/front/salix/styles/index.js
@@ -13,3 +13,4 @@ import './effects.scss';
import './order-product.scss';
import './summary.scss';
import './descriptor.scss';
+import './modal-form.scss';
diff --git a/front/salix/styles/modal-form.scss b/front/salix/styles/modal-form.scss
new file mode 100644
index 000000000..e353833e6
--- /dev/null
+++ b/front/salix/styles/modal-form.scss
@@ -0,0 +1,38 @@
+@import 'colors';
+@import "./padding";
+
+vn-dialog.modal-form {
+ vn-horizontal.header{
+ @extend .pad-small;
+ background-color: $main-01;
+ h5{
+ color: white;
+ margin: 0 auto;
+ }
+ }
+ tpl-body {
+ width: 100%;
+ }
+ table {
+ width: 100%
+ }
+ & > div{
+ padding: 0!important;
+ }
+ vn-textfield {
+ width: 100%;
+ }
+ .buttons{
+ margin-top: 0!important;
+ }
+
+ p{
+ display: none;
+ }
+ button.close > vn-icon{
+ color: white!important;
+ }
+ vn-ticket-sale-edit-discount > div {
+ padding-bottom: 0!important;
+ }
+}
\ No newline at end of file
diff --git a/modules/client/front/risk/create/index.html b/modules/client/front/risk/create/index.html
index 095d16986..950d54a52 100644
--- a/modules/client/front/risk/create/index.html
+++ b/modules/client/front/risk/create/index.html
@@ -1,44 +1,45 @@
-
-
-
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/modules/client/front/risk/create/index.js b/modules/client/front/risk/create/index.js
index a828d7264..11e701791 100644
--- a/modules/client/front/risk/create/index.js
+++ b/modules/client/front/risk/create/index.js
@@ -1,11 +1,13 @@
import ngModule from '../../module';
+import './style.scss';
class Controller {
- constructor($scope, $state, $http, $stateParams) {
+ constructor($scope, $state, $http, vnApp, $translate) {
this.$http = $http;
this.$ = $scope;
this.$state = $state;
- this.$stateParams = $stateParams;
+ this.vnApp = vnApp;
+ this.$translate = $translate;
this.receipt = {
payed: new Date(),
@@ -13,21 +15,26 @@ class Controller {
companyFk: window.localStorage.defaultCompanyFk,
bankFk: window.localStorage.defaultBankFk
};
-
- if (this.$stateParams.payed)
- this.receipt.payed = this.$stateParams.payed;
-
- if (this.$stateParams.bankFk)
- this.receipt.bankFk = this.$stateParams.bankFk;
-
- if (this.$stateParams.amountPaid)
- this.receipt.amountPaid = this.$stateParams.amountPaid;
-
- if (this.$stateParams.companyFk)
- this.receipt.companyFk = this.$stateParams.companyFk;
}
- $onInit() {
+ set payed(value) {
+ this.receipt.payed = value;
+ }
+
+ set bankFk(value) {
+ this.receipt.bankFk = value;
+ }
+
+ set amountPaid(value) {
+ this.receipt.amountPaid = value;
+ }
+
+ set companyFk(value) {
+ this.receipt.companyFk = value;
+ this.getAmountPaid();
+ }
+
+ getAmountPaid() {
let filter = {
where: {
clientFk: this.$state.params.id,
@@ -41,25 +48,34 @@ class Controller {
});
}
- cancel() {
- this.goToIndex();
+ show() {
+ this.$.dialog.show();
}
- goToIndex() {
- this.$state.go('client.card.risk.index');
+ hide() {
+ this.$.dialog.hide();
}
- onSubmit() {
- this.$.watcher.submit().then(
- () => {
- this.goToIndex();
- }
- );
+ save() {
+ let query = `/client/api/receipts`;
+ this.$http.post(query, this.receipt).then(() => {
+ this.vnApp.showSuccess(this.$translate.instant('Data saved!'));
+ this.hide();
+ if (this.onResponse)
+ this.onResponse();
+ });
}
}
-Controller.$inject = ['$scope', '$state', '$http', '$stateParams'];
+Controller.$inject = ['$scope', '$state', '$http', 'vnApp', '$translate'];
ngModule.component('vnClientRiskCreate', {
template: require('./index.html'),
- controller: Controller
+ controller: Controller,
+ bindings: {
+ payed: '',
+ bankFk: '',
+ amountPaid: '',
+ onResponse: '&?',
+ companyFk: ''
+ }
});
diff --git a/modules/client/front/risk/create/style.scss b/modules/client/front/risk/create/style.scss
new file mode 100644
index 000000000..710de47b9
--- /dev/null
+++ b/modules/client/front/risk/create/style.scss
@@ -0,0 +1,3 @@
+vn-horizontal.buttons-bar{
+ text-align: center;
+}
\ No newline at end of file
diff --git a/modules/client/front/risk/index/index.html b/modules/client/front/risk/index/index.html
index e63a616b5..43718bf35 100644
--- a/modules/client/front/risk/index/index.html
+++ b/modules/client/front/risk/index/index.html
@@ -94,13 +94,16 @@
-
-
-
-
+ fixed-bottom-right
+ ng-click="$ctrl.openCreateDialog()">
+
+
+
+
\ No newline at end of file
diff --git a/modules/client/front/risk/index/index.js b/modules/client/front/risk/index/index.js
index 14c1be3b7..6feea8b96 100644
--- a/modules/client/front/risk/index/index.js
+++ b/modules/client/front/risk/index/index.js
@@ -31,6 +31,9 @@ class Controller {
setOrder(value) {
this.params.params.companyFk = value;
this.filter.where.companyFk = value;
+ }
+
+ refresh() {
this.$.model.refresh();
this.$.riskModel.refresh();
}
@@ -55,6 +58,14 @@ class Controller {
return this._risks;
}
+ openCreateDialog() {
+ this.$.riskCreateDialog.companyFk = this.companyFk;
+ this.$.riskCreateDialog.onResponse = () => {
+ this.refresh();
+ };
+ this.$.riskCreateDialog.show();
+ }
+
onDownload() {
alert('Not implemented yet');
}
diff --git a/modules/client/front/sample/create/style.scss b/modules/client/front/sample/create/style.scss
index eecc8ad09..a958e264b 100644
--- a/modules/client/front/sample/create/style.scss
+++ b/modules/client/front/sample/create/style.scss
@@ -5,7 +5,32 @@ vn-client-sample-create {
}
tpl-body {
- min-width: 800px
+ min-width: 800px;
+
+ .container, .container h1 {
+ font-family: "Roboto","Helvetica","Arial",sans-serif;
+ font-size: 1em !important;
+
+ h1 {
+ font-weight: bold;
+ margin: auto
+ }
+
+ p {
+ margin: 1em 0
+ }
+
+ footer p {
+ font-size: 10px !important;
+ line-height: 10px
+ }
+ }
+
+
+ .title h1 {
+ font-size: 2em !important;
+ margin: 0
+ }
}
}
}
\ No newline at end of file
diff --git a/modules/item/front/descriptor/index.html b/modules/item/front/descriptor/index.html
index 7e76d2cb0..56f64c3aa 100644
--- a/modules/item/front/descriptor/index.html
+++ b/modules/item/front/descriptor/index.html
@@ -46,7 +46,7 @@
{{$ctrl.item.id}}
+ value="{{$ctrl.item.name}}">
diff --git a/modules/item/front/last-entries/index.html b/modules/item/front/last-entries/index.html
index 210bb88b1..bca5b8177 100644
--- a/modules/item/front/last-entries/index.html
+++ b/modules/item/front/last-entries/index.html
@@ -39,7 +39,7 @@
diff --git a/modules/item/front/summary/index.html b/modules/item/front/summary/index.html
index 6575b2a0b..c74dc36f9 100644
--- a/modules/item/front/summary/index.html
+++ b/modules/item/front/summary/index.html
@@ -36,7 +36,7 @@
value="{{$ctrl.summary.item.origin.name}}">
+ value="{{$ctrl.summary.item.stems}}">
diff --git a/modules/item/front/tags/index.js b/modules/item/front/tags/index.js
index 2fc30e1ac..b187e5baf 100644
--- a/modules/item/front/tags/index.js
+++ b/modules/item/front/tags/index.js
@@ -67,6 +67,7 @@ class Controller {
this.$scope.model.save().then(() => {
this.$scope.watcher.notifySaved();
this.$scope.model.refresh();
+ this.card.reload();
});
}
}
@@ -75,5 +76,8 @@ Controller.$inject = ['$stateParams', '$scope'];
ngModule.component('vnItemTags', {
template: require('./index.html'),
- controller: Controller
+ controller: Controller,
+ require: {
+ card: '^vnItemCard'
+ }
});
diff --git a/modules/item/front/ticket-descriptor/index.js b/modules/item/front/ticket-descriptor/index.js
index 948994701..53f13eb1a 100644
--- a/modules/item/front/ticket-descriptor/index.js
+++ b/modules/item/front/ticket-descriptor/index.js
@@ -1,5 +1,4 @@
import ngModule from '../module';
-import './style.scss';
class Controller {
constructor($state, $scope, $http, vnApp, $translate) {
diff --git a/modules/order/back/methods/order/catalogFilter.js b/modules/order/back/methods/order/catalogFilter.js
index 519c96267..7c609ec8d 100644
--- a/modules/order/back/methods/order/catalogFilter.js
+++ b/modules/order/back/methods/order/catalogFilter.js
@@ -37,7 +37,7 @@ module.exports = Self => {
},
});
- Self.catalogFilter = async (orderFk, orderBy, filter, tags) => {
+ Self.catalogFilter = async(orderFk, orderBy, filter, tags) => {
let conn = Self.dataSource.connector;
const stmts = [];
let stmt;
diff --git a/modules/order/front/filter/index.html b/modules/order/front/filter/index.html
index f4949c88a..f4c1c6390 100644
--- a/modules/order/front/filter/index.html
+++ b/modules/order/front/filter/index.html
@@ -19,9 +19,7 @@
-
- {{::nickname}}
+ field="$ctrl.ticket.addressFk"
+ order="isActive DESC">
+
+ {{::isActive ? '' : 'INACTIVE'}} {{::nickname}}
- {{::street}} - {{::city}} - {{::province.name}} - {{::agencyMode.name}}
diff --git a/modules/ticket/front/data/step-one/index.js b/modules/ticket/front/data/step-one/index.js
index 69d4f25c5..f3e8bf300 100644
--- a/modules/ticket/front/data/step-one/index.js
+++ b/modules/ticket/front/data/step-one/index.js
@@ -1,5 +1,6 @@
import ngModule from '../../module';
import {toJsonDate} from 'core/lib/date';
+import './style.scss';
class Controller {
constructor($scope, $http, $translate, vnApp) {
diff --git a/modules/ticket/front/data/step-one/style.scss b/modules/ticket/front/data/step-one/style.scss
new file mode 100644
index 000000000..30c25c46a
--- /dev/null
+++ b/modules/ticket/front/data/step-one/style.scss
@@ -0,0 +1,13 @@
+@import 'colors';
+
+tpl-item{
+ &.notActive {
+ background-color: $main-bg;
+ color: $secondary-font-color;
+ width: 100%;
+ }
+
+ & > .inactive {
+ text-transform: uppercase;
+ }
+}
diff --git a/modules/ticket/front/index/index.html b/modules/ticket/front/index/index.html
index 066bac993..44c35263c 100644
--- a/modules/ticket/front/index/index.html
+++ b/modules/ticket/front/index/index.html
@@ -3,7 +3,7 @@
url="/ticket/api/Tickets/filter"
limit="20"
data="tickets"
- order="shipped ASC"
+ order="shipped DESC"
auto-load="false">
@@ -74,7 +74,12 @@
{{::ticket.agencyMode}}
{{::ticket.warehouse}}
{{::ticket.total | currency: 'EUR': 2}}
-
+
+
+
{
+ this.goToTurns('ticket.weekly');
+ }, name: 'Turns', always: true},
];
if (!$stateParams.q) {
@@ -42,6 +44,10 @@ export default class Controller {
this.$.model.clear();
}
+ goToLines(ticketFk) {
+ this.$state.go('ticket.card.lines', {id: ticketFk});
+ }
+
goToTurns() {
this.$state.go('ticket.weekly');
}
diff --git a/modules/ticket/front/tracking/index/index.html b/modules/ticket/front/tracking/index/index.html
index 21ef5c176..c5a8c993b 100644
--- a/modules/ticket/front/tracking/index/index.html
+++ b/modules/ticket/front/tracking/index/index.html
@@ -34,6 +34,6 @@
-
+
\ No newline at end of file
diff --git a/print/report/sepa-core/assets/css/style.css b/print/common/css/email.css
similarity index 99%
rename from print/report/sepa-core/assets/css/style.css
rename to print/common/css/email.css
index a197ee5cd..6b15fbcba 100644
--- a/print/report/sepa-core/assets/css/style.css
+++ b/print/common/css/email.css
@@ -37,4 +37,4 @@ body {
font-size: 32px;
color: #333;
margin: 0
-}
\ No newline at end of file
+}
diff --git a/print/common/css/layout.css b/print/common/css/layout.css
index 216d9fcae..ee5a189d6 100644
--- a/print/common/css/layout.css
+++ b/print/common/css/layout.css
@@ -1,7 +1,6 @@
.container {
- font-family: arial, sans-serif;
- font-size: 16px;
- zoom: 0.55
+ font-family: "Roboto", "Helvetica", "Arial", sans-serif;
+ font-size: 16px
}
.columns {
diff --git a/print/common/css/report.css b/print/common/css/report.css
new file mode 100644
index 000000000..24b20c330
--- /dev/null
+++ b/print/common/css/report.css
@@ -0,0 +1,10 @@
+body {
+ zoom: 0.55
+}
+
+.title {
+ margin-bottom: 20px;
+ font-weight: 100;
+ margin-top: 0;
+ font-size: 2em
+}
\ No newline at end of file
diff --git a/print/config/routes.json b/print/config/routes.json
index 4fa82eea3..c8326effa 100644
--- a/print/config/routes.json
+++ b/print/config/routes.json
@@ -11,6 +11,7 @@
{"type": "report", "name": "rpt-claim-pickup-order"},
{"type": "report", "name": "rpt-letter-debtor"},
{"type": "report", "name": "rpt-sepa-core"},
+ {"type": "report", "name": "rpt-informe"},
{"type": "static", "name": "email-header"},
{"type": "static", "name": "email-footer"},
{"type": "static", "name": "report-header"},
diff --git a/print/report/claim-pickup-order/assets/css/index.js b/print/report/claim-pickup-order/assets/css/index.js
index c1943eee1..321c632dc 100644
--- a/print/report/claim-pickup-order/assets/css/index.js
+++ b/print/report/claim-pickup-order/assets/css/index.js
@@ -2,5 +2,6 @@ const CssReader = require(`${appPath}/lib/cssReader`);
module.exports = new CssReader([
`${appPath}/common/css/layout.css`,
- `${__dirname}/style.css`])
+ `${appPath}/common/css/email.css`,
+ `${appPath}/common/css/misc.css`])
.mergeStyles();
diff --git a/print/report/claim-pickup-order/assets/css/style.css b/print/report/claim-pickup-order/assets/css/style.css
deleted file mode 100644
index a197ee5cd..000000000
--- a/print/report/claim-pickup-order/assets/css/style.css
+++ /dev/null
@@ -1,40 +0,0 @@
-body {
- background-color: #EEE
-}
-
-.container {
- max-width: 600px;
- min-width: 320px;
- margin: 0 auto;
- color: #555
-}
-
-.main {
- background-color: #FFF;
- padding: 20px
-}
-
-.main a {
- color: #8dba25
-}
-
-.main h1 {
- color: #999
-}
-
-.main h3 {
- font-size: 16px
-}
-
-.title {
- background-color: #95d831;
- text-transform: uppercase;
- text-align: center;
- padding: 35px 0
-}
-
-.title h1 {
- font-size: 32px;
- color: #333;
- margin: 0
-}
\ No newline at end of file
diff --git a/print/report/claim-pickup-order/index.html b/print/report/claim-pickup-order/index.html
index 4790693f5..fa2b0c530 100644
--- a/print/report/claim-pickup-order/index.html
+++ b/print/report/claim-pickup-order/index.html
@@ -5,7 +5,9 @@
+
+
@@ -26,7 +28,9 @@
{{$t('sections.howToBuy.stock')}}
{{$t('sections.howToBuy.delivery')}}
-->
+
+