feat: refs #7343 delete sending to user #3334

Merged
ivanm merged 3 commits from 7343-modifyDriverRouteEmail into dev 2025-01-08 12:17:50 +00:00
Member
No description provided.
ivanm added 1 commit 2025-01-02 17:05:55 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
8822fde7fb
feat: refs #7343 delete sending to user
ivanm requested review from guillermo 2025-01-03 08:09:59 +00:00
guillermo requested changes 2025-01-07 06:30:22 +00:00
Dismissed
guillermo left a comment
Member

Si ho has provat en local i funciona ok avant

Si ho has provat en local i funciona ok avant
@ -34,3 +34,1 @@
const models = Self.app.models;
const {workerFk, agencyMode} = await Self.findById(id, {
fields: ['workerFk', 'agencyModeFk'],
const {agencyMode} = await Self.findById(id, {
Member

De la linea 34 a la 40 crec que pots unificar-ho

De la linea 34 a la 40 crec que pots unificar-ho
Author
Member

He intentat unificar-ho de varies formes, he intentat fer un scope de reportMail per a que només carregue eixa columna, però no he trobat la forma. He anat a la api varies vegades i sempre m'ha donat error. Amb el codi com el tens la api respon correctament. Si tens alguna idea per a unificar més eixes linies m'ho dius i faig la prova.

He intentat unificar-ho de varies formes, he intentat fer un scope de reportMail per a que només carregue eixa columna, però no he trobat la forma. He anat a la api varies vegades i sempre m'ha donat error. Amb el codi com el tens la api respon correctament. Si tens alguna idea per a unificar més eixes linies m'ho dius i faig la prova.
Member

Has probado esto?

const route = await Self.findById(id, {
    fields: ['agencyModeFk'],
    include: {relation: 'agencyMode'}
});

ctx.args.recipient = route?.agencyMode?.reportMail;
Has probado esto? ``` const route = await Self.findById(id, { fields: ['agencyModeFk'], include: {relation: 'agencyMode'} }); ctx.args.recipient = route?.agencyMode?.reportMail; ```
Author
Member

Dona error 400 amb el codi que m'has passat:

{
  "error": {
    "statusCode": 400,
    "name": "UserError",
    "message": "Es necesario un email",
    "translateArgs": [],
    "stack": "UserError: Es necesario un email\n    at Self.driverRouteEmail (/home/ivanm/Projects/salix/modules/route/back/methods/route/driverRouteEmail.js:40:40)"
  }
}
Dona error 400 amb el codi que m'has passat: ``` { "error": { "statusCode": 400, "name": "UserError", "message": "Es necesario un email", "translateArgs": [], "stack": "UserError: Es necesario un email\n at Self.driverRouteEmail (/home/ivanm/Projects/salix/modules/route/back/methods/route/driverRouteEmail.js:40:40)" } } ```
Member

Pero te has asegurat de que realment tinga email en la db?

Pero te has asegurat de que realment tinga email en la db?
ivanm marked this conversation as resolved
ivanm requested review from guillermo 2025-01-07 16:47:30 +00:00
ivanm added 1 commit 2025-01-07 16:47:46 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
0940a31288
Merge branch 'dev' into 7343-modifyDriverRouteEmail
guillermo approved these changes 2025-01-08 12:15:18 +00:00
ivanm added 1 commit 2025-01-08 12:16:02 +00:00
gitea/salix/pipeline/pr-dev This commit looks good Details
14b88b1ad6
Merge branch 'dev' into 7343-modifyDriverRouteEmail
ivanm merged commit f9666b8e60 into dev 2025-01-08 12:17:50 +00:00
ivanm deleted branch 7343-modifyDriverRouteEmail 2025-01-08 12:17:50 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
2 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#3334
No description provided.