From f1c345c136c578fa4a8afd1cb3d8ae8359ac3b4b Mon Sep 17 00:00:00 2001 From: desperado1802 Date: Tue, 12 Dec 2023 12:36:58 +0200 Subject: [PATCH 1/2] added tooltips for the total time, and task total and today times --- apps/web/lib/features/task/task-times.tsx | 73 +++++++++++++------ .../features/team/user-team-card/index.tsx | 26 ++++--- apps/web/public/locales/ar/common.json | 8 +- apps/web/public/locales/bg/common.json | 12 ++- apps/web/public/locales/de/common.json | 8 +- apps/web/public/locales/en/common.json | 8 +- apps/web/public/locales/es/common.json | 8 +- apps/web/public/locales/fr/common.json | 8 +- apps/web/public/locales/he/common.json | 8 +- apps/web/public/locales/it/common.json | 8 +- apps/web/public/locales/nl/common.json | 8 +- apps/web/public/locales/pl/common.json | 8 +- apps/web/public/locales/pt/common.json | 8 +- apps/web/public/locales/ru/common.json | 8 +- apps/web/public/locales/zh/common.json | 8 +- 15 files changed, 160 insertions(+), 47 deletions(-) diff --git a/apps/web/lib/features/task/task-times.tsx b/apps/web/lib/features/task/task-times.tsx index e3382025f..fb1823799 100644 --- a/apps/web/lib/features/task/task-times.tsx +++ b/apps/web/lib/features/task/task-times.tsx @@ -2,7 +2,7 @@ import { secondsToTime } from '@app/helpers'; import { I_TeamMemberCardHook, useOrganizationTeams } from '@app/hooks'; import { IClassName, ITeamTask, Nullable, OT_Member } from '@app/interfaces'; import { clsxm } from '@app/utils'; -import { Text } from 'lib/components'; +import { Text, Tooltip } from 'lib/components'; import { useTranslation } from 'react-i18next'; type Props = { @@ -42,7 +42,13 @@ export function TaskTimes({ className, task, memberInfo, showDaily = true, showT {isBlock ? ( ) : ( - + )} ); @@ -52,37 +58,52 @@ function TimeInfo({ daily, total, showDaily = true, - showTotal = true + showTotal = true, + currentUser }: { daily: { h: number; m: number }; total: { h: number; m: number }; showDaily?: boolean; showTotal?: boolean; + currentUser: OT_Member | undefined; }) { const { t } = useTranslation(); + return ( <> {showDaily && ( -
- {t('common.TODAY')}: - - {daily.h}h : {daily.m}m - -
+ +
+ {t('common.TODAY')}: + + {daily.h}h : {daily.m}m + +
+
)} {showTotal && ( -
- {t('common.TOTAL')}: - - {total.h}h : {total.m}m - -
+
+ {t('common.TOTAL')}: + + {total.h}h : {total.m}m + +
+ )} ); @@ -136,6 +157,8 @@ export function TodayWorkedTime({ className, memberInfo }: Omit member.id === memberInfo?.member?.id); const { h, m } = secondsToTime( (currentMember?.totalTodayTasks && @@ -148,9 +171,15 @@ export function TodayWorkedTime({ className, memberInfo }: Omit - - {h ? h : '0'}h : {m ? m : '0'}m - + + + {h ? h : '0'}h : {m ? m : '0'}m + + ); } diff --git a/apps/web/lib/features/team/user-team-card/index.tsx b/apps/web/lib/features/team/user-team-card/index.tsx index bb068135a..5e66c687f 100644 --- a/apps/web/lib/features/team/user-team-card/index.tsx +++ b/apps/web/lib/features/team/user-team-card/index.tsx @@ -3,7 +3,7 @@ import { useCollaborative, useTMCardTaskEdit, useTaskStatistics, useTeamMemberCa import { IClassName, IOrganizationTeamList } from '@app/interfaces'; import { timerSecondsState } from '@app/stores'; import { clsxm } from '@app/utils'; -import { Card, InputField, Text, VerticalSeparator } from 'lib/components'; +import { Card, InputField, Text, Tooltip, VerticalSeparator } from 'lib/components'; import { DraggerIcon } from 'lib/components/svgs'; import { TaskTimes, TodayWorkedTime } from 'lib/features'; import { useTranslation } from 'react-i18next'; @@ -22,19 +22,23 @@ export function UserTeamCardHeader() {
{t('common.TASK')}
-
- {t('task.taskTableHead.TASK_WORK.TITLE')} -
- {t('common.TASK')} -
+ +
+ {t('task.taskTableHead.TASK_WORK.TITLE')} +
+ {t('common.TASK')} +
+
{t('common.ESTIMATE')}
-
- {t('task.taskTableHead.TOTAL_WORK.TITLE')} -
- {t('common.TODAY')} -
+ +
+ {t('task.taskTableHead.TOTAL_WORK.TITLE')} +
+ {t('common.TODAY')} +
+
); } diff --git a/apps/web/public/locales/ar/common.json b/apps/web/public/locales/ar/common.json index 466d54f52..916f6581b 100644 --- a/apps/web/public/locales/ar/common.json +++ b/apps/web/public/locales/ar/common.json @@ -450,6 +450,10 @@ "ASSIGN_NEW_TASK": "تعيين مهمة جديدة", "ASSIGNED_BY": "تم التعيين بواسطة", "NO_ONE_FOR_TASK": "لم يتم تعيين أحد لهذه المهمة", + "WORKED_TODAY_ON_TASK_TOOLTIP": "عمل اليوم على هذه المهمة لمدة", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "عمل على هذه المهمة لمدة إجمالية", + "WORKED_TODAY_ON_ALL_TOOLTIP": "عمل اليوم على الكل", + "TASKS_FOR_TOOLTIP": "المهام ل", "taskLabel": { "WORK_LABEL": "عمل", "TASK_ASSIGNED": "معينة", @@ -475,7 +479,9 @@ "TITLE": "إجمالي العمل", "DESCRIPTION": "اليوم", "LABEL": "إجمالي العمل اليوم" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "كم ساعة عمل الموظف اليوم والإجمالي في المهمة", + "WORKED_ON_TASK_HEADER_TOOLTIP": "كم ساعة عمل الموظف اليوم في جميع المهام للفريق المحدد" }, "CONFIRM_CLOSE_TASK": "يرجى تأكيد رغبتك في إغلاق المهمة" }, diff --git a/apps/web/public/locales/bg/common.json b/apps/web/public/locales/bg/common.json index ab40f88f9..b44c6e046 100644 --- a/apps/web/public/locales/bg/common.json +++ b/apps/web/public/locales/bg/common.json @@ -187,7 +187,9 @@ "SENT_EMAIL_VERIFICATION_RESEND": "за да изпратите кода отново, ако не сте го получили.", "INVITATIONS": "Поканени сте да се присъедините към", "CONFIRM_ACCEPT_INVITATION": "Сигурни ли сте, че искате да приемете поканата?", - "CONFIRM_REJECT_INVITATION": "Сигурни ли сте, че искате да отхвърлите поканата?" + "CONFIRM_REJECT_INVITATION": "Сигурни ли сте, че искате да отхвърлите поканата?", + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "How many hours employee worked for total and today on task", + "WORKED_ON_TASK_HEADER_TOOLTIP": "How many hours employee worked today on all tasks for selected Team" }, "profile": { @@ -454,6 +456,10 @@ "ASSIGN_NEW_TASK": "Възлагане на нова задача", "ASSIGNED_BY": "Възложено от", "NO_ONE_FOR_TASK": "Няма отговорник за тази задача", + "WORKED_TODAY_ON_TASK_TOOLTIP": "работено днес по тази задача за", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "работено по тази задача общо за", + "WORKED_TODAY_ON_ALL_TOOLTIP": "работено днес по всички", + "TASKS_FOR_TOOLTIP": "задачи за", "taskLabel": { "WORK_LABEL": "Работено", @@ -480,7 +486,9 @@ "TITLE": "Общо работено", "DESCRIPTION": "Днес", "LABEL": "Общо работено днес" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Колко часа работил служителят общо и днес по задача", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Колко часа е работил служителят днес по всички задачи за избрания екип" }, "CONFIRM_CLOSE_TASK": "Моля, потвърдете ако искате да затворите задачата" }, diff --git a/apps/web/public/locales/de/common.json b/apps/web/public/locales/de/common.json index ec3048498..aa4778574 100644 --- a/apps/web/public/locales/de/common.json +++ b/apps/web/public/locales/de/common.json @@ -445,6 +445,10 @@ "ASSIGN_NEW_TASK": "Neue Aufgabe zuweisen", "ASSIGNED_BY": "Zugewiesen von", "NO_ONE_FOR_TASK": "Niemand dieser Aufgabe zugewiesen", + "WORKED_TODAY_ON_TASK_TOOLTIP": "heute an dieser Aufgabe gearbeitet für", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "insgesamt an dieser Aufgabe gearbeitet für", + "WORKED_TODAY_ON_ALL_TOOLTIP": "heute an allem gearbeitet für", + "TASKS_FOR_TOOLTIP": "Aufgaben für", "taskLabel": { "WORK_LABEL": "Gearbeitet", "TASK_ASSIGNED": "Zugewiesen", @@ -470,7 +474,9 @@ "TITLE": "Insgesamt gearbeitet", "DESCRIPTION": "Heute", "LABEL": "Heute insgesamt gearbeitet" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Wie viele Stunden hat der Mitarbeiter heute und insgesamt an der Aufgabe gearbeitet", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Wie viele Stunden hat der Mitarbeiter heute an allen Aufgaben für das ausgewählte Team gearbeitet" }, "CONFIRM_CLOSE_TASK": "Bitte bestätigen Sie, ob Sie die Aufgabe schließen möchten" }, diff --git a/apps/web/public/locales/en/common.json b/apps/web/public/locales/en/common.json index 7bb852b95..911b1a567 100644 --- a/apps/web/public/locales/en/common.json +++ b/apps/web/public/locales/en/common.json @@ -447,6 +447,10 @@ "ASSIGN_NEW_TASK": "Assign new task", "ASSIGNED_BY": "Assigned By", "NO_ONE_FOR_TASK": "No One Assigned to this Task", + "WORKED_TODAY_ON_TASK_TOOLTIP": "worked today on this task for", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "worked on this task for a total of", + "WORKED_TODAY_ON_ALL_TOOLTIP": "worked today on all", + "TASKS_FOR_TOOLTIP": "tasks for", "taskLabel": { "WORK_LABEL": "Worked", "TASK_ASSIGNED": "Assigned", @@ -472,7 +476,9 @@ "TITLE": "Total Worked", "DESCRIPTION": "Today", "LABEL": "Total worked Today" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "How many hours employee worked for total and today on task", + "WORKED_ON_TASK_HEADER_TOOLTIP": "How many hours employee worked today on all tasks for selected Team" }, "CONFIRM_CLOSE_TASK": "Please confirm if you want to close the task" }, diff --git a/apps/web/public/locales/es/common.json b/apps/web/public/locales/es/common.json index f80f351b2..819cade4c 100644 --- a/apps/web/public/locales/es/common.json +++ b/apps/web/public/locales/es/common.json @@ -435,6 +435,10 @@ "ASSIGN_NEW_TASK": "Asignar nueva tarea", "ASSIGNED_BY": "Asignado por", "NO_ONE_FOR_TASK": "Nadie asignado a esta tarea", + "WORKED_TODAY_ON_TASK_TOOLTIP": "trabajó hoy en esta tarea durante", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "trabajó en esta tarea durante un total de", + "WORKED_TODAY_ON_ALL_TOOLTIP": "trabajó hoy en todas", + "TASKS_FOR_TOOLTIP": "tareas para", "taskLabel": { "WORK_LABEL": "Trabajado", "TASK_ASSIGNED": "Asignado", @@ -460,7 +464,9 @@ "TITLE": "Total trabajado", "DESCRIPTION": "Hoy", "LABEL": "Total trabajado hoy" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Cuántas horas trabajó el empleado en total y hoy en la tarea", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Cuántas horas trabajó el empleado hoy en todas las tareas para el equipo seleccionado" }, "CONFIRM_CLOSE_TASK": "Por favor, confirma si deseas cerrar la tarea" }, diff --git a/apps/web/public/locales/fr/common.json b/apps/web/public/locales/fr/common.json index f07338187..9ecf2dbab 100644 --- a/apps/web/public/locales/fr/common.json +++ b/apps/web/public/locales/fr/common.json @@ -440,6 +440,10 @@ "ASSIGN_NEW_TASK": "Assigner une nouvelle tâche", "ASSIGNED_BY": "Assigné par", "NO_ONE_FOR_TASK": "Personne n'est assigné à cette tâche", + "WORKED_TODAY_ON_TASK_TOOLTIP": "a travaillé aujourd'hui sur cette tâche pendant", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "a travaillé sur cette tâche pour un total de", + "WORKED_TODAY_ON_ALL_TOOLTIP": "a travaillé aujourd'hui sur toutes", + "TASKS_FOR_TOOLTIP": "tâches pour", "taskLabel": { "WORK_LABEL": "Travaillé", "TASK_ASSIGNED": "Assigné", @@ -465,7 +469,9 @@ "TITLE": "Total travaillé", "DESCRIPTION": "Aujourd'hui", "LABEL": "Total travaillé aujourd'hui" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Combien d'heures l'employé a-t-il travaillé au total et aujourd'hui sur la tâche", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Combien d'heures l'employé a-t-il travaillé aujourd'hui sur toutes les tâches pour l'équipe sélectionnée" }, "CONFIRM_CLOSE_TASK": "Veuillez confirmer si vous voulez fermer la tâche" }, diff --git a/apps/web/public/locales/he/common.json b/apps/web/public/locales/he/common.json index 9330a1f1a..70dac08fe 100644 --- a/apps/web/public/locales/he/common.json +++ b/apps/web/public/locales/he/common.json @@ -440,6 +440,10 @@ "ASSIGN_NEW_TASK": "הקצה משימה חדשה", "ASSIGNED_BY": "הוקצה על ידי", "NO_ONE_FOR_TASK": "אף אחד לא הוקצה למשימה זו", + "WORKED_TODAY_ON_TASK_TOOLTIP": "עבד היום על משימה זו למשך", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "עבד על משימה זו לסך הכל למשך", + "WORKED_TODAY_ON_ALL_TOOLTIP": "עבד היום על כל", + "TASKS_FOR_TOOLTIP": "משימות עבור", "taskLabel": { "WORK_LABEL": "עבד", "TASK_ASSIGNED": "הוקצה", @@ -465,7 +469,9 @@ "TITLE": "סך עבודה", "DESCRIPTION": "היום", "LABEL": "סך עבודה היום" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "כמה שעות עבד העובד בסך הכול והיום על המשימה", + "WORKED_ON_TASK_HEADER_TOOLTIP": "כמה שעות עבד העובד היום בכל המשימות לצוות שנבחר" }, "CONFIRM_CLOSE_TASK": "אנא אשר אם ברצונך לסגור את המשימה" }, diff --git a/apps/web/public/locales/it/common.json b/apps/web/public/locales/it/common.json index 20e197ad8..2ac528150 100644 --- a/apps/web/public/locales/it/common.json +++ b/apps/web/public/locales/it/common.json @@ -443,6 +443,10 @@ "ASSIGN_NEW_TASK": "Assign new task", "ASSIGNED_BY": "Assigned By", "NO_ONE_FOR_TASK": "No One Assigned to this Task", + "WORKED_TODAY_ON_TASK_TOOLTIP": "lavorato oggi su questo compito per", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "lavorato su questo compito per un totale di", + "WORKED_TODAY_ON_ALL_TOOLTIP": "lavorato oggi su tutto per", + "TASKS_FOR_TOOLTIP": "compiti per", "taskLabel": { "WORK_LABEL": "Worked", "TASK_ASSIGNED": "Assigned", @@ -468,7 +472,9 @@ "TITLE": "Total Worked", "DESCRIPTION": "Today", "LABEL": "Total worked Today" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Quante ore ha lavorato l'impiegato in totale e oggi sul compito", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Quante ore ha lavorato l'impiegato oggi su tutte le attività per il team selezionato" }, "CONFIRM_CLOSE_TASK": "Please confirm if you want to close the task" }, diff --git a/apps/web/public/locales/nl/common.json b/apps/web/public/locales/nl/common.json index 07d81d72a..5535ca7ea 100644 --- a/apps/web/public/locales/nl/common.json +++ b/apps/web/public/locales/nl/common.json @@ -443,6 +443,10 @@ "ASSIGN_NEW_TASK": "Nieuwe taak toewijzen", "ASSIGNED_BY": "Toegewezen door", "NO_ONE_FOR_TASK": "Niemand toegewezen aan deze taak", + "WORKED_TODAY_ON_TASK_TOOLTIP": "vandaag gewerkt aan deze taak voor", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "in totaal gewerkt aan deze taak voor", + "WORKED_TODAY_ON_ALL_TOOLTIP": "vandaag gewerkt aan alles voor", + "TASKS_FOR_TOOLTIP": "taken voor", "taskLabel": { "WORK_LABEL": "Gewerkt", "TASK_ASSIGNED": "Toegewezen", @@ -468,7 +472,9 @@ "TITLE": "Totaal gewerkt", "DESCRIPTION": "Vandaag", "LABEL": "Totaal gewerkt vandaag" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Hoeveel uur heeft de werknemer in totaal en vandaag aan de taak gewerkt", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Hoeveel uur heeft de werknemer vandaag gewerkt aan alle taken voor het geselecteerde team" }, "CONFIRM_CLOSE_TASK": "Bevestig als u de taak wilt sluiten" }, diff --git a/apps/web/public/locales/pl/common.json b/apps/web/public/locales/pl/common.json index c1d668bbf..6bf5934d4 100644 --- a/apps/web/public/locales/pl/common.json +++ b/apps/web/public/locales/pl/common.json @@ -443,6 +443,10 @@ "ASSIGN_NEW_TASK": "Assign new task", "ASSIGNED_BY": "Assigned By", "NO_ONE_FOR_TASK": "No One Assigned to this Task", + "WORKED_TODAY_ON_TASK_TOOLTIP": "pracował dziś nad tym zadaniem przez", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "pracował nad tym zadaniem przez łącznie", + "WORKED_TODAY_ON_ALL_TOOLTIP": "pracował dziś nad wszystkimi", + "TASKS_FOR_TOOLTIP": "zadania dla", "taskLabel": { "WORK_LABEL": "Worked", "TASK_ASSIGNED": "Assigned", @@ -468,7 +472,9 @@ "TITLE": "Total Worked", "DESCRIPTION": "Today", "LABEL": "Total worked Today" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Ile godzin pracował pracownik ogółem i dzisiaj nad zadaniem", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Ile godzin pracował pracownik dzisiaj nad wszystkimi zadaniami dla wybranego zespołu" }, "CONFIRM_CLOSE_TASK": "Please confirm if you want to close the task" }, diff --git a/apps/web/public/locales/pt/common.json b/apps/web/public/locales/pt/common.json index 9c42485e8..ed47d4d07 100644 --- a/apps/web/public/locales/pt/common.json +++ b/apps/web/public/locales/pt/common.json @@ -443,6 +443,10 @@ "ASSIGN_NEW_TASK": "Assign new task", "ASSIGNED_BY": "Assigned By", "NO_ONE_FOR_TASK": "No One Assigned to this Task", + "WORKED_TODAY_ON_TASK_TOOLTIP": "trabalhou hoje nesta tarefa por", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "trabalhou nesta tarefa por um total de", + "WORKED_TODAY_ON_ALL_TOOLTIP": "trabalhou hoje em todas", + "TASKS_FOR_TOOLTIP": "tarefas para", "taskLabel": { "WORK_LABEL": "Worked", "TASK_ASSIGNED": "Assigned", @@ -468,7 +472,9 @@ "TITLE": "Total Worked", "DESCRIPTION": "Today", "LABEL": "Total worked Today" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Quantas horas o funcionário trabalhou no total e hoje na tarefa", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Quantas horas o funcionário trabalhou hoje em todas as tarefas para a equipe selecionada" }, "CONFIRM_CLOSE_TASK": "Please confirm if you want to close the task" }, diff --git a/apps/web/public/locales/ru/common.json b/apps/web/public/locales/ru/common.json index 7c0a269b5..4468d2ae6 100644 --- a/apps/web/public/locales/ru/common.json +++ b/apps/web/public/locales/ru/common.json @@ -443,6 +443,10 @@ "ASSIGN_NEW_TASK": "Assign new task", "ASSIGNED_BY": "Assigned By", "NO_ONE_FOR_TASK": "No One Assigned to this Task", + "WORKED_TODAY_ON_TASK_TOOLTIP": "сегодня поработал по этой задаче", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "поработал на этой задаче в общей сложности", + "WORKED_TODAY_ON_ALL_TOOLTIP": "сегодня поработал над всеми", + "TASKS_FOR_TOOLTIP": "задачами для", "taskLabel": { "WORK_LABEL": "Worked", "TASK_ASSIGNED": "Assigned", @@ -468,7 +472,9 @@ "TITLE": "Total Worked", "DESCRIPTION": "Today", "LABEL": "Total worked Today" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "Сколько часов сотрудник поработал всего и сегодня по задаче", + "WORKED_ON_TASK_HEADER_TOOLTIP": "Сколько часов сотрудник поработал сегодня по всем задачам для выбранной команды" }, "CONFIRM_CLOSE_TASK": "Please confirm if you want to close the task" }, diff --git a/apps/web/public/locales/zh/common.json b/apps/web/public/locales/zh/common.json index 82ab1fae9..37b35aa86 100644 --- a/apps/web/public/locales/zh/common.json +++ b/apps/web/public/locales/zh/common.json @@ -420,6 +420,10 @@ "ASSIGN_NEW_TASK": "分配新任务", "ASSIGNED_BY": "分配者", "NO_ONE_FOR_TASK": "此任务未分配", + "WORKED_TODAY_ON_TASK_TOOLTIP": "今天在这个任务上工作了", + "WORKED_TOTAL_ON_TASK_TOOLTIP": "总共在这个任务上工作了", + "WORKED_TODAY_ON_ALL_TOOLTIP": "今天在所有任务上工作了", + "TASKS_FOR_TOOLTIP": "的任务", "taskLabel": { "WORK_LABEL": "已处理", "TASK_ASSIGNED": "已分配", @@ -445,7 +449,9 @@ "TITLE": "总共处理", "DESCRIPTION": "今天", "LABEL": "今天总共处理" - } + }, + "TOTAL_WORKED_TODAY_HEADER_TOOLTIP": "员工今天和总共在任务上工作了多少小时", + "WORKED_ON_TASK_HEADER_TOOLTIP": "员工今天在所选团队的所有任务上工作了多少小时" }, "CONFIRM_CLOSE_TASK": "请确认您是否要关闭此任务" }, From 77858070c59f3500c752e321c740d0da69a86270 Mon Sep 17 00:00:00 2001 From: desperado1802 Date: Tue, 12 Dec 2023 12:55:50 +0200 Subject: [PATCH 2/2] added the tooltips for block view too --- apps/web/lib/features/task/task-times.tsx | 76 ++++++++++++++++------- 1 file changed, 53 insertions(+), 23 deletions(-) diff --git a/apps/web/lib/features/task/task-times.tsx b/apps/web/lib/features/task/task-times.tsx index fb1823799..105fc5bbd 100644 --- a/apps/web/lib/features/task/task-times.tsx +++ b/apps/web/lib/features/task/task-times.tsx @@ -40,7 +40,14 @@ export function TaskTimes({ className, task, memberInfo, showDaily = true, showT return (
{isBlock ? ( - + ) : ( )}
@@ -59,13 +67,15 @@ function TimeInfo({ total, showDaily = true, showTotal = true, - currentUser + currentUser, + task }: { daily: { h: number; m: number }; total: { h: number; m: number }; showDaily?: boolean; showTotal?: boolean; currentUser: OT_Member | undefined; + task: Nullable; }) { const { t } = useTranslation(); @@ -73,6 +83,7 @@ function TimeInfo({ <> {showDaily && ( ; }) { const { t } = useTranslation(); return (
{showDaily && ( -
- - {t('common.WORKED_ON_TASK')} {t('common.TODAY')}: - - - {daily.h}h : {daily.m}m - -
+ +
+ + {t('common.WORKED_ON_TASK')} {t('common.TODAY')}: + + + {daily.h}h : {daily.m}m + +
+
)} {showTotal && ( -
- - {t('common.WORKED_ON_TASK')} {t('common.TOTAL')}: - - - {total.h}h : {total.m}m - -
+
+ + {t('common.WORKED_ON_TASK')} {t('common.TOTAL')}: + + + {total.h}h : {total.m}m + +
+ )}
);