From bb5c81a3e9431222c05205d5d47f9fef013b509f Mon Sep 17 00:00:00 2001 From: Bernat Date: Tue, 21 May 2019 09:03:57 +0200 Subject: [PATCH 1/7] #1409 ticket.weekly add finder --- e2e/helpers/selectors.js | 5 +- .../05-ticket-module/09_ticket_weekly.spec.js | 3 +- .../back/methods/ticket-weekly/filter.js | 70 +++++++++++++++ modules/ticket/back/models/ticket-weekly.js | 3 + modules/ticket/front/routes.json | 2 +- modules/ticket/front/weekly/index.html | 56 ++++++++---- modules/ticket/front/weekly/index.js | 87 ++++++++++--------- modules/ticket/front/weekly/locale/es.yml | 4 + 8 files changed, 170 insertions(+), 60 deletions(-) create mode 100644 modules/ticket/back/methods/ticket-weekly/filter.js create mode 100644 modules/ticket/back/models/ticket-weekly.js diff --git a/e2e/helpers/selectors.js b/e2e/helpers/selectors.js index 04e46cf94..9f7767a96 100644 --- a/e2e/helpers/selectors.js +++ b/e2e/helpers/selectors.js @@ -311,9 +311,10 @@ export default { searchButton: 'vn-ticket-index vn-searchbar vn-icon[icon="search"]', moreMenu: 'vn-ticket-index vn-icon-menu[vn-id="more-button"] > div > vn-icon', moreMenuTurns: 'vn-ticket-index vn-icon-menu vn-drop-down > vn-popover li:nth-child(2)', - sixthWeeklyTicketTurn: 'vn-ticket-weekly > form > div > vn-card > div > vn-table > div > vn-tbody > vn-tr:nth-child(6) > vn-td:nth-child(3) > vn-autocomplete > div > div > input', + sixthWeeklyTicketTurn: 'vn-ticket-weekly vn-table vn-tr:nth-child(6) vn-autocomplete[field="weekly.weekDay"] input', weeklyTicket: 'vn-ticket-weekly vn-table > div > vn-tbody > vn-tr', - sixthWeeklyTicketDeleteIcon: 'vn-ticket-weekly > form vn-tbody > vn-tr:nth-child(6) > vn-td:nth-child(6) > vn-icon-button[icon="delete"]' + sixthWeeklyTicketDeleteIcon: 'vn-ticket-weekly vn-tr:nth-child(6) vn-icon-button[icon="delete"]', + acceptDeleteTurn: 'vn-ticket-weekly > vn-confirm[vn-id="deleteWeekly"] button[response="ACCEPT"]' }, createTicketView: { clientAutocomplete: 'vn-ticket-create vn-autocomplete[field="$ctrl.clientFk"]', diff --git a/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js b/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js index 4b7a5266b..2c63b74c1 100644 --- a/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js +++ b/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js @@ -49,7 +49,7 @@ describe('Ticket descriptor path', () => { expect(url.hash).toContain('/summary'); }); - it('should add the ticket to thirsday turn using the descriptor more menu', async() => { + it('should add the ticket to thursday turn using the descriptor more menu', async() => { const result = await nightmare .waitToClick(selectors.ticketDescriptor.moreMenu) .waitToClick(selectors.ticketDescriptor.moreMenuAddToTurn) @@ -142,6 +142,7 @@ describe('Ticket descriptor path', () => { it('should delete the weekly ticket 11', async() => { const result = await nightmare .waitToClick(selectors.ticketsIndex.sixthWeeklyTicketDeleteIcon) + .waitToClick(selectors.ticketsIndex.acceptDeleteTurn) .waitForLastSnackbar(); expect(result).toEqual('Data saved!'); diff --git a/modules/ticket/back/methods/ticket-weekly/filter.js b/modules/ticket/back/methods/ticket-weekly/filter.js new file mode 100644 index 000000000..7d1b56374 --- /dev/null +++ b/modules/ticket/back/methods/ticket-weekly/filter.js @@ -0,0 +1,70 @@ + +const ParameterizedSQL = require('loopback-connector').ParameterizedSQL; +const buildFilter = require('vn-loopback/util/filter').buildFilter; +const mergeFilters = require('vn-loopback/util/filter').mergeFilters; + +module.exports = Self => { + Self.remoteMethodCtx('filter', { + description: 'Find all instances of the model matched by filter from the data source.', + accessType: 'READ', + accepts: [ + { + arg: 'filter', + type: 'Object', + description: 'Filter defining where, order, offset, and limit - must be a JSON-encoded string', + http: {source: 'query'} + }, { + arg: 'search', + type: 'String', + description: `If it's and integer searchs by id, otherwise it searchs by client id`, + http: {source: 'query'} + } + ], + returns: { + type: ['Object'], + root: true + }, + http: { + path: `/filter`, + verb: 'GET' + } + }); + + Self.filter = async(ctx, filter) => { + let conn = Self.dataSource.connector; + + let where = buildFilter(ctx.args, (param, value) => { + switch (param) { + case 'search': + return {or: [ + {ticketFk: value}, + {clientFk: value} + ]}; + } + }); + + filter = mergeFilters(ctx.args.filter, {where}); + + let stmts = []; + let stmt; + + stmt = new ParameterizedSQL( + `SELECT t.id AS ticketFk, c.id AS clientFk, c.name AS clientName, tw.weekDay, + wh.name AS warehouseName, w.id AS workerFk, u.nickName + FROM ticketWeekly tw + JOIN ticket t ON t.id = tw.ticketFk + JOIN client c ON c.id = t.clientFk + JOIN worker w ON w.id = c.salesPersonFk + JOIN account.user u ON u.id = w.userFk + JOIN warehouse wh ON wh.id = t.warehouseFk` + ); + + + stmt.merge(conn.makeSuffix(filter)); + let itemsIndex = stmts.push(stmt) - 1; + + let sql = ParameterizedSQL.join(stmts, ';'); + let result = await conn.executeStmt(sql); + return itemsIndex === 0 ? result : result[itemsIndex]; + }; +}; diff --git a/modules/ticket/back/models/ticket-weekly.js b/modules/ticket/back/models/ticket-weekly.js new file mode 100644 index 000000000..8456ef49a --- /dev/null +++ b/modules/ticket/back/models/ticket-weekly.js @@ -0,0 +1,3 @@ +module.exports = Self => { + require('../methods/ticket-weekly/filter')(Self); +}; diff --git a/modules/ticket/front/routes.json b/modules/ticket/front/routes.json index e16de74f5..5c47901f3 100644 --- a/modules/ticket/front/routes.json +++ b/modules/ticket/front/routes.json @@ -181,7 +181,7 @@ "component": "vn-ticket-log", "description": "Log" }, { - "url" : "/weekly", + "url" : "/weekly?q", "state": "ticket.weekly", "component": "vn-ticket-weekly", "description": "Weekly" diff --git a/modules/ticket/front/weekly/index.html b/modules/ticket/front/weekly/index.html index 3ae3bf7e0..708e15ba2 100644 --- a/modules/ticket/front/weekly/index.html +++ b/modules/ticket/front/weekly/index.html @@ -1,14 +1,25 @@ + primary-key="ticketFk"> -
+
+
+ + + + + + +
@@ -30,27 +41,35 @@ - - {{::weekly.ticket.client.name}} + + {{::weekly.clientName}} - - {{::weekly.ticket.warehouse.name}} - {{::weekly.ticket.client.salesPerson.firstName}} {{::weekly.ticket.client.salesPerson.name}} + {{::weekly.warehouseName}} + + + {{::weekly.nickName}} + + @@ -60,14 +79,17 @@
- +
- + + - \ No newline at end of file + question="You are going to delete this turn" + message="This turn will be removed! Continue anyway?"> + diff --git a/modules/ticket/front/weekly/index.js b/modules/ticket/front/weekly/index.js index 0d2355a17..ddac0d1b5 100644 --- a/modules/ticket/front/weekly/index.js +++ b/modules/ticket/front/weekly/index.js @@ -2,35 +2,13 @@ import ngModule from '../module'; import './style.scss'; export default class Controller { - constructor($scope, vnApp, $translate) { - this.$scope = $scope; + constructor($scope, vnApp, $translate, $http) { + this.$ = $scope; this.vnApp = vnApp; - this._ = $translate; + this.$translate = $translate; + this.$http = $http; this.ticketSelected = null; - this.filter = { - include: { - relation: 'ticket', - scope: { - fields: ['id', 'clientFk', 'companyFk', 'warehouseFk'], - include: [ - { - relation: 'client', - scope: { - fields: ['salesPersonFk', 'name'], - include: { - relation: 'salesPerson', - scope: { - fields: ['id', 'firstName', 'name'] - } - } - } - }, - {relation: 'warehouse'} - ] - } - } - }; this.weekdays = [ {id: 0, name: 'Monday'}, @@ -43,28 +21,53 @@ export default class Controller { ]; } - onSave() { - this.vnApp.showSuccess(this._.instant('Data saved!')); + onWeekdayUpdate(ticketFk, weekDay) { + const params = {ticketFk, weekDay}; + this.$http.patch('/ticket/api/TicketWeeklies/', params).then(() => { + this.vnApp.showSuccess(this.$translate.instant('Data saved!')); + }); } + deleteWeekly(index) { + this.ticketIndex = index; + this.$.deleteWeekly.show(); + event.stopImmediatePropagation(); + } + + onSearch(params) { + if (params) + this.$.model.applyFilter(null, params); + else + this.$.model.clear(); + } + + showClientDescriptor(event, clientFk) { - this.$scope.clientDescriptor.clientFk = clientFk; - this.$scope.clientDescriptor.parent = event.target; - this.$scope.clientDescriptor.show(); + this.$.clientDescriptor.clientFk = clientFk; + this.$.clientDescriptor.parent = event.target; + this.$.clientDescriptor.show(); event.preventDefault(); event.stopImmediatePropagation(); } showTicketDescriptor(event, ticketFk) { - this.$scope.ticketDescriptor.ticketFk = ticketFk; - this.$scope.ticketDescriptor.parent = event.target; - this.$scope.ticketDescriptor.show(); + this.$.ticketDescriptor.ticketFk = ticketFk; + this.$.ticketDescriptor.parent = event.target; + this.$.ticketDescriptor.show(); + event.preventDefault(); + event.stopImmediatePropagation(); + } + + showWorkerDescriptor(event, workerFk) { + this.$.workerDescriptor.workerFk = workerFk; + this.$.workerDescriptor.parent = event.target; + this.$.workerDescriptor.show(); event.preventDefault(); event.stopImmediatePropagation(); } onDescriptorLoad() { - this.$scope.popover.relocate(); + this.$.popover.relocate(); } preventNavigation(event) { @@ -72,13 +75,19 @@ export default class Controller { event.stopImmediatePropagation(); } - deleteWeekly(expedition) { - this.expeditionId = expedition.id; - this.$scope.deleteWeekly.show(); + returnDialog(response) { + const ticket = this.$.model.data[this.ticketIndex]; + if (response === 'ACCEPT') { + this.$http.delete(`/ticket/api/TicketWeeklies/${ticket.ticketFk}`).then(() => { + this.vnApp.showSuccess(this.$translate.instant('Data saved!')); + this.$.model.remove(this.ticketIndex); + }); + } } } -Controller.$inject = ['$scope', 'vnApp', '$translate']; + +Controller.$inject = ['$scope', 'vnApp', '$translate', '$http']; ngModule.component('vnTicketWeekly', { template: require('./index.html'), diff --git a/modules/ticket/front/weekly/locale/es.yml b/modules/ticket/front/weekly/locale/es.yml index 949e2bcb8..e4e7ef068 100644 --- a/modules/ticket/front/weekly/locale/es.yml +++ b/modules/ticket/front/weekly/locale/es.yml @@ -1,2 +1,6 @@ Turn: Turno Ticket ID: ID Ticket +Weekly: Turnos +You are going to delete this turn: Vas a eliminar este turno +This turn will be removed! Continue anyway?: Se eliminará este turno! ¿Continuar de todas formas? +Search turns by id or client id: Busca turnos por el identificador o el identificador del cliente \ No newline at end of file From 227475e4fcee24ad360ce866a7e23c7141e1b7a2 Mon Sep 17 00:00:00 2001 From: Bernat Date: Tue, 21 May 2019 09:23:53 +0200 Subject: [PATCH 2/7] update spec ticket_weeklyy --- e2e/paths/05-ticket-module/09_ticket_weekly.spec.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js b/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js index 2c63b74c1..a42e6c527 100644 --- a/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js +++ b/e2e/paths/05-ticket-module/09_ticket_weekly.spec.js @@ -139,6 +139,8 @@ describe('Ticket descriptor path', () => { expect(result).toEqual('Saturday'); }); + // Test #1450 here + it('should delete the weekly ticket 11', async() => { const result = await nightmare .waitToClick(selectors.ticketsIndex.sixthWeeklyTicketDeleteIcon) From 2636e2d22116fd00871a1011ddf3681593ff75ab Mon Sep 17 00:00:00 2001 From: Bernat Date: Tue, 21 May 2019 12:46:22 +0200 Subject: [PATCH 3/7] #1454 update table bi.tarifa_componentes --- db/changes/10004-mother/00-tarifaComponentes.sql | 2 ++ db/changes/10004-mother/01-componentRate.sql | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 db/changes/10004-mother/00-tarifaComponentes.sql create mode 100644 db/changes/10004-mother/01-componentRate.sql diff --git a/db/changes/10004-mother/00-tarifaComponentes.sql b/db/changes/10004-mother/00-tarifaComponentes.sql new file mode 100644 index 000000000..ac22ce309 --- /dev/null +++ b/db/changes/10004-mother/00-tarifaComponentes.sql @@ -0,0 +1,2 @@ +ALTER TABLE `bi`.`tarifa_componentes` +ADD COLUMN `code` VARCHAR(45) NULL DEFAULT NULL AFTER `is_renewable`; diff --git a/db/changes/10004-mother/01-componentRate.sql b/db/changes/10004-mother/01-componentRate.sql new file mode 100644 index 000000000..2ee8242fd --- /dev/null +++ b/db/changes/10004-mother/01-componentRate.sql @@ -0,0 +1,16 @@ + +CREATE + OR REPLACE ALGORITHM = UNDEFINED + DEFINER = `root`@`%` + SQL SECURITY DEFINER +VIEW `vn`.`componentRate` AS + SELECT + `t`.`Id_Componente` AS `id`, + `t`.`Componente` AS `name`, + `t`.`tarifa_componentes_series_id` AS `componentTypeRate`, + `t`.`tarifa_class` AS `classRate`, + `t`.`tax` AS `tax`, + `t`.`is_renewable` AS `isRenewable`, + `t`.`code` AS `code` + FROM + `bi`.`tarifa_componentes` `t`; From 52e26eb99dc0601338aea9403445991be41a9434 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 21 May 2019 12:56:29 +0200 Subject: [PATCH 4/7] 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 0322c6f43..5b50f4816 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 1b8d527c5..bdf42192f 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 23cb87585..b42c10be1 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 79676b9b2..b5194c67b 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 707de7c0f..e6db9420f 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 f471a7d0b..941c0dbb6 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 47eacc8e2..2d23d378c 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 a9114a193..a86c4336c 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 71436d507..cfb0239a6 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 7979394b6..9917fa3fb 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; + } } } From 2ec3d3d68bc4bb23de184263baf26ec58346f578 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 21 May 2019 12:59:28 +0200 Subject: [PATCH 5/7] updated printer model --- .../printer-setup/assets/files/model.ezp | Bin 9845 -> 9847 bytes 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 print/report/printer-setup/assets/files/model.ezp diff --git a/print/report/printer-setup/assets/files/model.ezp b/print/report/printer-setup/assets/files/model.ezp old mode 100755 new mode 100644 index 297df3d214694a64f677aa40d7305ebddb368e28..98e3302bc62d13015695912513a6699fb9b8ef92 GIT binary patch literal 9847 zcmeHN3rt+c6`f^Y0;be}Z8iAQ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zzt8RsHr0n?o|-^wbkg5^v{yxCyvQba@7owLk4cqiYPjYe&nkUwMP-FPt{=6pWbl}6DrOOK7;vT##@KD_b16O&?L0&P)d+}V2 zH`86eP9*VOjj9>8JxB{aWB#LNb5g$mPi62+*X5y5Fw(+ay%HvB2WOwtf$F#x@hD${^P@h<(oydM&cvC5eiZkL>%&G<{rbQI7z)(o z`5%z*UTyBN+>tX2=5o6%HqS_Svf+~Q%F2qW>he769E0+S`i1F#YrUXN0OhlFWS+z=itNH7ir+hXkVE3nI7=e{Zb+5E60v?FU__Z>5F_Z?e25f zML>^tzr>C-I}?~d-;70^1e+`SVrsFbvoC_kch%>yFAA<>UrZv_boa$6^vCCJUKCz^ zUm*Rd&5KFI;@GW2;appHPx*S@5b=Moc<%jZ74Gr?wKy}RydRk7%=7Gf*bi|JTh`<^ O)c;>mciLg9iT)e;UnVyI From fe250b8269a93c778f56621e7189105766aa2405 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 21 May 2019 13:48:19 +0200 Subject: [PATCH 6/7] fixed workerTimeControl fixtures --- db/dump/fixtures.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql index 68ce7a54c..f12e2e804 100644 --- a/db/dump/fixtures.sql +++ b/db/dump/fixtures.sql @@ -1426,5 +1426,5 @@ INSERT INTO `vn`.`workerTimeControl`(`userFk`,`timed`,`manual`) VALUES (106, CONCAT(CURDATE(), ' 07:00'), TRUE), (106, CONCAT(CURDATE(), ' 10:00'), TRUE), - (106, CONCAT(CURDATE(), ' 10:10'), TRUE), + (106, CONCAT(CURDATE(), ' 10:20'), TRUE), (106, CONCAT(CURDATE(), ' 15:00'), TRUE); \ No newline at end of file From 1769b0384622801e55048e03cbb0f400429384b2 Mon Sep 17 00:00:00 2001 From: Bernat Date: Wed, 22 May 2019 07:50:08 +0200 Subject: [PATCH 7/7] 1457 client.sample.index --- modules/client/front/sample/index/index.html | 16 ++++++++++++++-- modules/client/front/sample/index/index.js | 15 +++++++++++++-- 2 files changed, 27 insertions(+), 4 deletions(-) diff --git a/modules/client/front/sample/index/index.html b/modules/client/front/sample/index/index.html index 7420cd14b..48543d135 100644 --- a/modules/client/front/sample/index/index.html +++ b/modules/client/front/sample/index/index.html @@ -23,8 +23,16 @@ {{::sample.created | dateTime:'dd/MM/yyyy HH:mm' }} - {{::sample.type.description}} - {{::sample.worker.user.nickname}} + + {{::sample.type.description}} + + + + {{::sample.worker.user.nickname}} + + {{::sample.company.code}} @@ -33,6 +41,10 @@ + + diff --git a/modules/client/front/sample/index/index.js b/modules/client/front/sample/index/index.js index 646544eb6..4ce12e27c 100644 --- a/modules/client/front/sample/index/index.js +++ b/modules/client/front/sample/index/index.js @@ -1,7 +1,8 @@ import ngModule from '../../module'; class Controller { - constructor($stateParams) { + constructor($scope, $stateParams) { + this.$ = $scope; this.$stateParams = $stateParams; this.filter = { include: [ @@ -32,9 +33,19 @@ class Controller { ] }; } + showWorkerDescriptor(event, workerFk) { + if (event.defaultPrevented) return; + + event.preventDefault(); + event.stopImmediatePropagation(); + + this.selectedWorker = workerFk; + this.$.workerDescriptor.parent = event.target; + this.$.workerDescriptor.show(); + } } -Controller.$inject = ['$stateParams']; +Controller.$inject = ['$scope', '$stateParams']; ngModule.component('vnClientSampleIndex', { template: require('./index.html'),