- Final Push Prior to Live Testing
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -266,9 +266,6 @@ export function TaskUpsertModalComponent({
|
||||
</Form.Item>
|
||||
</Col>
|
||||
<Col span={8}>
|
||||
<Form.Item name="remind_at_sent" hidden>
|
||||
<Input />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
label={t("tasks.fields.remind_at")}
|
||||
name="remind_at"
|
||||
|
||||
@@ -147,10 +147,17 @@ export function TaskUpsertModalContainer({ bodyshop, currentUser, taskUpsert, to
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
const handleExistingTask = async (id, jobId, values) => {
|
||||
const task = replaceUndefinedWithNull(values);
|
||||
|
||||
// Remind at is dirty so lets clear remind_at_sent
|
||||
if (task?.remind_at) {
|
||||
task.remind_at_sent = null;
|
||||
}
|
||||
|
||||
const taskObject = {
|
||||
variables: {
|
||||
taskId: id,
|
||||
task: replaceUndefinedWithNull(values)
|
||||
task
|
||||
}
|
||||
};
|
||||
|
||||
@@ -228,7 +235,6 @@ 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) {
|
||||
|
||||
@@ -15,7 +15,6 @@ export const PARTIAL_TASK_FIELDS = gql`
|
||||
completed
|
||||
completed_at
|
||||
remind_at
|
||||
remind_at_sent
|
||||
priority
|
||||
job {
|
||||
id
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
- name: Task Reminders
|
||||
webhook: https://worktest.home.irony.online/tasks-remind-handler
|
||||
schedule: '*/1 * * * *'
|
||||
schedule: '*/15 * * * *'
|
||||
include_in_metadata: true
|
||||
payload: {}
|
||||
headers:
|
||||
|
||||
@@ -5810,7 +5810,7 @@
|
||||
interval_sec: 10
|
||||
num_retries: 3
|
||||
timeout_sec: 60
|
||||
webhook_from_env: HASURA_API_URL
|
||||
webhook: https://worktest.home.irony.online
|
||||
headers:
|
||||
- name: event-secret
|
||||
value_from_env: EVENT_SECRET
|
||||
|
||||
@@ -199,10 +199,11 @@ const tasksRemindEmail = async (req, res) => {
|
||||
|
||||
if (emailData?.subject && emailData?.html) {
|
||||
// Send Email
|
||||
sendMail("remind", emailData.to, emailData.subject, emailData.html, taskIds, (taskIds) => {});
|
||||
client.request(UPDATE_TASKS_REMIND_AT_SENT, {
|
||||
taskIds,
|
||||
now: moment().toISOString()
|
||||
sendMail("remind", emailData.to, emailData.subject, emailData.html, taskIds, (taskIds) => {
|
||||
client.request(UPDATE_TASKS_REMIND_AT_SENT, {
|
||||
taskIds,
|
||||
now: moment().toISOString()
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user