feature/IO-2973-Created-By-Tasks - Merge in release, fix conflicts

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-10-25 11:50:11 -07:00
parent 18028a70ab
commit e7909205d1
2 changed files with 7 additions and 6 deletions

View File

@@ -97,11 +97,11 @@ const getEndpoints = (bodyshop) =>
: "https://romeonline.io"
});
const generateTemplateArgs = (title, priority, description, dueDate, createdBy, bodyshop, job, taskId, dateLine) => {
const generateTemplateArgs = (title, priority, description, dueDate, bodyshop, job, taskId, dateLine, createdBy) => {
const endPoints = getEndpoints(bodyshop);
return {
header: title,
subHeader: `Body Shop: ${bodyshop.shopname} | Priority: ${formatPriority(priority)} | Due on: ${formatDate(dueDate)} | Created by: ${createdBy || "N/A"}`,
subHeader: `Body Shop: ${bodyshop.shopname} | Priority: ${formatPriority(priority)} ${formatDate(dueDate)} | Created By: ${createdBy || "N/A"}`,
body: `Reference: ${job.ro_number || "N/A"} | ${job.ownr_co_nm ? job.ownr_co_nm : `${job.ownr_fn || ""} ${job.ownr_ln || ""}`.trim()} | ${`${job.v_model_yr || ""} ${job.v_make_desc || ""} ${job.v_model_desc || ""}`.trim()}<br>${description ? description.concat("<br>") : ""}<a href="${endPoints}/manage/tasks/alltasks?taskid=${taskId}">View this task.</a>`,
dateLine
};
@@ -179,11 +179,11 @@ const taskAssignedEmail = async (req, res) => {
newTask.priority,
newTask.description,
newTask.due_date,
newTask.created_by,
tasks_by_pk.bodyshop,
tasks_by_pk.job,
newTask.id,
dateLine
dateLine,
newTask.created_by
)
),
null,
@@ -267,11 +267,11 @@ const tasksRemindEmail = async (req, res) => {
onlyTask.priority,
onlyTask.description,
onlyTask.due_date,
onlyTask.created_by,
onlyTask.bodyshop,
onlyTask.job,
onlyTask.id,
dateLine
dateLine,
onlyTask.created_by
)
);
}