Compare commits

..

9 Commits

Author SHA1 Message Date
chamiakJ
b105661623 feat(migrations): add initial migration setup and performance indexes
- Introduced .pgmrc.json and migrate.json for node-pg-migrate configuration.
- Added multiple migration files to create performance indexes for tasks and related entities.
- Implemented functions for optimized task sorting and manual progress tracking.
- Updated package.json to include migration scripts and dependencies for node-pg-migrate.
- Created README.md for migration guidelines and best practices.
2025-07-22 22:06:07 +05:30
chamikaJ
e3c002b088 style(task-list): enhance styling for task list components
- Updated the EmptyGroupDropZone component to include top and bottom borders for better visual separation.
- Adjusted the AddTaskRow component by removing the bottom border for a cleaner appearance.
2025-07-22 17:25:37 +05:30
chamikaJ
3beed3dae6 feat(auth): update password requirements and localization for signup
- Updated password label and placeholder to "Password" and "Enter your password" across multiple languages.
- Added password guideline for minimum requirements in English, German, Spanish, Portuguese, Albanian, and Chinese.
- Introduced maximum character requirement for passwords in all supported languages.
- Enhanced password validation messages to improve user experience during signup.
2025-07-22 17:25:25 +05:30
chamikaJ
33aace71c8 refactor(tasks): improve code readability and formatting in tasks-controller-v2
- Refactored import statements for better organization and clarity.
- Enhanced formatting of methods and conditionals for improved readability.
- Updated task filtering methods to maintain consistent formatting and style.
- Added performance logging for deprecated methods to assist in monitoring usage.
- Cleaned up unnecessary comments and improved inline documentation for better understanding.
2025-07-22 17:12:06 +05:30
chamikaJ
354b9422ed feat(tasks): add color_code_dark to task groups and enhance task list display
- Introduced color_code_dark property to task groups for improved theming support.
- Updated task list components to utilize color_code_dark based on the current theme mode.
- Enhanced empty state handling in task list to dynamically create an unmapped group for better user experience.
- Refactored task management slice to support dynamic group creation for unmapped tasks.
2025-07-22 16:08:41 +05:30
chamikaJ
256f1eb3a9 feat(task-list): enhance empty state display in task list component
- Added EmptyListPlaceholder component to visually represent the empty state in the task list.
- Adjusted styling and layout for the empty group drop zone to improve user experience.
- Removed unused progress properties from the task group data structure for cleaner code.
2025-07-22 12:46:09 +05:30
chamikaJ
5f86ba6b13 feat(auth): implement new authentication pages and refactor routes
- Added new authentication pages: LoginPage, SignupPage, ForgotPasswordPage, AuthenticatingPage, LoggingOutPage, and VerifyResetEmailPage.
- Refactored auth routes to use updated component names for better consistency and clarity.
- Enhanced user experience with improved loading states and error handling across authentication processes.
2025-07-22 12:27:05 +05:30
Chamika J
a112d39321 Merge pull request #272 from Worklenz/development
Development
2025-07-15 17:20:59 +05:30
Chamika J
4788294bc4 Merge pull request #271 from Worklenz/release/v2.1.2
Release/v2.1.2
2025-07-15 17:20:25 +05:30
40 changed files with 1786 additions and 1173 deletions

View File

@@ -0,0 +1,3 @@
{
"config-file": "migrate.json"
}

View File

@@ -0,0 +1,149 @@
/* eslint-disable camelcase */
exports.shorthands = undefined;
exports.up = pgm => {
// Composite index for main task filtering
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_project_archived_parent
ON tasks(project_id, archived, parent_task_id)
WHERE archived = FALSE
`);
// Index for status joins
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_status_project
ON tasks(status_id, project_id)
WHERE archived = FALSE
`);
// Index for assignees lookup
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_assignees_task_member
ON tasks_assignees(task_id, team_member_id)
`);
// Index for phase lookup
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_phase_task_phase
ON task_phase(task_id, phase_id)
`);
// Index for subtask counting
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_parent_archived
ON tasks(parent_task_id, archived)
WHERE parent_task_id IS NOT NULL AND archived = FALSE
`);
// Index for labels
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_labels_task_label
ON task_labels(task_id, label_id)
`);
// Index for comments count
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_comments_task
ON task_comments(task_id)
`);
// Index for attachments count
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_attachments_task
ON task_attachments(task_id)
`);
// Index for work log aggregation
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_work_log_task
ON task_work_log(task_id)
`);
// Index for subscribers check
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_subscribers_task
ON task_subscribers(task_id)
`);
// Index for dependencies check
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_dependencies_task
ON task_dependencies(task_id)
`);
// Additional performance indexes
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_dependencies_related
ON task_dependencies(related_task_id)
`);
// Index for custom column values
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_cc_column_values_task
ON cc_column_values(task_id)
`);
// Index for project members lookup
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_project_members_team_project
ON project_members(team_member_id, project_id)
`);
// Index for sorting
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_project_sort
ON tasks(project_id, sort_order)
WHERE archived = FALSE
`);
// Index for roadmap sorting
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_project_roadmap_sort
ON tasks(project_id, roadmap_sort_order)
WHERE archived = FALSE
`);
// Index for user lookup in team members
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_team_members_user_team
ON team_members(user_id, team_id)
WHERE active = TRUE
`);
// Index for task statuses lookup
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_task_statuses_project_category
ON task_statuses(project_id, category_id)
`);
// Index for task priorities lookup
pgm.sql(`
CREATE INDEX CONCURRENTLY IF NOT EXISTS idx_tasks_priority
ON tasks(priority_id)
WHERE archived = FALSE
`);
};
exports.down = pgm => {
// Drop indexes in reverse order
pgm.sql('DROP INDEX IF EXISTS idx_tasks_priority');
pgm.sql('DROP INDEX IF EXISTS idx_task_statuses_project_category');
pgm.sql('DROP INDEX IF EXISTS idx_team_members_user_team');
pgm.sql('DROP INDEX IF EXISTS idx_tasks_project_roadmap_sort');
pgm.sql('DROP INDEX IF EXISTS idx_tasks_project_sort');
pgm.sql('DROP INDEX IF EXISTS idx_project_members_team_project');
pgm.sql('DROP INDEX IF EXISTS idx_cc_column_values_task');
pgm.sql('DROP INDEX IF EXISTS idx_task_dependencies_related');
pgm.sql('DROP INDEX IF EXISTS idx_task_dependencies_task');
pgm.sql('DROP INDEX IF EXISTS idx_task_subscribers_task');
pgm.sql('DROP INDEX IF EXISTS idx_task_work_log_task');
pgm.sql('DROP INDEX IF EXISTS idx_task_attachments_task');
pgm.sql('DROP INDEX IF EXISTS idx_task_comments_task');
pgm.sql('DROP INDEX IF EXISTS idx_task_labels_task_label');
pgm.sql('DROP INDEX IF EXISTS idx_tasks_parent_archived');
pgm.sql('DROP INDEX IF EXISTS idx_task_phase_task_phase');
pgm.sql('DROP INDEX IF EXISTS idx_tasks_assignees_task_member');
pgm.sql('DROP INDEX IF EXISTS idx_tasks_status_project');
pgm.sql('DROP INDEX IF EXISTS idx_tasks_project_archived_parent');
};

View File

@@ -0,0 +1,183 @@
/* eslint-disable camelcase */
exports.shorthands = undefined;
exports.up = pgm => {
// Replace the optimized sort functions to avoid CTE usage in UPDATE statements
pgm.createFunction(
'handle_task_list_sort_between_groups_optimized',
[
{ name: '_from_index', type: 'integer' },
{ name: '_to_index', type: 'integer' },
{ name: '_task_id', type: 'uuid' },
{ name: '_project_id', type: 'uuid' },
{ name: '_batch_size', type: 'integer', default: 100 }
],
{ returns: 'void', language: 'plpgsql', replace: true },
`
DECLARE
_offset INT := 0;
_affected_rows INT;
BEGIN
-- PERFORMANCE OPTIMIZATION: Use direct updates without CTE in UPDATE
IF (_to_index = -1)
THEN
_to_index = COALESCE((SELECT MAX(sort_order) + 1 FROM tasks WHERE project_id = _project_id), 0);
END IF;
-- PERFORMANCE OPTIMIZATION: Batch updates for large datasets
IF _to_index > _from_index
THEN
LOOP
UPDATE tasks
SET sort_order = sort_order - 1
WHERE project_id = _project_id
AND sort_order > _from_index
AND sort_order < _to_index
AND sort_order > _offset
AND sort_order <= _offset + _batch_size;
GET DIAGNOSTICS _affected_rows = ROW_COUNT;
EXIT WHEN _affected_rows = 0;
_offset := _offset + _batch_size;
END LOOP;
UPDATE tasks SET sort_order = _to_index - 1 WHERE id = _task_id AND project_id = _project_id;
END IF;
IF _to_index < _from_index
THEN
_offset := 0;
LOOP
UPDATE tasks
SET sort_order = sort_order + 1
WHERE project_id = _project_id
AND sort_order > _to_index
AND sort_order < _from_index
AND sort_order > _offset
AND sort_order <= _offset + _batch_size;
GET DIAGNOSTICS _affected_rows = ROW_COUNT;
EXIT WHEN _affected_rows = 0;
_offset := _offset + _batch_size;
END LOOP;
UPDATE tasks SET sort_order = _to_index + 1 WHERE id = _task_id AND project_id = _project_id;
END IF;
END
`
);
// Replace the second optimized sort function
pgm.createFunction(
'handle_task_list_sort_inside_group_optimized',
[
{ name: '_from_index', type: 'integer' },
{ name: '_to_index', type: 'integer' },
{ name: '_task_id', type: 'uuid' },
{ name: '_project_id', type: 'uuid' },
{ name: '_batch_size', type: 'integer', default: 100 }
],
{ returns: 'void', language: 'plpgsql', replace: true },
`
DECLARE
_offset INT := 0;
_affected_rows INT;
BEGIN
-- PERFORMANCE OPTIMIZATION: Batch updates for large datasets without CTE in UPDATE
IF _to_index > _from_index
THEN
LOOP
UPDATE tasks
SET sort_order = sort_order - 1
WHERE project_id = _project_id
AND sort_order > _from_index
AND sort_order <= _to_index
AND sort_order > _offset
AND sort_order <= _offset + _batch_size;
GET DIAGNOSTICS _affected_rows = ROW_COUNT;
EXIT WHEN _affected_rows = 0;
_offset := _offset + _batch_size;
END LOOP;
END IF;
IF _to_index < _from_index
THEN
_offset := 0;
LOOP
UPDATE tasks
SET sort_order = sort_order + 1
WHERE project_id = _project_id
AND sort_order >= _to_index
AND sort_order < _from_index
AND sort_order > _offset
AND sort_order <= _offset + _batch_size;
GET DIAGNOSTICS _affected_rows = ROW_COUNT;
EXIT WHEN _affected_rows = 0;
_offset := _offset + _batch_size;
END LOOP;
END IF;
UPDATE tasks SET sort_order = _to_index WHERE id = _task_id AND project_id = _project_id;
END
`
);
// Add simple bulk update function as alternative
pgm.createFunction(
'update_task_sort_orders_bulk',
[{ name: '_updates', type: 'json' }],
{ returns: 'void', language: 'plpgsql', replace: true },
`
DECLARE
_update_record RECORD;
BEGIN
-- Simple approach: update each task's sort_order from the provided array
FOR _update_record IN
SELECT
(item->>'task_id')::uuid as task_id,
(item->>'sort_order')::int as sort_order,
(item->>'status_id')::uuid as status_id,
(item->>'priority_id')::uuid as priority_id,
(item->>'phase_id')::uuid as phase_id
FROM json_array_elements(_updates) as item
LOOP
UPDATE tasks
SET
sort_order = _update_record.sort_order,
status_id = COALESCE(_update_record.status_id, status_id),
priority_id = COALESCE(_update_record.priority_id, priority_id)
WHERE id = _update_record.task_id;
-- Handle phase updates separately since it's in a different table
IF _update_record.phase_id IS NOT NULL THEN
INSERT INTO task_phase (task_id, phase_id)
VALUES (_update_record.task_id, _update_record.phase_id)
ON CONFLICT (task_id) DO UPDATE SET phase_id = _update_record.phase_id;
END IF;
END LOOP;
END
`
);
};
exports.down = pgm => {
// Drop the functions if needed to rollback
pgm.dropFunction('update_task_sort_orders_bulk', [{ name: '_updates', type: 'json' }], { ifExists: true });
pgm.dropFunction('handle_task_list_sort_inside_group_optimized', [
{ name: '_from_index', type: 'integer' },
{ name: '_to_index', type: 'integer' },
{ name: '_task_id', type: 'uuid' },
{ name: '_project_id', type: 'uuid' },
{ name: '_batch_size', type: 'integer' }
], { ifExists: true });
pgm.dropFunction('handle_task_list_sort_between_groups_optimized', [
{ name: '_from_index', type: 'integer' },
{ name: '_to_index', type: 'integer' },
{ name: '_task_id', type: 'uuid' },
{ name: '_project_id', type: 'uuid' },
{ name: '_batch_size', type: 'integer' }
], { ifExists: true });
};

View File

