Merge pull request #278 from Worklenz/fix/release-v2.1.3
Fix/release v2.1.3
This commit is contained in:
@@ -16,6 +16,7 @@ export interface ITaskGroup {
|
|||||||
start_date?: string;
|
start_date?: string;
|
||||||
end_date?: string;
|
end_date?: string;
|
||||||
color_code: string;
|
color_code: string;
|
||||||
|
color_code_dark: string;
|
||||||
category_id: string | null;
|
category_id: string | null;
|
||||||
old_category_id?: string;
|
old_category_id?: string;
|
||||||
todo_progress?: number;
|
todo_progress?: number;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -89,24 +89,24 @@ export const NumbersColorMap: { [x: string]: string } = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const PriorityColorCodes: { [x: number]: string; } = {
|
export const PriorityColorCodes: { [x: number]: string; } = {
|
||||||
0: "#75c997",
|
0: "#2E8B57",
|
||||||
1: "#fbc84c",
|
1: "#DAA520",
|
||||||
2: "#f37070"
|
2: "#CD5C5C"
|
||||||
};
|
};
|
||||||
|
|
||||||
export const PriorityColorCodesDark: { [x: number]: string; } = {
|
export const PriorityColorCodesDark: { [x: number]: string; } = {
|
||||||
0: "#46D980",
|
0: "#3CB371",
|
||||||
1: "#FFC227",
|
1: "#B8860B",
|
||||||
2: "#FF4141"
|
2: "#F08080"
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TASK_STATUS_TODO_COLOR = "#a9a9a9";
|
export const TASK_STATUS_TODO_COLOR = "#a9a9a9";
|
||||||
export const TASK_STATUS_DOING_COLOR = "#70a6f3";
|
export const TASK_STATUS_DOING_COLOR = "#70a6f3";
|
||||||
export const TASK_STATUS_DONE_COLOR = "#75c997";
|
export const TASK_STATUS_DONE_COLOR = "#75c997";
|
||||||
|
|
||||||
export const TASK_PRIORITY_LOW_COLOR = "#75c997";
|
export const TASK_PRIORITY_LOW_COLOR = "#2E8B57";
|
||||||
export const TASK_PRIORITY_MEDIUM_COLOR = "#fbc84c";
|
export const TASK_PRIORITY_MEDIUM_COLOR = "#DAA520";
|
||||||
export const TASK_PRIORITY_HIGH_COLOR = "#f37070";
|
export const TASK_PRIORITY_HIGH_COLOR = "#CD5C5C";
|
||||||
|
|
||||||
export const TASK_DUE_COMPLETED_COLOR = "#75c997";
|
export const TASK_DUE_COMPLETED_COLOR = "#75c997";
|
||||||
export const TASK_DUE_UPCOMING_COLOR = "#70a6f3";
|
export const TASK_DUE_UPCOMING_COLOR = "#70a6f3";
|
||||||
|
|||||||
@@ -7,11 +7,13 @@
|
|||||||
"emailLabel": "Email",
|
"emailLabel": "Email",
|
||||||
"emailPlaceholder": "Shkruani email-in tuaj",
|
"emailPlaceholder": "Shkruani email-in tuaj",
|
||||||
"emailRequired": "Ju lutemi shkruani Email-in tuaj!",
|
"emailRequired": "Ju lutemi shkruani Email-in tuaj!",
|
||||||
"passwordLabel": "Fjalëkalimi",
|
"passwordLabel": "Password",
|
||||||
"passwordPlaceholder": "Krijoni një fjalëkalim",
|
"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!",
|
"passwordRequired": "Ju lutemi krijoni një Fjalëkalim!",
|
||||||
"passwordMinCharacterRequired": "Fjalëkalimi duhet të jetë së paku 8 karaktere!",
|
"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ë",
|
"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.",
|
"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!",
|
"signupSuccessMessage": "Jeni regjistruar me sukses!",
|
||||||
|
|||||||
@@ -7,11 +7,13 @@
|
|||||||
"emailLabel": "E-Mail",
|
"emailLabel": "E-Mail",
|
||||||
"emailPlaceholder": "Ihre E-Mail-Adresse eingeben",
|
"emailPlaceholder": "Ihre E-Mail-Adresse eingeben",
|
||||||
"emailRequired": "Bitte geben Sie Ihre E-Mail-Adresse ein!",
|
"emailRequired": "Bitte geben Sie Ihre E-Mail-Adresse ein!",
|
||||||
"passwordLabel": "Passwort",
|
"passwordLabel": "Password",
|
||||||
"passwordPlaceholder": "Ihr Passwort eingeben",
|
"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!",
|
"passwordRequired": "Bitte geben Sie Ihr Passwort ein!",
|
||||||
"passwordMinCharacterRequired": "Das Passwort muss mindestens 8 Zeichen lang sein!",
|
"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",
|
"strongPasswordPlaceholder": "Ein stärkeres Passwort eingeben",
|
||||||
"passwordValidationAltText": "Das Passwort muss mindestens 8 Zeichen enthalten, mit Groß- und Kleinbuchstaben, einer Zahl und einem Sonderzeichen.",
|
"passwordValidationAltText": "Das Passwort muss mindestens 8 Zeichen enthalten, mit Groß- und Kleinbuchstaben, einer Zahl und einem Sonderzeichen.",
|
||||||
"signupSuccessMessage": "Sie haben sich erfolgreich registriert!",
|
"signupSuccessMessage": "Sie haben sich erfolgreich registriert!",
|
||||||
|
|||||||
@@ -8,9 +8,11 @@
|
|||||||
"emailPlaceholder": "Enter your email",
|
"emailPlaceholder": "Enter your email",
|
||||||
"emailRequired": "Please enter your Email!",
|
"emailRequired": "Please enter your Email!",
|
||||||
"passwordLabel": "Password",
|
"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",
|
"passwordPlaceholder": "Enter your password",
|
||||||
"passwordRequired": "Please enter your Password!",
|
"passwordRequired": "Please enter your Password!",
|
||||||
"passwordMinCharacterRequired": "Password must be at least 8 characters!",
|
"passwordMinCharacterRequired": "Password must be at least 8 characters!",
|
||||||
|
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
|
||||||
"passwordPatternRequired": "Password does not meet the requirements!",
|
"passwordPatternRequired": "Password does not meet the requirements!",
|
||||||
"strongPasswordPlaceholder": "Enter a stronger password",
|
"strongPasswordPlaceholder": "Enter a stronger password",
|
||||||
"passwordValidationAltText": "Password must include at least 8 characters with upper and lower case letters, a number, and a symbol.",
|
"passwordValidationAltText": "Password must include at least 8 characters with upper and lower case letters, a number, and a symbol.",
|
||||||
|
|||||||
@@ -7,10 +7,12 @@
|
|||||||
"emailLabel": "Correo electrónico",
|
"emailLabel": "Correo electrónico",
|
||||||
"emailPlaceholder": "Ingresa tu correo electrónico",
|
"emailPlaceholder": "Ingresa tu correo electrónico",
|
||||||
"emailRequired": "¡Por favor ingresa tu correo electrónico!",
|
"emailRequired": "¡Por favor ingresa tu correo electrónico!",
|
||||||
"passwordLabel": "Contraseña",
|
"passwordLabel": "Password",
|
||||||
"passwordPlaceholder": "Ingresa tu contraseña",
|
"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!",
|
"passwordRequired": "¡Por favor ingresa tu contraseña!",
|
||||||
"passwordMinCharacterRequired": "¡La contraseña debe tener al menos 8 caracteres!",
|
"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!",
|
"passwordPatternRequired": "¡La contraseña no cumple con los requisitos!",
|
||||||
"strongPasswordPlaceholder": "Ingresa una contraseña más segura",
|
"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.",
|
"passwordValidationAltText": "La contraseña debe incluir al menos 8 caracteres con letras mayúsculas y minúsculas, un número y un símbolo.",
|
||||||
|
|||||||
@@ -7,11 +7,13 @@
|
|||||||
"emailLabel": "Email",
|
"emailLabel": "Email",
|
||||||
"emailPlaceholder": "Insira seu email",
|
"emailPlaceholder": "Insira seu email",
|
||||||
"emailRequired": "Por favor, insira seu Email!",
|
"emailRequired": "Por favor, insira seu Email!",
|
||||||
"passwordLabel": "Senha",
|
"passwordLabel": "Password",
|
||||||
"passwordPlaceholder": "Insira sua senha",
|
"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!",
|
"passwordRequired": "Por favor, insira sua Senha!",
|
||||||
"passwordMinCharacterRequired": "Senha deve ter pelo menos 8 caracteres!",
|
"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",
|
"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.",
|
"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!",
|
"signupSuccessMessage": "Você se inscreveu com sucesso!",
|
||||||
|
|||||||
@@ -7,10 +7,12 @@
|
|||||||
"emailLabel": "电子邮件",
|
"emailLabel": "电子邮件",
|
||||||
"emailPlaceholder": "输入您的电子邮件",
|
"emailPlaceholder": "输入您的电子邮件",
|
||||||
"emailRequired": "请输入您的电子邮件!",
|
"emailRequired": "请输入您的电子邮件!",
|
||||||
"passwordLabel": "密码",
|
"passwordLabel": "Password",
|
||||||
"passwordPlaceholder": "输入您的密码",
|
"passwordGuideline": "Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.",
|
||||||
|
"passwordPlaceholder": "Enter your password",
|
||||||
"passwordRequired": "请输入您的密码!",
|
"passwordRequired": "请输入您的密码!",
|
||||||
"passwordMinCharacterRequired": "密码必须至少包含8个字符!",
|
"passwordMinCharacterRequired": "密码必须至少包含8个字符!",
|
||||||
|
"passwordMaxCharacterRequired": "Password must be at most 32 characters!",
|
||||||
"passwordPatternRequired": "密码不符合要求!",
|
"passwordPatternRequired": "密码不符合要求!",
|
||||||
"strongPasswordPlaceholder": "输入更强的密码",
|
"strongPasswordPlaceholder": "输入更强的密码",
|
||||||
"passwordValidationAltText": "密码必须至少包含8个字符,包括大小写字母、一个数字和一个符号。",
|
"passwordValidationAltText": "密码必须至少包含8个字符,包括大小写字母、一个数字和一个符号。",
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ import { Navigate } from 'react-router-dom';
|
|||||||
import { SuspenseFallback } from '@/components/suspense-fallback/suspense-fallback';
|
import { SuspenseFallback } from '@/components/suspense-fallback/suspense-fallback';
|
||||||
|
|
||||||
// Lazy load auth page components for better code splitting
|
// Lazy load auth page components for better code splitting
|
||||||
const LoginPage = lazy(() => import('@/pages/auth/login-page'));
|
const LoginPage = lazy(() => import('@/pages/auth/LoginPage'));
|
||||||
const SignupPage = lazy(() => import('@/pages/auth/signup-page'));
|
const SignupPage = lazy(() => import('@/pages/auth/SignupPage'));
|
||||||
const ForgotPasswordPage = lazy(() => import('@/pages/auth/forgot-password-page'));
|
const ForgotPasswordPage = lazy(() => import('@/pages/auth/ForgotPasswordPage'));
|
||||||
const LoggingOutPage = lazy(() => import('@/pages/auth/logging-out'));
|
const LoggingOutPage = lazy(() => import('@/pages/auth/LoggingOutPage'));
|
||||||
const AuthenticatingPage = lazy(() => import('@/pages/auth/authenticating'));
|
const AuthenticatingPage = lazy(() => import('@/pages/auth/AuthenticatingPage'));
|
||||||
const VerifyResetEmailPage = lazy(() => import('@/pages/auth/verify-reset-email'));
|
const VerifyResetEmailPage = lazy(() => import('@/pages/auth/VerifyResetEmailPage'));
|
||||||
|
|
||||||
const authRoutes = [
|
const authRoutes = [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,17 +1,24 @@
|
|||||||
import { Empty, Typography } from 'antd';
|
import { Empty, Typography } from 'antd';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
type EmptyListPlaceholderProps = {
|
type EmptyListPlaceholderProps = {
|
||||||
imageSrc?: string;
|
imageSrc?: string;
|
||||||
imageHeight?: number;
|
imageHeight?: number;
|
||||||
text: string;
|
text?: string;
|
||||||
|
textKey?: string;
|
||||||
|
i18nNs?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
const EmptyListPlaceholder = ({
|
const EmptyListPlaceholder = ({
|
||||||
imageSrc = 'https://s3.us-west-2.amazonaws.com/worklenz.com/assets/empty-box.webp',
|
imageSrc = 'https://s3.us-west-2.amazonaws.com/worklenz.com/assets/empty-box.webp',
|
||||||
imageHeight = 60,
|
imageHeight = 60,
|
||||||
text,
|
text,
|
||||||
|
textKey,
|
||||||
|
i18nNs = 'task-list-table',
|
||||||
}: EmptyListPlaceholderProps) => {
|
}: EmptyListPlaceholderProps) => {
|
||||||
|
const { t } = useTranslation(i18nNs);
|
||||||
|
const description = textKey ? t(textKey) : text;
|
||||||
return (
|
return (
|
||||||
<Empty
|
<Empty
|
||||||
image={imageSrc}
|
image={imageSrc}
|
||||||
@@ -22,7 +29,7 @@ const EmptyListPlaceholder = ({
|
|||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
marginBlockStart: 24,
|
marginBlockStart: 24,
|
||||||
}}
|
}}
|
||||||
description={<Typography.Text type="secondary">{text}</Typography.Text>}
|
description={<Typography.Text type="secondary">{description}</Typography.Text>}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
import { Tooltip } from 'antd';
|
||||||
|
|
||||||
interface GroupProgressBarProps {
|
interface GroupProgressBarProps {
|
||||||
todoProgress: number;
|
todoProgress: number;
|
||||||
@@ -15,24 +16,34 @@ const GroupProgressBar: React.FC<GroupProgressBarProps> = ({
|
|||||||
groupType
|
groupType
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation('task-management');
|
const { t } = useTranslation('task-management');
|
||||||
|
console.log(todoProgress, doingProgress, doneProgress);
|
||||||
|
|
||||||
// Only show for priority and phase grouping
|
// Only show for priority and phase grouping
|
||||||
if (groupType !== 'priority' && groupType !== 'phase') {
|
if (groupType !== 'priority' && groupType !== 'phase') {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
const total = todoProgress + doingProgress + doneProgress;
|
const total = (todoProgress || 0) + (doingProgress || 0) + (doneProgress || 0);
|
||||||
|
|
||||||
// Don't show if no progress values exist
|
// Don't show if no progress values exist
|
||||||
if (total === 0) {
|
if (total === 0) {
|
||||||
return null;
|
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 (
|
return (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
{/* Compact progress text */}
|
{/* Compact progress text */}
|
||||||
<span className="text-xs text-gray-600 dark:text-gray-400 whitespace-nowrap font-medium">
|
<span className="text-xs text-gray-600 dark:text-gray-400 whitespace-nowrap font-medium">
|
||||||
{doneProgress}% {t('done')}
|
{doneProgress || 0}% {t('done')}
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{/* Compact progress bar */}
|
{/* Compact progress bar */}
|
||||||
@@ -40,27 +51,30 @@ const GroupProgressBar: React.FC<GroupProgressBarProps> = ({
|
|||||||
<div className="h-full flex">
|
<div className="h-full flex">
|
||||||
{/* Todo section - light green */}
|
{/* Todo section - light green */}
|
||||||
{todoProgress > 0 && (
|
{todoProgress > 0 && (
|
||||||
<div
|
<Tooltip title={tooltipContent} placement="top">
|
||||||
className="bg-green-200 dark:bg-green-800 transition-all duration-300"
|
<div
|
||||||
style={{ width: `${(todoProgress / total) * 100}%` }}
|
className="bg-green-200 dark:bg-green-800 transition-all duration-300"
|
||||||
title={`${t('todo')}: ${todoProgress}%`}
|
style={{ width: `${(todoProgress / total) * 100}%` }}
|
||||||
/>
|
/>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{/* Doing section - medium green */}
|
{/* Doing section - medium green */}
|
||||||
{doingProgress > 0 && (
|
{doingProgress > 0 && (
|
||||||
<div
|
<Tooltip title={tooltipContent} placement="top">
|
||||||
className="bg-green-400 dark:bg-green-600 transition-all duration-300"
|
<div
|
||||||
style={{ width: `${(doingProgress / total) * 100}%` }}
|
className="bg-green-400 dark:bg-green-600 transition-all duration-300"
|
||||||
title={`${t('inProgress')}: ${doingProgress}%`}
|
style={{ width: `${(doingProgress / total) * 100}%` }}
|
||||||
/>
|
/>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{/* Done section - dark green */}
|
{/* Done section - dark green */}
|
||||||
{doneProgress > 0 && (
|
{doneProgress > 0 && (
|
||||||
<div
|
<Tooltip title={tooltipContent} placement="top">
|
||||||
className="bg-green-600 dark:bg-green-400 transition-all duration-300"
|
<div
|
||||||
style={{ width: `${(doneProgress / total) * 100}%` }}
|
className="bg-green-600 dark:bg-green-400 transition-all duration-300"
|
||||||
title={`${t('done')}: ${doneProgress}%`}
|
style={{ width: `${(doneProgress / total) * 100}%` }}
|
||||||
/>
|
/>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -68,22 +82,25 @@ const GroupProgressBar: React.FC<GroupProgressBarProps> = ({
|
|||||||
{/* Small legend dots with better spacing */}
|
{/* Small legend dots with better spacing */}
|
||||||
<div className="flex items-center gap-1">
|
<div className="flex items-center gap-1">
|
||||||
{todoProgress > 0 && (
|
{todoProgress > 0 && (
|
||||||
<div
|
<Tooltip title={tooltipContent} placement="top">
|
||||||
className="w-1.5 h-1.5 bg-green-200 dark:bg-green-800 rounded-full"
|
<div
|
||||||
title={`${t('todo')}: ${todoProgress}%`}
|
className="w-1.5 h-1.5 bg-green-200 dark:bg-green-800 rounded-full"
|
||||||
/>
|
/>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{doingProgress > 0 && (
|
{doingProgress > 0 && (
|
||||||
<div
|
<Tooltip title={tooltipContent} placement="top">
|
||||||
className="w-1.5 h-1.5 bg-green-400 dark:bg-green-600 rounded-full"
|
<div
|
||||||
title={`${t('inProgress')}: ${doingProgress}%`}
|
className="w-1.5 h-1.5 bg-green-400 dark:bg-green-600 rounded-full"
|
||||||
/>
|
/>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
{doneProgress > 0 && (
|
{doneProgress > 0 && (
|
||||||
<div
|
<Tooltip title={tooltipContent} placement="top">
|
||||||
className="w-1.5 h-1.5 bg-green-600 dark:bg-green-400 rounded-full"
|
<div
|
||||||
title={`${t('done')}: ${doneProgress}%`}
|
className="w-1.5 h-1.5 bg-green-600 dark:bg-green-400 rounded-full"
|
||||||
/>
|
/>
|
||||||
|
</Tooltip>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,15 +1,29 @@
|
|||||||
import React, { useMemo, useCallback, useState } from 'react';
|
import React, { useMemo, useCallback, useState } from 'react';
|
||||||
import { useDroppable } from '@dnd-kit/core';
|
import { useDroppable } from '@dnd-kit/core';
|
||||||
// @ts-ignore: Heroicons module types
|
// @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 { Checkbox, Dropdown, Menu, Input, Modal, Badge, Flex } from 'antd';
|
||||||
import GroupProgressBar from './GroupProgressBar';
|
import GroupProgressBar from './GroupProgressBar';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { getContrastColor } from '@/utils/colorUtils';
|
import { getContrastColor } from '@/utils/colorUtils';
|
||||||
import { useAppSelector } from '@/hooks/useAppSelector';
|
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||||
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
import { useAppDispatch } from '@/hooks/useAppDispatch';
|
||||||
import { selectSelectedTaskIds, selectTask, deselectTask } from '@/features/task-management/selection.slice';
|
import {
|
||||||
import { selectGroups, fetchTasksV3, selectAllTasksArray } from '@/features/task-management/task-management.slice';
|
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 { selectCurrentGrouping } from '@/features/task-management/grouping.slice';
|
||||||
import { statusApiService } from '@/api/taskAttributes/status/status.api.service';
|
import { statusApiService } from '@/api/taskAttributes/status/status.api.service';
|
||||||
import { phasesApiService } from '@/api/taskAttributes/phases/phases.api.service';
|
import { phasesApiService } from '@/api/taskAttributes/phases/phases.api.service';
|
||||||
@@ -38,7 +52,12 @@ interface TaskGroupHeaderProps {
|
|||||||
projectId: string;
|
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 { t } = useTranslation('task-management');
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
const selectedTaskIds = useAppSelector(selectSelectedTaskIds);
|
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 { statusCategories, status: statusList } = useAppSelector(state => state.taskStatusReducer);
|
||||||
const { trackMixpanelEvent } = useMixpanelTracking();
|
const { trackMixpanelEvent } = useMixpanelTracking();
|
||||||
const { isOwnerOrAdmin } = useAuthService();
|
const { isOwnerOrAdmin } = useAuthService();
|
||||||
|
|
||||||
const [dropdownVisible, setDropdownVisible] = useState(false);
|
const [dropdownVisible, setDropdownVisible] = useState(false);
|
||||||
|
|
||||||
const [isRenaming, setIsRenaming] = useState(false);
|
const [isRenaming, setIsRenaming] = useState(false);
|
||||||
const [isChangingCategory, setIsChangingCategory] = useState(false);
|
const [isChangingCategory, setIsChangingCategory] = useState(false);
|
||||||
const [isEditingName, setIsEditingName] = useState(false);
|
const [isEditingName, setIsEditingName] = useState(false);
|
||||||
const [editingName, setEditingName] = useState(group.name);
|
const [editingName, setEditingName] = useState(group.name);
|
||||||
|
|
||||||
const headerBackgroundColor = group.color || '#F0F0F0'; // Default light gray if no color
|
const headerBackgroundColor = group.color || '#F0F0F0'; // Default light gray if no color
|
||||||
const headerTextColor = getContrastColor(headerBackgroundColor);
|
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 we're grouping by status, show progress based on task completion
|
||||||
if (currentGrouping === 'status') {
|
if (currentGrouping === 'status') {
|
||||||
// For status grouping, calculate based on task progress values
|
// For status grouping, calculate based on task progress values
|
||||||
const progressStats = tasksInCurrentGroup.reduce((acc, task) => {
|
const progressStats = tasksInCurrentGroup.reduce(
|
||||||
const progress = task.progress || 0;
|
(acc, task) => {
|
||||||
if (progress === 0) {
|
const progress = task.progress || 0;
|
||||||
acc.todo += 1;
|
if (progress === 0) {
|
||||||
} else if (progress === 100) {
|
acc.todo += 1;
|
||||||
acc.done += 1;
|
} else if (progress === 100) {
|
||||||
} else {
|
acc.done += 1;
|
||||||
acc.doing += 1;
|
} else {
|
||||||
}
|
acc.doing += 1;
|
||||||
return acc;
|
}
|
||||||
}, { todo: 0, doing: 0, done: 0 });
|
return acc;
|
||||||
|
},
|
||||||
|
{ todo: 0, doing: 0, done: 0 }
|
||||||
|
);
|
||||||
|
|
||||||
const totalTasks = tasksInCurrentGroup.length;
|
const totalTasks = tasksInCurrentGroup.length;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
todoProgress: totalTasks > 0 ? Math.round((progressStats.todo / totalTasks) * 100) : 0,
|
todoProgress: totalTasks > 0 ? Math.round((progressStats.todo / totalTasks) * 100) || 0 : 0,
|
||||||
doingProgress: totalTasks > 0 ? Math.round((progressStats.doing / totalTasks) * 100) : 0,
|
doingProgress:
|
||||||
doneProgress: totalTasks > 0 ? Math.round((progressStats.done / totalTasks) * 100) : 0,
|
totalTasks > 0 ? Math.round((progressStats.doing / totalTasks) * 100) || 0 : 0,
|
||||||
|
doneProgress: totalTasks > 0 ? Math.round((progressStats.done / totalTasks) * 100) || 0 : 0,
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
// For priority/phase grouping, show progress based on status distribution
|
// For priority/phase grouping, show progress based on status distribution
|
||||||
// Use a simplified approach based on status names and common patterns
|
// Use a simplified approach based on status names and common patterns
|
||||||
const statusCounts = tasksInCurrentGroup.reduce((acc, task) => {
|
const statusCounts = tasksInCurrentGroup.reduce(
|
||||||
// Find the status by ID first
|
(acc, task) => {
|
||||||
const statusInfo = statusList.find(s => s.id === task.status);
|
// Find the status by ID first
|
||||||
const statusName = statusInfo?.name?.toLowerCase() || task.status?.toLowerCase() || '';
|
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')) {
|
// Categorize based on common status name patterns
|
||||||
acc.todo += 1;
|
if (
|
||||||
} else if (statusName.includes('doing') || statusName.includes('progress') || statusName.includes('active') || statusName.includes('working') || statusName.includes('development')) {
|
statusName.includes('todo') ||
|
||||||
acc.doing += 1;
|
statusName.includes('to do') ||
|
||||||
} else if (statusName.includes('done') || statusName.includes('completed') || statusName.includes('finished') || statusName.includes('closed') || statusName.includes('resolved')) {
|
statusName.includes('pending') ||
|
||||||
acc.done += 1;
|
statusName.includes('open') ||
|
||||||
} else {
|
statusName.includes('backlog')
|
||||||
// Default unknown statuses to "doing" (in progress)
|
) {
|
||||||
acc.doing += 1;
|
acc.todo += 1;
|
||||||
}
|
} else if (
|
||||||
return acc;
|
statusName.includes('doing') ||
|
||||||
}, { todo: 0, doing: 0, done: 0 });
|
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;
|
const totalTasks = tasksInCurrentGroup.length;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
todoProgress: totalTasks > 0 ? Math.round((statusCounts.todo / totalTasks) * 100) : 0,
|
todoProgress: totalTasks > 0 ? Math.round((statusCounts.todo / totalTasks) * 100) || 0 : 0,
|
||||||
doingProgress: totalTasks > 0 ? Math.round((statusCounts.doing / totalTasks) * 100) : 0,
|
doingProgress:
|
||||||
doneProgress: totalTasks > 0 ? Math.round((statusCounts.done / totalTasks) * 100) : 0,
|
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]);
|
}, [currentGroup, allTasks, statusList, currentGrouping]);
|
||||||
@@ -141,30 +186,34 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
if (tasksInGroup.length === 0) {
|
if (tasksInGroup.length === 0) {
|
||||||
return { isAllSelected: false, isPartiallySelected: false };
|
return { isAllSelected: false, isPartiallySelected: false };
|
||||||
}
|
}
|
||||||
|
|
||||||
const selectedTasksInGroup = tasksInGroup.filter(taskId => selectedTaskIds.includes(taskId));
|
const selectedTasksInGroup = tasksInGroup.filter(taskId => selectedTaskIds.includes(taskId));
|
||||||
const allSelected = selectedTasksInGroup.length === tasksInGroup.length;
|
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 };
|
return { isAllSelected: allSelected, isPartiallySelected: partiallySelected };
|
||||||
}, [tasksInGroup, selectedTaskIds]);
|
}, [tasksInGroup, selectedTaskIds]);
|
||||||
|
|
||||||
// Handle select all checkbox change
|
// Handle select all checkbox change
|
||||||
const handleSelectAllChange = useCallback((e: any) => {
|
const handleSelectAllChange = useCallback(
|
||||||
e.stopPropagation();
|
(e: any) => {
|
||||||
|
e.stopPropagation();
|
||||||
if (isAllSelected) {
|
|
||||||
// Deselect all tasks in this group
|
if (isAllSelected) {
|
||||||
tasksInGroup.forEach(taskId => {
|
// Deselect all tasks in this group
|
||||||
dispatch(deselectTask(taskId));
|
tasksInGroup.forEach(taskId => {
|
||||||
});
|
dispatch(deselectTask(taskId));
|
||||||
} else {
|
});
|
||||||
// Select all tasks in this group
|
} else {
|
||||||
tasksInGroup.forEach(taskId => {
|
// Select all tasks in this group
|
||||||
dispatch(selectTask(taskId));
|
tasksInGroup.forEach(taskId => {
|
||||||
});
|
dispatch(selectTask(taskId));
|
||||||
}
|
});
|
||||||
}, [dispatch, isAllSelected, tasksInGroup]);
|
}
|
||||||
|
},
|
||||||
|
[dispatch, isAllSelected, tasksInGroup]
|
||||||
|
);
|
||||||
|
|
||||||
// Handle inline name editing
|
// Handle inline name editing
|
||||||
const handleNameSave = useCallback(async () => {
|
const handleNameSave = useCallback(async () => {
|
||||||
@@ -184,24 +233,22 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
name: editingName.trim(),
|
name: editingName.trim(),
|
||||||
project_id: projectId,
|
project_id: projectId,
|
||||||
};
|
};
|
||||||
|
|
||||||
await statusApiService.updateNameOfStatus(statusId, body, projectId);
|
await statusApiService.updateNameOfStatus(statusId, body, projectId);
|
||||||
trackMixpanelEvent(evt_project_board_column_setting_click, { Rename: 'Status' });
|
trackMixpanelEvent(evt_project_board_column_setting_click, { Rename: 'Status' });
|
||||||
dispatch(fetchStatuses(projectId));
|
dispatch(fetchStatuses(projectId));
|
||||||
|
|
||||||
} else if (currentGrouping === 'phase') {
|
} else if (currentGrouping === 'phase') {
|
||||||
// Extract phase ID from group ID (format: "phase-{phaseId}")
|
// Extract phase ID from group ID (format: "phase-{phaseId}")
|
||||||
const phaseId = group.id.replace('phase-', '');
|
const phaseId = group.id.replace('phase-', '');
|
||||||
const body = { id: phaseId, name: editingName.trim() };
|
const body = { id: phaseId, name: editingName.trim() };
|
||||||
|
|
||||||
await phasesApiService.updateNameOfPhase(phaseId, body as ITaskPhase, projectId);
|
await phasesApiService.updateNameOfPhase(phaseId, body as ITaskPhase, projectId);
|
||||||
trackMixpanelEvent(evt_project_board_column_setting_click, { Rename: 'Phase' });
|
trackMixpanelEvent(evt_project_board_column_setting_click, { Rename: 'Phase' });
|
||||||
dispatch(fetchPhasesByProjectId(projectId));
|
dispatch(fetchPhasesByProjectId(projectId));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh task list to get updated group names
|
// Refresh task list to get updated group names
|
||||||
dispatch(fetchTasksV3(projectId));
|
dispatch(fetchTasksV3(projectId));
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error('Error renaming group:', error);
|
logger.error('Error renaming group:', error);
|
||||||
setEditingName(group.name);
|
setEditingName(group.name);
|
||||||
@@ -209,24 +256,39 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
setIsEditingName(false);
|
setIsEditingName(false);
|
||||||
setIsRenaming(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) => {
|
const handleNameClick = useCallback(
|
||||||
e.stopPropagation();
|
(e: React.MouseEvent) => {
|
||||||
if (!isOwnerOrAdmin) return;
|
e.stopPropagation();
|
||||||
setIsEditingName(true);
|
if (!isOwnerOrAdmin) return;
|
||||||
setEditingName(group.name);
|
setIsEditingName(true);
|
||||||
}, [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);
|
setEditingName(group.name);
|
||||||
}
|
},
|
||||||
e.stopPropagation();
|
[group.name, isOwnerOrAdmin]
|
||||||
}, [group.name, handleNameSave]);
|
);
|
||||||
|
|
||||||
|
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(() => {
|
const handleNameBlur = useCallback(() => {
|
||||||
handleNameSave();
|
handleNameSave();
|
||||||
@@ -239,31 +301,31 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
setEditingName(group.name);
|
setEditingName(group.name);
|
||||||
}, [group.name]);
|
}, [group.name]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Handle category change
|
// Handle category change
|
||||||
const handleCategoryChange = useCallback(async (categoryId: string, e?: React.MouseEvent) => {
|
const handleCategoryChange = useCallback(
|
||||||
e?.stopPropagation();
|
async (categoryId: string, e?: React.MouseEvent) => {
|
||||||
if (isChangingCategory) return;
|
e?.stopPropagation();
|
||||||
|
if (isChangingCategory) return;
|
||||||
|
|
||||||
setIsChangingCategory(true);
|
setIsChangingCategory(true);
|
||||||
try {
|
try {
|
||||||
// Extract status ID from group ID (format: "status-{statusId}")
|
// Extract status ID from group ID (format: "status-{statusId}")
|
||||||
const statusId = group.id.replace('status-', '');
|
const statusId = group.id.replace('status-', '');
|
||||||
|
|
||||||
await statusApiService.updateStatusCategory(statusId, categoryId, projectId);
|
await statusApiService.updateStatusCategory(statusId, categoryId, projectId);
|
||||||
trackMixpanelEvent(evt_project_board_column_setting_click, { 'Change category': 'Status' });
|
trackMixpanelEvent(evt_project_board_column_setting_click, { 'Change category': 'Status' });
|
||||||
|
|
||||||
// Refresh status list and tasks
|
// Refresh status list and tasks
|
||||||
dispatch(fetchStatuses(projectId));
|
dispatch(fetchStatuses(projectId));
|
||||||
dispatch(fetchTasksV3(projectId));
|
dispatch(fetchTasksV3(projectId));
|
||||||
|
} catch (error) {
|
||||||
} catch (error) {
|
logger.error('Error changing category:', error);
|
||||||
logger.error('Error changing category:', error);
|
} finally {
|
||||||
} finally {
|
setIsChangingCategory(false);
|
||||||
setIsChangingCategory(false);
|
}
|
||||||
}
|
},
|
||||||
}, [group.id, projectId, dispatch, trackMixpanelEvent, isChangingCategory]);
|
[group.id, projectId, dispatch, trackMixpanelEvent, isChangingCategory]
|
||||||
|
);
|
||||||
|
|
||||||
// Create dropdown menu items
|
// Create dropdown menu items
|
||||||
const menuItems = useMemo(() => {
|
const menuItems = useMemo(() => {
|
||||||
@@ -273,7 +335,12 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
{
|
{
|
||||||
key: 'rename',
|
key: 'rename',
|
||||||
icon: <PencilIcon className="h-4 w-4" />,
|
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) => {
|
onClick: (e: any) => {
|
||||||
e?.domEvent?.stopPropagation();
|
e?.domEvent?.stopPropagation();
|
||||||
handleRenameGroup();
|
handleRenameGroup();
|
||||||
@@ -283,7 +350,7 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
|
|
||||||
// Only show "Change Category" when grouped by status
|
// Only show "Change Category" when grouped by status
|
||||||
if (currentGrouping === 'status') {
|
if (currentGrouping === 'status') {
|
||||||
const categorySubMenuItems = statusCategories.map((category) => ({
|
const categorySubMenuItems = statusCategories.map(category => ({
|
||||||
key: `category-${category.id}`,
|
key: `category-${category.id}`,
|
||||||
label: (
|
label: (
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
@@ -297,16 +364,23 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
},
|
},
|
||||||
}));
|
}));
|
||||||
|
|
||||||
items.push({
|
items.push({
|
||||||
key: 'changeCategory',
|
key: 'changeCategory',
|
||||||
icon: <ArrowPathIcon className="h-4 w-4" />,
|
icon: <ArrowPathIcon className="h-4 w-4" />,
|
||||||
label: t('changeCategory'),
|
label: t('changeCategory'),
|
||||||
children: categorySubMenuItems,
|
children: categorySubMenuItems,
|
||||||
} as any);
|
} as any);
|
||||||
}
|
}
|
||||||
|
|
||||||
return items;
|
return items;
|
||||||
}, [currentGrouping, handleRenameGroup, handleCategoryChange, isOwnerOrAdmin, statusCategories, t]);
|
}, [
|
||||||
|
currentGrouping,
|
||||||
|
handleRenameGroup,
|
||||||
|
handleCategoryChange,
|
||||||
|
isOwnerOrAdmin,
|
||||||
|
statusCategories,
|
||||||
|
t,
|
||||||
|
]);
|
||||||
|
|
||||||
// Make the group header droppable
|
// Make the group header droppable
|
||||||
const { isOver, setNodeRef } = useDroppable({
|
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 className="relative flex items-center">
|
||||||
<div
|
<div
|
||||||
ref={setNodeRef}
|
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)
|
zIndex: 25, // Higher than task rows but lower than column headers (z-30)
|
||||||
height: '36px',
|
height: '36px',
|
||||||
minHeight: '36px',
|
minHeight: '36px',
|
||||||
maxHeight: '36px'
|
maxHeight: '36px',
|
||||||
}}
|
}}
|
||||||
onClick={onToggle}
|
onClick={onToggle}
|
||||||
>
|
>
|
||||||
{/* Drag Handle Space - ultra minimal width */}
|
{/* Drag Handle Space - ultra minimal width */}
|
||||||
<div style={{ width: '20px' }} className="flex items-center justify-center">
|
<div style={{ width: '20px' }} className="flex items-center justify-center">
|
||||||
{/* Chevron button */}
|
{/* Chevron button */}
|
||||||
<button
|
<button
|
||||||
className="p-0 rounded-sm hover:shadow-lg hover:scale-105 transition-all duration-300 ease-out"
|
className="p-0 rounded-sm hover:shadow-lg hover:scale-105 transition-all duration-300 ease-out"
|
||||||
style={{ backgroundColor: 'transparent', color: headerTextColor }}
|
style={{ backgroundColor: 'transparent', color: headerTextColor }}
|
||||||
onClick={(e) => {
|
onClick={e => {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
onToggle();
|
onToggle();
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className="transition-transform duration-300 ease-out"
|
className="transition-transform duration-300 ease-out"
|
||||||
style={{
|
style={{
|
||||||
transform: isCollapsed ? 'rotate(0deg)' : 'rotate(90deg)',
|
transform: isCollapsed ? 'rotate(0deg)' : 'rotate(90deg)',
|
||||||
transformOrigin: 'center'
|
transformOrigin: 'center',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ChevronRightIcon className="h-3 w-3" style={{ color: headerTextColor }} />
|
<ChevronRightIcon className="h-3 w-3" style={{ color: headerTextColor }} />
|
||||||
@@ -365,100 +439,99 @@ const TaskGroupHeader: React.FC<TaskGroupHeaderProps> = ({ group, isCollapsed, o
|
|||||||
checked={isAllSelected}
|
checked={isAllSelected}
|
||||||
indeterminate={isPartiallySelected}
|
indeterminate={isPartiallySelected}
|
||||||
onChange={handleSelectAllChange}
|
onChange={handleSelectAllChange}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={e => e.stopPropagation()}
|
||||||
style={{
|
style={{
|
||||||
color: headerTextColor,
|
color: headerTextColor,
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Group indicator and name - no gap at all */}
|
{/* Group indicator and name - no gap at all */}
|
||||||
<div className="flex items-center flex-1 ml-1">
|
<div className="flex items-center flex-1 ml-1">
|
||||||
{/* Group name and count */}
|
{/* Group name and count */}
|
||||||
<div className="flex items-center">
|
<div className="flex items-center">
|
||||||
{isEditingName ? (
|
{isEditingName ? (
|
||||||
<Input
|
<Input
|
||||||
value={editingName}
|
value={editingName}
|
||||||
onChange={(e) => setEditingName(e.target.value)}
|
onChange={e => setEditingName(e.target.value)}
|
||||||
onKeyDown={handleNameKeyDown}
|
onKeyDown={handleNameKeyDown}
|
||||||
onBlur={handleNameBlur}
|
onBlur={handleNameBlur}
|
||||||
autoFocus
|
autoFocus
|
||||||
size="small"
|
size="small"
|
||||||
className="text-sm font-semibold"
|
className="text-sm font-semibold"
|
||||||
style={{
|
style={{
|
||||||
width: 'auto',
|
width: 'auto',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
||||||
color: headerTextColor,
|
color: headerTextColor,
|
||||||
border: '1px solid rgba(255, 255, 255, 0.3)'
|
border: '1px solid rgba(255, 255, 255, 0.3)',
|
||||||
}}
|
}}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={e => e.stopPropagation()}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<span
|
<span
|
||||||
className="text-sm font-semibold pr-2 cursor-pointer hover:underline"
|
className="text-sm font-semibold pr-2 cursor-pointer hover:underline"
|
||||||
style={{ color: headerTextColor }}
|
style={{ color: headerTextColor }}
|
||||||
onClick={handleNameClick}
|
onClick={handleNameClick}
|
||||||
>
|
>
|
||||||
{group.name}
|
{group.name}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
<span className="text-sm font-semibold ml-1" style={{ color: headerTextColor }}>
|
||||||
|
({group.count})
|
||||||
</span>
|
</span>
|
||||||
)}
|
</div>
|
||||||
<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>
|
</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 */}
|
{/* Progress Bar - sticky to the right edge during horizontal scroll */}
|
||||||
{(currentGrouping === 'priority' || currentGrouping === 'phase') &&
|
{(currentGrouping === 'priority' || currentGrouping === 'phase') &&
|
||||||
(groupProgressValues.todoProgress || groupProgressValues.doingProgress || groupProgressValues.doneProgress) && (
|
!(groupProgressValues.todoProgress === 0 && groupProgressValues.doingProgress === 0 && groupProgressValues.doneProgress === 0) && (
|
||||||
<div
|
<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"
|
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={{
|
style={{
|
||||||
position: 'sticky',
|
position: 'sticky',
|
||||||
right: '16px',
|
right: '16px',
|
||||||
zIndex: 35, // Higher than header
|
zIndex: 35, // Higher than header
|
||||||
minWidth: '160px',
|
minWidth: '160px',
|
||||||
height: '30px'
|
height: '30px',
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<GroupProgressBar
|
<GroupProgressBar
|
||||||
todoProgress={groupProgressValues.todoProgress}
|
todoProgress={groupProgressValues.todoProgress}
|
||||||
doingProgress={groupProgressValues.doingProgress}
|
doingProgress={groupProgressValues.doingProgress}
|
||||||
doneProgress={groupProgressValues.doneProgress}
|
doneProgress={groupProgressValues.doneProgress}
|
||||||
groupType={group.groupType || currentGrouping || ''}
|
groupType={group.groupType || currentGrouping || ''}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default TaskGroupHeader;
|
export default TaskGroupHeader;
|
||||||
|
|||||||
@@ -60,13 +60,13 @@ import { fetchPhasesByProjectId } from '@/features/projects/singleProject/phase/
|
|||||||
// Components
|
// Components
|
||||||
import TaskRowWithSubtasks from './TaskRowWithSubtasks';
|
import TaskRowWithSubtasks from './TaskRowWithSubtasks';
|
||||||
import TaskGroupHeader from './TaskGroupHeader';
|
import TaskGroupHeader from './TaskGroupHeader';
|
||||||
import ImprovedTaskFilters from '@/components/task-management/improved-task-filters';
|
|
||||||
import OptimizedBulkActionBar from '@/components/task-management/optimized-bulk-action-bar';
|
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 CustomColumnModal from '@/pages/projects/projectView/taskList/task-list-table/custom-columns/custom-column-modal/custom-column-modal';
|
||||||
import AddTaskRow from './components/AddTaskRow';
|
import AddTaskRow from './components/AddTaskRow';
|
||||||
import { AddCustomColumnButton, CustomColumnHeader } from './components/CustomColumnComponents';
|
import { AddCustomColumnButton, CustomColumnHeader } from './components/CustomColumnComponents';
|
||||||
import TaskListSkeleton from './components/TaskListSkeleton';
|
import TaskListSkeleton from './components/TaskListSkeleton';
|
||||||
import ConvertToSubtaskDrawer from '@/components/task-list-common/convert-to-subtask-drawer/convert-to-subtask-drawer';
|
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
|
// Empty Group Drop Zone Component
|
||||||
const EmptyGroupDropZone: React.FC<{
|
const EmptyGroupDropZone: React.FC<{
|
||||||
@@ -90,12 +90,28 @@ const EmptyGroupDropZone: React.FC<{
|
|||||||
isOver && active ? 'bg-blue-50 dark:bg-blue-900/20' : ''
|
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) => {
|
{visibleColumns.map((column, index) => {
|
||||||
const emptyColumnStyle = {
|
const emptyColumnStyle = {
|
||||||
width: column.width,
|
width: column.width,
|
||||||
flexShrink: 0,
|
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 (
|
return (
|
||||||
<div
|
<div
|
||||||
key={`empty-${column.id}`}
|
key={`empty-${column.id}`}
|
||||||
@@ -105,17 +121,6 @@ const EmptyGroupDropZone: React.FC<{
|
|||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</div>
|
</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 && (
|
{isOver && active && (
|
||||||
<div className="absolute inset-0 border-2 border-dashed border-blue-400 dark:border-blue-500 rounded-md pointer-events-none" />
|
<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 { projectId: urlProjectId } = useParams();
|
||||||
const { t } = useTranslation('task-list-table');
|
const { t } = useTranslation('task-list-table');
|
||||||
const { socket, connected } = useSocket();
|
const { socket, connected } = useSocket();
|
||||||
|
const themeMode = useAppSelector(state => state.themeReducer.mode);
|
||||||
|
const isDarkMode = themeMode === 'dark';
|
||||||
|
|
||||||
// Redux state selectors
|
// Redux state selectors
|
||||||
const allTasks = useAppSelector(selectAllTasksArray);
|
const allTasks = useAppSelector(selectAllTasksArray);
|
||||||
@@ -492,7 +499,7 @@ const TaskListV2Section: React.FC = () => {
|
|||||||
isAddTaskRow: true,
|
isAddTaskRow: true,
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
groupType: currentGrouping || 'status',
|
groupType: currentGrouping || 'status',
|
||||||
groupValue: group.id, // Use the actual database ID from backend
|
groupValue: group.id, // Send the UUID that backend expects
|
||||||
projectId: urlProjectId,
|
projectId: urlProjectId,
|
||||||
rowId: `add-task-${group.id}-0`,
|
rowId: `add-task-${group.id}-0`,
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
@@ -503,7 +510,7 @@ const TaskListV2Section: React.FC = () => {
|
|||||||
isAddTaskRow: true,
|
isAddTaskRow: true,
|
||||||
groupId: group.id,
|
groupId: group.id,
|
||||||
groupType: currentGrouping || 'status',
|
groupType: currentGrouping || 'status',
|
||||||
groupValue: group.id,
|
groupValue: group.id, // Send the UUID that backend expects
|
||||||
projectId: urlProjectId,
|
projectId: urlProjectId,
|
||||||
rowId: rowId,
|
rowId: rowId,
|
||||||
autoFocus: index === groupAddRows.length - 1, // Auto-focus the latest row
|
autoFocus: index === groupAddRows.length - 1, // Auto-focus the latest row
|
||||||
@@ -536,6 +543,7 @@ const TaskListV2Section: React.FC = () => {
|
|||||||
return virtuosoGroups.flatMap(group => group.tasks);
|
return virtuosoGroups.flatMap(group => group.tasks);
|
||||||
}, [virtuosoGroups]);
|
}, [virtuosoGroups]);
|
||||||
|
|
||||||
|
|
||||||
// Render functions
|
// Render functions
|
||||||
const renderGroup = useCallback(
|
const renderGroup = useCallback(
|
||||||
(groupIndex: number) => {
|
(groupIndex: number) => {
|
||||||
@@ -550,11 +558,7 @@ const TaskListV2Section: React.FC = () => {
|
|||||||
id: group.id,
|
id: group.id,
|
||||||
name: group.title,
|
name: group.title,
|
||||||
count: group.actualCount,
|
count: group.actualCount,
|
||||||
color: group.color,
|
color: isDarkMode ? group.color_code_dark : group.color,
|
||||||
todo_progress: group.todo_progress,
|
|
||||||
doing_progress: group.doing_progress,
|
|
||||||
done_progress: group.done_progress,
|
|
||||||
groupType: group.groupType,
|
|
||||||
}}
|
}}
|
||||||
isCollapsed={isGroupCollapsed}
|
isCollapsed={isGroupCollapsed}
|
||||||
onToggle={() => handleGroupCollapse(group.id)}
|
onToggle={() => handleGroupCollapse(group.id)}
|
||||||
@@ -685,13 +689,94 @@ const TaskListV2Section: React.FC = () => {
|
|||||||
</div>
|
</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 (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 (
|
return (
|
||||||
<div className="flex flex-col bg-white dark:bg-gray-900 h-full">
|
<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="flex-1 flex items-center justify-center">
|
||||||
<div className="text-center">
|
<div className="text-center">
|
||||||
<div className="text-lg font-medium text-gray-900 dark:text-white mb-2">
|
<div className="text-lg font-medium text-gray-900 dark:text-white mb-2">
|
||||||
@@ -812,19 +897,17 @@ const TaskListV2Section: React.FC = () => {
|
|||||||
{/* Drag Overlay */}
|
{/* Drag Overlay */}
|
||||||
<DragOverlay dropAnimation={{ duration: 200, easing: 'ease-in-out' }}>
|
<DragOverlay dropAnimation={{ duration: 200, easing: 'ease-in-out' }}>
|
||||||
{activeId ? (
|
{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
|
||||||
<div className="px-4 py-3">
|
className="bg-white dark:bg-gray-800 shadow-lg rounded-md border border-blue-400 dark:border-blue-500 opacity-90"
|
||||||
<div className="flex items-center gap-3">
|
style={{ width: visibleColumns.find(col => col.id === 'title')?.width || '300px' }}
|
||||||
<HolderOutlined className="text-blue-500 dark:text-blue-400" />
|
>
|
||||||
<div>
|
<div className="px-3 py-2">
|
||||||
<div className="text-sm font-medium text-gray-900 dark:text-white">
|
<div className="flex items-center gap-2">
|
||||||
{allTasks.find(task => task.id === activeId)?.name ||
|
<HolderOutlined className="text-gray-400 dark:text-gray-500 text-xs" />
|
||||||
allTasks.find(task => task.id === activeId)?.title ||
|
<div className="text-sm font-medium text-gray-900 dark:text-white truncate flex-1">
|
||||||
t('emptyStates.dragTaskFallback')}
|
{allTasks.find(task => task.id === activeId)?.name ||
|
||||||
</div>
|
allTasks.find(task => task.id === activeId)?.title ||
|
||||||
<div className="text-xs text-gray-500 dark:text-gray-400">
|
t('emptyStates.dragTaskFallback')}
|
||||||
{allTasks.find(task => task.id === activeId)?.task_key}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -125,9 +125,9 @@ const AddTaskRow: React.FC<AddTaskRowProps> = memo(({
|
|||||||
return <div className="border-r border-gray-200 dark:border-gray-700" style={labelsStyle} />;
|
return <div className="border-r border-gray-200 dark:border-gray-700" style={labelsStyle} />;
|
||||||
case 'title':
|
case 'title':
|
||||||
return (
|
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="flex items-center w-full h-full">
|
||||||
<div className="w-4 mr-1" />
|
<div className="w-1 mr-1" />
|
||||||
|
|
||||||
{!isAdding ? (
|
{!isAdding ? (
|
||||||
<button
|
<button
|
||||||
@@ -165,7 +165,7 @@ const AddTaskRow: React.FC<AddTaskRowProps> = memo(({
|
|||||||
}, [isAdding, taskName, handleAddTask, handleCancel, handleKeyDown, t]);
|
}, [isAdding, taskName, handleAddTask, handleCancel, handleKeyDown, t]);
|
||||||
|
|
||||||
return (
|
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) => (
|
{visibleColumns.map((column, index) => (
|
||||||
<React.Fragment key={column.id}>
|
<React.Fragment key={column.id}>
|
||||||
{renderColumn(column.id, column.width)}
|
{renderColumn(column.id, column.width)}
|
||||||
|
|||||||
@@ -526,9 +526,25 @@ const taskManagementSlice = createSlice({
|
|||||||
},
|
},
|
||||||
addTaskToGroup: (state, action: PayloadAction<{ task: Task; groupId: string }>) => {
|
addTaskToGroup: (state, action: PayloadAction<{ task: Task; groupId: string }>) => {
|
||||||
const { task, groupId } = action.payload;
|
const { task, groupId } = action.payload;
|
||||||
|
|
||||||
state.ids.push(task.id);
|
state.ids.push(task.id);
|
||||||
state.entities[task.id] = task;
|
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) {
|
if (group) {
|
||||||
group.taskIds.push(task.id);
|
group.taskIds.push(task.id);
|
||||||
}
|
}
|
||||||
@@ -1170,7 +1186,7 @@ export default taskManagementSlice.reducer;
|
|||||||
|
|
||||||
// V3 API selectors - no processing needed, data is pre-processed by backend
|
// V3 API selectors - no processing needed, data is pre-processed by backend
|
||||||
export const selectTaskGroupsV3 = (state: RootState) => state.taskManagement.groups;
|
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
|
// Column-related selectors
|
||||||
export const selectColumns = (state: RootState) => state.taskManagement.columns;
|
export const selectColumns = (state: RootState) => state.taskManagement.columns;
|
||||||
|
|||||||
@@ -855,10 +855,11 @@ export const useTaskSocketHandlers = () => {
|
|||||||
// For priority grouping, use priority field (which contains the priority UUID)
|
// For priority grouping, use priority field (which contains the priority UUID)
|
||||||
groupId = data.priority;
|
groupId = data.priority;
|
||||||
} else if (grouping === 'phase') {
|
} else if (grouping === 'phase') {
|
||||||
// For phase grouping, use phase_id
|
// For phase grouping, use phase_id, or 'Unmapped' if no phase_id
|
||||||
groupId = data.phase_id;
|
groupId = data.phase_id || 'Unmapped';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Use addTaskToGroup with the actual group UUID
|
// Use addTaskToGroup with the actual group UUID
|
||||||
dispatch(addTaskToGroup({ task, groupId: groupId || '' }));
|
dispatch(addTaskToGroup({ task, groupId: groupId || '' }));
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ const ForgotPasswordPage = () => {
|
|||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
prefix={<UserOutlined />}
|
prefix={<UserOutlined />}
|
||||||
placeholder={t('emailPlaceholder')}
|
placeholder={t('emailPlaceholder', {defaultValue: 'Enter your email'})}
|
||||||
size="large"
|
size="large"
|
||||||
style={{ borderRadius: 4 }}
|
style={{ borderRadius: 4 }}
|
||||||
/>
|
/>
|
||||||
@@ -134,7 +134,7 @@ const ForgotPasswordPage = () => {
|
|||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
style={{ borderRadius: 4 }}
|
style={{ borderRadius: 4 }}
|
||||||
>
|
>
|
||||||
{t('resetPasswordButton')}
|
{t('resetPasswordButton', {defaultValue: 'Reset Password'})}
|
||||||
</Button>
|
</Button>
|
||||||
<Typography.Text style={{ textAlign: 'center' }}>{t('orText')}</Typography.Text>
|
<Typography.Text style={{ textAlign: 'center' }}>{t('orText')}</Typography.Text>
|
||||||
<Link to="/auth/login">
|
<Link to="/auth/login">
|
||||||
@@ -146,7 +146,7 @@ const ForgotPasswordPage = () => {
|
|||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{t('returnToLoginButton')}
|
{t('returnToLoginButton', {defaultValue: 'Return to Login'})}
|
||||||
</Button>
|
</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</Flex>
|
</Flex>
|
||||||
@@ -5,6 +5,8 @@ import { useMediaQuery } from 'react-responsive';
|
|||||||
import { LockOutlined, MailOutlined, UserOutlined } from '@ant-design/icons';
|
import { LockOutlined, MailOutlined, UserOutlined } from '@ant-design/icons';
|
||||||
import { Form, Card, Input, Flex, Button, Typography, Space, message } from 'antd/es';
|
import { Form, Card, Input, Flex, Button, Typography, Space, message } from 'antd/es';
|
||||||
import { Rule } from 'antd/es/form';
|
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 googleIcon from '@/assets/images/google-icon.png';
|
||||||
import PageHeader from '@components/AuthPageHeader';
|
import PageHeader from '@components/AuthPageHeader';
|
||||||
@@ -297,6 +299,10 @@ const SignupPage = () => {
|
|||||||
min: 8,
|
min: 8,
|
||||||
message: t('passwordMinCharacterRequired'),
|
message: t('passwordMinCharacterRequired'),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
max: 32,
|
||||||
|
message: t('passwordMaxCharacterRequired'),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#])/,
|
pattern: /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&#])/,
|
||||||
message: t('passwordPatternRequired'),
|
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 (
|
return (
|
||||||
<Card
|
<Card
|
||||||
style={{
|
style={{
|
||||||
@@ -317,7 +355,7 @@ const SignupPage = () => {
|
|||||||
}}
|
}}
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
>
|
>
|
||||||
<PageHeader description={t('headerDescription')} />
|
<PageHeader description={t('headerDescription', {defaultValue: 'Sign up to get started'})} />
|
||||||
<Form
|
<Form
|
||||||
form={form}
|
form={form}
|
||||||
name="signup"
|
name="signup"
|
||||||
@@ -331,35 +369,72 @@ const SignupPage = () => {
|
|||||||
name: urlParams.name,
|
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
|
<Input
|
||||||
prefix={<UserOutlined />}
|
prefix={<UserOutlined />}
|
||||||
placeholder={t('namePlaceholder')}
|
placeholder={t('namePlaceholder', {defaultValue: 'Enter your full name'})}
|
||||||
size="large"
|
size="large"
|
||||||
style={{ borderRadius: 4 }}
|
style={{ borderRadius: 4 }}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</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
|
<Input
|
||||||
prefix={<MailOutlined />}
|
prefix={<MailOutlined />}
|
||||||
placeholder={t('emailPlaceholder')}
|
placeholder={t('emailPlaceholder', {defaultValue: 'Enter your email'})}
|
||||||
size="large"
|
size="large"
|
||||||
style={{ borderRadius: 4 }}
|
style={{ borderRadius: 4 }}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</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>
|
<div>
|
||||||
<Input.Password
|
<Input.Password
|
||||||
prefix={<LockOutlined />}
|
prefix={<LockOutlined />}
|
||||||
placeholder={t('strongPasswordPlaceholder')}
|
placeholder={t('strongPasswordPlaceholder', {defaultValue: 'Enter a strong password'})}
|
||||||
size="large"
|
size="large"
|
||||||
style={{ borderRadius: 4 }}
|
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 }}>
|
<Typography.Text type="secondary" style={{ fontSize: 12, marginTop: 4, marginBottom: 0, display: 'block' }}>
|
||||||
{t('passwordValidationAltText')}
|
{t('passwordGuideline', {
|
||||||
|
defaultValue: 'Password must be at least 8 characters, include uppercase and lowercase letters, a number, and a special character.'
|
||||||
|
})}
|
||||||
</Typography.Text>
|
</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>
|
</div>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
@@ -416,7 +491,7 @@ const SignupPage = () => {
|
|||||||
<Form.Item>
|
<Form.Item>
|
||||||
<Space>
|
<Space>
|
||||||
<Typography.Text style={{ fontSize: 14 }}>
|
<Typography.Text style={{ fontSize: 14 }}>
|
||||||
{t('alreadyHaveAccountText')}
|
{t('alreadyHaveAccountText', {defaultValue: 'Already have an account?'})}
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
|
|
||||||
<Link
|
<Link
|
||||||
@@ -4,6 +4,8 @@ import { Form, Card, Input, Flex, Button, Typography, Result } from 'antd/es';
|
|||||||
import { LockOutlined } from '@ant-design/icons';
|
import { LockOutlined } from '@ant-design/icons';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { useMediaQuery } from 'react-responsive';
|
import { useMediaQuery } from 'react-responsive';
|
||||||
|
import { CheckCircleTwoTone, CloseCircleTwoTone } from '@ant-design/icons';
|
||||||
|
import { useAppSelector } from '@/hooks/useAppSelector';
|
||||||
|
|
||||||
import PageHeader from '@components/AuthPageHeader';
|
import PageHeader from '@components/AuthPageHeader';
|
||||||
|
|
||||||
@@ -36,6 +38,36 @@ const VerifyResetEmailPage = () => {
|
|||||||
const { t } = useTranslation('auth/verify-reset-email');
|
const { t } = useTranslation('auth/verify-reset-email');
|
||||||
|
|
||||||
const isMobile = useMediaQuery({ query: '(max-width: 576px)' });
|
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(() => {
|
useEffect(() => {
|
||||||
trackMixpanelEvent(evt_verify_reset_email_page_visit);
|
trackMixpanelEvent(evt_verify_reset_email_page_visit);
|
||||||
@@ -104,12 +136,38 @@ const VerifyResetEmailPage = () => {
|
|||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Input.Password
|
<div>
|
||||||
prefix={<LockOutlined />}
|
<Input.Password
|
||||||
placeholder={t('placeholder')}
|
prefix={<LockOutlined />}
|
||||||
size="large"
|
placeholder={t('placeholder')}
|
||||||
style={{ borderRadius: 4 }}
|
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>
|
||||||
<Form.Item
|
<Form.Item
|
||||||
name="confirmPassword"
|
name="confirmPassword"
|
||||||
@@ -136,6 +194,8 @@ const VerifyResetEmailPage = () => {
|
|||||||
placeholder={t('confirmPasswordPlaceholder')}
|
placeholder={t('confirmPasswordPlaceholder')}
|
||||||
size="large"
|
size="large"
|
||||||
style={{ borderRadius: 4 }}
|
style={{ borderRadius: 4 }}
|
||||||
|
value={form.getFieldValue('confirmPassword') || ''}
|
||||||
|
onChange={e => form.setFieldsValue({ confirmPassword: e.target.value })}
|
||||||
/>
|
/>
|
||||||
</Form.Item>
|
</Form.Item>
|
||||||
|
|
||||||
@@ -62,6 +62,7 @@ export interface TaskGroup {
|
|||||||
taskIds: string[];
|
taskIds: string[];
|
||||||
type?: 'status' | 'priority' | 'phase' | 'members';
|
type?: 'status' | 'priority' | 'phase' | 'members';
|
||||||
color?: string;
|
color?: string;
|
||||||
|
color_code_dark?: string;
|
||||||
collapsed?: boolean;
|
collapsed?: boolean;
|
||||||
groupValue?: string;
|
groupValue?: string;
|
||||||
// Add any other group properties as needed
|
// Add any other group properties as needed
|
||||||
|
|||||||
Reference in New Issue
Block a user