fixes #5137 Avisos impresoras cuando hayan seleccionado una que no es principal #1514
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#1514
Loading…
Reference in New Issue
No description provided.
Delete Branch "5137-aviso-impresora"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ -0,0 +12,4 @@
const userId = ctx.options.accessToken.userId;
const user = await models.VnUser.findById(userId, {fields: ['nickname']}, options);
const labeler = await models.Printer.findById(instance.labelerFk, {fields: ['name']}, options);
const mainPrinter = await models.Printer.findById(sector.mainPrinterFk, {fields: ['name']}, options);
Aquestes consultes deu de ferles el informe.
@ -0,0 +21,4 @@
'labeler': `#${instance.labelerFk} ${labeler.name}`,
'sector': `#${instance.sectorFk} ${sector.description}`,
'mainPrinter': `#${sector.mainPrinterFk} ${mainPrinter.name}`,
'worker': `#${userId} ${user.nickname}`
El encarregat de formatejar i obtindre les dades per a mostrarles deu de ser el informe, en params hem de passar les dades estrictament necesaries.