@@ -0,0 +1,99 @@
/* eslint-disable camelcase */
exports.shorthands = undefined;
exports.up = pgm => {
// Add manual progress fields to tasks table
pgm.addColumns('tasks', {
manual_progress: {
type: 'boolean',
default: false,
notNull: false
},
progress_value: {
type: 'integer',
default: null,
notNull: false
},
weight: {
type: 'integer',
default: null,
notNull: false
}
}, { ifNotExists: true });
// Update function to consider manual progress
pgm.createFunction(
'get_task_complete_ratio',
[{ name: '_task_id', type: 'uuid' }],
{ returns: 'json', language: 'plpgsql', replace: true },
`
DECLARE
_parent_task_done FLOAT = 0;
_sub_tasks_done FLOAT = 0;
_sub_tasks_count FLOAT = 0;
_total_completed FLOAT = 0;
_total_tasks FLOAT = 0;
_ratio FLOAT = 0;
_is_manual BOOLEAN = FALSE;
_manual_value INTEGER = NULL;
BEGIN
-- Check if manual progress is set
SELECT manual_progress, progress_value
FROM tasks
WHERE id = _task_id
INTO _is_manual, _manual_value;
-- If manual progress is enabled and has a value, use it directly
IF _is_manual IS TRUE AND _manual_value IS NOT NULL THEN
RETURN JSON_BUILD_OBJECT(
'ratio', _manual_value,
'total_completed', 0,
'total_tasks', 0,
'is_manual', TRUE
);
END IF;
-- Otherwise calculate automatically as before
SELECT (CASE
WHEN EXISTS(SELECT 1
FROM tasks_with_status_view
WHERE tasks_with_status_view.task_id = _task_id
AND is_done IS TRUE) THEN 1
ELSE 0 END)
INTO _parent_task_done;
SELECT COUNT(*) FROM tasks WHERE parent_task_id = _task_id AND archived IS FALSE INTO _sub_tasks_count;
SELECT COUNT(*)
FROM tasks_with_status_view
WHERE parent_task_id = _task_id
AND is_done IS TRUE
INTO _sub_tasks_done;
_total_completed = _parent_task_done + _sub_tasks_done;
_total_tasks = _sub_tasks_count; -- +1 for the parent task
IF _total_tasks > 0 THEN
_ratio = (_total_completed / _total_tasks) * 100;
ELSE
_ratio = _parent_task_done * 100;
END IF;
RETURN JSON_BUILD_OBJECT(
'ratio', _ratio,
'total_completed', _total_completed,
'total_tasks', _total_tasks,
'is_manual', FALSE
);
END
`
);
};
exports.down = pgm => {
// Drop the function first (it depends on the columns)
pgm.dropFunction('get_task_complete_ratio', [{ name: '_task_id', type: 'uuid' }], { ifExists: true });
// Remove the added columns
pgm.dropColumns('tasks', ['manual_progress', 'progress_value', 'weight'], { ifExists: true });
};

View File

@@ -0,0 +1,103 @@
/* eslint-disable camelcase */
exports.shorthands = undefined;
exports.up = pgm => {
// Add new sort order columns for different grouping types
pgm.addColumns('tasks', {
status_sort_order: {
type: 'integer',
default: 0,
notNull: false
},
priority_sort_order: {
type: 'integer',
default: 0,
notNull: false
},
phase_sort_order: {
type: 'integer',
default: 0,
notNull: false
},
member_sort_order: {
type: 'integer',
default: 0,
notNull: false
}
}, { ifNotExists: true });
// Initialize new columns with current sort_order values
pgm.sql(`
UPDATE tasks SET
status_sort_order = sort_order,
priority_sort_order = sort_order,
phase_sort_order = sort_order,
member_sort_order = sort_order
WHERE status_sort_order = 0
OR priority_sort_order = 0
OR phase_sort_order = 0
OR member_sort_order = 0
`);
// Add constraints to ensure non-negative values
pgm.addConstraint('tasks', 'tasks_status_sort_order_check', {
check: 'status_sort_order >= 0'
}, { ifNotExists: true });
pgm.addConstraint('tasks', 'tasks_priority_sort_order_check', {
check: 'priority_sort_order >= 0'
}, { ifNotExists: true });
pgm.addConstraint('tasks', 'tasks_phase_sort_order_check', {
check: 'phase_sort_order >= 0'
}, { ifNotExists: true });
pgm.addConstraint('tasks', 'tasks_member_sort_order_check', {
check: 'member_sort_order >= 0'
}, { ifNotExists: true });
// Add indexes for performance
pgm.createIndex('tasks', ['project_id', 'status_sort_order'], {
name: 'idx_tasks_status_sort_order',
ifNotExists: true
});
pgm.createIndex('tasks', ['project_id', 'priority_sort_order'], {
name: 'idx_tasks_priority_sort_order',
ifNotExists: true
});
pgm.createIndex('tasks', ['project_id', 'phase_sort_order'], {
name: 'idx_tasks_phase_sort_order',
ifNotExists: true
});
pgm.createIndex('tasks', ['project_id', 'member_sort_order'], {
name: 'idx_tasks_member_sort_order',
ifNotExists: true
});
// Add column comments for documentation
pgm.sql("COMMENT ON COLUMN tasks.status_sort_order IS 'Sort order when grouped by status'");
pgm.sql("COMMENT ON COLUMN tasks.priority_sort_order IS 'Sort order when grouped by priority'");
pgm.sql("COMMENT ON COLUMN tasks.phase_sort_order IS 'Sort order when grouped by phase'");
pgm.sql("COMMENT ON COLUMN tasks.member_sort_order IS 'Sort order when grouped by members/assignees'");
};
exports.down = pgm => {
// Drop indexes
pgm.dropIndex('tasks', ['project_id', 'member_sort_order'], { name: 'idx_tasks_member_sort_order', ifExists: true });
pgm.dropIndex('tasks', ['project_id', 'phase_sort_order'], { name: 'idx_tasks_phase_sort_order', ifExists: true });
pgm.dropIndex('tasks', ['project_id', 'priority_sort_order'], { name: 'idx_tasks_priority_sort_order', ifExists: true });
pgm.dropIndex('tasks', ['project_id', 'status_sort_order'], { name: 'idx_tasks_status_sort_order', ifExists: true });
// Drop constraints
pgm.dropConstraint('tasks', 'tasks_member_sort_order_check', { ifExists: true });
pgm.dropConstraint('tasks', 'tasks_phase_sort_order_check', { ifExists: true });
pgm.dropConstraint('tasks', 'tasks_priority_sort_order_check', { ifExists: true });
pgm.dropConstraint('tasks', 'tasks_status_sort_order_check', { ifExists: true });
// Drop columns
pgm.dropColumns('tasks', ['status_sort_order', 'priority_sort_order', 'phase_sort_order', 'member_sort_order'], { ifExists: true });
};

View File

