Update reminder interval and resolve server side.
This commit is contained in:
@@ -38,7 +38,13 @@ export function TaskListContainer({
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const searchParams = queryString.parse(useLocation().search);
|
||||
const { page, sortcolumn, sortorder, deleted, completed, mine } = searchParams;
|
||||
const {
|
||||
page,
|
||||
sortcolumn,
|
||||
sortorder,
|
||||
deleted,
|
||||
completed //mine
|
||||
} = searchParams;
|
||||
const dispatch = useDispatch();
|
||||
|
||||
const { loading, error, data, refetch } = useQuery(query[Object.keys(query)[0]], {
|
||||
|
||||
@@ -270,7 +270,7 @@ export function TaskUpsertModalComponent({
|
||||
rules={[
|
||||
{
|
||||
validator: (_, value) => {
|
||||
if (!value || existingTask?.remind_at === value || dayjs(value).isAfter(dayjs().add(30, "minute"))) {
|
||||
if (!value || existingTask?.remind_at === value || dayjs(value).isAfter(dayjs().add(15, "minute"))) {
|
||||
return Promise.resolve();
|
||||
}
|
||||
return Promise.reject(new Error(t("tasks.validation.remind_at_error_message")));
|
||||
|
||||
@@ -202,7 +202,7 @@ const tasksRemindEmail = async (req, res) => {
|
||||
|
||||
// Group tasks by assigned_to, to avoid sending multiple emails to the same recipient.
|
||||
const groupedTasks = tasksRequest.tasks.reduce((acc, task) => {
|
||||
const key = task.assigned_to_email.user_email;
|
||||
const key = task.assigned_to_employee.user_email;
|
||||
if (!acc[key]) {
|
||||
acc[key] = [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user