diff --git a/apps/mobile/app/components/WorkedDayHours.tsx b/apps/mobile/app/components/WorkedDayHours.tsx
index 81a6fa845..47b3ae6ea 100644
--- a/apps/mobile/app/components/WorkedDayHours.tsx
+++ b/apps/mobile/app/components/WorkedDayHours.tsx
@@ -16,7 +16,7 @@ const WorkedOnTaskHours = ({
memberTask,
totalTimeText,
}: {
- title: string
+ title?: string
memberTask: ITeamTask
containerStyle: ViewStyle
totalTimeText: TextStyle
@@ -29,9 +29,14 @@ const WorkedOnTaskHours = ({
return (
- {title}
+ {title && (
+
+ {title}{" "}
+
+ )}
- {pad(dh)} h:{pad(dm)} m
+ {pad(dh)}
+ {title && " h"}:{pad(dm)} {title && "m"}
)
diff --git a/apps/mobile/app/screens/Authenticated/ProfileScreen/components/UserProfileTasks.tsx b/apps/mobile/app/screens/Authenticated/ProfileScreen/components/UserProfileTasks.tsx
index 0119ffce2..6f4c0ea8e 100644
--- a/apps/mobile/app/screens/Authenticated/ProfileScreen/components/UserProfileTasks.tsx
+++ b/apps/mobile/app/screens/Authenticated/ProfileScreen/components/UserProfileTasks.tsx
@@ -9,21 +9,17 @@ import { translate } from "../../../../i18n"
import { typography, useAppTheme } from "../../../../theme"
import { GLOBAL_STYLE as GS } from "../../../../../assets/ts/styles"
import { observer } from "mobx-react-lite"
+import { useTimer } from "../../../../services/hooks/useTimer"
+import WorkedOnTaskHours from "../../../../components/WorkedDayHours"
interface IUserProfileTasks {
profile: IUserProfile
content: ITaskFilter
}
const UserProfileTasks: FC = observer(({ profile, content }) => {
const { colors, dark } = useAppTheme()
+ const { timerStatus } = useTimer()
const tasks = useMemo(() => {
- let tasks = content.tasksFiltered
- if (content.tab === "worked" && profile.activeUserTeamTask) {
- tasks = tasks.filter((ts) => {
- return ts.id !== profile.activeUserTeamTask?.id
- })
- }
-
- return tasks
+ return content.tasksFiltered
}, [content, profile])
return (
@@ -35,7 +31,10 @@ const UserProfileTasks: FC = observer(({ profile, content })
}}
bounces={false}
>
- {profile.activeUserTeamTask && content.tab === "worked" ? (
+ {content.tab === "worked" &&
+ profile.activeUserTeamTask &&
+ (profile.member?.timerStatus === "running" ||
+ (profile.isAuthUser && timerStatus?.running)) ? (
<>
= observer(({ profile, content })
borderBottomColor: colors.border,
}}
/>
-
+
= observer(({ profile, content })
fontSize: 12,
},
]}
- >
- 03:31
-
+ >
+