diff --git a/apps/web/app/[locale]/profile/[memberId]/page.tsx b/apps/web/app/[locale]/profile/[memberId]/page.tsx index c03320293..f126141fe 100644 --- a/apps/web/app/[locale]/profile/[memberId]/page.tsx +++ b/apps/web/app/[locale]/profile/[memberId]/page.tsx @@ -7,7 +7,7 @@ import { ITimerStatusEnum, OT_Member } from '@app/interfaces'; import { clsxm, isValidUrl } from '@app/utils'; import clsx from 'clsx'; import { withAuthentication } from 'lib/app/authenticator'; -import { Avatar, Breadcrumb, Container, Text, VerticalSeparator } from 'lib/components'; +import { Avatar, Breadcrumb, Button, Container, Text, VerticalSeparator } from 'lib/components'; import { ArrowLeftIcon } from 'assets/svg'; import { TaskFilter, Timer, TimerStatus, UserProfileTask, getTimerStatusValue, useTaskFilter } from 'lib/features'; import { MainHeader, MainLayout } from 'lib/layout'; @@ -29,6 +29,7 @@ const Profile = React.memo(function ProfilePage({ params }: { params: { memberId const profile = useUserProfilePage(); const { user } = useAuthenticateUser(); const { isTrackingEnabled, activeTeam, activeTeamManagers } = useOrganizationTeams(); + const members = activeTeam?.members; const { getEmployeeDayPlans } = useDailyPlan(); const fullWidth = useRecoilValue(fullWidthState); const [activityFilter, setActivityFilter] = useState('Tasks'); @@ -75,71 +76,94 @@ const Profile = React.memo(function ProfilePage({ params }: { params: { memberId }, [getEmployeeDayPlans, profile.member?.employeeId]); // Example usage - + // div return ( <> - - - {/* Breadcrumb */} -
- - - - - + {Array.isArray(members) && members.length && !profile.member ? ( + +
+
+ + {t('common.MEMBER')} {t('common.NOT_FOUND')}! + + + + {t('pages.profile.MEMBER_NOT_FOUND_MSG_1')} + + + {t('pages.profile.MEMBER_NOT_FOUND_MSG_1')} + + + +
+
+ ) : ( + + + {/* Breadcrumb */} +
+ + + - {/* User Profile Detail */} -
- - - {profileIsAuthUser && isTrackingEnabled && ( - - )} -
- {/* TaskFilter */} - - - {/* Divider */} -
- {hook.tab == 'worked' && canSeeActivity && ( - -
- {Object.keys(activityScreens).map((filter, i) => ( -
- {i !== 0 && } -
changeActivityFilter(filter as FilterTab)} - > - {filter} -
-
- ))} +
-
- )} - - {hook.tab !== 'worked' || activityFilter == 'Tasks' ? ( - - ) : ( - activityScreens[activityFilter] ?? null + {/* User Profile Detail */} +
+ + + {profileIsAuthUser && isTrackingEnabled && ( + + )} +
+ {/* TaskFilter */} + + + {/* Divider */} +
+ {hook.tab == 'worked' && canSeeActivity && ( + +
+ {Object.keys(activityScreens).map((filter, i) => ( +
+ {i !== 0 && } +
changeActivityFilter(filter as FilterTab)} + > + {filter} +
+
+ ))} +
+
)} -
- + + + {hook.tab !== 'worked' || activityFilter == 'Tasks' ? ( + + ) : ( + activityScreens[activityFilter] ?? null + )} + + + )} ); }); diff --git a/apps/web/messages/ar.json b/apps/web/messages/ar.json index b689bb008..160c18824 100644 --- a/apps/web/messages/ar.json +++ b/apps/web/messages/ar.json @@ -229,8 +229,11 @@ "KANBAN_BOARD": "لوحة كانبان" }, "profile": { - "BREADCRUMB": "[\"مهام العضو\"]" - }, + "BREADCRUMB": "[\"مهام العضو\"]", + "MEMBER_NOT_FOUND_MSG_1": "العضو الذي تبحث عنه غير موجود في الفريق، يرجى المحاولة مرة أخرى ببحث مختلف.", + "MEMBER_NOT_FOUND_MSG_2": "إذا كنت تبحث عن عضو في فريق مختلف، يرجى تحديد الفريق من القائمة المنسدلة أعلاه.", + "GO_TO_HOME": "الذهاب إلى الصفحة الرئيسية" + }, "taskDetails": { "BREADCRUMB": "[\"تفاصيل المهمة\"]", "DESCRIPTION": "الوصف", diff --git a/apps/web/messages/bg.json b/apps/web/messages/bg.json index c8e2c0332..099e740ae 100644 --- a/apps/web/messages/bg.json +++ b/apps/web/messages/bg.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "Канбан дъска" }, "profile": { - "BREADCRUMB": "[\"Задачи за член\"]" + "BREADCRUMB": "[\"Задачи за член\"]", + "MEMBER_NOT_FOUND_MSG_1": "Членът, когото търсите, не съществува в отбора, моля опитайте да търсите с различен заявка.", + "MEMBER_NOT_FOUND_MSG_2": "Ако търсите член в различен отбор, моля изберете отбора от падащото меню по-горе.", + "GO_TO_HOME": "Отиди в началото" }, "taskDetails": { "BREADCRUMB": "[\"Детайли за задачата\"]", diff --git a/apps/web/messages/de.json b/apps/web/messages/de.json index 8044e2290..0ccb799f0 100644 --- a/apps/web/messages/de.json +++ b/apps/web/messages/de.json @@ -229,7 +229,11 @@ "KANBAN_BOARD": "Kanban-Board" }, "profile": { - "BREADCRUMB": "[\"Aufgaben des Mitglieds\"]" + "BREADCRUMB": "[\"Aufgaben des Mitglieds\"]", + "MEMBER_NOT_FOUND_MSG_1": "Das gesuchte Mitglied existiert nicht in einem Team. Bitte versuchen Sie, mit einer anderen Abfrage zu suchen.", + "MEMBER_NOT_FOUND_MSG_2": "Wenn Sie nach einem Mitglied in einem anderen Team suchen, wählen Sie bitte das Team aus dem Dropdown-Menü oben aus.", + "GO_TO_HOME": "Zur Startseite" + }, "taskDetails": { "BREADCRUMB": "[\"Aufgabendetails\"]", diff --git a/apps/web/messages/en.json b/apps/web/messages/en.json index 851bfd1d8..46fd065a9 100644 --- a/apps/web/messages/en.json +++ b/apps/web/messages/en.json @@ -226,7 +226,10 @@ "CONFIRM_REJECT_INVITATION": "Are you sure you want to reject the invitation?" }, "profile": { - "BREADCRUMB": "[\"Member Tasks\"]" + "BREADCRUMB": "[\"Member Tasks\"]", + "MEMBER_NOT_FOUND_MSG_1": "Member you are looking is not exist in a team please try to search with different query.", + "MEMBER_NOT_FOUND_MSG_2": "If you are looking for a member in a different team, please select the team from the dropdown above.", + "GO_TO_HOME": "Go to Home" }, "kanban": { "KANBAN_BOARD": "Kanban Board" diff --git a/apps/web/messages/es.json b/apps/web/messages/es.json index 4a2ddea5b..35b544ab4 100644 --- a/apps/web/messages/es.json +++ b/apps/web/messages/es.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "tablero kanban" }, "profile": { - "BREADCRUMB": "[\"Tareas de miembro\"]" + "BREADCRUMB": "[\"Tareas de miembro\"]", + "MEMBER_NOT_FOUND_MSG_1": "El miembro que estás buscando no existe en un equipo, por favor intenta buscar con una consulta diferente.", + "MEMBER_NOT_FOUND_MSG_2": "Si estás buscando un miembro en un equipo diferente, por favor selecciona el equipo del menú desplegable de arriba.", + "GO_TO_HOME": "Ir a la página de inicio" }, "taskDetails": { "BREADCRUMB": "[\"Detalles de la tarea\"]", diff --git a/apps/web/messages/fr.json b/apps/web/messages/fr.json index bc50d016a..315a10d0e 100644 --- a/apps/web/messages/fr.json +++ b/apps/web/messages/fr.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "Tableau Kanban" }, "profile": { - "BREADCRUMB": "[\"Tâches du membre\"]" + "BREADCRUMB": "[\"Tâches du membre\"]", + "MEMBER_NOT_FOUND_MSG_1": "Le membre que vous recherchez n'existe pas dans une équipe, veuillez essayer de rechercher avec une requête différente.", + "MEMBER_NOT_FOUND_MSG_2": "Si vous recherchez un membre dans une équipe différente, veuillez sélectionner l'équipe dans le menu déroulant ci-dessus.", + "GO_TO_HOME": "Aller à la page d'accueil" }, "taskDetails": { "BREADCRUMB": "[\"Détails de la tâche\"]", diff --git a/apps/web/messages/he.json b/apps/web/messages/he.json index 3c1b36a7c..503557f9f 100644 --- a/apps/web/messages/he.json +++ b/apps/web/messages/he.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "לוח Kanban" }, "profile": { - "BREADCRUMB": "[\"משימות חבר\"]" + "BREADCRUMB": "[\"משימות חבר\"]", + "MEMBER_NOT_FOUND_MSG_1": "החבר שאתה מחפש לא קיים בצוות, אנא נסה לחפש עם שאילתת חיפוש שונה.", + "MEMBER_NOT_FOUND_MSG_2": "אם אתה מחפש חבר בצוות שונה, אנא בחר את הצוות מהתפריט הנפתח למעלה.", + "GO_TO_HOME": "עבור לדף הבית" }, "taskDetails": { "BREADCRUMB": "[\"פרטי משימה\"]", diff --git a/apps/web/messages/it.json b/apps/web/messages/it.json index a6ff769ee..b444bb84b 100644 --- a/apps/web/messages/it.json +++ b/apps/web/messages/it.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "Tabellone Kanban" }, "profile": { - "BREADCRUMB": "[\"Compiti dei membri\"]" + "BREADCRUMB": "[\"Compiti dei membri\"]", + "MEMBER_NOT_FOUND_MSG_1": "Il membro che stai cercando non esiste in un team, prova a cercare con una query diversa.", + "MEMBER_NOT_FOUND_MSG_2": "Se stai cercando un membro in un team diverso, seleziona il team dal menu a discesa sopra.", + "GO_TO_HOME": "Vai alla Home" }, "taskDetails": { "BREADCRUMB": "[\"Dettagli attività\"]", diff --git a/apps/web/messages/nl.json b/apps/web/messages/nl.json index dff65f2a6..24296ad19 100644 --- a/apps/web/messages/nl.json +++ b/apps/web/messages/nl.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "Kanban-bord" }, "profile": { - "BREADCRUMB": "[\"Taken teamlid\"]" + "BREADCRUMB": "[\"Taken teamlid\"]", + "MEMBER_NOT_FOUND_MSG_1": "Het lid dat u zoekt, bestaat niet in een team, probeer te zoeken met een andere query.", + "MEMBER_NOT_FOUND_MSG_2": "Als u op zoek bent naar een lid in een ander team, selecteert u het team uit de vervolgkeuzelijst hierboven.", + "GO_TO_HOME": "Ga naar de startpagina" }, "taskDetails": { "BREADCRUMB": "[\"Taakdetails\"]", diff --git a/apps/web/messages/pl.json b/apps/web/messages/pl.json index 1598bc869..28f3f0a5a 100644 --- a/apps/web/messages/pl.json +++ b/apps/web/messages/pl.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "Tablica Kanbana" }, "profile": { - "BREADCRUMB": "[\"Member Tasks\"]" + "BREADCRUMB": "[\"Member Tasks\"]", + "MEMBER_NOT_FOUND_MSG_1": "Członek, którego szukasz, nie istnieje w zespole, spróbuj wyszukać z innym zapytaniem.", + "MEMBER_NOT_FOUND_MSG_2": "Jeśli szukasz członka w innym zespole, wybierz zespół z listy rozwijanej powyżej.", + "GO_TO_HOME": "Przejdź do strony głównej" }, "taskDetails": { "BREADCRUMB": "[\"Task Details\"]", diff --git a/apps/web/messages/pt.json b/apps/web/messages/pt.json index 058ad3a79..d8e2d55ed 100644 --- a/apps/web/messages/pt.json +++ b/apps/web/messages/pt.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "Quadro Kanban" }, "profile": { - "BREADCRUMB": "[\"Tarefas do Membro\"]" + "BREADCRUMB": "[\"Tarefas do Membro\"]", + "MEMBER_NOT_FOUND_MSG_1": "O membro que você está procurando não existe em uma equipe, tente pesquisar com uma consulta diferente.", + "MEMBER_NOT_FOUND_MSG_2": "Se você está procurando um membro em uma equipe diferente, selecione a equipe no menu suspenso acima.", + "GO_TO_HOME": "Ir para a página inicial" }, "taskDetails": { "BREADCRUMB": "[\"Detalhes da Tarefa\"]", diff --git a/apps/web/messages/ru.json b/apps/web/messages/ru.json index e881f6513..b74bc44d0 100644 --- a/apps/web/messages/ru.json +++ b/apps/web/messages/ru.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "Канбан-доска" }, "profile": { - "BREADCRUMB": "[\"Member Tasks\"]" + "BREADCRUMB": "[\"Member Tasks\"]", + "MEMBER_NOT_FOUND_MSG_1": "Участник, которого вы ищете, не существует в команде, попробуйте выполнить поиск с другим запросом.", + "MEMBER_NOT_FOUND_MSG_2": "Если вы ищете участника в другой команде, выберите команду из выпадающего списка выше.", + "GO_TO_HOME": "Перейти на главную страницу" }, "taskDetails": { "BREADCRUMB": "[\"Task Details\"]", diff --git a/apps/web/messages/zh.json b/apps/web/messages/zh.json index 878fabcf6..dd84cb0ad 100644 --- a/apps/web/messages/zh.json +++ b/apps/web/messages/zh.json @@ -229,7 +229,10 @@ "KANBAN_BOARD": "看板" }, "profile": { - "BREADCRUMB": "[\"成员任务\"]" + "BREADCRUMB": "[\"成员任务\"]", + "MEMBER_NOT_FOUND_MSG_1": "您正在寻找的成员在团队中不存在,请尝试使用不同的查询进行搜索。", + "MEMBER_NOT_FOUND_MSG_2": "如果您正在寻找不同团队中的成员,请从上面的下拉菜单中选择团队。", + "GO_TO_HOME": "返回主页" }, "taskDetails": { "BREADCRUMB": "[\"任务详情\"]",