Compare commits
1 Commits
chore/adde
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8d17490f7e |
@@ -265,8 +265,8 @@ export default class ReportingMembersController extends ReportingControllerBase
|
|||||||
(SELECT color_code FROM project_phases WHERE id = (SELECT phase_id FROM task_phase WHERE task_id = t.id)) AS phase_color,
|
(SELECT color_code FROM project_phases WHERE id = (SELECT phase_id FROM task_phase WHERE task_id = t.id)) AS phase_color,
|
||||||
|
|
||||||
(total_minutes * 60) AS total_minutes,
|
(total_minutes * 60) AS total_minutes,
|
||||||
(SELECT SUM(time_spent) FROM task_work_log WHERE task_id = t.id AND ta.team_member_id = $1) AS time_logged,
|
(SELECT SUM(time_spent) FROM task_work_log twl WHERE twl.task_id = t.id AND twl.user_id = (SELECT user_id FROM team_members WHERE id = $1)) AS time_logged,
|
||||||
((SELECT SUM(time_spent) FROM task_work_log WHERE task_id = t.id AND ta.team_member_id = $1) - (total_minutes * 60)) AS overlogged_time`;
|
((SELECT SUM(time_spent) FROM task_work_log twl WHERE twl.task_id = t.id AND twl.user_id = (SELECT user_id FROM team_members WHERE id = $1)) - (total_minutes * 60)) AS overlogged_time`;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected static getActivityLogsOverdue(key: string, dateRange: string[]) {
|
protected static getActivityLogsOverdue(key: string, dateRange: string[]) {
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export async function on_quick_assign_or_remove(_io: Server, socket: Socket, dat
|
|||||||
assign_type: type
|
assign_type: type
|
||||||
});
|
});
|
||||||
|
|
||||||
if (userId !== assignment.user_id) {
|
if (assignment && userId !== assignment.user_id) {
|
||||||
NotificationsService.createTaskUpdate(
|
NotificationsService.createTaskUpdate(
|
||||||
type,
|
type,
|
||||||
userId as string,
|
userId as string,
|
||||||
@@ -109,6 +109,11 @@ export async function assignMemberIfNot(taskId: string, userId: string, teamId:
|
|||||||
const result = await db.query(q, [taskId, userId, teamId]);
|
const result = await db.query(q, [taskId, userId, teamId]);
|
||||||
const [data] = result.rows;
|
const [data] = result.rows;
|
||||||
|
|
||||||
|
if (!data) {
|
||||||
|
log_error(new Error(`No team member found for userId: ${userId}, teamId: ${teamId}`));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const body = {
|
const body = {
|
||||||
team_member_id: data.team_member_id,
|
team_member_id: data.team_member_id,
|
||||||
project_id: data.project_id,
|
project_id: data.project_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user