#6276 createNewWarehouse methods migrated from silex to salix #1850

Merged
jorgep merged 158 commits from 6276-createNewWarehouse into dev 2024-03-06 11:32:11 +00:00
Member
No description provided.
jorgep added 3 commits 2023-11-21 11:43:02 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
d0975f0acd
ref #6276 operator_add
gitea/salix/pipeline/head This commit looks good Details
251578146e
refs #6276 several methods created
jorgep added 1 commit 2023-11-22 09:18:48 +00:00
jorgep added 1 commit 2023-11-22 13:27:31 +00:00
gitea/salix/pipeline/head This commit looks good Details
fac6aab26c
refs #6276 machineWorker_update
jorgep added 1 commit 2023-11-22 14:42:37 +00:00
jorgep added 1 commit 2023-11-23 11:38:40 +00:00
jorgep added 1 commit 2023-11-23 12:22:12 +00:00
gitea/salix/pipeline/head This commit looks good Details
f862ed7d8a
refs #6274 refactor updateInTime
jorgep changed title from WIP 6276-createNewWarehouse to WIP: 6276-createNewWarehouse 2023-11-23 12:22:28 +00:00
jorgep changed title from WIP: 6276-createNewWarehouse to WIP: #6276-createNewWarehouse 2023-11-23 12:40:18 +00:00
jorgep added 1 commit 2023-11-29 08:46:35 +00:00
jorgep added 1 commit 2023-11-29 12:25:07 +00:00
gitea/salix/pipeline/head This commit looks good Details
877c679273
refs #6276 getVersion
jorgep added 1 commit 2023-11-29 15:27:46 +00:00
gitea/salix/pipeline/head This commit looks good Details
27d223cbab
refs #6276 machineWorker_add
jorgep added 1 commit 2023-11-29 15:28:36 +00:00
jorgep added 1 commit 2023-11-29 15:30:41 +00:00
gitea/salix/pipeline/head This commit looks good Details
375cb1acc0
refs #6276 console removed
jorgep added 1 commit 2023-11-30 08:53:07 +00:00
jorgep added 1 commit 2023-11-30 12:25:32 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
40236fdb7b
refs #6276 itemShelvingMake_multi
jorgep added 1 commit 2023-11-30 15:27:38 +00:00
gitea/salix/pipeline/head This commit looks good Details
3333c83702
refs #6276 WIP itemShelving_return
jorgep added 1 commit 2023-12-01 08:47:13 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
d5f09c2f75
refs #6276 saleTrackingDel
jorgep added 1 commit 2023-12-01 08:52:58 +00:00
jorgep added 1 commit 2023-12-01 09:17:05 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
f2ab44bb8f
refs #6276 itemShelving_return
Author
Member

Recomendación: mirar métodos de silex para comprobar que no se pierda la funcionalidad. Creo que algún método no lo he llamado igual, preguntarme en caso de duda.

