|
|
|
|
@@ -168,30 +168,6 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (isAssignedToDirty) {
|
|
|
|
|
// // TODO This is being moved serverside
|
|
|
|
|
// axios
|
|
|
|
|
// .post("/sendemail", {
|
|
|
|
|
// from: {
|
|
|
|
|
// name: bodyshop.shopname,
|
|
|
|
|
// address: bodyshop.email
|
|
|
|
|
// },
|
|
|
|
|
// ReplyTo: {
|
|
|
|
|
// Email: "noreply@imex.online"
|
|
|
|
|
// },
|
|
|
|
|
// to: values.assigned_to,
|
|
|
|
|
// subject: `A Task has been re-assigned to you on ${bodyshop.shopname} - ${values.title}`,
|
|
|
|
|
// templateStrings: {
|
|
|
|
|
// header: values.title,
|
|
|
|
|
// subHeader: `Assigned by ${currentUser.email} ${values.due_at ? `| Due on ${dayjs(values.due_at).format("MM/DD/YYYY")}` : ""}`,
|
|
|
|
|
// body: `<a href="${window.location.protocol}//${window.location.host}/manage/tasks/alltasks?taskid=${existingTask.id}">Please sign in to your account to view the task details.</a>`
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// .catch((e) =>
|
|
|
|
|
// console.error(`Something went wrong sending email to Assigned party on Task creation. ${e.message || ""}`)
|
|
|
|
|
// );
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
notification["success"]({
|
|
|
|
|
message: t("tasks.successes.updated")
|
|
|
|
|
});
|
|
|
|
|
@@ -233,30 +209,6 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
|
|
|
|
form.resetFields();
|
|
|
|
|
toggleModalVisible();
|
|
|
|
|
|
|
|
|
|
// send notification to the assigned user
|
|
|
|
|
// TODO: This is being moved serverside
|
|
|
|
|
// axios
|
|
|
|
|
// .post("/sendemail", {
|
|
|
|
|
// from: {
|
|
|
|
|
// name: bodyshop.shopname,
|
|
|
|
|
// address: bodyshop.email
|
|
|
|
|
// },
|
|
|
|
|
// replyTo: {
|
|
|
|
|
// Email: "noreply@imex.online"
|
|
|
|
|
// },
|
|
|
|
|
// to: values.assigned_to,
|
|
|
|
|
// subject: `A new Task has been assigned to you on ${bodyshop.shopname} - ${values.title}`,
|
|
|
|
|
// templateName: "taskAssigned",
|
|
|
|
|
// templateStrings: {
|
|
|
|
|
// header: values.title,
|
|
|
|
|
// subHeader: `Assigned by ${currentUser.email} ${values.due_at ? `| Due on ${dayjs(values.due_at).format("MM/DD/YYYY")}` : ""}`,
|
|
|
|
|
// body: `<a href="${window.location.protocol}//${window.location.host}/manage/tasks/alltasks?taskid=${newTaskID}">Please sign to your account to view the task details.</a>`
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
// .catch((e) =>
|
|
|
|
|
// console.error(`Something went wrong sending email to Assigned party on Task edit. ${e.message || ""}`)
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
|
|
notification["success"]({
|
|
|
|
|
message: t("tasks.successes.created")
|
|
|
|
|
});
|
|
|
|
|
@@ -276,6 +228,7 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
|
|
|
|
}
|
|
|
|
|
return acc;
|
|
|
|
|
}, {});
|
|
|
|
|
console.dir(dirtyValues?.remind_at_sent);
|
|
|
|
|
try {
|
|
|
|
|
await handleExistingTask(taskSource.id, taskSource.jobid, dirtyValues);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|