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 @@
-
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}}}
+ }
}