feature/IO-2973-Created-By-Tasks - Merge in release, fix conflicts
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -97,11 +97,11 @@ const getEndpoints = (bodyshop) =>
|
|||||||
: "https://romeonline.io"
|
: "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);
|
const endPoints = getEndpoints(bodyshop);
|
||||||
return {
|
return {
|
||||||
header: title,
|
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>`,
|
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
|
dateLine
|
||||||
};
|
};
|
||||||
@@ -179,11 +179,11 @@ const taskAssignedEmail = async (req, res) => {
|
|||||||
newTask.priority,
|
newTask.priority,
|
||||||
newTask.description,
|
newTask.description,
|
||||||
newTask.due_date,
|
newTask.due_date,
|
||||||
newTask.created_by,
|
|
||||||
tasks_by_pk.bodyshop,
|
tasks_by_pk.bodyshop,
|
||||||
tasks_by_pk.job,
|
tasks_by_pk.job,
|
||||||
newTask.id,
|
newTask.id,
|
||||||
dateLine
|
dateLine,
|
||||||
|
newTask.created_by
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
null,
|
null,
|
||||||
@@ -267,11 +267,11 @@ const tasksRemindEmail = async (req, res) => {
|
|||||||
onlyTask.priority,
|
onlyTask.priority,
|
||||||
onlyTask.description,
|
onlyTask.description,
|
||||||
onlyTask.due_date,
|
onlyTask.due_date,
|
||||||
onlyTask.created_by,
|
|
||||||
onlyTask.bodyshop,
|
onlyTask.bodyshop,
|
||||||
onlyTask.job,
|
onlyTask.job,
|
||||||
onlyTask.id,
|
onlyTask.id,
|
||||||
dateLine
|
dateLine,
|
||||||
|
onlyTask.created_by
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2506,6 +2506,7 @@ exports.QUERY_TASK_BY_ID = `
|
|||||||
query QUERY_TASK_BY_ID($id: uuid!) {
|
query QUERY_TASK_BY_ID($id: uuid!) {
|
||||||
tasks_by_pk(id: $id) {
|
tasks_by_pk(id: $id) {
|
||||||
id
|
id
|
||||||
|
created_by
|
||||||
assigned_to_employee{
|
assigned_to_employee{
|
||||||
id
|
id
|
||||||
user_email
|
user_email
|
||||||
|
|||||||
Reference in New Issue
Block a user