diff --git a/front/core/components/contextmenu/index.js b/front/core/components/contextmenu/index.js
index aa2d1a16bb..646df1a0a8 100755
--- a/front/core/components/contextmenu/index.js
+++ b/front/core/components/contextmenu/index.js
@@ -43,14 +43,14 @@ export default class Contextmenu {
get row() {
if (!this.target) return null;
- return this.target.closest('vn-tr, .vn-tr');
+ return this.target.closest('[ng-repeat]');
}
get rowIndex() {
if (!this.row) return null;
+
const table = this.row.closest('vn-table, .vn-table');
- const tBody = table.querySelector('vn-tbody, .vn-tbody');
- const rows = tBody.querySelectorAll('vn-tr, .vn-tr');
+ const rows = table.querySelectorAll('[ng-repeat]');
return Array.from(rows).findIndex(
rowItem => rowItem == this.row
diff --git a/modules/client/front/web-payment/index.html b/modules/client/front/web-payment/index.html
index 7caa448816..5e09036223 100644
--- a/modules/client/front/web-payment/index.html
+++ b/modules/client/front/web-payment/index.html
@@ -25,7 +25,7 @@
diff --git a/modules/monitor/front/index/clients/index.html b/modules/monitor/front/index/clients/index.html
index f0c1b8f933..9786404fd0 100644
--- a/modules/monitor/front/index/clients/index.html
+++ b/modules/monitor/front/index/clients/index.html
@@ -10,6 +10,11 @@
Clients on website
+
+
-
+
@@ -52,12 +57,6 @@
-
- No results
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/modules/monitor/front/index/index.js b/modules/monitor/front/index/index.js
index 4807cf1c98..2e1b3b1a1d 100644
--- a/modules/monitor/front/index/index.js
+++ b/modules/monitor/front/index/index.js
@@ -2,7 +2,22 @@ import ngModule from '../module';
import Section from 'salix/components/section';
import './style.scss';
+export default class Controller extends Section {
+ toggle() {
+ const monitor = this.element.querySelector('vn-horizontal');
+ const isHidden = monitor.classList.contains('hidden');
+
+ if (!isHidden)
+ monitor.classList.add('hidden');
+ else
+ monitor.classList.remove('hidden');
+ }
+}
+
ngModule.vnComponent('vnMonitorIndex', {
template: require('./index.html'),
- controller: Section
+ controller: Controller,
+ require: {
+ main: '^vnMonitorIndex'
+ }
});
diff --git a/modules/monitor/front/index/locale/es.yml b/modules/monitor/front/index/locale/es.yml
index cb94d41a72..41d29064d3 100644
--- a/modules/monitor/front/index/locale/es.yml
+++ b/modules/monitor/front/index/locale/es.yml
@@ -4,4 +4,5 @@ Recent order actions: Acciones recientes en pedidos
Search tickets: Buscar tickets
Delete selected elements: Eliminar los elementos seleccionados
All the selected elements will be deleted. Are you sure you want to continue?: Todos los elementos seleccionados serán eliminados. ¿Seguro que quieres continuar?
-Component lack: Faltan componentes
\ No newline at end of file
+Component lack: Faltan componentes
+Minimize/Maximize: Minimizar/Maximizar
\ No newline at end of file
diff --git a/modules/monitor/front/index/orders/index.html b/modules/monitor/front/index/orders/index.html
index 3dd510dc81..6126e23efa 100644
--- a/modules/monitor/front/index/orders/index.html
+++ b/modules/monitor/front/index/orders/index.html
@@ -1,4 +1,4 @@
-
+
+
- Date
+ Date
Client
- Import
+ SalesPerson
@@ -47,7 +52,7 @@
-
+
{{::order.date_send | date: 'dd/MM/yyyy'}}
@@ -59,11 +64,18 @@
{{::order.clientName}}
- {{::order.import | currency: 'EUR':2}}
+
+
+ {{::order.salesPerson | dashIfEmpty}}
+
+
-
+
{{::order.date_make | date: 'dd/MM/yyyy HH:mm'}}
@@ -74,22 +86,11 @@
-
- {{::order.salesPerson | dashIfEmpty}}
-
+ {{::order.import | currency: 'EUR':2}}
-
- No results
-
+
+
+
+ Filter by selection
+
+
+ Exclude selection
+
+
+ Remove filter
+
+
+ Remove all filters
+
+
+ Copy value
+
+
+
this.$.model.refresh());
}
+
+ chipColor(date) {
+ const today = new Date();
+ today.setHours(0, 0, 0, 0);
+
+ const orderLanded = new Date(date);
+ orderLanded.setHours(0, 0, 0, 0);
+
+ const difference = today - orderLanded;
+
+ if (difference == 0)
+ return 'warning';
+ if (difference < 0)
+ return 'success';
+ if (difference > 0)
+ return 'alert';
+ }
+
+ exprBuilder(param, value) {
+ switch (param) {
+ case 'date_send':
+ return {[`o.date_send`]: {
+ between: this.dateRange(value)}
+ };
+ case 'clientFk':
+ return {[`c.id`]: value};
+ case 'salesPersonFk':
+ return {[`c.${param}`]: value};
+ }
+ }
+
+ dateRange(value) {
+ const minHour = new Date(value);
+ minHour.setHours(0, 0, 0, 0);
+ const maxHour = new Date(value);
+ maxHour.setHours(23, 59, 59, 59);
+
+ return [minHour, maxHour];
+ }
}
ngModule.vnComponent('vnMonitorSalesOrders', {
template: require('./index.html'),
- controller: Controller
+ controller: Controller,
+ require: {
+ main: '^vnMonitorIndex'
+ }
});
diff --git a/modules/monitor/front/index/orders/style.scss b/modules/monitor/front/index/orders/style.scss
index 8a1c860329..102712eaf9 100644
--- a/modules/monitor/front/index/orders/style.scss
+++ b/modules/monitor/front/index/orders/style.scss
@@ -2,7 +2,8 @@
vn-monitor-sales-orders {
vn-table.scrollable {
- max-height: 350px
+ max-height: 350px;
+ overflow-x: hidden
}
vn-table a.vn-tbody {
diff --git a/modules/monitor/front/index/search-panel/index.html b/modules/monitor/front/index/search-panel/index.html
index d0b77b9dea..dc24c778bf 100644
--- a/modules/monitor/front/index/search-panel/index.html
+++ b/modules/monitor/front/index/search-panel/index.html
@@ -21,36 +21,17 @@
ng-model="filter.orderFk">
-
-
-
-
-
-
- Or
-
-
-
-
-
-
+
+
+
+
vn-none > vn-icon {
@extend %clickable-light;
color: $color-button;
font-size: 1.4rem;
}
- }
- .empty-rows {
- color: $color-font-secondary;
- text-align: center;
+
+ vn-none > .arrow {
+ transition: transform 200ms;
+ }
}
- vn-vertical {
- position: fixed;
- width: 400px
+ vn-monitor-sales-clients {
+ vn-card {
+ margin-right: 15px;
+ }
+
+ .header {
+ padding-right: 15px;
+
+ & > vn-none > .arrow {
+ display: none
+ }
+ }
+ }
+
+ vn-table.scrollable {
+ height: 300px
}
vn-horizontal {
flex-wrap: wrap
}
+
+ .hidden {
+ vn-card {
+ display: none
+ }
+
+ .header > vn-none > .arrow {
+ transform: rotate(180deg);
+ }
+ }
}
-@media (max-width:1500px) {
+@media (max-width:1150px) {
vn-monitor-index {
& > vn-horizontal {
- flex-direction: column-reverse;
+ flex-direction: column;
+
+ vn-monitor-sales-clients,
+ vn-monitor-sales-orders {
+ width: 100%
+ }
+
+ vn-monitor-sales-clients {
+ margin-bottom: 15px
+ }
}
- & > vn-horizontal > vn-one {
- flex: none;
- width: 100%;
+ vn-monitor-sales-clients {
+ vn-card {
+ margin-right: 0
+ }
- & > vn-vertical {
- position: initial;
- flex-direction: row;
- width: 100%;
-
- vn-monitor-sales-clients {
- margin-right: 15px
- }
-
- vn-table.scrollable {
- height: 300px
+ .header {
+ padding-right: 0;
+
+ & > vn-none > .arrow {
+ display: inline-block
}
}
}
- }
+ }
}
\ No newline at end of file
diff --git a/modules/monitor/front/index/tickets/index.spec.js b/modules/monitor/front/index/tickets/index.spec.js
index fc689140a6..8d06b8d7d1 100644
--- a/modules/monitor/front/index/tickets/index.spec.js
+++ b/modules/monitor/front/index/tickets/index.spec.js
@@ -115,6 +115,14 @@ describe('Component vnMonitorSalesTickets', () => {
});
});
+ describe('totalPriceColor()', () => {
+ it('should return "warning" when the ticket amount is less than 50€', () => {
+ const result = controller.totalPriceColor({totalWithVat: '8.50'});
+
+ expect(result).toEqual('warning');
+ });
+ });
+
describe('preview()', () => {
it('should show the dialog summary', () => {
controller.$.summary = {show: () => {}};