diff --git a/.claude/settings.local.json b/.claude/settings.local.json
deleted file mode 100644
index d21cf3c3..00000000
--- a/.claude/settings.local.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "permissions": {
- "allow": [
- "Bash(find:*)",
- "Bash(npm run build:*)",
- "Bash(npm run type-check:*)",
- "Bash(npm run:*)",
- "Bash(move:*)",
- "Bash(mv:*)",
- "Bash(grep:*)",
- "Bash(rm:*)",
- "Bash(rm:*)"
- ],
- "deny": []
- }
-}
\ No newline at end of file
diff --git a/.cursor/rules/antd-components.mdc b/.cursor/rules/antd-components.mdc
deleted file mode 100644
index 7db5eb05..00000000
--- a/.cursor/rules/antd-components.mdc
+++ /dev/null
@@ -1,237 +0,0 @@
----
-alwaysApply: true
----
-# Ant Design Import Rules for Worklenz
-
-## 🚨 CRITICAL: Always Use Centralized Imports
-
-**NEVER import Ant Design components directly from 'antd' or '@ant-design/icons'**
-
-### ✅ Correct Import Pattern
-```typescript
-import { Button, Input, Select, EditOutlined, PlusOutlined } from '@antd-imports';
-// or
-import { Button, Input, Select, EditOutlined, PlusOutlined } from '@/shared/antd-imports';
-```
-
-### ❌ Forbidden Import Patterns
-```typescript
-// NEVER do this:
-import { Button, Input, Select } from 'antd';
-import { EditOutlined, PlusOutlined } from '@ant-design/icons';
-```
-
-## Why This Rule Exists
-
-### Benefits of Centralized Imports:
-- **Better Tree-Shaking**: Optimized bundle size through centralized management
-- **Consistent React Context**: Proper context sharing across components
-- **Type Safety**: Centralized TypeScript definitions
-- **Maintainability**: Single source of truth for all Ant Design imports
-- **Performance**: Reduced bundle size and improved loading times
-
-## What's Available in `@antd-imports`
-
-### Core Components
-- **Layout**: Layout, Row, Col, Flex, Divider, Space
-- **Navigation**: Menu, Tabs, Breadcrumb, Pagination
-- **Data Entry**: Input, Select, DatePicker, TimePicker, Form, Checkbox, InputNumber
-- **Data Display**: Table, List, Card, Tag, Avatar, Badge, Progress, Statistic
-- **Feedback**: Modal, Drawer, Alert, Message, Notification, Spin, Skeleton, Result
-- **Other**: Button, Typography, Tooltip, Popconfirm, Dropdown, ConfigProvider
-
-### Icons
-Common icons including: EditOutlined, DeleteOutlined, PlusOutlined, MoreOutlined, CheckOutlined, CloseOutlined, CalendarOutlined, UserOutlined, TeamOutlined, and many more.
-
-### Utilities
-- **appMessage**: Centralized message utility
-- **appNotification**: Centralized notification utility
-- **antdConfig**: Default Ant Design configuration
-- **taskManagementAntdConfig**: Task-specific configuration
-
-## Implementation Guidelines
-
-### When Creating New Components:
-1. **Always** import from `@/shared/antd-imports`
-2. Use `appMessage` and `appNotification` for user feedback
-3. Apply `antdConfig` for consistent styling
-4. Use `taskManagementAntdConfig` for task-related components
-
-### When Refactoring Existing Code:
-1. Replace direct 'antd' imports with `@/shared/antd-imports`
-2. Replace direct '@ant-design/icons' imports with `@/shared/antd-imports`
-3. Update any custom message/notification calls to use the utilities
-
-### File Location
-The centralized import file is located at: `worklenz-frontend/src/shared/antd-imports.ts`
-
-## Examples
-
-### Component Creation
-```typescript
-import React from 'react';
-import { Button, Input, Modal, EditOutlined, appMessage } from '@antd-imports';
-
-const MyComponent = () => {
- const handleClick = () => {
- appMessage.success('Operation completed!');
- };
-
- return (
- } onClick={handleClick}>
- Edit Item
-
- );
-};
-```
-
-### Form Implementation
-```typescript
-import { Form, Input, Select, Button, DatePicker } from '@antd-imports';
-
-const MyForm = () => {
- return (
-
-
-
-
-
-
-
-
-
-
- );
-};
-```
-
-## Enforcement
-
-This rule is **MANDATORY** and applies to:
-- All new component development
-- All code refactoring
-- All bug fixes
-- All feature implementations
-
-**Violations will result in code review rejection.**
-
-### File Path:
-The centralized file is located at: `worklenz-frontend/src/shared/antd-imports.ts`
-# Ant Design Import Rules for Worklenz
-
-## 🚨 CRITICAL: Always Use Centralized Imports
-
-**NEVER import Ant Design components directly from 'antd' or '@ant-design/icons'**
-
-### ✅ Correct Import Pattern
-```typescript
-import { Button, Input, Select, EditOutlined, PlusOutlined } from '@antd-imports';
-// or
-import { Button, Input, Select, EditOutlined, PlusOutlined } from '@/shared/antd-imports';
-```
-
-### ❌ Forbidden Import Patterns
-```typescript
-// NEVER do this:
-import { Button, Input, Select } from 'antd';
-import { EditOutlined, PlusOutlined } from '@ant-design/icons';
-```
-
-## Why This Rule Exists
-
-### Benefits of Centralized Imports:
-- **Better Tree-Shaking**: Optimized bundle size through centralized management
-- **Consistent React Context**: Proper context sharing across components
-- **Type Safety**: Centralized TypeScript definitions
-- **Maintainability**: Single source of truth for all Ant Design imports
-- **Performance**: Reduced bundle size and improved loading times
-
-## What's Available in `@antd-imports`
-
-### Core Components
-- **Layout**: Layout, Row, Col, Flex, Divider, Space
-- **Navigation**: Menu, Tabs, Breadcrumb, Pagination
-- **Data Entry**: Input, Select, DatePicker, TimePicker, Form, Checkbox, InputNumber
-- **Data Display**: Table, List, Card, Tag, Avatar, Badge, Progress, Statistic
-- **Feedback**: Modal, Drawer, Alert, Message, Notification, Spin, Skeleton, Result
-- **Other**: Button, Typography, Tooltip, Popconfirm, Dropdown, ConfigProvider
-
-### Icons
-Common icons including: EditOutlined, DeleteOutlined, PlusOutlined, MoreOutlined, CheckOutlined, CloseOutlined, CalendarOutlined, UserOutlined, TeamOutlined, and many more.
-
-### Utilities
-- **appMessage**: Centralized message utility
-- **appNotification**: Centralized notification utility
-- **antdConfig**: Default Ant Design configuration
-- **taskManagementAntdConfig**: Task-specific configuration
-
-## Implementation Guidelines
-
-### When Creating New Components:
-1. **Always** import from `@antd-imports` or `@/shared/antd-imports`
-2. Use `appMessage` and `appNotification` for user feedback
-3. Apply `antdConfig` for consistent styling
-4. Use `taskManagementAntdConfig` for task-related components
-
-### When Refactoring Existing Code:
-1. Replace direct 'antd' imports with `@antd-imports`
-2. Replace direct '@ant-design/icons' imports with `@antd-imports`
-3. Update any custom message/notification calls to use the utilities
-
-### File Location
-The centralized import file is located at: `worklenz-frontend/src/shared/antd-imports.ts`
-
-## Examples
-
-### Component Creation
-```typescript
-import React from 'react';
-import { Button, Input, Modal, EditOutlined, appMessage } from '@antd-imports';
-
-const MyComponent = () => {
- const handleClick = () => {
- appMessage.success('Operation completed!');
- };
-
- return (
- } onClick={handleClick}>
- Edit Item
-
- );
-};
-```
-
-### Form Implementation
-```typescript
-import { Form, Input, Select, Button, DatePicker } from '@antd-imports';
-
-const MyForm = () => {
- return (
-
-
-
-
-
-
-
-
-
-
- );
-};
-```
-
-## Enforcement
-
-This rule is **MANDATORY** and applies to:
-- All new component development
-- All code refactoring
-- All bug fixes
-- All feature implementations
-
-**Violations will result in code review rejection.**
-
-### File Path:
-The centralized file is located at: `worklenz-frontend/src/shared/antd-imports.ts`
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index d255be7f..942c9b08 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,8 @@ lerna-debug.log*
.vscode/*
!.vscode/extensions.json
.idea/
+.cursor/
+.claude/
.DS_Store
*.suo
*.ntvs*
diff --git a/worklenz-backend/src/controllers/reporting/reporting-members-controller.ts b/worklenz-backend/src/controllers/reporting/reporting-members-controller.ts
index 5789bf02..60a3da76 100644
--- a/worklenz-backend/src/controllers/reporting/reporting-members-controller.ts
+++ b/worklenz-backend/src/controllers/reporting/reporting-members-controller.ts
@@ -324,8 +324,8 @@ export default class ReportingMembersController extends ReportingControllerBaseW
(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,
- (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 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)) 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)) - (total_minutes * 60)) AS overlogged_time`;
}
protected static getActivityLogsOverdue(key: string, dateRange: string[]) {
diff --git a/worklenz-backend/src/socket.io/commands/on-quick-assign-or-remove.ts b/worklenz-backend/src/socket.io/commands/on-quick-assign-or-remove.ts
index 4551bd72..6c641530 100644
--- a/worklenz-backend/src/socket.io/commands/on-quick-assign-or-remove.ts
+++ b/worklenz-backend/src/socket.io/commands/on-quick-assign-or-remove.ts
@@ -75,7 +75,7 @@ export async function on_quick_assign_or_remove(_io: Server, socket: Socket, dat
assign_type: type
});
- if (userId !== assignment.user_id) {
+ if (assignment && userId !== assignment.user_id) {
NotificationsService.createTaskUpdate(
type,
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 [data] = result.rows;
+ if (!data) {
+ log_error(new Error(`No team member found for userId: ${userId}, teamId: ${teamId}`));
+ return;
+ }
+
const body = {
team_member_id: data.team_member_id,
project_id: data.project_id,