From 7c424c6198bf0f0909e56c7ed88b5cea84aa76f6 Mon Sep 17 00:00:00 2001 From: desperado1802 Date: Thu, 19 Oct 2023 20:32:57 +0300 Subject: [PATCH] fixed the avatars section of combobox tasks in timer screen, to show custom avatar when user has no image --- .../TimerScreen/components/IndividualTask.tsx | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/apps/mobile/app/screens/Authenticated/TimerScreen/components/IndividualTask.tsx b/apps/mobile/app/screens/Authenticated/TimerScreen/components/IndividualTask.tsx index a2c8c3bd0..e0d69f343 100644 --- a/apps/mobile/app/screens/Authenticated/TimerScreen/components/IndividualTask.tsx +++ b/apps/mobile/app/screens/Authenticated/TimerScreen/components/IndividualTask.tsx @@ -1,7 +1,7 @@ /* eslint-disable react-native/no-inline-styles */ /* eslint-disable react-native/no-color-literals */ import React, { FC, useMemo, useState } from "react" -import { View, StyleSheet, Text, Image, ImageStyle, TouchableOpacity } from "react-native" +import { View, StyleSheet, Text, ImageStyle, TouchableOpacity } from "react-native" import { Entypo, EvilIcons } from "@expo/vector-icons" import { GLOBAL_STYLE as GS } from "../../../../../assets/ts/styles" import { colors, spacing, typography, useAppTheme } from "../../../../theme" @@ -12,6 +12,8 @@ import TaskStatus from "../../../../components/TaskStatus" import { useTeamTasks } from "../../../../services/hooks/features/useTeamTasks" import IssuesModal from "../../../../components/IssuesModal" import { limitTextCharaters } from "../../../../helpers/sub-text" +import { Avatar } from "react-native-paper" +import { imgTitleProfileAvatar } from "../../../../helpers/img-title-profile-avatar" export interface Props { task: ITeamTask @@ -96,11 +98,29 @@ const IndividualTask: FC = observer( }} > - {assigneeImg1 ? : null} + {assigneeImg1 ? ( + + ) : task.members[0] ? ( + + ) : null} + {assigneeImg2 ? ( - + + ) : task.members[1] ? ( + ) : null} + {task.status === "closed" ? ( onReopenTask()} /> ) : ( @@ -133,6 +153,11 @@ const styles = StyleSheet.create({ width: "100%", zIndex: 1000, }, + prefix: { + color: "#FFFFFF", + fontFamily: typography.fonts.PlusJakartaSans.light, + fontSize: 20, + }, statusContainer: { alignItems: "center", backgroundColor: "#ECE8FC",