From 00dd05ba6d1bfdfceb1b16c42138d85955eb32d9 Mon Sep 17 00:00:00 2001
From: Vicente Falco
Date: Wed, 7 Jun 2017 08:43:25 +0200
Subject: [PATCH 01/98] Docker
---
Jenkinsfile | 5 +++--
services/mailer/Dockerfile | 11 +++++++++++
services/nginx/conf-dev.conf | 7 +++++--
services/nginx/conf-prod.conf | 9 ++++++---
services/production/Dockerfile | 11 +++++++++++
5 files changed, 36 insertions(+), 7 deletions(-)
create mode 100644 services/mailer/Dockerfile
create mode 100644 services/production/Dockerfile
diff --git a/Jenkinsfile b/Jenkinsfile
index 3d33de37b..aaced7ee8 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -7,14 +7,15 @@ def branchName = "${env.BRANCH_NAME}";
def branchNameTest = "preprod";
def branchNameProd = "master";
def prefixDocker = "test";
-def dockerNginxName = ["nginx", "-p 80:80 --privileged --link test-auth:auth --link test-salix:salix --link test-client:client"]
+def dockerNginxName = ["nginx", "-p 80:80 --privileged --link test-auth:auth --link test-salix:salix --link test-client:client --link test-mailer:mailer"]
def dockerAuthName = ["auth", "-p 3000:3000"]
def dockerSalixName = ["salix", "-p 3001:3001"]
def dockerClientName = ["client", "-p 3002:3002"]
+def dockerMailerName = ["mailer", "-p 3003:3003"]
def buildNumber = "${env.BUILD_NUMBER}";
-def dockers = [dockerAuthName, dockerSalixName, dockerClientName, dockerNginxName]
+def dockers = [dockerAuthName, dockerSalixName, dockerClientName, dockerMailerName, dockerNginxName]
node {
diff --git a/services/mailer/Dockerfile b/services/mailer/Dockerfile
new file mode 100644
index 000000000..1f9574a64
--- /dev/null
+++ b/services/mailer/Dockerfile
@@ -0,0 +1,11 @@
+FROM node:6.9.1
+
+COPY . /app
+
+WORKDIR /app
+
+RUN npm install
+
+CMD ["npm", "start"]
+
+EXPOSE 3003
diff --git a/services/nginx/conf-dev.conf b/services/nginx/conf-dev.conf
index 3bec6e463..51d72c315 100644
--- a/services/nginx/conf-dev.conf
+++ b/services/nginx/conf-dev.conf
@@ -31,14 +31,17 @@ http {
location ~ ^/auth(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3000/$1$is_args$args;
}
+ location ~ ^(?:/(.*))?$ {
+ proxy_pass http://127.0.0.1:3001/$1$is_args$args;
+ }
location ~ ^/client(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
}
location ~ ^/mailer(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3003/$1$is_args$args;
}
- location ~ ^(?:/(.*))?$ {
- proxy_pass http://127.0.0.1:3001/$1$is_args$args;
+ location ~ ^/production(?:/(.*))?$ {
+ proxy_pass http://127.0.0.1:3004/$1$is_args$args;
}
}
diff --git a/services/nginx/conf-prod.conf b/services/nginx/conf-prod.conf
index ac814c46f..9ba46e97e 100644
--- a/services/nginx/conf-prod.conf
+++ b/services/nginx/conf-prod.conf
@@ -19,21 +19,24 @@ http {
root /usr/share/nginx/html;
- location /static {
+ location ~ ^/static(?:/(.*))?$ {
alias /usr/share/nginx/html;
autoindex on;
}
location ~ ^/auth(?:/(.*))?$ {
proxy_pass http://auth:3000/$1$is_args$args;
}
+ location ~ ^(?:/(.*))?$ {
+ proxy_pass http://salix:3001/$1$is_args$args;
+ }
location ~ ^/client(?:/(.*))?$ {
proxy_pass http://client:3002/$1$is_args$args;
}
location ~ ^/mailer(?:/(.*))?$ {
proxy_pass http://mailer:3003/$1$is_args$args;
}
- location ~ ^(?:/(.*))?$ {
- proxy_pass http://salix:3001/$1$is_args$args;
+ location ~ ^/production(?:/(.*))?$ {
+ proxy_pass http://production:3004/$1$is_args$args;
}
}
}
diff --git a/services/production/Dockerfile b/services/production/Dockerfile
new file mode 100644
index 000000000..7c672f9a6
--- /dev/null
+++ b/services/production/Dockerfile
@@ -0,0 +1,11 @@
+FROM node:6.9.1
+
+COPY . /app
+
+WORKDIR /app
+
+RUN npm install
+
+CMD ["npm", "start"]
+
+EXPOSE 3004
From 7ec66e862c8a9c39877215da368825c312390ea3 Mon Sep 17 00:00:00 2001
From: Vicente Falco
Date: Wed, 7 Jun 2017 09:07:58 +0200
Subject: [PATCH 02/98] nginx
---
services/nginx/conf-dev.conf | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/services/nginx/conf-dev.conf b/services/nginx/conf-dev.conf
index 51d72c315..8eb6bc2ec 100644
--- a/services/nginx/conf-dev.conf
+++ b/services/nginx/conf-dev.conf
@@ -31,9 +31,7 @@ http {
location ~ ^/auth(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3000/$1$is_args$args;
}
- location ~ ^(?:/(.*))?$ {
- proxy_pass http://127.0.0.1:3001/$1$is_args$args;
- }
+
location ~ ^/client(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
}
@@ -43,6 +41,10 @@ http {
location ~ ^/production(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3004/$1$is_args$args;
}
+ # Este tiene que ser el último
+ location ~ ^(?:/(.*))?$ {
+ proxy_pass http://127.0.0.1:3001/$1$is_args$args;
+ }
}
types {
From 3ffa0205647bcf11c93e1c19d82b1d0a8c1d8353 Mon Sep 17 00:00:00 2001
From: Vicente Falco
Date: Wed, 7 Jun 2017 09:09:35 +0200
Subject: [PATCH 03/98] nginx docker
---
services/nginx/conf-dev.conf | 1 -
services/nginx/conf-prod.conf | 7 ++++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/services/nginx/conf-dev.conf b/services/nginx/conf-dev.conf
index 8eb6bc2ec..f5af8b9f6 100644
--- a/services/nginx/conf-dev.conf
+++ b/services/nginx/conf-dev.conf
@@ -31,7 +31,6 @@ http {
location ~ ^/auth(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3000/$1$is_args$args;
}
-
location ~ ^/client(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
}
diff --git a/services/nginx/conf-prod.conf b/services/nginx/conf-prod.conf
index 9ba46e97e..3e9f9f7c0 100644
--- a/services/nginx/conf-prod.conf
+++ b/services/nginx/conf-prod.conf
@@ -26,9 +26,6 @@ http {
location ~ ^/auth(?:/(.*))?$ {
proxy_pass http://auth:3000/$1$is_args$args;
}
- location ~ ^(?:/(.*))?$ {
- proxy_pass http://salix:3001/$1$is_args$args;
- }
location ~ ^/client(?:/(.*))?$ {
proxy_pass http://client:3002/$1$is_args$args;
}
@@ -38,5 +35,9 @@ http {
location ~ ^/production(?:/(.*))?$ {
proxy_pass http://production:3004/$1$is_args$args;
}
+ # Este tiene que ser el último
+ location ~ ^(?:/(.*))?$ {
+ proxy_pass http://salix:3001/$1$is_args$args;
+ }
}
}
From 51a700b6ce111ac02945412c32ebbbd1d2f2326b Mon Sep 17 00:00:00 2001
From: Dani Herrero
Date: Wed, 7 Jun 2017 13:27:57 +0200
Subject: [PATCH 04/98] date-picker v1
---
client/core/src/date-picker/date-picker.js | 28 ++++++++++++++-----
.../src/filter-panel/filter-panel.html | 4 +--
client/production/src/index/index.html | 2 +-
client/vendor/src/flatpickr.js | 6 ++++
package.json | 1 +
5 files changed, 31 insertions(+), 10 deletions(-)
create mode 100644 client/vendor/src/flatpickr.js
diff --git a/client/core/src/date-picker/date-picker.js b/client/core/src/date-picker/date-picker.js
index 8b02d1236..9f4a1647b 100644
--- a/client/core/src/date-picker/date-picker.js
+++ b/client/core/src/date-picker/date-picker.js
@@ -2,12 +2,13 @@ import {module as _module} from '../module';
import * as resolveFactory from '../lib/resolveDefaultComponents';
import * as normalizerFactory from '../lib/inputAttrsNormalizer';
import * as util from '../lib/util';
+import Flatpickr from 'vendor/src/flatpickr';
const _NAME = 'datePicker';
export const NAME = util.getName(_NAME);
-directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME];
-export function directive(resolve, normalizer) {
+directive.$inject = [resolveFactory.NAME, normalizerFactory.NAME, '$translate'];
+export function directive(resolve, normalizer, $translate) {
return {
restrict: 'E',
template: function(_, attrs) {
@@ -15,12 +16,25 @@ export function directive(resolve, normalizer) {
return resolve.getTemplate(_NAME, attrs);
},
link: function(scope, element, attrs) {
- scope.$watch(attrs.model, () => {
- let mdlField = element[0].firstChild.MaterialTextfield;
- if (mdlField)
- mdlField.updateClasses_();
+ let input = element[0];
+ let vp;
+ let initOptions = {};
+
+ if (attrs.iniOpts)
+ initOptions = scope.$eval(attrs.iniOpts);
+
+ if (!initOptions.locale)
+ initOptions.locale = $translate.use();
+
+ if (!input.matches('input'))
+ input = input.querySelector('input');
+
+ if (input)
+ vp = new Flatpickr(input, initOptions);
+
+ element.on('$destroy', function() {
+ vp.destroy();
});
- componentHandler.upgradeElement(element[0].firstChild);
}
};
}
diff --git a/client/production/src/filter-panel/filter-panel.html b/client/production/src/filter-panel/filter-panel.html
index 2bb03ead0..aa47f9066 100644
--- a/client/production/src/filter-panel/filter-panel.html
+++ b/client/production/src/filter-panel/filter-panel.html
@@ -2,7 +2,7 @@
\ No newline at end of file
diff --git a/client/production/src/filter-panel/filter-panel.js b/client/production/src/filter-panel/filter-panel.js
index c432b3b08..907df7f14 100644
--- a/client/production/src/filter-panel/filter-panel.js
+++ b/client/production/src/filter-panel/filter-panel.js
@@ -1,20 +1,24 @@
import ngModule from '../module';
+import './style.scss';
export default class Controller {
constructor($window) {
this.$window = $window;
}
+ /* $onDestroy() {
+ console.log('panel destruido');
+ }*/
onSearch() {
this.setStorageValue();
this.onSubmit(this.filter);
}
$onChanges() {
- var value = JSON.parse(this.$window.sessionStorage.getItem('production'));
+ var value = JSON.parse(this.$window.sessionStorage.getItem('filter'));
if (value !== undefined)
this.filter = value;
}
setStorageValue() {
- this.$window.sessionStorage.setItem('production', JSON.stringify(this.filter));
+ this.$window.sessionStorage.setItem('filter', JSON.stringify(this.filter));
}
}
Controller.$inject = ['$window'];
diff --git a/client/production/src/filter-panel/style.scss b/client/production/src/filter-panel/style.scss
new file mode 100644
index 000000000..f94357087
--- /dev/null
+++ b/client/production/src/filter-panel/style.scss
@@ -0,0 +1,6 @@
+vn-production-filter-panel {
+ button {
+ color: #ffa410 !important;
+ background-color: white !important;
+ }
+}
\ No newline at end of file
diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html
index 49c24f3bf..b768aab80 100644
--- a/client/production/src/index/index.html
+++ b/client/production/src/index/index.html
@@ -1,13 +1,13 @@
+
-
Localizador
@@ -18,9 +18,7 @@
url="/client/api/ContactChannels"
label="Almacen">
-
-
-
+
@@ -58,7 +56,7 @@
{{ticket.id}}
- {{ticket.agency.id}}
+ {{ticket.agency.name}}
{{ticket.employee.name}}
{{ticket.hour}}
{{ticket.state.name}}
@@ -77,8 +75,8 @@
-
-
+ {{$ctrl.lines}}
+ {{$ctrl.meters}}
diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js
index a901c863c..97c5c1d5c 100644
--- a/client/production/src/index/index.js
+++ b/client/production/src/index/index.js
@@ -2,16 +2,63 @@ import ngModule from '../module';
import './style.scss';
export default class ProductionIndex {
- constructor() {
- this.model = {};
- this.checkAll = false;
+ constructor($element, $scope) {
+ this.$element = $element;
+ this.$ = $scope;
+ this.filter = {};
+ this._checkAll = false;
this.tickets = [];
+ this.lines = 0;
+ this.meters = 0;
}
- search(index) {
- index.filter.search = this.model.search;
- index.accept();
+ get checkAll() {
+ return this._checkAll;
+ }
+ set checkAll(value) {
+ this._checkAll = value;
+ this.switchChecks();
+ }
+ switchChecks() {
+ let checks = this.$element[0].querySelectorAll('.list-body input[type="checkbox"]');
+ checks.forEach(
+ (el, i) => {
+ el.checked = this._checkAll;
+ this.tickets[i].cheched = this._checkAll;
+ }
+ );
+ }
+ doAction(action) {
+ let checks = this.$element[0].querySelectorAll('.list-body input[type="checkbox"]:checked');
+ if (checks.length) {
+ let ids = [];
+ checks.forEach(
+ (_, i) => {
+ ids.push(this.tickets[i].id);
+ }
+ );
+ // TODO: call action -> endPoint with tickets's Ids
+ } else {
+ // TODO: dialog with no items selected
+ }
+ }
+ sumTickets() {
+ let lines = 0;
+ let meters = 0;
+ this.tickets.forEach(
+ val => {
+ lines += parseFloat(val.lines);
+ meters += parseFloat(val.meters);
+ }
+ );
+ this.lines = lines;
+ this.meters = meters.toFixed(2);
+ }
+ onSearch() {
+ this.$.index.filter = this.filter;
+ this.$.index.accept();
}
}
+ProductionIndex.$inject = ['$element', '$scope'];
ngModule.component('vnProductionIndex', {
template: require('./index.html'),
diff --git a/client/production/src/index/style.scss b/client/production/src/index/style.scss
index 0571afb44..13bd38bbf 100644
--- a/client/production/src/index/style.scss
+++ b/client/production/src/index/style.scss
@@ -3,6 +3,17 @@ vn-production-index {
height: 20px;
padding: 0 6px;
}
+ vn-searchbar {
+ vn-icon{
+ padding-top: 20px;
+ }
+ vn-icon-button{
+ padding-top: 10px;
+ }
+ }
+ [pad-ten-top] {
+ padding-top: 10px;
+ }
.icon-square{
height: 36px;
}
diff --git a/client/salix/src/components/searchbar/searchbar.js b/client/salix/src/components/searchbar/searchbar.js
index 081f566f1..aac912788 100644
--- a/client/salix/src/components/searchbar/searchbar.js
+++ b/client/salix/src/components/searchbar/searchbar.js
@@ -10,9 +10,7 @@ export default class Controller {
this.$window = $window;
}
onClick(event) {
- var child = this.$document[0].createElement(this.popover);
- this.$compile(child)(this.$scope);
- this.vnPopover.show(child, this.element);
+ var child = this.vnPopover.showComponent(this.popover, this.$scope, this.element);
// XXX: ¿Existe una forma más adecuada de acceder al controlador de un componente?
var childCtrl = angular.element(child).isolateScope().$ctrl;
diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss
index 1146d9c0f..c3712646e 100644
--- a/client/salix/src/styles/misc.scss
+++ b/client/salix/src/styles/misc.scss
@@ -29,4 +29,10 @@ vn-button-bar {
}
html [text-center], .text-center {
text-align: center;
+}
+html [vn-right], .vn-right{
+ float: right;
+}
+html [vn-left], .vn-left{
+ float: left;
}
\ No newline at end of file
From 9aa549cfc5e769e83f21473527c0a1b07496ee0f Mon Sep 17 00:00:00 2001
From: Joan
Date: Thu, 8 Jun 2017 16:53:10 +0200
Subject: [PATCH 12/98] No mostrar dia de pago en metodo de pago por tarjeta.
---
gulpfile.js | 3 +--
.../template/payment-update/payment-update.html | 2 +-
.../template/payment-update/payment-update.js | 9 ++++++++-
3 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/gulpfile.js b/gulpfile.js
index b1a8968c0..5722981c0 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -57,10 +57,9 @@ gulp.task('services', ['copy'], function() {
}
});
-/* Nota (dani): Comentado para que no me borre el mock del Localizador
gulp.task('clean', function() {
return del(`${buildDir}/*`, {force: true});
-}); */
+});
// Spliting
diff --git a/services/mailer/application/template/payment-update/payment-update.html b/services/mailer/application/template/payment-update/payment-update.html
index a943ca94c..99d3a5e8b 100644
--- a/services/mailer/application/template/payment-update/payment-update.html
+++ b/services/mailer/application/template/payment-update/payment-update.html
@@ -24,7 +24,7 @@
{{_.bodyDescription}}
{{_.paymentMethod}}: {{payMethod}}
- {{_.paymentDay}}: {{paymentDay}} {{_.everyMonth}}
+ {{{paymentDay}}}
{{paymentAdvice}}
{{_.notifyError}}
diff --git a/services/mailer/application/template/payment-update/payment-update.js b/services/mailer/application/template/payment-update/payment-update.js
index 9034a2dd9..0bbf8b784 100644
--- a/services/mailer/application/template/payment-update/payment-update.js
+++ b/services/mailer/application/template/payment-update/payment-update.js
@@ -4,13 +4,20 @@ var format = require(path.join(__dirname, '../../util/format.js'));
module.exports = class PaymentUpdate {
getData(params, cb) {
- let query = `SELECT pm.name AS payMethod, pm.id AS payMethodId, c.vencimiento AS paymentDay, c.CC AS accountAddress
+ let query = `SELECT pm.name AS payMethod, pm.id AS payMethodId, c.vencimiento AS payDay, c.CC AS accountAddress
FROM Clientes AS c JOIN pay_met AS pm ON pm.id = c.pay_met_id WHERE Id_Cliente = ?`;
database.pool.query(query, [params.userId], (error, result) => {
Object.assign(this, result[0]);
cb();
});
}
+
+ get paymentDay() {
+ if (this.payMethodId != 5) {
+ return `${this._.paymentDay}: ${this.payDay} ${this._.everyMonth}
`;
+ }
+ }
+
get paymentAdvice() {
switch (this.payMethodId) {
case 4:
From e4f94206971b133a0450c8356c1b45761539bc3d Mon Sep 17 00:00:00 2001
From: Joan
Date: Mon, 12 Jun 2017 13:41:02 +0200
Subject: [PATCH 13/98] Parser de estilos en plantillas para el servicio
mailer.
---
.../mailer/application/route/manuscript.js | 4 +-
.../mailer/application/route/notification.js | 26 +++-
services/mailer/application/template.js | 33 ++++-
.../template/notice/attachment.json | 1 +
.../template/notice/locale/es.json | 11 ++
.../application/template/notice/notice.css | 0
.../application/template/notice/notice.html | 74 ++++++++++
.../application/template/notice/notice.js | 14 ++
.../payment-update/payment-update.css | 92 ++++++++++++
.../payment-update/payment-update.html | 132 +++++++++---------
services/mailer/package.json | 1 +
services/mailer/server.js | 9 +-
12 files changed, 320 insertions(+), 77 deletions(-)
create mode 100644 services/mailer/application/template/notice/attachment.json
create mode 100644 services/mailer/application/template/notice/locale/es.json
create mode 100644 services/mailer/application/template/notice/notice.css
create mode 100644 services/mailer/application/template/notice/notice.html
create mode 100644 services/mailer/application/template/notice/notice.js
diff --git a/services/mailer/application/route/manuscript.js b/services/mailer/application/route/manuscript.js
index 6c351fad5..7c88498f5 100644
--- a/services/mailer/application/route/manuscript.js
+++ b/services/mailer/application/route/manuscript.js
@@ -5,12 +5,12 @@ var database = require('../database.js');
var template = require('../template.js');
// Escrito de cambios en méto de pago del cliente
-router.post('/:userId/:template', function(request, response, next) {
+router.post('/:userId/payment-update', function(request, response, next) {
database.pool.query('SELECT `e-mail` AS email, LOWER(p.Codigo) AS countryCode FROM Clientes AS c JOIN Paises AS p ON p.id = c.Id_Pais WHERE Id_Cliente = ?', [request.params.userId], function(error, qryRs) {
if (qryRs.length == 0)
return response.json({data: {message: 'Client not found'}});
- template.getTemplate(request.params.template, qryRs[0].countryCode, {userId: request.params.userId}, function(tplRs, error) {
+ template.getTemplate('payment-update', qryRs[0].countryCode, {userId: request.params.userId}, function(tplRs, error) {
if (error)
return response.json({data: {message: error}});
diff --git a/services/mailer/application/route/notification.js b/services/mailer/application/route/notification.js
index a7f9904a2..2c3a42743 100644
--- a/services/mailer/application/route/notification.js
+++ b/services/mailer/application/route/notification.js
@@ -1,8 +1,28 @@
var express = require('express');
var router = new express.Router();
-var format = require('../util/format.js');
-router.get('/test', function(request, response) {
- response.send("test");
+var mail = require('../mail.js');
+var database = require('../database.js');
+var template = require('../template.js');
+
+router.get('/:userId/notice', function(request, response) {
+ database.pool.query('SELECT `e-mail` AS email, LOWER(p.Codigo) AS countryCode FROM Clientes AS c JOIN Paises AS p ON p.id = c.Id_Pais WHERE Id_Cliente = ?', [request.params.userId], function(error, qryRs) {
+ if (qryRs.length == 0)
+ return response.json({data: {message: 'Client not found'}});
+
+ template.getTemplate('notice', qryRs[0].countryCode, {userId: request.params.userId}, function(tplRs, error) {
+ if (error)
+ return response.json({data: {message: error}});
+
+ mail.send(qryRs[0].email, tplRs.subject, tplRs.body, tplRs.attachments, (mailrs, error) => {
+ if (error)
+ return response.json({data: {message: error}});
+
+ return response.json({data: {message: 'Mail sent'}});
+ });
+ });
+ });
+
+ response.send(request.params.userid);
});
module.exports = router;
diff --git a/services/mailer/application/template.js b/services/mailer/application/template.js
index d484393c9..172aa2bd1 100644
--- a/services/mailer/application/template.js
+++ b/services/mailer/application/template.js
@@ -2,6 +2,7 @@ var fs = require('fs');
var mustache = require('mustache');
var locale = require('./locale.js');
var path = require('path');
+var inlineCss = require('inline-css');
module.exports = {
/**
@@ -14,6 +15,7 @@ module.exports = {
getTemplate: function(template, countryCode, params, cb) {
var templatePath = path.join(__dirname, 'template', `${template}`, `${template}.html`);
var classPath = path.join(__dirname, 'template', `${template}`, `${template}.js`);
+ var stylePath = path.join(__dirname, 'template', `${template}`, `${template}.css`);
fs.stat(templatePath, (error, stat) => {
if (error)
@@ -22,16 +24,19 @@ module.exports = {
let TemplateClass = require(classPath);
let instance = new TemplateClass();
- let getDataCb = () => {
- this.render(templatePath, instance, body => {
+ let getRenderedStyles = body => {
+ this.renderStyles(stylePath, body, body => {
var titleSubject = body.match(new RegExp('(.*?) ', 'i'))[1];
-
this.getAttachments(template, body, attachments => {
cb({body: body, subject: titleSubject, attachments: attachments});
});
});
};
+ let getDataCb = () => {
+ this.render(templatePath, instance, body => getRenderedStyles(body));
+ };
+
locale.load(template, countryCode, (translations, error) => {
instance._ = translations;
instance.getData(params, () => getDataCb());
@@ -52,6 +57,28 @@ module.exports = {
});
},
+ /**
+ * Renderiza los estilos de las plantillas.
+ * @param {String} path - Ruta de la hoja de estilos
+ * @param {String} body - Html renderizado
+ * @param {Object} cb - Callback
+ */
+ renderStyles: function(path, html, cb) {
+ fs.stat(path, error => {
+ if (error) return cb(null, 'Template stylesheet not found');
+ fs.readFile(path, 'utf8', (error, css) => {
+ let style = '';
+ let body = style + html;
+ let options = {url: ' '};
+
+ inlineCss(body, options)
+ .then(function(body) {
+ cb(body);
+ });
+ });
+ });
+ },
+
/**
* Obtiene todos los ficheros adjuntos de la plantilla
* @param {String} template - Nombre de la plantilla
diff --git a/services/mailer/application/template/notice/attachment.json b/services/mailer/application/template/notice/attachment.json
new file mode 100644
index 000000000..0637a088a
--- /dev/null
+++ b/services/mailer/application/template/notice/attachment.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/services/mailer/application/template/notice/locale/es.json b/services/mailer/application/template/notice/locale/es.json
new file mode 100644
index 000000000..b4a98a2f4
--- /dev/null
+++ b/services/mailer/application/template/notice/locale/es.json
@@ -0,0 +1,11 @@
+{
+ "subject": "Has recibido una nueva notificación",
+ "title": "Nueva notificación",
+ "hello": "Hola",
+ "bodyDescription": "test",
+ "actionButton": "Visita nuestra Web",
+ "infoButton": "Ayúdanos a mejorar",
+ "fiscalAddress": "VERDNATURA LEVANTE SL, B97367486 Avda. Espioca, 100, 46460 Silla _ www.verdnatura.es _ clientes@verdnatura.es",
+ "privacy": "- AVISO - Este mensaje es privado y confidencial, y debe ser utilizado exclusivamente por la persona destinataria del mismo. Si usted ha recibido este mensaje por error, le rogamos lo comunique al remitente y borre dicho mensaje y cualquier documento adjunto que pudiera contener. Verdnatura Levante SL no renuncia a la confidencialidad ni a ningún privilegio por causa de transmisión errónea o mal funcionamiento. Igualmente no se hace responsable de los cambios, alteraciones, errores u omisiones que pudieran hacerse al mensaje una vez enviado.",
+ "privacyLaw": "En cumplimiento de lo dispuesto en la Ley Orgánica 15/1999, de Protección de Datos de Carácter Personal, le comunicamos que los datos personales que facilite se incluirán en ficheros automatizados de VERDNATURA LEVANTE S.L., pudiendo en todo momento ejercitar los derechos de acceso, rectificación, cancelación y oposición, comunicándolo por escrito al domicilio social de la entidad. La finalidad del fichero es la gestión administrativa, contabilidad, y facturación."
+}
\ No newline at end of file
diff --git a/services/mailer/application/template/notice/notice.css b/services/mailer/application/template/notice/notice.css
new file mode 100644
index 000000000..e69de29bb
diff --git a/services/mailer/application/template/notice/notice.html b/services/mailer/application/template/notice/notice.html
new file mode 100644
index 000000000..f9990d2d2
--- /dev/null
+++ b/services/mailer/application/template/notice/notice.html
@@ -0,0 +1,74 @@
+
+
+
+ {{_.subject}}
+
+
+
+
+
+
+
+
+
+
+
+
+
{{_.title}}
+
+
+
+
+
+
Hola, {{username}}
+
{{_.bodyDescription}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{_.fiscalAddress}}
+
{{_.privacy}}
+
{{_.privacyLaw}}
+
+
+
+
+
\ No newline at end of file
diff --git a/services/mailer/application/template/notice/notice.js b/services/mailer/application/template/notice/notice.js
new file mode 100644
index 000000000..c81d05e7a
--- /dev/null
+++ b/services/mailer/application/template/notice/notice.js
@@ -0,0 +1,14 @@
+var path = require('path');
+var database = require(path.join(__dirname, '../../database.js'));
+
+module.exports = class Notice {
+ getData(params, cb) {
+ let query = `SELECT c. Cliente FROM Clientes AS c WHERE Id_Cliente = ?`;
+ database.pool.query(query, [params.userId], (error, result) => {
+ Object.assign(this, result[0]);
+ cb();
+ });
+ }
+};
+
+
diff --git a/services/mailer/application/template/payment-update/payment-update.css b/services/mailer/application/template/payment-update/payment-update.css
index e69de29bb..83fe2dd6d 100644
--- a/services/mailer/application/template/payment-update/payment-update.css
+++ b/services/mailer/application/template/payment-update/payment-update.css
@@ -0,0 +1,92 @@
+img {
+ margin: 0
+}
+
+.wrapper {
+ background-color: #EEE
+}
+
+.container {
+ font-family: arial, sans-serif;
+ max-width: 600px;
+ min-width: 320px;
+ font-size: 16px;
+ margin: 0 auto;
+ color: #555
+}
+
+.banner img {
+ width: 100%
+}
+
+.title {
+ background-color: #95d831;
+ text-align: center;
+ padding: 35px 0
+}
+
+.title h1 {
+ font-size: 32px;
+ color: #333;
+ margin: 0
+}
+
+.body {
+ background-color:#FFF;
+ padding: 20px
+}
+
+.buttons {
+ background-color: #FFF;
+ text-align: center;
+ width: 100%
+}
+
+.buttons a {
+ text-decoration: none;
+ font-size: 18px;
+ color: #fff
+}
+
+.buttons .btn {
+ background-color: #333;
+ min-width: 300px;
+ height: 72px;
+ display: inline-block;
+ text-align: center
+}
+
+.buttons .btn .text {
+ display: inline-block;
+ padding-top: 22px
+}
+
+.buttons .btn .icon {
+ background-color: #95d831;
+ text-align: center;
+ padding-top: 22px;
+ float: right;
+ height: 50px;
+ width: 70px
+}
+
+.footer {
+ background-color: #555;
+ text-align: center;
+ padding: 20px 0
+}
+
+.footer a {
+ text-decoration: none;
+ margin-right: 5px
+}
+
+.footer a img {
+ margin: 0
+}
+
+.privacy {
+ padding: 20px 0;
+ font-size: 10px;
+ font-weight: 100
+}
\ No newline at end of file
diff --git a/services/mailer/application/template/payment-update/payment-update.html b/services/mailer/application/template/payment-update/payment-update.html
index 99d3a5e8b..c1586225e 100644
--- a/services/mailer/application/template/payment-update/payment-update.html
+++ b/services/mailer/application/template/payment-update/payment-update.html
@@ -5,76 +5,76 @@
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
{{_.title}}
-
-
+
+
+
{{_.title}}
+
+
-
-
-
{{_.dear}},
-
{{_.bodyDescription}}
-
-
{{_.paymentMethod}}: {{payMethod}}
- {{{paymentDay}}}
-
-
{{paymentAdvice}}
-
{{_.notifyError}}
-
-
+
+
+
{{_.dear}},
+
{{_.bodyDescription}}
+
+
{{_.paymentMethod}}: {{payMethod}}
+ {{{paymentDay}}}
+
+
{{paymentAdvice}}
+
{{_.notifyError}}
+
+
+
+
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
{{_.fiscalAddress}}
+
{{_.privacy}}
+
{{_.privacyLaw}}
+
+
+
-
-
-
-
-
{{_.fiscalAddress}}
-
{{_.privacy}}
-
{{_.privacyLaw}}
-
-
-
\ No newline at end of file
diff --git a/services/mailer/package.json b/services/mailer/package.json
index 2cdcf26f1..6061d7b7c 100644
--- a/services/mailer/package.json
+++ b/services/mailer/package.json
@@ -6,6 +6,7 @@
"dependencies": {
"body-parser": "^1.17.2",
"express": "^4.15.3",
+ "inline-css": "^2.2.2",
"mustache": "^2.3.0",
"mysql": "^2.13.0",
"nodemailer": "^4.0.1",
diff --git a/services/mailer/server.js b/services/mailer/server.js
index ee15c67f1..cb4d1a435 100644
--- a/services/mailer/server.js
+++ b/services/mailer/server.js
@@ -22,14 +22,17 @@ app.use(function(err, req, res, next) {
// Iniciar escucha del servidor
app.start = function() {
- return app.listen(settings.app().port, function() {
+ var listener = app.listen(settings.app().port, function() {
+ var servicePath = 'http://' + listener.address().address + ':' + listener.address().port;
mail.init();
database.init();
- console.log('Mailer started at port:' + settings.app().port);
+ console.log('Web service ' + settings.app().name.toUpperCase() + ' listening at: ' + servicePath);
+ console.log('Browse your REST API at: ' + servicePath + '/mailer');
if (settings.app().debug) {
- console.log('Debug mode enabled');
+ console.log(settings.app().name.toUpperCase() + ' service debug mode enabled');
}
});
+ return listener;
};
if (require.main === module) {
From c24c12673430809fe62f5d437e31e978518b5455 Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 13 Jun 2017 08:44:40 +0200
Subject: [PATCH 14/98] fake son de tickets my model tiene el meted raw sql
---
services/client/common/models/my-model.js | 10 +-
.../common/methods/ticket/list-fake.json | 1012 +++++++++++++++++
.../production/common/methods/ticket/list.js | 44 +
services/production/common/models/Ticket.json | 10 +-
services/production/common/models/my-model.js | 10 +-
services/production/common/models/state.json | 30 +
.../common/models/ticket-state.json | 47 +
services/production/common/models/ticket.js | 9 +
services/production/server/model-config.json | 35 +-
services/service/models/my-model.js | 10 +-
10 files changed, 1205 insertions(+), 12 deletions(-)
create mode 100644 services/production/common/methods/ticket/list-fake.json
create mode 100644 services/production/common/methods/ticket/list.js
create mode 100644 services/production/common/models/state.json
create mode 100644 services/production/common/models/ticket-state.json
create mode 100644 services/production/common/models/ticket.js
diff --git a/services/client/common/models/my-model.js b/services/client/common/models/my-model.js
index 009b025f3..4d98e7f62 100644
--- a/services/client/common/models/my-model.js
+++ b/services/client/common/models/my-model.js
@@ -1,5 +1,6 @@
module.exports = function(self) {
+
self.setup = function() {
self.super_.setup.call(this);
@@ -25,7 +26,14 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
- }
+
+ };
+
+ self.rawSql = function(query, params, cb) {
+ this.dataSource.connector.execute(query, params, function(error, response) {
+ cb(error, response);
+ });
+ };
self.installMethod = function(methodName, filterCb) {
this.remoteMethod(methodName, {
diff --git a/services/production/common/methods/ticket/list-fake.json b/services/production/common/methods/ticket/list-fake.json
new file mode 100644
index 000000000..34c5e714e
--- /dev/null
+++ b/services/production/common/methods/ticket/list-fake.json
@@ -0,0 +1,1012 @@
+[
+ {
+ "Ticket": 1532629,
+ "Agency": "REC_MADRID",
+ "Worker": "LOLI LOZANO RAEZ",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 2,
+ "m3": 0.03,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532645,
+ "Agency": "CORREOSEXPRESS",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 17,
+ "State": "Libre",
+ "Lines": 9,
+ "m3": 0.21,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532656,
+ "Agency": "ZONA 32",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 35,
+ "m3": 0.42,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532690,
+ "Agency": "MRW 24h",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 4,
+ "m3": 0.21,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532729,
+ "Agency": "ZONA 25",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 17,
+ "m3": 0.45,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532742,
+ "Agency": "CORREOSEXPRESS",
+ "Worker": "DEMBA SAKHO",
+ "Hout": 17,
+ "State": "Encajado",
+ "Lines": 13,
+ "m3": 0.27,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532792,
+ "Agency": "ZONA 25",
+ "Worker": "JUAN BAUTISTA PASTOR REDONDO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 10,
+ "m3": 0.26,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532803,
+ "Agency": "ZONA 31",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 12,
+ "m3": 0.49,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532812,
+ "Agency": "ZELERIS",
+ "Worker": "JULIA LLOPIS CASTELL",
+ "Hout": 17,
+ "State": "Arreglar",
+ "Lines": 19,
+ "m3": 0.67,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532879,
+ "Agency": "ZONA 20",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 1,
+ "m3": 0.41,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532880,
+ "Agency": "ZONA 20",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 8,
+ "m3": 0.08,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1532923,
+ "Agency": "ZONA 20",
+ "Worker": "JESUS DANIEL VALLES PEREZ",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 30,
+ "m3": 0.63,
+ "Boxes": 1
+ },
+ {
+ "Ticket": 1532995,
+ "Agency": "ZONA 20",
+ "Worker": "DANIEL YAREHAM PALOMO",
+ "Hout": 20,
+ "State": "Arreglar",
+ "Lines": 54,
+ "m3": 1.62,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533009,
+ "Agency": "ZONA 25",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 20,
+ "State": "Sin Acabar",
+ "Lines": 38,
+ "m3": 0.78,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533051,
+ "Agency": "MRW 24h",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 17,
+ "State": "Sin Acabar",
+ "Lines": 19,
+ "m3": 0.91,
+ "Boxes": 2
+ },
+ {
+ "Ticket": 1533064,
+ "Agency": "MRW 24h",
+ "Worker": "JOSE JAVIER ECHEVARRIA",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 11,
+ "m3": 0.22,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533102,
+ "Agency": "MRW 24h",
+ "Worker": "LOLI LOZANO RAEZ",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 9,
+ "m3": 0.35,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533151,
+ "Agency": "ZONA 32",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 7,
+ "m3": 0.05,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533182,
+ "Agency": "ZONA 25",
+ "Worker": "CARLOS LOPEZ AMORES",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 20,
+ "m3": 0.26,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533257,
+ "Agency": "MRW 24h",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 14,
+ "m3": 0.07,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533279,
+ "Agency": "ZONA 46",
+ "Worker": "RICARD SENDRA",
+ "Hout": 15,
+ "State": "Impreso",
+ "Lines": 50,
+ "m3": 1.05,
+ "Boxes": 2
+ },
+ {
+ "Ticket": 1533284,
+ "Agency": "ZONA 20",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 18,
+ "m3": 0.21,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533314,
+ "Agency": "MRW 24h",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 3,
+ "m3": 0.05,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533316,
+ "Agency": "ZONA 25",
+ "Worker": "LOLI LOZANO RAEZ",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 17,
+ "m3": 0.49,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533319,
+ "Agency": "ZONA 25",
+ "Worker": "ELENA BASCUÑANA TORNERO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 2,
+ "m3": 0.04,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533327,
+ "Agency": "ZONA 25",
+ "Worker": "FRAN NATEK ECHEVARRIA",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 13,
+ "m3": 0.32,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533339,
+ "Agency": "ZONA 20",
+ "Worker": "ELENA BASCUÑANA TORNERO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 9,
+ "m3": 0.17,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533340,
+ "Agency": "ZONA 25",
+ "Worker": "JULIA LLOPIS CASTELL",
+ "Hout": 20,
+ "State": "Arreglar",
+ "Lines": 48,
+ "m3": 1.59,
+ "Boxes": 4.5
+ },
+ {
+ "Ticket": 1533345,
+ "Agency": "ZONA 31",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 56,
+ "m3": 0.79,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533349,
+ "Agency": "ZONA 20",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 12,
+ "m3": 0.34,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533353,
+ "Agency": "ZONA 11",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 21,
+ "State": "Libre",
+ "Lines": 10,
+ "m3": 0.08,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533359,
+ "Agency": "ZONA 20",
+ "Worker": "CARLOS LOPEZ AMORES",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 9,
+ "m3": 0.52,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533369,
+ "Agency": "INTEGRA2",
+ "Worker": "CARLOS LOPEZ AMORES",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 7,
+ "m3": 0.1,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533392,
+ "Agency": "ZONA 25",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 16,
+ "m3": 0.35,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533403,
+ "Agency": "ZONA 31",
+ "Worker": "Mª CARMEN SERRANO BAU",
+ "Hout": 19,
+ "State": "OK",
+ "Lines": 1,
+ "m3": 2.04,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533412,
+ "Agency": "ZELERIS",
+ "Worker": "CARLOS BORRAS MARTINEZ",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 5,
+ "m3": 0.04,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533425,
+ "Agency": "INTEGRA2",
+ "Worker": "CARLOS LOPEZ AMORES",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 11,
+ "m3": 0.14,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533429,
+ "Agency": "ZONA 25",
+ "Worker": "DANIEL YAREHAM PALOMO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 43,
+ "m3": 0.6,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533438,
+ "Agency": "ZELERIS",
+ "Worker": "MIGUEL ANGEL LORITE",
+ "Hout": 17,
+ "State": "Preparación",
+ "Lines": 10,
+ "m3": 0.17,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533482,
+ "Agency": "ZONA 25",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 20,
+ "State": "Sin Acabar",
+ "Lines": 30,
+ "m3": 0.42,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533486,
+ "Agency": "DHL",
+ "Worker": "JOSE JAVIER ECHEVARRIA",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 28,
+ "m3": 0.25,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533495,
+ "Agency": "REC_VILASSAR",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 16,
+ "m3": 0.08,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533507,
+ "Agency": "MRW 24h",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 16,
+ "m3": 0.39,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533557,
+ "Agency": "ZONA 11",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 21,
+ "State": "OK",
+ "Lines": 50,
+ "m3": 1.16,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533566,
+ "Agency": "ZONA 10",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 23,
+ "State": "Sin Acabar",
+ "Lines": 14,
+ "m3": 0.18,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533570,
+ "Agency": "MRW 24h",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 13,
+ "m3": 0.17,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533580,
+ "Agency": "ZELERIS_10",
+ "Worker": "DEMBA SAKHO",
+ "Hout": 17,
+ "State": "Encajado",
+ "Lines": 4,
+ "m3": 0.13,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533584,
+ "Agency": "ZONA 20",
+ "Worker": "JESUS DANIEL VALLES PEREZ",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 20,
+ "m3": 0.67,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533585,
+ "Agency": "ZELERIS_10",
+ "Worker": "FRAN NATEK ECHEVARRIA",
+ "Hout": 17,
+ "State": "Sin Acabar",
+ "Lines": 1,
+ "m3": 0.01,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533591,
+ "Agency": "ZONA 46",
+ "Worker": "JUANLU GALLETERO",
+ "Hout": 15,
+ "State": "Revisado",
+ "Lines": 16,
+ "m3": 0.3,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533641,
+ "Agency": "ZONA 25",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 28,
+ "m3": 0.75,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533685,
+ "Agency": "ZONA 20",
+ "Worker": "Mª CARMEN SERRANO BAU",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 39,
+ "m3": 0.78,
+ "Boxes": 1
+ },
+ {
+ "Ticket": 1533688,
+ "Agency": "ZONA 20",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 7,
+ "m3": 0.19,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533795,
+ "Agency": "ZONA 25",
+ "Worker": "MANOLI PULIDO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 16,
+ "m3": 0.3,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533797,
+ "Agency": "ZONA 25",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 20,
+ "m3": 0.33,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533807,
+ "Agency": "ZONA 25",
+ "Worker": "ESDENKA CALERO PEREZ",
+ "Hout": 20,
+ "State": "Arreglar",
+ "Lines": 16,
+ "m3": 0.14,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533815,
+ "Agency": "ZELERIS_10",
+ "Worker": "RODRIGO HALABI ROCHA",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 15,
+ "m3": 0.2,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533849,
+ "Agency": "MRW 24h",
+ "Worker": "JUAN CARLOS LORENZO SANCHEZ",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 18,
+ "m3": 0.25,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533852,
+ "Agency": "MRW 24h",
+ "Worker": "DANIEL YAREHAM PALOMO",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 17,
+ "m3": 0.68,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533854,
+ "Agency": "ZONA 20",
+ "Worker": "MANOLI PULIDO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 11,
+ "m3": 0.13,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533863,
+ "Agency": "ZELERIS_10",
+ "Worker": "DEMBA SAKHO",
+ "Hout": 17,
+ "State": "Encajado",
+ "Lines": 6,
+ "m3": 0.16,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533882,
+ "Agency": "ZONA 20",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 9,
+ "m3": 0.44,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533889,
+ "Agency": "MRW 24h",
+ "Worker": "ELENA BASCUÑANA TORNERO",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 10,
+ "m3": 0.5,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533893,
+ "Agency": "ZONA 32",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 2,
+ "m3": 0.13,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533915,
+ "Agency": "CORREOSEXPRESS",
+ "Worker": "JUAN BAUTISTA PASTOR REDONDO",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 9,
+ "m3": 0.36,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533919,
+ "Agency": "ZONA 20",
+ "Worker": "JULIA LLOPIS CASTELL",
+ "Hout": 20,
+ "State": "Arreglar",
+ "Lines": 16,
+ "m3": 0.23,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533983,
+ "Agency": "ZONA 11",
+ "Worker": "MANOLI PULIDO",
+ "Hout": 21,
+ "State": "OK",
+ "Lines": 30,
+ "m3": 1.92,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1533992,
+ "Agency": "ZONA 25",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 32,
+ "m3": 0.23,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534032,
+ "Agency": "MRW 24h",
+ "Worker": "JESUS DANIEL VALLES PEREZ",
+ "Hout": 17,
+ "State": "Sin Acabar",
+ "Lines": 4,
+ "m3": 0.04,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534033,
+ "Agency": "ZONA 31",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 14,
+ "m3": 0.65,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534055,
+ "Agency": "ZONA 32",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 42,
+ "m3": 1.09,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534076,
+ "Agency": "REC_VILASSAR",
+ "Worker": "CRISTINA SANCHEZ BARRUGUER",
+ "Hout": 19,
+ "State": "OK",
+ "Lines": 4,
+ "m3": 0.03,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534101,
+ "Agency": "CORREOSEXPRESS",
+ "Worker": "JESUS DANIEL VALLES PEREZ",
+ "Hout": 17,
+ "State": "Sin Acabar",
+ "Lines": 1,
+ "m3": 0.02,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534186,
+ "Agency": "ZONA 32",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 16,
+ "m3": 0.4,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534187,
+ "Agency": "ZONA 46",
+ "Worker": "MIGUEL ANGEL LORITE",
+ "Hout": 15,
+ "State": "Preparado",
+ "Lines": 3,
+ "m3": 0.17,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534212,
+ "Agency": "ZELERIS_10",
+ "Worker": "RODRIGO HALABI ROCHA",
+ "Hout": 17,
+ "State": "Bloqueado",
+ "Lines": 2,
+ "m3": 0.07,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534223,
+ "Agency": "ZONA 10",
+ "Worker": "JESUS DANIEL VALLES PEREZ",
+ "Hout": 23,
+ "State": "Sin Acabar",
+ "Lines": 4,
+ "m3": 0.05,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534236,
+ "Agency": "REC_MADRID",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 20,
+ "State": "Libre",
+ "Lines": 5,
+ "m3": 0.04,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534240,
+ "Agency": "ZONA 46",
+ "Worker": "MARIA JOSE LAMELA FELIPE",
+ "Hout": 15,
+ "State": "OK",
+ "Lines": 47,
+ "m3": 0.91,
+ "Boxes": 1
+ },
+ {
+ "Ticket": 1534252,
+ "Agency": "VIAEXPRESS Interdia",
+ "Worker": "DEMBA SAKHO",
+ "Hout": 12,
+ "State": "Encajado",
+ "Lines": 2,
+ "m3": 0.02,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534258,
+ "Agency": "ZONA 20",
+ "Worker": "DANIEL YAREHAM PALOMO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 5,
+ "m3": 0.18,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534261,
+ "Agency": "REC_VILASSAR",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 19,
+ "State": "Libre",
+ "Lines": 5,
+ "m3": 0.18,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534264,
+ "Agency": "ZONA 20",
+ "Worker": "JOSE VICENTE DOMINGO SANCHEZ",
+ "Hout": 20,
+ "State": "Sin Acabar",
+ "Lines": 2,
+ "m3": 0.37,
+ "Boxes": 2
+ },
+ {
+ "Ticket": 1534300,
+ "Agency": "ZONA 20",
+ "Worker": "RODRIGO HALABI ROCHA",
+ "Hout": 20,
+ "State": "Sin Acabar",
+ "Lines": 1,
+ "m3": 0.02,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534302,
+ "Agency": "ZONA 25",
+ "Worker": "LOLI LOZANO RAEZ",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 19,
+ "m3": 1.11,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534311,
+ "Agency": "ZONA 32",
+ "Worker": "JULIA LLOPIS CASTELL",
+ "Hout": 19,
+ "State": "Arreglar",
+ "Lines": 43,
+ "m3": 0.8,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534315,
+ "Agency": "ZONA 20",
+ "Worker": "DANIEL YAREHAM PALOMO",
+ "Hout": 20,
+ "State": "Asignado",
+ "Lines": 6,
+ "m3": 0.34,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534327,
+ "Agency": "ZONA 43",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 14,
+ "State": "Libre",
+ "Lines": 23,
+ "m3": 0.41,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534354,
+ "Agency": "ZONA 46",
+ "Worker": "MARIA DEL MAR GIRBES FERRUS",
+ "Hout": 15,
+ "State": "Asignado",
+ "Lines": 23,
+ "m3": 1.67,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534359,
+ "Agency": "ZELERIS",
+ "Worker": "JULIA LLOPIS CASTELL",
+ "Hout": 17,
+ "State": "Arreglar",
+ "Lines": 3,
+ "m3": 0.06,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534366,
+ "Agency": "REC_SILLA",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 23,
+ "State": "Libre",
+ "Lines": 23,
+ "m3": 0.4,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534385,
+ "Agency": "ZELERIS",
+ "Worker": "CARLOS LOPEZ AMORES",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 4,
+ "m3": 0.12,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534397,
+ "Agency": "ZONA 20",
+ "Worker": "JUAN CARLOS LORENZO SANCHEZ",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 14,
+ "m3": 0.21,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534428,
+ "Agency": "ZELERIS",
+ "Worker": "FRAN NATEK ECHEVARRIA",
+ "Hout": 17,
+ "State": "OK",
+ "Lines": 9,
+ "m3": 0.3,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534467,
+ "Agency": "MRW 24h",
+ "Worker": "COMPUTER SYSTEM",
+ "Hout": 17,
+ "State": "Libre",
+ "Lines": 15,
+ "m3": 0.12,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534477,
+ "Agency": "ZONA 11",
+ "Worker": "CRISTINA SANCHEZ BARRUGUER",
+ "Hout": 21,
+ "State": "OK",
+ "Lines": 8,
+ "m3": 0.09,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534490,
+ "Agency": "ZONA 43",
+ "Worker": "JULIA LLOPIS CASTELL",
+ "Hout": 14,
+ "State": "Arreglar",
+ "Lines": 38,
+ "m3": 1.15,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534500,
+ "Agency": "ZONA 20",
+ "Worker": "CARLOS LOPEZ AMORES",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 10,
+ "m3": 0.35,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534504,
+ "Agency": "ZONA 20",
+ "Worker": "LOLI LOZANO RAEZ",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 18,
+ "m3": 0.18,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534505,
+ "Agency": "ZONA 20",
+ "Worker": "JUAN BAUTISTA PASTOR REDONDO",
+ "Hout": 20,
+ "State": "OK",
+ "Lines": 5,
+ "m3": 0.23,
+ "Boxes": 0
+ },
+ {
+ "Ticket": 1534533,
+ "Agency": "ZONA 45",
+ "Worker": "DANIEL YAREHAM PALOMO",
+ "Hout": 24,
+ "State": "OK",
+ "Lines": 2,
+ "m3": 0.25,
+ "Boxes": 2
+ }
+]
\ No newline at end of file
diff --git a/services/production/common/methods/ticket/list.js b/services/production/common/methods/ticket/list.js
new file mode 100644
index 000000000..79dad23b9
--- /dev/null
+++ b/services/production/common/methods/ticket/list.js
@@ -0,0 +1,44 @@
+var json = require("./list-fake.json");
+
+module.exports = function(Ticket) {
+ Ticket.remoteMethod('list', {
+ description: 'List tickets for production',
+ /*accepts: {
+ arg: 'id',
+ type: 'number',
+ required: true,
+ description: 'Model id',
+ http: {source: 'path'}
+ },*/
+ returns: {
+ arg: 'tickets',
+ type: 'object'
+ },
+ http: {
+ verb: 'get',
+ path: '/list'
+ }
+ });
+
+ Ticket.list = function(cb) {
+ //list();
+ return fake(cb);
+ };
+
+ var fake = function(cb){
+ cb(null, json);
+ }
+
+ var list = function(){
+ var params = [1, 0];
+
+ var query = "CALL production_control_source(?, ?)"
+
+ var cb = function(error, res){
+ if(error) console.log(error);
+ else console.log(res);
+ };
+
+ Ticket.rawSql(query, params, cb);
+ }
+}
\ No newline at end of file
diff --git a/services/production/common/models/Ticket.json b/services/production/common/models/Ticket.json
index 16d5e07a5..4ae89da10 100644
--- a/services/production/common/models/Ticket.json
+++ b/services/production/common/models/Ticket.json
@@ -1,8 +1,14 @@
{
"name": "Ticket",
- "base": "PersistedModel",
+ "base": "MyModel",
"validateUpsert": true,
- "properties": {},
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "Number",
+ "forceId": false
+ }
+ },
"acls": [
{
"accessType": "*",
diff --git a/services/production/common/models/my-model.js b/services/production/common/models/my-model.js
index 009b025f3..4d98e7f62 100644
--- a/services/production/common/models/my-model.js
+++ b/services/production/common/models/my-model.js
@@ -1,5 +1,6 @@
module.exports = function(self) {
+
self.setup = function() {
self.super_.setup.call(this);
@@ -25,7 +26,14 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
- }
+
+ };
+
+ self.rawSql = function(query, params, cb) {
+ this.dataSource.connector.execute(query, params, function(error, response) {
+ cb(error, response);
+ });
+ };
self.installMethod = function(methodName, filterCb) {
this.remoteMethod(methodName, {
diff --git a/services/production/common/models/state.json b/services/production/common/models/state.json
new file mode 100644
index 000000000..97e2eecf3
--- /dev/null
+++ b/services/production/common/models/state.json
@@ -0,0 +1,30 @@
+{
+ "name": "State",
+ "base": "MyModel",
+ "validateUpsert": true,
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "Number",
+ "forceId": false
+ },
+ "name": {
+ "type": "String",
+ "required": false
+ }
+ },
+ "acls": [
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "DENY"
+ },
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "root",
+ "permission": "ALLOW"
+ }
+ ]
+}
diff --git a/services/production/common/models/ticket-state.json b/services/production/common/models/ticket-state.json
new file mode 100644
index 000000000..5f919ff2a
--- /dev/null
+++ b/services/production/common/models/ticket-state.json
@@ -0,0 +1,47 @@
+{
+ "name": "TicketState",
+ "base": "MyModel",
+ "validateUpsert": true,
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "Number",
+ "forceId": false
+ },
+ "updated": {
+ "type": "Date",
+ "required": false
+ }
+ },
+ "relations": {
+ "ticket": {
+ "type": "belongsTo",
+ "model": "Ticket",
+ "foreignKey": "ticketFk"
+ },
+ "state": {
+ "type": "belongsTo",
+ "model": "State",
+ "foreignKey": "stateFk"
+ },
+ "employee": {
+ "type": "belongsTo",
+ "model": "Employee",
+ "foreignKey": "employeeFk"
+ }
+ },
+ "acls": [
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "DENY"
+ },
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "root",
+ "permission": "ALLOW"
+ }
+ ]
+}
diff --git a/services/production/common/models/ticket.js b/services/production/common/models/ticket.js
new file mode 100644
index 000000000..ab62f6309
--- /dev/null
+++ b/services/production/common/models/ticket.js
@@ -0,0 +1,9 @@
+var app = require('../../server/server');
+
+module.exports = function(Ticket) {
+ var models = app.models;
+
+ // Methods
+
+ require('../methods/ticket/list.js')(Ticket);
+};
\ No newline at end of file
diff --git a/services/production/server/model-config.json b/services/production/server/model-config.json
index 8a1204120..7f29155b0 100644
--- a/services/production/server/model-config.json
+++ b/services/production/server/model-config.json
@@ -13,23 +13,44 @@
"./mixins"
]
},
- "User": {
- "dataSource": "db"
+ "user": {
+ "dataSource": "auth"
},
"AccessToken": {
- "dataSource": "db",
- "public": false
+ "dataSource": "auth",
+ "relations": {
+ "user": {
+ "type": "belongsTo",
+ "model": "user",
+ "foreignKey": "userId"
+ }
+ }
},
"ACL": {
- "dataSource": "db",
+ "dataSource": "auth",
"public": false
},
"RoleMapping": {
- "dataSource": "db",
+ "dataSource": "auth",
"public": false
},
"Role": {
- "dataSource": "db",
+ "dataSource": "auth",
"public": false
+ },
+ "Account": {
+ "dataSource": "auth"
+ },
+ "Ticket": {
+ "dataSource": "vn",
+ "public": true
+ },
+ "State":{
+ "dataSource": "vn",
+ "public": true
+ },
+ "TicketState":{
+ "dataSource": "vn",
+ "public": true
}
}
diff --git a/services/service/models/my-model.js b/services/service/models/my-model.js
index 009b025f3..4d98e7f62 100644
--- a/services/service/models/my-model.js
+++ b/services/service/models/my-model.js
@@ -1,5 +1,6 @@
module.exports = function(self) {
+
self.setup = function() {
self.super_.setup.call(this);
@@ -25,7 +26,14 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
- }
+
+ };
+
+ self.rawSql = function(query, params, cb) {
+ this.dataSource.connector.execute(query, params, function(error, response) {
+ cb(error, response);
+ });
+ };
self.installMethod = function(methodName, filterCb) {
this.remoteMethod(methodName, {
From ecf347e7e22ac9321ae09a67d9a9135d69033ea8 Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 13 Jun 2017 09:07:14 +0200
Subject: [PATCH 15/98] modificaciones fake
---
.../common/methods/ticket/list-fake.json | 404 +++++++++---------
1 file changed, 202 insertions(+), 202 deletions(-)
diff --git a/services/production/common/methods/ticket/list-fake.json b/services/production/common/methods/ticket/list-fake.json
index 34c5e714e..f8fcce9f8 100644
--- a/services/production/common/methods/ticket/list-fake.json
+++ b/services/production/common/methods/ticket/list-fake.json
@@ -3,1010 +3,1010 @@
"Ticket": 1532629,
"Agency": "REC_MADRID",
"Worker": "LOLI LOZANO RAEZ",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 2,
- "m3": 0.03,
+ "M3": 0.03,
"Boxes": 0
},
{
"Ticket": 1532645,
"Agency": "CORREOSEXPRESS",
"Worker": "COMPUTER SYSTEM",
- "Hout": 17,
+ "Hour": 17,
"State": "Libre",
"Lines": 9,
- "m3": 0.21,
+ "M3": 0.21,
"Boxes": 0
},
{
"Ticket": 1532656,
"Agency": "ZONA 32",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 35,
- "m3": 0.42,
+ "M3": 0.42,
"Boxes": 0
},
{
"Ticket": 1532690,
"Agency": "MRW 24h",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 4,
- "m3": 0.21,
+ "M3": 0.21,
"Boxes": 0
},
{
"Ticket": 1532729,
"Agency": "ZONA 25",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 17,
- "m3": 0.45,
+ "M3": 0.45,
"Boxes": 0
},
{
"Ticket": 1532742,
"Agency": "CORREOSEXPRESS",
"Worker": "DEMBA SAKHO",
- "Hout": 17,
+ "Hour": 17,
"State": "Encajado",
"Lines": 13,
- "m3": 0.27,
+ "M3": 0.27,
"Boxes": 0
},
{
"Ticket": 1532792,
"Agency": "ZONA 25",
"Worker": "JUAN BAUTISTA PASTOR REDONDO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 10,
- "m3": 0.26,
+ "M3": 0.26,
"Boxes": 0
},
{
"Ticket": 1532803,
"Agency": "ZONA 31",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 12,
- "m3": 0.49,
+ "M3": 0.49,
"Boxes": 0
},
{
"Ticket": 1532812,
"Agency": "ZELERIS",
"Worker": "JULIA LLOPIS CASTELL",
- "Hout": 17,
+ "Hour": 17,
"State": "Arreglar",
"Lines": 19,
- "m3": 0.67,
+ "M3": 0.67,
"Boxes": 0
},
{
"Ticket": 1532879,
"Agency": "ZONA 20",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 1,
- "m3": 0.41,
+ "M3": 0.41,
"Boxes": 0
},
{
"Ticket": 1532880,
"Agency": "ZONA 20",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 8,
- "m3": 0.08,
+ "M3": 0.08,
"Boxes": 0
},
{
"Ticket": 1532923,
"Agency": "ZONA 20",
"Worker": "JESUS DANIEL VALLES PEREZ",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 30,
- "m3": 0.63,
+ "M3": 0.63,
"Boxes": 1
},
{
"Ticket": 1532995,
"Agency": "ZONA 20",
"Worker": "DANIEL YAREHAM PALOMO",
- "Hout": 20,
+ "Hour": 20,
"State": "Arreglar",
"Lines": 54,
- "m3": 1.62,
+ "M3": 1.62,
"Boxes": 0
},
{
"Ticket": 1533009,
"Agency": "ZONA 25",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 20,
+ "Hour": 20,
"State": "Sin Acabar",
"Lines": 38,
- "m3": 0.78,
+ "M3": 0.78,
"Boxes": 0
},
{
"Ticket": 1533051,
"Agency": "MRW 24h",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 17,
+ "Hour": 17,
"State": "Sin Acabar",
"Lines": 19,
- "m3": 0.91,
+ "M3": 0.91,
"Boxes": 2
},
{
"Ticket": 1533064,
"Agency": "MRW 24h",
"Worker": "JOSE JAVIER ECHEVARRIA",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 11,
- "m3": 0.22,
+ "M3": 0.22,
"Boxes": 0
},
{
"Ticket": 1533102,
"Agency": "MRW 24h",
"Worker": "LOLI LOZANO RAEZ",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 9,
- "m3": 0.35,
+ "M3": 0.35,
"Boxes": 0
},
{
"Ticket": 1533151,
"Agency": "ZONA 32",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 7,
- "m3": 0.05,
+ "M3": 0.05,
"Boxes": 0
},
{
"Ticket": 1533182,
"Agency": "ZONA 25",
"Worker": "CARLOS LOPEZ AMORES",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 20,
- "m3": 0.26,
+ "M3": 0.26,
"Boxes": 0
},
{
"Ticket": 1533257,
"Agency": "MRW 24h",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 14,
- "m3": 0.07,
+ "M3": 0.07,
"Boxes": 0
},
{
"Ticket": 1533279,
"Agency": "ZONA 46",
"Worker": "RICARD SENDRA",
- "Hout": 15,
+ "Hour": 15,
"State": "Impreso",
"Lines": 50,
- "m3": 1.05,
+ "M3": 1.05,
"Boxes": 2
},
{
"Ticket": 1533284,
"Agency": "ZONA 20",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 18,
- "m3": 0.21,
+ "M3": 0.21,
"Boxes": 0
},
{
"Ticket": 1533314,
"Agency": "MRW 24h",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 3,
- "m3": 0.05,
+ "M3": 0.05,
"Boxes": 0
},
{
"Ticket": 1533316,
"Agency": "ZONA 25",
"Worker": "LOLI LOZANO RAEZ",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 17,
- "m3": 0.49,
+ "M3": 0.49,
"Boxes": 0
},
{
"Ticket": 1533319,
"Agency": "ZONA 25",
"Worker": "ELENA BASCUÑANA TORNERO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 2,
- "m3": 0.04,
+ "M3": 0.04,
"Boxes": 0
},
{
"Ticket": 1533327,
"Agency": "ZONA 25",
"Worker": "FRAN NATEK ECHEVARRIA",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 13,
- "m3": 0.32,
+ "M3": 0.32,
"Boxes": 0
},
{
"Ticket": 1533339,
"Agency": "ZONA 20",
"Worker": "ELENA BASCUÑANA TORNERO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 9,
- "m3": 0.17,
+ "M3": 0.17,
"Boxes": 0
},
{
"Ticket": 1533340,
"Agency": "ZONA 25",
"Worker": "JULIA LLOPIS CASTELL",
- "Hout": 20,
+ "Hour": 20,
"State": "Arreglar",
"Lines": 48,
- "m3": 1.59,
+ "M3": 1.59,
"Boxes": 4.5
},
{
"Ticket": 1533345,
"Agency": "ZONA 31",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 56,
- "m3": 0.79,
+ "M3": 0.79,
"Boxes": 0
},
{
"Ticket": 1533349,
"Agency": "ZONA 20",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 12,
- "m3": 0.34,
+ "M3": 0.34,
"Boxes": 0
},
{
"Ticket": 1533353,
"Agency": "ZONA 11",
"Worker": "COMPUTER SYSTEM",
- "Hout": 21,
+ "Hour": 21,
"State": "Libre",
"Lines": 10,
- "m3": 0.08,
+ "M3": 0.08,
"Boxes": 0
},
{
"Ticket": 1533359,
"Agency": "ZONA 20",
"Worker": "CARLOS LOPEZ AMORES",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 9,
- "m3": 0.52,
+ "M3": 0.52,
"Boxes": 0
},
{
"Ticket": 1533369,
"Agency": "INTEGRA2",
"Worker": "CARLOS LOPEZ AMORES",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 7,
- "m3": 0.1,
+ "M3": 0.1,
"Boxes": 0
},
{
"Ticket": 1533392,
"Agency": "ZONA 25",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 16,
- "m3": 0.35,
+ "M3": 0.35,
"Boxes": 0
},
{
"Ticket": 1533403,
"Agency": "ZONA 31",
"Worker": "Mª CARMEN SERRANO BAU",
- "Hout": 19,
+ "Hour": 19,
"State": "OK",
"Lines": 1,
- "m3": 2.04,
+ "M3": 2.04,
"Boxes": 0
},
{
"Ticket": 1533412,
"Agency": "ZELERIS",
"Worker": "CARLOS BORRAS MARTINEZ",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 5,
- "m3": 0.04,
+ "M3": 0.04,
"Boxes": 0
},
{
"Ticket": 1533425,
"Agency": "INTEGRA2",
"Worker": "CARLOS LOPEZ AMORES",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 11,
- "m3": 0.14,
+ "M3": 0.14,
"Boxes": 0
},
{
"Ticket": 1533429,
"Agency": "ZONA 25",
"Worker": "DANIEL YAREHAM PALOMO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 43,
- "m3": 0.6,
+ "M3": 0.6,
"Boxes": 0
},
{
"Ticket": 1533438,
"Agency": "ZELERIS",
"Worker": "MIGUEL ANGEL LORITE",
- "Hout": 17,
+ "Hour": 17,
"State": "Preparación",
"Lines": 10,
- "m3": 0.17,
+ "M3": 0.17,
"Boxes": 0
},
{
"Ticket": 1533482,
"Agency": "ZONA 25",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 20,
+ "Hour": 20,
"State": "Sin Acabar",
"Lines": 30,
- "m3": 0.42,
+ "M3": 0.42,
"Boxes": 0
},
{
"Ticket": 1533486,
"Agency": "DHL",
"Worker": "JOSE JAVIER ECHEVARRIA",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 28,
- "m3": 0.25,
+ "M3": 0.25,
"Boxes": 0
},
{
"Ticket": 1533495,
"Agency": "REC_VILASSAR",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 16,
- "m3": 0.08,
+ "M3": 0.08,
"Boxes": 0
},
{
"Ticket": 1533507,
"Agency": "MRW 24h",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 16,
- "m3": 0.39,
+ "M3": 0.39,
"Boxes": 0
},
{
"Ticket": 1533557,
"Agency": "ZONA 11",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 21,
+ "Hour": 21,
"State": "OK",
"Lines": 50,
- "m3": 1.16,
+ "M3": 1.16,
"Boxes": 0
},
{
"Ticket": 1533566,
"Agency": "ZONA 10",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 23,
+ "Hour": 23,
"State": "Sin Acabar",
"Lines": 14,
- "m3": 0.18,
+ "M3": 0.18,
"Boxes": 0
},
{
"Ticket": 1533570,
"Agency": "MRW 24h",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 13,
- "m3": 0.17,
+ "M3": 0.17,
"Boxes": 0
},
{
"Ticket": 1533580,
"Agency": "ZELERIS_10",
"Worker": "DEMBA SAKHO",
- "Hout": 17,
+ "Hour": 17,
"State": "Encajado",
"Lines": 4,
- "m3": 0.13,
+ "M3": 0.13,
"Boxes": 0
},
{
"Ticket": 1533584,
"Agency": "ZONA 20",
"Worker": "JESUS DANIEL VALLES PEREZ",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 20,
- "m3": 0.67,
+ "M3": 0.67,
"Boxes": 0
},
{
"Ticket": 1533585,
"Agency": "ZELERIS_10",
"Worker": "FRAN NATEK ECHEVARRIA",
- "Hout": 17,
+ "Hour": 17,
"State": "Sin Acabar",
"Lines": 1,
- "m3": 0.01,
+ "M3": 0.01,
"Boxes": 0
},
{
"Ticket": 1533591,
"Agency": "ZONA 46",
"Worker": "JUANLU GALLETERO",
- "Hout": 15,
+ "Hour": 15,
"State": "Revisado",
"Lines": 16,
- "m3": 0.3,
+ "M3": 0.3,
"Boxes": 0
},
{
"Ticket": 1533641,
"Agency": "ZONA 25",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 28,
- "m3": 0.75,
+ "M3": 0.75,
"Boxes": 0
},
{
"Ticket": 1533685,
"Agency": "ZONA 20",
"Worker": "Mª CARMEN SERRANO BAU",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 39,
- "m3": 0.78,
+ "M3": 0.78,
"Boxes": 1
},
{
"Ticket": 1533688,
"Agency": "ZONA 20",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 7,
- "m3": 0.19,
+ "M3": 0.19,
"Boxes": 0
},
{
"Ticket": 1533795,
"Agency": "ZONA 25",
"Worker": "MANOLI PULIDO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 16,
- "m3": 0.3,
+ "M3": 0.3,
"Boxes": 0
},
{
"Ticket": 1533797,
"Agency": "ZONA 25",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 20,
- "m3": 0.33,
+ "M3": 0.33,
"Boxes": 0
},
{
"Ticket": 1533807,
"Agency": "ZONA 25",
"Worker": "ESDENKA CALERO PEREZ",
- "Hout": 20,
+ "Hour": 20,
"State": "Arreglar",
"Lines": 16,
- "m3": 0.14,
+ "M3": 0.14,
"Boxes": 0
},
{
"Ticket": 1533815,
"Agency": "ZELERIS_10",
"Worker": "RODRIGO HALABI ROCHA",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 15,
- "m3": 0.2,
+ "M3": 0.2,
"Boxes": 0
},
{
"Ticket": 1533849,
"Agency": "MRW 24h",
"Worker": "JUAN CARLOS LORENZO SANCHEZ",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 18,
- "m3": 0.25,
+ "M3": 0.25,
"Boxes": 0
},
{
"Ticket": 1533852,
"Agency": "MRW 24h",
"Worker": "DANIEL YAREHAM PALOMO",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 17,
- "m3": 0.68,
+ "M3": 0.68,
"Boxes": 0
},
{
"Ticket": 1533854,
"Agency": "ZONA 20",
"Worker": "MANOLI PULIDO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 11,
- "m3": 0.13,
+ "M3": 0.13,
"Boxes": 0
},
{
"Ticket": 1533863,
"Agency": "ZELERIS_10",
"Worker": "DEMBA SAKHO",
- "Hout": 17,
+ "Hour": 17,
"State": "Encajado",
"Lines": 6,
- "m3": 0.16,
+ "M3": 0.16,
"Boxes": 0
},
{
"Ticket": 1533882,
"Agency": "ZONA 20",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 9,
- "m3": 0.44,
+ "M3": 0.44,
"Boxes": 0
},
{
"Ticket": 1533889,
"Agency": "MRW 24h",
"Worker": "ELENA BASCUÑANA TORNERO",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 10,
- "m3": 0.5,
+ "M3": 0.5,
"Boxes": 0
},
{
"Ticket": 1533893,
"Agency": "ZONA 32",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 2,
- "m3": 0.13,
+ "M3": 0.13,
"Boxes": 0
},
{
"Ticket": 1533915,
"Agency": "CORREOSEXPRESS",
"Worker": "JUAN BAUTISTA PASTOR REDONDO",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 9,
- "m3": 0.36,
+ "M3": 0.36,
"Boxes": 0
},
{
"Ticket": 1533919,
"Agency": "ZONA 20",
"Worker": "JULIA LLOPIS CASTELL",
- "Hout": 20,
+ "Hour": 20,
"State": "Arreglar",
"Lines": 16,
- "m3": 0.23,
+ "M3": 0.23,
"Boxes": 0
},
{
"Ticket": 1533983,
"Agency": "ZONA 11",
"Worker": "MANOLI PULIDO",
- "Hout": 21,
+ "Hour": 21,
"State": "OK",
"Lines": 30,
- "m3": 1.92,
+ "M3": 1.92,
"Boxes": 0
},
{
"Ticket": 1533992,
"Agency": "ZONA 25",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 32,
- "m3": 0.23,
+ "M3": 0.23,
"Boxes": 0
},
{
"Ticket": 1534032,
"Agency": "MRW 24h",
"Worker": "JESUS DANIEL VALLES PEREZ",
- "Hout": 17,
+ "Hour": 17,
"State": "Sin Acabar",
"Lines": 4,
- "m3": 0.04,
+ "M3": 0.04,
"Boxes": 0
},
{
"Ticket": 1534033,
"Agency": "ZONA 31",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 14,
- "m3": 0.65,
+ "M3": 0.65,
"Boxes": 0
},
{
"Ticket": 1534055,
"Agency": "ZONA 32",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 42,
- "m3": 1.09,
+ "M3": 1.09,
"Boxes": 0
},
{
"Ticket": 1534076,
"Agency": "REC_VILASSAR",
"Worker": "CRISTINA SANCHEZ BARRUGUER",
- "Hout": 19,
+ "Hour": 19,
"State": "OK",
"Lines": 4,
- "m3": 0.03,
+ "M3": 0.03,
"Boxes": 0
},
{
"Ticket": 1534101,
"Agency": "CORREOSEXPRESS",
"Worker": "JESUS DANIEL VALLES PEREZ",
- "Hout": 17,
+ "Hour": 17,
"State": "Sin Acabar",
"Lines": 1,
- "m3": 0.02,
+ "M3": 0.02,
"Boxes": 0
},
{
"Ticket": 1534186,
"Agency": "ZONA 32",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 16,
- "m3": 0.4,
+ "M3": 0.4,
"Boxes": 0
},
{
"Ticket": 1534187,
"Agency": "ZONA 46",
"Worker": "MIGUEL ANGEL LORITE",
- "Hout": 15,
+ "Hour": 15,
"State": "Preparado",
"Lines": 3,
- "m3": 0.17,
+ "M3": 0.17,
"Boxes": 0
},
{
"Ticket": 1534212,
"Agency": "ZELERIS_10",
"Worker": "RODRIGO HALABI ROCHA",
- "Hout": 17,
+ "Hour": 17,
"State": "Bloqueado",
"Lines": 2,
- "m3": 0.07,
+ "M3": 0.07,
"Boxes": 0
},
{
"Ticket": 1534223,
"Agency": "ZONA 10",
"Worker": "JESUS DANIEL VALLES PEREZ",
- "Hout": 23,
+ "Hour": 23,
"State": "Sin Acabar",
"Lines": 4,
- "m3": 0.05,
+ "M3": 0.05,
"Boxes": 0
},
{
"Ticket": 1534236,
"Agency": "REC_MADRID",
"Worker": "COMPUTER SYSTEM",
- "Hout": 20,
+ "Hour": 20,
"State": "Libre",
"Lines": 5,
- "m3": 0.04,
+ "M3": 0.04,
"Boxes": 0
},
{
"Ticket": 1534240,
"Agency": "ZONA 46",
"Worker": "MARIA JOSE LAMELA FELIPE",
- "Hout": 15,
+ "Hour": 15,
"State": "OK",
"Lines": 47,
- "m3": 0.91,
+ "M3": 0.91,
"Boxes": 1
},
{
"Ticket": 1534252,
"Agency": "VIAEXPRESS Interdia",
"Worker": "DEMBA SAKHO",
- "Hout": 12,
+ "Hour": 12,
"State": "Encajado",
"Lines": 2,
- "m3": 0.02,
+ "M3": 0.02,
"Boxes": 0
},
{
"Ticket": 1534258,
"Agency": "ZONA 20",
"Worker": "DANIEL YAREHAM PALOMO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 5,
- "m3": 0.18,
+ "M3": 0.18,
"Boxes": 0
},
{
"Ticket": 1534261,
"Agency": "REC_VILASSAR",
"Worker": "COMPUTER SYSTEM",
- "Hout": 19,
+ "Hour": 19,
"State": "Libre",
"Lines": 5,
- "m3": 0.18,
+ "M3": 0.18,
"Boxes": 0
},
{
"Ticket": 1534264,
"Agency": "ZONA 20",
"Worker": "JOSE VICENTE DOMINGO SANCHEZ",
- "Hout": 20,
+ "Hour": 20,
"State": "Sin Acabar",
"Lines": 2,
- "m3": 0.37,
+ "M3": 0.37,
"Boxes": 2
},
{
"Ticket": 1534300,
"Agency": "ZONA 20",
"Worker": "RODRIGO HALABI ROCHA",
- "Hout": 20,
+ "Hour": 20,
"State": "Sin Acabar",
"Lines": 1,
- "m3": 0.02,
+ "M3": 0.02,
"Boxes": 0
},
{
"Ticket": 1534302,
"Agency": "ZONA 25",
"Worker": "LOLI LOZANO RAEZ",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 19,
- "m3": 1.11,
+ "M3": 1.11,
"Boxes": 0
},
{
"Ticket": 1534311,
"Agency": "ZONA 32",
"Worker": "JULIA LLOPIS CASTELL",
- "Hout": 19,
+ "Hour": 19,
"State": "Arreglar",
"Lines": 43,
- "m3": 0.8,
+ "M3": 0.8,
"Boxes": 0
},
{
"Ticket": 1534315,
"Agency": "ZONA 20",
"Worker": "DANIEL YAREHAM PALOMO",
- "Hout": 20,
+ "Hour": 20,
"State": "Asignado",
"Lines": 6,
- "m3": 0.34,
+ "M3": 0.34,
"Boxes": 0
},
{
"Ticket": 1534327,
"Agency": "ZONA 43",
"Worker": "COMPUTER SYSTEM",
- "Hout": 14,
+ "Hour": 14,
"State": "Libre",
"Lines": 23,
- "m3": 0.41,
+ "M3": 0.41,
"Boxes": 0
},
{
"Ticket": 1534354,
"Agency": "ZONA 46",
"Worker": "MARIA DEL MAR GIRBES FERRUS",
- "Hout": 15,
+ "Hour": 15,
"State": "Asignado",
"Lines": 23,
- "m3": 1.67,
+ "M3": 1.67,
"Boxes": 0
},
{
"Ticket": 1534359,
"Agency": "ZELERIS",
"Worker": "JULIA LLOPIS CASTELL",
- "Hout": 17,
+ "Hour": 17,
"State": "Arreglar",
"Lines": 3,
- "m3": 0.06,
+ "M3": 0.06,
"Boxes": 0
},
{
"Ticket": 1534366,
"Agency": "REC_SILLA",
"Worker": "COMPUTER SYSTEM",
- "Hout": 23,
+ "Hour": 23,
"State": "Libre",
"Lines": 23,
- "m3": 0.4,
+ "M3": 0.4,
"Boxes": 0
},
{
"Ticket": 1534385,
"Agency": "ZELERIS",
"Worker": "CARLOS LOPEZ AMORES",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 4,
- "m3": 0.12,
+ "M3": 0.12,
"Boxes": 0
},
{
"Ticket": 1534397,
"Agency": "ZONA 20",
"Worker": "JUAN CARLOS LORENZO SANCHEZ",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 14,
- "m3": 0.21,
+ "M3": 0.21,
"Boxes": 0
},
{
"Ticket": 1534428,
"Agency": "ZELERIS",
"Worker": "FRAN NATEK ECHEVARRIA",
- "Hout": 17,
+ "Hour": 17,
"State": "OK",
"Lines": 9,
- "m3": 0.3,
+ "M3": 0.3,
"Boxes": 0
},
{
"Ticket": 1534467,
"Agency": "MRW 24h",
"Worker": "COMPUTER SYSTEM",
- "Hout": 17,
+ "Hour": 17,
"State": "Libre",
"Lines": 15,
- "m3": 0.12,
+ "M3": 0.12,
"Boxes": 0
},
{
"Ticket": 1534477,
"Agency": "ZONA 11",
"Worker": "CRISTINA SANCHEZ BARRUGUER",
- "Hout": 21,
+ "Hour": 21,
"State": "OK",
"Lines": 8,
- "m3": 0.09,
+ "M3": 0.09,
"Boxes": 0
},
{
"Ticket": 1534490,
"Agency": "ZONA 43",
"Worker": "JULIA LLOPIS CASTELL",
- "Hout": 14,
+ "Hour": 14,
"State": "Arreglar",
"Lines": 38,
- "m3": 1.15,
+ "M3": 1.15,
"Boxes": 0
},
{
"Ticket": 1534500,
"Agency": "ZONA 20",
"Worker": "CARLOS LOPEZ AMORES",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 10,
- "m3": 0.35,
+ "M3": 0.35,
"Boxes": 0
},
{
"Ticket": 1534504,
"Agency": "ZONA 20",
"Worker": "LOLI LOZANO RAEZ",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 18,
- "m3": 0.18,
+ "M3": 0.18,
"Boxes": 0
},
{
"Ticket": 1534505,
"Agency": "ZONA 20",
"Worker": "JUAN BAUTISTA PASTOR REDONDO",
- "Hout": 20,
+ "Hour": 20,
"State": "OK",
"Lines": 5,
- "m3": 0.23,
+ "M3": 0.23,
"Boxes": 0
},
{
"Ticket": 1534533,
"Agency": "ZONA 45",
"Worker": "DANIEL YAREHAM PALOMO",
- "Hout": 24,
+ "Hour": 24,
"State": "OK",
"Lines": 2,
- "m3": 0.25,
+ "M3": 0.25,
"Boxes": 2
}
]
\ No newline at end of file
From cbc364db3827bcc8df8a8e8fa197bdc90c6edb39 Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 13 Jun 2017 11:26:54 +0200
Subject: [PATCH 16/98] get states production
---
.../production/common/methods/state/find.js | 31 +++++++++++++++++++
services/production/common/models/state.js | 9 ++++++
services/production/common/models/state.json | 14 ++++++++-
.../common/models/ticket-state.json | 2 +-
services/production/server/datasources.json | 27 +++++++++++++++-
5 files changed, 80 insertions(+), 3 deletions(-)
create mode 100644 services/production/common/methods/state/find.js
create mode 100644 services/production/common/models/state.js
diff --git a/services/production/common/methods/state/find.js b/services/production/common/methods/state/find.js
new file mode 100644
index 000000000..f40937891
--- /dev/null
+++ b/services/production/common/methods/state/find.js
@@ -0,0 +1,31 @@
+module.exports = function(State) {
+ State.remoteMethod('productionStates', {
+ description: 'Get production states',
+ returns: {
+ arg: 'states',
+ type: 'object'
+ },
+ http: {
+ verb: 'get',
+ path: '/productionStates'
+ }
+ });
+
+ State.productionStates = function(cb) {
+ State.find(where(), function(err, states) {
+ if(!err){
+ cb(null, states);
+ }
+ });
+ };
+
+ function where() {
+ return {
+ where: {
+ "order": {gt: 0}
+ },
+ order: "order, name"
+ }
+ }
+
+}
\ No newline at end of file
diff --git a/services/production/common/models/state.js b/services/production/common/models/state.js
new file mode 100644
index 000000000..aef20d465
--- /dev/null
+++ b/services/production/common/models/state.js
@@ -0,0 +1,9 @@
+var app = require('../../server/server');
+
+module.exports = function(State) {
+ var models = app.models;
+
+ // Methods
+
+ require('../methods/state/find.js')(State);
+};
\ No newline at end of file
diff --git a/services/production/common/models/state.json b/services/production/common/models/state.json
index 97e2eecf3..9dff62432 100644
--- a/services/production/common/models/state.json
+++ b/services/production/common/models/state.json
@@ -3,7 +3,7 @@
"base": "MyModel",
"validateUpsert": true,
"properties": {
- "id": {
+ "id": {
"id": true,
"type": "Number",
"forceId": false
@@ -11,6 +11,18 @@
"name": {
"type": "String",
"required": false
+ },
+ "order":{
+ "type": "Number",
+ "required": false
+ },
+ "alertLevel":{
+ "type": "Number",
+ "required": false
+ },
+ "code":{
+ "type": "String",
+ "required": false
}
},
"acls": [
diff --git a/services/production/common/models/ticket-state.json b/services/production/common/models/ticket-state.json
index 5f919ff2a..8ece52942 100644
--- a/services/production/common/models/ticket-state.json
+++ b/services/production/common/models/ticket-state.json
@@ -3,7 +3,7 @@
"base": "MyModel",
"validateUpsert": true,
"properties": {
- "id": {
+ "id": {
"id": true,
"type": "Number",
"forceId": false
diff --git a/services/production/server/datasources.json b/services/production/server/datasources.json
index d6caf56d4..ba7db7577 100644
--- a/services/production/server/datasources.json
+++ b/services/production/server/datasources.json
@@ -1,6 +1,31 @@
{
"db": {
"name": "db",
- "connector": "memory"
+ "connector": "memory",
+ "file": "db.json"
+ },
+ "auth": {
+ "name": "mysql",
+ "connector": "mysql",
+ "database": "salix",
+ "debug": false,
+ "host": "localhost",
+ "port": 3306,
+ "username": "root",
+ "password": "",
+ "connectTimeout": 20000,
+ "acquireTimeout": 20000
+ },
+ "vn": {
+ "name": "mysql",
+ "connector": "mysql",
+ "database": "salix",
+ "debug": false,
+ "host": "localhost",
+ "port": 3306,
+ "username": "root",
+ "password": "",
+ "connectTimeout": 20000,
+ "acquireTimeout": 20000
}
}
From 87857488c0d692424e6c658f87e1c65b48cb1831 Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 13 Jun 2017 12:00:11 +0200
Subject: [PATCH 17/98] modificaciones fake son
---
.../common/methods/ticket/list-fake.json | 2420 ++++++++++-------
1 file changed, 1412 insertions(+), 1008 deletions(-)
diff --git a/services/production/common/methods/ticket/list-fake.json b/services/production/common/methods/ticket/list-fake.json
index f8fcce9f8..26089c37a 100644
--- a/services/production/common/methods/ticket/list-fake.json
+++ b/services/production/common/methods/ticket/list-fake.json
@@ -1,1012 +1,1416 @@
[
{
- "Ticket": 1532629,
- "Agency": "REC_MADRID",
- "Worker": "LOLI LOZANO RAEZ",
- "Hour": 20,
- "State": "OK",
- "Lines": 2,
- "M3": 0.03,
- "Boxes": 0
- },
- {
- "Ticket": 1532645,
- "Agency": "CORREOSEXPRESS",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 17,
- "State": "Libre",
- "Lines": 9,
- "M3": 0.21,
- "Boxes": 0
- },
- {
- "Ticket": 1532656,
- "Agency": "ZONA 32",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 35,
- "M3": 0.42,
- "Boxes": 0
- },
- {
- "Ticket": 1532690,
- "Agency": "MRW 24h",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 17,
- "State": "OK",
- "Lines": 4,
- "M3": 0.21,
- "Boxes": 0
- },
- {
- "Ticket": 1532729,
- "Agency": "ZONA 25",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 17,
- "M3": 0.45,
- "Boxes": 0
- },
- {
- "Ticket": 1532742,
- "Agency": "CORREOSEXPRESS",
- "Worker": "DEMBA SAKHO",
- "Hour": 17,
- "State": "Encajado",
- "Lines": 13,
- "M3": 0.27,
- "Boxes": 0
- },
- {
- "Ticket": 1532792,
- "Agency": "ZONA 25",
- "Worker": "JUAN BAUTISTA PASTOR REDONDO",
- "Hour": 20,
- "State": "OK",
- "Lines": 10,
- "M3": 0.26,
- "Boxes": 0
- },
- {
- "Ticket": 1532803,
- "Agency": "ZONA 31",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 12,
- "M3": 0.49,
- "Boxes": 0
- },
- {
- "Ticket": 1532812,
- "Agency": "ZELERIS",
- "Worker": "JULIA LLOPIS CASTELL",
- "Hour": 17,
- "State": "Arreglar",
- "Lines": 19,
- "M3": 0.67,
- "Boxes": 0
- },
- {
- "Ticket": 1532879,
- "Agency": "ZONA 20",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 20,
- "State": "OK",
- "Lines": 1,
- "M3": 0.41,
- "Boxes": 0
- },
- {
- "Ticket": 1532880,
- "Agency": "ZONA 20",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 8,
- "M3": 0.08,
- "Boxes": 0
- },
- {
- "Ticket": 1532923,
- "Agency": "ZONA 20",
- "Worker": "JESUS DANIEL VALLES PEREZ",
- "Hour": 20,
- "State": "OK",
- "Lines": 30,
- "M3": 0.63,
- "Boxes": 1
- },
- {
- "Ticket": 1532995,
- "Agency": "ZONA 20",
- "Worker": "DANIEL YAREHAM PALOMO",
- "Hour": 20,
- "State": "Arreglar",
- "Lines": 54,
- "M3": 1.62,
- "Boxes": 0
- },
- {
- "Ticket": 1533009,
- "Agency": "ZONA 25",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 20,
- "State": "Sin Acabar",
- "Lines": 38,
- "M3": 0.78,
- "Boxes": 0
- },
- {
- "Ticket": 1533051,
- "Agency": "MRW 24h",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 17,
- "State": "Sin Acabar",
- "Lines": 19,
- "M3": 0.91,
- "Boxes": 2
- },
- {
- "Ticket": 1533064,
- "Agency": "MRW 24h",
- "Worker": "JOSE JAVIER ECHEVARRIA",
- "Hour": 17,
- "State": "OK",
- "Lines": 11,
- "M3": 0.22,
- "Boxes": 0
- },
- {
- "Ticket": 1533102,
- "Agency": "MRW 24h",
- "Worker": "LOLI LOZANO RAEZ",
- "Hour": 17,
- "State": "OK",
- "Lines": 9,
- "M3": 0.35,
- "Boxes": 0
- },
- {
- "Ticket": 1533151,
- "Agency": "ZONA 32",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 7,
- "M3": 0.05,
- "Boxes": 0
- },
- {
- "Ticket": 1533182,
- "Agency": "ZONA 25",
- "Worker": "CARLOS LOPEZ AMORES",
- "Hour": 20,
- "State": "OK",
- "Lines": 20,
- "M3": 0.26,
- "Boxes": 0
- },
- {
- "Ticket": 1533257,
- "Agency": "MRW 24h",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 17,
- "State": "OK",
- "Lines": 14,
- "M3": 0.07,
- "Boxes": 0
- },
- {
- "Ticket": 1533279,
- "Agency": "ZONA 46",
- "Worker": "RICARD SENDRA",
- "Hour": 15,
- "State": "Impreso",
- "Lines": 50,
- "M3": 1.05,
- "Boxes": 2
- },
- {
- "Ticket": 1533284,
- "Agency": "ZONA 20",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 20,
- "State": "OK",
- "Lines": 18,
- "M3": 0.21,
- "Boxes": 0
- },
- {
- "Ticket": 1533314,
- "Agency": "MRW 24h",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 17,
- "State": "OK",
- "Lines": 3,
- "M3": 0.05,
- "Boxes": 0
- },
- {
- "Ticket": 1533316,
- "Agency": "ZONA 25",
- "Worker": "LOLI LOZANO RAEZ",
- "Hour": 20,
- "State": "OK",
- "Lines": 17,
- "M3": 0.49,
- "Boxes": 0
- },
- {
- "Ticket": 1533319,
- "Agency": "ZONA 25",
- "Worker": "ELENA BASCUÑANA TORNERO",
- "Hour": 20,
- "State": "OK",
- "Lines": 2,
- "M3": 0.04,
- "Boxes": 0
- },
- {
- "Ticket": 1533327,
- "Agency": "ZONA 25",
- "Worker": "FRAN NATEK ECHEVARRIA",
- "Hour": 20,
- "State": "OK",
- "Lines": 13,
- "M3": 0.32,
- "Boxes": 0
- },
- {
- "Ticket": 1533339,
- "Agency": "ZONA 20",
- "Worker": "ELENA BASCUÑANA TORNERO",
- "Hour": 20,
- "State": "OK",
- "Lines": 9,
- "M3": 0.17,
- "Boxes": 0
- },
- {
- "Ticket": 1533340,
- "Agency": "ZONA 25",
- "Worker": "JULIA LLOPIS CASTELL",
- "Hour": 20,
- "State": "Arreglar",
- "Lines": 48,
- "M3": 1.59,
- "Boxes": 4.5
- },
- {
- "Ticket": 1533345,
- "Agency": "ZONA 31",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 56,
- "M3": 0.79,
- "Boxes": 0
- },
- {
- "Ticket": 1533349,
- "Agency": "ZONA 20",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 12,
- "M3": 0.34,
- "Boxes": 0
- },
- {
- "Ticket": 1533353,
- "Agency": "ZONA 11",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 21,
- "State": "Libre",
- "Lines": 10,
- "M3": 0.08,
- "Boxes": 0
- },
- {
- "Ticket": 1533359,
- "Agency": "ZONA 20",
- "Worker": "CARLOS LOPEZ AMORES",
- "Hour": 20,
- "State": "OK",
- "Lines": 9,
- "M3": 0.52,
- "Boxes": 0
- },
- {
- "Ticket": 1533369,
- "Agency": "INTEGRA2",
- "Worker": "CARLOS LOPEZ AMORES",
- "Hour": 17,
- "State": "OK",
- "Lines": 7,
- "M3": 0.1,
- "Boxes": 0
- },
- {
- "Ticket": 1533392,
- "Agency": "ZONA 25",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 16,
- "M3": 0.35,
- "Boxes": 0
- },
- {
- "Ticket": 1533403,
- "Agency": "ZONA 31",
- "Worker": "Mª CARMEN SERRANO BAU",
- "Hour": 19,
- "State": "OK",
- "Lines": 1,
- "M3": 2.04,
- "Boxes": 0
- },
- {
- "Ticket": 1533412,
- "Agency": "ZELERIS",
- "Worker": "CARLOS BORRAS MARTINEZ",
- "Hour": 17,
- "State": "OK",
- "Lines": 5,
- "M3": 0.04,
- "Boxes": 0
- },
- {
- "Ticket": 1533425,
- "Agency": "INTEGRA2",
- "Worker": "CARLOS LOPEZ AMORES",
- "Hour": 17,
- "State": "OK",
- "Lines": 11,
- "M3": 0.14,
- "Boxes": 0
- },
- {
- "Ticket": 1533429,
- "Agency": "ZONA 25",
- "Worker": "DANIEL YAREHAM PALOMO",
- "Hour": 20,
- "State": "OK",
- "Lines": 43,
- "M3": 0.6,
- "Boxes": 0
- },
- {
- "Ticket": 1533438,
- "Agency": "ZELERIS",
- "Worker": "MIGUEL ANGEL LORITE",
- "Hour": 17,
- "State": "Preparación",
- "Lines": 10,
- "M3": 0.17,
- "Boxes": 0
- },
- {
- "Ticket": 1533482,
- "Agency": "ZONA 25",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 20,
- "State": "Sin Acabar",
- "Lines": 30,
- "M3": 0.42,
- "Boxes": 0
- },
- {
- "Ticket": 1533486,
- "Agency": "DHL",
- "Worker": "JOSE JAVIER ECHEVARRIA",
- "Hour": 17,
- "State": "OK",
- "Lines": 28,
- "M3": 0.25,
- "Boxes": 0
- },
- {
- "Ticket": 1533495,
- "Agency": "REC_VILASSAR",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 16,
- "M3": 0.08,
- "Boxes": 0
- },
- {
- "Ticket": 1533507,
- "Agency": "MRW 24h",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 17,
- "State": "OK",
- "Lines": 16,
- "M3": 0.39,
- "Boxes": 0
- },
- {
- "Ticket": 1533557,
- "Agency": "ZONA 11",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 21,
- "State": "OK",
- "Lines": 50,
- "M3": 1.16,
- "Boxes": 0
- },
- {
- "Ticket": 1533566,
- "Agency": "ZONA 10",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 23,
- "State": "Sin Acabar",
- "Lines": 14,
- "M3": 0.18,
- "Boxes": 0
- },
- {
- "Ticket": 1533570,
- "Agency": "MRW 24h",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 17,
- "State": "OK",
- "Lines": 13,
- "M3": 0.17,
- "Boxes": 0
- },
- {
- "Ticket": 1533580,
- "Agency": "ZELERIS_10",
- "Worker": "DEMBA SAKHO",
- "Hour": 17,
- "State": "Encajado",
- "Lines": 4,
- "M3": 0.13,
- "Boxes": 0
- },
- {
- "Ticket": 1533584,
- "Agency": "ZONA 20",
- "Worker": "JESUS DANIEL VALLES PEREZ",
- "Hour": 20,
- "State": "OK",
- "Lines": 20,
- "M3": 0.67,
- "Boxes": 0
- },
- {
- "Ticket": 1533585,
- "Agency": "ZELERIS_10",
- "Worker": "FRAN NATEK ECHEVARRIA",
- "Hour": 17,
- "State": "Sin Acabar",
- "Lines": 1,
- "M3": 0.01,
- "Boxes": 0
- },
- {
- "Ticket": 1533591,
- "Agency": "ZONA 46",
- "Worker": "JUANLU GALLETERO",
- "Hour": 15,
- "State": "Revisado",
- "Lines": 16,
- "M3": 0.3,
- "Boxes": 0
- },
- {
- "Ticket": 1533641,
- "Agency": "ZONA 25",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 28,
- "M3": 0.75,
- "Boxes": 0
- },
- {
- "Ticket": 1533685,
- "Agency": "ZONA 20",
- "Worker": "Mª CARMEN SERRANO BAU",
- "Hour": 20,
- "State": "OK",
- "Lines": 39,
- "M3": 0.78,
- "Boxes": 1
- },
- {
- "Ticket": 1533688,
- "Agency": "ZONA 20",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 7,
- "M3": 0.19,
- "Boxes": 0
- },
- {
- "Ticket": 1533795,
- "Agency": "ZONA 25",
- "Worker": "MANOLI PULIDO",
- "Hour": 20,
- "State": "OK",
- "Lines": 16,
- "M3": 0.3,
- "Boxes": 0
- },
- {
- "Ticket": 1533797,
- "Agency": "ZONA 25",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 20,
- "M3": 0.33,
- "Boxes": 0
- },
- {
- "Ticket": 1533807,
- "Agency": "ZONA 25",
- "Worker": "ESDENKA CALERO PEREZ",
- "Hour": 20,
- "State": "Arreglar",
- "Lines": 16,
- "M3": 0.14,
- "Boxes": 0
- },
- {
- "Ticket": 1533815,
- "Agency": "ZELERIS_10",
- "Worker": "RODRIGO HALABI ROCHA",
- "Hour": 17,
- "State": "OK",
- "Lines": 15,
- "M3": 0.2,
- "Boxes": 0
- },
- {
- "Ticket": 1533849,
- "Agency": "MRW 24h",
- "Worker": "JUAN CARLOS LORENZO SANCHEZ",
- "Hour": 17,
- "State": "OK",
- "Lines": 18,
- "M3": 0.25,
- "Boxes": 0
- },
- {
- "Ticket": 1533852,
- "Agency": "MRW 24h",
- "Worker": "DANIEL YAREHAM PALOMO",
- "Hour": 17,
- "State": "OK",
- "Lines": 17,
- "M3": 0.68,
- "Boxes": 0
- },
- {
- "Ticket": 1533854,
- "Agency": "ZONA 20",
- "Worker": "MANOLI PULIDO",
- "Hour": 20,
- "State": "OK",
- "Lines": 11,
- "M3": 0.13,
- "Boxes": 0
- },
- {
- "Ticket": 1533863,
- "Agency": "ZELERIS_10",
- "Worker": "DEMBA SAKHO",
- "Hour": 17,
- "State": "Encajado",
- "Lines": 6,
- "M3": 0.16,
- "Boxes": 0
- },
- {
- "Ticket": 1533882,
- "Agency": "ZONA 20",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 20,
- "State": "OK",
- "Lines": 9,
- "M3": 0.44,
- "Boxes": 0
- },
- {
- "Ticket": 1533889,
- "Agency": "MRW 24h",
- "Worker": "ELENA BASCUÑANA TORNERO",
- "Hour": 17,
- "State": "OK",
- "Lines": 10,
- "M3": 0.5,
- "Boxes": 0
- },
- {
- "Ticket": 1533893,
- "Agency": "ZONA 32",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 2,
- "M3": 0.13,
- "Boxes": 0
- },
- {
- "Ticket": 1533915,
- "Agency": "CORREOSEXPRESS",
- "Worker": "JUAN BAUTISTA PASTOR REDONDO",
- "Hour": 17,
- "State": "OK",
- "Lines": 9,
- "M3": 0.36,
- "Boxes": 0
- },
- {
- "Ticket": 1533919,
- "Agency": "ZONA 20",
- "Worker": "JULIA LLOPIS CASTELL",
- "Hour": 20,
- "State": "Arreglar",
- "Lines": 16,
- "M3": 0.23,
- "Boxes": 0
- },
- {
- "Ticket": 1533983,
- "Agency": "ZONA 11",
- "Worker": "MANOLI PULIDO",
- "Hour": 21,
- "State": "OK",
- "Lines": 30,
- "M3": 1.92,
- "Boxes": 0
- },
- {
- "Ticket": 1533992,
- "Agency": "ZONA 25",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 32,
- "M3": 0.23,
- "Boxes": 0
- },
- {
- "Ticket": 1534032,
- "Agency": "MRW 24h",
- "Worker": "JESUS DANIEL VALLES PEREZ",
- "Hour": 17,
- "State": "Sin Acabar",
- "Lines": 4,
- "M3": 0.04,
- "Boxes": 0
- },
- {
- "Ticket": 1534033,
- "Agency": "ZONA 31",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 14,
- "M3": 0.65,
- "Boxes": 0
- },
- {
- "Ticket": 1534055,
- "Agency": "ZONA 32",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 42,
- "M3": 1.09,
- "Boxes": 0
- },
- {
- "Ticket": 1534076,
- "Agency": "REC_VILASSAR",
- "Worker": "CRISTINA SANCHEZ BARRUGUER",
- "Hour": 19,
- "State": "OK",
- "Lines": 4,
- "M3": 0.03,
- "Boxes": 0
- },
- {
- "Ticket": 1534101,
- "Agency": "CORREOSEXPRESS",
- "Worker": "JESUS DANIEL VALLES PEREZ",
- "Hour": 17,
- "State": "Sin Acabar",
- "Lines": 1,
- "M3": 0.02,
- "Boxes": 0
- },
- {
- "Ticket": 1534186,
- "Agency": "ZONA 32",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 16,
- "M3": 0.4,
- "Boxes": 0
- },
- {
- "Ticket": 1534187,
- "Agency": "ZONA 46",
- "Worker": "MIGUEL ANGEL LORITE",
- "Hour": 15,
- "State": "Preparado",
- "Lines": 3,
- "M3": 0.17,
- "Boxes": 0
- },
- {
- "Ticket": 1534212,
- "Agency": "ZELERIS_10",
- "Worker": "RODRIGO HALABI ROCHA",
- "Hour": 17,
- "State": "Bloqueado",
- "Lines": 2,
- "M3": 0.07,
- "Boxes": 0
- },
- {
- "Ticket": 1534223,
- "Agency": "ZONA 10",
- "Worker": "JESUS DANIEL VALLES PEREZ",
- "Hour": 23,
- "State": "Sin Acabar",
- "Lines": 4,
- "M3": 0.05,
- "Boxes": 0
- },
- {
- "Ticket": 1534236,
- "Agency": "REC_MADRID",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 20,
- "State": "Libre",
- "Lines": 5,
- "M3": 0.04,
- "Boxes": 0
- },
- {
- "Ticket": 1534240,
- "Agency": "ZONA 46",
- "Worker": "MARIA JOSE LAMELA FELIPE",
- "Hour": 15,
- "State": "OK",
- "Lines": 47,
- "M3": 0.91,
- "Boxes": 1
- },
- {
- "Ticket": 1534252,
- "Agency": "VIAEXPRESS Interdia",
- "Worker": "DEMBA SAKHO",
- "Hour": 12,
- "State": "Encajado",
- "Lines": 2,
- "M3": 0.02,
- "Boxes": 0
- },
- {
- "Ticket": 1534258,
- "Agency": "ZONA 20",
- "Worker": "DANIEL YAREHAM PALOMO",
- "Hour": 20,
- "State": "OK",
- "Lines": 5,
- "M3": 0.18,
- "Boxes": 0
- },
- {
- "Ticket": 1534261,
- "Agency": "REC_VILASSAR",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 19,
- "State": "Libre",
- "Lines": 5,
- "M3": 0.18,
- "Boxes": 0
- },
- {
- "Ticket": 1534264,
- "Agency": "ZONA 20",
- "Worker": "JOSE VICENTE DOMINGO SANCHEZ",
- "Hour": 20,
- "State": "Sin Acabar",
- "Lines": 2,
- "M3": 0.37,
- "Boxes": 2
- },
- {
- "Ticket": 1534300,
- "Agency": "ZONA 20",
- "Worker": "RODRIGO HALABI ROCHA",
- "Hour": 20,
- "State": "Sin Acabar",
- "Lines": 1,
- "M3": 0.02,
- "Boxes": 0
- },
- {
- "Ticket": 1534302,
- "Agency": "ZONA 25",
- "Worker": "LOLI LOZANO RAEZ",
- "Hour": 20,
- "State": "OK",
- "Lines": 19,
- "M3": 1.11,
- "Boxes": 0
- },
- {
- "Ticket": 1534311,
- "Agency": "ZONA 32",
- "Worker": "JULIA LLOPIS CASTELL",
- "Hour": 19,
- "State": "Arreglar",
- "Lines": 43,
- "M3": 0.8,
- "Boxes": 0
- },
- {
- "Ticket": 1534315,
- "Agency": "ZONA 20",
- "Worker": "DANIEL YAREHAM PALOMO",
- "Hour": 20,
- "State": "Asignado",
- "Lines": 6,
- "M3": 0.34,
- "Boxes": 0
- },
- {
- "Ticket": 1534327,
- "Agency": "ZONA 43",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 14,
- "State": "Libre",
- "Lines": 23,
- "M3": 0.41,
- "Boxes": 0
- },
- {
- "Ticket": 1534354,
- "Agency": "ZONA 46",
- "Worker": "MARIA DEL MAR GIRBES FERRUS",
- "Hour": 15,
- "State": "Asignado",
- "Lines": 23,
- "M3": 1.67,
- "Boxes": 0
- },
- {
- "Ticket": 1534359,
- "Agency": "ZELERIS",
- "Worker": "JULIA LLOPIS CASTELL",
- "Hour": 17,
- "State": "Arreglar",
- "Lines": 3,
- "M3": 0.06,
- "Boxes": 0
- },
- {
- "Ticket": 1534366,
- "Agency": "REC_SILLA",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 23,
- "State": "Libre",
- "Lines": 23,
- "M3": 0.4,
- "Boxes": 0
- },
- {
- "Ticket": 1534385,
- "Agency": "ZELERIS",
- "Worker": "CARLOS LOPEZ AMORES",
- "Hour": 17,
- "State": "OK",
- "Lines": 4,
- "M3": 0.12,
- "Boxes": 0
- },
- {
- "Ticket": 1534397,
- "Agency": "ZONA 20",
- "Worker": "JUAN CARLOS LORENZO SANCHEZ",
- "Hour": 20,
- "State": "OK",
- "Lines": 14,
- "M3": 0.21,
- "Boxes": 0
- },
- {
- "Ticket": 1534428,
- "Agency": "ZELERIS",
- "Worker": "FRAN NATEK ECHEVARRIA",
- "Hour": 17,
- "State": "OK",
- "Lines": 9,
- "M3": 0.3,
- "Boxes": 0
- },
- {
- "Ticket": 1534467,
- "Agency": "MRW 24h",
- "Worker": "COMPUTER SYSTEM",
- "Hour": 17,
- "State": "Libre",
- "Lines": 15,
- "M3": 0.12,
- "Boxes": 0
- },
- {
- "Ticket": 1534477,
- "Agency": "ZONA 11",
- "Worker": "CRISTINA SANCHEZ BARRUGUER",
- "Hour": 21,
- "State": "OK",
- "Lines": 8,
- "M3": 0.09,
- "Boxes": 0
- },
- {
- "Ticket": 1534490,
- "Agency": "ZONA 43",
- "Worker": "JULIA LLOPIS CASTELL",
- "Hour": 14,
- "State": "Arreglar",
- "Lines": 38,
- "M3": 1.15,
- "Boxes": 0
- },
- {
- "Ticket": 1534500,
- "Agency": "ZONA 20",
- "Worker": "CARLOS LOPEZ AMORES",
- "Hour": 20,
- "State": "OK",
- "Lines": 10,
- "M3": 0.35,
- "Boxes": 0
- },
- {
- "Ticket": 1534504,
- "Agency": "ZONA 20",
- "Worker": "LOLI LOZANO RAEZ",
- "Hour": 20,
- "State": "OK",
- "Lines": 18,
- "M3": 0.18,
- "Boxes": 0
- },
- {
- "Ticket": 1534505,
- "Agency": "ZONA 20",
- "Worker": "JUAN BAUTISTA PASTOR REDONDO",
- "Hour": 20,
- "State": "OK",
- "Lines": 5,
- "M3": 0.23,
- "Boxes": 0
- },
- {
- "Ticket": 1534533,
- "Agency": "ZONA 45",
- "Worker": "DANIEL YAREHAM PALOMO",
- "Hour": 24,
- "State": "OK",
- "Lines": 2,
- "M3": 0.25,
- "Boxes": 2
+ "ticket": 1535516,
+ "agency": "MRW 24h",
+ "worker": "MARIA JOSE LAMELA FELIPE",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 4,
+ "m3": 0.07,
+ "boxes": 0,
+ "city": "SAN FERNANDO",
+ "province": "Cádiz",
+ "client": 7315,
+ "salePerson": "MARIA JOSE LAMELA FELIPE"
+ },
+ {
+ "ticket": 1535518,
+ "agency": "ZELERIS",
+ "worker": "JUAN CARLOS LORENZO SANCHEZ",
+ "hour": 17,
+ "state": "OK",
+ "lines": 10,
+ "m3": 0.25,
+ "boxes": 0,
+ "city": "ANDORRA",
+ "province": "Teruel",
+ "client": 1911,
+ "salePerson": "JUAN CARLOS LORENZO SANCHEZ"
+ },
+ {
+ "ticket": 1535519,
+ "agency": "ZELERIS",
+ "worker": "JOSE JULIAN SAEZ FERNANDEZ",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 8,
+ "m3": 0.42,
+ "boxes": 0,
+ "city": "AVILES",
+ "province": "Asturias",
+ "client": 4471,
+ "salePerson": "JOSE JULIAN SAEZ FERNANDEZ"
+ },
+ {
+ "ticket": 1535521,
+ "agency": "INTEGRA2",
+ "worker": "JUAN CARLOS LORENZO SANCHEZ",
+ "hour": 17,
+ "state": "Arreglar",
+ "lines": 21,
+ "m3": 0.21,
+ "boxes": 0,
+ "city": "SANXENXO",
+ "province": "Pontevedra",
+ "client": 5075,
+ "salePerson": "JUAN CARLOS LORENZO SANCHEZ"
+ },
+ {
+ "ticket": 1535523,
+ "agency": "ZELERIS",
+ "worker": "Mª CARMEN SERRANO BAU",
+ "hour": 17,
+ "state": "OK",
+ "lines": 12,
+ "m3": 0.32,
+ "boxes": 0,
+ "city": "ALHENDIN",
+ "province": "Granada",
+ "client": 1501,
+ "salePerson": "Mª CARMEN SERRANO BAU"
+ },
+ {
+ "ticket": 1535524,
+ "agency": "INTEGRA2",
+ "worker": "COMPUTER SYSTEM",
+ "hour": 17,
+ "state": "Libre",
+ "lines": 15,
+ "m3": 0.33,
+ "boxes": 0,
+ "city": "A CORUÑA",
+ "province": "La Coruña",
+ "client": 8002,
+ "salePerson": "COMPUTER SYSTEM"
+ },
+ {
+ "ticket": 1535526,
+ "agency": "ZELERIS",
+ "worker": "RODRIGO HALABI ROCHA",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 11,
+ "m3": 0.1,
+ "boxes": 0,
+ "city": "LOGROÑO",
+ "province": "La Rioja",
+ "client": 2197,
+ "salePerson": "RODRIGO HALABI ROCHA"
+ },
+ {
+ "ticket": 1535531,
+ "agency": "INTEGRA2",
+ "worker": "FRAN NATEK ECHEVARRIA",
+ "hour": 17,
+ "state": "OK",
+ "lines": 7,
+ "m3": 0.28,
+ "boxes": 0,
+ "city": "LLEIDA",
+ "province": "Lleida",
+ "client": 4227,
+ "salePerson": "FRAN NATEK ECHEVARRIA"
+ },
+ {
+ "ticket": 1535544,
+ "agency": "VIAEXPRESS Interdia",
+ "worker": "DEMBA SAKHO",
+ "hour": 12,
+ "state": "Encajado",
+ "lines": 13,
+ "m3": 0.2,
+ "boxes": 0,
+ "city": "LA POBLA DE VALLBONA",
+ "province": "Valencia",
+ "client": 2053,
+ "salePerson": "DEMBA SAKHO"
+ },
+ {
+ "ticket": 1535548,
+ "agency": "ZONA 10",
+ "worker": "CONCHA ESTEBAN VILLENA",
+ "hour": 23,
+ "state": "OK",
+ "lines": 6,
+ "m3": 0.06,
+ "boxes": 0,
+ "city": "PICANYA",
+ "province": "Valencia",
+ "client": 2879,
+ "salePerson": "CONCHA ESTEBAN VILLENA"
+ },
+ {
+ "ticket": 1535549,
+ "agency": "CORREOSEXPRESS",
+ "worker": "JAVIER VILAR PASTOR",
+ "hour": 17,
+ "state": "OK",
+ "lines": 3,
+ "m3": 0.14,
+ "boxes": 0,
+ "city": "LOJA",
+ "province": "Granada",
+ "client": 329,
+ "salePerson": "JAVIER VILAR PASTOR"
+ },
+ {
+ "ticket": 1535555,
+ "agency": "REC_VILASSAR",
+ "worker": "COMPUTER SYSTEM",
+ "hour": 19,
+ "state": "Libre",
+ "lines": 8,
+ "m3": 0.38,
+ "boxes": 0,
+ "city": "VILASSAR DE MAR",
+ "province": "Barcelona",
+ "client": 6945,
+ "salePerson": "COMPUTER SYSTEM"
+ },
+ {
+ "ticket": 1535557,
+ "agency": "CORREOSEXPRESS",
+ "worker": "MARIA DEL MAR GIRBES FERRUS",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 7,
+ "m3": 0.08,
+ "boxes": 0,
+ "city": "EL ALTET",
+ "province": "Alicante",
+ "client": 8000,
+ "salePerson": "MARIA DEL MAR GIRBES FERRUS"
+ },
+ {
+ "ticket": 1535558,
+ "agency": "ZONA 11",
+ "worker": 0,
+ "hour": 21,
+ "state": "Libre",
+ "lines": 13,
+ "m3": 0.41,
+ "boxes": 0,
+ "city": "TORREBLANCA",
+ "province": "Castellón",
+ "client": 5377,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535559,
+ "agency": "ZONA 20",
+ "worker": "ELENA BASCUÑANA TORNERO",
+ "hour": 20,
+ "state": "OK",
+ "lines": 17,
+ "m3": 0.36,
+ "boxes": 0,
+ "city": "MADRID",
+ "province": "Madrid",
+ "client": 3574,
+ "salePerson": "ELENA BASCUÑANA TORNERO"
+ },
+ {
+ "ticket": 1535560,
+ "agency": "ZONA 43",
+ "worker": "DEMBA SAKHO",
+ "hour": 14,
+ "state": "Encajado",
+ "lines": 1,
+ "m3": 0.02,
+ "boxes": 0,
+ "city": "INCA",
+ "province": "Baleares (Mallorca)",
+ "client": 7500,
+ "salePerson": "DEMBA SAKHO"
+ },
+ {
+ "ticket": 1535561,
+ "agency": "ZELERIS",
+ "worker": "MANOLI PULIDO",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 1,
+ "m3": 0.05,
+ "boxes": 0,
+ "city": "TERUEL",
+ "province": "Teruel",
+ "client": 860,
+ "salePerson": "MANOLI PULIDO"
+ },
+ {
+ "ticket": 1535562,
+ "agency": "ZONA 46",
+ "worker": "MIGUEL ANGEL LAGUNA",
+ "hour": 15,
+ "state": "Impreso",
+ "lines": 1,
+ "m3": 0.16,
+ "boxes": 2,
+ "city": "MALAGA",
+ "province": "Málaga",
+ "client": 5630,
+ "salePerson": "MIGUEL ANGEL LAGUNA"
+ },
+ {
+ "ticket": 1535573,
+ "agency": "ZONA 43",
+ "worker": "JULIAN RAMIREZ SAYAGO",
+ "hour": 14,
+ "state": "Encajado",
+ "lines": 19,
+ "m3": 0.12,
+ "boxes": 0,
+ "city": "PALMA",
+ "province": "Baleares (Mallorca)",
+ "client": 6966,
+ "salePerson": "JULIAN RAMIREZ SAYAGO"
+ },
+ {
+ "ticket": 1535578,
+ "agency": "MRW 24h",
+ "worker": "ESDENKA CALERO PEREZ",
+ "hour": 17,
+ "state": "Arreglar",
+ "lines": 7,
+ "m3": 0.12,
+ "boxes": 0,
+ "city": "VILLAMARIN DE VALDEORRAS",
+ "province": "Orense",
+ "client": 6671,
+ "salePerson": "ESDENKA CALERO PEREZ"
+ },
+ {
+ "ticket": 1535579,
+ "agency": "ZONA 46",
+ "worker": "JUANLU GALLETERO",
+ "hour": 15,
+ "state": "Revisado",
+ "lines": 5,
+ "m3": 0.14,
+ "boxes": 0,
+ "city": "MALAGA",
+ "province": "Málaga",
+ "client": 6534,
+ "salePerson": "JUANLU GALLETERO"
+ },
+ {
+ "ticket": 1535583,
+ "agency": "MRW 24h",
+ "worker": "CARLOS ZAMBRANO GARCIA",
+ "hour": 17,
+ "state": "OK",
+ "lines": 4,
+ "m3": 0.11,
+ "boxes": 0,
+ "city": "PALOMARES DEL RIO",
+ "province": "Sevilla",
+ "client": 8506,
+ "salePerson": "CARLOS ZAMBRANO GARCIA"
+ },
+ {
+ "ticket": 1535584,
+ "agency": "ZONA 46",
+ "worker": "JULIAN RAMIREZ SAYAGO",
+ "hour": 15,
+ "state": "Encajado",
+ "lines": 10,
+ "m3": 0.46,
+ "boxes": 0,
+ "city": "MARBELLA",
+ "province": "Málaga",
+ "client": 3018,
+ "salePerson": "JULIAN RAMIREZ SAYAGO"
+ },
+ {
+ "ticket": 1535589,
+ "agency": "VIAEXPRESS Interdia",
+ "worker": "DEMBA SAKHO",
+ "hour": 12,
+ "state": "Encajado",
+ "lines": 5,
+ "m3": 0.22,
+ "boxes": 0,
+ "city": "valencia",
+ "province": "Valencia",
+ "client": 3781,
+ "salePerson": "DEMBA SAKHO"
+ },
+ {
+ "ticket": 1535594,
+ "agency": "VIAEXPRESS Interdia",
+ "worker": "JULIAN RAMIREZ SAYAGO",
+ "hour": 12,
+ "state": "Encajado",
+ "lines": 5,
+ "m3": 0.2,
+ "boxes": 0,
+ "city": "BENISSODA",
+ "province": "Valencia",
+ "client": 958,
+ "salePerson": "JULIAN RAMIREZ SAYAGO"
+ },
+ {
+ "ticket": 1535597,
+ "agency": "CORREOSEXPRESS",
+ "worker": 0,
+ "hour": 17,
+ "state": "Libre",
+ "lines": 9,
+ "m3": 0.19,
+ "boxes": 0,
+ "city": "SORIA",
+ "province": "Soria",
+ "client": 2082,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535604,
+ "agency": "OTRA AGENCIA",
+ "worker": "BEGOÑA RODRIGUEZ",
+ "hour": 24,
+ "state": "Entregado",
+ "lines": 1,
+ "m3": 0,
+ "boxes": 0,
+ "city": "MADRID",
+ "province": "Madrid",
+ "client": 5134,
+ "salePerson": "BEGOÑA RODRIGUEZ"
+ },
+ {
+ "ticket": 1535610,
+ "agency": "ZELERIS",
+ "worker": 0,
+ "hour": 17,
+ "state": "Libre",
+ "lines": 3,
+ "m3": 0.06,
+ "boxes": 0,
+ "city": "VILLANUEVA DE LA SERENA",
+ "province": "Badajoz",
+ "client": 2816,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535617,
+ "agency": "REC_SILLA",
+ "worker": "OKSANA KHODORIVSKA",
+ "hour": 23,
+ "state": "Entregado",
+ "lines": 10,
+ "m3": 0.39,
+ "boxes": 0,
+ "city": "TORRENT",
+ "province": "Valencia",
+ "client": 1072,
+ "salePerson": "OKSANA KHODORIVSKA"
+ },
+ {
+ "ticket": 1535622,
+ "agency": "ZONA 25",
+ "worker": "JAVIER VILAR PASTOR",
+ "hour": 20,
+ "state": "Sin Acabar",
+ "lines": 13,
+ "m3": 0.4,
+ "boxes": 2,
+ "city": "CALZADA DE CALATRAVA",
+ "province": "Ciudad Real",
+ "client": 3921,
+ "salePerson": "JAVIER VILAR PASTOR"
+ },
+ {
+ "ticket": 1535624,
+ "agency": "ZONA 20",
+ "worker": 0,
+ "hour": 20,
+ "state": "Libre",
+ "lines": 10,
+ "m3": 0.29,
+ "boxes": 0,
+ "city": "MADRID",
+ "province": "Madrid",
+ "client": 6131,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535631,
+ "agency": "REC_VILASSAR",
+ "worker": 0,
+ "hour": 19,
+ "state": "Libre",
+ "lines": 15,
+ "m3": 0.33,
+ "boxes": 0,
+ "city": "VILASSAR DE MAR",
+ "province": "Barcelona",
+ "client": 4658,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535637,
+ "agency": "ZONA 43",
+ "worker": "JUANLU GALLETERO",
+ "hour": 14,
+ "state": "Revisado",
+ "lines": 10,
+ "m3": 0.08,
+ "boxes": 0,
+ "city": "FELANITX",
+ "province": "Baleares (Mallorca)",
+ "client": 2477,
+ "salePerson": "JUANLU GALLETERO"
+ },
+ {
+ "ticket": 1535643,
+ "agency": "VIAEXPRESS Interdia",
+ "worker": "DEMBA SAKHO",
+ "hour": 12,
+ "state": "Encajado",
+ "lines": 26,
+ "m3": 0.49,
+ "boxes": 0,
+ "city": "BURRIAN",
+ "province": "Castellón",
+ "client": 3027,
+ "salePerson": "DEMBA SAKHO"
+ },
+ {
+ "ticket": 1535644,
+ "agency": "REC_MADRID",
+ "worker": 0,
+ "hour": 20,
+ "state": "Libre",
+ "lines": 7,
+ "m3": 0.22,
+ "boxes": 0,
+ "city": "SAN FERNANDO DE HENARES",
+ "province": "Madrid",
+ "client": 3005,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535648,
+ "agency": "OTRA AGENCIA",
+ "worker": "BEGOÑA RODRIGUEZ",
+ "hour": 24,
+ "state": "Entregado",
+ "lines": 1,
+ "m3": 0,
+ "boxes": 0,
+ "city": "CATADAU",
+ "province": "Valencia",
+ "client": 1425,
+ "salePerson": "BEGOÑA RODRIGUEZ"
+ },
+ {
+ "ticket": 1535652,
+ "agency": "INTEGRA2",
+ "worker": "FRAN NATEK ECHEVARRIA",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 1,
+ "m3": 0.02,
+ "boxes": 0,
+ "city": "PALACIOS Y VILLAFRAN",
+ "province": "Sevilla",
+ "client": 3063,
+ "salePerson": "FRAN NATEK ECHEVARRIA"
+ },
+ {
+ "ticket": 1535657,
+ "agency": "OTRA AGENCIA",
+ "worker": "BEGOÑA RODRIGUEZ",
+ "hour": 24,
+ "state": "Entregado",
+ "lines": 1,
+ "m3": 0,
+ "boxes": 0,
+ "city": "PALMA DE GANDIA",
+ "province": "Valencia",
+ "client": 1261,
+ "salePerson": "BEGOÑA RODRIGUEZ"
+ },
+ {
+ "ticket": 1535658,
+ "agency": "OTRA AGENCIA",
+ "worker": "BEGOÑA RODRIGUEZ",
+ "hour": 24,
+ "state": "Entregado",
+ "lines": 1,
+ "m3": 0,
+ "boxes": 0,
+ "city": "GALDACANO",
+ "province": "Vizcaya",
+ "client": 1309,
+ "salePerson": "BEGOÑA RODRIGUEZ"
+ },
+ {
+ "ticket": 1535660,
+ "agency": "ZELERIS",
+ "worker": "ELENA BASCUÑANA TORNERO",
+ "hour": 17,
+ "state": "OK",
+ "lines": 2,
+ "m3": 0.05,
+ "boxes": 0,
+ "city": "CEHEGIN",
+ "province": "Murcia",
+ "client": 178,
+ "salePerson": "ELENA BASCUÑANA TORNERO"
+ },
+ {
+ "ticket": 1535663,
+ "agency": "MRW 24h",
+ "worker": "Mª CARMEN SERRANO BAU",
+ "hour": 17,
+ "state": "OK",
+ "lines": 6,
+ "m3": 0.06,
+ "boxes": 0,
+ "city": "ROCIANA DEL CONDADO",
+ "province": "Huelva",
+ "client": 6471,
+ "salePerson": "Mª CARMEN SERRANO BAU"
+ },
+ {
+ "ticket": 1535673,
+ "agency": "MRW 24h",
+ "worker": "CRISTINA SANCHEZ BARRUGUER",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 19,
+ "m3": 0.3,
+ "boxes": 0,
+ "city": "CIUDAD RODRIGO",
+ "province": "Salamanca",
+ "client": 7821,
+ "salePerson": "CRISTINA SANCHEZ BARRUGUER"
+ },
+ {
+ "ticket": 1535678,
+ "agency": "ZONA 11",
+ "worker": "JESUS DANIEL VALLES PEREZ",
+ "hour": 21,
+ "state": "OK",
+ "lines": 5,
+ "m3": 0.18,
+ "boxes": 0,
+ "city": "BURRIANA",
+ "province": "Castellón",
+ "client": 3021,
+ "salePerson": "JESUS DANIEL VALLES PEREZ"
+ },
+ {
+ "ticket": 1535679,
+ "agency": "ZONA 20",
+ "worker": 0,
+ "hour": 20,
+ "state": "Libre",
+ "lines": 1,
+ "m3": 0.03,
+ "boxes": 0,
+ "city": "MADRID",
+ "province": "Madrid",
+ "client": 3222,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535682,
+ "agency": "VIAEXPRESS Interdia",
+ "worker": "DEMBA SAKHO",
+ "hour": 12,
+ "state": "Encajado",
+ "lines": 15,
+ "m3": 0.08,
+ "boxes": 0,
+ "city": "PUZOL",
+ "province": "Valencia",
+ "client": 389,
+ "salePerson": "DEMBA SAKHO"
+ },
+ {
+ "ticket": 1535684,
+ "agency": "REC_SILLA",
+ "worker": "GISELA LLOPIS COLOM",
+ "hour": 23,
+ "state": "Entregado",
+ "lines": 2,
+ "m3": 0.3,
+ "boxes": 3,
+ "city": "MONTSERRAT",
+ "province": "Valencia",
+ "client": 3075,
+ "salePerson": "GISELA LLOPIS COLOM"
+ },
+ {
+ "ticket": 1535686,
+ "agency": "ZONA 31",
+ "worker": "COMPUTER SYSTEM",
+ "hour": 19,
+ "state": "Libre",
+ "lines": 9,
+ "m3": 0.15,
+ "boxes": 0,
+ "city": "BARBERA DEL VALLES",
+ "province": "Barcelona",
+ "client": 4631,
+ "salePerson": "COMPUTER SYSTEM"
+ },
+ {
+ "ticket": 1535687,
+ "agency": "MRW 24h",
+ "worker": "CARLOS BORRAS MARTINEZ",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 6,
+ "m3": 0.03,
+ "boxes": 0,
+ "city": "BECERREA",
+ "province": "Lugo",
+ "client": 5410,
+ "salePerson": "CARLOS BORRAS MARTINEZ"
+ },
+ {
+ "ticket": 1535690,
+ "agency": "ZELERIS",
+ "worker": "DAVID SARRION RIVERO",
+ "hour": 17,
+ "state": "OK",
+ "lines": 8,
+ "m3": 0.09,
+ "boxes": 0,
+ "city": "REINOSA",
+ "province": "Cantabria",
+ "client": 4268,
+ "salePerson": "DAVID SARRION RIVERO"
+ },
+ {
+ "ticket": 1535693,
+ "agency": "ZONA 25",
+ "worker": "RODRIGO HALABI ROCHA",
+ "hour": 20,
+ "state": "OK",
+ "lines": 1,
+ "m3": 0.06,
+ "boxes": 0,
+ "city": "DAIMIEL",
+ "province": "Ciudad Real",
+ "client": 904,
+ "salePerson": "RODRIGO HALABI ROCHA"
+ },
+ {
+ "ticket": 1535694,
+ "agency": "CORREOSEXPRESS",
+ "worker": "CARLOS ZAMBRANO GARCIA",
+ "hour": 17,
+ "state": "OK",
+ "lines": 4,
+ "m3": 0.1,
+ "boxes": 0,
+ "city": "VILLARALBO",
+ "province": "Zamora",
+ "client": 5801,
+ "salePerson": "CARLOS ZAMBRANO GARCIA"
+ },
+ {
+ "ticket": 1535699,
+ "agency": "ZONA 20",
+ "worker": "MANOLI PULIDO",
+ "hour": 20,
+ "state": "OK",
+ "lines": 7,
+ "m3": 0.28,
+ "boxes": 0,
+ "city": "ALCORCON",
+ "province": "Madrid",
+ "client": 422,
+ "salePerson": "MANOLI PULIDO"
+ },
+ {
+ "ticket": 1535702,
+ "agency": "ZELERIS",
+ "worker": "Mª CARMEN SERRANO BAU",
+ "hour": 17,
+ "state": "OK",
+ "lines": 3,
+ "m3": 0.23,
+ "boxes": 0,
+ "city": "PURULLENA",
+ "province": "Granada",
+ "client": 3224,
+ "salePerson": "Mª CARMEN SERRANO BAU"
+ },
+ {
+ "ticket": 1535713,
+ "agency": "REC_MADRID",
+ "worker": "ELENA BASCUÑANA TORNERO",
+ "hour": 20,
+ "state": "OK",
+ "lines": 16,
+ "m3": 0.36,
+ "boxes": 0,
+ "city": "TORREJON DE ARDOZ",
+ "province": "Madrid",
+ "client": 680,
+ "salePerson": "ELENA BASCUÑANA TORNERO"
+ },
+ {
+ "ticket": 1535719,
+ "agency": "ZELERIS",
+ "worker": 0,
+ "hour": 17,
+ "state": "Libre",
+ "lines": 15,
+ "m3": 0.22,
+ "boxes": 0,
+ "city": "RIBADESELLA",
+ "province": "Asturias",
+ "client": 2428,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535720,
+ "agency": "REC_VILASSAR",
+ "worker": 0,
+ "hour": 19,
+ "state": "Libre",
+ "lines": 11,
+ "m3": 0.07,
+ "boxes": 0,
+ "city": "BARCELONA",
+ "province": "Barcelona",
+ "client": 7628,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535724,
+ "agency": "REC_SILLA",
+ "worker": 0,
+ "hour": 23,
+ "state": "Libre",
+ "lines": 3,
+ "m3": 0.04,
+ "boxes": 0,
+ "city": "QUART DE POBLET",
+ "province": "Valencia",
+ "client": 326,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535727,
+ "agency": "ZONA 43",
+ "worker": "DEMBA SAKHO",
+ "hour": 14,
+ "state": "Encajando",
+ "lines": 21,
+ "m3": 0.35,
+ "boxes": 0,
+ "city": "PALMA MALLORCA",
+ "province": "Baleares (Mallorca)",
+ "client": 3436,
+ "salePerson": "DEMBA SAKHO"
+ },
+ {
+ "ticket": 1535732,
+ "agency": "ZONA 20",
+ "worker": "MARIA DEL MAR GIRBES FERRUS",
+ "hour": 20,
+ "state": "Sin Acabar",
+ "lines": 10,
+ "m3": 0.44,
+ "boxes": 0,
+ "city": "MADRID",
+ "province": "Madrid",
+ "client": 7303,
+ "salePerson": "MARIA DEL MAR GIRBES FERRUS"
+ },
+ {
+ "ticket": 1535736,
+ "agency": "ZONA 42",
+ "worker": "JUANLU GALLETERO",
+ "hour": 14,
+ "state": "Preparación",
+ "lines": 6,
+ "m3": 0.09,
+ "boxes": 0,
+ "city": "SANT JOSEP DE SATALIA",
+ "province": "Baleares (Ibiza)",
+ "client": 3472,
+ "salePerson": "JUANLU GALLETERO"
+ },
+ {
+ "ticket": 1535737,
+ "agency": "MRW 24h",
+ "worker": "DEBORA SANCHEZ TORIO",
+ "hour": 17,
+ "state": "OK",
+ "lines": 6,
+ "m3": 0.18,
+ "boxes": 0,
+ "city": "MARCILLA",
+ "province": "Navarra",
+ "client": 957,
+ "salePerson": "DEBORA SANCHEZ TORIO"
+ },
+ {
+ "ticket": 1535742,
+ "agency": "ZONA 46",
+ "worker": "MIGUEL ANGEL LAGUNA",
+ "hour": 15,
+ "state": "Impreso",
+ "lines": 3,
+ "m3": 0.11,
+ "boxes": 0,
+ "city": "MALAGA",
+ "province": "Málaga",
+ "client": 4812,
+ "salePerson": "MIGUEL ANGEL LAGUNA"
+ },
+ {
+ "ticket": 1535747,
+ "agency": "MRW 24h",
+ "worker": "FRAN NATEK ECHEVARRIA",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 1,
+ "m3": 0.23,
+ "boxes": 2,
+ "city": "SEVILLA",
+ "province": "Sevilla",
+ "client": 4095,
+ "salePerson": "FRAN NATEK ECHEVARRIA"
+ },
+ {
+ "ticket": 1535749,
+ "agency": "ZELERIS",
+ "worker": "DEBORA SANCHEZ TORIO",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 1,
+ "m3": 0.03,
+ "boxes": 0,
+ "city": "VIVEIRO",
+ "province": "Lugo",
+ "client": 5928,
+ "salePerson": "DEBORA SANCHEZ TORIO"
+ },
+ {
+ "ticket": 1535751,
+ "agency": "ZELERIS",
+ "worker": "JOSE JULIAN SAEZ FERNANDEZ",
+ "hour": 17,
+ "state": "OK",
+ "lines": 27,
+ "m3": 0.95,
+ "boxes": 2.99,
+ "city": "RABADE LUGO",
+ "province": "Lugo",
+ "client": 5652,
+ "salePerson": "JOSE JULIAN SAEZ FERNANDEZ"
+ },
+ {
+ "ticket": 1535756,
+ "agency": "MRW 24h",
+ "worker": "DAVID SARRION RIVERO",
+ "hour": 17,
+ "state": "OK",
+ "lines": 11,
+ "m3": 0.31,
+ "boxes": 0,
+ "city": "LANDETE",
+ "province": "Cuenca",
+ "client": 3857,
+ "salePerson": "DAVID SARRION RIVERO"
+ },
+ {
+ "ticket": 1535758,
+ "agency": "VIAEXPRESS Interdia",
+ "worker": 0,
+ "hour": 12,
+ "state": "Libre",
+ "lines": 21,
+ "m3": 0.49,
+ "boxes": 0,
+ "city": "LA POBLA DE VALLBONA",
+ "province": "Valencia",
+ "client": 2053,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535765,
+ "agency": "ZONA 31",
+ "worker": 0,
+ "hour": 19,
+ "state": "Libre",
+ "lines": 1,
+ "m3": 0.07,
+ "boxes": 0,
+ "city": "SANT HIPÒLIT DE VOLTREGÀ",
+ "province": "Barcelona",
+ "client": 5876,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535770,
+ "agency": "ZONA 25",
+ "worker": "DEBORA SANCHEZ TORIO",
+ "hour": 20,
+ "state": "OK",
+ "lines": 16,
+ "m3": 0.18,
+ "boxes": 0,
+ "city": "ILLESCAS",
+ "province": "Toledo",
+ "client": 4283,
+ "salePerson": "DEBORA SANCHEZ TORIO"
+ },
+ {
+ "ticket": 1535771,
+ "agency": "ZELERIS",
+ "worker": "JUANLU GALLETERO",
+ "hour": 17,
+ "state": "Revisado",
+ "lines": 1,
+ "m3": 0.03,
+ "boxes": 0,
+ "city": "SEVILLA",
+ "province": "Sevilla",
+ "client": 2000,
+ "salePerson": "JUANLU GALLETERO"
+ },
+ {
+ "ticket": 1535772,
+ "agency": "ZELERIS_10",
+ "worker": "MARIA JOSE LAMELA FELIPE",
+ "hour": 17,
+ "state": "OK",
+ "lines": 3,
+ "m3": 0.07,
+ "boxes": 0,
+ "city": "SEVILLA",
+ "province": "Sevilla",
+ "client": 2635,
+ "salePerson": "MARIA JOSE LAMELA FELIPE"
+ },
+ {
+ "ticket": 1535774,
+ "agency": "ZELERIS",
+ "worker": "JESUS DANIEL VALLES PEREZ",
+ "hour": 17,
+ "state": "OK",
+ "lines": 19,
+ "m3": 0.18,
+ "boxes": 0,
+ "city": "LEON",
+ "province": "León",
+ "client": 8321,
+ "salePerson": "JESUS DANIEL VALLES PEREZ"
+ },
+ {
+ "ticket": 1535775,
+ "agency": "ZONA 10",
+ "worker": "JESUS DANIEL VALLES PEREZ",
+ "hour": 23,
+ "state": "OK",
+ "lines": 1,
+ "m3": 0.69,
+ "boxes": 0,
+ "city": "PUIG PLAYA",
+ "province": "Valencia",
+ "client": 3781,
+ "salePerson": "JESUS DANIEL VALLES PEREZ"
+ },
+ {
+ "ticket": 1535776,
+ "agency": "REC_MADRID",
+ "worker": "CRISTINA SANCHEZ BARRUGUER",
+ "hour": 20,
+ "state": "Sin Acabar",
+ "lines": 10,
+ "m3": 0.09,
+ "boxes": 0,
+ "city": "TORREJON DE ARDOZ",
+ "province": "Madrid",
+ "client": 1600,
+ "salePerson": "CRISTINA SANCHEZ BARRUGUER"
+ },
+ {
+ "ticket": 1535777,
+ "agency": "ZELERIS",
+ "worker": "MANOLI PULIDO",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 3,
+ "m3": 0.06,
+ "boxes": 0,
+ "city": "PALENCIA",
+ "province": "Palencia",
+ "client": 3717,
+ "salePerson": "MANOLI PULIDO"
+ },
+ {
+ "ticket": 1535779,
+ "agency": "ZONA 11",
+ "worker": "ELENA BASCUÑANA TORNERO",
+ "hour": 21,
+ "state": "OK",
+ "lines": 16,
+ "m3": 0.21,
+ "boxes": 0,
+ "city": "ESLIDA",
+ "province": "Castellón",
+ "client": 7423,
+ "salePerson": "ELENA BASCUÑANA TORNERO"
+ },
+ {
+ "ticket": 1535899,
+ "agency": "ZONA 31",
+ "worker": "CLAUDI SANROMA REYNARES",
+ "hour": 19,
+ "state": "OK",
+ "lines": 7,
+ "m3": 0.33,
+ "boxes": 0,
+ "city": "MARTORELL",
+ "province": "Barcelona",
+ "client": 4058,
+ "salePerson": "CLAUDI SANROMA REYNARES"
+ },
+ {
+ "ticket": 1535903,
+ "agency": "MRW 24h",
+ "worker": "SILVERIO DOMINGUEZ",
+ "hour": 17,
+ "state": "OK",
+ "lines": 9,
+ "m3": 0.24,
+ "boxes": 0,
+ "city": "TOLOSA",
+ "province": "Guipuzcoa",
+ "client": 6308,
+ "salePerson": "SILVERIO DOMINGUEZ"
+ },
+ {
+ "ticket": 1535905,
+ "agency": "ZONA 20",
+ "worker": "ELENA BASCUÑANA TORNERO",
+ "hour": 20,
+ "state": "OK",
+ "lines": 19,
+ "m3": 0.33,
+ "boxes": 0,
+ "city": "MADRID",
+ "province": "Madrid",
+ "client": 3574,
+ "salePerson": "ELENA BASCUÑANA TORNERO"
+ },
+ {
+ "ticket": 1535908,
+ "agency": "INTEGRA2",
+ "worker": 0,
+ "hour": 17,
+ "state": "Libre",
+ "lines": 1,
+ "m3": 0.04,
+ "boxes": 0,
+ "city": "LA PUEBLA DE CAZALLA",
+ "province": "Sevilla",
+ "client": 5007,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535911,
+ "agency": "ZONA 43",
+ "worker": "MIGUEL ANGEL LAGUNA",
+ "hour": 14,
+ "state": "Impreso",
+ "lines": 53,
+ "m3": 0.61,
+ "boxes": 0,
+ "city": "INCA",
+ "province": "Baleares (Mallorca)",
+ "client": 6032,
+ "salePerson": "MIGUEL ANGEL LAGUNA"
+ },
+ {
+ "ticket": 1535912,
+ "agency": "REC_SILLA",
+ "worker": "COMPUTER SYSTEM",
+ "hour": 23,
+ "state": "Libre",
+ "lines": 2,
+ "m3": 0.11,
+ "boxes": 0,
+ "city": "VALENCIA",
+ "province": "Valencia",
+ "client": 3613,
+ "salePerson": "COMPUTER SYSTEM"
+ },
+ {
+ "ticket": 1535918,
+ "agency": "ZONA 10",
+ "worker": 0,
+ "hour": 23,
+ "state": "Libre",
+ "lines": 15,
+ "m3": 0.12,
+ "boxes": 0,
+ "city": "VALENCIA",
+ "province": "Valencia",
+ "client": 2574,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535919,
+ "agency": "ZONA 43",
+ "worker": "MARIA DEL MAR GIRBES FERRUS",
+ "hour": 14,
+ "state": "Sin Acabar",
+ "lines": 1,
+ "m3": 0.01,
+ "boxes": 0,
+ "city": "PALMA",
+ "province": "Baleares (Mallorca)",
+ "client": 7445,
+ "salePerson": "MARIA DEL MAR GIRBES FERRUS"
+ },
+ {
+ "ticket": 1535920,
+ "agency": "INTEGRA2",
+ "worker": "JULIA LLOPIS CASTELL",
+ "hour": 17,
+ "state": "Arreglar",
+ "lines": 9,
+ "m3": 0.1,
+ "boxes": 0,
+ "city": "Benahavis",
+ "province": "Málaga",
+ "client": 7796,
+ "salePerson": "JULIA LLOPIS CASTELL"
+ },
+ {
+ "ticket": 1535921,
+ "agency": "REC_SILLA",
+ "worker": "FRAN NATEK ECHEVARRIA",
+ "hour": 23,
+ "state": "Entregado",
+ "lines": 2,
+ "m3": 0,
+ "boxes": 0,
+ "city": "SUECA",
+ "province": "Valencia",
+ "client": 1160,
+ "salePerson": "FRAN NATEK ECHEVARRIA"
+ },
+ {
+ "ticket": 1535928,
+ "agency": "CORREOSEXPRESS",
+ "worker": 0,
+ "hour": 17,
+ "state": "Libre",
+ "lines": 8,
+ "m3": 0.07,
+ "boxes": 0,
+ "city": "ESCALONA",
+ "province": "Toledo",
+ "client": 2787,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535931,
+ "agency": "ZONA 20",
+ "worker": "CARLOS ZAMBRANO GARCIA",
+ "hour": 20,
+ "state": "Sin Acabar",
+ "lines": 1,
+ "m3": 0.02,
+ "boxes": 0,
+ "city": "PARLA",
+ "province": "Madrid",
+ "client": 2725,
+ "salePerson": "CARLOS ZAMBRANO GARCIA"
+ },
+ {
+ "ticket": 1535935,
+ "agency": "REC_MADRID",
+ "worker": 0,
+ "hour": 20,
+ "state": "Libre",
+ "lines": 1,
+ "m3": 0.12,
+ "boxes": 3,
+ "city": "SAN FERNADO DE HENARES",
+ "province": "Madrid",
+ "client": 3240,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535936,
+ "agency": "ZELERIS",
+ "worker": "DAVID SARRION RIVERO",
+ "hour": 17,
+ "state": "OK",
+ "lines": 2,
+ "m3": 0.11,
+ "boxes": 0,
+ "city": "VINAROS",
+ "province": "Castellón",
+ "client": 768,
+ "salePerson": "DAVID SARRION RIVERO"
+ },
+ {
+ "ticket": 1535938,
+ "agency": "ZONA 46",
+ "worker": 0,
+ "hour": 15,
+ "state": "Libre",
+ "lines": 5,
+ "m3": 0.11,
+ "boxes": 0,
+ "city": "VELEZ-MALAGA",
+ "province": "Málaga",
+ "client": 5358,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535941,
+ "agency": "CORREOSEXPRESS",
+ "worker": "LOLI LOZANO RAEZ",
+ "hour": 17,
+ "state": "OK",
+ "lines": 1,
+ "m3": 0.01,
+ "boxes": 0,
+ "city": "HUERCAL DE ALMERIA",
+ "province": "Almería",
+ "client": 475,
+ "salePerson": "LOLI LOZANO RAEZ"
+ },
+ {
+ "ticket": 1535942,
+ "agency": "CORREOSEXPRESS",
+ "worker": "CARLOS ZAMBRANO GARCIA",
+ "hour": 17,
+ "state": "OK",
+ "lines": 3,
+ "m3": 0.41,
+ "boxes": 10,
+ "city": "CHIPIONA",
+ "province": "Cádiz",
+ "client": 1479,
+ "salePerson": "CARLOS ZAMBRANO GARCIA"
+ },
+ {
+ "ticket": 1535943,
+ "agency": "ZONA 43",
+ "worker": 0,
+ "hour": 14,
+ "state": "Libre",
+ "lines": 1,
+ "m3": 0.14,
+ "boxes": 0,
+ "city": "PALMA DE MALLORCA",
+ "province": "Baleares (Mallorca)",
+ "client": 5840,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535946,
+ "agency": "REC_VILASSAR",
+ "worker": 0,
+ "hour": 19,
+ "state": "Libre",
+ "lines": 1,
+ "m3": 0.01,
+ "boxes": 0,
+ "city": "VILASSAR DE MAR",
+ "province": "Barcelona",
+ "client": 3951,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535956,
+ "agency": "ZONA 10",
+ "worker": "JOSE JAVIER ECHEVARRIA",
+ "hour": 23,
+ "state": "OK",
+ "lines": 5,
+ "m3": 0.12,
+ "boxes": 0,
+ "city": "CATARROJA",
+ "province": "Valencia",
+ "client": 4193,
+ "salePerson": "JOSE JAVIER ECHEVARRIA"
+ },
+ {
+ "ticket": 1535957,
+ "agency": "ZONA 43",
+ "worker": 0,
+ "hour": 14,
+ "state": "Libre",
+ "lines": 9,
+ "m3": 0.08,
+ "boxes": 0,
+ "city": "BINISSALEM",
+ "province": "Baleares (Mallorca)",
+ "client": 5172,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535960,
+ "agency": "MRW 24h",
+ "worker": "FRAN NATEK ECHEVARRIA",
+ "hour": 17,
+ "state": "OK",
+ "lines": 3,
+ "m3": 0.09,
+ "boxes": 0,
+ "city": "BAENA",
+ "province": "Córdoba",
+ "client": 1667,
+ "salePerson": "FRAN NATEK ECHEVARRIA"
+ },
+ {
+ "ticket": 1535961,
+ "agency": "ZONA 20",
+ "worker": 0,
+ "hour": 20,
+ "state": "Libre",
+ "lines": 3,
+ "m3": 0.11,
+ "boxes": 0,
+ "city": "MADRID",
+ "province": "Madrid",
+ "client": 5762,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535962,
+ "agency": "MRW 24h",
+ "worker": 0,
+ "hour": 17,
+ "state": "Libre",
+ "lines": 19,
+ "m3": 0.26,
+ "boxes": 0,
+ "city": "CUEVAS DEL VALLE",
+ "province": "Ávila",
+ "client": 6070,
+ "salePerson": 0
+ },
+ {
+ "ticket": 1535967,
+ "agency": "ZELERIS",
+ "worker": "FRAN NATEK ECHEVARRIA",
+ "hour": 17,
+ "state": "Sin Acabar",
+ "lines": 1,
+ "m3": 0.1,
+ "boxes": 0,
+ "city": "SEVILLA",
+ "province": "Sevilla",
+ "client": 2000,
+ "salePerson": "FRAN NATEK ECHEVARRIA"
}
]
\ No newline at end of file
From e09f60a53a550cc03a0504efaa0f1191f3fa91e0 Mon Sep 17 00:00:00 2001
From: Dani Herrero
Date: Tue, 13 Jun 2017 13:08:06 +0200
Subject: [PATCH 18/98] =?UTF-8?q?Nuevos=20componentes:=20drop-down,=20icon?=
=?UTF-8?q?-menu.=20Refactorizaci=C3=B3n=20de=20icon=20e=20icon-button=20(?=
=?UTF-8?q?pasados=20a=20componentes=20sin=20template=20manager)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
client/core/src/components.js | 2 +
client/core/src/drop-down/drop-down.html | 3 ++
client/core/src/drop-down/drop-down.js | 16 ++++++
client/core/src/drop-down/style.scss | 20 +++++++
client/core/src/filters/index.js | 1 +
client/core/src/filters/ucwords.js | 20 +++++++
client/core/src/icon-button/icon-button.html | 3 ++
client/core/src/icon-button/icon-button.js | 18 +++++--
client/core/src/icon-menu/icon-menu.html | 4 ++
client/core/src/icon-menu/icon-menu.js | 54 +++++++++++++++++++
client/core/src/icon/icon.js | 16 ++++--
client/core/src/icon/icon.mdl.js | 2 +-
client/production/src/index/index.html | 55 ++++++++++----------
client/production/src/index/index.js | 19 ++++++-
client/production/src/index/style.scss | 3 ++
15 files changed, 199 insertions(+), 37 deletions(-)
create mode 100644 client/core/src/drop-down/drop-down.html
create mode 100644 client/core/src/drop-down/drop-down.js
create mode 100644 client/core/src/drop-down/style.scss
create mode 100644 client/core/src/filters/ucwords.js
create mode 100644 client/core/src/icon-button/icon-button.html
create mode 100644 client/core/src/icon-menu/icon-menu.html
create mode 100644 client/core/src/icon-menu/icon-menu.js
diff --git a/client/core/src/components.js b/client/core/src/components.js
index fc5c92d34..f0303ebe2 100644
--- a/client/core/src/components.js
+++ b/client/core/src/components.js
@@ -15,6 +15,8 @@ import './subtitle/subtitle';
import './spinner/spinner';
import './snackbar/snackbar';
import './tooltip/tooltip';
+import './icon-menu/icon-menu';
+import './drop-down/drop-down';
export {NAME as BUTTON, directive as ButtonDirective} from './button/button';
export {NAME as BUTTON_MDL, factory as buttonMdl} from './button/button.mdl';
diff --git a/client/core/src/drop-down/drop-down.html b/client/core/src/drop-down/drop-down.html
new file mode 100644
index 000000000..4b354ae62
--- /dev/null
+++ b/client/core/src/drop-down/drop-down.html
@@ -0,0 +1,3 @@
+
\ No newline at end of file
diff --git a/client/core/src/drop-down/drop-down.js b/client/core/src/drop-down/drop-down.js
new file mode 100644
index 000000000..c33aea7b5
--- /dev/null
+++ b/client/core/src/drop-down/drop-down.js
@@ -0,0 +1,16 @@
+import {module} from '../module';
+import './style.scss';
+
+/* export default class DropDown {
+}*/
+
+module.component('vnDropDown', {
+ template: require('./drop-down.html'),
+ // controller: DropDown,
+ bindings: {
+ items: '<',
+ show: '<',
+ selected: '='
+ },
+ controllerAs: 'dd'
+});
diff --git a/client/core/src/drop-down/style.scss b/client/core/src/drop-down/style.scss
new file mode 100644
index 000000000..07cf592d9
--- /dev/null
+++ b/client/core/src/drop-down/style.scss
@@ -0,0 +1,20 @@
+vn-drop-down {
+ position: absolute;
+ z-index: 9999;
+
+ ul{
+ padding: 0;
+ margin: 10px 0 0 0;
+ background: white;
+ border: 1px solid #A7A7A7;
+ li {
+ list-style-type: none;
+ padding: 5px 20px 5px 5px;
+ cursor: pointer;
+ }
+ li:hover{
+ background-color: #3D3A3B;
+ color: white;
+ }
+ }
+}
\ No newline at end of file
diff --git a/client/core/src/filters/index.js b/client/core/src/filters/index.js
index de0560b2f..885f3cd66 100644
--- a/client/core/src/filters/index.js
+++ b/client/core/src/filters/index.js
@@ -1 +1,2 @@
import './phone';
+import './ucwords';
diff --git a/client/core/src/filters/ucwords.js b/client/core/src/filters/ucwords.js
new file mode 100644
index 000000000..08ca725eb
--- /dev/null
+++ b/client/core/src/filters/ucwords.js
@@ -0,0 +1,20 @@
+import {module} from '../module';
+
+/**
+ * Uppercase the first character of each word in a string
+ *
+ * @return {String} The formated string
+ */
+export default function ucwords() {
+ return function(input) {
+ input = input || '';
+ let out = '';
+ let aux = input.split(' ');
+ for (let i = 0; i < aux.length; i++) {
+ out += (aux[i]) ? aux[i].charAt(0).toUpperCase() + aux[i].substr(1).toLowerCase() : '';
+ out += ' ';
+ }
+ return out.trim();
+ };
+}
+module.filter('ucwords', ucwords);
diff --git a/client/core/src/icon-button/icon-button.html b/client/core/src/icon-button/icon-button.html
new file mode 100644
index 000000000..4f80d96b5
--- /dev/null
+++ b/client/core/src/icon-button/icon-button.html
@@ -0,0 +1,3 @@
+
+ {{ib.label}}
+
\ No newline at end of file
diff --git a/client/core/src/icon-button/icon-button.js b/client/core/src/icon-button/icon-button.js
index 62ce9a2a4..806b86d83 100644
--- a/client/core/src/icon-button/icon-button.js
+++ b/client/core/src/icon-button/icon-button.js
@@ -1,10 +1,10 @@
import {module as _module} from '../module';
-import * as resolveFactory from '../lib/resolveDefaultComponents';
+// import * as resolveFactory from '../lib/resolveDefaultComponents';
import * as util from '../lib/util';
const _NAME = 'iconButton';
export const NAME = util.getName(_NAME);
-
+/*
directive.$inject = [resolveFactory.NAME];
export function directive(resolve) {
return {
@@ -14,4 +14,16 @@ export function directive(resolve) {
}
};
}
-_module.directive(NAME, directive);
+_module.directive(NAME, directive); */
+
+_module.component(NAME, {
+ template: require('./icon-button.html'),
+ bindings: {
+ icon: '@',
+ className: '',
+ enabled: '',
+ label: '@?'
+ },
+ controllerAs: 'ib'
+});
+
diff --git a/client/core/src/icon-menu/icon-menu.html b/client/core/src/icon-menu/icon-menu.html
new file mode 100644
index 000000000..25cd5c7d9
--- /dev/null
+++ b/client/core/src/icon-menu/icon-menu.html
@@ -0,0 +1,4 @@
+
\ No newline at end of file
diff --git a/client/core/src/icon-menu/icon-menu.js b/client/core/src/icon-menu/icon-menu.js
new file mode 100644
index 000000000..d1119bedb
--- /dev/null
+++ b/client/core/src/icon-menu/icon-menu.js
@@ -0,0 +1,54 @@
+import {module} from '../module';
+
+export default class IconMenu {
+ constructor($element, $http, $timeout) {
+ this.$element = $element;
+ this.$http = $http;
+ this.$timeout = $timeout;
+ this._showDropDown = false;
+ }
+ get showDropDown() {
+ return this._showDropDown;
+ }
+ set showDropDown(value) {
+ this._showDropDown = value;
+ }
+
+ getItems() {
+ this.$http.get(this.url).then(
+ json => {
+ this.items = json.data;
+ }
+ );
+ }
+ $onInit() {
+ if (!this.items && this.url) {
+ this.getItems();
+ }
+
+ this.$element.bind('mouseover', () => {
+ this.$timeout(() => {
+ this.showDropDown = true;
+ });
+ });
+
+ this.$element.bind('mouseout', () => {
+ this.$timeout(() => {
+ this.showDropDown = false;
+ });
+ });
+ }
+}
+IconMenu.$inject = ['$element', '$http', '$timeout'];
+
+module.component('vnIconMenu', {
+ template: require('./icon-menu.html'),
+ bindings: {
+ url: '@?',
+ items: '=?',
+ icon: '@',
+ selected: '='
+ },
+ controller: IconMenu,
+ controllerAs: 'im'
+});
diff --git a/client/core/src/icon/icon.js b/client/core/src/icon/icon.js
index 31e9ca565..29f3d0747 100644
--- a/client/core/src/icon/icon.js
+++ b/client/core/src/icon/icon.js
@@ -1,12 +1,12 @@
import {module} from '../module';
import './icon.mdl';
import './style.css';
-import * as resolveFactory from '../lib/resolveDefaultComponents';
+// import * as resolveFactory from '../lib/resolveDefaultComponents';
-const _NAME = 'icon';
+// const _NAME = 'icon';
export const NAME = 'vnIcon';
-export function directive(resolver) {
+/* export function directive(resolver) {
return {
restrict: 'E',
template: function(_, attrs) {
@@ -16,4 +16,12 @@ export function directive(resolver) {
}
directive.$inject = [resolveFactory.NAME];
-module.directive(NAME, directive);
+module.directive(NAME, directive);*/
+
+module.component(NAME, {
+ template: '{{i.icon}} ',
+ bindings: {
+ icon: '@'
+ },
+ controllerAs: 'i'
+});
diff --git a/client/core/src/icon/icon.mdl.js b/client/core/src/icon/icon.mdl.js
index ce3f82856..6a558285c 100644
--- a/client/core/src/icon/icon.mdl.js
+++ b/client/core/src/icon/icon.mdl.js
@@ -6,7 +6,7 @@ export function factory() {
return {
template: template,
default: {}
- }
+ };
}
module.factory(NAME, factory);
diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html
index b768aab80..cc1b7511a 100644
--- a/client/production/src/index/index.html
+++ b/client/production/src/index/index.html
@@ -1,4 +1,4 @@
-
+
@@ -25,7 +25,10 @@
-
+
+
+
+
@@ -34,51 +37,49 @@
-
-
+
+
-
-
+
+
-
- {{ticket.id}}
- {{ticket.agency.name}}
- {{ticket.employee.name}}
+
+ {{ticket.ticket}}
+ {{ticket.agency}}
+ {{ticket.worker | ucwords}}
{{ticket.hour}}
- {{ticket.state.name}}
+ {{ticket.state}}
{{ticket.lines}}
- {{ticket.meters}}
+ {{ticket.m3}}
{{ticket.boxes}}
-
+
+
{{$ctrl.lines}}
{{$ctrl.meters}}
-
+
\ No newline at end of file
diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js
index 97c5c1d5c..8fed9a431 100644
--- a/client/production/src/index/index.js
+++ b/client/production/src/index/index.js
@@ -10,6 +10,7 @@ export default class ProductionIndex {
this.tickets = [];
this.lines = 0;
this.meters = 0;
+ this.state = null;
}
get checkAll() {
return this._checkAll;
@@ -18,6 +19,12 @@ export default class ProductionIndex {
this._checkAll = value;
this.switchChecks();
}
+ /*get state() {
+ return this._state;
+ }
+ set state(value) {
+ this._state = value;
+ }*/
switchChecks() {
let checks = this.$element[0].querySelectorAll('.list-body input[type="checkbox"]');
checks.forEach(
@@ -33,11 +40,13 @@ export default class ProductionIndex {
let ids = [];
checks.forEach(
(_, i) => {
- ids.push(this.tickets[i].id);
+ ids.push(this.tickets[i].ticket);
}
);
+ console.log("TODO: call action -> endPoint with tickets's Ids", action, ids, arguments[1]);
// TODO: call action -> endPoint with tickets's Ids
} else {
+ console.log("TODO: dialog with no items selected", action);
// TODO: dialog with no items selected
}
}
@@ -47,7 +56,7 @@ export default class ProductionIndex {
this.tickets.forEach(
val => {
lines += parseFloat(val.lines);
- meters += parseFloat(val.meters);
+ meters += parseFloat(val.m3);
}
);
this.lines = lines;
@@ -57,6 +66,12 @@ export default class ProductionIndex {
this.$.index.filter = this.filter;
this.$.index.accept();
}
+ $doCheck() {
+ if (this.state) {
+ this.doAction('changeState', Object.assign({}, this.state));
+ this.state = null;
+ }
+ }
}
ProductionIndex.$inject = ['$element', '$scope'];
diff --git a/client/production/src/index/style.scss b/client/production/src/index/style.scss
index 13bd38bbf..cafeb13cb 100644
--- a/client/production/src/index/style.scss
+++ b/client/production/src/index/style.scss
@@ -29,6 +29,9 @@ vn-production-index {
.list > vn-one, .list > [vn-one], .list > [vn-two], .list > vn-two{
text-align: center;
}
+ .list > vn-none{
+ min-width: 60px;
+ }
.list-body{
padding: 4px 0px;
border-bottom: 1px solid #9D9D9D;
From 6adc734f69f5dbe79de64afea6b8bc0ef746ac6c Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 13 Jun 2017 13:57:40 +0200
Subject: [PATCH 19/98] change state ticket
---
.../methods/ticket-state/change-state.js | 46 +++++++++++++++++++
.../production/common/models/ticket-state.js | 9 ++++
2 files changed, 55 insertions(+)
create mode 100644 services/production/common/methods/ticket-state/change-state.js
create mode 100644 services/production/common/models/ticket-state.js
diff --git a/services/production/common/methods/ticket-state/change-state.js b/services/production/common/methods/ticket-state/change-state.js
new file mode 100644
index 000000000..99254bd66
--- /dev/null
+++ b/services/production/common/methods/ticket-state/change-state.js
@@ -0,0 +1,46 @@
+module.exports = function(TicketState) {
+ TicketState.remoteMethod('changeState', {
+ description: 'Change state of tickets',
+ accepts: [
+ {
+ arg: 'tickets',
+ type: 'array',
+ required: true,
+ description: 'Array of tickets',
+ http: {source: 'path'}
+ },
+ {
+ arg: 'state',
+ type: 'number',
+ required: true,
+ description: 'New state',
+ http: {source: 'path'}
+ },
+ ],
+ returns: {
+ arg: 'response',
+ type: 'boolean'
+ },
+ http: {
+ verb: 'put',
+ path: '/:tickets/:state/changeState'
+ }
+ });
+
+ TicketState.changeState = function(tickets, state, cb) {
+ changeState(tickets, state, cb);
+ };
+
+ var changeState = function(tickets, state, cb){
+ TicketState.update(where(tickets), {"state": state}, function(error, response){
+ if(!error)
+ cb(null, true);
+ cb(error);
+ });
+ }
+
+ var where = function(tickets){
+ return {"where": {"ticketFk": {"inq": tickets } } };
+ }
+
+}
\ No newline at end of file
diff --git a/services/production/common/models/ticket-state.js b/services/production/common/models/ticket-state.js
new file mode 100644
index 000000000..f6890964d
--- /dev/null
+++ b/services/production/common/models/ticket-state.js
@@ -0,0 +1,9 @@
+var app = require('../../server/server');
+
+module.exports = function(TicketState) {
+ var models = app.models;
+
+ // Methods
+
+ require('../methods/ticket-state/change-state.js')(TicketState);
+};
\ No newline at end of file
From 7713d0bd6f09e4aa6759cabd3e25c3c7ab32bc93 Mon Sep 17 00:00:00 2001
From: Dani Herrero
Date: Tue, 13 Jun 2017 14:57:09 +0200
Subject: [PATCH 20/98] cambio estilos dropdown
---
client/core/src/drop-down/style.scss | 4 +++-
client/production/src/index/index.html | 17 ++++++++++-------
client/production/src/index/index.js | 7 +++++--
3 files changed, 18 insertions(+), 10 deletions(-)
diff --git a/client/core/src/drop-down/style.scss b/client/core/src/drop-down/style.scss
index 07cf592d9..626b68156 100644
--- a/client/core/src/drop-down/style.scss
+++ b/client/core/src/drop-down/style.scss
@@ -1,7 +1,9 @@
vn-drop-down {
position: absolute;
z-index: 9999;
-
+ padding: 0 15px;
+ margin-left: -15px;
+
ul{
padding: 0;
margin: 10px 0 0 0;
diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html
index cc1b7511a..eb033eeff 100644
--- a/client/production/src/index/index.html
+++ b/client/production/src/index/index.html
@@ -28,6 +28,9 @@
+
+
+
@@ -58,14 +61,14 @@
- {{ticket.ticket}}
- {{ticket.agency}}
- {{ticket.worker | ucwords}}
- {{ticket.hour}}
+ {{::ticket.ticket}}
+ {{::ticket.agency}}
+ {{::ticket.worker | ucwords}}
+ {{::ticket.hour}}
{{ticket.state}}
- {{ticket.lines}}
- {{ticket.m3}}
- {{ticket.boxes}}
+ {{::ticket.lines}}
+ {{::ticket.m3}}
+ {{::ticket.boxes}}
-
+
@@ -69,7 +72,9 @@
{{::ticket.lines}}
{{::ticket.m3}}
{{::ticket.boxes}}
-
+
+
+
-
+
-
+
{{::ticket.ticket}}
{{::ticket.agency}}
- {{::ticket.worker | ucwords}}
+ {{::ticket.salePerson | ucwords}}
{{::ticket.hour}}
{{ticket.state}}
{{::ticket.lines}}
{{::ticket.m3}}
{{::ticket.boxes}}
-
+
+
\ No newline at end of file
diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js
index 68929bdd1..cdd4f63c3 100644
--- a/client/production/src/index/index.js
+++ b/client/production/src/index/index.js
@@ -2,10 +2,11 @@ import ngModule from '../module';
import './style.scss';
export default class ProductionIndex {
- constructor($element, $scope, $http) {
+ constructor($element, $scope, $http, vnPopover) {
this.$element = $element;
this.$ = $scope;
this.$http = $http;
+ this.vnPopover = vnPopover;
this.filter = {};
this._checkAll = false;
this.tickets = [];
@@ -99,8 +100,16 @@ export default class ProductionIndex {
this.hourItems.push({id: i, name: hour});
}
}
+ moreFilters(event) {
+ var child = this.vnPopover.showComponent('vn-production-filter-panel', this.$, this.$element[0].querySelector('.filterPanel'));
+ var childCtrl = angular.element(child).isolateScope().$ctrl;
+ childCtrl.filter = Object.assign({}, this.index.filter);
+ childCtrl.onSubmit = filter => this.onChildSubmit(filter);
+
+ event.preventDefault();
+ }
}
-ProductionIndex.$inject = ['$element', '$scope', '$http'];
+ProductionIndex.$inject = ['$element', '$scope', '$http', 'vnPopover'];
ngModule.component('vnProductionIndex', {
template: require('./index.html'),
diff --git a/client/production/src/filter-panel/filter-panel.html b/client/production/src/production-filters/production-filters.html
similarity index 95%
rename from client/production/src/filter-panel/filter-panel.html
rename to client/production/src/production-filters/production-filters.html
index 5ef3ecdda..bbd638e04 100644
--- a/client/production/src/filter-panel/filter-panel.html
+++ b/client/production/src/production-filters/production-filters.html
@@ -1,5 +1,5 @@
-
+
diff --git a/client/production/src/production-filters/production-filters.js b/client/production/src/production-filters/production-filters.js
new file mode 100644
index 000000000..b74136113
--- /dev/null
+++ b/client/production/src/production-filters/production-filters.js
@@ -0,0 +1,13 @@
+import ngModule from '../module';
+
+export default class Controller {
+ constructor($window) {
+ this.$window = $window;
+ }
+}
+Controller.$inject = ['$window'];
+
+ngModule.component('vnProductionFilterPanel', {
+ template: require('./production-filters.html'),
+ controller: Controller
+});
diff --git a/client/production/src/production.js b/client/production/src/production.js
index f36e96156..e7a270305 100644
--- a/client/production/src/production.js
+++ b/client/production/src/production.js
@@ -3,4 +3,4 @@ export * from './module';
// import components
import './index/index';
-import './filter-panel/filter-panel';
+import './production-filters/production-filters';
diff --git a/client/salix/src/components/searchbar/searchbar.html b/client/salix/src/components/searchbar/searchbar.html
index 0ca47a768..26df71108 100644
--- a/client/salix/src/components/searchbar/searchbar.html
+++ b/client/salix/src/components/searchbar/searchbar.html
@@ -2,6 +2,7 @@
Date: Tue, 20 Jun 2017 09:27:49 +0200
Subject: [PATCH 34/98] =?UTF-8?q?Production:=20modal=20para=20mensajes,=20?=
=?UTF-8?q?filtros=20b=C3=BAsqueda=20en=20front=20100%?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
client/core/src/popover/popover.js | 3 +-
client/production/src/index/index.html | 33 +++++-----
client/production/src/index/index.js | 66 ++++++++++++++-----
client/production/src/locale/es.json | 18 ++++-
.../production-comment.html | 4 ++
.../production-comment/production-comment.js | 5 ++
.../production-filters.html | 7 +-
.../production-filters/production-filters.js | 10 +--
client/production/src/production.js | 1 +
9 files changed, 102 insertions(+), 45 deletions(-)
create mode 100644 client/production/src/production-comment/production-comment.html
create mode 100644 client/production/src/production-comment/production-comment.js
diff --git a/client/core/src/popover/popover.js b/client/core/src/popover/popover.js
index 7abe382e3..5f2cc5cdb 100644
--- a/client/core/src/popover/popover.js
+++ b/client/core/src/popover/popover.js
@@ -96,9 +96,10 @@ export class Popover {
this.lastEvent = null;
this.docMouseDownHandler = null;
this.docKeyDownHandler = null;
- if (this.removeScope) {
+ if (this.removeScope && angular.element(this.childElement).scope()) {
angular.element(this.childElement).scope().$destroy();
angular.element(this.childElement).remove();
+ this.removeScope = false;
}
}
onDocMouseDown(event) {
diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html
index 7dd6b4dc4..f2a27a61d 100644
--- a/client/production/src/index/index.html
+++ b/client/production/src/index/index.html
@@ -4,42 +4,41 @@
-
-
+
+
-
+
-
-
-
-
-
+
+
+
+
+
-
+
diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js
index cdd4f63c3..6e6b64325 100644
--- a/client/production/src/index/index.js
+++ b/client/production/src/index/index.js
@@ -2,11 +2,14 @@ import ngModule from '../module';
import './style.scss';
export default class ProductionIndex {
- constructor($element, $scope, $http, vnPopover) {
+ constructor($element, $scope, $http, vnPopover, vnApp, $translate) {
this.$element = $element;
this.$ = $scope;
this.$http = $http;
this.vnPopover = vnPopover;
+ this.vnApp = vnApp;
+ this.$translate = $translate;
+
this.filter = {};
this._checkAll = false;
this.tickets = [];
@@ -19,6 +22,7 @@ export default class ProductionIndex {
hour: null
};
this.hourItems = [];
+ this.child = undefined;
}
get checkAll() {
return this._checkAll;
@@ -36,6 +40,7 @@ export default class ProductionIndex {
}
);
}
+ // Actions Callbacks
_changeState(ids, sateteId, stateName, index) {
this.$http.put(`/production/api/TicketStates/[${ids}]/${sateteId}/changeState`).then(
() => {
@@ -47,6 +52,10 @@ export default class ProductionIndex {
}
);
}
+ _publishComment(ids, comment) {
+ console.log("TODO: rest to publish comment", ids, comment);
+ }
+ // End Actions Callbacks
doAction(action) {
let checks = this.$element[0].querySelectorAll('.list-body input[type="checkbox"]:checked');
if (checks.length) {
@@ -62,10 +71,12 @@ export default class ProductionIndex {
case 'changeState' :
this._changeState(ids, this.actions.state.id, this.actions.state.name, index);
break;
+ case 'addComment':
+ this._openComment(ids);
+ break;
}
} else {
- console.log("TODO: dialog with no items selected", action);
- // TODO: dialog with no items selected
+ this.vnApp.showMessage(this.$translate.instant('Error: No tickets selected!'));
}
}
sumTickets() {
@@ -80,10 +91,43 @@ export default class ProductionIndex {
this.lines = lines;
this.meters = meters.toFixed(2);
}
- onSearch() {
- this.$.index.filter = this.filter;
- this.$.index.accept();
+ // Start modals and actions modals
+ _openComment(ids) {
+ this.child = this.vnPopover.showComponent('vn-production-comment', this.$, this.$element[0].querySelector('.actionPanel'));
+ var childCtrl = angular.element(this.child).isolateScope().$ctrl;
+ childCtrl.ids = ids;
+ childCtrl.onComment = (ids, comment) => this.onChildComment(ids, comment);
+ childCtrl.onCancel = () => this.onChildCancel();
}
+ moreFilters(event) {
+ this.child = this.vnPopover.showComponent('vn-production-filter-panel', this.$, this.$element[0].querySelector('.filterPanel'));
+ var childCtrl = angular.element(this.child).isolateScope().$ctrl;
+ childCtrl.filter = Object.assign({}, this.filter);
+ childCtrl.onSubmit = filter => this.onChildSubmit(filter);
+ childCtrl.onCancel = () => this.onChildCancel();
+
+ event.preventDefault();
+ }
+ onSearch(filter) {
+ let filters = filter || this.filter;
+ /* this.$.index.filter = filters;
+ this.$.index.accept(); */
+ console.log('TODO: search with filters', filters);
+ }
+ onChildSubmit(filter) {
+ this.onSearch(filter);
+ this.onChildCancel();
+ }
+ onChildComment(ids, comment) {
+ this.onChildCancel();
+ this._publishComment(ids, comment);
+ }
+ onChildCancel() {
+ angular.element(this.child).scope().$destroy();
+ angular.element(this.child).remove();
+ delete this.child;
+ }
+ // END modals and actions modals
$doCheck() {
if (this.actions.state) {
this.doAction('changeState');
@@ -100,16 +144,8 @@ export default class ProductionIndex {
this.hourItems.push({id: i, name: hour});
}
}
- moreFilters(event) {
- var child = this.vnPopover.showComponent('vn-production-filter-panel', this.$, this.$element[0].querySelector('.filterPanel'));
- var childCtrl = angular.element(child).isolateScope().$ctrl;
- childCtrl.filter = Object.assign({}, this.index.filter);
- childCtrl.onSubmit = filter => this.onChildSubmit(filter);
-
- event.preventDefault();
- }
}
-ProductionIndex.$inject = ['$element', '$scope', '$http', 'vnPopover'];
+ProductionIndex.$inject = ['$element', '$scope', '$http', 'vnPopover', 'vnApp', '$translate'];
ngModule.component('vnProductionIndex', {
template: require('./index.html'),
diff --git a/client/production/src/locale/es.json b/client/production/src/locale/es.json
index 9e26dfeeb..faa95e5bf 100644
--- a/client/production/src/locale/es.json
+++ b/client/production/src/locale/es.json
@@ -1 +1,17 @@
-{}
\ No newline at end of file
+{
+ "Finder" : "Localizador",
+ "Error: No tickets selected!" : "Error: ¡No hay tickets seleccionados!",
+ "State" : "Estado",
+ "Alarm" : "Alarma",
+ "Agencies": "Agencias",
+ "Agency": "Agencia",
+ "Store" : "Almacén",
+ "Printed": "Impreso",
+ "Commercial": "Comercial",
+ "Hour" : "Hora",
+ "Lines" : "Líneas",
+ "Boxes" : "Cajas",
+ "Comment" : "Comentario",
+ "Message" : "Mensaje",
+ "Send" : "Enviar"
+}
\ No newline at end of file
diff --git a/client/production/src/production-comment/production-comment.html b/client/production/src/production-comment/production-comment.html
new file mode 100644
index 000000000..14342ab00
--- /dev/null
+++ b/client/production/src/production-comment/production-comment.html
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/client/production/src/production-comment/production-comment.js b/client/production/src/production-comment/production-comment.js
new file mode 100644
index 000000000..390de47c2
--- /dev/null
+++ b/client/production/src/production-comment/production-comment.js
@@ -0,0 +1,5 @@
+import ngModule from '../module';
+
+ngModule.component('vnProductionComment', {
+ template: require('./production-comment.html')
+});
diff --git a/client/production/src/production-filters/production-filters.html b/client/production/src/production-filters/production-filters.html
index bbd638e04..2fd12511e 100644
--- a/client/production/src/production-filters/production-filters.html
+++ b/client/production/src/production-filters/production-filters.html
@@ -1,5 +1,5 @@
-
+
@@ -19,5 +19,8 @@
-
+
+
+
+
diff --git a/client/production/src/production-filters/production-filters.js b/client/production/src/production-filters/production-filters.js
index b74136113..0e6143efc 100644
--- a/client/production/src/production-filters/production-filters.js
+++ b/client/production/src/production-filters/production-filters.js
@@ -1,13 +1,5 @@
import ngModule from '../module';
-export default class Controller {
- constructor($window) {
- this.$window = $window;
- }
-}
-Controller.$inject = ['$window'];
-
ngModule.component('vnProductionFilterPanel', {
- template: require('./production-filters.html'),
- controller: Controller
+ template: require('./production-filters.html')
});
diff --git a/client/production/src/production.js b/client/production/src/production.js
index e7a270305..f9f4eeb08 100644
--- a/client/production/src/production.js
+++ b/client/production/src/production.js
@@ -4,3 +4,4 @@ export * from './module';
// import components
import './index/index';
import './production-filters/production-filters';
+import './production-comment/production-comment';
From 729ddf335846fdec65ec94913a9fc2e5cd063499 Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 20 Jun 2017 10:40:04 +0200
Subject: [PATCH 35/98] warehouses inventory
---
services/production/common/methods/warehouse/list-warehouses.js | 2 +-
services/production/common/models/warehouse.json | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/services/production/common/methods/warehouse/list-warehouses.js b/services/production/common/methods/warehouse/list-warehouses.js
index c22235509..9b3c315be 100644
--- a/services/production/common/methods/warehouse/list-warehouses.js
+++ b/services/production/common/methods/warehouse/list-warehouses.js
@@ -3,7 +3,7 @@ module.exports = function(Warehouse) {
description: 'List production warehouses',
returns: {
arg: 'warehouses',
- type: 'object'
+ type: 'array'
},
http: {
verb: 'get',
diff --git a/services/production/common/models/warehouse.json b/services/production/common/models/warehouse.json
index 208914085..80c8b8500 100644
--- a/services/production/common/models/warehouse.json
+++ b/services/production/common/models/warehouse.json
@@ -14,7 +14,7 @@
"tpv": {
"type": "Number"
},
- "inventary": {
+ "inventory": {
"type": "Number"
}
},
From 50e086fbc0e7014378df63b8749ac9f4aec94750 Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 20 Jun 2017 13:06:13 +0200
Subject: [PATCH 36/98] list for my model
---
services/client/common/models/my-model.js | 22 ++++++++++++++++
.../methods/ticket-state/change-state.js | 13 +++-------
.../methods/warehouse/list-warehouses.js | 25 +++++++------------
services/production/common/models/my-model.js | 22 ++++++++++++++++
services/service/models/my-model.js | 22 ++++++++++++++++
5 files changed, 79 insertions(+), 25 deletions(-)
diff --git a/services/client/common/models/my-model.js b/services/client/common/models/my-model.js
index f6dfad090..37f8d846b 100644
--- a/services/client/common/models/my-model.js
+++ b/services/client/common/models/my-model.js
@@ -25,7 +25,29 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
+
+ this.remoteMethod('list', {
+ accepts: [
+ {
+ arg: 'filter',
+ type: 'object',
+ description: 'Filter defining where'
+ }
+ ],
+ returns: {
+ type: [this.modelName],
+ root: true
+ },
+ http: {
+ verb: 'get',
+ path: '/list'
+ }
+ });
+
};
+
+ self.list = function(filter, cb) {};
+
self.rawSql = function(query, params, cb) {
this.dataSource.connector.execute(query, params, function(error, response) {
cb(error, response);
diff --git a/services/production/common/methods/ticket-state/change-state.js b/services/production/common/methods/ticket-state/change-state.js
index 687b8ba22..5384ba86f 100644
--- a/services/production/common/methods/ticket-state/change-state.js
+++ b/services/production/common/methods/ticket-state/change-state.js
@@ -2,13 +2,6 @@ module.exports = function(TicketState) {
TicketState.remoteMethodCtx('changeState', {
description: 'Change state of tickets',
accepts: [
- {
- arg: 'tickets',
- type: 'array',
- required: true,
- description: 'Array of tickets',
- http: {source: 'path'}
- },
{
arg: 'state',
type: 'number',
@@ -23,11 +16,13 @@ module.exports = function(TicketState) {
},
http: {
verb: 'put',
- path: '/:tickets/:state/changeState'
+ path: '/:state/changeState'
}
});
- TicketState.changeState = function(ctx, tickets, state, cb) {
+ TicketState.changeState = function(ctx, state, cb) {
+ var tickets = ctx.req.body.tickets;
+
TicketState.connectToService(ctx, "client");
TicketState.app.models.Employee.findOne({where: {userFk: ctx.req.accessToken.userId}}, function(err, emp){
diff --git a/services/production/common/methods/warehouse/list-warehouses.js b/services/production/common/methods/warehouse/list-warehouses.js
index 9b3c315be..c1a2413ee 100644
--- a/services/production/common/methods/warehouse/list-warehouses.js
+++ b/services/production/common/methods/warehouse/list-warehouses.js
@@ -1,18 +1,6 @@
module.exports = function(Warehouse) {
- Warehouse.remoteMethod('list', {
- description: 'List production warehouses',
- returns: {
- arg: 'warehouses',
- type: 'array'
- },
- http: {
- verb: 'get',
- path: '/list'
- }
- });
-
- Warehouse.list = function(cb) {
- Warehouse.find(where(), function(err, warehouses){
+ Warehouse.list = function(filter, cb) {
+ Warehouse.find(where(filter), function(err, warehouses){
if(!err)
cb(null, warehouses);
else
@@ -20,7 +8,12 @@ module.exports = function(Warehouse) {
});
};
- var where = function(){
- return {"where": {"tpv": {"neq": 0}}}
+ var where = function(filter){
+ if(!filter)
+ return {"where": {"tpv": {"neq": 0}}}
+ else {
+ filter.where.tpv = {"neq": 0}
+ return filter;
+ }
}
}
\ No newline at end of file
diff --git a/services/production/common/models/my-model.js b/services/production/common/models/my-model.js
index f6dfad090..37f8d846b 100644
--- a/services/production/common/models/my-model.js
+++ b/services/production/common/models/my-model.js
@@ -25,7 +25,29 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
+
+ this.remoteMethod('list', {
+ accepts: [
+ {
+ arg: 'filter',
+ type: 'object',
+ description: 'Filter defining where'
+ }
+ ],
+ returns: {
+ type: [this.modelName],
+ root: true
+ },
+ http: {
+ verb: 'get',
+ path: '/list'
+ }
+ });
+
};
+
+ self.list = function(filter, cb) {};
+
self.rawSql = function(query, params, cb) {
this.dataSource.connector.execute(query, params, function(error, response) {
cb(error, response);
diff --git a/services/service/models/my-model.js b/services/service/models/my-model.js
index f6dfad090..37f8d846b 100644
--- a/services/service/models/my-model.js
+++ b/services/service/models/my-model.js
@@ -25,7 +25,29 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
+
+ this.remoteMethod('list', {
+ accepts: [
+ {
+ arg: 'filter',
+ type: 'object',
+ description: 'Filter defining where'
+ }
+ ],
+ returns: {
+ type: [this.modelName],
+ root: true
+ },
+ http: {
+ verb: 'get',
+ path: '/list'
+ }
+ });
+
};
+
+ self.list = function(filter, cb) {};
+
self.rawSql = function(query, params, cb) {
this.dataSource.connector.execute(query, params, function(error, response) {
cb(error, response);
From 509dab5ce4add2ddae047a298c0535773897c5dc Mon Sep 17 00:00:00 2001
From: nelo
Date: Tue, 20 Jun 2017 13:14:20 +0200
Subject: [PATCH 37/98] list states
---
.../production/common/methods/state/find.js | 35 ++++++++-----------
1 file changed, 15 insertions(+), 20 deletions(-)
diff --git a/services/production/common/methods/state/find.js b/services/production/common/methods/state/find.js
index f40937891..af8a7c217 100644
--- a/services/production/common/methods/state/find.js
+++ b/services/production/common/methods/state/find.js
@@ -1,30 +1,25 @@
module.exports = function(State) {
- State.remoteMethod('productionStates', {
- description: 'Get production states',
- returns: {
- arg: 'states',
- type: 'object'
- },
- http: {
- verb: 'get',
- path: '/productionStates'
- }
- });
-
- State.productionStates = function(cb) {
- State.find(where(), function(err, states) {
+ State.list = function(filter, cb) {
+ State.find(where(filter), function(err, states) {
if(!err){
cb(null, states);
}
});
};
- function where() {
- return {
- where: {
- "order": {gt: 0}
- },
- order: "order, name"
+ function where(filter) {
+
+ if(!filter)
+ return {
+ where: {
+ "order": {gt: 0 }
+ },
+ order: "order, name"
+ }
+ else{
+ filter.where.order = {gt: 0 };
+ filter.order = "order, name";
+ return filter;
}
}
From d444980ab10e7a1851b40154bec2ec8a92809c43 Mon Sep 17 00:00:00 2001
From: Dani Herrero
Date: Tue, 20 Jun 2017 15:00:27 +0200
Subject: [PATCH 38/98] =?UTF-8?q?[En=20progreso]=20nuevo=20componente=20vn?=
=?UTF-8?q?GridHeader=20para=20ordenaci=C3=B3n=20de=20tablas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../core/src/colum-header/colum-header.html | 10 ++++
client/core/src/colum-header/colum-header.js | 51 +++++++++++++++++++
client/core/src/components.js | 2 +
client/core/src/grid-header/grid-header.html | 1 +
client/core/src/grid-header/grid-header.js | 17 +++++++
client/core/src/grid-header/style.scss | 14 +++++
client/production/src/index/index.html | 33 ++++++------
client/production/src/index/index.js | 7 +++
client/production/src/locale/es.json | 8 ++-
.../production-comment.html | 6 ++-
.../production-filters.html | 18 +++----
.../production-filters/production-filters.js | 1 +
.../src/production-filters/style.scss | 9 ++++
.../methods/warehouse/list-warehouses.js | 4 +-
.../production/common/models/warehouse.json | 5 +-
15 files changed, 155 insertions(+), 31 deletions(-)
create mode 100644 client/core/src/colum-header/colum-header.html
create mode 100644 client/core/src/colum-header/colum-header.js
create mode 100644 client/core/src/grid-header/grid-header.html
create mode 100644 client/core/src/grid-header/grid-header.js
create mode 100644 client/core/src/grid-header/style.scss
create mode 100644 client/production/src/production-filters/style.scss
diff --git a/client/core/src/colum-header/colum-header.html b/client/core/src/colum-header/colum-header.html
new file mode 100644
index 000000000..f71b0823f
--- /dev/null
+++ b/client/core/src/colum-header/colum-header.html
@@ -0,0 +1,10 @@
+
+
+
+ {{::$ctrl.text}}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/core/src/colum-header/colum-header.js b/client/core/src/colum-header/colum-header.js
new file mode 100644
index 000000000..cb9fcc492
--- /dev/null
+++ b/client/core/src/colum-header/colum-header.js
@@ -0,0 +1,51 @@
+import {module} from '../module';
+
+export default class vnColumHeader {
+ constructor($element, $timeout, $transclude) {
+ this.$element = $element;
+ this.$timeout = $timeout;
+ this.order = null;
+ this.showOrder = false;
+ }
+ onClick() {
+ switch (this.order) {
+ case 'ASC':
+ this.$timeout(() => {
+ this.showOrder = true;
+ this.order = 'DESC';
+ // this.gH.onOrder(this.field, this.order);
+ });
+ break;
+ default:
+ this.$timeout(() => {
+ this.showOrder = true;
+ this.order = 'ASC';
+ });
+ break;
+ }
+ this.$timeout(
+ () => {
+ this.showOrder = false;
+ }, 1000);
+ }
+ $onInit() {
+ if (this.field) {
+ this.$element.bind("click", () => this.onClick());
+ }
+ }
+}
+vnColumHeader.$inject = ['$element', '$timeout'];
+
+module.component('vnColumHeader', {
+ template: require('./colum-header.html'),
+ bindings: {
+ field: '@?',
+ text: '@?',
+ className: '@?'
+ },
+ require: {
+ gH: '^vnGridHeader'
+ },
+ controller: vnColumHeader,
+ transclude: true
+});
diff --git a/client/core/src/components.js b/client/core/src/components.js
index 2427a223d..ecece02d9 100644
--- a/client/core/src/components.js
+++ b/client/core/src/components.js
@@ -17,6 +17,8 @@ import './snackbar/snackbar';
import './tooltip/tooltip';
import './icon-menu/icon-menu';
import './drop-down/drop-down';
+import './colum-header/colum-header';
+import './grid-header/grid-header';
export {NAME as BUTTON, directive as ButtonDirective} from './button/button';
export {NAME as BUTTON_MDL, factory as buttonMdl} from './button/button.mdl';
diff --git a/client/core/src/grid-header/grid-header.html b/client/core/src/grid-header/grid-header.html
new file mode 100644
index 000000000..6956dafb3
--- /dev/null
+++ b/client/core/src/grid-header/grid-header.html
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/client/core/src/grid-header/grid-header.js b/client/core/src/grid-header/grid-header.js
new file mode 100644
index 000000000..ae999a247
--- /dev/null
+++ b/client/core/src/grid-header/grid-header.js
@@ -0,0 +1,17 @@
+import {module} from '../module';
+import './style.scss';
+
+export default class GridHeader {
+ constructor() {
+
+ }
+}
+
+module.component('vnGridHeader', {
+ template: require('./grid-header.html'),
+ transclude: true,
+ binding: {
+ onOrder: '&?'
+ },
+ component: GridHeader
+});
diff --git a/client/core/src/grid-header/style.scss b/client/core/src/grid-header/style.scss
new file mode 100644
index 000000000..7eca64265
--- /dev/null
+++ b/client/core/src/grid-header/style.scss
@@ -0,0 +1,14 @@
+vn-grid-header {
+ border-bottom: 3px solid #9D9D9D;
+ font-weight: bold;
+ .orderly{
+ cursor: pointer;
+ text-align: center;
+ }
+ vn-none{
+ min-width: 60px;
+ }
+ vn-icon{
+ line-height: 17px;
+ }
+}
\ No newline at end of file
diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html
index f2a27a61d..ee31e8df3 100644
--- a/client/production/src/index/index.html
+++ b/client/production/src/index/index.html
@@ -23,9 +23,10 @@
-
+
@@ -51,21 +52,23 @@
-
+
+
diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js
index 6e6b64325..e5904aab6 100644
--- a/client/production/src/index/index.js
+++ b/client/production/src/index/index.js
@@ -23,6 +23,10 @@ export default class ProductionIndex {
};
this.hourItems = [];
this.child = undefined;
+ this.warehouse = {
+ id: 1,
+ name: "Silla FV"
+ };
}
get checkAll() {
return this._checkAll;
@@ -128,6 +132,9 @@ export default class ProductionIndex {
delete this.child;
}
// END modals and actions modals
+ onOrder(field, dir) {
+ console.log('order by', field, dir);
+ }
$doCheck() {
if (this.actions.state) {
this.doAction('changeState');
diff --git a/client/production/src/locale/es.json b/client/production/src/locale/es.json
index faa95e5bf..359387c47 100644
--- a/client/production/src/locale/es.json
+++ b/client/production/src/locale/es.json
@@ -13,5 +13,11 @@
"Boxes" : "Cajas",
"Comment" : "Comentario",
"Message" : "Mensaje",
- "Send" : "Enviar"
+ "Send" : "Enviar",
+ "Date" : "Fecha",
+ "Route ID": "ID Ruta",
+ "Province" : "Provincia",
+ "Cancel" : "Cancelar",
+ "Filter" : "Filtrar",
+ "Ticket with incidence" : "Ticket con incidencia"
}
\ No newline at end of file
diff --git a/client/production/src/production-comment/production-comment.html b/client/production/src/production-comment/production-comment.html
index 14342ab00..e094d47b8 100644
--- a/client/production/src/production-comment/production-comment.html
+++ b/client/production/src/production-comment/production-comment.html
@@ -1,4 +1,6 @@
-
-
+
+
+
+
\ No newline at end of file
diff --git a/client/production/src/production-filters/production-filters.html b/client/production/src/production-filters/production-filters.html
index 2fd12511e..6dd8ac31c 100644
--- a/client/production/src/production-filters/production-filters.html
+++ b/client/production/src/production-filters/production-filters.html
@@ -1,26 +1,24 @@
-
-
-
+
+
+ label="Province">
-
+
-
-
+
+
-
-
+
+
diff --git a/client/production/src/production-filters/production-filters.js b/client/production/src/production-filters/production-filters.js
index 0e6143efc..eb6a95ea4 100644
--- a/client/production/src/production-filters/production-filters.js
+++ b/client/production/src/production-filters/production-filters.js
@@ -1,4 +1,5 @@
import ngModule from '../module';
+import './style.scss';
ngModule.component('vnProductionFilterPanel', {
template: require('./production-filters.html')
diff --git a/client/production/src/production-filters/style.scss b/client/production/src/production-filters/style.scss
new file mode 100644
index 000000000..17e5fc417
--- /dev/null
+++ b/client/production/src/production-filters/style.scss
@@ -0,0 +1,9 @@
+vn-production-filter-panel{
+ .mdl-button--colored{
+ color: #ffa410 !important;
+ background-color: white !important;
+ }
+ .mdl-button--colored:hover{
+ color: white !important;
+ }
+}
\ No newline at end of file
diff --git a/services/production/common/methods/warehouse/list-warehouses.js b/services/production/common/methods/warehouse/list-warehouses.js
index 9b3c315be..9f650e67f 100644
--- a/services/production/common/methods/warehouse/list-warehouses.js
+++ b/services/production/common/methods/warehouse/list-warehouses.js
@@ -2,8 +2,8 @@ module.exports = function(Warehouse) {
Warehouse.remoteMethod('list', {
description: 'List production warehouses',
returns: {
- arg: 'warehouses',
- type: 'array'
+ type: [Warehouse],
+ root: true
},
http: {
verb: 'get',
diff --git a/services/production/common/models/warehouse.json b/services/production/common/models/warehouse.json
index 80c8b8500..28b814d60 100644
--- a/services/production/common/models/warehouse.json
+++ b/services/production/common/models/warehouse.json
@@ -31,5 +31,8 @@
"principalId": "root",
"permission": "ALLOW"
}
- ]
+ ],
+ "scopes" : {
+ "production" : {"where": {"tpv": {"neq": 0}}}
+ }
}
From ce15b68a921aebe4857bb9d94776a7c09af23e7d Mon Sep 17 00:00:00 2001
From: nelo
Date: Wed, 21 Jun 2017 07:28:03 +0200
Subject: [PATCH 39/98] list for all models
---
services/client/common/models/my-model.js | 21 ++++++++++++++++---
.../production/common/methods/state/find.js | 6 +-----
.../methods/warehouse/list-warehouses.js | 19 -----------------
.../common/methods/warehouse/list.js | 7 +++++++
services/production/common/models/my-model.js | 21 ++++++++++++++++---
services/service/models/my-model.js | 21 ++++++++++++++++---
6 files changed, 62 insertions(+), 33 deletions(-)
delete mode 100644 services/production/common/methods/warehouse/list-warehouses.js
create mode 100644 services/production/common/methods/warehouse/list.js
diff --git a/services/client/common/models/my-model.js b/services/client/common/models/my-model.js
index 37f8d846b..1372fc644 100644
--- a/services/client/common/models/my-model.js
+++ b/services/client/common/models/my-model.js
@@ -25,7 +25,9 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
+ };
+ self.defineScope = function(serverFilter) {
this.remoteMethod('list', {
accepts: [
{
@@ -43,10 +45,23 @@ module.exports = function(self) {
path: '/list'
}
});
-
- };
- self.list = function(filter, cb) {};
+ this.list = function(clientFilter, cb) {
+ var where = {"and": []};
+ (clientFilter) ? where.and.push(clientFilter.where) : undefined;
+ (serverFilter) ? where.and.push(serverFilter.where) : undefined;
+
+ var order = (clientFilter && clientFilter.order) ? clientFilter.order : (serverFilter && serverFilter.order) ? serverFilter.order : undefined;
+ var limit = (serverFilter && serverFilter.limit) ? serverFilter.limit : (clientFilter && clientFilter.limit) ? clientFilter.limit : undefined;
+
+ var filter = {"where": where, "order": order, "limit": limit};
+ filter = removeEmpty(filter);
+
+ this.find(filter, function(err, states) {
+ (!err) ? cb(null, states) : cb(err, null);
+ });
+ };
+ };
self.rawSql = function(query, params, cb) {
this.dataSource.connector.execute(query, params, function(error, response) {
diff --git a/services/production/common/methods/state/find.js b/services/production/common/methods/state/find.js
index af8a7c217..19dc86b36 100644
--- a/services/production/common/methods/state/find.js
+++ b/services/production/common/methods/state/find.js
@@ -1,10 +1,6 @@
module.exports = function(State) {
State.list = function(filter, cb) {
- State.find(where(filter), function(err, states) {
- if(!err){
- cb(null, states);
- }
- });
+
};
function where(filter) {
diff --git a/services/production/common/methods/warehouse/list-warehouses.js b/services/production/common/methods/warehouse/list-warehouses.js
deleted file mode 100644
index c1a2413ee..000000000
--- a/services/production/common/methods/warehouse/list-warehouses.js
+++ /dev/null
@@ -1,19 +0,0 @@
-module.exports = function(Warehouse) {
- Warehouse.list = function(filter, cb) {
- Warehouse.find(where(filter), function(err, warehouses){
- if(!err)
- cb(null, warehouses);
- else
- cb(err, null);
- });
- };
-
- var where = function(filter){
- if(!filter)
- return {"where": {"tpv": {"neq": 0}}}
- else {
- filter.where.tpv = {"neq": 0}
- return filter;
- }
- }
-}
\ No newline at end of file
diff --git a/services/production/common/methods/warehouse/list.js b/services/production/common/methods/warehouse/list.js
new file mode 100644
index 000000000..1f3dc06bb
--- /dev/null
+++ b/services/production/common/methods/warehouse/list.js
@@ -0,0 +1,7 @@
+module.exports = function(Warehouse) {
+
+ var serverFilter = {"where": {"tpv": {"neq": 0}}};
+
+ Warehouse.defineScope(serverFilter);
+
+}
\ No newline at end of file
diff --git a/services/production/common/models/my-model.js b/services/production/common/models/my-model.js
index 37f8d846b..1372fc644 100644
--- a/services/production/common/models/my-model.js
+++ b/services/production/common/models/my-model.js
@@ -25,7 +25,9 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
+ };
+ self.defineScope = function(serverFilter) {
this.remoteMethod('list', {
accepts: [
{
@@ -43,10 +45,23 @@ module.exports = function(self) {
path: '/list'
}
});
-
- };
- self.list = function(filter, cb) {};
+ this.list = function(clientFilter, cb) {
+ var where = {"and": []};
+ (clientFilter) ? where.and.push(clientFilter.where) : undefined;
+ (serverFilter) ? where.and.push(serverFilter.where) : undefined;
+
+ var order = (clientFilter && clientFilter.order) ? clientFilter.order : (serverFilter && serverFilter.order) ? serverFilter.order : undefined;
+ var limit = (serverFilter && serverFilter.limit) ? serverFilter.limit : (clientFilter && clientFilter.limit) ? clientFilter.limit : undefined;
+
+ var filter = {"where": where, "order": order, "limit": limit};
+ filter = removeEmpty(filter);
+
+ this.find(filter, function(err, states) {
+ (!err) ? cb(null, states) : cb(err, null);
+ });
+ };
+ };
self.rawSql = function(query, params, cb) {
this.dataSource.connector.execute(query, params, function(error, response) {
diff --git a/services/service/models/my-model.js b/services/service/models/my-model.js
index 37f8d846b..1372fc644 100644
--- a/services/service/models/my-model.js
+++ b/services/service/models/my-model.js
@@ -25,7 +25,9 @@ module.exports = function(self) {
for(let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
+ };
+ self.defineScope = function(serverFilter) {
this.remoteMethod('list', {
accepts: [
{
@@ -43,10 +45,23 @@ module.exports = function(self) {
path: '/list'
}
});
-
- };
- self.list = function(filter, cb) {};
+ this.list = function(clientFilter, cb) {
+ var where = {"and": []};
+ (clientFilter) ? where.and.push(clientFilter.where) : undefined;
+ (serverFilter) ? where.and.push(serverFilter.where) : undefined;
+
+ var order = (clientFilter && clientFilter.order) ? clientFilter.order : (serverFilter && serverFilter.order) ? serverFilter.order : undefined;
+ var limit = (serverFilter && serverFilter.limit) ? serverFilter.limit : (clientFilter && clientFilter.limit) ? clientFilter.limit : undefined;
+
+ var filter = {"where": where, "order": order, "limit": limit};
+ filter = removeEmpty(filter);
+
+ this.find(filter, function(err, states) {
+ (!err) ? cb(null, states) : cb(err, null);
+ });
+ };
+ };
self.rawSql = function(query, params, cb) {
this.dataSource.connector.execute(query, params, function(error, response) {
From a4d9c3008ac5b2c5f3890c489e3640ee67a7e3e2 Mon Sep 17 00:00:00 2001
From: nelo
Date: Wed, 21 Jun 2017 08:00:34 +0200
Subject: [PATCH 40/98] agencies
---
.../production/common/methods/agency/list.js | 7 ++++
.../production/common/methods/state/find.js | 22 ------------
.../production/common/methods/state/list.js | 7 ++++
services/production/common/models/agency.js | 9 +++++
services/production/common/models/agency.json | 34 +++++++++++++++++++
services/production/common/models/state.js | 2 +-
.../production/common/models/warehouse.js | 2 +-
services/production/server/model-config.json | 4 +++
8 files changed, 63 insertions(+), 24 deletions(-)
create mode 100644 services/production/common/methods/agency/list.js
delete mode 100644 services/production/common/methods/state/find.js
create mode 100644 services/production/common/methods/state/list.js
create mode 100644 services/production/common/models/agency.js
create mode 100644 services/production/common/models/agency.json
diff --git a/services/production/common/methods/agency/list.js b/services/production/common/methods/agency/list.js
new file mode 100644
index 000000000..9ef206d6f
--- /dev/null
+++ b/services/production/common/methods/agency/list.js
@@ -0,0 +1,7 @@
+module.exports = function(Agency) {
+
+ var serverFilter = {"where": {"tpv": {"neq": 0}}};
+
+ Agency.defineScope(serverFilter);
+
+}
\ No newline at end of file
diff --git a/services/production/common/methods/state/find.js b/services/production/common/methods/state/find.js
deleted file mode 100644
index 19dc86b36..000000000
--- a/services/production/common/methods/state/find.js
+++ /dev/null
@@ -1,22 +0,0 @@
-module.exports = function(State) {
- State.list = function(filter, cb) {
-
- };
-
- function where(filter) {
-
- if(!filter)
- return {
- where: {
- "order": {gt: 0 }
- },
- order: "order, name"
- }
- else{
- filter.where.order = {gt: 0 };
- filter.order = "order, name";
- return filter;
- }
- }
-
-}
\ No newline at end of file
diff --git a/services/production/common/methods/state/list.js b/services/production/common/methods/state/list.js
new file mode 100644
index 000000000..2d999a069
--- /dev/null
+++ b/services/production/common/methods/state/list.js
@@ -0,0 +1,7 @@
+module.exports = function(State) {
+
+ var serverFilter = {where: { "order": {gt: 0 }}, order: "order, name"};
+
+ State.defineScope(serverFilter);
+
+}
\ No newline at end of file
diff --git a/services/production/common/models/agency.js b/services/production/common/models/agency.js
new file mode 100644
index 000000000..79fbe7a96
--- /dev/null
+++ b/services/production/common/models/agency.js
@@ -0,0 +1,9 @@
+var app = require('../../server/server');
+
+module.exports = function(Agency) {
+ var models = app.models;
+
+ // Methods
+
+ require('../methods/agency/list.js')(Agency);
+};
\ No newline at end of file
diff --git a/services/production/common/models/agency.json b/services/production/common/models/agency.json
new file mode 100644
index 000000000..69daf7b58
--- /dev/null
+++ b/services/production/common/models/agency.json
@@ -0,0 +1,34 @@
+{
+ "name": "Agency",
+ "base": "MyModel",
+ "validateUpsert": true,
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "Number",
+ "forceId": false
+ },
+ "name": {
+ "type": "String",
+ "required": false
+ },
+ "tpv":{
+ "type": "Number",
+ "required": false
+ }
+ },
+ "acls": [
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "DENY"
+ },
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "root",
+ "permission": "ALLOW"
+ }
+ ]
+}
diff --git a/services/production/common/models/state.js b/services/production/common/models/state.js
index aef20d465..072b036cb 100644
--- a/services/production/common/models/state.js
+++ b/services/production/common/models/state.js
@@ -5,5 +5,5 @@ module.exports = function(State) {
// Methods
- require('../methods/state/find.js')(State);
+ require('../methods/state/list.js')(State);
};
\ No newline at end of file
diff --git a/services/production/common/models/warehouse.js b/services/production/common/models/warehouse.js
index b46253ae1..062013911 100644
--- a/services/production/common/models/warehouse.js
+++ b/services/production/common/models/warehouse.js
@@ -5,5 +5,5 @@ module.exports = function(Warehouse) {
// Methods
- require('../methods/warehouse/list-warehouses.js')(Warehouse);
+ require('../methods/warehouse/list.js')(Warehouse);
};
\ No newline at end of file
diff --git a/services/production/server/model-config.json b/services/production/server/model-config.json
index 8c99a47b4..fcb1cb8f7 100644
--- a/services/production/server/model-config.json
+++ b/services/production/server/model-config.json
@@ -60,5 +60,9 @@
"Employee":{
"dataSource": "client",
"public": true
+ },
+ "Agency": {
+ "dataSource": "vn",
+ "public": true
}
}
From 3796741371aa2eab48ac9f042ce94554c3846e94 Mon Sep 17 00:00:00 2001
From: Dani Herrero
Date: Wed, 21 Jun 2017 09:46:31 +0200
Subject: [PATCH 41/98] =?UTF-8?q?primera=20versi=C3=B3n=20del=20componente?=
=?UTF-8?q?=20vnGridHeader=20para=20ordenaci=C3=B3n=20de=20tablas?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../core/src/colum-header/colum-header.html | 6 +--
client/core/src/colum-header/colum-header.js | 43 +++++--------------
client/core/src/grid-header/grid-header.js | 15 +++++--
client/core/src/grid-header/style.scss | 1 -
client/production/src/index/index.html | 4 +-
5 files changed, 28 insertions(+), 41 deletions(-)
diff --git a/client/core/src/colum-header/colum-header.html b/client/core/src/colum-header/colum-header.html
index f71b0823f..ba59d4d00 100644
--- a/client/core/src/colum-header/colum-header.html
+++ b/client/core/src/colum-header/colum-header.html
@@ -1,10 +1,10 @@
-
+
{{::$ctrl.text}}
-
-
+
+
\ No newline at end of file
diff --git a/client/core/src/colum-header/colum-header.js b/client/core/src/colum-header/colum-header.js
index cb9fcc492..d30631db7 100644
--- a/client/core/src/colum-header/colum-header.js
+++ b/client/core/src/colum-header/colum-header.js
@@ -1,40 +1,19 @@
import {module} from '../module';
-export default class vnColumHeader {
- constructor($element, $timeout, $transclude) {
- this.$element = $element;
- this.$timeout = $timeout;
- this.order = null;
- this.showOrder = false;
+export default class ColumHeader {
+ constructor() {
+ this.order = undefined;
}
onClick() {
- switch (this.order) {
- case 'ASC':
- this.$timeout(() => {
- this.showOrder = true;
- this.order = 'DESC';
- // this.gH.onOrder(this.field, this.order);
- });
- break;
- default:
- this.$timeout(() => {
- this.showOrder = true;
- this.order = 'ASC';
- });
- break;
- }
- this.$timeout(
- () => {
- this.showOrder = false;
- }, 1000);
- }
- $onInit() {
- if (this.field) {
- this.$element.bind("click", () => this.onClick());
+ if (this.order === 'ASC') {
+ this.order = 'DESC';
+ } else {
+ this.order = 'ASC';
}
+ this.gridHeader.selectColum(this);
}
}
-vnColumHeader.$inject = ['$element', '$timeout'];
+ColumHeader.$inject = [];
module.component('vnColumHeader', {
template: require('./colum-header.html'),
@@ -44,8 +23,8 @@ module.component('vnColumHeader', {
className: '@?'
},
require: {
- gH: '^vnGridHeader'
+ gridHeader: '^^vnGridHeader'
},
- controller: vnColumHeader,
+ controller: ColumHeader,
transclude: true
});
diff --git a/client/core/src/grid-header/grid-header.js b/client/core/src/grid-header/grid-header.js
index ae999a247..a2feca2f3 100644
--- a/client/core/src/grid-header/grid-header.js
+++ b/client/core/src/grid-header/grid-header.js
@@ -3,15 +3,24 @@ import './style.scss';
export default class GridHeader {
constructor() {
-
+ this.field = undefined;
+ this.order = undefined;
}
+
+ selectColum(col) {
+ this.field = col.field;
+ this.order = col.order;
+ if (this.onOrder)
+ this.onOrder(this);
+ }
+
}
module.component('vnGridHeader', {
template: require('./grid-header.html'),
transclude: true,
- binding: {
+ bindings: {
onOrder: '&?'
},
- component: GridHeader
+ controller: GridHeader
});
diff --git a/client/core/src/grid-header/style.scss b/client/core/src/grid-header/style.scss
index 7eca64265..3a933e295 100644
--- a/client/core/src/grid-header/style.scss
+++ b/client/core/src/grid-header/style.scss
@@ -3,7 +3,6 @@ vn-grid-header {
font-weight: bold;
.orderly{
cursor: pointer;
- text-align: center;
}
vn-none{
min-width: 60px;
diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html
index ee31e8df3..51037562f 100644
--- a/client/production/src/index/index.html
+++ b/client/production/src/index/index.html
@@ -1,5 +1,5 @@
-
+
@@ -53,7 +53,7 @@
-
+
From a7a4a211e2a1ea6047ab9cc71776d327c92344cf Mon Sep 17 00:00:00 2001
From: nelo
Date: Wed, 21 Jun 2017 12:11:38 +0200
Subject: [PATCH 42/98] fake production in table
---
services/client/common/models/my-model.js | 4 +-
.../common/methods/fake-production/list.js | 15 ++++
services/production/common/models/client.json | 32 ++++++++
.../production/common/models/employee.json | 3 +
.../common/models/fake-production.js | 8 ++
.../common/models/fake-production.json | 81 +++++++++++++++++++
services/production/common/models/my-model.js | 4 +-
.../production/common/models/province.json | 30 +++++++
services/production/server/model-config.json | 12 +++
services/service/models/my-model.js | 4 +-
10 files changed, 187 insertions(+), 6 deletions(-)
create mode 100644 services/production/common/methods/fake-production/list.js
create mode 100644 services/production/common/models/client.json
create mode 100644 services/production/common/models/fake-production.js
create mode 100644 services/production/common/models/fake-production.json
create mode 100644 services/production/common/models/province.json
diff --git a/services/client/common/models/my-model.js b/services/client/common/models/my-model.js
index 1372fc644..bfc5cf015 100644
--- a/services/client/common/models/my-model.js
+++ b/services/client/common/models/my-model.js
@@ -28,7 +28,7 @@ module.exports = function(self) {
};
self.defineScope = function(serverFilter) {
- this.remoteMethod('list', {
+ this.remoteMethodCtx('list', {
accepts: [
{
arg: 'filter',
@@ -46,7 +46,7 @@ module.exports = function(self) {
}
});
- this.list = function(clientFilter, cb) {
+ this.list = function(ctx, clientFilter, cb) {
var where = {"and": []};
(clientFilter) ? where.and.push(clientFilter.where) : undefined;
(serverFilter) ? where.and.push(serverFilter.where) : undefined;
diff --git a/services/production/common/methods/fake-production/list.js b/services/production/common/methods/fake-production/list.js
new file mode 100644
index 000000000..6894500e0
--- /dev/null
+++ b/services/production/common/methods/fake-production/list.js
@@ -0,0 +1,15 @@
+module.exports = function(FakeProduction) {
+
+ FakeProduction.defineScope();
+
+ FakeProduction.list = function(ctx, filter, cb){
+ FakeProduction.connectToService(ctx, "client");
+
+ this.find(filter, function(err, tickets) {
+ (!err) ? cb(null, tickets) : cb(err, null);
+ });
+
+ FakeProduction.disconnectFromService("client");
+ }
+
+}
\ No newline at end of file
diff --git a/services/production/common/models/client.json b/services/production/common/models/client.json
new file mode 100644
index 000000000..cdbfa7e3d
--- /dev/null
+++ b/services/production/common/models/client.json
@@ -0,0 +1,32 @@
+{
+ "name": "Client",
+ "base": "MyModel",
+ "validateUpsert": true,
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "name": {
+ "type": "string",
+ "required": true
+ }
+ },
+ "acls": [
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "DENY"
+ },
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "root",
+ "permission": "ALLOW"
+ }
+ ],
+ "validations": [],
+ "methods": {}
+}
\ No newline at end of file
diff --git a/services/production/common/models/employee.json b/services/production/common/models/employee.json
index bb676a071..c3590d748 100644
--- a/services/production/common/models/employee.json
+++ b/services/production/common/models/employee.json
@@ -7,6 +7,9 @@
"type": "Number",
"id": true,
"description": "Identifier"
+ },
+ "name":{
+ "type": "String"
}
},
"acls": []
diff --git a/services/production/common/models/fake-production.js b/services/production/common/models/fake-production.js
new file mode 100644
index 000000000..f7f277b99
--- /dev/null
+++ b/services/production/common/models/fake-production.js
@@ -0,0 +1,8 @@
+var app = require('../../server/server');
+
+module.exports = function(FakeProduction) {
+ var models = app.models;
+
+ // Methods
+ require('../methods/fake-production/list.js')(FakeProduction);
+};
\ No newline at end of file
diff --git a/services/production/common/models/fake-production.json b/services/production/common/models/fake-production.json
new file mode 100644
index 000000000..469d5bfd5
--- /dev/null
+++ b/services/production/common/models/fake-production.json
@@ -0,0 +1,81 @@
+{
+ "name": "FakeProduction",
+ "base": "MyModel",
+ "validateUpsert": true,
+ "properties": {
+ "id": {
+ "id": true,
+ "type": "Number",
+ "forceId": false
+ },
+ "hour":{
+ "type": "String"
+ },
+ "lines":{
+ "type": "Number"
+ },
+ "m3":{
+ "type": "Number"
+ },
+ "boxes":{
+ "type": "Number"
+ },
+ "city":{
+ "type": "String"
+ },
+ "problem":{
+ "type": "String"
+ }
+ },
+ "relations": {
+ "ticket": {
+ "type": "belongsTo",
+ "model": "Ticket",
+ "foreignKey": "ticketFk"
+ },
+ "state": {
+ "type": "belongsTo",
+ "model": "State",
+ "foreignKey": "stateFk"
+ },
+ "agency": {
+ "type": "belongsTo",
+ "model": "Agency",
+ "foreignKey": "agencyFk"
+ },
+ "province": {
+ "type": "belongsTo",
+ "model": "Province",
+ "foreignKey": "provinceFk"
+ },
+ "client": {
+ "type": "belongsTo",
+ "model": "Client",
+ "foreignKey": "clientFk"
+ },
+ "worker": {
+ "type": "belongsTo",
+ "model": "Employee",
+ "foreignKey": "workerFk"
+ },
+ "salePerson": {
+ "type": "belongsTo",
+ "model": "Employee",
+ "foreignKey": "salePersonFk"
+ }
+ },
+ "acls": [
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "DENY"
+ },
+ {
+ "accessType": "*",
+ "principalType": "ROLE",
+ "principalId": "root",
+ "permission": "ALLOW"
+ }
+ ]
+}
diff --git a/services/production/common/models/my-model.js b/services/production/common/models/my-model.js
index 1372fc644..bfc5cf015 100644
--- a/services/production/common/models/my-model.js
+++ b/services/production/common/models/my-model.js
@@ -28,7 +28,7 @@ module.exports = function(self) {
};
self.defineScope = function(serverFilter) {
- this.remoteMethod('list', {
+ this.remoteMethodCtx('list', {
accepts: [
{
arg: 'filter',
@@ -46,7 +46,7 @@ module.exports = function(self) {
}
});
- this.list = function(clientFilter, cb) {
+ this.list = function(ctx, clientFilter, cb) {
var where = {"and": []};
(clientFilter) ? where.and.push(clientFilter.where) : undefined;
(serverFilter) ? where.and.push(serverFilter.where) : undefined;
diff --git a/services/production/common/models/province.json b/services/production/common/models/province.json
new file mode 100644
index 000000000..b63edbb78
--- /dev/null
+++ b/services/production/common/models/province.json
@@ -0,0 +1,30 @@
+{
+ "name": "Province",
+ "base": "MyModel",
+ "validateUpsert": true,
+ "properties": {
+ "id": {
+ "type": "Number",
+ "id": true,
+ "description": "Identifier"
+ },
+ "name": {
+ "type": "string",
+ "required": true
+ }
+ },
+ "acls": [
+ {
+ "accessType": "READ",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "ALLOW"
+ },
+ {
+ "accessType": "WRITE",
+ "principalType": "ROLE",
+ "principalId": "$everyone",
+ "permission": "DENY"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/services/production/server/model-config.json b/services/production/server/model-config.json
index fcb1cb8f7..64efcbc90 100644
--- a/services/production/server/model-config.json
+++ b/services/production/server/model-config.json
@@ -61,8 +61,20 @@
"dataSource": "client",
"public": true
},
+ "Client":{
+ "dataSource": "client",
+ "public": true
+ },
+ "Province":{
+ "dataSource": "client",
+ "public": true
+ },
"Agency": {
"dataSource": "vn",
"public": true
+ },
+ "FakeProduction": {
+ "dataSource": "vn",
+ "public": true
}
}
diff --git a/services/service/models/my-model.js b/services/service/models/my-model.js
index 1372fc644..bfc5cf015 100644
--- a/services/service/models/my-model.js
+++ b/services/service/models/my-model.js
@@ -28,7 +28,7 @@ module.exports = function(self) {
};
self.defineScope = function(serverFilter) {
- this.remoteMethod('list', {
+ this.remoteMethodCtx('list', {
accepts: [
{
arg: 'filter',
@@ -46,7 +46,7 @@ module.exports = function(self) {
}
});
- this.list = function(clientFilter, cb) {
+ this.list = function(ctx, clientFilter, cb) {
var where = {"and": []};
(clientFilter) ? where.and.push(clientFilter.where) : undefined;
(serverFilter) ? where.and.push(serverFilter.where) : undefined;
From 05b6c81a1bf9a84187d5276a12c0547f70930bf5 Mon Sep 17 00:00:00 2001
From: Dani Herrero
Date: Wed, 21 Jun 2017 13:16:37 +0200
Subject: [PATCH 43/98] dropDown con filtro
---
.../core/src/colum-header/colum-header.html | 10 ++++----
client/core/src/drop-down/drop-down.html | 8 +++++--
client/core/src/drop-down/drop-down.js | 4 ++--
client/core/src/drop-down/style.scss | 23 ++++++++++++++++++-
client/core/src/grid-header/grid-header.html | 2 +-
client/core/src/grid-header/grid-header.js | 11 +++++----
client/core/src/grid-header/style.scss | 21 +++++++++++++----
client/core/src/icon-menu/icon-menu.html | 2 +-
client/production/src/index/index.html | 21 +++++++++--------
client/production/src/index/index.js | 2 +-
client/salix/src/styles/misc.scss | 21 ++++++++---------
11 files changed, 82 insertions(+), 43 deletions(-)
diff --git a/client/core/src/colum-header/colum-header.html b/client/core/src/colum-header/colum-header.html
index ba59d4d00..286a6774a 100644
--- a/client/core/src/colum-header/colum-header.html
+++ b/client/core/src/colum-header/colum-header.html
@@ -1,10 +1,12 @@
-
+
{{::$ctrl.text}}
-
-
-
+
+
+
+
+
\ No newline at end of file
diff --git a/client/core/src/drop-down/drop-down.html b/client/core/src/drop-down/drop-down.html
index c448520fa..59d312a6e 100644
--- a/client/core/src/drop-down/drop-down.html
+++ b/client/core/src/drop-down/drop-down.html
@@ -1,3 +1,7 @@
-
- {{::item.name}}
+
\ No newline at end of file
diff --git a/client/core/src/drop-down/drop-down.js b/client/core/src/drop-down/drop-down.js
index b9c7b6b15..de7f6f648 100644
--- a/client/core/src/drop-down/drop-down.js
+++ b/client/core/src/drop-down/drop-down.js
@@ -19,8 +19,8 @@ module.component('vnDropDown', {
bindings: {
items: '<',
show: '<',
+ filter: '@?',
selected: '=',
top: ''
- },
- controllerAs: 'dd'
+ }
});
diff --git a/client/core/src/drop-down/style.scss b/client/core/src/drop-down/style.scss
index 4f592be75..70e5a43fb 100644
--- a/client/core/src/drop-down/style.scss
+++ b/client/core/src/drop-down/style.scss
@@ -11,13 +11,34 @@ vn-drop-down {
border: 1px solid #A7A7A7;
li {
list-style-type: none;
- padding: 5px 20px 5px 5px;
+ padding: 5px 10px;
cursor: pointer;
white-space: nowrap;
+ &.filter{
+ padding: 5px;
+ input{
+ height: 25px;
+ padding-left: 5px;
+ }
+ vn-icon{
+ font-size: 16px;
+ position: absolute;
+ margin-left: -20px;
+ margin-top: 7px;
+ }
+ }
}
li:hover{
background-color: #3D3A3B;
color: white;
+ &.filter{
+ vn-icon{
+ color: #3D3A3B;
+ &:hover{
+ color: red;
+ }
+ }
+ }
}
}
}
\ No newline at end of file
diff --git a/client/core/src/grid-header/grid-header.html b/client/core/src/grid-header/grid-header.html
index 6956dafb3..02c0e4101 100644
--- a/client/core/src/grid-header/grid-header.html
+++ b/client/core/src/grid-header/grid-header.html
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/client/core/src/grid-header/grid-header.js b/client/core/src/grid-header/grid-header.js
index a2feca2f3..3f8bd7292 100644
--- a/client/core/src/grid-header/grid-header.js
+++ b/client/core/src/grid-header/grid-header.js
@@ -3,15 +3,16 @@ import './style.scss';
export default class GridHeader {
constructor() {
- this.field = undefined;
- this.order = undefined;
+ this.currentColumn = undefined;
}
selectColum(col) {
- this.field = col.field;
- this.order = col.order;
+ if (this.currentColumn && this.currentColumn.field != col.field)
+ this.currentColumn.order = undefined;
+
+ this.currentColumn = col;
if (this.onOrder)
- this.onOrder(this);
+ this.onOrder(this.currentColumn);
}
}
diff --git a/client/core/src/grid-header/style.scss b/client/core/src/grid-header/style.scss
index 3a933e295..2380df4d1 100644
--- a/client/core/src/grid-header/style.scss
+++ b/client/core/src/grid-header/style.scss
@@ -3,11 +3,24 @@ vn-grid-header {
font-weight: bold;
.orderly{
cursor: pointer;
- }
- vn-none{
- min-width: 60px;
+ text-align: center;
+ white-space: nowrap;
+ justify-content: center;
+ vn-none{
+ min-width: 16px;
+ }
}
vn-icon{
- line-height: 17px;
+ line-height: 16px;
+ font-size: 16px;
+ margin: 0;
+ padding: 0;
+ display: inline;
+ i {
+ padding-top: 3px;
+ }
}
+}
+vn-grid-header > vn-horizontal > vn-none {
+ min-width: 60px;
}
\ No newline at end of file
diff --git a/client/core/src/icon-menu/icon-menu.html b/client/core/src/icon-menu/icon-menu.html
index 03d88046c..4c49c44f6 100644
--- a/client/core/src/icon-menu/icon-menu.html
+++ b/client/core/src/icon-menu/icon-menu.html
@@ -1,4 +1,4 @@
\ No newline at end of file
diff --git a/client/production/src/index/index.html b/client/production/src/index/index.html
index 51037562f..949875d96 100644
--- a/client/production/src/index/index.html
+++ b/client/production/src/index/index.html
@@ -1,5 +1,6 @@
+
-
+
@@ -58,7 +59,7 @@
-
+
@@ -76,14 +77,14 @@
- {{::ticket.ticket}}
- {{::ticket.agency}}
- {{::ticket.salePerson | ucwords}}
- {{::ticket.hour}}
- {{ticket.state}}
- {{::ticket.lines}}
- {{::ticket.m3}}
- {{::ticket.boxes}}
+ {{::ticket.ticket}}
+ {{::ticket.agency}}
+ {{::ticket.salePerson | ucwords}}
+ {{::ticket.hour}}
+ {{ticket.state}}
+ {{::ticket.lines}}
+ {{::ticket.m3}}
+ {{::ticket.boxes}}
diff --git a/client/production/src/index/index.js b/client/production/src/index/index.js
index e5904aab6..f4c1e939f 100644
--- a/client/production/src/index/index.js
+++ b/client/production/src/index/index.js
@@ -133,7 +133,7 @@ export default class ProductionIndex {
}
// END modals and actions modals
onOrder(field, dir) {
- console.log('order by', field, dir);
+ console.log('TODO: call rest api order by', field, dir);
}
$doCheck() {
if (this.actions.state) {
diff --git a/client/salix/src/styles/misc.scss b/client/salix/src/styles/misc.scss
index 2823fe4ea..d870a496c 100644
--- a/client/salix/src/styles/misc.scss
+++ b/client/salix/src/styles/misc.scss
@@ -31,25 +31,22 @@ vn-button-bar {
html [text-center], .text-center {
text-align: center;
}
+html [text-right], .text-right{
+ text-align: right;
+}
+html [text-left], .text-left{
+ text-align: left;
+}
html [vn-right], .vn-right{
float: right;
}
html [vn-left], .vn-left{
float: left;
}
-
-.list-header{
- border-bottom: 3px solid $color-medium-grey;
- font-weight: bold;
- }
-
-.list-footer{
- border-top: 3px solid $color-medium-grey;
- font-weight: bold;
-}
-.list > vn-one, .list > [vn-one], .list > [vn-two], .list > vn-two{
- text-align: center;
+html [vn-center], .vn-center{
+ justify-content: center;
}
+
.list > vn-none{
min-width: 60px;
}
From 26e1e9a71bae66fd251817cee97481d83d01f514 Mon Sep 17 00:00:00 2001
From: nelo
Date: Wed, 21 Jun 2017 13:29:01 +0200
Subject: [PATCH 44/98] list ticket fake production
---
services/client/common/models/my-model.js | 127 ++++++++----------
.../methods/fake-production/filter.json | 44 ++++++
.../common/methods/fake-production/list.js | 9 +-
.../production/common/models/employee.json | 3 +
.../common/models/fake-production.json | 4 +-
services/production/common/models/my-model.js | 127 ++++++++----------
services/service/models/my-model.js | 127 ++++++++----------
7 files changed, 228 insertions(+), 213 deletions(-)
create mode 100644 services/production/common/methods/fake-production/filter.json
diff --git a/services/client/common/models/my-model.js b/services/client/common/models/my-model.js
index bfc5cf015..bc5423721 100644
--- a/services/client/common/models/my-model.js
+++ b/services/client/common/models/my-model.js
@@ -1,28 +1,26 @@
module.exports = function(self) {
-
self.setup = function() {
self.super_.setup.call(this);
let disableMethods = {
- 'create': true,
- 'replaceOrCreate': true,
- 'patchOrCreate': true,
- 'upsert': true,
- 'updateOrCreate': true,
- 'exists': true,
- 'find': true,
- 'findOne': true,
- 'findById': true,
- 'deleteById': true,
- 'replaceById': true,
- 'updateAttributes': false,
- 'createChangeStream': true,
- 'updateAll': true,
- 'upsertWithWhere': true,
- 'count': true
+ create: true,
+ replaceOrCreate: true,
+ patchOrCreate: true,
+ upsert: true,
+ updateOrCreate: true,
+ exists: true,
+ find: true,
+ findOne: true,
+ findById: true,
+ deleteById: true,
+ replaceById: true,
+ updateAttributes: false,
+ createChangeStream: true,
+ updateAll: true,
+ upsertWithWhere: true,
+ count: true
};
-
- for(let method in disableMethods) {
+ for (let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
};
@@ -31,12 +29,12 @@ module.exports = function(self) {
this.remoteMethodCtx('list', {
accepts: [
{
- arg: 'filter',
- type: 'object',
+ arg: 'filter',
+ type: 'object',
description: 'Filter defining where'
}
],
- returns: {
+ returns: {
type: [this.modelName],
root: true
},
@@ -47,14 +45,14 @@ module.exports = function(self) {
});
this.list = function(ctx, clientFilter, cb) {
- var where = {"and": []};
+ var where = {and: []};
(clientFilter) ? where.and.push(clientFilter.where) : undefined;
(serverFilter) ? where.and.push(serverFilter.where) : undefined;
var order = (clientFilter && clientFilter.order) ? clientFilter.order : (serverFilter && serverFilter.order) ? serverFilter.order : undefined;
var limit = (serverFilter && serverFilter.limit) ? serverFilter.limit : (clientFilter && clientFilter.limit) ? clientFilter.limit : undefined;
- var filter = {"where": where, "order": order, "limit": limit};
+ var filter = {where: where, order: order, limit: limit};
filter = removeEmpty(filter);
this.find(filter, function(err, states) {
@@ -70,15 +68,15 @@ module.exports = function(self) {
};
self.remoteMethodCtx = function(methodName, args) {
- if(args.accepts !== undefined && Array.isArray(args.accepts)) {
- var ctx = {
- arg: 'context',
- type: 'object',
- http: function(ctx) {
- return ctx;
+ if (args.accepts !== undefined && Array.isArray(args.accepts)) {
+ var ctx = {
+ arg: 'context',
+ type: 'object',
+ http: function(ctx) {
+ return ctx;
}
- }
- args.accepts.unshift(ctx);
+ };
+ args.accepts.unshift(ctx);
}
this.remoteMethod(methodName, args);
};
@@ -113,7 +111,7 @@ module.exports = function(self) {
}
],
returns: {
- arg: 'data',
+ arg: 'data',
type: [this.modelName],
root: true
},
@@ -125,65 +123,56 @@ module.exports = function(self) {
this[methodName] = (params, cb) => {
let filter = removeEmpty(filterCb(params));
- var response = {}
+ var response = {};
- function returnValues(){
- if(response.instances !== undefined && response.count !== undefined)
+ function returnValues() {
+ if (response.instances !== undefined && response.count !== undefined)
cb(null, response);
}
- function error(){
+ function error() {
cb(null, response);
}
this.find(filter, function(err, instances) {
- if(!err){
+ if (err) {
+ error();
+ } else {
response.instances = instances;
returnValues();
}
- else{
- error();
- }
-
- })
-
+ });
this.count(filter.where, function(err, totalCount){
- if(!err){
+ if (err) {
+ error();
+ } else {
response.count = totalCount;
returnValues();
}
- else{
- error();
- }
-
- })
+ });
};
-
};
-}
-
+};
function removeEmpty(o) {
- if(Array.isArray(o)) {
+ if (Array.isArray(o)) {
let array = [];
- for(let item of o) {
+ for (let item of o) {
let i = removeEmpty(item);
- if(!isEmpty(item))
+ if (!isEmpty(item))
array.push(item);
- };
- if(array.length > 0)
- return array;
- }
- else if (typeof o === 'object') {
- let object = {};
- for(let key in o) {
- let i = removeEmpty(o[key]);
- if(!isEmpty(i))
- object[key] = i;
}
- if(Object.keys(object).length > 0)
+ if (array.length > 0)
+ return array;
+ } else if (typeof o === 'object') {
+ let object = {};
+ for (let key in o) {
+ let i = removeEmpty(o[key]);
+ if (!isEmpty(i))
+ object[key] = i;
+ }
+ if (Object.keys(object).length > 0)
return object;
- }
- else if (!isEmpty(o))
+ } else if (!isEmpty(o))
return o;
return undefined;
diff --git a/services/production/common/methods/fake-production/filter.json b/services/production/common/methods/fake-production/filter.json
new file mode 100644
index 000000000..aa1c9c0fc
--- /dev/null
+++ b/services/production/common/methods/fake-production/filter.json
@@ -0,0 +1,44 @@
+[
+ {
+ "relation": "ticket",
+ "scope": {
+ "fields": ["id"]
+ }
+ },
+ {
+ "relation": "state",
+ "scope": {
+ "fields": ["id", "name"]
+ }
+ },
+ {
+ "relation": "agency",
+ "scope": {
+ "fields": ["id", "name"]
+ }
+ },
+ {
+ "relation": "province",
+ "scope": {
+ "fields": ["id", "name"]
+ }
+ },
+ {
+ "relation": "client",
+ "scope": {
+ "fields": ["id", "name"]
+ }
+ },
+ {
+ "relation": "worker",
+ "scope": {
+ "fields": ["id", "name", "surname"]
+ }
+ },
+ {
+ "relation": "salesPerson",
+ "scope": {
+ "fields": ["id", "name", "surname"]
+ }
+ }
+]
\ No newline at end of file
diff --git a/services/production/common/methods/fake-production/list.js b/services/production/common/methods/fake-production/list.js
index 6894500e0..dbfd505c8 100644
--- a/services/production/common/methods/fake-production/list.js
+++ b/services/production/common/methods/fake-production/list.js
@@ -5,11 +5,12 @@ module.exports = function(FakeProduction) {
FakeProduction.list = function(ctx, filter, cb){
FakeProduction.connectToService(ctx, "client");
- this.find(filter, function(err, tickets) {
- (!err) ? cb(null, tickets) : cb(err, null);
- });
+ filter.include = require('./filter.json');
- FakeProduction.disconnectFromService("client");
+ this.find(filter, function(err, tickets) {
+ FakeProduction.disconnectFromService("client");
+ (err) ? cb(err, null) : cb(null, tickets);
+ });
}
}
\ No newline at end of file
diff --git a/services/production/common/models/employee.json b/services/production/common/models/employee.json
index c3590d748..7d21f958d 100644
--- a/services/production/common/models/employee.json
+++ b/services/production/common/models/employee.json
@@ -10,6 +10,9 @@
},
"name":{
"type": "String"
+ },
+ "surname":{
+ "type": "String"
}
},
"acls": []
diff --git a/services/production/common/models/fake-production.json b/services/production/common/models/fake-production.json
index 469d5bfd5..32a588c78 100644
--- a/services/production/common/models/fake-production.json
+++ b/services/production/common/models/fake-production.json
@@ -58,10 +58,10 @@
"model": "Employee",
"foreignKey": "workerFk"
},
- "salePerson": {
+ "salesPerson": {
"type": "belongsTo",
"model": "Employee",
- "foreignKey": "salePersonFk"
+ "foreignKey": "salesPersonFk"
}
},
"acls": [
diff --git a/services/production/common/models/my-model.js b/services/production/common/models/my-model.js
index bfc5cf015..bc5423721 100644
--- a/services/production/common/models/my-model.js
+++ b/services/production/common/models/my-model.js
@@ -1,28 +1,26 @@
module.exports = function(self) {
-
self.setup = function() {
self.super_.setup.call(this);
let disableMethods = {
- 'create': true,
- 'replaceOrCreate': true,
- 'patchOrCreate': true,
- 'upsert': true,
- 'updateOrCreate': true,
- 'exists': true,
- 'find': true,
- 'findOne': true,
- 'findById': true,
- 'deleteById': true,
- 'replaceById': true,
- 'updateAttributes': false,
- 'createChangeStream': true,
- 'updateAll': true,
- 'upsertWithWhere': true,
- 'count': true
+ create: true,
+ replaceOrCreate: true,
+ patchOrCreate: true,
+ upsert: true,
+ updateOrCreate: true,
+ exists: true,
+ find: true,
+ findOne: true,
+ findById: true,
+ deleteById: true,
+ replaceById: true,
+ updateAttributes: false,
+ createChangeStream: true,
+ updateAll: true,
+ upsertWithWhere: true,
+ count: true
};
-
- for(let method in disableMethods) {
+ for (let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
};
@@ -31,12 +29,12 @@ module.exports = function(self) {
this.remoteMethodCtx('list', {
accepts: [
{
- arg: 'filter',
- type: 'object',
+ arg: 'filter',
+ type: 'object',
description: 'Filter defining where'
}
],
- returns: {
+ returns: {
type: [this.modelName],
root: true
},
@@ -47,14 +45,14 @@ module.exports = function(self) {
});
this.list = function(ctx, clientFilter, cb) {
- var where = {"and": []};
+ var where = {and: []};
(clientFilter) ? where.and.push(clientFilter.where) : undefined;
(serverFilter) ? where.and.push(serverFilter.where) : undefined;
var order = (clientFilter && clientFilter.order) ? clientFilter.order : (serverFilter && serverFilter.order) ? serverFilter.order : undefined;
var limit = (serverFilter && serverFilter.limit) ? serverFilter.limit : (clientFilter && clientFilter.limit) ? clientFilter.limit : undefined;
- var filter = {"where": where, "order": order, "limit": limit};
+ var filter = {where: where, order: order, limit: limit};
filter = removeEmpty(filter);
this.find(filter, function(err, states) {
@@ -70,15 +68,15 @@ module.exports = function(self) {
};
self.remoteMethodCtx = function(methodName, args) {
- if(args.accepts !== undefined && Array.isArray(args.accepts)) {
- var ctx = {
- arg: 'context',
- type: 'object',
- http: function(ctx) {
- return ctx;
+ if (args.accepts !== undefined && Array.isArray(args.accepts)) {
+ var ctx = {
+ arg: 'context',
+ type: 'object',
+ http: function(ctx) {
+ return ctx;
}
- }
- args.accepts.unshift(ctx);
+ };
+ args.accepts.unshift(ctx);
}
this.remoteMethod(methodName, args);
};
@@ -113,7 +111,7 @@ module.exports = function(self) {
}
],
returns: {
- arg: 'data',
+ arg: 'data',
type: [this.modelName],
root: true
},
@@ -125,65 +123,56 @@ module.exports = function(self) {
this[methodName] = (params, cb) => {
let filter = removeEmpty(filterCb(params));
- var response = {}
+ var response = {};
- function returnValues(){
- if(response.instances !== undefined && response.count !== undefined)
+ function returnValues() {
+ if (response.instances !== undefined && response.count !== undefined)
cb(null, response);
}
- function error(){
+ function error() {
cb(null, response);
}
this.find(filter, function(err, instances) {
- if(!err){
+ if (err) {
+ error();
+ } else {
response.instances = instances;
returnValues();
}
- else{
- error();
- }
-
- })
-
+ });
this.count(filter.where, function(err, totalCount){
- if(!err){
+ if (err) {
+ error();
+ } else {
response.count = totalCount;
returnValues();
}
- else{
- error();
- }
-
- })
+ });
};
-
};
-}
-
+};
function removeEmpty(o) {
- if(Array.isArray(o)) {
+ if (Array.isArray(o)) {
let array = [];
- for(let item of o) {
+ for (let item of o) {
let i = removeEmpty(item);
- if(!isEmpty(item))
+ if (!isEmpty(item))
array.push(item);
- };
- if(array.length > 0)
- return array;
- }
- else if (typeof o === 'object') {
- let object = {};
- for(let key in o) {
- let i = removeEmpty(o[key]);
- if(!isEmpty(i))
- object[key] = i;
}
- if(Object.keys(object).length > 0)
+ if (array.length > 0)
+ return array;
+ } else if (typeof o === 'object') {
+ let object = {};
+ for (let key in o) {
+ let i = removeEmpty(o[key]);
+ if (!isEmpty(i))
+ object[key] = i;
+ }
+ if (Object.keys(object).length > 0)
return object;
- }
- else if (!isEmpty(o))
+ } else if (!isEmpty(o))
return o;
return undefined;
diff --git a/services/service/models/my-model.js b/services/service/models/my-model.js
index bfc5cf015..bc5423721 100644
--- a/services/service/models/my-model.js
+++ b/services/service/models/my-model.js
@@ -1,28 +1,26 @@
module.exports = function(self) {
-
self.setup = function() {
self.super_.setup.call(this);
let disableMethods = {
- 'create': true,
- 'replaceOrCreate': true,
- 'patchOrCreate': true,
- 'upsert': true,
- 'updateOrCreate': true,
- 'exists': true,
- 'find': true,
- 'findOne': true,
- 'findById': true,
- 'deleteById': true,
- 'replaceById': true,
- 'updateAttributes': false,
- 'createChangeStream': true,
- 'updateAll': true,
- 'upsertWithWhere': true,
- 'count': true
+ create: true,
+ replaceOrCreate: true,
+ patchOrCreate: true,
+ upsert: true,
+ updateOrCreate: true,
+ exists: true,
+ find: true,
+ findOne: true,
+ findById: true,
+ deleteById: true,
+ replaceById: true,
+ updateAttributes: false,
+ createChangeStream: true,
+ updateAll: true,
+ upsertWithWhere: true,
+ count: true
};
-
- for(let method in disableMethods) {
+ for (let method in disableMethods) {
//this.disableRemoteMethod(method, disableMethods[method]);
}
};
@@ -31,12 +29,12 @@ module.exports = function(self) {
this.remoteMethodCtx('list', {
accepts: [
{
- arg: 'filter',
- type: 'object',
+ arg: 'filter',
+ type: 'object',
description: 'Filter defining where'
}
],
- returns: {
+ returns: {
type: [this.modelName],
root: true
},
@@ -47,14 +45,14 @@ module.exports = function(self) {
});
this.list = function(ctx, clientFilter, cb) {
- var where = {"and": []};
+ var where = {and: []};
(clientFilter) ? where.and.push(clientFilter.where) : undefined;
(serverFilter) ? where.and.push(serverFilter.where) : undefined;
var order = (clientFilter && clientFilter.order) ? clientFilter.order : (serverFilter && serverFilter.order) ? serverFilter.order : undefined;
var limit = (serverFilter && serverFilter.limit) ? serverFilter.limit : (clientFilter && clientFilter.limit) ? clientFilter.limit : undefined;
- var filter = {"where": where, "order": order, "limit": limit};
+ var filter = {where: where, order: order, limit: limit};
filter = removeEmpty(filter);
this.find(filter, function(err, states) {
@@ -70,15 +68,15 @@ module.exports = function(self) {
};
self.remoteMethodCtx = function(methodName, args) {
- if(args.accepts !== undefined && Array.isArray(args.accepts)) {
- var ctx = {
- arg: 'context',
- type: 'object',
- http: function(ctx) {
- return ctx;
+ if (args.accepts !== undefined && Array.isArray(args.accepts)) {
+ var ctx = {
+ arg: 'context',
+ type: 'object',
+ http: function(ctx) {
+ return ctx;
}
- }
- args.accepts.unshift(ctx);
+ };
+ args.accepts.unshift(ctx);
}
this.remoteMethod(methodName, args);
};
@@ -113,7 +111,7 @@ module.exports = function(self) {
}
],
returns: {
- arg: 'data',
+ arg: 'data',
type: [this.modelName],
root: true
},
@@ -125,65 +123,56 @@ module.exports = function(self) {
this[methodName] = (params, cb) => {
let filter = removeEmpty(filterCb(params));
- var response = {}
+ var response = {};
- function returnValues(){
- if(response.instances !== undefined && response.count !== undefined)
+ function returnValues() {
+ if (response.instances !== undefined && response.count !== undefined)
cb(null, response);
}
- function error(){
+ function error() {
cb(null, response);
}
this.find(filter, function(err, instances) {
- if(!err){
+ if (err) {
+ error();
+ } else {
response.instances = instances;
returnValues();
}
- else{
- error();
- }
-
- })
-
+ });
this.count(filter.where, function(err, totalCount){
- if(!err){
+ if (err) {
+ error();
+ } else {
response.count = totalCount;
returnValues();
}
- else{
- error();
- }
-
- })
+ });
};
-
};
-}
-
+};
function removeEmpty(o) {
- if(Array.isArray(o)) {
+ if (Array.isArray(o)) {
let array = [];
- for(let item of o) {
+ for (let item of o) {
let i = removeEmpty(item);
- if(!isEmpty(item))
+ if (!isEmpty(item))
array.push(item);
- };
- if(array.length > 0)
- return array;
- }
- else if (typeof o === 'object') {
- let object = {};
- for(let key in o) {
- let i = removeEmpty(o[key]);
- if(!isEmpty(i))
- object[key] = i;
}
- if(Object.keys(object).length > 0)
+ if (array.length > 0)
+ return array;
+ } else if (typeof o === 'object') {
+ let object = {};
+ for (let key in o) {
+ let i = removeEmpty(o[key]);
+ if (!isEmpty(i))
+ object[key] = i;
+ }
+ if (Object.keys(object).length > 0)
return object;
- }
- else if (!isEmpty(o))
+ } else if (!isEmpty(o))
return o;
return undefined;
From 4890a69238c08e60227534b959ac2bea1080d68a Mon Sep 17 00:00:00 2001
From: nelo
Date: Thu, 22 Jun 2017 09:09:31 +0200
Subject: [PATCH 45/98] page and offset filter FakeProduction
---
.../common/methods/fake-production/list.js | 25 +-
.../common/methods/ticket/list-fake.json | 1516 -----------------
.../production/common/methods/ticket/list.js | 7 -
services/production/common/models/ticket.js | 2 -
4 files changed, 23 insertions(+), 1527 deletions(-)
delete mode 100644 services/production/common/methods/ticket/list-fake.json
diff --git a/services/production/common/methods/fake-production/list.js b/services/production/common/methods/fake-production/list.js
index dbfd505c8..1271f1d9e 100644
--- a/services/production/common/methods/fake-production/list.js
+++ b/services/production/common/methods/fake-production/list.js
@@ -3,14 +3,35 @@ module.exports = function(FakeProduction) {
FakeProduction.defineScope();
FakeProduction.list = function(ctx, filter, cb){
+
+ var page = filter.page - 1;
+ var limit = filter.limit * page;
+ var offset = (page + 1) * filter.limit;
+
+ delete filter.limit;
+ delete filter.page;
+
FakeProduction.connectToService(ctx, "client");
filter.include = require('./filter.json');
-
+
this.find(filter, function(err, tickets) {
FakeProduction.disconnectFromService("client");
- (err) ? cb(err, null) : cb(null, tickets);
+ (err) ? cb(err, null) : cb(null, (sum(tickets, limit, offset)));
});
+
+ function sum(tickets, limit, offset){
+ var obj = {lines: 0, m3: 0};
+ tickets.forEach(function(t) {
+ obj.lines += t.lines;
+ obj.m3 += t.m3;
+ }, this);
+ obj.m3 = obj.m3.toFixed(2);
+ obj.total = tickets.length;
+ obj.tickets = tickets.slice(limit, offset);
+ return obj;
+ }
+
}
}
\ No newline at end of file
diff --git a/services/production/common/methods/ticket/list-fake.json b/services/production/common/methods/ticket/list-fake.json
deleted file mode 100644
index 6cf32bc13..000000000
--- a/services/production/common/methods/ticket/list-fake.json
+++ /dev/null
@@ -1,1516 +0,0 @@
-[
- {
- "ticket": 1535516,
- "agency": "MRW 24h",
- "worker": "MARIA JOSE LAMELA FELIPE",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 4,
- "m3": 0.07,
- "boxes": 0,
- "city": "SAN FERNANDO",
- "province": "Cádiz",
- "client": 7315,
- "salePerson": "MARIA JOSE LAMELA FELIPE",
- "problems": null
- },
- {
- "ticket": 1535518,
- "agency": "ZELERIS",
- "worker": "JUAN CARLOS LORENZO SANCHEZ",
- "hour": 17,
- "state": "OK",
- "lines": 10,
- "m3": 0.25,
- "boxes": 0,
- "city": "ANDORRA",
- "province": "Teruel",
- "client": 1911,
- "salePerson": "JUAN CARLOS LORENZO SANCHEZ",
- "problems": null
- },
- {
- "ticket": 1535519,
- "agency": "ZELERIS",
- "worker": "JOSE JULIAN SAEZ FERNANDEZ",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 8,
- "m3": 0.42,
- "boxes": 0,
- "city": "AVILES",
- "province": "Asturias",
- "client": 4471,
- "salePerson": "JOSE JULIAN SAEZ FERNANDEZ",
- "problems": null
- },
- {
- "ticket": 1535521,
- "agency": "INTEGRA2",
- "worker": "JUAN CARLOS LORENZO SANCHEZ",
- "hour": 17,
- "state": "Arreglar",
- "lines": 21,
- "m3": 0.21,
- "boxes": 0,
- "city": "SANXENXO",
- "province": "Pontevedra",
- "client": 5075,
- "salePerson": "JUAN CARLOS LORENZO SANCHEZ",
- "problems": null
- },
- {
- "ticket": 1535523,
- "agency": "ZELERIS",
- "worker": "Mª CARMEN SERRANO BAU",
- "hour": 17,
- "state": "OK",
- "lines": 12,
- "m3": 0.32,
- "boxes": 0,
- "city": "ALHENDIN",
- "province": "Granada",
- "client": 1501,
- "salePerson": "Mª CARMEN SERRANO BAU",
- "problems": null
- },
- {
- "ticket": 1535524,
- "agency": "INTEGRA2",
- "worker": "COMPUTER SYSTEM",
- "hour": 17,
- "state": "Libre",
- "lines": 15,
- "m3": 0.33,
- "boxes": 0,
- "city": "A CORUÑA",
- "province": "La Coruña",
- "client": 8002,
- "salePerson": "COMPUTER SYSTEM",
- "problems": null
- },
- {
- "ticket": 1535526,
- "agency": "ZELERIS",
- "worker": "RODRIGO HALABI ROCHA",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 11,
- "m3": 0.1,
- "boxes": 0,
- "city": "LOGROÑO",
- "province": "La Rioja",
- "client": 2197,
- "salePerson": "RODRIGO HALABI ROCHA",
- "problems": null
- },
- {
- "ticket": 1535531,
- "agency": "INTEGRA2",
- "worker": "FRAN NATEK ECHEVARRIA",
- "hour": 17,
- "state": "OK",
- "lines": 7,
- "m3": 0.28,
- "boxes": 0,
- "city": "LLEIDA",
- "province": "Lleida",
- "client": 4227,
- "salePerson": "FRAN NATEK ECHEVARRIA",
- "problems": null
- },
- {
- "ticket": 1535544,
- "agency": "VIAEXPRESS Interdia",
- "worker": "DEMBA SAKHO",
- "hour": 12,
- "state": "Encajado",
- "lines": 13,
- "m3": 0.2,
- "boxes": 0,
- "city": "LA POBLA DE VALLBONA",
- "province": "Valencia",
- "client": 2053,
- "salePerson": "DEMBA SAKHO",
- "problems": null
- },
- {
- "ticket": 1535548,
- "agency": "ZONA 10",
- "worker": "CONCHA ESTEBAN VILLENA",
- "hour": 23,
- "state": "OK",
- "lines": 6,
- "m3": 0.06,
- "boxes": 0,
- "city": "PICANYA",
- "province": "Valencia",
- "client": 2879,
- "salePerson": "CONCHA ESTEBAN VILLENA",
- "problems": null
- },
- {
- "ticket": 1535549,
- "agency": "CORREOSEXPRESS",
- "worker": "JAVIER VILAR PASTOR",
- "hour": 17,
- "state": "OK",
- "lines": 3,
- "m3": 0.14,
- "boxes": 0,
- "city": "LOJA",
- "province": "Granada",
- "client": 329,
- "salePerson": "JAVIER VILAR PASTOR",
- "problems": null
- },
- {
- "ticket": 1535555,
- "agency": "REC_VILASSAR",
- "worker": "COMPUTER SYSTEM",
- "hour": 19,
- "state": "Libre",
- "lines": 8,
- "m3": 0.38,
- "boxes": 0,
- "city": "VILASSAR DE MAR",
- "province": "Barcelona",
- "client": 6945,
- "salePerson": "COMPUTER SYSTEM",
- "problems": null
- },
- {
- "ticket": 1535557,
- "agency": "CORREOSEXPRESS",
- "worker": "MARIA DEL MAR GIRBES FERRUS",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 7,
- "m3": 0.08,
- "boxes": 0,
- "city": "EL ALTET",
- "province": "Alicante",
- "client": 8000,
- "salePerson": "MARIA DEL MAR GIRBES FERRUS",
- "problems": null
- },
- {
- "ticket": 1535558,
- "agency": "ZONA 11",
- "worker": 0,
- "hour": 21,
- "state": "Libre",
- "lines": 13,
- "m3": 0.41,
- "boxes": 0,
- "city": "TORREBLANCA",
- "province": "Castellón",
- "client": 5377,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535559,
- "agency": "ZONA 20",
- "worker": "ELENA BASCUÑANA TORNERO",
- "hour": 20,
- "state": "OK",
- "lines": 17,
- "m3": 0.36,
- "boxes": 0,
- "city": "MADRID",
- "province": "Madrid",
- "client": 3574,
- "salePerson": "ELENA BASCUÑANA TORNERO",
- "problems": null
- },
- {
- "ticket": 1535560,
- "agency": "ZONA 43",
- "worker": "DEMBA SAKHO",
- "hour": 14,
- "state": "Encajado",
- "lines": 1,
- "m3": 0.02,
- "boxes": 0,
- "city": "INCA",
- "province": "Baleares (Mallorca)",
- "client": 7500,
- "salePerson": "DEMBA SAKHO",
- "problems": null
- },
- {
- "ticket": 1535561,
- "agency": "ZELERIS",
- "worker": "MANOLI PULIDO",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 1,
- "m3": 0.05,
- "boxes": 0,
- "city": "TERUEL",
- "province": "Teruel",
- "client": 860,
- "salePerson": "MANOLI PULIDO",
- "problems": null
- },
- {
- "ticket": 1535562,
- "agency": "ZONA 46",
- "worker": "MIGUEL ANGEL LAGUNA",
- "hour": 15,
- "state": "Impreso",
- "lines": 1,
- "m3": 0.16,
- "boxes": 2,
- "city": "MALAGA",
- "province": "Málaga",
- "client": 5630,
- "salePerson": "MIGUEL ANGEL LAGUNA",
- "problems": null
- },
- {
- "ticket": 1535573,
- "agency": "ZONA 43",
- "worker": "JULIAN RAMIREZ SAYAGO",
- "hour": 14,
- "state": "Encajado",
- "lines": 19,
- "m3": 0.12,
- "boxes": 0,
- "city": "PALMA",
- "province": "Baleares (Mallorca)",
- "client": 6966,
- "salePerson": "JULIAN RAMIREZ SAYAGO",
- "problems": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non mattis ante. Curabitur id malesuada sapien. Praesent convallis erat id. "
- },
- {
- "ticket": 1535578,
- "agency": "MRW 24h",
- "worker": "ESDENKA CALERO PEREZ",
- "hour": 17,
- "state": "Arreglar",
- "lines": 7,
- "m3": 0.12,
- "boxes": 0,
- "city": "VILLAMARIN DE VALDEORRAS",
- "province": "Orense",
- "client": 6671,
- "salePerson": "ESDENKA CALERO PEREZ",
- "problems": null
- },
- {
- "ticket": 1535579,
- "agency": "ZONA 46",
- "worker": "JUANLU GALLETERO",
- "hour": 15,
- "state": "Revisado",
- "lines": 5,
- "m3": 0.14,
- "boxes": 0,
- "city": "MALAGA",
- "province": "Málaga",
- "client": 6534,
- "salePerson": "JUANLU GALLETERO",
- "problems": null
- },
- {
- "ticket": 1535583,
- "agency": "MRW 24h",
- "worker": "CARLOS ZAMBRANO GARCIA",
- "hour": 17,
- "state": "OK",
- "lines": 4,
- "m3": 0.11,
- "boxes": 0,
- "city": "PALOMARES DEL RIO",
- "province": "Sevilla",
- "client": 8506,
- "salePerson": "CARLOS ZAMBRANO GARCIA",
- "problems": null
- },
- {
- "ticket": 1535584,
- "agency": "ZONA 46",
- "worker": "JULIAN RAMIREZ SAYAGO",
- "hour": 15,
- "state": "Encajado",
- "lines": 10,
- "m3": 0.46,
- "boxes": 0,
- "city": "MARBELLA",
- "province": "Málaga",
- "client": 3018,
- "salePerson": "JULIAN RAMIREZ SAYAGO",
- "problems": null
- },
- {
- "ticket": 1535589,
- "agency": "VIAEXPRESS Interdia",
- "worker": "DEMBA SAKHO",
- "hour": 12,
- "state": "Encajado",
- "lines": 5,
- "m3": 0.22,
- "boxes": 0,
- "city": "valencia",
- "province": "Valencia",
- "client": 3781,
- "salePerson": "DEMBA SAKHO",
- "problems": null
- },
- {
- "ticket": 1535594,
- "agency": "VIAEXPRESS Interdia",
- "worker": "JULIAN RAMIREZ SAYAGO",
- "hour": 12,
- "state": "Encajado",
- "lines": 5,
- "m3": 0.2,
- "boxes": 0,
- "city": "BENISSODA",
- "province": "Valencia",
- "client": 958,
- "salePerson": "JULIAN RAMIREZ SAYAGO",
- "problems": null
- },
- {
- "ticket": 1535597,
- "agency": "CORREOSEXPRESS",
- "worker": 0,
- "hour": 17,
- "state": "Libre",
- "lines": 9,
- "m3": 0.19,
- "boxes": 0,
- "city": "SORIA",
- "province": "Soria",
- "client": 2082,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535604,
- "agency": "OTRA AGENCIA",
- "worker": "BEGOÑA RODRIGUEZ",
- "hour": 24,
- "state": "Entregado",
- "lines": 1,
- "m3": 0,
- "boxes": 0,
- "city": "MADRID",
- "province": "Madrid",
- "client": 5134,
- "salePerson": "BEGOÑA RODRIGUEZ",
- "problems": null
- },
- {
- "ticket": 1535610,
- "agency": "ZELERIS",
- "worker": 0,
- "hour": 17,
- "state": "Libre",
- "lines": 3,
- "m3": 0.06,
- "boxes": 0,
- "city": "VILLANUEVA DE LA SERENA",
- "province": "Badajoz",
- "client": 2816,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535617,
- "agency": "REC_SILLA",
- "worker": "OKSANA KHODORIVSKA",
- "hour": 23,
- "state": "Entregado",
- "lines": 10,
- "m3": 0.39,
- "boxes": 0,
- "city": "TORRENT",
- "province": "Valencia",
- "client": 1072,
- "salePerson": "OKSANA KHODORIVSKA",
- "problems": null
- },
- {
- "ticket": 1535622,
- "agency": "ZONA 25",
- "worker": "JAVIER VILAR PASTOR",
- "hour": 20,
- "state": "Sin Acabar",
- "lines": 13,
- "m3": 0.4,
- "boxes": 2,
- "city": "CALZADA DE CALATRAVA",
- "province": "Ciudad Real",
- "client": 3921,
- "salePerson": "JAVIER VILAR PASTOR",
- "problems": "RIESGO"
- },
- {
- "ticket": 1535624,
- "agency": "ZONA 20",
- "worker": 0,
- "hour": 20,
- "state": "Libre",
- "lines": 10,
- "m3": 0.29,
- "boxes": 0,
- "city": "MADRID",
- "province": "Madrid",
- "client": 6131,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535631,
- "agency": "REC_VILASSAR",
- "worker": 0,
- "hour": 19,
- "state": "Libre",
- "lines": 15,
- "m3": 0.33,
- "boxes": 0,
- "city": "VILASSAR DE MAR",
- "province": "Barcelona",
- "client": 4658,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535637,
- "agency": "ZONA 43",
- "worker": "JUANLU GALLETERO",
- "hour": 14,
- "state": "Revisado",
- "lines": 10,
- "m3": 0.08,
- "boxes": 0,
- "city": "FELANITX",
- "province": "Baleares (Mallorca)",
- "client": 2477,
- "salePerson": "JUANLU GALLETERO",
- "problems": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non mattis ante. Curabitur id malesuada sapien. Praesent convallis erat id. "
- },
- {
- "ticket": 1535643,
- "agency": "VIAEXPRESS Interdia",
- "worker": "DEMBA SAKHO",
- "hour": 12,
- "state": "Encajado",
- "lines": 26,
- "m3": 0.49,
- "boxes": 0,
- "city": "BURRIAN",
- "province": "Castellón",
- "client": 3027,
- "salePerson": "DEMBA SAKHO",
- "problems": null
- },
- {
- "ticket": 1535644,
- "agency": "REC_MADRID",
- "worker": 0,
- "hour": 20,
- "state": "Libre",
- "lines": 7,
- "m3": 0.22,
- "boxes": 0,
- "city": "SAN FERNANDO DE HENARES",
- "province": "Madrid",
- "client": 3005,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535648,
- "agency": "OTRA AGENCIA",
- "worker": "BEGOÑA RODRIGUEZ",
- "hour": 24,
- "state": "Entregado",
- "lines": 1,
- "m3": 0,
- "boxes": 0,
- "city": "CATADAU",
- "province": "Valencia",
- "client": 1425,
- "salePerson": "BEGOÑA RODRIGUEZ",
- "problems": null
- },
- {
- "ticket": 1535652,
- "agency": "INTEGRA2",
- "worker": "FRAN NATEK ECHEVARRIA",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 1,
- "m3": 0.02,
- "boxes": 0,
- "city": "PALACIOS Y VILLAFRAN",
- "province": "Sevilla",
- "client": 3063,
- "salePerson": "FRAN NATEK ECHEVARRIA",
- "problems": null
- },
- {
- "ticket": 1535657,
- "agency": "OTRA AGENCIA",
- "worker": "BEGOÑA RODRIGUEZ",
- "hour": 24,
- "state": "Entregado",
- "lines": 1,
- "m3": 0,
- "boxes": 0,
- "city": "PALMA DE GANDIA",
- "province": "Valencia",
- "client": 1261,
- "salePerson": "BEGOÑA RODRIGUEZ",
- "problems": null
- },
- {
- "ticket": 1535658,
- "agency": "OTRA AGENCIA",
- "worker": "BEGOÑA RODRIGUEZ",
- "hour": 24,
- "state": "Entregado",
- "lines": 1,
- "m3": 0,
- "boxes": 0,
- "city": "GALDACANO",
- "province": "Vizcaya",
- "client": 1309,
- "salePerson": "BEGOÑA RODRIGUEZ",
- "problems": null
- },
- {
- "ticket": 1535660,
- "agency": "ZELERIS",
- "worker": "ELENA BASCUÑANA TORNERO",
- "hour": 17,
- "state": "OK",
- "lines": 2,
- "m3": 0.05,
- "boxes": 0,
- "city": "CEHEGIN",
- "province": "Murcia",
- "client": 178,
- "salePerson": "ELENA BASCUÑANA TORNERO",
- "problems": null
- },
- {
- "ticket": 1535663,
- "agency": "MRW 24h",
- "worker": "Mª CARMEN SERRANO BAU",
- "hour": 17,
- "state": "OK",
- "lines": 6,
- "m3": 0.06,
- "boxes": 0,
- "city": "ROCIANA DEL CONDADO",
- "province": "Huelva",
- "client": 6471,
- "salePerson": "Mª CARMEN SERRANO BAU",
- "problems": null
- },
- {
- "ticket": 1535673,
- "agency": "MRW 24h",
- "worker": "CRISTINA SANCHEZ BARRUGUER",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 19,
- "m3": 0.3,
- "boxes": 0,
- "city": "CIUDAD RODRIGO",
- "province": "Salamanca",
- "client": 7821,
- "salePerson": "CRISTINA SANCHEZ BARRUGUER",
- "problems": null
- },
- {
- "ticket": 1535678,
- "agency": "ZONA 11",
- "worker": "JESUS DANIEL VALLES PEREZ",
- "hour": 21,
- "state": "OK",
- "lines": 5,
- "m3": 0.18,
- "boxes": 0,
- "city": "BURRIANA",
- "province": "Castellón",
- "client": 3021,
- "salePerson": "JESUS DANIEL VALLES PEREZ",
- "problems": null
- },
- {
- "ticket": 1535679,
- "agency": "ZONA 20",
- "worker": 0,
- "hour": 20,
- "state": "Libre",
- "lines": 1,
- "m3": 0.03,
- "boxes": 0,
- "city": "MADRID",
- "province": "Madrid",
- "client": 3222,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535682,
- "agency": "VIAEXPRESS Interdia",
- "worker": "DEMBA SAKHO",
- "hour": 12,
- "state": "Encajado",
- "lines": 15,
- "m3": 0.08,
- "boxes": 0,
- "city": "PUZOL",
- "province": "Valencia",
- "client": 389,
- "salePerson": "DEMBA SAKHO",
- "problems": null
- },
- {
- "ticket": 1535684,
- "agency": "REC_SILLA",
- "worker": "GISELA LLOPIS COLOM",
- "hour": 23,
- "state": "Entregado",
- "lines": 2,
- "m3": 0.3,
- "boxes": 3,
- "city": "MONTSERRAT",
- "province": "Valencia",
- "client": 3075,
- "salePerson": "GISELA LLOPIS COLOM",
- "problems": null
- },
- {
- "ticket": 1535686,
- "agency": "ZONA 31",
- "worker": "COMPUTER SYSTEM",
- "hour": 19,
- "state": "Libre",
- "lines": 9,
- "m3": 0.15,
- "boxes": 0,
- "city": "BARBERA DEL VALLES",
- "province": "Barcelona",
- "client": 4631,
- "salePerson": "COMPUTER SYSTEM",
- "problems": null
- },
- {
- "ticket": 1535687,
- "agency": "MRW 24h",
- "worker": "CARLOS BORRAS MARTINEZ",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 6,
- "m3": 0.03,
- "boxes": 0,
- "city": "BECERREA",
- "province": "Lugo",
- "client": 5410,
- "salePerson": "CARLOS BORRAS MARTINEZ",
- "problems": null
- },
- {
- "ticket": 1535690,
- "agency": "ZELERIS",
- "worker": "DAVID SARRION RIVERO",
- "hour": 17,
- "state": "OK",
- "lines": 8,
- "m3": 0.09,
- "boxes": 0,
- "city": "REINOSA",
- "province": "Cantabria",
- "client": 4268,
- "salePerson": "DAVID SARRION RIVERO",
- "problems": null
- },
- {
- "ticket": 1535693,
- "agency": "ZONA 25",
- "worker": "RODRIGO HALABI ROCHA",
- "hour": 20,
- "state": "OK",
- "lines": 1,
- "m3": 0.06,
- "boxes": 0,
- "city": "DAIMIEL",
- "province": "Ciudad Real",
- "client": 904,
- "salePerson": "RODRIGO HALABI ROCHA",
- "problems": null
- },
- {
- "ticket": 1535694,
- "agency": "CORREOSEXPRESS",
- "worker": "CARLOS ZAMBRANO GARCIA",
- "hour": 17,
- "state": "OK",
- "lines": 4,
- "m3": 0.1,
- "boxes": 0,
- "city": "VILLARALBO",
- "province": "Zamora",
- "client": 5801,
- "salePerson": "CARLOS ZAMBRANO GARCIA",
- "problems": null
- },
- {
- "ticket": 1535699,
- "agency": "ZONA 20",
- "worker": "MANOLI PULIDO",
- "hour": 20,
- "state": "OK",
- "lines": 7,
- "m3": 0.28,
- "boxes": 0,
- "city": "ALCORCON",
- "province": "Madrid",
- "client": 422,
- "salePerson": "MANOLI PULIDO",
- "problems": null
- },
- {
- "ticket": 1535702,
- "agency": "ZELERIS",
- "worker": "Mª CARMEN SERRANO BAU",
- "hour": 17,
- "state": "OK",
- "lines": 3,
- "m3": 0.23,
- "boxes": 0,
- "city": "PURULLENA",
- "province": "Granada",
- "client": 3224,
- "salePerson": "Mª CARMEN SERRANO BAU",
- "problems": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non mattis ante. Curabitur id malesuada sapien. Praesent convallis erat id. "
- },
- {
- "ticket": 1535713,
- "agency": "REC_MADRID",
- "worker": "ELENA BASCUÑANA TORNERO",
- "hour": 20,
- "state": "OK",
- "lines": 16,
- "m3": 0.36,
- "boxes": 0,
- "city": "TORREJON DE ARDOZ",
- "province": "Madrid",
- "client": 680,
- "salePerson": "ELENA BASCUÑANA TORNERO",
- "problems": "RIESGO"
- },
- {
- "ticket": 1535719,
- "agency": "ZELERIS",
- "worker": 0,
- "hour": 17,
- "state": "Libre",
- "lines": 15,
- "m3": 0.22,
- "boxes": 0,
- "city": "RIBADESELLA",
- "province": "Asturias",
- "client": 2428,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535720,
- "agency": "REC_VILASSAR",
- "worker": 0,
- "hour": 19,
- "state": "Libre",
- "lines": 11,
- "m3": 0.07,
- "boxes": 0,
- "city": "BARCELONA",
- "province": "Barcelona",
- "client": 7628,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535724,
- "agency": "REC_SILLA",
- "worker": 0,
- "hour": 23,
- "state": "Libre",
- "lines": 3,
- "m3": 0.04,
- "boxes": 0,
- "city": "QUART DE POBLET",
- "province": "Valencia",
- "client": 326,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535727,
- "agency": "ZONA 43",
- "worker": "DEMBA SAKHO",
- "hour": 14,
- "state": "Encajando",
- "lines": 21,
- "m3": 0.35,
- "boxes": 0,
- "city": "PALMA MALLORCA",
- "province": "Baleares (Mallorca)",
- "client": 3436,
- "salePerson": "DEMBA SAKHO",
- "problems": null
- },
- {
- "ticket": 1535732,
- "agency": "ZONA 20",
- "worker": "MARIA DEL MAR GIRBES FERRUS",
- "hour": 20,
- "state": "Sin Acabar",
- "lines": 10,
- "m3": 0.44,
- "boxes": 0,
- "city": "MADRID",
- "province": "Madrid",
- "client": 7303,
- "salePerson": "MARIA DEL MAR GIRBES FERRUS",
- "problems": null
- },
- {
- "ticket": 1535736,
- "agency": "ZONA 42",
- "worker": "JUANLU GALLETERO",
- "hour": 14,
- "state": "Preparación",
- "lines": 6,
- "m3": 0.09,
- "boxes": 0,
- "city": "SANT JOSEP DE SATALIA",
- "province": "Baleares (Ibiza)",
- "client": 3472,
- "salePerson": "JUANLU GALLETERO",
- "problems": null
- },
- {
- "ticket": 1535737,
- "agency": "MRW 24h",
- "worker": "DEBORA SANCHEZ TORIO",
- "hour": 17,
- "state": "OK",
- "lines": 6,
- "m3": 0.18,
- "boxes": 0,
- "city": "MARCILLA",
- "province": "Navarra",
- "client": 957,
- "salePerson": "DEBORA SANCHEZ TORIO",
- "problems": null
- },
- {
- "ticket": 1535742,
- "agency": "ZONA 46",
- "worker": "MIGUEL ANGEL LAGUNA",
- "hour": 15,
- "state": "Impreso",
- "lines": 3,
- "m3": 0.11,
- "boxes": 0,
- "city": "MALAGA",
- "province": "Málaga",
- "client": 4812,
- "salePerson": "MIGUEL ANGEL LAGUNA",
- "problems": null
- },
- {
- "ticket": 1535747,
- "agency": "MRW 24h",
- "worker": "FRAN NATEK ECHEVARRIA",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 1,
- "m3": 0.23,
- "boxes": 2,
- "city": "SEVILLA",
- "province": "Sevilla",
- "client": 4095,
- "salePerson": "FRAN NATEK ECHEVARRIA",
- "problems": null
- },
- {
- "ticket": 1535749,
- "agency": "ZELERIS",
- "worker": "DEBORA SANCHEZ TORIO",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 1,
- "m3": 0.03,
- "boxes": 0,
- "city": "VIVEIRO",
- "province": "Lugo",
- "client": 5928,
- "salePerson": "DEBORA SANCHEZ TORIO",
- "problems": null
- },
- {
- "ticket": 1535751,
- "agency": "ZELERIS",
- "worker": "JOSE JULIAN SAEZ FERNANDEZ",
- "hour": 17,
- "state": "OK",
- "lines": 27,
- "m3": 0.95,
- "boxes": 2.99,
- "city": "RABADE LUGO",
- "province": "Lugo",
- "client": 5652,
- "salePerson": "JOSE JULIAN SAEZ FERNANDEZ",
- "problems": null
- },
- {
- "ticket": 1535756,
- "agency": "MRW 24h",
- "worker": "DAVID SARRION RIVERO",
- "hour": 17,
- "state": "OK",
- "lines": 11,
- "m3": 0.31,
- "boxes": 0,
- "city": "LANDETE",
- "province": "Cuenca",
- "client": 3857,
- "salePerson": "DAVID SARRION RIVERO",
- "problems": null
- },
- {
- "ticket": 1535758,
- "agency": "VIAEXPRESS Interdia",
- "worker": 0,
- "hour": 12,
- "state": "Libre",
- "lines": 21,
- "m3": 0.49,
- "boxes": 0,
- "city": "LA POBLA DE VALLBONA",
- "province": "Valencia",
- "client": 2053,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535765,
- "agency": "ZONA 31",
- "worker": 0,
- "hour": 19,
- "state": "Libre",
- "lines": 1,
- "m3": 0.07,
- "boxes": 0,
- "city": "SANT HIPÒLIT DE VOLTREGÀ",
- "province": "Barcelona",
- "client": 5876,
- "salePerson": 0,
- "problems": "RIESGO"
- },
- {
- "ticket": 1535770,
- "agency": "ZONA 25",
- "worker": "DEBORA SANCHEZ TORIO",
- "hour": 20,
- "state": "OK",
- "lines": 16,
- "m3": 0.18,
- "boxes": 0,
- "city": "ILLESCAS",
- "province": "Toledo",
- "client": 4283,
- "salePerson": "DEBORA SANCHEZ TORIO",
- "problems": null
- },
- {
- "ticket": 1535771,
- "agency": "ZELERIS",
- "worker": "JUANLU GALLETERO",
- "hour": 17,
- "state": "Revisado",
- "lines": 1,
- "m3": 0.03,
- "boxes": 0,
- "city": "SEVILLA",
- "province": "Sevilla",
- "client": 2000,
- "salePerson": "JUANLU GALLETERO",
- "problems": null
- },
- {
- "ticket": 1535772,
- "agency": "ZELERIS_10",
- "worker": "MARIA JOSE LAMELA FELIPE",
- "hour": 17,
- "state": "OK",
- "lines": 3,
- "m3": 0.07,
- "boxes": 0,
- "city": "SEVILLA",
- "province": "Sevilla",
- "client": 2635,
- "salePerson": "MARIA JOSE LAMELA FELIPE",
- "problems": null
- },
- {
- "ticket": 1535774,
- "agency": "ZELERIS",
- "worker": "JESUS DANIEL VALLES PEREZ",
- "hour": 17,
- "state": "OK",
- "lines": 19,
- "m3": 0.18,
- "boxes": 0,
- "city": "LEON",
- "province": "León",
- "client": 8321,
- "salePerson": "JESUS DANIEL VALLES PEREZ",
- "problems": null
- },
- {
- "ticket": 1535775,
- "agency": "ZONA 10",
- "worker": "JESUS DANIEL VALLES PEREZ",
- "hour": 23,
- "state": "OK",
- "lines": 1,
- "m3": 0.69,
- "boxes": 0,
- "city": "PUIG PLAYA",
- "province": "Valencia",
- "client": 3781,
- "salePerson": "JESUS DANIEL VALLES PEREZ",
- "problems": null
- },
- {
- "ticket": 1535776,
- "agency": "REC_MADRID",
- "worker": "CRISTINA SANCHEZ BARRUGUER",
- "hour": 20,
- "state": "Sin Acabar",
- "lines": 10,
- "m3": 0.09,
- "boxes": 0,
- "city": "TORREJON DE ARDOZ",
- "province": "Madrid",
- "client": 1600,
- "salePerson": "CRISTINA SANCHEZ BARRUGUER",
- "problems": null
- },
- {
- "ticket": 1535777,
- "agency": "ZELERIS",
- "worker": "MANOLI PULIDO",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 3,
- "m3": 0.06,
- "boxes": 0,
- "city": "PALENCIA",
- "province": "Palencia",
- "client": 3717,
- "salePerson": "MANOLI PULIDO",
- "problems": null
- },
- {
- "ticket": 1535779,
- "agency": "ZONA 11",
- "worker": "ELENA BASCUÑANA TORNERO",
- "hour": 21,
- "state": "OK",
- "lines": 16,
- "m3": 0.21,
- "boxes": 0,
- "city": "ESLIDA",
- "province": "Castellón",
- "client": 7423,
- "salePerson": "ELENA BASCUÑANA TORNERO",
- "problems": null
- },
- {
- "ticket": 1535899,
- "agency": "ZONA 31",
- "worker": "CLAUDI SANROMA REYNARES",
- "hour": 19,
- "state": "OK",
- "lines": 7,
- "m3": 0.33,
- "boxes": 0,
- "city": "MARTORELL",
- "province": "Barcelona",
- "client": 4058,
- "salePerson": "CLAUDI SANROMA REYNARES",
- "problems": null
- },
- {
- "ticket": 1535903,
- "agency": "MRW 24h",
- "worker": "SILVERIO DOMINGUEZ",
- "hour": 17,
- "state": "OK",
- "lines": 9,
- "m3": 0.24,
- "boxes": 0,
- "city": "TOLOSA",
- "province": "Guipuzcoa",
- "client": 6308,
- "salePerson": "SILVERIO DOMINGUEZ",
- "problems": null
- },
- {
- "ticket": 1535905,
- "agency": "ZONA 20",
- "worker": "ELENA BASCUÑANA TORNERO",
- "hour": 20,
- "state": "OK",
- "lines": 19,
- "m3": 0.33,
- "boxes": 0,
- "city": "MADRID",
- "province": "Madrid",
- "client": 3574,
- "salePerson": "ELENA BASCUÑANA TORNERO",
- "problems": null
- },
- {
- "ticket": 1535908,
- "agency": "INTEGRA2",
- "worker": 0,
- "hour": 17,
- "state": "Libre",
- "lines": 1,
- "m3": 0.04,
- "boxes": 0,
- "city": "LA PUEBLA DE CAZALLA",
- "province": "Sevilla",
- "client": 5007,
- "salePerson": 0
- },
- {
- "ticket": 1535911,
- "agency": "ZONA 43",
- "worker": "MIGUEL ANGEL LAGUNA",
- "hour": 14,
- "state": "Impreso",
- "lines": 53,
- "m3": 0.61,
- "boxes": 0,
- "city": "INCA",
- "province": "Baleares (Mallorca)",
- "client": 6032,
- "salePerson": "MIGUEL ANGEL LAGUNA",
- "problems": null
- },
- {
- "ticket": 1535912,
- "agency": "REC_SILLA",
- "worker": "COMPUTER SYSTEM",
- "hour": 23,
- "state": "Libre",
- "lines": 2,
- "m3": 0.11,
- "boxes": 0,
- "city": "VALENCIA",
- "province": "Valencia",
- "client": 3613,
- "salePerson": "COMPUTER SYSTEM",
- "problems": null
- },
- {
- "ticket": 1535918,
- "agency": "ZONA 10",
- "worker": 0,
- "hour": 23,
- "state": "Libre",
- "lines": 15,
- "m3": 0.12,
- "boxes": 0,
- "city": "VALENCIA",
- "province": "Valencia",
- "client": 2574,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535919,
- "agency": "ZONA 43",
- "worker": "MARIA DEL MAR GIRBES FERRUS",
- "hour": 14,
- "state": "Sin Acabar",
- "lines": 1,
- "m3": 0.01,
- "boxes": 0,
- "city": "PALMA",
- "province": "Baleares (Mallorca)",
- "client": 7445,
- "salePerson": "MARIA DEL MAR GIRBES FERRUS",
- "problems": null
- },
- {
- "ticket": 1535920,
- "agency": "INTEGRA2",
- "worker": "JULIA LLOPIS CASTELL",
- "hour": 17,
- "state": "Arreglar",
- "lines": 9,
- "m3": 0.1,
- "boxes": 0,
- "city": "Benahavis",
- "province": "Málaga",
- "client": 7796,
- "salePerson": "JULIA LLOPIS CASTELL",
- "problems": null
- },
- {
- "ticket": 1535921,
- "agency": "REC_SILLA",
- "worker": "FRAN NATEK ECHEVARRIA",
- "hour": 23,
- "state": "Entregado",
- "lines": 2,
- "m3": 0,
- "boxes": 0,
- "city": "SUECA",
- "province": "Valencia",
- "client": 1160,
- "salePerson": "FRAN NATEK ECHEVARRIA",
- "problems": null
- },
- {
- "ticket": 1535928,
- "agency": "CORREOSEXPRESS",
- "worker": 0,
- "hour": 17,
- "state": "Libre",
- "lines": 8,
- "m3": 0.07,
- "boxes": 0,
- "city": "ESCALONA",
- "province": "Toledo",
- "client": 2787,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535931,
- "agency": "ZONA 20",
- "worker": "CARLOS ZAMBRANO GARCIA",
- "hour": 20,
- "state": "Sin Acabar",
- "lines": 1,
- "m3": 0.02,
- "boxes": 0,
- "city": "PARLA",
- "province": "Madrid",
- "client": 2725,
- "salePerson": "CARLOS ZAMBRANO GARCIA",
- "problems": "RIESGO"
- },
- {
- "ticket": 1535935,
- "agency": "REC_MADRID",
- "worker": 0,
- "hour": 20,
- "state": "Libre",
- "lines": 1,
- "m3": 0.12,
- "boxes": 3,
- "city": "SAN FERNADO DE HENARES",
- "province": "Madrid",
- "client": 3240,
- "salePerson": 0,
- "problems": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent non mattis ante. Curabitur id malesuada sapien. Praesent convallis erat id. "
- },
- {
- "ticket": 1535936,
- "agency": "ZELERIS",
- "worker": "DAVID SARRION RIVERO",
- "hour": 17,
- "state": "OK",
- "lines": 2,
- "m3": 0.11,
- "boxes": 0,
- "city": "VINAROS",
- "province": "Castellón",
- "client": 768,
- "salePerson": "DAVID SARRION RIVERO",
- "problems": null
- },
- {
- "ticket": 1535938,
- "agency": "ZONA 46",
- "worker": 0,
- "hour": 15,
- "state": "Libre",
- "lines": 5,
- "m3": 0.11,
- "boxes": 0,
- "city": "VELEZ-MALAGA",
- "province": "Málaga",
- "client": 5358,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535941,
- "agency": "CORREOSEXPRESS",
- "worker": "LOLI LOZANO RAEZ",
- "hour": 17,
- "state": "OK",
- "lines": 1,
- "m3": 0.01,
- "boxes": 0,
- "city": "HUERCAL DE ALMERIA",
- "province": "Almería",
- "client": 475,
- "salePerson": "LOLI LOZANO RAEZ",
- "problems": null
- },
- {
- "ticket": 1535942,
- "agency": "CORREOSEXPRESS",
- "worker": "CARLOS ZAMBRANO GARCIA",
- "hour": 17,
- "state": "OK",
- "lines": 3,
- "m3": 0.41,
- "boxes": 10,
- "city": "CHIPIONA",
- "province": "Cádiz",
- "client": 1479,
- "salePerson": "CARLOS ZAMBRANO GARCIA",
- "problems": null
- },
- {
- "ticket": 1535943,
- "agency": "ZONA 43",
- "worker": 0,
- "hour": 14,
- "state": "Libre",
- "lines": 1,
- "m3": 0.14,
- "boxes": 0,
- "city": "PALMA DE MALLORCA",
- "province": "Baleares (Mallorca)",
- "client": 5840,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535946,
- "agency": "REC_VILASSAR",
- "worker": 0,
- "hour": 19,
- "state": "Libre",
- "lines": 1,
- "m3": 0.01,
- "boxes": 0,
- "city": "VILASSAR DE MAR",
- "province": "Barcelona",
- "client": 3951,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535956,
- "agency": "ZONA 10",
- "worker": "JOSE JAVIER ECHEVARRIA",
- "hour": 23,
- "state": "OK",
- "lines": 5,
- "m3": 0.12,
- "boxes": 0,
- "city": "CATARROJA",
- "province": "Valencia",
- "client": 4193,
- "salePerson": "JOSE JAVIER ECHEVARRIA",
- "problems": null
- },
- {
- "ticket": 1535957,
- "agency": "ZONA 43",
- "worker": 0,
- "hour": 14,
- "state": "Libre",
- "lines": 9,
- "m3": 0.08,
- "boxes": 0,
- "city": "BINISSALEM",
- "province": "Baleares (Mallorca)",
- "client": 5172,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535960,
- "agency": "MRW 24h",
- "worker": "FRAN NATEK ECHEVARRIA",
- "hour": 17,
- "state": "OK",
- "lines": 3,
- "m3": 0.09,
- "boxes": 0,
- "city": "BAENA",
- "province": "Córdoba",
- "client": 1667,
- "salePerson": "FRAN NATEK ECHEVARRIA",
- "problems": null
- },
- {
- "ticket": 1535961,
- "agency": "ZONA 20",
- "worker": 0,
- "hour": 20,
- "state": "Libre",
- "lines": 3,
- "m3": 0.11,
- "boxes": 0,
- "city": "MADRID",
- "province": "Madrid",
- "client": 5762,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535962,
- "agency": "MRW 24h",
- "worker": 0,
- "hour": 17,
- "state": "Libre",
- "lines": 19,
- "m3": 0.26,
- "boxes": 0,
- "city": "CUEVAS DEL VALLE",
- "province": "Ávila",
- "client": 6070,
- "salePerson": 0,
- "problems": null
- },
- {
- "ticket": 1535967,
- "agency": "ZELERIS",
- "worker": "FRAN NATEK ECHEVARRIA",
- "hour": 17,
- "state": "Sin Acabar",
- "lines": 1,
- "m3": 0.1,
- "boxes": 0,
- "city": "SEVILLA",
- "province": "Sevilla",
- "client": 2000,
- "salePerson": "FRAN NATEK ECHEVARRIA",
- "problems": null
- }
-]
\ No newline at end of file
diff --git a/services/production/common/methods/ticket/list.js b/services/production/common/methods/ticket/list.js
index 79dad23b9..c465dffec 100644
--- a/services/production/common/methods/ticket/list.js
+++ b/services/production/common/methods/ticket/list.js
@@ -1,5 +1,3 @@
-var json = require("./list-fake.json");
-
module.exports = function(Ticket) {
Ticket.remoteMethod('list', {
description: 'List tickets for production',
@@ -22,13 +20,8 @@ module.exports = function(Ticket) {
Ticket.list = function(cb) {
//list();
- return fake(cb);
};
- var fake = function(cb){
- cb(null, json);
- }
-
var list = function(){
var params = [1, 0];
diff --git a/services/production/common/models/ticket.js b/services/production/common/models/ticket.js
index ab62f6309..b3b9bd018 100644
--- a/services/production/common/models/ticket.js
+++ b/services/production/common/models/ticket.js
@@ -4,6 +4,4 @@ module.exports = function(Ticket) {
var models = app.models;
// Methods
-
- require('../methods/ticket/list.js')(Ticket);
};
\ No newline at end of file
From 2bdbda6192906087a3083c670d5e639013e50cfe Mon Sep 17 00:00:00 2001
From: Dani Herrero
Date: Thu, 22 Jun 2017 12:03:01 +0200
Subject: [PATCH 46/98] =?UTF-8?q?Localizador,=20cambio=20estlios,=20a?=
=?UTF-8?q?=C3=B1adido=20paginador,=20order=20by?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
client/core/src/drop-down/drop-down.html | 20 ++++--
client/core/src/drop-down/drop-down.js | 11 ++-
client/core/src/drop-down/style.scss | 60 ++++++++--------
client/core/src/icon-menu/icon-menu.html | 2 +-
client/core/src/icon-menu/icon-menu.js | 3 +
client/core/src/paging/paging.js | 10 ++-
client/production/src/index/index.html | 38 +++++-----
client/production/src/index/index.js | 71 ++++++++++++-------
client/production/src/index/style.scss | 2 +
.../src/components/main-menu/main-menu.html | 2 +-
client/salix/src/styles/misc.scss | 20 ++++++
11 files changed, 154 insertions(+), 85 deletions(-)
diff --git a/client/core/src/drop-down/drop-down.html b/client/core/src/drop-down/drop-down.html
index 59d312a6e..5c68ca3d2 100644
--- a/client/core/src/drop-down/drop-down.html
+++ b/client/core/src/drop-down/drop-down.html
@@ -1,7 +1,13 @@
-
\ No newline at end of file
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/client/core/src/drop-down/drop-down.js b/client/core/src/drop-down/drop-down.js
index de7f6f648..f2a138d73 100644
--- a/client/core/src/drop-down/drop-down.js
+++ b/client/core/src/drop-down/drop-down.js
@@ -2,16 +2,23 @@ import {module} from '../module';
import './style.scss';
export default class DropDown {
- constructor($element, $window) {
+ constructor($element, $scope) {
this.$element = $element;
+ this.$ = $scope;
}
$onChanges(changesObj) {
if (changesObj.show && changesObj.top && changesObj.top.currentValue) {
this.$element.css('top', changesObj.top.currentValue + 'px');
}
}
+ clearSearch() {
+ this.$.search = '';
+ }
+ $onInit() {
+ this.clearSearch();
+ }
}
-DropDown.$inject = ['$element'];
+DropDown.$inject = ['$element', '$scope'];
module.component('vnDropDown', {
template: require('./drop-down.html'),
diff --git a/client/core/src/drop-down/style.scss b/client/core/src/drop-down/style.scss
index 70e5a43fb..85dbf7bbd 100644
--- a/client/core/src/drop-down/style.scss
+++ b/client/core/src/drop-down/style.scss
@@ -4,41 +4,41 @@ vn-drop-down {
padding: 0 15px;
margin-left: -15px;
background: transparent;
- ul{
- padding: 0;
- margin: 10px 0 0 0;
+ .dropdown-body{
background: white;
border: 1px solid #A7A7A7;
- li {
- list-style-type: none;
- padding: 5px 10px;
- cursor: pointer;
- white-space: nowrap;
- &.filter{
- padding: 5px;
- input{
- height: 25px;
- padding-left: 5px;
- }
- vn-icon{
- font-size: 16px;
- position: absolute;
- margin-left: -20px;
- margin-top: 7px;
+ .filter{
+ padding: 5px 9px 5px 5px;
+ input{
+ height: 25px;
+ padding-left: 5px;
+ }
+ vn-icon{
+ font-size: 16px;
+ margin-left: -20px;
+ margin-top: 7px;
+ cursor: pointer;
+ &:hover{
+ color: red;
}
}
}
- li:hover{
- background-color: #3D3A3B;
- color: white;
- &.filter{
- vn-icon{
- color: #3D3A3B;
- &:hover{
- color: red;
- }
- }
+ ul{
+ padding: 0;
+ margin: 0;
+ background: white;
+ max-height: 400px;
+ overflow-y: auto;
+ li {
+ list-style-type: none;
+ padding: 5px 10px;
+ cursor: pointer;
+ white-space: nowrap;
+ }
+ li:hover{
+ background-color: #3D3A3B;
+ color: white;
}
}
- }
+ }
}
\ No newline at end of file
diff --git a/client/core/src/icon-menu/icon-menu.html b/client/core/src/icon-menu/icon-menu.html
index 4c49c44f6..a48aac3d2 100644
--- a/client/core/src/icon-menu/icon-menu.html
+++ b/client/core/src/icon-menu/icon-menu.html
@@ -1,4 +1,4 @@
-