Recomendación: mirar métodos de silex para comprobar que no se pierda la funcionalidad. Creo que algún método no lo he llamado igual, preguntarme en caso de duda.
jorgep added 1 commit 2023-12-01 10:40:54 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
d2769f4c21
refs #6276 return fixed
jorgep added 1 commit 2023-12-01 10:45:37 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
7e57640758
refs #6276 itemShelving_updateFromSale
jorgep added 1 commit 2023-12-01 11:50:46 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
660e77be55
refs #6276 updateFromSale refactored
jorgep added 1 commit 2023-12-01 12:56:50 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
4690dca4f9
refs #6276 getItemPackingType
jorgep added 1 commit 2023-12-01 12:59:08 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
1dfdd94584
refs #6276 fix getItemPackingType
jorgep added 1 commit 2023-12-11 07:54:41 +00:00
jorgep added 1 commit 2023-12-11 12:04:12 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
8acd03f115
refs #6276 saleTrackingReplace
jorgep added 1 commit 2023-12-12 12:27:01 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
3109f7722e
refs #6276 saleTracking_mark
jorgep added 1 commit 2023-12-12 12:45:55 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
f5ee3aff7a
refs #6276 remove checking visible
jorgep added 1 commit 2023-12-12 13:59:39 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
7b81630b85
refs #6276 shelvingLog_add
jorgep added 1 commit 2023-12-12 15:03:24 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
9e6fac9add
refs #6276 change to boolean
jorgep added 1 commit 2023-12-13 07:38:05 +00:00
jorgep added 1 commit 2023-12-13 07:55:28 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
64c10f3b8e
refs #6276 sectorCollection_getSales
jorgep added 1 commit 2023-12-13 08:47:44 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
a4c3d78e31
refs #6276 drop fixtures & fix getSale
jorgep added 1 commit 2023-12-13 10:46:03 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
8d61473d4f
refs #6276 fixtures & itemBarcode_delete
jorgep added 1 commit 2023-12-13 15:02:53 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
36a9b0eee4
refs #6276 collectionAddItem
jorgep added 1 commit 2023-12-14 08:08:58 +00:00
jorgep added 2 commits 2023-12-18 09:32:13 +00:00
jorgep added 1 commit 2023-12-18 10:46:17 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
779cbd2c0a
refs #6276 collection_getTickets
jorgep added 2 commits 2024-01-02 08:45:57 +00:00
jorgep added 1 commit 2024-01-02 09:08:50 +00:00
sergiodt added 1 commit 2024-01-02 11:23:46 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
365e05d560
refs #6276:mdify back silex→salix
jorgep added 1 commit 2024-01-02 11:47:29 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
924fe12a93
add root: refs #6276
jorgep added 1 commit 2024-01-03 09:45:03 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
bce8feb552
refs #6276 add maxHours
sergiodt added 2 commits 2024-01-03 11:53:17 +00:00
jorgep added 2 commits 2024-01-04 07:55:08 +00:00
jorgep added 1 commit 2024-01-04 09:13:03 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
e354de4ff5
fix: updateInTime refs #6276
jorgep added 1 commit 2024-01-04 11:30:24 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
384d9ec803
fix: updateTracking refs #6276
jorgep added 1 commit 2024-01-04 11:38:22 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
da8057e4c7
fix: updateTracking refs #6276
jorgep added 1 commit 2024-01-04 11:48:48 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
3ebf0a30a9
refactor: drop getItemPackingType refs #6276
jorgep added 1 commit 2024-01-04 12:01:08 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
2eca02d74f
refactor: drop getItemPackingType refs #6276
jorgep added 1 commit 2024-01-04 12:14:59 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
ad89363db5
fix: mark refs #6276
jorgep added 1 commit 2024-01-04 14:10:56 +00:00
jorgep added 1 commit 2024-01-04 15:03:47 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
8a5da43503
refactor: sectorCollection_getSale refs #6276
jorgep added 1 commit 2024-01-08 15:25:12 +00:00
jorgep added 1 commit 2024-01-09 10:25:47 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
9afc3840c7
fix: refs #6276 machineWorker_add
jorgep added 1 commit 2024-01-09 10:27:22 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
7a9f2bd79c
refactor: refs #6276 align rows
jorgep added 1 commit 2024-01-11 08:31:51 +00:00
jorgep added 1 commit 2024-01-11 16:00:15 +00:00
jorgep added 1 commit 2024-01-15 13:00:19 +00:00
jorgep added 1 commit 2024-01-16 11:37:45 +00:00
jorgep added 1 commit 2024-01-16 13:53:47 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
fafc25ed19
refactor: refs #6276 sectorCollection_getSale
jorgep added 1 commit 2024-01-16 13:54:38 +00:00
jorgep added 1 commit 2024-01-16 14:47:14 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
2fbea6f9dd
feat: refs #6276 wip machineWorke_update
jorgep added 2 commits 2024-01-17 07:21:34 +00:00
jorgep added 1 commit 2024-01-17 08:05:38 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
6a78123fca
fix: refs #6276 machineWorke_update
jorgep added 1 commit 2024-01-17 09:21:54 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
90b1e8d664
fix: refs #6276 backend tests
jorgep added 1 commit 2024-01-17 11:11:01 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
e69ec2c856
feat: refs #6276 test expeditionPallet_get
jorgep added 1 commit 2024-01-17 11:18:20 +00:00
gitea/salix/pipeline/head This commit looks good Details
bf13e85ecc
fix: refs #6276 getFromSectorCollection
jorgep added 1 commit 2024-01-17 12:02:37 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
1fbb84ae9f
fix: refs #6276 itemShelving_return
jorgep added 1 commit 2024-01-17 13:01:36 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
6be2f07c22
fix: refs #6276 assignCollection
jorgep added 1 commit 2024-01-17 13:25:37 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
c0398d17bf
feat: refs #6276 test itemShelving_return
jorgep added 1 commit 2024-01-17 14:29:46 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
8e5be5f5da
feat: refs #6276 test itemBarcode_delete
jorgep added 1 commit 2024-01-18 10:55:03 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
6f35c62cd5
feat: refs #6276 test collection_addItem
jorgep added 1 commit 2024-01-18 12:32:05 +00:00
gitea/salix/pipeline/head This commit looks good Details
c8bfb35cf6
feat: refs #6276 test itemShelvingMake_multi
jorgep added 1 commit 2024-01-18 12:57:25 +00:00
jorgep added 1 commit 2024-01-18 13:22:04 +00:00
gitea/salix/pipeline/head This commit looks good Details
19edd7868e
feat: refs #6276 test getVersion
jorgep added 1 commit 2024-01-18 13:39:33 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
b33594e0da
fix: refs #6276 item_card & wip test
jorgep added 1 commit 2024-01-18 14:06:59 +00:00
gitea/salix/pipeline/head This commit looks good Details
34420375cd
feat: refs #6276 test item_updateFromSale
jorgep added 1 commit 2024-01-19 08:56:33 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
5c0425b942
feat: refs #6276 test machineWorker_update
jorgep added 1 commit 2024-01-19 11:42:43 +00:00
gitea/salix/pipeline/head This commit looks good Details
b7ce6cac9c
fix: refs #6276 machineWorker_update & tests
jorgep added 1 commit 2024-01-19 13:38:54 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
817a6b1289
feat: refs #6276 test operator_add
jorgep added 1 commit 2024-01-19 13:47:53 +00:00
gitea/salix/pipeline/head This commit looks good Details
6e59a87f9c
feat: refs #6276 test operator_add
jorgep added 1 commit 2024-01-19 13:54:20 +00:00
gitea/salix/pipeline/head Build queued... Details
428da6fe00
feat: refs #6276 drop worker_getPrinter
jorgep added 1 commit 2024-01-19 13:54:45 +00:00
jorgep added 1 commit 2024-01-19 13:57:26 +00:00
jorgep added 1 commit 2024-01-19 13:58:13 +00:00
jorgep added 1 commit 2024-01-22 06:53:10 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
89d18e29f0
feat: refs #6276 test saleTrackingReplace (updateTracking)
jorgep added 1 commit 2024-01-22 07:02:05 +00:00
gitea/salix/pipeline/head This commit looks good Details
f04724a61f
feat: refs #6276 new test added
jorgep added 1 commit 2024-01-22 11:40:42 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
ed713e762b
feat: refs #6276 test saleTracking_mark
jorgep added 2 commits 2024-01-22 12:36:38 +00:00
jorgep added 1 commit 2024-01-22 14:17:37 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
efb8bc46c6
refactor: refs #6276 saleTracking_mark
jorgep added 1 commit 2024-01-23 07:43:22 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
dcf6232c14
feat: refs #6276 test sale_getFromSectorCollection
jorgep added 1 commit 2024-01-23 08:13:45 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
799237e14c
feat: refs #6276 test shelving_addLog
jorgep added 1 commit 2024-01-23 11:17:23 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
08dd37e9e4
feat: refs #6276 test sectorCollection_getSales
jorgep added 1 commit 2024-01-23 15:02:00 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
ae89d59bde
feat: refs #6276 WIP test sectorCollection_getSales
jorgep added 1 commit 2024-01-24 10:24:04 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
e849f0b6e2
fix: refs #6276 sectorCollection_getSales
jorgep added 1 commit 2024-01-24 10:28:41 +00:00
gitea/salix/pipeline/head This commit looks good Details
e527780622
fix: refs #6276 drop suitcase sectorCollection_getSales
jorgep added 1 commit 2024-01-25 07:17:41 +00:00
gitea/salix/pipeline/head Build queued... Details
02e38eb711
fix: refs #6276 fix tests
jorgep added 1 commit 2024-01-25 07:18:02 +00:00
jorgep added 1 commit 2024-01-25 11:18:08 +00:00
gitea/salix/pipeline/head This commit looks good Details
63fb3db8a1
fix: refs #6276 test item_card & general fixes
jorgep added 1 commit 2024-01-25 11:27:04 +00:00
jorgep changed title from WIP: #6276-createNewWarehouse to #6276 createNewWarehouse methods migrated from silex to salix 2024-01-25 11:30:02 +00:00
Author
Member

