From 52e26eb99dc0601338aea9403445991be41a9434 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 21 May 2019 12:56:29 +0200 Subject: [PATCH] mark manual lines #1449 --- front/core/components/table/style.scss | 27 +++++++++---------- front/core/locale/es.yml | 7 +++++ loopback/locale/es.json | 6 ++--- .../back/methods/ticket-request/confirm.js | 2 +- modules/ticket/front/sale/locale/es.yml | 7 ----- modules/worker/front/time-control/index.html | 23 +++++++++------- modules/worker/front/time-control/index.js | 11 +++++--- .../worker/front/time-control/index.spec.js | 4 ++- .../worker/front/time-control/locale/es.yml | 7 ----- modules/worker/front/time-control/style.scss | 12 +++++++-- 10 files changed, 57 insertions(+), 49 deletions(-) diff --git a/front/core/components/table/style.scss b/front/core/components/table/style.scss index 0322c6f430..5b50f48169 100644 --- a/front/core/components/table/style.scss +++ b/front/core/components/table/style.scss @@ -113,34 +113,31 @@ vn-table { &.clickable { @extend %clickable; } - & > vn-td > .chip { + & > vn-td .chip { padding: .3em; border-radius: .3em; } - &.notice, - & > .notice, - & > vn-td > .notice { + + & > vn-td .chip.notice { color: $color-font-bg; - background-color: $color-notice-medium; + background-color: $color-notice-medium } - &.success, - & > .success, - & > vn-td > .success { + + & > vn-td .chip.success { color: $color-font-bg; - background-color: $color-success-medium; + background-color: $color-success-medium } - &.warning, - & > .warning, - & > vn-td > .warning { + + & > vn-td .chip.warning { color: $color-font-bg; background-color: $color-main-medium; } - &.alert, - & > .alert, - & > vn-td > .alert { + + & > vn-td .chip.alert { color: $color-font-bg; background-color: $color-alert-medium; } + & > [actions] { width: 1px; diff --git a/front/core/locale/es.yml b/front/core/locale/es.yml index 1b8d527c52..bdf42192fa 100644 --- a/front/core/locale/es.yml +++ b/front/core/locale/es.yml @@ -37,6 +37,13 @@ September: Septiembre October: Octubre November: Noviembre December: Diciembre +Monday: Lunes +Tuesday: Martes +Wednesday: Miércoles +Thursday: Jueves +Friday: Viernes +Saturday: Sábado +Sunday: Domingo Has delivery: Hay reparto Loading: Cargando Fields to show: Campos a mostrar diff --git a/loopback/locale/es.json b/loopback/locale/es.json index 23cb875853..b42c10be1a 100644 --- a/loopback/locale/es.json +++ b/loopback/locale/es.json @@ -80,9 +80,9 @@ "This client can't be invoiced": "Este cliente no puede ser facturado", "This ticket can't be invoiced": "Este ticket no puede ser facturado", "That item is not available on that day": "El item no esta disponible para esa fecha", - "That item doesn't exists": "That item doesn't exists", + "That item doesn't exists": "No existe el artículo", "You cannot add or modify services to an invoiced ticket": "No puedes añadir o modificar servicios a un ticket facturado", "This ticket can not be modified": "Este ticket no puede ser modificado", - "The introduced hour already exists": "The introduced hour already exists", - "INFINITE_LOOP": "INFINITE_LOOP" + "The introduced hour already exists": "Esta hora ya ha sido introducida", + "INFINITE_LOOP": "Existe una dependencia entre dos Jefes" } \ No newline at end of file diff --git a/modules/ticket/back/methods/ticket-request/confirm.js b/modules/ticket/back/methods/ticket-request/confirm.js index 79676b9b25..b5194c67b0 100644 --- a/modules/ticket/back/methods/ticket-request/confirm.js +++ b/modules/ticket/back/methods/ticket-request/confirm.js @@ -52,7 +52,7 @@ module.exports = Self => { request.ticket().warehouseFk, false ]; - console.log(params); + let [res] = await Self.rawSql(query, params); let available = res[0].available; if (!available) diff --git a/modules/ticket/front/sale/locale/es.yml b/modules/ticket/front/sale/locale/es.yml index 707de7c0f5..e6db9420fb 100644 --- a/modules/ticket/front/sale/locale/es.yml +++ b/modules/ticket/front/sale/locale/es.yml @@ -16,13 +16,6 @@ You have to allow pop-ups in your web browser to use this functionality: Disc: Dto Available: Disponible In which day you want to add the ticket?: ¿A que dia quieres añadir el ticket? -Monday: Lunes -Tuesday: Martes -Wednesday: Miércoles -Thursday: Jueves -Friday: Viernes -Saturday: Sábado -Sunday: Domingo Add claim: Crear reclamación Claim: Reclamación Transfer lines: Transferir líneas diff --git a/modules/worker/front/time-control/index.html b/modules/worker/front/time-control/index.html index f471a7d0b3..941c0dbb62 100644 --- a/modules/worker/front/time-control/index.html +++ b/modules/worker/front/time-control/index.html @@ -12,27 +12,30 @@
{{::$ctrl.weekdayNames[$index].name}}
- {{::weekday.dated | date: 'dd/MM/yyyy'}} + {{::weekday.dated | date: 'dd'}} + + {{::weekday.dated | date: 'MMMM'}} +
- - +
+ + + {{hour.timed | dateTime: 'HH:mm'}} +
- - + {{$ctrl.getWeekdayTotalHours(weekday)}} h. @@ -74,7 +77,7 @@
Add time
- + diff --git a/modules/worker/front/time-control/index.js b/modules/worker/front/time-control/index.js index 47eacc8e20..2d23d378cc 100644 --- a/modules/worker/front/time-control/index.js +++ b/modules/worker/front/time-control/index.js @@ -2,10 +2,11 @@ import ngModule from '../module'; import './style.scss'; class Controller { - constructor($scope, $http, $stateParams) { + constructor($scope, $http, $stateParams, $element) { this.$stateParams = $stateParams; this.$ = $scope; this.$http = $http; + this.$element = $element; this.defaultDate = new Date(); this.currentWeek = []; this.weekDays = []; @@ -209,14 +210,18 @@ class Controller { showAddTimeDialog(weekday) { const timed = new Date(weekday.dated); const now = new Date(); + now.setHours(now.getHours(), now.getMinutes(), 0, 0); now.setMonth(timed.getMonth()); now.setDate(timed.getDate()); - this.newTime = now; this.selectedWeekday = weekday; this.$.addTimeDialog.show(); + + const selector = 'vn-dialog[vn-id="addTimeDialog"] input[type="time"]'; + const input = this.$element[0].querySelector(selector); + input.focus(); } addTime(response) { @@ -230,7 +235,7 @@ class Controller { } } -Controller.$inject = ['$scope', '$http', '$stateParams']; +Controller.$inject = ['$scope', '$http', '$stateParams', '$element']; ngModule.component('vnWorkerTimeControl', { template: require('./index.html'), diff --git a/modules/worker/front/time-control/index.spec.js b/modules/worker/front/time-control/index.spec.js index a9114a1932..a86c4336c7 100644 --- a/modules/worker/front/time-control/index.spec.js +++ b/modules/worker/front/time-control/index.spec.js @@ -4,12 +4,14 @@ describe('Worker', () => { describe('Component vnWorkerTimeControl', () => { let $scope; let controller; + let $element; beforeEach(ngModule('worker')); beforeEach(angular.mock.inject(($componentController, $rootScope) => { $scope = $rootScope.$new(); - controller = $componentController('vnWorkerTimeControl', {$scope}); + $element = angular.element(''); + controller = $componentController('vnWorkerTimeControl', {$scope, $element}); })); describe('worker() setter', () => { diff --git a/modules/worker/front/time-control/locale/es.yml b/modules/worker/front/time-control/locale/es.yml index 71436d5070..cfb0239a63 100644 --- a/modules/worker/front/time-control/locale/es.yml +++ b/modules/worker/front/time-control/locale/es.yml @@ -1,12 +1,5 @@ In: Entrada Out: Salida -Monday: Lunes -Tuesday: Martes -Wednesday: Miércoles -Thursday: Jueves -Friday: Viernes -Saturday: Sábado -Sunday: Domingo Hour: Hora Hours: Horas Add time: Añadir hora diff --git a/modules/worker/front/time-control/style.scss b/modules/worker/front/time-control/style.scss index 7979394b66..9917fa3fb3 100644 --- a/modules/worker/front/time-control/style.scss +++ b/modules/worker/front/time-control/style.scss @@ -9,8 +9,16 @@ vn-worker-time-control { vn-td.hours { vertical-align: top; - vn-label-value { - padding: .6em .5em + & > section { + position: relative; + padding: .6em 0; + + & > vn-icon { + position: absolute; + margin-left: -1.3em; + margin-top: -3px; + color: $color-font-secondary; + } } }