#6924 Notify absences only to department boss #3175
No reviewers
Labels
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: verdnatura/salix#3175
Loading…
Reference in New Issue
No description provided.
Delete Branch "6924-NotifyOnlyToBoss"
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?
@ -121,3 +122,3 @@
const department = labour.department();
if (department && department.notificationEmail) {
if (department) {
Diria que ja no cal mirar ni el department
No cal la relacio en department:
@ -61,3 +61,1 @@
const labour = await models.WorkerLabour.findById(args.businessFk, {
include: {relation: 'department'}
}, myOptions);
const labour = await models.WorkerLabour.findById(args.businessFk, myOptions);
findById espera 3 parametres (o 2 si no vols gastar options)
En este cas seria:
const labour = await models.WorkerLabour.findById(args.businessFk, null, myOptions);
Pero hi ha que especificar sempre els fields, entonces seria (per el que he vist, revisau per si acas)
const labour = await models.WorkerLabour.findById(args.businessFk, {fields: ['started', 'ended', 'businessFk']}, myOptions);