@jgallego @alexm @sergiodt falta por revisar un método assignCollection. No he creado el test por eso... Parece que ha habido un cambio en la base de datos que afecta a este. Sergio y yo sospechamos que puede venir de la vista ticketState o ticketStateToday. Lo revisaré con Pablo o alguno de vosotros y después añadiré el test

@jgallego @alexm @sergiodt falta por revisar un método assignCollection. No he creado el test por eso... Parece que ha habido un cambio en la base de datos que afecta a este. Sergio y yo sospechamos que puede venir de la vista ticketState o ticketStateToday. Lo revisaré con Pablo o alguno de vosotros y después añadiré el test
jorgep requested review from jgallego 2024-01-25 11:34:25 +00:00
jorgep requested review from alexm 2024-01-25 11:34:26 +00:00
jorgep requested review from sergiodt 2024-01-25 11:34:26 +00:00
Author
Member

@jgallego @sergiodt @alexm Sergio y yo hemos comprobado que todos los backs devuelvan los datos como en silex. Creo que hay un método en el que necesita probarlo en test. En el redmine está apuntado.

@jgallego @sergiodt @alexm Sergio y yo hemos comprobado que todos los backs devuelvan los datos como en silex. Creo que hay un método en el que necesita probarlo en test. En el redmine está apuntado.
jorgep added the
CR / Tests passed
label 2024-01-25 12:22:28 +00:00
jorgep added 1 commit 2024-01-29 07:42:04 +00:00
jgallego requested changes 2024-01-29 08:30:14 +00:00
@ -20,2 +20,3 @@
"Loggable"
]
],
"CodeGPT.apiKey": "CodeGPT Plus Beta"
Owner

esto a nivel equipo lo subimos @alexm ?

esto a nivel equipo lo subimos @alexm ?
Author
Member

Lo voy a quitar, yo lo plantearía con @jsegarra en un reunión de salix.

Lo voy a quitar, yo lo plantearía con @jsegarra en un reunión de salix.
Member

Este archivo sólo sube en caso de añadir palabras para la extensión de Code Spell Checker.

Yo tengo la misma que tu y no me ha cambiado nada.

Descartaría los cambios d este fichero si no aporta valor

Este archivo sólo sube en caso de añadir palabras para la extensión de Code Spell Checker. Yo tengo la misma que tu y no me ha cambiado nada. Descartaría los cambios d este fichero si no aporta valor
jorgep marked this conversation as resolved
@ -0,0 +1,61 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Owner

veo un enfoque extraño, se crea este método en collection, pero dentro no trata con colecciones, sino que añade a un ticket, porque no lo mueves a ticket o miras si en ticket ya existe uno que te sirva?

veo un enfoque extraño, se crea este método en collection, pero dentro no trata con colecciones, sino que añade a un ticket, porque no lo mueves a ticket o miras si en ticket ya existe uno que te sirva?
Member

El propio modelo de sale (sale.js L87) ya hace la validación de disponible.
Valoraria que sergio usara directamente ticket/addSale

El propio modelo de sale (sale.js L87) ya hace la validación de disponible. Valoraria que sergio usara directamente ticket/addSale
jorgep marked this conversation as resolved
@ -0,0 +10,4 @@
('ItemBarcode','deleteByItemAndCode','WRITE','ALLOW','ROLE','employee'),
('Collection','addItem','WRITE','ALLOW','ROLE','employee'),
('ExpeditionPallet', '*', 'READ', 'ALLOW', 'ROLE', 'production'),
('MobileAppVersionControl', '*', 'READ', 'ALLOW', 'ROLE', 'production'),
Owner

aqui no es employee?

aqui no es employee?
Author
Member

@sergiodt @jgallego Me podéis pasar una lista con el rol para cada acl?

@sergiodt @jgallego Me podéis pasar una lista con el rol para cada acl?
Owner

@sergiodt mira a vore qui ha de gastar cada pantalla i com ho tenies ara i poseu els rols concrets

@sergiodt mira a vore qui ha de gastar cada pantalla i com ho tenies ara i poseu els rols concrets
sergiodt marked this conversation as resolved
@ -339,2 +339,2 @@
"No tickets to invoice": "No hay tickets para facturar"
}
"No tickets to invoice": "No hay tickets para facturar",
"No hay tickets para sacar": "No hay tickets para sacar",
Owner

no puede estar en castellano