@@ -25,6 +25,13 @@ CREATE TABLE IF NOT EXISTS pg_sessions (
expire TIMESTAMP(6) NOT NULL
);
-- Create pgmigrations table for node-pg-migrate
CREATE TABLE IF NOT EXISTS pgmigrations (
id SERIAL PRIMARY KEY,
name VARCHAR(255) NOT NULL,
run_on TIMESTAMP WITH TIME ZONE NOT NULL
);
CREATE TABLE IF NOT EXISTS project_access_levels (
id UUID DEFAULT uuid_generate_v4() NOT NULL,
name TEXT NOT NULL,

View File

@@ -0,0 +1,22 @@
{
"migrations-dir": "database/pg-migrations",
"migrations-schema": "public",
"migrations-table": "pgmigrations",
"db": {
"user": {
"ENV": "DB_USER"
},
"password": {
"ENV": "DB_PASSWORD"
},
"host": {
"ENV": "DB_HOST"
},
"port": {
"ENV": "DB_PORT"
},
"database": {
"ENV": "DB_NAME"
}
}
}

View File

@@ -33,7 +33,6 @@
"express-rate-limit": "^6.8.0",
"express-session": "^1.17.3",
"express-validator": "^6.15.0",
"grunt-cli": "^1.5.0",
"helmet": "^6.2.0",
"hpp": "^0.2.3",
"http-errors": "^2.0.0",
@@ -116,6 +115,7 @@
"jest": "^28.1.3",
"jest-sonar-reporter": "^2.0.0",
"ncp": "^2.0.0",
"node-pg-migrate": "^8.0.3",
"nodeman": "^1.1.2",
"rimraf": "^6.0.1",
"swagger-jsdoc": "^6.2.8",
@@ -126,7 +126,7 @@
"typescript": "^4.9.5"
},
"engines": {
"node": ">=16.13.0",
"node": ">=20.0.0",
"npm": ">=8.11.0",
"yarn": "WARNING: Please use npm package manager instead of yarn"
}
@@ -6455,30 +6455,12 @@
"dev": true,
"license": "Python-2.0"
},
"node_modules/array-each": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz",
"integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/array-flatten": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz",
"integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==",
"license": "MIT"
},
"node_modules/array-slice": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz",
"integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/array-union": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz",
@@ -6951,6 +6933,7 @@
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz",
"integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==",
"dev": true,
"license": "MIT",
"dependencies": {
"fill-range": "^7.1.1"
@@ -8056,15 +8039,6 @@
"npm": "1.2.8000 || >= 1.4.16"
}
},
"node_modules/detect-file": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz",
"integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/detect-libc": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.4.tgz",
@@ -8924,18 +8898,6 @@
"node": ">=6"
}
},
"node_modules/expand-tilde": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz",
"integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==",
"license": "MIT",
"dependencies": {
"homedir-polyfill": "^1.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/expect": {
"version": "28.1.3",
"resolved": "https://registry.npmjs.org/expect/-/expect-28.1.3.tgz",
@@ -9088,12 +9050,6 @@
"integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==",
"license": "MIT"
},
"node_modules/extend": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz",
"integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==",
"license": "MIT"
},
"node_modules/fast-csv": {
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/fast-csv/-/fast-csv-4.3.6.tgz",
@@ -9222,6 +9178,7 @@
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz",
"integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==",
"dev": true,
"license": "MIT",
"dependencies": {
"to-regex-range": "^5.0.1"
@@ -9287,46 +9244,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/findup-sync": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz",
"integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==",
"license": "MIT",
"dependencies": {
"detect-file": "^1.0.0",
"is-glob": "^4.0.0",
"micromatch": "^4.0.2",
"resolve-dir": "^1.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/fined": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz",
"integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==",
"license": "MIT",
"dependencies": {
"expand-tilde": "^2.0.2",
"is-plain-object": "^2.0.3",
"object.defaults": "^1.1.0",
"object.pick": "^1.2.0",
"parse-filepath": "^1.0.1"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/flagged-respawn": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz",
"integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==",
"license": "MIT",
"engines": {
"node": ">= 0.10"
}
},
"node_modules/flat-cache": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
@@ -9427,27 +9344,6 @@
}
}
},
"node_modules/for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
"integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/for-own": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz",
"integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==",
"license": "MIT",
"dependencies": {
"for-in": "^1.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/foreground-child": {
"version": "3.3.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz",
@@ -9845,48 +9741,6 @@
"node": ">= 0.10"
}
},
"node_modules/global-modules": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz",
"integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==",
"license": "MIT",
"dependencies": {
"global-prefix": "^1.0.1",
"is-windows": "^1.0.1",
"resolve-dir": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/global-prefix": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz",
"integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==",
"license": "MIT",
"dependencies": {
"expand-tilde": "^2.0.2",
"homedir-polyfill": "^1.0.1",
"ini": "^1.3.4",
"is-windows": "^1.0.1",
"which": "^1.2.14"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/global-prefix/node_modules/which": {
"version": "1.3.1",
"resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
"integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"which": "bin/which"
}
},
"node_modules/globals": {
"version": "11.12.0",
"resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz",
@@ -9943,34 +9797,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/grunt-cli": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.5.0.tgz",
"integrity": "sha512-rILKAFoU0dzlf22SUfDtq2R1fosChXXlJM5j7wI6uoW8gwmXDXzbUvirlKZSYCdXl3LXFbR+8xyS+WFo+b6vlA==",
"license": "MIT",
"dependencies": {
"grunt-known-options": "~2.0.0",
"interpret": "~1.1.0",
"liftup": "~3.0.1",
"nopt": "~5.0.0",
"v8flags": "^4.0.1"
},
"bin": {
"grunt": "bin/grunt"
},
"engines": {
"node": ">=10"
}
},
"node_modules/grunt-known-options": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz",
"integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/has-flag": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz",
@@ -10042,18 +9868,6 @@
"dev": true,
"license": "https://www.highcharts.com/license"
},
"node_modules/homedir-polyfill": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz",
"integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==",
"license": "MIT",
"dependencies": {
"parse-passwd": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/hpp": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/hpp/-/hpp-0.2.3.tgz",
@@ -10263,12 +10077,6 @@
"integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==",
"license": "ISC"
},
"node_modules/interpret": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz",
"integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==",
"license": "MIT"
},
"node_modules/ipaddr.js": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
@@ -10278,19 +10086,6 @@
"node": ">= 0.10"
}
},
"node_modules/is-absolute": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz",
"integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==",
"license": "MIT",
"dependencies": {
"is-relative": "^1.0.0",
"is-windows": "^1.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-arrayish": {
"version": "0.2.1",
"resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
@@ -10352,6 +10147,7 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
@@ -10380,6 +10176,7 @@
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-extglob": "^2.1.1"
@@ -10392,6 +10189,7 @@
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.12.0"
@@ -10407,18 +10205,6 @@
"node": ">=8"
}
},
"node_modules/is-plain-object": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz",
"integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==",
"license": "MIT",
"dependencies": {
"isobject": "^3.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-promise": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz",
@@ -10443,18 +10229,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/is-relative": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz",
"integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==",
"license": "MIT",
"dependencies": {
"is-unc-path": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-stream": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz",
@@ -10467,27 +10241,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/is-unc-path": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz",
"integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==",
"license": "MIT",
"dependencies": {
"unc-path-regex": "^0.1.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-windows": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz",
"integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/isarray": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz",
@@ -10498,17 +10251,9 @@
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"dev": true,
"license": "ISC"
},
"node_modules/isobject": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz",
"integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/istanbul-lib-coverage": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
@@ -11526,15 +11271,6 @@
"json-buffer": "3.0.1"
}
},
"node_modules/kind-of": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz",
"integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/kleur": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz",
@@ -11626,25 +11362,6 @@
"immediate": "~3.0.5"
}
},
"node_modules/liftup": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz",
"integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==",
"license": "MIT",
"dependencies": {
"extend": "^3.0.2",
"findup-sync": "^4.0.0",
"fined": "^1.2.0",
"flagged-respawn": "^1.0.1",
"is-plain-object": "^2.0.4",
"object.map": "^1.0.1",
"rechoir": "^0.7.0",
"resolve": "^1.19.0"
},
"engines": {
"node": ">=10"
}
},
"node_modules/lines-and-columns": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz",
@@ -11883,18 +11600,6 @@
"dev": true,
"license": "ISC"
},
"node_modules/make-iterator": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz",
"integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==",
"license": "MIT",
"dependencies": {
"kind-of": "^6.0.2"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/makeerror": {
"version": "1.0.12",
"resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.12.tgz",
@@ -11905,15 +11610,6 @@
"tmpl": "1.0.5"
}
},
"node_modules/map-cache": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz",
"integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/math-intrinsics": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
@@ -11971,6 +11667,7 @@
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": {
"braces": "^3.0.3",
@@ -12318,6 +12015,32 @@
"dev": true,
"license": "MIT"
},
"node_modules/node-pg-migrate": {
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/node-pg-migrate/-/node-pg-migrate-8.0.3.tgz",
"integrity": "sha512-oKzZyzTULTryO1jehX19VnyPCGf3G/3oWZg3gODphvID56T0WjPOShTVPVnxGdlcueaIW3uAVrr7M8xLZq5TcA==",
"dev": true,
"license": "MIT",
"dependencies": {
"glob": "~11.0.0",
"yargs": "~17.7.0"
},
"bin": {
"node-pg-migrate": "bin/node-pg-migrate.js"
},
"engines": {
"node": ">=20.11.0"
},
"peerDependencies": {
"@types/pg": ">=6.0.0 <9.0.0",
"pg": ">=4.3.0 <9.0.0"
},
"peerDependenciesMeta": {
"@types/pg": {
"optional": true
}
}
},
"node_modules/node-releases": {
"version": "2.0.19",
"resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.19.tgz",
@@ -12418,46 +12141,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/object.defaults": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz",
"integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==",
"license": "MIT",
"dependencies": {
"array-each": "^1.0.1",
"array-slice": "^1.0.0",
"for-own": "^1.0.0",
"isobject": "^3.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object.map": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz",
"integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==",
"license": "MIT",
"dependencies": {
"for-own": "^1.0.0",
"make-iterator": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/object.pick": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz",
"integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==",
"license": "MIT",
"dependencies": {
"isobject": "^3.0.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/on-finished": {
"version": "2.4.1",
"resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
@@ -12620,20 +12303,6 @@
"node": ">=6"
}
},
"node_modules/parse-filepath": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz",
"integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==",
"license": "MIT",
"dependencies": {
"is-absolute": "^1.0.0",
"map-cache": "^0.2.0",
"path-root": "^0.1.1"
},
"engines": {
"node": ">=0.8"
}
},
"node_modules/parse-json": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz",
@@ -12653,15 +12322,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"node_modules/parse-passwd": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz",
"integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/parse-srcset": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/parse-srcset/-/parse-srcset-1.0.2.tgz",
@@ -12800,27 +12460,6 @@
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
"license": "MIT"
},
"node_modules/path-root": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz",
"integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==",
"license": "MIT",
"dependencies": {
"path-root-regex": "^0.1.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/path-root-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz",
"integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/path-scurry": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-2.0.0.tgz",
@@ -12968,6 +12607,7 @@
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=8.6"
@@ -13563,18 +13203,6 @@
"node": ">=8.10.0"
}
},
"node_modules/rechoir": {
"version": "0.7.1",
"resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz",
"integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==",
"license": "MIT",
"dependencies": {
"resolve": "^1.9.0"
},
"engines": {
"node": ">= 0.10"
}
},
"node_modules/redis": {
"version": "4.7.1",
"resolved": "https://registry.npmjs.org/redis/-/redis-4.7.1.tgz",
@@ -13726,19 +13354,6 @@
"node": ">=8"
}
},
"node_modules/resolve-dir": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz",
"integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==",
"license": "MIT",
"dependencies": {
"expand-tilde": "^2.0.0",
"global-modules": "^1.0.0"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/resolve-from": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
@@ -14974,6 +14589,7 @@
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"dev": true,
"license": "MIT",
"dependencies": {
"is-number": "^7.0.0"
@@ -15494,15 +15110,6 @@
"integrity": "sha512-IevTus0SbGwQzYh3+fRsAMTVVPOoIVufzacXcHPmdlle1jUpq7BRL+mw3dgeLanvGZdwwbWhRV6XrcFNdBmjWA==",
"license": "MIT"
},
"node_modules/unc-path-regex": {
"version": "0.1.2",
"resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz",
"integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==",
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/undici-types": {
"version": "5.26.5",
"resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
@@ -15732,15 +15339,6 @@
"node": ">=10.12.0"
}
},
"node_modules/v8flags": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/v8flags/-/v8flags-4.0.1.tgz",
"integrity": "sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg==",
"license": "MIT",
"engines": {
"node": ">= 10.13.0"
}
},
"node_modules/validator": {
"version": "13.15.15",
"resolved": "https://registry.npmjs.org/validator/-/validator-13.15.15.tgz",

View File

@@ -35,7 +35,12 @@
"inline-queries": "node ./cli/inline-queries",
"sonar": "sonar-scanner -Dproject.settings=sonar-project-dev.properties",
"tsc": "tsc",
"test:watch": "jest --watch --setupFiles dotenv/config"
"test:watch": "jest --watch --setupFiles dotenv/config",
"migrate": "node-pg-migrate",
"migrate:up": "npm run migrate up",
"migrate:down": "npm run migrate down",
"migrate:create": "npm run migrate create",
"migrate:redo": "npm run migrate redo"
},
"jestSonar": {
"reportPath": "coverage",
@@ -150,6 +155,7 @@
"jest": "^28.1.3",
"jest-sonar-reporter": "^2.0.0",
"ncp": "^2.0.0",
"node-pg-migrate": "^8.0.3",
"nodeman": "^1.1.2",
"rimraf": "^6.0.1",
"swagger-jsdoc": "^6.2.8",

View File

@@ -16,6 +16,7 @@ export interface ITaskGroup {
start_date?: string;
end_date?: string;
color_code: string;
color_code_dark: string;
category_id: string | null;
old_category_id?: string;
todo_progress?: number;

File diff suppressed because it is too large Load Diff

View File

@@ -89,24 +89,24 @@ export const NumbersColorMap: { [x: string]: string } = {
};
export const PriorityColorCodes: { [x: number]: string; } = {
0: "#75c997",
1: "#fbc84c",
2: "#f37070"
0: "#2E8B57",
1: "#DAA520",
2: "#CD5C5C"
};
export const PriorityColorCodesDark: { [x: number]: string; } = {
0: "#46D980",
1: "#FFC227",
2: "#FF4141"
0: "#3CB371",
1: "#B8860B",
2: "#F08080"
};
export const TASK_STATUS_TODO_COLOR = "#a9a9a9";
export const TASK_STATUS_DOING_COLOR = "#70a6f3";
export const TASK_STATUS_DONE_COLOR = "#75c997";
export const TASK_PRIORITY_LOW_COLOR = "#75c997";
export const TASK_PRIORITY_MEDIUM_COLOR = "#fbc84c";
export const TASK_PRIORITY_HIGH_COLOR = "#f37070";
export const TASK_PRIORITY_LOW_COLOR = "#2E8B57";
export const TASK_PRIORITY_MEDIUM_COLOR = "#DAA520";
export const TASK_PRIORITY_HIGH_COLOR = "#CD5C5C";
export const TASK_DUE_COMPLETED_COLOR = "#75c997";
export const TASK_DUE_UPCOMING_COLOR = "#70a6f3";

View File

@@ -7,11 +7,13 @@
"emailLabel": "Email",
"emailPlaceholder": "Shkruani email-in tuaj",
"emailRequired": "Ju lutemi shkruani Email-in tuaj!",
"passwordLabel": "Fjalëkalimi",
"passwordPlaceholder": "Krijoni një fjalëkalim",
"passwordLabel": "Password",
"passwordGuideline": "Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.",
"passwordPlaceholder": "Enter your password",
"passwordRequired": "Ju lutemi krijoni një Fjalëkalim!",
"passwordMinCharacterRequired": "Fjalëkalimi duhet të jetë së paku 8 karaktere!",
"passwordPatternRequired": "Fjalëkalimi nuk plotëson kërkesat!",
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
"passwordPatternRequired": "Fjalëkalimi nuk i plotëson kërkesat!",
"strongPasswordPlaceholder": "Vendosni një fjalëkalim më të fortë",
"passwordValidationAltText": "Fjalëkalimi duhet të përmbajë së paku 8 karaktere me shkronja të mëdha dhe të vogla, një numër dhe një simbol.",
"signupSuccessMessage": "Jeni regjistruar me sukses!",

View File

@@ -7,11 +7,13 @@
"emailLabel": "E-Mail",
"emailPlaceholder": "Ihre E-Mail-Adresse eingeben",
"emailRequired": "Bitte geben Sie Ihre E-Mail-Adresse ein!",
"passwordLabel": "Passwort",
"passwordPlaceholder": "Ihr Passwort eingeben",
"passwordLabel": "Password",
"passwordGuideline": "Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.",
"passwordPlaceholder": "Enter your password",
"passwordRequired": "Bitte geben Sie Ihr Passwort ein!",
"passwordMinCharacterRequired": "Das Passwort muss mindestens 8 Zeichen lang sein!",
"passwordPatternRequired": "Das Passwort erfüllt nicht die Anforderungen!",
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
"passwordPatternRequired": "Das Passwort entspricht nicht den Anforderungen!",
"strongPasswordPlaceholder": "Ein stärkeres Passwort eingeben",
"passwordValidationAltText": "Das Passwort muss mindestens 8 Zeichen enthalten, mit Groß- und Kleinbuchstaben, einer Zahl und einem Sonderzeichen.",
"signupSuccessMessage": "Sie haben sich erfolgreich registriert!",

View File

@@ -8,9 +8,11 @@
"emailPlaceholder": "Enter your email",
"emailRequired": "Please enter your Email!",
"passwordLabel": "Password",
"passwordGuideline": "Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.",
"passwordPlaceholder": "Enter your password",
"passwordRequired": "Please enter your Password!",
"passwordMinCharacterRequired": "Password must be at least 8 characters!",
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
"passwordPatternRequired": "Password does not meet the requirements!",
"strongPasswordPlaceholder": "Enter a stronger password",
"passwordValidationAltText": "Password must include at least 8 characters with upper and lower case letters, a number, and a symbol.",

View File

@@ -7,10 +7,12 @@
"emailLabel": "Correo electrónico",
"emailPlaceholder": "Ingresa tu correo electrónico",
"emailRequired": "¡Por favor ingresa tu correo electrónico!",
"passwordLabel": "Contraseña",
"passwordPlaceholder": "Ingresa tu contraseña",
"passwordLabel": "Password",
"passwordGuideline": "Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.",
"passwordPlaceholder": "Enter your password",
"passwordRequired": "¡Por favor ingresa tu contraseña!",
"passwordMinCharacterRequired": "¡La contraseña debe tener al menos 8 caracteres!",
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
"passwordPatternRequired": "¡La contraseña no cumple con los requisitos!",
"strongPasswordPlaceholder": "Ingresa una contraseña más segura",
"passwordValidationAltText": "La contraseña debe incluir al menos 8 caracteres con letras mayúsculas y minúsculas, un número y un símbolo.",

View File

@@ -7,11 +7,13 @@
"emailLabel": "Email",
"emailPlaceholder": "Insira seu email",
"emailRequired": "Por favor, insira seu Email!",
"passwordLabel": "Senha",
"passwordPlaceholder": "Insira sua senha",
"passwordLabel": "Password",
"passwordGuideline": "Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.",
"passwordPlaceholder": "Enter your password",
"passwordRequired": "Por favor, insira sua Senha!",
"passwordMinCharacterRequired": "Senha deve ter pelo menos 8 caracteres!",
"passwordPatternRequired": "Senha não atende aos requisitos!",
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
"passwordPatternRequired": "A senha não atende aos requisitos!",
"strongPasswordPlaceholder": "Insira uma senha mais forte",
"passwordValidationAltText": "Senha deve incluir pelo menos 8 caracteres com letras maiúsculas e minúsculas, um número e um símbolo.",
"signupSuccessMessage": "Você se inscreveu com sucesso!",

View File

@@ -7,10 +7,12 @@
"emailLabel": "电子邮件",
"emailPlaceholder": "输入您的电子邮件",
"emailRequired": "请输入您的电子邮件!",
"passwordLabel": "密码",
"passwordPlaceholder": "输入您的密码",
"passwordLabel": "Password",
"passwordGuideline": "Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.",
"passwordPlaceholder": "Enter your password",
"passwordRequired": "请输入您的密码!",
"passwordMinCharacterRequired": "密码必须至少包含8个字符",
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
"passwordPatternRequired": "密码不符合要求!",
"strongPasswordPlaceholder": "输入更强的密码",
"passwordValidationAltText": "密码必须至少包含8个字符包括大小写字母、一个数字和一个符号。",

View File

@@ -1,8 +1,7 @@
// Core dependencies
import React, { Suspense, useEffect, memo, useMemo, useCallback, useState } from 'react';
import React, { Suspense, useEffect, memo, useMemo, useCallback } from 'react';
import { RouterProvider } from 'react-router-dom';
import i18next from 'i18next';
import { useTranslation } from 'react-i18next';
// Components
import ThemeWrapper from './features/theme/ThemeWrapper';
@@ -28,24 +27,6 @@ import { CSSPerformanceMonitor, LayoutStabilizer, CriticalCSSManager } from './u
// Service Worker
import { registerSW } from './utils/serviceWorkerRegistration';
// i18n ready check component
const I18nReadyCheck: React.FC<{ children: React.ReactNode }> = ({ children }) => {
const { ready } = useTranslation();
const [isReady, setIsReady] = useState(false);
useEffect(() => {
if (ready) {
setIsReady(true);
}
}, [ready]);
if (!isReady) {
return <SuspenseFallback />;
}
return <>{children}</>;
};
/**
* Main App Component - Performance Optimized
*
@@ -219,15 +200,18 @@ const App: React.FC = memo(() => {
}, []);
return (
<I18nReadyCheck>
<ModuleErrorBoundary>
<ThemeWrapper>
<Suspense fallback={<SuspenseFallback />}>
<RouterProvider router={router} />
</Suspense>
</ThemeWrapper>
</ModuleErrorBoundary>
</I18nReadyCheck>
<Suspense fallback={<SuspenseFallback />}>
<ThemeWrapper>
<ModuleErrorBoundary>
<RouterProvider
router={router}
future={{
v7_startTransition: true,
}}
/>
</ModuleErrorBoundary>
</ThemeWrapper>
</Suspense>
);
});

View File

@@ -4,12 +4,12 @@ import { Navigate } from 'react-router-dom';
import { SuspenseFallback } from '@/components/suspense-fallback/suspense-fallback';
// Lazy load auth page components for better code splitting
const LoginPage = lazy(() => import('@/pages/auth/login-page'));
const SignupPage = lazy(() => import('@/pages/auth/signup-page'));
const ForgotPasswordPage = lazy(() => import('@/pages/auth/forgot-password-page'));
const LoggingOutPage = lazy(() => import('@/pages/auth/logging-out'));
const AuthenticatingPage = lazy(() => import('@/pages/auth/authenticating'));
const VerifyResetEmailPage = lazy(() => import('@/pages/auth/verify-reset-email'));
const LoginPage = lazy(() => import('@/pages/auth/LoginPage'));
const SignupPage = lazy(() => import('@/pages/auth/SignupPage'));
const ForgotPasswordPage = lazy(() => import('@/pages/auth/ForgotPasswordPage'));
const LoggingOutPage = lazy(() => import('@/pages/auth/LoggingOutPage'));
const AuthenticatingPage = lazy(() => import('@/pages/auth/AuthenticatingPage'));
const VerifyResetEmailPage = lazy(() => import('@/pages/auth/VerifyResetEmailPage'));
const authRoutes = [
{

View File

@@ -1,17 +1,24 @@
import { Empty, Typography } from 'antd';
import React from 'react';
import { useTranslation } from 'react-i18next';
type EmptyListPlaceholderProps = {
imageSrc?: string;
imageHeight?: number;
text: string;
text?: string;
textKey?: string;
i18nNs?: string;
};
const EmptyListPlaceholder = ({
imageSrc = 'https://s3.us-west-2.amazonaws.com/worklenz.com/assets/empty-box.webp',
imageHeight = 60,
text,
textKey,
i18nNs = 'task-list-table',
}: EmptyListPlaceholderProps) => {
const { t } = useTranslation(i18nNs);
const description = textKey ? t(textKey) : text;
return (
<Empty
image={imageSrc}
@@ -22,7 +29,7 @@ const EmptyListPlaceholder = ({
alignItems: 'center',
marginBlockStart: 24,
}}
description={<Typography.Text type="secondary">{text}</Typography.Text>}
description={<Typography.Text type="secondary">{description}</Typography.Text>}
/>
);
};

View File

@@ -1,5 +1,6 @@
import React from 'react';
import { useTranslation } from 'react-i18next';
import { Tooltip } from 'antd';
interface GroupProgressBarProps {
todoProgress: number;
@@ -15,24 +16,34 @@ const GroupProgressBar: React.FC<GroupProgressBarProps> = ({
groupType
}) => {
const { t } = useTranslation('task-management');
console.log(todoProgress, doingProgress, doneProgress);
// Only show for priority and phase grouping
if (groupType !== 'priority' && groupType !== 'phase') {
return null;
}
const total = todoProgress + doingProgress + doneProgress;
const total = (todoProgress || 0) + (doingProgress || 0) + (doneProgress || 0);
// Don't show if no progress values exist
if (total === 0) {
return null;
}
// Tooltip content with all values in rows
const tooltipContent = (
<div>
<div>{t('todo')}: {todoProgress || 0}%</div>
<div>{t('inProgress')}: {doingProgress || 0}%</div>
<div>{t('done')}: {doneProgress || 0}%</div>
</div>
);
return (
<div className="flex items-center gap-2">
{/* Compact progress text */}
<span className="text-xs text-gray-600 dark:text-gray-400 whitespace-nowrap font-medium">
{doneProgress}% {t('done')}
{doneProgress || 0}% {t('done')}
</span>
{/* Compact progress bar */}
@@ -40,27 +51,30 @@ const GroupProgressBar: React.FC<GroupProgressBarProps> = ({
<div className="h-full flex">
{/* Todo section - light green */}
{todoProgress > 0 && (
<div
className="bg-green-200 dark:bg-green-800 transition-all duration-300"
style={{ width: `${(todoProgress / total) * 100}%` }}
title={`${t('todo')}: ${todoProgress}%`}
/>
<Tooltip title={tooltipContent} placement="top">
<div
className="bg-green-200 dark:bg-green-800 transition-all duration-300"
style={{ width: `${(todoProgress / total) * 100}%` }}
/>
</Tooltip>
)}
{/* Doing section - medium green */}
{doingProgress > 0 && (
<div
className="bg-green-400 dark:bg-green-600 transition-all duration-300"
style={{ width: `${(doingProgress / total) * 100}%` }}
title={`${t('inProgress')}: ${doingProgress}%`}
/>
<Tooltip title={tooltipContent} placement="top">
<div
className="bg-green-400 dark:bg-green-600 transition-all duration-300"
style={{ width: `${(doingProgress / total) * 100}%` }}
/>
</Tooltip>
)}
{/* Done section - dark green */}
{doneProgress > 0 && (
<div
className="bg-green-600 dark:bg-green-400 transition-all duration-300"
style={{ width: `${(doneProgress / total) * 100}%` }}
title={`${t('done')}: ${doneProgress}%`}
/>
<Tooltip title={tooltipContent} placement="top">
<div
className="bg-green-600 dark:bg-green-400 transition-all duration-300"
style={{ width: `${(doneProgress / total) * 100}%` }}
/>
</Tooltip>
)}
</div>
</div>
@@ -68,22 +82,25 @@ const GroupProgressBar: React.FC<GroupProgressBarProps> = ({
{/* Small legend dots with better spacing */}
<div className="flex items-center gap-1">
{todoProgress > 0 && (
<div
className="w-1.5 h-1.5 bg-green-200 dark:bg-green-800 rounded-full"
title={`${t('todo')}: ${todoProgress}%`}
/>
<Tooltip title={tooltipContent} placement="top">
<div
className="w-1.5 h-1.5 bg-green-200 dark:bg-green-800 rounded-full"
/>
</Tooltip>
)}
{doingProgress > 0 && (
<div
className="w-1.5 h-1.5 bg-green-400 dark:bg-green-600 rounded-full"
title={`${t('inProgress')}: ${doingProgress}%`}
/>
<Tooltip title={tooltipContent} placement="top">
<div
className="w-1.5 h-1.5 bg-green-400 dark:bg-green-600 rounded-full"
/>
</Tooltip>
)}
{doneProgress > 0 && (
<div
className="w-1.5 h-1.5 bg-green-600 dark:bg-green-400 rounded-full"
title={`${t('done')}: ${doneProgress}%`}
/>
<Tooltip title={tooltipContent} placement="top">
<div
className="w-1.5 h-1.5 bg-green-600 dark:bg-green-400 rounded-full"
/>
</Tooltip>
)}
</div>
</div>

View File

@@ -1,15 +1,29 @@
import React, { useMemo, useCallback, useState } from 'react';
import { useDroppable } from '@dnd-kit/core';
// @ts-ignore: Heroicons module types
import { ChevronDownIcon, ChevronRightIcon, EllipsisHorizontalIcon, PencilIcon, ArrowPathIcon } from '@heroicons/react/24/outline';
import {
ChevronDownIcon,
ChevronRightIcon,
EllipsisHorizontalIcon,
PencilIcon,
ArrowPathIcon,
} from '@heroicons/react/24/outline';
import { Checkbox, Dropdown, Menu, Input, Modal, Badge, Flex } from 'antd';
import GroupProgressBar from './GroupProgressBar';
import { useTranslation } from 'react-i18next';
import { getContrastColor } from '@/utils/colorUtils';
import { useAppSelector } from '@/hooks/useAppSelector';
import { useAppDispatch } from '@/hooks/useAppDispatch';
import { selectSelectedTaskIds, selectTask, deselectTask } from '@/features/task-management/selection.slice';
import { selectGroups, fetchTasksV3, selectAllTasksArray } from '@/features/task-management/task-management.slice';
import {
selectSelectedTaskIds,
selectTask,
deselectTask,
} from '@/features/task-management/selection.slice';
import {
selectGroups,
fetchTasksV3,
selectAllTasksArray,
} from '@/features/task-management/task-management.slice';
import { selectCurrentGrouping } from '@/features/task-management/grouping.slice';
import { statusApiService } from '@/api/taskAttributes/status/status.api.service';
import { phasesApiService } from '@/api/taskAttributes/phases/phases.api.service';
@@ -38,7 +52,12 @@ interface TaskGroupHeaderProps {
projectId: string;
}
const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, onToggle, projectId }) => {
const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({
group,
isCollapsed,
onToggle,
projectId,
}) => {
const { t } = useTranslation('task-management');
const dispatch = useAppDispatch();
const selectedTaskIds = useAppSelector(selectSelectedTaskIds);
@@ -48,14 +67,14 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
const { statusCategories, status: statusList } = useAppSelector(state => state.taskStatusReducer);
const { trackMixpanelEvent } = useMixpanelTracking();
const { isOwnerOrAdmin } = useAuthService();
const [dropdownVisible, setDropdownVisible] = useState(false);
const [isRenaming, setIsRenaming] = useState(false);
const [isChangingCategory, setIsChangingCategory] = useState(false);
const [isEditingName, setIsEditingName] = useState(false);
const [editingName, setEditingName] = useState(group.name);
const headerBackgroundColor = group.color || '#F0F0F0'; // Default light gray if no color
const headerTextColor = getContrastColor(headerBackgroundColor);
@@ -85,53 +104,79 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
// If we're grouping by status, show progress based on task completion
if (currentGrouping === 'status') {
// For status grouping, calculate based on task progress values
const progressStats = tasksInCurrentGroup.reduce((acc, task) => {
const progress = task.progress || 0;
if (progress === 0) {
acc.todo += 1;
} else if (progress === 100) {
acc.done += 1;
} else {
acc.doing += 1;
}
return acc;
}, { todo: 0, doing: 0, done: 0 });
const progressStats = tasksInCurrentGroup.reduce(
(acc, task) => {
const progress = task.progress || 0;
if (progress === 0) {
acc.todo += 1;
} else if (progress === 100) {
acc.done += 1;
} else {
acc.doing += 1;
}
return acc;
},
{ todo: 0, doing: 0, done: 0 }
);
const totalTasks = tasksInCurrentGroup.length;
return {
todoProgress: totalTasks > 0 ? Math.round((progressStats.todo / totalTasks) * 100) : 0,
doingProgress: totalTasks > 0 ? Math.round((progressStats.doing / totalTasks) * 100) : 0,
doneProgress: totalTasks > 0 ? Math.round((progressStats.done / totalTasks) * 100) : 0,
todoProgress: totalTasks > 0 ? Math.round((progressStats.todo / totalTasks) * 100) || 0 : 0,
doingProgress:
totalTasks > 0 ? Math.round((progressStats.doing / totalTasks) * 100) || 0 : 0,
doneProgress: totalTasks > 0 ? Math.round((progressStats.done / totalTasks) * 100) || 0 : 0,
};
} else {
// For priority/phase grouping, show progress based on status distribution
// Use a simplified approach based on status names and common patterns
const statusCounts = tasksInCurrentGroup.reduce((acc, task) => {
// Find the status by ID first
const statusInfo = statusList.find(s => s.id === task.status);
const statusName = statusInfo?.name?.toLowerCase() || task.status?.toLowerCase() || '';
// Categorize based on common status name patterns
if (statusName.includes('todo') || statusName.includes('to do') || statusName.includes('pending') || statusName.includes('open') || statusName.includes('backlog')) {
acc.todo += 1;
} else if (statusName.includes('doing') || statusName.includes('progress') || statusName.includes('active') || statusName.includes('working') || statusName.includes('development')) {
acc.doing += 1;
} else if (statusName.includes('done') || statusName.includes('completed') || statusName.includes('finished') || statusName.includes('closed') || statusName.includes('resolved')) {
acc.done += 1;
} else {
// Default unknown statuses to "doing" (in progress)
acc.doing += 1;
}
return acc;
}, { todo: 0, doing: 0, done: 0 });
const statusCounts = tasksInCurrentGroup.reduce(
(acc, task) => {
// Find the status by ID first
const statusInfo = statusList.find(s => s.id === task.status);
const statusName = statusInfo?.name?.toLowerCase() || task.status?.toLowerCase() || '';
// Categorize based on common status name patterns
if (
statusName.includes('todo') ||
statusName.includes('to do') ||
statusName.includes('pending') ||
statusName.includes('open') ||
statusName.includes('backlog')
) {
acc.todo += 1;
} else if (
statusName.includes('doing') ||
statusName.includes('progress') ||
statusName.includes('active') ||
statusName.includes('working') ||
statusName.includes('development')
) {
acc.doing += 1;
} else if (
statusName.includes('done') ||
statusName.includes('completed') ||
statusName.includes('finished') ||
statusName.includes('closed') ||
statusName.includes('resolved')
) {
acc.done += 1;
} else {
// Default unknown statuses to "doing" (in progress)
acc.doing += 1;
}
return acc;
},
{ todo: 0, doing: 0, done: 0 }
);
const totalTasks = tasksInCurrentGroup.length;
return {
todoProgress: totalTasks > 0 ? Math.round((statusCounts.todo / totalTasks) * 100) : 0,
doingProgress: totalTasks > 0 ? Math.round((statusCounts.doing / totalTasks) * 100) : 0,
doneProgress: totalTasks > 0 ? Math.round((statusCounts.done / totalTasks) * 100) : 0,
todoProgress: totalTasks > 0 ? Math.round((statusCounts.todo / totalTasks) * 100) || 0 : 0,
doingProgress:
totalTasks > 0 ? Math.round((statusCounts.doing / totalTasks) * 100) || 0 : 0,
doneProgress: totalTasks > 0 ? Math.round((statusCounts.done / totalTasks) * 100) || 0 : 0,
};
}
}, [currentGroup, allTasks, statusList, currentGrouping]);
@@ -141,30 +186,34 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
if (tasksInGroup.length === 0) {
return { isAllSelected: false, isPartiallySelected: false };
}
const selectedTasksInGroup = tasksInGroup.filter(taskId => selectedTaskIds.includes(taskId));
const allSelected = selectedTasksInGroup.length === tasksInGroup.length;
const partiallySelected = selectedTasksInGroup.length > 0 && selectedTasksInGroup.length < tasksInGroup.length;
const partiallySelected =
selectedTasksInGroup.length > 0 && selectedTasksInGroup.length < tasksInGroup.length;
return { isAllSelected: allSelected, isPartiallySelected: partiallySelected };
}, [tasksInGroup, selectedTaskIds]);
// Handle select all checkbox change
const handleSelectAllChange = useCallback((e: any) => {
e.stopPropagation();
if (isAllSelected) {
// Deselect all tasks in this group
tasksInGroup.forEach(taskId => {
dispatch(deselectTask(taskId));
});
} else {
// Select all tasks in this group
tasksInGroup.forEach(taskId => {
dispatch(selectTask(taskId));
});
}
}, [dispatch, isAllSelected, tasksInGroup]);
const handleSelectAllChange = useCallback(
(e: any) => {
e.stopPropagation();
if (isAllSelected) {
// Deselect all tasks in this group
tasksInGroup.forEach(taskId => {
dispatch(deselectTask(taskId));
});
} else {
// Select all tasks in this group
tasksInGroup.forEach(taskId => {
dispatch(selectTask(taskId));
});
}
},
[dispatch, isAllSelected, tasksInGroup]
);
// Handle inline name editing
const handleNameSave = useCallback(async () => {
@@ -184,24 +233,22 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
name: editingName.trim(),
project_id: projectId,
};
await statusApiService.updateNameOfStatus(statusId, body, projectId);
trackMixpanelEvent(evt_project_board_column_setting_click, { Rename: 'Status' });
dispatch(fetchStatuses(projectId));
} else if (currentGrouping === 'phase') {
// Extract phase ID from group ID (format: "phase-{phaseId}")
const phaseId = group.id.replace('phase-', '');
const body = { id: phaseId, name: editingName.trim() };
await phasesApiService.updateNameOfPhase(phaseId, body as ITaskPhase, projectId);
trackMixpanelEvent(evt_project_board_column_setting_click, { Rename: 'Phase' });
dispatch(fetchPhasesByProjectId(projectId));
}
// Refresh task list to get updated group names
dispatch(fetchTasksV3(projectId));
} catch (error) {
logger.error('Error renaming group:', error);
setEditingName(group.name);
@@ -209,24 +256,39 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
setIsEditingName(false);
setIsRenaming(false);
}
}, [editingName, group.name, group.id, currentGrouping, projectId, dispatch, trackMixpanelEvent, isRenaming]);
}, [
editingName,
group.name,
group.id,
currentGrouping,
projectId,
dispatch,
trackMixpanelEvent,
isRenaming,
]);
const handleNameClick = useCallback((e: React.MouseEvent) => {
e.stopPropagation();
if (!isOwnerOrAdmin) return;
setIsEditingName(true);
setEditingName(group.name);
}, [group.name, isOwnerOrAdmin]);
const handleNameKeyDown = useCallback((e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === 'Enter') {
handleNameSave();
} else if (e.key === 'Escape') {
setIsEditingName(false);
const handleNameClick = useCallback(
(e: React.MouseEvent) => {
e.stopPropagation();
if (!isOwnerOrAdmin) return;
setIsEditingName(true);
setEditingName(group.name);
}
e.stopPropagation();
}, [group.name, handleNameSave]);
},
[group.name, isOwnerOrAdmin]
);
const handleNameKeyDown = useCallback(
(e: React.KeyboardEvent<HTMLInputElement>) => {
if (e.key === 'Enter') {
handleNameSave();
} else if (e.key === 'Escape') {
setIsEditingName(false);
setEditingName(group.name);
}
e.stopPropagation();
},
[group.name, handleNameSave]
);
const handleNameBlur = useCallback(() => {
handleNameSave();
@@ -239,31 +301,31 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
setEditingName(group.name);
}, [group.name]);
// Handle category change
const handleCategoryChange = useCallback(async (categoryId: string, e?: React.MouseEvent) => {
e?.stopPropagation();
if (isChangingCategory) return;
const handleCategoryChange = useCallback(
async (categoryId: string, e?: React.MouseEvent) => {
e?.stopPropagation();
if (isChangingCategory) return;
setIsChangingCategory(true);
try {
// Extract status ID from group ID (format: "status-{statusId}")
const statusId = group.id.replace('status-', '');
await statusApiService.updateStatusCategory(statusId, categoryId, projectId);
trackMixpanelEvent(evt_project_board_column_setting_click, { 'Change category': 'Status' });
// Refresh status list and tasks
dispatch(fetchStatuses(projectId));
dispatch(fetchTasksV3(projectId));
} catch (error) {
logger.error('Error changing category:', error);
} finally {
setIsChangingCategory(false);
}
}, [group.id, projectId, dispatch, trackMixpanelEvent, isChangingCategory]);
setIsChangingCategory(true);
try {
// Extract status ID from group ID (format: "status-{statusId}")
const statusId = group.id.replace('status-', '');
await statusApiService.updateStatusCategory(statusId, categoryId, projectId);
trackMixpanelEvent(evt_project_board_column_setting_click, { 'Change category': 'Status' });
// Refresh status list and tasks
dispatch(fetchStatuses(projectId));
dispatch(fetchTasksV3(projectId));
} catch (error) {
logger.error('Error changing category:', error);
} finally {
setIsChangingCategory(false);
}
},
[group.id, projectId, dispatch, trackMixpanelEvent, isChangingCategory]
);
// Create dropdown menu items
const menuItems = useMemo(() => {
@@ -273,7 +335,12 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
{
key: 'rename',
icon: <PencilIcon className="h-4 w-4" />,
label: currentGrouping === 'status' ? t('renameStatus') : currentGrouping === 'phase' ? t('renamePhase') : t('renameGroup'),
label:
currentGrouping === 'status'
? t('renameStatus')
: currentGrouping === 'phase'
? t('renamePhase')
: t('renameGroup'),
onClick: (e: any) => {
e?.domEvent?.stopPropagation();
handleRenameGroup();
@@ -283,7 +350,7 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
// Only show "Change Category" when grouped by status
if (currentGrouping === 'status') {
const categorySubMenuItems = statusCategories.map((category) => ({
const categorySubMenuItems = statusCategories.map(category => ({
key: `category-${category.id}`,
label: (
<div className="flex items-center gap-2">
@@ -297,16 +364,23 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
},
}));
items.push({
key: 'changeCategory',
icon: <ArrowPathIcon className="h-4 w-4" />,
label: t('changeCategory'),
children: categorySubMenuItems,
} as any);
items.push({
key: 'changeCategory',
icon: <ArrowPathIcon className="h-4 w-4" />,
label: t('changeCategory'),
children: categorySubMenuItems,
} as any);
}
return items;
}, [currentGrouping, handleRenameGroup, handleCategoryChange, isOwnerOrAdmin, statusCategories, t]);
}, [
currentGrouping,
handleRenameGroup,
handleCategoryChange,
isOwnerOrAdmin,
statusCategories,
t,
]);
// Make the group header droppable
const { isOver, setNodeRef } = useDroppable({
@@ -317,7 +391,7 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
},
});
return (
return (
<div className="relative flex items-center">
<div
ref={setNodeRef}
@@ -332,26 +406,26 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
zIndex: 25, // Higher than task rows but lower than column headers (z-30)
height: '36px',
minHeight: '36px',
maxHeight: '36px'
maxHeight: '36px',
}}
onClick={onToggle}
>
{/* Drag Handle Space - ultra minimal width */}
<div style={{ width: '20px' }} className="flex items-center justify-center">
{/* Chevron button */}
<button
<button
className="p-0 rounded-sm hover:shadow-lg hover:scale-105 transition-all duration-300 ease-out"
style={{ backgroundColor: 'transparent', color: headerTextColor }}
onClick={(e) => {
onClick={e => {
e.stopPropagation();
onToggle();
}}
>
<div
<div
className="transition-transform duration-300 ease-out"
style={{
style={{
transform: isCollapsed ? 'rotate(0deg)' : 'rotate(90deg)',
transformOrigin: 'center'
transformOrigin: 'center',
}}
>
<ChevronRightIcon className="h-3 w-3" style={{ color: headerTextColor }} />
@@ -365,100 +439,99 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
checked={isAllSelected}
indeterminate={isPartiallySelected}
onChange={handleSelectAllChange}
onClick={(e) => e.stopPropagation()}
onClick={e => e.stopPropagation()}
style={{
color: headerTextColor,
}}
/>
</div>
{/* Group indicator and name - no gap at all */}
<div className="flex items-center flex-1 ml-1">
{/* Group name and count */}
<div className="flex items-center">
{isEditingName ? (
<Input
value={editingName}
onChange={(e) => setEditingName(e.target.value)}
onKeyDown={handleNameKeyDown}
onBlur={handleNameBlur}
autoFocus
size="small"
className="text-sm font-semibold"
style={{
width: 'auto',
minWidth: '100px',
backgroundColor: 'rgba(255, 255, 255, 0.1)',
color: headerTextColor,
border: '1px solid rgba(255, 255, 255, 0.3)'
}}
onClick={(e) => e.stopPropagation()}
/>
) : (
<span
className="text-sm font-semibold pr-2 cursor-pointer hover:underline"
style={{ color: headerTextColor }}
onClick={handleNameClick}
>
{group.name}
{/* Group indicator and name - no gap at all */}
<div className="flex items-center flex-1 ml-1">
{/* Group name and count */}
<div className="flex items-center">
{isEditingName ? (
<Input
value={editingName}
onChange={e => setEditingName(e.target.value)}
onKeyDown={handleNameKeyDown}
onBlur={handleNameBlur}
autoFocus
size="small"
className="text-sm font-semibold"
style={{
width: 'auto',
minWidth: '100px',
backgroundColor: 'rgba(255, 255, 255, 0.1)',
color: headerTextColor,
border: '1px solid rgba(255, 255, 255, 0.3)',
}}
onClick={e => e.stopPropagation()}
/>
) : (
<span
className="text-sm font-semibold pr-2 cursor-pointer hover:underline"
style={{ color: headerTextColor }}
onClick={handleNameClick}
>
{group.name}
</span>
)}
<span className="text-sm font-semibold ml-1" style={{ color: headerTextColor }}>
({group.count})
</span>
)}
<span className="text-sm font-semibold ml-1" style={{ color: headerTextColor }}>
({group.count})
</span>
</div>
</div>
{/* Three-dot menu - only show for status and phase grouping */}
{menuItems.length > 0 && (currentGrouping === 'status' || currentGrouping === 'phase') && (
<div className="flex items-center ml-2">
<Dropdown
menu={{ items: menuItems }}
trigger={['click']}
open={dropdownVisible}
onOpenChange={setDropdownVisible}
placement="bottomRight"
overlayStyle={{ zIndex: 1000 }}
>
<button
className="p-1 rounded-sm hover:bg-black hover:bg-opacity-10 transition-colors duration-200"
style={{ color: headerTextColor }}
onClick={e => {
e.stopPropagation();
setDropdownVisible(!dropdownVisible);
}}
>
<EllipsisHorizontalIcon className="h-4 w-4" />
</button>
</Dropdown>
</div>
)}
</div>
{/* Three-dot menu - only show for status and phase grouping */}
{menuItems.length > 0 && (currentGrouping === 'status' || currentGrouping === 'phase') && (
<div className="flex items-center ml-2">
<Dropdown
menu={{ items: menuItems }}
trigger={['click']}
open={dropdownVisible}
onOpenChange={setDropdownVisible}
placement="bottomRight"
overlayStyle={{ zIndex: 1000 }}
>
<button
className="p-1 rounded-sm hover:bg-black hover:bg-opacity-10 transition-colors duration-200"
style={{ color: headerTextColor }}
onClick={(e) => {
e.stopPropagation();
setDropdownVisible(!dropdownVisible);
}}
>
<EllipsisHorizontalIcon className="h-4 w-4" />
</button>
</Dropdown>
</div>
)}
</div>
{/* Progress Bar - sticky to the right edge during horizontal scroll */}
{(currentGrouping === 'priority' || currentGrouping === 'phase') &&
(groupProgressValues.todoProgress || groupProgressValues.doingProgress || groupProgressValues.doneProgress) && (
<div
className="flex items-center bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md shadow-sm px-3 py-1.5 ml-auto"
style={{
position: 'sticky',
right: '16px',
zIndex: 35, // Higher than header
minWidth: '160px',
height: '30px'
}}
>
<GroupProgressBar
todoProgress={groupProgressValues.todoProgress}
doingProgress={groupProgressValues.doingProgress}
doneProgress={groupProgressValues.doneProgress}
groupType={group.groupType || currentGrouping || ''}
/>
</div>
)}
{(currentGrouping === 'priority' || currentGrouping === 'phase') &&
!(groupProgressValues.todoProgress === 0 && groupProgressValues.doingProgress === 0 && groupProgressValues.doneProgress === 0) && (
<div
className="flex items-center bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded-md shadow-sm px-3 py-1.5 ml-auto"
style={{
position: 'sticky',
right: '16px',
zIndex: 35, // Higher than header
minWidth: '160px',
height: '30px',
}}
>
<GroupProgressBar
todoProgress={groupProgressValues.todoProgress}
doingProgress={groupProgressValues.doingProgress}
doneProgress={groupProgressValues.doneProgress}
groupType={group.groupType || currentGrouping || ''}
/>
</div>
)}
</div>
);
};
export default TaskGroupHeader;
export default TaskGroupHeader;

View File

@@ -60,13 +60,13 @@ import { fetchPhasesByProjectId } from '@/features/projects/singleProject/phase/
// Components
import TaskRowWithSubtasks from './TaskRowWithSubtasks';
import TaskGroupHeader from './TaskGroupHeader';
import ImprovedTaskFilters from '@/components/task-management/improved-task-filters';
import OptimizedBulkActionBar from '@/components/task-management/optimized-bulk-action-bar';
import CustomColumnModal from '@/pages/projects/projectView/taskList/task-list-table/custom-columns/custom-column-modal/custom-column-modal';
import AddTaskRow from './components/AddTaskRow';
import { AddCustomColumnButton, CustomColumnHeader } from './components/CustomColumnComponents';
import TaskListSkeleton from './components/TaskListSkeleton';
import ConvertToSubtaskDrawer from '@/components/task-list-common/convert-to-subtask-drawer/convert-to-subtask-drawer';
import EmptyListPlaceholder from '@/components/EmptyListPlaceholder';
// Empty Group Drop Zone Component
const EmptyGroupDropZone: React.FC<{
@@ -90,12 +90,28 @@ const EmptyGroupDropZone: React.FC<{
isOver && active ? 'bg-blue-50 dark:bg-blue-900/20' : ''
}`}
>
<div className="flex items-center min-w-max px-1 py-6">
<div className="flex items-center min-w-max px-1 border-t border-b border-gray-200 dark:border-gray-700" style={{ height: '40px' }}>
{visibleColumns.map((column, index) => {
const emptyColumnStyle = {
width: column.width,
flexShrink: 0,
};
// Show text in the title column
if (column.id === 'title') {
return (
<div
key={`empty-${column.id}`}
className="flex items-center pl-1"
style={emptyColumnStyle}
>
<span className="text-sm text-gray-500 dark:text-gray-400">
No tasks in this group
</span>
</div>
);
}
return (
<div
key={`empty-${column.id}`}
@@ -105,17 +121,6 @@ const EmptyGroupDropZone: React.FC<{
);
})}
</div>
<div className="absolute left-4 top-1/2 transform -translate-y-1/2 flex items-center">
<div
className={`text-sm px-4 py-3 rounded-md border shadow-sm transition-colors duration-200 ${
isOver && active
? 'text-blue-600 dark:text-blue-400 bg-blue-50 dark:bg-blue-900/30 border-blue-300 dark:border-blue-600'
: 'text-gray-500 dark:text-gray-400 bg-white dark:bg-gray-900 border-gray-200 dark:border-gray-700'
}`}
>
{isOver && active ? t('dropTaskHere') || 'Drop task here' : t('noTasksInGroup')}
</div>
</div>
{isOver && active && (
<div className="absolute inset-0 border-2 border-dashed border-blue-400 dark:border-blue-500 rounded-md pointer-events-none" />
)}
@@ -179,6 +184,8 @@ const TaskListV2Section: React.FC = () => {
const { projectId: urlProjectId } = useParams();
const { t } = useTranslation('task-list-table');
const { socket, connected } = useSocket();
const themeMode = useAppSelector(state => state.themeReducer.mode);
const isDarkMode = themeMode === 'dark';
// Redux state selectors
const allTasks = useAppSelector(selectAllTasksArray);
@@ -492,7 +499,7 @@ const TaskListV2Section: React.FC = () => {
isAddTaskRow: true,
groupId: group.id,
groupType: currentGrouping || 'status',
groupValue: group.id, // Use the actual database ID from backend
groupValue: group.id, // Send the UUID that backend expects
projectId: urlProjectId,
rowId: `add-task-${group.id}-0`,
autoFocus: false,
@@ -503,7 +510,7 @@ const TaskListV2Section: React.FC = () => {
isAddTaskRow: true,
groupId: group.id,
groupType: currentGrouping || 'status',
groupValue: group.id,
groupValue: group.id, // Send the UUID that backend expects
projectId: urlProjectId,
rowId: rowId,
autoFocus: index === groupAddRows.length - 1, // Auto-focus the latest row
@@ -536,6 +543,7 @@ const TaskListV2Section: React.FC = () => {
return virtuosoGroups.flatMap(group => group.tasks);
}, [virtuosoGroups]);
// Render functions
const renderGroup = useCallback(
(groupIndex: number) => {
@@ -550,11 +558,7 @@ const TaskListV2Section: React.FC = () => {
id: group.id,
name: group.title,
count: group.actualCount,
color: group.color,
todo_progress: group.todo_progress,
doing_progress: group.doing_progress,
done_progress: group.done_progress,
groupType: group.groupType,
color: isDarkMode ? group.color_code_dark : group.color,
}}
isCollapsed={isGroupCollapsed}
onToggle={() => handleGroupCollapse(group.id)}
@@ -685,13 +689,94 @@ const TaskListV2Section: React.FC = () => {
</div>
);
// Show message when no data
// Show message when no data - but for phase grouping, create an unmapped group
if (groups.length === 0 && !loading) {
// If grouped by phase, show an unmapped group to allow task creation
if (currentGrouping === 'phase') {
const unmappedGroup = {
id: 'Unmapped',
title: 'Unmapped',
groupType: 'phase',
groupValue: 'Unmapped', // Use same ID as groupValue for consistency
collapsed: false,
tasks: [],
taskIds: [],
color: '#fbc84c69',
actualCount: 0,
count: 1, // For the add task row
startIndex: 0
};
return (
<DndContext
sensors={sensors}
collisionDetection={closestCenter}
onDragStart={handleDragStart}
onDragOver={handleDragOver}
onDragEnd={handleDragEnd}
>
<div className="flex flex-col bg-white dark:bg-gray-900 h-full overflow-hidden">
<div
className="border border-gray-200 dark:border-gray-700 rounded-lg"
style={{
height: 'calc(100vh - 240px)',
display: 'flex',
flexDirection: 'column',
overflow: 'hidden',
}}
>
<div
ref={contentScrollRef}
className="flex-1 bg-white dark:bg-gray-900 relative"
style={{
overflowX: 'auto',
overflowY: 'auto',
minHeight: 0,
}}
>
{/* Sticky Column Headers */}
<div
className="sticky top-0 z-30 bg-gray-50 dark:bg-gray-800"
style={{ width: '100%', minWidth: 'max-content' }}
>
{renderColumnHeaders()}
</div>
<div style={{ minWidth: 'max-content' }}>
<div className="mt-2">
<TaskGroupHeader
group={{
id: 'Unmapped',
name: 'Unmapped',
count: 0,
color: '#fbc84c69',
}}
isCollapsed={false}
onToggle={() => {}}
projectId={urlProjectId || ''}
/>
<AddTaskRow
groupId="Unmapped"
groupType="phase"
groupValue="Unmapped"
projectId={urlProjectId || ''}
visibleColumns={visibleColumns}
onTaskAdded={handleTaskAdded}
rowId="add-task-Unmapped-0"
autoFocus={false}
/>
</div>
</div>
</div>
</div>
</div>
</DndContext>
);
}
// For other groupings, show the empty state message
return (
<div className="flex flex-col bg-white dark:bg-gray-900 h-full">
<div className="flex-none" style={{ height: '74px', flexShrink: 0 }}>
<ImprovedTaskFilters position="list" />
</div>
<div className="flex-1 flex items-center justify-center">
<div className="text-center">
<div className="text-lg font-medium text-gray-900 dark:text-white mb-2">
@@ -812,19 +897,17 @@ const TaskListV2Section: React.FC = () => {
{/* Drag Overlay */}
<DragOverlay dropAnimation={{ duration: 200, easing: 'ease-in-out' }}>
{activeId ? (
<div className="bg-white dark:bg-gray-800 shadow-2xl rounded-lg border-2 border-blue-500 dark:border-blue-400 scale-105">
<div className="px-4 py-3">
<div className="flex items-center gap-3">
<HolderOutlined className="text-blue-500 dark:text-blue-400" />
<div>
<div className="text-sm font-medium text-gray-900 dark:text-white">
{allTasks.find(task => task.id === activeId)?.name ||
allTasks.find(task => task.id === activeId)?.title ||
t('emptyStates.dragTaskFallback')}
</div>
<div className="text-xs text-gray-500 dark:text-gray-400">
{allTasks.find(task => task.id === activeId)?.task_key}
</div>
<div
className="bg-white dark:bg-gray-800 shadow-lg rounded-md border border-blue-400 dark:border-blue-500 opacity-90"
style={{ width: visibleColumns.find(col => col.id === 'title')?.width || '300px' }}
>
<div className="px-3 py-2">
<div className="flex items-center gap-2">
<HolderOutlined className="text-gray-400 dark:text-gray-500 text-xs" />
<div className="text-sm font-medium text-gray-900 dark:text-white truncate flex-1">
{allTasks.find(task => task.id === activeId)?.name ||
allTasks.find(task => task.id === activeId)?.title ||
t('emptyStates.dragTaskFallback')}
</div>
</div>
</div>

View File

@@ -125,9 +125,9 @@ const AddTaskRow: React.FC<AddTaskRowProps> = memo(({
return <div className="border-r border-gray-200 dark:border-gray-700" style={labelsStyle} />;
case 'title':
return (
<div className="flex items-center h-full border-r border-gray-200 dark:border-gray-700" style={baseStyle}>
<div className="flex items-center h-full" style={baseStyle}>
<div className="flex items-center w-full h-full">
<div className="w-4 mr-1" />
<div className="w-1 mr-1" />
{!isAdding ? (
<button
@@ -165,7 +165,7 @@ const AddTaskRow: React.FC<AddTaskRowProps> = memo(({
}, [isAdding, taskName, handleAddTask, handleCancel, handleKeyDown, t]);
return (
<div className="flex items-center min-w-max px-1 py-0.5 hover:bg-gray-50 dark:hover:bg-gray-800 min-h-[36px] border-b border-gray-200 dark:border-gray-700">
<div className="flex items-center min-w-max px-1 py-0.5 hover:bg-gray-50 dark:hover:bg-gray-800 min-h-[36px]">
{visibleColumns.map((column, index) => (
<React.Fragment key={column.id}>
{renderColumn(column.id, column.width)}

View File

@@ -250,30 +250,6 @@ export const useDragAndDrop = (allTasks: Task[], groups: TaskGroup[]) => {
newPosition: insertIndex,
});
// Optimistically update task properties immediately for UI responsiveness
const updatedTask = {
...activeTask,
updatedAt: new Date().toISOString(),
updated_at: new Date().toISOString(),
};
// Update task properties based on the grouping type
if (currentGrouping === 'priority') {
updatedTask.priority = targetGroup.id;
updatedTask.priority_id = targetGroup.id;
} else if (currentGrouping === 'phase') {
updatedTask.phase = targetGroup.id;
updatedTask.phase_id = targetGroup.id;
} else if (currentGrouping === 'status') {
updatedTask.status = targetGroup.id;
updatedTask.status_id = targetGroup.id;
}
// Import and dispatch updateTask for immediate UI update
import('@/features/task-management/task-management.slice').then(({ updateTask }) => {
dispatch(updateTask(updatedTask));
});
// reorderTasksInGroup handles both same-group and cross-group moves
// No need for separate moveTaskBetweenGroups call
dispatch(

View File

@@ -526,9 +526,25 @@ const taskManagementSlice = createSlice({
},
addTaskToGroup: (state, action: PayloadAction<{ task: Task; groupId: string }>) => {
const { task, groupId } = action.payload;
state.ids.push(task.id);
state.entities[task.id] = task;
const group = state.groups.find(g => g.id === groupId);
let group = state.groups.find(g => g.id === groupId);
// If group doesn't exist and it's "Unmapped", create it dynamically
if (!group && groupId === 'Unmapped') {
const unmappedGroup = {
id: 'Unmapped',
title: 'Unmapped',
taskIds: [],
type: 'phase' as const,
color: '#fbc84c69',
groupValue: 'Unmapped'
};
state.groups.push(unmappedGroup);
group = unmappedGroup;
}
if (group) {
group.taskIds.push(task.id);
}
@@ -657,15 +673,9 @@ const taskManagementSlice = createSlice({
const group = state.groups.find(g => g.id === sourceGroupId);
if (group) {
const newTasks = Array.from(group.taskIds);
const sourceIndex = newTasks.indexOf(sourceTaskId);
const destIndex = newTasks.indexOf(destinationTaskId);
// Only proceed if both tasks are found
if (sourceIndex !== -1 && destIndex !== -1) {
const [removed] = newTasks.splice(sourceIndex, 1);
newTasks.splice(destIndex, 0, removed);
group.taskIds = newTasks;
}
const [removed] = newTasks.splice(newTasks.indexOf(sourceTaskId), 1);
newTasks.splice(newTasks.indexOf(destinationTaskId), 0, removed);
group.taskIds = newTasks;
// Update order for affected tasks using the appropriate sort field
const sortField = getSortOrderField(state.grouping?.id);
@@ -687,20 +697,13 @@ const taskManagementSlice = createSlice({
// Add to destination group at the correct position relative to destinationTask
const destinationIndex = destinationGroup.taskIds.indexOf(destinationTaskId);
if (destinationIndex !== -1) {
// Ensure we don't add duplicate task IDs
if (!destinationGroup.taskIds.includes(sourceTaskId)) {
destinationGroup.taskIds.splice(destinationIndex, 0, sourceTaskId);
}
destinationGroup.taskIds.splice(destinationIndex, 0, sourceTaskId);
} else {
// Add to end if destination task not found, but only if not already present
if (!destinationGroup.taskIds.includes(sourceTaskId)) {
destinationGroup.taskIds.push(sourceTaskId);
}
destinationGroup.taskIds.push(sourceTaskId); // Add to end if destination task not found
}
// Note: Task's grouping field (priority, phase, status) will also be updated
// by the socket event handler after backend confirmation, but for immediate UI
// feedback, we update it optimistically in the drag and drop handler.
// Do NOT update the task's grouping field (priority, phase, status) here.
// This will be handled by the socket event handler after backend confirmation.
// Update order for affected tasks in both groups using the appropriate sort field
const sortField = getSortOrderField(state.grouping?.id);
@@ -1183,7 +1186,7 @@ export default taskManagementSlice.reducer;
// V3 API selectors - no processing needed, data is pre-processed by backend
export const selectTaskGroupsV3 = (state: RootState) => state.taskManagement.groups;
export const selectCurrentGroupingV3 = (state: RootState) => state.taskManagement.grouping;
export const selectCurrentGroupingV3 = (state: RootState) => state.grouping.currentGrouping;
// Column-related selectors
export const selectColumns = (state: RootState) => state.taskManagement.columns;

View File

@@ -217,17 +217,6 @@ export const useTaskSocketHandlers = () => {
const currentGrouping = state.taskManagement.grouping;
if (currentTask) {
// Check if current task has a more recent optimistic update
const currentUpdateTime = currentTask.updatedAt || currentTask.updated_at;
const serverUpdateTime = response.updated_at || response.updatedAt;
// If current task was updated more recently than server data, skip this update
if (currentUpdateTime && serverUpdateTime &&
new Date(currentUpdateTime).getTime() > new Date(serverUpdateTime).getTime()) {
console.log(`[TASK_STATUS_CHANGE] Skipping stale update for task ${response.id}`);
return;
}
// Determine the new status value based on status category
let newStatusValue: 'todo' | 'doing' | 'done' = 'todo';
if (response.statusCategory) {
@@ -404,17 +393,6 @@ export const useTaskSocketHandlers = () => {
const currentGrouping = state.taskManagement.grouping;
if (currentTask) {
// Check if current task has a more recent optimistic update
const currentUpdateTime = currentTask.updatedAt || currentTask.updated_at;
const serverUpdateTime = response.updated_at || response.updatedAt;
// If current task was updated more recently than server data, skip this update
if (currentUpdateTime && serverUpdateTime &&
new Date(currentUpdateTime).getTime() > new Date(serverUpdateTime).getTime()) {
console.log(`[TASK_PRIORITY_CHANGE] Skipping stale update for task ${response.id}`);
return;
}
// Get priority list to map priority_id to priority name
const priorityList = state.priorityReducer?.priorities || [];
let newPriorityValue: 'critical' | 'high' | 'medium' | 'low' = 'medium';
@@ -571,17 +549,6 @@ export const useTaskSocketHandlers = () => {
const currentTask = state.taskManagement.entities[taskId];
if (currentTask) {
// Check if current task has a more recent optimistic update
const currentUpdateTime = currentTask.updatedAt || currentTask.updated_at;
const serverUpdateTime = data.updated_at || data.updatedAt;
// If current task was updated more recently than server data, skip this update
if (currentUpdateTime && serverUpdateTime &&
new Date(currentUpdateTime).getTime() > new Date(serverUpdateTime).getTime()) {
console.log(`[TASK_PHASE_CHANGE] Skipping stale update for task ${data.task_id}`);
return;
}
// Get phase list to map phase_id to phase name
const phaseList = state.phaseReducer?.phaseList || [];
let newPhaseValue = '';
@@ -888,10 +855,11 @@ export const useTaskSocketHandlers = () => {
// For priority grouping, use priority field (which contains the priority UUID)
groupId = data.priority;
} else if (grouping === 'phase') {
// For phase grouping, use phase_id
groupId = data.phase_id;
// For phase grouping, use phase_id, or 'Unmapped' if no phase_id
groupId = data.phase_id || 'Unmapped';
}
// Use addTaskToGroup with the actual group UUID
dispatch(addTaskToGroup({ task, groupId: groupId || '' }));
@@ -1040,18 +1008,6 @@ export const useTaskSocketHandlers = () => {
data.forEach((taskData: any) => {
const currentTask = state.taskManagement.entities[taskData.id];
if (currentTask) {
// Check if current task has a more recent optimistic update
const currentUpdateTime = currentTask.updatedAt || currentTask.updated_at;
const serverUpdateTime = taskData.updated_at || taskData.updatedAt;
// If current task was updated more recently than server data, skip this update
// This prevents socket updates from overwriting newer optimistic updates
if (currentUpdateTime && serverUpdateTime &&
new Date(currentUpdateTime).getTime() > new Date(serverUpdateTime).getTime()) {
console.log(`[TASK_SORT_ORDER_CHANGE] Skipping stale update for task ${taskData.id}`);
return;
}
let updatedTask: Task = {
...currentTask,
order: taskData.sort_order || taskData.current_sort_order || currentTask.order,

View File

@@ -24,33 +24,11 @@ i18n
backend: {
loadPath: '/locales/{{lng}}/{{ns}}.json',
// Ensure translations are loaded synchronously
crossDomain: false,
withCredentials: false,
},
react: {
useSuspense: false,
},
// Ensure all namespaces are loaded upfront
ns: ['common', 'home', 'task-management', 'task-list-table'],
// Add initialization promise to ensure translations are loaded
initImmediate: false,
});
// Ensure translations are loaded before the app starts
i18n.on('initialized', () => {
console.log('i18n initialized successfully');
});
i18n.on('loaded', (loaded) => {
console.log('i18n loaded:', loaded);
});
i18n.on('failedLoading', (lng, ns, msg) => {
console.error('i18n failed loading:', lng, ns, msg);
});
export default i18n;

View File

@@ -118,7 +118,7 @@ const ForgotPasswordPage = () => {
>
<Input
prefix={<UserOutlined />}
placeholder={t('emailPlaceholder')}
placeholder={t('emailPlaceholder', {defaultValue: 'Enter your email'})}
size="large"
style={{ borderRadius: 4 }}
/>
@@ -134,7 +134,7 @@ const ForgotPasswordPage = () => {
loading={isLoading}
style={{ borderRadius: 4 }}
>
{t('resetPasswordButton')}
{t('resetPasswordButton', {defaultValue: 'Reset Password'})}
</Button>
<Typography.Text style={{ textAlign: 'center' }}>{t('orText')}</Typography.Text>
<Link to="/auth/login">
@@ -146,7 +146,7 @@ const ForgotPasswordPage = () => {
borderRadius: 4,
}}
>
{t('returnToLoginButton')}
{t('returnToLoginButton', {defaultValue: 'Return to Login'})}
</Button>
</Link>
</Flex>

View File

@@ -5,6 +5,8 @@ import { useMediaQuery } from 'react-responsive';
import { LockOutlined, MailOutlined, UserOutlined } from '@ant-design/icons';
import { Form, Card, Input, Flex, Button, Typography, Space, message } from 'antd/es';
import { Rule } from 'antd/es/form';
import { CheckCircleTwoTone, CloseCircleTwoTone } from '@ant-design/icons';
import { useAppSelector } from '@/hooks/useAppSelector';
import googleIcon from '@/assets/images/google-icon.png';
import PageHeader from '@components/AuthPageHeader';
@@ -297,6 +299,10 @@ const SignupPage = () => {
min: 8,
message: t('passwordMinCharacterRequired'),
},
{
max: 32,
message: t('passwordMaxCharacterRequired'),
},
{
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#])/,
message: t('passwordPatternRequired'),
@@ -304,6 +310,38 @@ const SignupPage = () => {
],
};
const passwordChecklistItems = [
{
key: 'minLength',
test: (v: string) => v.length >= 8,
label: t('passwordChecklist.minLength', { defaultValue: 'At least 8 characters' }),
},
{
key: 'uppercase',
test: (v: string) => /[A-Z]/.test(v),
label: t('passwordChecklist.uppercase', { defaultValue: 'One uppercase letter' }),
},
{
key: 'lowercase',
test: (v: string) => /[a-z]/.test(v),
label: t('passwordChecklist.lowercase', { defaultValue: 'One lowercase letter' }),
},
{
key: 'number',
test: (v: string) => /\d/.test(v),
label: t('passwordChecklist.number', { defaultValue: 'One number' }),
},
{
key: 'special',
test: (v: string) => /[@$!%*?&#]/.test(v),
label: t('passwordChecklist.special', { defaultValue: 'One special character' }),
},
];
const themeMode = useAppSelector(state => state.themeReducer.mode);
const [passwordValue, setPasswordValue] = useState('');
const [passwordActive, setPasswordActive] = useState(false);
return (
<Card
style={{
@@ -317,7 +355,7 @@ const SignupPage = () => {
}}
variant="outlined"
>
<PageHeader description={t('headerDescription')} />
<PageHeader description={t('headerDescription', {defaultValue: 'Sign up to get started'})} />
<Form
form={form}
name="signup"
@@ -331,35 +369,72 @@ const SignupPage = () => {
name: urlParams.name,
}}
>
<Form.Item name="name" label={t('nameLabel')} rules={formRules.name}>
<Form.Item name="name" label={t('nameLabel', {defaultValue: 'Full Name'})} rules={formRules.name}>
<Input
prefix={<UserOutlined />}
placeholder={t('namePlaceholder')}
placeholder={t('namePlaceholder', {defaultValue: 'Enter your full name'})}
size="large"
style={{ borderRadius: 4 }}
/>
</Form.Item>
<Form.Item name="email" label={t('emailLabel')} rules={formRules.email as Rule[]}>
<Form.Item name="email" label={t('emailLabel', {defaultValue: 'Email'})} rules={formRules.email as Rule[]}>
<Input
prefix={<MailOutlined />}
placeholder={t('emailPlaceholder')}
placeholder={t('emailPlaceholder', {defaultValue: 'Enter your email'})}
size="large"
style={{ borderRadius: 4 }}
/>
</Form.Item>
<Form.Item name="password" label={t('passwordLabel')} rules={formRules.password}>
<Form.Item
name="password"
label={t('passwordLabel', {defaultValue: 'Password'})}
rules={formRules.password}
validateTrigger={['onBlur', 'onSubmit']}
>
<div>
<Input.Password
prefix={<LockOutlined />}
placeholder={t('strongPasswordPlaceholder')}
placeholder={t('strongPasswordPlaceholder', {defaultValue: 'Enter a strong password'})}
size="large"
style={{ borderRadius: 4 }}
value={passwordValue}
onFocus={() => setPasswordActive(true)}
onChange={e => {
setPasswordValue(e.target.value);
setPasswordActive(true);
}}
onBlur={() => {
if (!passwordValue) setPasswordActive(false);
}}
/>
<Typography.Text type="secondary" style={{ fontSize: 12 }}>
{t('passwordValidationAltText')}
<Typography.Text type="secondary" style={{ fontSize: 12, marginTop: 4, marginBottom: 0, display: 'block' }}>
{t('passwordGuideline', {
defaultValue: 'Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.'
})}
</Typography.Text>
{passwordActive && (
<div style={{ marginTop: 8, marginBottom: 4 }}>
{passwordChecklistItems.map(item => {
const passed = item.test(passwordValue);
// Only green if passed, otherwise neutral (never red)
let color = passed
? (themeMode === 'dark' ? '#52c41a' : '#389e0d')
: (themeMode === 'dark' ? '#b0b3b8' : '#bfbfbf');
return (
<Flex key={item.key} align="center" gap={8} style={{ color, fontSize: 13 }}>
{passed ? (
<CheckCircleTwoTone twoToneColor={themeMode === 'dark' ? '#52c41a' : '#52c41a'} />
) : (
<CloseCircleTwoTone twoToneColor={themeMode === 'dark' ? '#b0b3b8' : '#bfbfbf'} />
)}
<span>{item.label}</span>
</Flex>
);
})}
</div>
)}
</div>
</Form.Item>
@@ -416,7 +491,7 @@ const SignupPage = () => {
<Form.Item>
<Space>
<Typography.Text style={{ fontSize: 14 }}>
{t('alreadyHaveAccountText')}
{t('alreadyHaveAccountText', {defaultValue: 'Already have an account?'})}
</Typography.Text>
<Link

View File

@@ -4,6 +4,8 @@ import { Form, Card, Input, Flex, Button, Typography, Result } from 'antd/es';
import { LockOutlined } from '@ant-design/icons';
import { useTranslation } from 'react-i18next';
import { useMediaQuery } from 'react-responsive';
import { CheckCircleTwoTone, CloseCircleTwoTone } from '@ant-design/icons';
import { useAppSelector } from '@/hooks/useAppSelector';
import PageHeader from '@components/AuthPageHeader';
@@ -36,6 +38,36 @@ const VerifyResetEmailPage = () => {
const { t } = useTranslation('auth/verify-reset-email');
const isMobile = useMediaQuery({ query: '(max-width: 576px)' });
const themeMode = useAppSelector(state => state.themeReducer.mode);
const [passwordValue, setPasswordValue] = useState('');
const [passwordTouched, setPasswordTouched] = useState(false);
const passwordChecklistItems = [
{
key: 'minLength',
test: (v: string) => v.length >= 8,
label: t('passwordChecklist.minLength', { defaultValue: 'At least 8 characters' }),
},
{
key: 'uppercase',
test: (v: string) => /[A-Z]/.test(v),
label: t('passwordChecklist.uppercase', { defaultValue: 'One uppercase letter' }),
},
{
key: 'lowercase',
test: (v: string) => /[a-z]/.test(v),
label: t('passwordChecklist.lowercase', { defaultValue: 'One lowercase letter' }),
},
{
key: 'number',
test: (v: string) => /\d/.test(v),
label: t('passwordChecklist.number', { defaultValue: 'One number' }),
},
{
key: 'special',
test: (v: string) => /[@$!%*?&#]/.test(v),
label: t('passwordChecklist.special', { defaultValue: 'One special character' }),
},
];
useEffect(() => {
trackMixpanelEvent(evt_verify_reset_email_page_visit);
@@ -104,12 +136,38 @@ const VerifyResetEmailPage = () => {
},
]}
>
<Input.Password
prefix={<LockOutlined />}
placeholder={t('placeholder')}
size="large"
style={{ borderRadius: 4 }}
/>
<div>
<Input.Password
prefix={<LockOutlined />}
placeholder={t('placeholder')}
size="large"
style={{ borderRadius: 4 }}
value={passwordValue}
onChange={e => {
setPasswordValue(e.target.value);
if (!passwordTouched) setPasswordTouched(true);
}}
onBlur={() => setPasswordTouched(true)}
/>
<div style={{ marginTop: 8, marginBottom: 4 }}>
{passwordChecklistItems.map(item => {
const passed = item.test(passwordValue);
let color = passed
? (themeMode === 'dark' ? '#52c41a' : '#389e0d')
: (themeMode === 'dark' ? '#b0b3b8' : '#bfbfbf');
return (
<Flex key={item.key} align="center" gap={8} style={{ color, fontSize: 13 }}>
{passed ? (
<CheckCircleTwoTone twoToneColor={themeMode === 'dark' ? '#52c41a' : '#52c41a'} />
) : (
<CloseCircleTwoTone twoToneColor={themeMode === 'dark' ? '#b0b3b8' : '#bfbfbf'} />
)}
<span>{item.label}</span>
</Flex>
);
})}
</div>
</div>
</Form.Item>
<Form.Item
name="confirmPassword"
@@ -136,6 +194,8 @@ const VerifyResetEmailPage = () => {
placeholder={t('confirmPasswordPlaceholder')}
size="large"
style={{ borderRadius: 4 }}
value={form.getFieldValue('confirmPassword') || ''}
onChange={e => form.setFieldsValue({ confirmPassword: e.target.value })}
/>
</Form.Item>

View File

@@ -14,8 +14,6 @@ import { IMyTask } from '@/types/home/my-tasks.types';
import { useSocket } from '@/socket/socketContext';
import { ITaskAssigneesUpdateResponse } from '@/types/tasks/task-assignee-update-response';
import dayjs from 'dayjs';
import { useTranslation } from 'react-i18next';
import { Skeleton } from 'antd';
interface AddTaskInlineFormProps {
t: TFunction;
@@ -27,41 +25,35 @@ const AddTaskInlineForm = ({ t, calendarView }: AddTaskInlineFormProps) => {
const [isDueDateFieldShowing, setIsDueDateFieldShowing] = useState(false);
const [isProjectFieldShowing, setIsProjectFieldShowing] = useState(false);
const [form] = Form.useForm();
const { ready } = useTranslation('home');
const { homeTasksConfig } = useAppSelector(state => state.homePageReducer);
const { data: projectListData, isFetching: projectListFetching } = useGetProjectsByTeamQuery();
const { refetch } = useGetMyTasksQuery(homeTasksConfig);
const currentSession = useAuthService().getCurrentSession();
const { socket } = useSocket();
const taskInputRef = useRef<InputRef | null>(null);
const { data: projectListData, isFetching: projectListFetching } = useGetProjectsByTeamQuery();
const { homeTasksConfig } = useAppSelector(state => state.homePageReducer);
const { refetch } = useGetMyTasksQuery(homeTasksConfig);
// Don't render until i18n is ready
if (!ready) {
return <Skeleton active />;
}
const taskInputRef = useRef<InputRef | null>(null);
const dueDateOptions = [
{
value: 'Today',
label: t('tasks.today'),
label: t('home:tasks.today'),
},
{
value: 'Tomorrow',
label: t('tasks.tomorrow'),
label: t('home:tasks.tomorrow'),
},
{
value: 'Next Week',
label: t('tasks.nextWeek'),
label: t('home:tasks.nextWeek'),
},
{
value: 'Next Month',
label: t('tasks.nextMonth'),
label: t('home:tasks.nextMonth'),
},
{
value: 'No Due Date',
label: t('tasks.noDueDate'),
label: t('home:tasks.noDueDate'),
},
];
@@ -177,14 +169,14 @@ const AddTaskInlineForm = ({ t, calendarView }: AddTaskInlineFormProps) => {
rules={[
{
required: true,
message: t('tasks.taskRequired'),
message: t('home:tasks.taskRequired'),
},
]}
>
<Flex vertical gap={4}>
<Input
ref={taskInputRef}
placeholder={t('tasks.addTask')}
placeholder={t('home:tasks.addTask')}
style={{ width: '100%' }}
onChange={e => {
const inputValue = e.currentTarget.value;
@@ -208,7 +200,7 @@ const AddTaskInlineForm = ({ t, calendarView }: AddTaskInlineFormProps) => {
<Alert
message={
<Typography.Text style={{ fontSize: 11 }}>
{t('tasks.pressTabToSelectDueDateAndProject')}
{t('home:tasks.pressTabToSelectDueDateAndProject')}
</Typography.Text>
}
type="info"
@@ -253,7 +245,7 @@ const AddTaskInlineForm = ({ t, calendarView }: AddTaskInlineFormProps) => {
rules={[
{
required: true,
message: t('tasks.projectRequired'),
message: t('home:tasks.projectRequired'),
},
]}
>

View File

@@ -1,5 +1,5 @@
import HomeCalendar from '../../../components/calendars/homeCalendar/HomeCalendar';
import { Tag, Typography, Skeleton } from 'antd';
import { Tag, Typography } from 'antd';
import { ClockCircleOutlined } from '@ant-design/icons';
import { useAppSelector } from '@/hooks/useAppSelector';
import AddTaskInlineForm from './add-task-inline-form';
@@ -10,12 +10,7 @@ import dayjs from 'dayjs';
const CalendarView = () => {
const { homeTasksConfig } = useAppSelector(state => state.homePageReducer);
const { t, ready } = useTranslation('home');
// Don't render until i18n is ready
if (!ready) {
return <Skeleton active />;
}
const { t } = useTranslation('home');
useEffect(() => {
if (!homeTasksConfig.selected_date) {
@@ -41,7 +36,7 @@ const CalendarView = () => {
}}
>
<Typography.Text>
{t('tasks.dueOn')} {homeTasksConfig.selected_date?.format('MMM DD, YYYY')}
{t('home:tasks.dueOn')} {homeTasksConfig.selected_date?.format('MMM DD, YYYY')}
</Typography.Text>
</Tag>

View File

@@ -61,23 +61,18 @@ const TasksList: React.FC = React.memo(() => {
refetchOnFocus: false,
});
const { t, ready } = useTranslation('home');
const { t } = useTranslation('home');
const { model } = useAppSelector(state => state.homePageReducer);
// Don't render until i18n is ready
if (!ready) {
return <Skeleton active />;
}
const taskModes = useMemo(
() => [
{
value: 0,
label: t('tasks.assignedToMe'),
label: t('home:tasks.assignedToMe'),
},
{
value: 1,
label: t('tasks.assignedByMe'),
label: t('home:tasks.assignedByMe'),
},
],
[t]

View File

@@ -10,7 +10,6 @@ import Tooltip from 'antd/es/tooltip';
import Typography from 'antd/es/typography';
import Button from 'antd/es/button';
import Alert from 'antd/es/alert';
import Skeleton from 'antd/es/skeleton';
import EmptyListPlaceholder from '@components/EmptyListPlaceholder';
import { IMyTask } from '@/types/home/my-tasks.types';
@@ -25,7 +24,7 @@ import { useCreatePersonalTaskMutation } from '@/api/home-page/home-page.api.ser
const TodoList = () => {
const [isAlertShowing, setIsAlertShowing] = useState(false);
const [form] = Form.useForm();
const { t, ready } = useTranslation('home');
const { t } = useTranslation('home');
const [createPersonalTask, { isLoading: isCreatingPersonalTask }] =
useCreatePersonalTaskMutation();
@@ -36,11 +35,6 @@ const TodoList = () => {
// ref for todo input field
const todoInputRef = useRef<InputRef | null>(null);
// Don't render until i18n is ready
if (!ready) {
return <Skeleton active />;
}
// function to handle todo submit
const handleTodoSubmit = async (values: any) => {
if (!values.name || values.name.trim() === '') return;
@@ -49,7 +43,6 @@ const TodoList = () => {
done: false,
is_task: false,
color_code: '#000',
manual_progress: false,
};
const res = await createPersonalTask(newTodo);
@@ -76,7 +69,7 @@ const TodoList = () => {
width: 32,
render: (record: IMyTask) => (
<ConfigProvider wave={{ disabled: true }}>
<Tooltip title={t('todoList.markAsDone')}>
<Tooltip title={t('home:todoList.markAsDone')}>
<Button
type="text"
className="borderless-icon-btn"
@@ -107,11 +100,11 @@ const TodoList = () => {
<Card
title={
<Typography.Title level={5} style={{ marginBlockEnd: 0 }}>
{t('todoList.title')} ({data?.body.length})
{t('home:todoList.title')} ({data?.body.length})
</Typography.Title>
}
extra={
<Tooltip title={t('todoList.refreshTasks')}>
<Tooltip title={t('home:todoList.refreshTasks')}>
<Button shape="circle" icon={<SyncOutlined spin={isFetching} />} onClick={refetch} />
</Tooltip>
}
@@ -123,7 +116,7 @@ const TodoList = () => {
<Flex vertical>
<Input
ref={todoInputRef}
placeholder={t('todoList.addTask')}
placeholder={t('home:todoList.addTask')}
onChange={e => {
const inputValue = e.currentTarget.value;
@@ -135,8 +128,8 @@ const TodoList = () => {
<Alert
message={
<Typography.Text style={{ fontSize: 11 }}>
{t('todoList.pressEnter')} <strong>Enter</strong>{' '}
{t('todoList.toCreate')}
{t('home:todoList.pressEnter')} <strong>Enter</strong>{' '}
{t('home:todoList.toCreate')}
</Typography.Text>
}
type="info"
@@ -155,7 +148,7 @@ const TodoList = () => {
{data?.body.length === 0 ? (
<EmptyListPlaceholder
imageSrc="https://s3.us-west-2.amazonaws.com/worklenz.com/assets/empty-box.webp"
text={t('todoList.noTasks')}
text={t('home:todoList.noTasks')}
/>
) : (
<Table

View File

@@ -62,6 +62,7 @@ export interface TaskGroup {
taskIds: string[];
type?: 'status' | 'priority' | 'phase' | 'members';
color?: string;
color_code_dark?: string;
collapsed?: boolean;
groupValue?: string;
// Add any other group properties as needed