#6274 workerTimeControl #1858

Merged
jorgep merged 31 commits from 6274-loginWorkerTimeControl into dev 2024-01-03 11:31:52 +00:00
Member
No description provided.
jorgep added 1 commit 2023-11-23 12:27:45 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
e314a67fe7
refs #6274 time control methods migrated
jorgep added 1 commit 2023-11-28 13:50:23 +00:00
gitea/salix/pipeline/head This commit looks good Details
29fb36010c
refs #6274 back methods created
jorgep added 1 commit 2023-11-29 07:40:19 +00:00
gitea/salix/pipeline/head This commit looks good Details
48dd068190
refs #6274 upperCase Model
jorgep changed title from WIP: #6274 workerTimeControl to #6274 workerTimeControl 2023-11-29 08:29:54 +00:00
jorgep added 1 commit 2023-11-29 08:30:37 +00:00
jorgep added 1 commit 2023-11-30 07:47:10 +00:00
jorgep requested review from juan 2023-12-04 14:12:15 +00:00
jorgep requested review from jgallego 2023-12-04 14:12:23 +00:00
jorgep added 1 commit 2023-12-04 14:30:44 +00:00
jgallego requested changes 2023-12-05 06:01:13 +00:00
@ -0,0 +1,35 @@
module.exports = Self => {
Self.remoteMethod('clockIn', {
Owner

veo que existe un archivo muy similar que llama al mismo procedimiento, lo has tenido en cuenta? conviene juntarlo en uno?
modules/worker/back/methods/worker-time-control/addTimeEntry.js

veo que existe un archivo muy similar que llama al mismo procedimiento, lo has tenido en cuenta? conviene juntarlo en uno? modules/worker/back/methods/worker-time-control/addTimeEntry.js
Author
Member

Ya se ha implementado, tenemos que mirarlo juntos conforme hemos hablado por rocket.

Ya se ha implementado, tenemos que mirarlo juntos conforme hemos hablado por rocket.
Author
Member

Refactor aplicado tras revisión en persona.

Refactor aplicado tras revisión en persona.
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-05 08:57:52 +00:00
gitea/salix/pipeline/head This commit looks good Details
419ab41816
refs #6276 Acl addTimeEntry
jorgep added 1 commit 2023-12-05 10:55:58 +00:00
gitea/salix/pipeline/head This commit looks good Details
25006a938b
refs #6274 refactor clockIn
jorgep added 25 commits 2023-12-05 15:00:15 +00:00
gitea/salix/pipeline/head This commit looks good Details
b02e1f000e
handle expired token while exists in BD
gitea/salix/pipeline/head This commit looks good Details
5601ce5dac
refs #6264 fix: rename variable
gitea/salix/pipeline/head This commit looks good Details
0c2b2b25b7
refs #6264 fix: remove unnecessary file
gitea/salix/pipeline/head There was a failure building this commit Details
784f5bb7f9
refs #6264 perf: replace now with vnNew
gitea/salix/pipeline/head There was a failure building this commit Details
bcccd1894c
refs #6264 test: init test
gitea/salix/pipeline/head There was a failure building this commit Details
7951b874a6
Merge branch 'dev' into 6264-renewToken
gitea/salix/pipeline/head There was a failure building this commit Details
9da5fb9a14
refs #6264 other: rename camel-case variable
gitea/salix/pipeline/head There was a failure building this commit Details
d4cd23853f
refs #6264 perf: try to remove jasmine.clock()
gitea/salix/pipeline/head There was a failure building this commit Details
a5fb07bf12
refs #6264 perf remove unnecessary code
gitea/salix/pipeline/head There was a failure building this commit Details
b50a6add0d
refs #6274 merge renewToken
jorgep added 1 commit 2023-12-07 07:38:01 +00:00
jorgep requested review from alexm 2023-12-07 12:27:12 +00:00
Author
Member

@alexm tras hablar con Javi, hemos visto que el método addTimeEntry llamaba a resendWeeklyHourEmail, ¿Es necesario? y, además, se comprobaba si es subordinado y si mismo pero, en es subordinado ya se comprueba que sea el mismo. Comentamos cuando vuelvas de vacaciones.

@alexm tras hablar con Javi, hemos visto que el método addTimeEntry llamaba a resendWeeklyHourEmail, ¿Es necesario? y, además, se comprobaba si es subordinado y si mismo pero, en es subordinado ya se comprueba que sea el mismo. Comentamos cuando vuelvas de vacaciones.
jorgep added 4 commits 2023-12-07 13:58:59 +00:00
jorgep added 1 commit 2023-12-11 11:51:04 +00:00
Author
Member

@alexm tras hablar con Javi, hemos visto que el método addTimeEntry llamaba a resendWeeklyHourEmail, ¿Es necesario? y, además, se comprobaba si es subordinado y si mismo pero, en es subordinado ya se comprueba que sea el mismo. Comentamos cuando vuelvas de vacaciones.

Tras mirarlo con Alex, se ha decidido que no se use weeklyHourRecordEmail cada vez que se ficha. No tiene sentido.

> @alexm tras hablar con Javi, hemos visto que el método addTimeEntry llamaba a resendWeeklyHourEmail, ¿Es necesario? y, además, se comprobaba si es subordinado y si mismo pero, en es subordinado ya se comprueba que sea el mismo. Comentamos cuando vuelvas de vacaciones. Tras mirarlo con Alex, se ha decidido que no se use weeklyHourRecordEmail cada vez que se ficha. No tiene sentido.
jorgep added 1 commit 2023-12-11 12:45:16 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
84270587cb
refs #6274 refactor
jorgep requested review from jgallego 2023-12-11 12:47:15 +00:00
jorgep added 1 commit 2023-12-20 11:23:15 +00:00
alexm requested changes 2023-12-20 12:45:08 +00:00
@ -0,0 +1,14 @@
INSERT INTO `account`.`role` (name, description)
Member

Cambiar version a la ultima

Cambiar version a la ultima
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-20 13:05:04 +00:00
gitea/salix/pipeline/head This commit looks good Details
542b09073e
changes moved: refs #6274
jorgep requested review from alexm 2023-12-20 13:06:43 +00:00
jorgep added 1 commit 2023-12-21 07:41:33 +00:00
alexm requested changes 2023-12-21 07:58:08 +00:00
@ -0,0 +36,4 @@
Object.assign(myOptions, options);
const query = 'CALL vn.workerTimeControl_clockIn(?, ?, ?)';
const [response] = await Self.rawSql(query, [workerFk, timed, direction], myOptions);
Member

Si es el caso puedes hacer:

const myArray = [[{}]]
const [[myNewArray]] = myArray
console.log(myNewArray) // Devuelve {}

Es decir, hacer const [[response]] = y te evitas luego hacer response[0]

Si es el caso puedes hacer: ``` const myArray = [[{}]] const [[myNewArray]] = myArray console.log(myNewArray) // Devuelve {} ``` Es decir, hacer `const [[response]] =` y te evitas luego hacer response[0]
jorgep marked this conversation as resolved
@ -0,0 +29,4 @@
const query = `CALL vn.workerTimeControl_login(?)`;
const user = await Self.rawSql(query, [pin], myOptions);
if (!user) throw new UserError('Indique el pin.');
Member

Falta traduccion

Falta traduccion
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-21 08:00:46 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
f384616d69
move changes: refs #6274
jorgep added 1 commit 2023-12-21 13:01:31 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
0998b5bf2c
add locale and refactor: refs #6274
jorgep added 1 commit 2023-12-22 07:38:50 +00:00
juan approved these changes 2023-12-22 09:19:57 +00:00
Dismissed
@ -0,0 +9,4 @@
('WorkerTimeControl', 'login', 'READ', 'ALLOW', 'ROLE', 'timeControl'),
('WorkerTimeControl', 'getClockIn', 'READ', 'ALLOW', 'ROLE', 'timeControl'),
('WorkerTimeControl', 'clockIn', 'WRITE', 'ALLOW', 'ROLE', 'timeControl'),
('VnUser', 'renewToken', 'WRITE', 'ALLOW', 'ROLE', 'timeControl');
Owner

el acl sobre renewToken ya debería estar definido para $owner, si no es asi definirlo

el acl sobre renewToken ya debería estar definido para $owner, si no es asi definirlo
Author
Member

@juan podemos mirarlo?

@juan podemos mirarlo?
jorgep marked this conversation as resolved
jorgep added 1 commit 2023-12-22 09:47:20 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
86db5a931d
arrange test suites: refs #6274
jorgep dismissed juan’s review 2023-12-22 09:47:21 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep requested review from alexm 2023-12-22 09:47:48 +00:00
jorgep added 1 commit 2023-12-22 10:08:40 +00:00
alexm requested changes 2023-12-22 10:38:36 +00:00
alexm left a comment
Member

Siguen habiendo archivos sql que no cuadran con la version actual

Siguen habiendo archivos sql que no cuadran con la version actual
Author
Member

Siguen habiendo archivos sql que no cuadran con la version actual

@alexm a mi no me sale ningún archivo para mover. Si me los puedes decir por rocket...

> Siguen habiendo archivos sql que no cuadran con la version actual @alexm a mi no me sale ningún archivo para mover. Si me los puedes decir por rocket...
jorgep added 1 commit 2023-12-22 14:22:44 +00:00
gitea/salix/pipeline/head This commit looks good Details
2e1715a968
refactor renewToken & replace ACL: refs #6274
Author
Member

Los cambios realizados en renewToken han sido hechos con Juan @alexm , @jgallego

Los cambios realizados en renewToken han sido hechos con Juan @alexm , @jgallego
jorgep added 1 commit 2024-01-02 07:45:52 +00:00
alexm requested changes 2024-01-02 07:46:54 +00:00
alexm left a comment
Member

Dejar donde estaba el archivo db/changes/240201/00-updateCourtesyTime.sql

db/changes/234601/00-updateCourtesyTime.sql → db/changes/240201/00-updateCourtesyTime.sql

Dejar donde estaba el archivo db/changes/240201/00-updateCourtesyTime.sql db/changes/234601/00-updateCourtesyTime.sql → db/changes/240201/00-updateCourtesyTime.sql
@ -0,0 +3,4 @@
describe('workerTimeControl login()', () => {
it('should correctly login', async() => {
const response = await models.WorkerTimeControl.login(9, {});
Member

No hace falta pasar el objeto

No hace falta pasar el objeto
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-01-02 07:50:34 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
801037da64
fix changes: refs #6274
alexm approved these changes 2024-01-02 07:56:55 +00:00
Dismissed
jorgep added 1 commit 2024-01-02 08:01:58 +00:00
gitea/salix/pipeline/head This commit looks good Details
763af7da2d
fix test: refs #6274
jorgep dismissed alexm’s review 2024-01-02 08:01:59 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep requested review from alexm 2024-01-02 08:20:23 +00:00
alexm approved these changes 2024-01-02 08:44:43 +00:00
Dismissed
jgallego approved these changes 2024-01-02 10:43:23 +00:00
Dismissed
jgallego left a comment
Owner

lo que has quitado de timeEntry.spec porque es?

lo que has quitado de timeEntry.spec porque es?
Author
Member

lo que has quitado de timeEntry.spec porque es?

Porque el método que se está evaluando es clockIn, que es el que puede fallar. Solo he dejado los que tienen que ver con el Rol.

> lo que has quitado de timeEntry.spec porque es? > Porque el método que se está evaluando es clockIn, que es el que puede fallar. Solo he dejado los que tienen que ver con el Rol.
juan approved these changes 2024-01-02 15:36:24 +00:00
Dismissed
jorgep added 1 commit 2024-01-03 08:01:04 +00:00
jorgep dismissed alexm’s review 2024-01-03 08:01:04 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep dismissed jgallego’s review 2024-01-03 08:01:04 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jorgep dismissed juan’s review 2024-01-03 08:01:05 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

alexm approved these changes 2024-01-03 08:11:09 +00:00
Dismissed
jgallego requested changes 2024-01-03 08:12:15 +00:00
@ -331,6 +331,7 @@
"Cannot past travels with entries": "No se pueden pasar envíos con entradas",
"It was not able to remove the next expeditions:": "No se pudo eliminar las siguientes expediciones: {{expeditions}}",
"This user does not have an assigned tablet": "Este usuario no tiene tablet asignada",
"Incorrect pin.": "Pin incorrecto.",
Owner

ayer no hablamos de no poner puntos? son estos casos?

ayer no hablamos de no poner puntos? son estos casos?
Author
Member

cierto

cierto
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-01-03 09:17:15 +00:00
gitea/salix/pipeline/head This commit looks good Details
5dc49d226a
refs #6274 fix locale
jorgep dismissed alexm’s review 2024-01-03 09:17:16 +00:00
Reason:

New commits pushed, approval review dismissed automatically according to repository settings

jgallego approved these changes 2024-01-03 09:21:42 +00:00
jorgep requested review from jgallego 2024-01-03 09:21:43 +00:00
alexm approved these changes 2024-01-03 09:47:33 +00:00
jgallego approved these changes 2024-01-03 10:03:57 +00:00
juan approved these changes 2024-01-03 11:30:39 +00:00
jorgep merged commit 6986ec1f8a into dev 2024-01-03 11:31:52 +00:00
jorgep deleted branch 6274-loginWorkerTimeControl 2024-01-03 11:31:52 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: verdnatura/salix#1858
No description provided.