no puede estar en castellano
jorgep marked this conversation as resolved
@ -0,0 +1,34 @@
module.exports = Self => {
Owner

aqui no se puede usar el nativo desde front y no cremo el archivo?

aqui no se puede usar el nativo desde front y no cremo el archivo?
Author
Member

@jgallego solo permite eliminar por id.

@jgallego solo permite eliminar por id.
jorgep marked this conversation as resolved
@ -0,0 +52,4 @@
let packing;
if (result) packing = result.itemPacking;
if (!packing) packing = 1;
Owner

crear un redmine para refactorizar esto y el proc itemShelving_add
aqui no tendria que ponerse un 1 en el codigo, sino que sino hay se le pase null al proc, y ya seria el proc internamente el que lo gestiona, de hecho el codigo esta.
además no hay que multiplicar aqui por la cantidad tampoco, que se el pase las etiquetas, y el procedimiento que es el que sabe el vPacking que lo multiplique, este método quedaria mas simple.

crear un redmine para refactorizar esto y el proc itemShelving_add aqui no tendria que ponerse un 1 en el codigo, sino que sino hay se le pase null al proc, y ya seria el proc internamente el que lo gestiona, de hecho el codigo esta. además no hay que multiplicar aqui por la cantidad tampoco, que se el pase las etiquetas, y el procedimiento que es el que sabe el vPacking que lo multiplique, este método quedaria mas simple.
Author
Member

Tarea creada: https://redmine.verdnatura.es/issues/6776 y una rama añadida con el back creado.

Tarea creada: https://redmine.verdnatura.es/issues/6776 y una rama añadida con el back creado.
jorgep marked this conversation as resolved
@ -0,0 +39,4 @@
};
let itemShelvings = await models.ItemShelving.find(filterItemShelvings, myOptions);
const [alternatives] = await models.ItemShelving.rawSql('CALL vn.itemShelving_getAlternatives(?)',
Owner

si eso se usa en el if, porque no lo mueves dentro, así en los casos que no haya itemShelvings no es necesario ejecutarlo?

si eso se usa en el if, porque no lo mueves dentro, así en los casos que no haya itemShelvings no es necesario ejecutarlo?
jorgep marked this conversation as resolved
@ -0,0 +36,4 @@
fields: ['code'],
where: {
itemFk: realIdItem
Owner

quitar salto

quitar salto
jorgep marked this conversation as resolved
@ -0,0 +38,4 @@
if (!shelving) throw new UserError($t('Shelving not valid'));
await models.ShelvingLog.create({
Owner

esto porque no se hace automatizado como el resto de modelos? ejemplo ticket

esto porque no se hace automatizado como el resto de modelos? ejemplo ticket
Member

@jgallego @alexm Perquè necessitaria dos cridaes, una per traure el id i un altra per fer el insert amb el id.

@jgallego @alexm Perquè necessitaria dos cridaes, una per traure el id i un altra per fer el insert amb el id.
jgallego marked this conversation as resolved
@ -0,0 +1,60 @@
const UserError = require('vn-loopback/util/user-error');
Owner

este solo con un filtro de loopback no lo puedes conseguir sacar en el explorer, así no es necesario crear este método?

este solo con un filtro de loopback no lo puedes conseguir sacar en el explorer, así no es necesario crear este método?
jorgep marked this conversation as resolved
@ -0,0 +95,4 @@
if (tx) await tx.commit();
} catch (e) {
if (e.message == $t('The sale can not be tracked')) {
Owner

cannot

cannot
jorgep marked this conversation as resolved
@ -0,0 +1,61 @@
module.exports = Self => {
Self.remoteMethodCtx('getFromSectorCollection', {
Owner

confirma con @sergiodt que esto pasa así a salix, o se separa..o hay alguna tarea para separarlo

confirma con @sergiodt que esto pasa así a salix, o se separa..o hay alguna tarea para separarlo
Member

@jgallego Separarlo en quin sentit ? És el back que trau les linies de previa amb les seues ubicacions.....

@jgallego Separarlo en quin sentit ? És el back que trau les linies de previa amb les seues ubicacions.....
Owner

Crec que m'he confós tenia en ment allò de ticket or collection, tot clar.

Crec que m'he confós tenia en ment allò de ticket or collection, tot clar.
jgallego marked this conversation as resolved
@ -58,3 +58,3 @@
FROM vn.sectorCollection`, [], options);
expect(sectorCollection.numberRows).toEqual(0);
expect(sectorCollection.numberRows).toEqual(1);
Owner

ejecuta antes de borrar SELECT COUNT(*) numberRows
FROM vn.sectorCollection`, [], options);
FROM vn.sectorCollection
y así quitas el uno y el test lo haces dinamico

ejecuta antes de borrar SELECT COUNT(*) numberRows FROM vn.sectorCollection`, [], options); FROM vn.sectorCollection y así quitas el uno y el test lo haces dinamico
jorgep marked this conversation as resolved
@ -12,2 +13,3 @@
"description": "Identifier"
}
},
"truckFk": {
Owner

al poner la relacion este bloque lo puedes quitar

al poner la relacion este bloque lo puedes quitar
jorgep marked this conversation as resolved
@ -0,0 +10,4 @@
"saleFk": {
"id": true,
"type": "number",
"forceId": false
Owner

esto en que caso es necesario?

esto en que caso es necesario?
Author
Member

@jgallego es necesario en 2 backs de saleTracking: mark y updateTracking. Lo dejo? O prefieres un rawSql?

@jgallego es necesario en 2 backs de saleTracking: mark y updateTracking. Lo dejo? O prefieres un rawSql?
Owner

me refiero al parametro "forceId": false

me refiero al parametro "forceId": false
Author
Member

Lo quito, creo que lo puse al principio se me olvido poner id: true

Lo quito, creo que lo puse al principio se me olvido poner id: true
jorgep marked this conversation as resolved
@ -0,0 +24,4 @@
}
try {
await Self.create({
Owner

si simplemente se hace el create? porque no lo hace segio usando el put desde front?

si simplemente se hace el create? porque no lo hace segio usando el put desde front?
Author
Member

@jgallego para dar un error personalizado.

@jgallego para dar un error personalizado.
Owner

@sergiodt realment es necesita?

@sergiodt realment es necesita?
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-01-29 08:35:19 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
293bbd3da3
fix: refs #6276 merge database
alexm requested changes 2024-01-30 07:42:38 +00:00
@ -0,0 +48,4 @@
try {
const [[item]] = await Self.rawSql('CALL vn.item_getInfo(?,?)', [code, warehouseFk], myOptions);
if (!item?.available) throw new UserError($t('We do not have availability for the selected item'));
Member

No hace falta usar $t, UserError traduce por defecto.

No hace falta usar $t, UserError traduce por defecto.
Author
Member

Ahora el error se maneja desde Sale.js

Ahora el error se maneja desde Sale.js
jorgep marked this conversation as resolved
@ -0,0 +26,4 @@
const [assignedCollection] = await Self.rawSql('SELECT @vCollectionFk');
const {'@vCollectionFk': collectionFk} = assignedCollection;
if (!collectionFk) throw new UserError($t('There are not picking tickets'));
Member

No hace falta usar $t, UserError traduce por defecto.

No hace falta usar $t, UserError traduce por defecto.
jorgep marked this conversation as resolved
@ -0,0 +153,4 @@
return Self.rawSql(query, [ticketId], options);
}
async function setState(source, id, options) {
Member

Aço se pot refactoritzar per
const STATES= {
'PRECHECKER': 'PREVIOUS_CONTROL',
'CHECKER': 'ON_CHECKING'
}

if(STATES[source])

Aço se pot refactoritzar per const STATES= { 'PRECHECKER': 'PREVIOUS_CONTROL', 'CHECKER': 'ON_CHECKING' } if(STATES[source])
jorgep marked this conversation as resolved
@ -0,0 +28,4 @@
});
let fields = ['id', 'appName'];
if (workerFk)
Member

Javascript tiene una forma muy sencilla de 'fusionar' arrays
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat

Javascript tiene una forma muy sencilla de 'fusionar' arrays https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat
jorgep marked this conversation as resolved
@ -0,0 +40,4 @@
fields,
};
return await Self.findOne(filter);
Member

en un return no hace falta poner 'await'

Bing:

En JavaScript, la mayoría de las veces, no hay diferencia observable entre return await myFunction() y return myFunction()12. Ambas versiones tienen el mismo comportamiento observable.
en un return no hace falta poner 'await' Bing: ``` En JavaScript, la mayoría de las veces, no hay diferencia observable entre return await myFunction() y return myFunction()12. Ambas versiones tienen el mismo comportamiento observable. ```
jorgep marked this conversation as resolved
@ -3069,0 +3125,4 @@
isMain = TRUE,
itemPackingTypeFk = NULL;
REPLACE vn.parking SET id = 9991011, sectorFk = 9991, code = 'A-01-1', pickingOrder = 1;
Member

Diria que es mejor enfoque cambiar el propio insert de vn.parking y de vn.shelving por lo que quieres.
Que hacer un insert que luegos vas a hacer un replaces.
O hacer el insert directamente
(Esto aplica a todos los repalces que haces)

Tampoco acabo de ver el adaptar las fixtures a ids tan altos, como lo ves @jgallego ?

Diria que es mejor enfoque cambiar el propio insert de vn.parking y de vn.shelving por lo que quieres. Que hacer un insert que luegos vas a hacer un replaces. O hacer el insert directamente (Esto aplica a todos los repalces que haces) Tampoco acabo de ver el adaptar las fixtures a ids tan altos, como lo ves @jgallego ?
Owner

cuantos menos ids mejor, si se puede cambiar directo en las fixtures mejor, sino intentar evitar el id

cuantos menos ids mejor, si se puede cambiar directo en las fixtures mejor, sino intentar evitar el id
Author
Member

replaces cambiados. Los ids en este caso son necesarios por lo hablado con @sergiodt .

replaces cambiados. Los ids en este caso son necesarios por lo hablado con @sergiodt .
@ -0,0 +1,18 @@
-- Place your SQL code here
INSERT INTO `salix`.`ACL` (model, property, accessType, permission, principalType, principalId)
Member

Estan duplicados los ACLs?

Estan duplicados los ACLs?
Author
Member

@alexm Sí, elimino ese script? el bueno es 00-newWarehouse

@alexm Sí, elimino ese script? el bueno es 00-newWarehouse
Author
Member

Lo elimino

Lo elimino
jorgep marked this conversation as resolved
@ -268,14 +268,8 @@ class VnMySQL extends MySQL {
arguments, model, ctx, opts, cb);
}
isLoggable(model) {
Member

Esto te lo ha dicho Juan?
Esto cambia el como se loggean todos los cambios

Esto te lo ha dicho Juan? Esto cambia el como se loggean todos los cambios
Author
Member

@alexm , @jgallego . Me hacía falta para poder utilizar la función account.getMyuserId (o parecido) dentro de los procedimientos. Si no, coge el usuario del sistema. En caso de duda, habría que hablarlo con @juan

Sí @alexm , @jgallego . Me hacía falta para poder utilizar la función account.getMyuserId (o parecido) dentro de los procedimientos. Si no, coge el usuario del sistema. En caso de duda, habría que hablarlo con @juan
Author
Member

De momento he puesto que el modelo SaleBuy sea loggable, tal cual hemos hablado @alexm y yo. Le he preguntado por rocket a @juan a ver que opina... @sergiodt @jgallego .

De momento he puesto que el modelo SaleBuy sea loggable, tal cual hemos hablado @alexm y yo. Le he preguntado por rocket a @juan a ver que opina... @sergiodt @jgallego .
Author
Member

Cambios realizados para que todos tengan acceso acceso a userId, no solo loggable. Revisado con @juan

Cambios realizados para que todos tengan acceso acceso a userId, no solo loggable. Revisado con @juan
jorgep marked this conversation as resolved
@ -0,0 +56,4 @@
quantity = quantity * packing;
await Self.rawSql('CALL vn.itemShelving_add(?, ?, ?, NULL, NULL, ?, ?)',
Member

En salix para poder loggear los cambios en CALLs hace falta que el myOptions tenga el userId

En salix para poder loggear los cambios en CALLs hace falta que el myOptions tenga el userId
Author
Member

https://redmine.verdnatura.es/issues/6776 se ha pasado este procedimiento a esta tarea. lo añado ahí para que quien la coja lo tenga puesto.

https://redmine.verdnatura.es/issues/6776 se ha pasado este procedimiento a esta tarea. lo añado ahí para que quien la coja lo tenga puesto.
jorgep marked this conversation as resolved
@ -0,0 +40,4 @@
let itemShelvings = await models.ItemShelving.find(filterItemShelvings, myOptions);
const [alternatives] = await models.ItemShelving.rawSql('CALL vn.itemShelving_getAlternatives(?)',
[shelvingFk], myOptions
Member

En salix para poder loggear los cambios en CALLs hace falta que el myOptions tenga el userId

En salix para poder loggear los cambios en CALLs hace falta que el myOptions tenga el userId
jorgep marked this conversation as resolved
@ -0,0 +52,4 @@
};
}
throw new UserError($t('This pallet does not exist'));
Member

No hace falta usar $t, UserError traduce por defecto.

No hace falta usar $t, UserError traduce por defecto.
Author
Member

Método reemplazado por llamada a directa al modelo de loopback

Método reemplazado por llamada a directa al modelo de loopback
jorgep marked this conversation as resolved
@ -16,2 +14,4 @@
type: ['string']
},
],
returns: {
Member

Si no lo requiere sergio especificamente, normalmente con terminar el procedimiento sobra, no hace falta devolver true

Si no lo requiere sergio especificamente, normalmente con terminar el procedimiento sobra, no hace falta devolver true
Author
Member

Lo quito

Lo quito
jorgep marked this conversation as resolved
@ -0,0 +90,4 @@
const buy = await models.Buy.findById(buyFk, myOptions);
if (buy.itemOriginalFk) await models.SaleBuy.create({saleFk, buyFk}, myOptions);
} catch (e) {
throw new UserError($t('The sale can not be tracked'));
Member

No hace falta usar $t, UserError traduce por defecto.

No hace falta usar $t, UserError traduce por defecto.
jorgep marked this conversation as resolved
@ -0,0 +60,4 @@
where: {code},
}, myOptions);
if (!state) throw new UserError($t('this state does not exist'));
Member

No hace falta usar $t, UserError traduce por defecto.

No hace falta usar $t, UserError traduce por defecto.
jorgep marked this conversation as resolved
@ -0,0 +69,4 @@
const attributes = {
isChecked,
originalQuantity,
isScanned
Member

Tambien se puede hacer isScanned: !!isScanned y te ahorras el valor por defecto.
Pero no creo que haya una preferencia de hacerlo de una manera o de otra

Tambien se puede hacer `isScanned: !!isScanned` y te ahorras el valor por defecto. Pero no creo que haya una preferencia de hacerlo de una manera o de otra
Author
Member

En la tabla saleTracking -> el valor por defecto is NULL, no es solo true o false. Lo comenté con @sergiodt y quedamos así.

En la tabla saleTracking -> el valor por defecto is NULL, no es solo true o false. Lo comenté con @sergiodt y quedamos así.
jorgep marked this conversation as resolved
@ -72,2 +73,3 @@
if (await models.ACL.checkAccessAcl(ctx, 'Sale', 'isInPreparing', '*')) return;
const isInPreparing = await models.ACL.checkAccessAcl(ctx, 'Sale', 'isInPreparing', '*');
if (!ctx.isNEwInstance && isInPreparing) return;
Member

isNEwInstance o isNewInstance.
Añadir test para este caso

isNEwInstance o isNewInstance. Añadir test para este caso
jorgep marked this conversation as resolved
Member

@jorgep En tabla silexACL están los rol para cada procedimiento. En caso de ser employee subir a production.

@jorgep En tabla silexACL están los rol para cada procedimiento. En caso de ser employee subir a production.
jorgep added 1 commit 2024-01-30 10:29:21 +00:00
jorgep removed the
CR / Tests passed
label 2024-01-30 12:45:11 +00:00
jorgep added 1 commit 2024-01-30 14:02:21 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
e17fc91415
fix: refs #6276 fix acl, addSaleByCode & tests
jorgep added 1 commit 2024-01-30 15:11:32 +00:00
gitea/salix/pipeline/head There was a failure building this commit Details
2a6abffef9
fix: refs #6276 fix errors & refactor
jorgep added 1 commit 2024-01-31 07:52:19 +00:00
jorgep added 1 commit 2024-01-31 09:07:02 +00:00
jorgep added 1 commit 2024-01-31 12:15:16 +00:00
jorgep added 1 commit 2024-02-01 07:19:39 +00:00
jorgep added 1 commit 2024-02-01 07:47:22 +00:00
gitea/salix/pipeline/pr-dev Something is wrong with the build of this commit Details
e23bd0489d
Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6276-createNewWarehouse
jorgep added 1 commit 2024-02-01 12:00:15 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
ec7a88c6dd
fix: refs #6703 tests, backs & fixtures
jorgep added 1 commit 2024-02-01 13:38:03 +00:00
jorgep added 1 commit 2024-02-02 07:15:08 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
9f9d953b86
fix: refs #6276 resolve conflicts
jorgep added 1 commit 2024-02-02 08:27:50 +00:00
gitea/salix/pipeline/pr-dev Build queued... Details
21cf05ddd0
fix: refs #6276 fix tests & errors
jorgep added 1 commit 2024-02-02 08:41:11 +00:00
jorgep added 1 commit 2024-02-02 09:32:19 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
9f194f4f63
fix: refs #6276 fix model
jorgep added 1 commit 2024-02-08 07:40:18 +00:00
jorgep added 1 commit 2024-02-08 09:12:37 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
8ad69a62b9
fix: refs #6276 loggable & userId
jorgep added 1 commit 2024-02-08 12:20:51 +00:00
jorgep added 1 commit 2024-02-08 13:24:18 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
33cca9bfe8
fix: refs #6276 assignColletion
jorgep added 1 commit 2024-02-08 13:56:47 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
c2fffd1eda
fix: refs #6276 drop test
jorgep added 1 commit 2024-02-09 12:12:00 +00:00
jorgep added 1 commit 2024-02-15 14:22:09 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2fb68e81c9
fix: refs #6276 rollback sale
jorgep added 1 commit 2024-02-16 07:38:36 +00:00
jorgep added 1 commit 2024-02-16 09:52:09 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
89970e39d0
fix: refs #6276 back tests
jorgep added 1 commit 2024-02-16 10:59:29 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
1767ce426a
fix: refs #6276 collection_addItem
jorgep requested review from alexm 2024-02-16 11:08:56 +00:00
jorgep requested review from jgallego 2024-02-16 11:08:59 +00:00
jorgep added the
CR / Tests passed
label 2024-02-16 12:15:07 +00:00
jorgep added 1 commit 2024-02-16 12:15:33 +00:00
jgallego requested changes 2024-02-17 07:30:05 +00:00
@ -0,0 +1,31 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('assignCollection', {
Owner

nombre simplemente assign al estar en el contexto collection se asume que es una coleccion

nombre simplemente assign al estar en el contexto collection se asume que es una coleccion
jorgep marked this conversation as resolved
@ -0,0 +1,167 @@
module.exports = Self => {
Self.remoteMethodCtx('getSalesFromTicketOrCollection', {
Owner

getSales

getSales
jorgep marked this conversation as resolved
@ -0,0 +62,4 @@
let observations = ticket.observaciones.split(' ');
for (let observation of observations) {
const salesMan = ticket.salesPersonFk;
Owner

salesPerson

salesPerson
jorgep marked this conversation as resolved
@ -0,0 +92,4 @@
if (sale.ticketFk == ticketFk) {
sale.placements = [];
for (const salePlacement of placements) {
let placement;
Owner

si solo se usa en el if, porque no la defines dentro?

si solo se usa en el if, porque no la defines dentro?
Author
Member

@jgallego que quieres decir?

@jgallego que quieres decir?
Owner

la variable let placement moverla 2 linea abajo, incluso valorar si es const

la variable let placement moverla 2 linea abajo, incluso valorar si es const
Author
Member

debería ser const e ir dentro. Lo cambio

debería ser const e ir dentro. Lo cambio
jorgep marked this conversation as resolved
@ -0,0 +50,4 @@
if (machineWorker) {
const {maxHours} = await models.MachineWorkerConfig.findOne({fields: ['maxHours']}, myOptions);
const hoursDifference = (Date.vnNow() - machineWorker.inTime.getTime()) / (60 * 60 * 1000);
const isHimSelf = userId == machineWorker.workerFk;
Owner

isHimself

isHimself
jorgep marked this conversation as resolved
@ -0,0 +1,62 @@
module.exports = Self => {
Self.remoteMethod('return', {
Owner

getAlternative

getAlternative
jorgep marked this conversation as resolved
@ -0,0 +1,50 @@
module.exports = Self => {
Self.remoteMethod('card', {
Owner

get

get
jorgep marked this conversation as resolved
@ -0,0 +8,4 @@
},
accepts: [
{
arg: 'itemFk',
Owner

barcode

barcode
jorgep marked this conversation as resolved
@ -0,0 +34,4 @@
const [[itemInfo]] = await Self.rawSql('CALL vn.item_getInfo(?, ?)', [itemFk, warehouseFk], myOptions);
const barcodeItems = await Self.rawSql('SELECT vn.barcodeToItem(?) as realIdItem', [itemFk], myOptions);
Owner

quitar esta llamada, dentro de item_getInfo ya se llama a barcodeToItem por tanto itemInfo ya contiene el id que se busca

quitar esta llamada, dentro de item_getInfo ya se llama a barcodeToItem por tanto itemInfo ya contiene el id que se busca
Author
Member

@sergiodt es correcto o quieres los barcodes tambien?

@sergiodt es correcto o quieres los barcodes tambien?
jorgep marked this conversation as resolved
@ -0,0 +1,106 @@
const UserError = require('vn-loopback/util/user-error');
module.exports = Self => {
Self.remoteMethodCtx('mark', {
Owner

mark es poco descriptivo, buscad un nombre que diga algo mas sobre el cometido del método.

mark es poco descriptivo, buscad un nombre que diga algo mas sobre el cometido del método.
Author
Member

@jgallego saleMarked bien?

@jgallego saleMarked bien?
Owner

aqui se hacen cambios en varias tablas, imagino que es fruto de una acción muy concreta. Cual es? porque tal vez ese sea el nombre mas descriptivo @sergiodt ? ej setPicked?

aqui se hacen cambios en varias tablas, imagino que es fruto de una acción muy concreta. Cual es? porque tal vez ese sea el nombre mas descriptivo @sergiodt ? ej setPicked?
jorgep marked this conversation as resolved
@ -0,0 +5,4 @@
accessType: 'WRITE',
accepts: [
{
arg: 'code',
Owner

barcode

barcode
jorgep marked this conversation as resolved
@ -0,0 +45,4 @@
const [[item]] = await Self.rawSql('CALL vn.item_getInfo(?,?)', [code, warehouseFk], myOptions);
if (!item?.available) throw new UserError('We do not have availability for the selected item');
await Self.rawSql('CALL vn.collection_addItem(?, ?, ?)', [item.id, quantity, ticketFk], myOptions);
Owner

crea redmine, aqui no deberia llamar a collection_addItem sino a remoteMethodCtx('addSale' para reutilizar codigo, y eliminar vn.collection_addItem

crea redmine, aqui no deberia llamar a collection_addItem sino a remoteMethodCtx('addSale' para reutilizar codigo, y eliminar vn.collection_addItem
Author
Member

@sergiodt poniendo addSale como está ahora te sirve?

@sergiodt poniendo addSale como está ahora te sirve?
jorgep marked this conversation as resolved
@ -0,0 +16,4 @@
Object.assign(myOptions, options);
const isOperator = await Self.findById(userId, myOptions);
if (!isOperator) await Self.create({workerFk: userId}, myOptions);
Owner

No sé si esto ya lo hablamos, me suena que sí, pero por asegurar.
Aquí habéis contemplado no crear este método y llamar al create nativo de loopback gestionando el error en caso de que ya exista?

No sé si esto ya lo hablamos, me suena que sí, pero por asegurar. Aquí habéis contemplado no crear este método y llamar al create nativo de loopback gestionando el error en caso de que ya exista?
Author
Member

@jgallego Sí, acabo de hablar con Sergio y hemos quedado en cambiarlo a como dices tú.

@jgallego Sí, acabo de hablar con Sergio y hemos quedado en cambiarlo a como dices tú.
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-02-19 10:24:52 +00:00
jorgep added 1 commit 2024-02-19 13:51:17 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
d5a3413307
fix: refs #6776 method names & chanmges
jorgep added 1 commit 2024-02-19 13:51:36 +00:00
jorgep added 2 commits 2024-02-20 07:53:33 +00:00
jorgep added 1 commit 2024-02-20 08:32:11 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
55b490160b
fix: refs #6776 back
jorgep requested review from jgallego 2024-02-20 08:50:18 +00:00
jorgep added 1 commit 2024-02-20 10:03:50 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
9ce162da71
fix: refs #6776 back
jgallego requested changes 2024-02-20 10:40:16 +00:00
@ -0,0 +20,4 @@
if (typeof options == 'object')
Object.assign(myOptions, options);
const [info, okPacket, {collectionFk}] = await Self.rawSql('CALL vn.collection_assign(?, @vCollectionFk); SELECT @vCollectionFk collectionFk',
Owner

si no usas info y okPacket porque los recuperas?
No se pueden hacer dos llamadas?

si no usas info y okPacket porque los recuperas? No se pueden hacer dos llamadas?
Author
Member

@jgallego No funciona bien, no está abriendo y cerrando la conexión a bd si lo hago en 2 llamadas. Puedo probar a usar un new ParametizedSql como en cloneWithEntries. O hacer como en transferSales y acceder directamente a la posición del array.

@jgallego No funciona bien, no está abriendo y cerrando la conexión a bd si lo hago en 2 llamadas. Puedo probar a usar un new ParametizedSql como en cloneWithEntries. O hacer como en transferSales y acceder directamente a la posición del array.
Owner

const [, , {collectionFk}]

const [, , {collectionFk}]
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-02-23 11:56:04 +00:00
jorgep added 1 commit 2024-02-23 12:07:41 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
7fdfd4fcb4
fix: refs #6276 desestructuring
jorgep requested review from jgallego 2024-02-23 12:11:24 +00:00
jgallego requested changes 2024-02-26 13:32:26 +00:00
@ -0,0 +46,4 @@
const [sales] = await Self.rawSql('CALL vn.sale_getFromTicketOrCollection(?)',
[id], myOptions);
const isPicker = source == 'CHECKER';
Owner

picker i checker no son el mateix..

picker i checker no son el mateix..
jorgep marked this conversation as resolved
@ -0,0 +52,4 @@
return {
id: itemShelving.id,
itemFk: itemShelving.itemFk,
longName: item ? item.longName || `${item.name} ${item.size}` : '',
Owner

esto donde se muestra? mirar con @sergiodt ya que esto debería en todo caso hacerlo front, intentar mostrar siempre el longName si no lo hay no mostrar nada, siempre debe haberlo

esto donde se muestra? mirar con @sergiodt ya que esto debería en todo caso hacerlo front, intentar mostrar siempre el longName si no lo hay no mostrar nada, siempre debe haberlo
Author
Member

Vale, le envio por separado, como propiedades el name y el size y ya el muestra en el front longname o los otros. Hablado con @sergiodt .

Vale, le envio por separado, como propiedades el name y el size y ya el muestra en el front longname o los otros. Hablado con @sergiodt .
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-02-27 08:47:00 +00:00
jorgep added 1 commit 2024-02-27 09:34:35 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
b86110c898
fix: refs #6276 changes
jorgep added 1 commit 2024-02-27 14:55:35 +00:00
jorgep requested review from jgallego 2024-02-27 14:55:44 +00:00
jgallego requested changes 2024-02-28 06:32:57 +00:00
@ -0,0 +63,4 @@
for (let observation of observations) {
const salesPerson = ticket.salesPersonFk;
if (!observation.startsWith('#') && !observation.startsWith('@')) return;
Owner

esto para que sirve? si todos los que envian tienen que hacerlo..conviene moverlo dentro del propio envio no?

esto para que sirve? si todos los que envian tienen que hacerlo..conviene moverlo dentro del propio envio no?
Author
Member

Pregunto a @alexm

Pregunto a @alexm
Member

Si la función tuviese un test si que vería más correcto separarlo.
Si solo se usa una vez y no tiene test. Lo dejaria dentro tambien (como decia @jgallego)

Si la función tuviese un test si que vería más correcto separarlo. Si solo se usa una vez y no tiene test. Lo dejaria dentro tambien (como decia @jgallego)
jorgep marked this conversation as resolved
@ -0,0 +154,4 @@
async function setState(source, id, options) {
const states = {
'PRECHECKER': 'PREVIOUS_CONTROL',
Owner

@sergiodt ací no pots pasar desde front el codi correcte i evitem fer esta conversió?

@sergiodt ací no pots pasar desde front el codi correcte i evitem fer esta conversió?
Author
Member

Corregido, lo pasará desde el front.

Corregido, lo pasará desde el front.
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-02-28 08:11:35 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
f95a4f3530
refactor: refs #6276 drop setState function
alexm requested changes 2024-03-01 06:12:56 +00:00
alexm left a comment
Member

Comentario

Comentario
jorgep added 1 commit 2024-03-01 11:34:53 +00:00
jorgep added 1 commit 2024-03-01 12:39:59 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
97f76c64ff
refactor: refs #6276 drop sendRocket method
jorgep added 1 commit 2024-03-01 12:52:58 +00:00
jorgep requested review from jgallego 2024-03-01 12:53:11 +00:00
jorgep requested review from alexm 2024-03-01 12:53:15 +00:00
alexm requested changes 2024-03-04 06:43:57 +00:00
@ -0,0 +64,4 @@
}, myOptions);
if (hoursDifference >= maxHours)
await models.MachineWorker.create({machineFk: machine.id, workerFk: userId}, myOptions);
Member

Si en els dos casos fa el mateix, fica fora de les condicions

Si en els dos casos fa el mateix, fica fora de les condicions
jorgep marked this conversation as resolved
@ -292,3 +292,3 @@
try {
const userId = opts.httpCtx && opts.httpCtx.active?.accessToken?.userId;
const {userId} = opts;
Member

I en ningun cas es opts.httpCtx.active?.accessToken?.userId ?

I en ningun cas es `opts.httpCtx.active?.accessToken?.userId` ?
Author
Member

En el archivo loopback>common>mixins>loggable, se ha aplicado cambios para recoger directamente el userId. Cambio realizado por Juan.

En el archivo loopback>common>mixins>loggable, se ha aplicado cambios para recoger directamente el userId. Cambio realizado por Juan.
@ -0,0 +1,34 @@
module.exports = Self => {
Self.remoteMethod('delete', {
description: 'Delete an ItemBarcode by itemFk and code',
accessType: 'READ',
Member

Seria WRITE

Seria WRITE
jorgep marked this conversation as resolved
@ -0,0 +26,4 @@
if (typeof options == 'object')
Object.assign(myOptions, options);
await Self.destroyAll({
Member

No se pot fer directe contra el model?

DELETE .../ItemBarcodes?barcode=...&itemFk=...

No se pot fer directe contra el model? DELETE `.../ItemBarcodes?barcode=...&itemFk=...`
Author
Member

Solo se puede por id

Solo se puede por id
alexm marked this conversation as resolved
@ -0,0 +47,4 @@
return itemShelvings.map(itemShelving => {
const item = itemShelving.item();
const carros = alternatives.filter(alternative => alternative.itemFk == itemShelving.itemFk);
Member

Mejor variable en ingles

Mejor variable en ingles
jorgep marked this conversation as resolved
@ -0,0 +86,4 @@
await Self.updateTracking(ctx, saleFk, originalQuantity, code, isChecked, null, isScanned, myOptions);
try {
const buy = await models.Buy.findById(buyFk, myOptions);
Member

const {itemOriginalFk}

const {itemOriginalFk}
jorgep marked this conversation as resolved
jorgep added 1 commit 2024-03-04 08:26:39 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
854a9b62af
fix: refs #6276 refactor updateInTime & changes
jorgep requested review from alexm 2024-03-04 08:29:14 +00:00
jorgep added 1 commit 2024-03-04 08:35:15 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
9cff06ae3d
feat: refs #6276 acl itemBarcode delete
jgallego approved these changes 2024-03-04 11:16:00 +00:00
jorgep added 1 commit 2024-03-05 09:14:29 +00:00
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
fc08adc064
fix: refs #6276 options
jorgep added 1 commit 2024-03-05 09:16:46 +00:00
alexm approved these changes 2024-03-06 08:27:15 +00:00
alexm added 1 commit 2024-03-06 08:27:45 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
4f3678d7df
Merge branch 'dev' into 6276-createNewWarehouse
jorgep added 2 commits 2024-03-06 10:00:13 +00:00
jorgep added 1 commit 2024-03-06 10:36:08 +00:00
sergiodt refused to review 2024-03-06 11:27:09 +00:00
sergiodt approved these changes 2024-03-06 11:27:48 +00:00
jorgep merged commit 9c3facb072 into dev 2024-03-06 11:32:11 +00:00
jorgep deleted branch 6276-createNewWarehouse 2024-03-06 11:32:11 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
5 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#1850
No description provided.