diff --git a/apps/mobile/app/components/Button.tsx b/apps/mobile/app/components/Button.tsx index 63935ce74..a39adda5f 100644 --- a/apps/mobile/app/components/Button.tsx +++ b/apps/mobile/app/components/Button.tsx @@ -1,6 +1,6 @@ import React, { ComponentType } from 'react'; import { Pressable, PressableProps, PressableStateCallbackType, StyleProp, TextStyle, ViewStyle } from 'react-native'; -import { colors, spacing, typography } from '../theme'; +import { colors, spacing } from '../theme'; import { Text, TextProps } from './Text'; type Presets = keyof typeof $viewPresets; diff --git a/apps/mobile/app/components/LabelItem.tsx b/apps/mobile/app/components/LabelItem.tsx index c13693998..d8191ba57 100644 --- a/apps/mobile/app/components/LabelItem.tsx +++ b/apps/mobile/app/components/LabelItem.tsx @@ -3,7 +3,7 @@ import React, { FC, ReactNode } from 'react'; import { View, StyleSheet, Text } from 'react-native'; import { typography } from '../theme'; -import { limitTextCharaters } from '../helpers/sub-text'; +// import { limitTextCharaters } from '../helpers/sub-text'; interface Props { label: string; diff --git a/apps/mobile/app/components/Toggle.tsx b/apps/mobile/app/components/Toggle.tsx index af71b2917..487c21bfb 100644 --- a/apps/mobile/app/components/Toggle.tsx +++ b/apps/mobile/app/components/Toggle.tsx @@ -385,14 +385,14 @@ function Switch(props: ToggleInputProps) { const offsetLeft = ($innerStyleOverride?.paddingStart || $innerStyleOverride?.paddingLeft || - $switchInner?.paddingStart || - $switchInner?.paddingLeft || + $switchInner.paddingStart || + $switchInner.paddingLeft || 0) as number; const offsetRight = ($innerStyleOverride?.paddingEnd || $innerStyleOverride?.paddingRight || - $switchInner?.paddingEnd || - $switchInner?.paddingRight || + $switchInner.paddingEnd || + $switchInner.paddingRight || 0) as number; const start = withTiming(on ? '100%' : '0%'); diff --git a/apps/mobile/app/models/task/Task.ts b/apps/mobile/app/models/task/Task.ts index 97c856ae4..33fe5bed7 100644 --- a/apps/mobile/app/models/task/Task.ts +++ b/apps/mobile/app/models/task/Task.ts @@ -1,4 +1,4 @@ -import { types } from 'mobx-state-tree'; +// import { types } from 'mobx-state-tree'; import { ITeamTask } from '../../services/interfaces/ITask'; export interface ITaskCreateParams { diff --git a/apps/mobile/app/screens/Authenticated/ProfileScreen/components/ProfileScreenSkeleton.tsx b/apps/mobile/app/screens/Authenticated/ProfileScreen/components/ProfileScreenSkeleton.tsx index 1e48474d2..0a25ae4fd 100644 --- a/apps/mobile/app/screens/Authenticated/ProfileScreen/components/ProfileScreenSkeleton.tsx +++ b/apps/mobile/app/screens/Authenticated/ProfileScreen/components/ProfileScreenSkeleton.tsx @@ -2,12 +2,12 @@ import React from 'react'; import { ScrollView, StyleSheet, View } from 'react-native'; import { Card } from 'react-native-paper'; import { Skeleton } from 'react-native-skeletons'; -import { useOrganizationTeam } from '../../../../services/hooks/useOrganization'; +// import { useOrganizationTeam } from '../../../../services/hooks/useOrganization'; import { useAppTheme } from '../../../../theme'; const ProfileScreenSkeleton = () => { const { colors, dark } = useAppTheme(); - const { isTeamManager } = useOrganizationTeam(); + // const { isTeamManager } = useOrganizationTeam(); const MemberCard = () => { return ( diff --git a/apps/mobile/app/screens/Authenticated/TimerScreen/components/TaskDisplayBox.tsx b/apps/mobile/app/screens/Authenticated/TimerScreen/components/TaskDisplayBox.tsx index aacc0de5e..64226def3 100644 --- a/apps/mobile/app/screens/Authenticated/TimerScreen/components/TaskDisplayBox.tsx +++ b/apps/mobile/app/screens/Authenticated/TimerScreen/components/TaskDisplayBox.tsx @@ -1,6 +1,6 @@ import React from 'react'; -import { View, StyleSheet, TextInput, Text } from 'react-native'; -import { FontAwesome, AntDesign, Entypo } from '@expo/vector-icons'; +import { View, StyleSheet, Text } from 'react-native'; +import { FontAwesome, AntDesign } from '@expo/vector-icons'; import { typography, useAppTheme } from '../../../../theme'; type ITasDisplayBox = { diff --git a/apps/mobile/app/services/client/requests/organization-team.ts b/apps/mobile/app/services/client/requests/organization-team.ts index d9dd8574f..fa36743ed 100644 --- a/apps/mobile/app/services/client/requests/organization-team.ts +++ b/apps/mobile/app/services/client/requests/organization-team.ts @@ -67,7 +67,7 @@ export function getOrganizationTeamRequest( params[`relations[${i}]`] = rl; }); - const queries = new URLSearchParams(params || {}); + const queries = new URLSearchParams(params); return serverFetch({ path: `/organization-team/${teamId}?${queries.toString()}`, method: 'GET', diff --git a/apps/mobile/app/services/hooks/features/useTeamMemberCard.ts b/apps/mobile/app/services/hooks/features/useTeamMemberCard.ts index 2c45778a3..8f4c4784e 100644 --- a/apps/mobile/app/services/hooks/features/useTeamMemberCard.ts +++ b/apps/mobile/app/services/hooks/features/useTeamMemberCard.ts @@ -94,7 +94,7 @@ export function useTeamMemberCard(member: IOrganizationTeamList["members"][numbe const taskStatistics = tasksStatisticsState?.all.find((statistics) => statistics.id === responseTask.id) || [] - responseTask.totalWorkedTime = taskStatistics?.duration || 0 + responseTask.totalWorkedTime = taskStatistics.duration || 0 } return responseTask diff --git a/apps/mobile/app/services/hooks/useLanguageModal.ts b/apps/mobile/app/services/hooks/useLanguageModal.ts index b762fe39b..3f5756262 100644 --- a/apps/mobile/app/services/hooks/useLanguageModal.ts +++ b/apps/mobile/app/services/hooks/useLanguageModal.ts @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; import { ILanguageItemList } from '../interfaces/IUserData'; export function useLanguageModal() { diff --git a/apps/mobile/app/services/hooks/useOrganization.ts b/apps/mobile/app/services/hooks/useOrganization.ts index 13c39a332..0a05da4ec 100644 --- a/apps/mobile/app/services/hooks/useOrganization.ts +++ b/apps/mobile/app/services/hooks/useOrganization.ts @@ -122,7 +122,7 @@ export function useOrganizationTeam() { getOrganizationTeam(); }, [organizationTeams]); - const activeTeamManagers = members?.filter((m) => m.role?.name === 'MANAGER'); + const activeTeamManagers = members.filter((m) => m.role?.name === 'MANAGER'); const isManager = () => { if (activeTeam) { diff --git a/apps/mobile/app/services/hooks/useTimezoneModal.ts b/apps/mobile/app/services/hooks/useTimezoneModal.ts index 10caf8738..bdacc55ee 100644 --- a/apps/mobile/app/services/hooks/useTimezoneModal.ts +++ b/apps/mobile/app/services/hooks/useTimezoneModal.ts @@ -1,4 +1,4 @@ -import React, { useCallback, useState } from 'react'; +import { useCallback, useState } from 'react'; export function useTimezoneModal() { const [isModalOpen, setIsModalOpen] = useState(false); diff --git a/apps/web/app/[locale]/settings/team/page.tsx b/apps/web/app/[locale]/settings/team/page.tsx index a747a50bc..950603f21 100644 --- a/apps/web/app/[locale]/settings/team/page.tsx +++ b/apps/web/app/[locale]/settings/team/page.tsx @@ -37,7 +37,7 @@ const Team = () => { {!user ? ( ) : ( - +
diff --git a/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx b/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx index 300dd7d14..d0617e95f 100644 --- a/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx +++ b/apps/web/components/pages/task/details-section/blocks/task-secondary-info.tsx @@ -150,7 +150,7 @@ const TaskSecondaryInfo = () => { taskStatusClassName="text-[0.625rem] h-[1.5625rem] max-w-[7.6875rem] rounded 3xl:text-xs" /> - {tags && tags.length > 0 && ( + {tags.length > 0 && (
{tags.map((tag, i) => { @@ -225,11 +225,11 @@ const TaskSecondaryInfo = () => { const EpicParent = ({ task }: { task: ITeamTask }) => { const t = useTranslations(); - if (task.issueType === 'Story') { + if (task?.issueType === 'Story') { return <>; } - return (!task.issueType || task.issueType === 'Task' || task.issueType === 'Bug') && task?.rootEpic ? ( + return (!task?.issueType || task?.issueType === 'Task' || task?.issueType === 'Bug') && task?.rootEpic ? ( diff --git a/apps/web/components/shared/collaborate/index.tsx b/apps/web/components/shared/collaborate/index.tsx index 696a2d77c..4ba995aab 100644 --- a/apps/web/components/shared/collaborate/index.tsx +++ b/apps/web/components/shared/collaborate/index.tsx @@ -92,7 +92,7 @@ const Collaborate = () => { {members.map((member) => ( { handleMemberClick(member); @@ -135,7 +135,7 @@ const Collaborate = () => {

{member?.name}

{member?.email}

- {selectedMemberIds.includes(member.id) ? ( + {selectedMemberIds.includes(member?.id) ? ( ) : null} @@ -148,7 +148,7 @@ const Collaborate = () => {
{collaborativeMembers.map((member) => (
{
{`#${task && task.taskNumber} `} {task && task.title} diff --git a/apps/web/components/shared/tasks/unassigned-task.tsx b/apps/web/components/shared/tasks/unassigned-task.tsx index 014971dcf..e7921069d 100644 --- a/apps/web/components/shared/tasks/unassigned-task.tsx +++ b/apps/web/components/shared/tasks/unassigned-task.tsx @@ -50,7 +50,7 @@ const UnAssignedTask = ({ now = false, task }: ITaskDetailCard) => {
{`#${task && task.taskNumber} `} {task && task.title} diff --git a/apps/web/lib/components/color-picker.tsx b/apps/web/lib/components/color-picker.tsx index e052bcd9b..9e64308c5 100644 --- a/apps/web/lib/components/color-picker.tsx +++ b/apps/web/lib/components/color-picker.tsx @@ -94,7 +94,7 @@ export const ColorPicker = ({
diff --git a/apps/web/lib/components/inputs/input.tsx b/apps/web/lib/components/inputs/input.tsx index 63a1b9e6b..c1baa763c 100644 --- a/apps/web/lib/components/inputs/input.tsx +++ b/apps/web/lib/components/inputs/input.tsx @@ -130,7 +130,6 @@ export const TimeInputField = forwardRef( by custom */ Text.Label = forwardRef>( - ({ children, className, ...rest }) => { + ({ children, className, ...rest }, ref) => { return ( -
{/* TaskCardMenu */} - {task && memberInfo && currentMember && ( + {task && currentMember && ( )}
@@ -235,7 +235,7 @@ export function TaskCard(props: Props) { setLoading(load)} /> - {task && memberInfo && currentMember && ( + {task && currentMember && ( )}
diff --git a/apps/web/lib/features/task/task-status.tsx b/apps/web/lib/features/task/task-status.tsx index 462adafa9..68f993973 100644 --- a/apps/web/lib/features/task/task-status.tsx +++ b/apps/web/lib/features/task/task-status.tsx @@ -151,7 +151,7 @@ export function useActiveTaskStatus( const { item, items, onChange } = useStatusValue({ status: status, - value: props.defaultValue ? props.defaultValue : task ? task[field] : props.defaultValue || undefined, + value: props.defaultValue ? props.defaultValue : task ? task[field] : undefined, onValueChange: onItemChange, defaultValues: props.defaultValues }); diff --git a/apps/web/lib/features/team-member-cell.tsx b/apps/web/lib/features/team-member-cell.tsx index 17c152c42..c7962501f 100644 --- a/apps/web/lib/features/team-member-cell.tsx +++ b/apps/web/lib/features/team-member-cell.tsx @@ -13,7 +13,7 @@ import get from 'lodash/get'; export function TaskCell({ row }: { row: any }) { const member = row.original as OT_Member; const memberInfo = useTeamMemberCard(member); - const taskEdition = useTMCardTaskEdit(memberInfo?.memberTask); + const taskEdition = useTMCardTaskEdit(memberInfo.memberTask); const publicTeam = false; return ( @@ -43,8 +43,8 @@ export function WorkedOnTaskCell({ row }: { row: any }) { ); @@ -53,7 +53,7 @@ export function WorkedOnTaskCell({ row }: { row: any }) { export function TaskEstimateInfoCell({ row }: { row: any }) { const member = row.original as OT_Member; const memberInfo = useTeamMemberCard(member); - const taskEdition = useTMCardTaskEdit(memberInfo?.memberTask); + const taskEdition = useTMCardTaskEdit(memberInfo.memberTask); return ( (sortByWorkStatus(a, b) ? -1 : 1)); const blockViewMembers = - activeFilter == 'all' ? orderedMembers : orderedMembers.filter((m) => m.timerStatus == activeFilter) || []; + activeFilter == 'all' ? orderedMembers : orderedMembers.filter((m) => m.timerStatus === activeFilter) || []; const currentUser = members.find((m) => m.employee.userId === user?.id); const $members = members diff --git a/apps/web/lib/features/team/team-item.tsx b/apps/web/lib/features/team/team-item.tsx index ab274ae03..61f5a288b 100644 --- a/apps/web/lib/features/team/team-item.tsx +++ b/apps/web/lib/features/team/team-item.tsx @@ -122,7 +122,7 @@ export function TeamItem({ style={{ background: color || `${stc(title)}80`, - ...(color ? { color: color ? readableColorHex : undefined } : {}) + ...(color ? { color: readableColorHex } : {}) }} > {logo && isValidUrl(logo) ? ( diff --git a/apps/web/lib/settings/integration-setting.tsx b/apps/web/lib/settings/integration-setting.tsx index f83d26852..cb858fe87 100644 --- a/apps/web/lib/settings/integration-setting.tsx +++ b/apps/web/lib/settings/integration-setting.tsx @@ -31,7 +31,7 @@ export const IntegrationSetting = () => { } as { [x: string]: string }; }, [locale]); - const queries = new URLSearchParams(params || {}); + const queries = new URLSearchParams(params); const url = `https://github.com/apps/${GITHUB_APP_NAME.value}/installations/new?${queries.toString()}`; const { activeTeam } = useOrganizationTeams(); diff --git a/apps/web/lib/settings/issue-types-form.tsx b/apps/web/lib/settings/issue-types-form.tsx index cd4843bcf..2852ced95 100644 --- a/apps/web/lib/settings/issue-types-form.tsx +++ b/apps/web/lib/settings/issue-types-form.tsx @@ -181,9 +181,9 @@ export const IssueTypesForm = () => { issueTypes.map((type) => ( { setCreateNew(false); setEdit(type); diff --git a/apps/web/lib/settings/member-table.tsx b/apps/web/lib/settings/member-table.tsx index a3a3b7329..19ceafa53 100644 --- a/apps/web/lib/settings/member-table.tsx +++ b/apps/web/lib/settings/member-table.tsx @@ -207,15 +207,7 @@ export const MemberTable = ({ members }: { members: OT_Member[] }) => { {/* TODO dynamic */} - + diff --git a/apps/web/lib/settings/team-avatar.tsx b/apps/web/lib/settings/team-avatar.tsx index 2e6f56e15..88de9f198 100644 --- a/apps/web/lib/settings/team-avatar.tsx +++ b/apps/web/lib/settings/team-avatar.tsx @@ -80,7 +80,7 @@ export const TeamAvatar = ({ disabled, bgColor }: { disabled: boolean; bgColor?: )} style={{ backgroundColor: bgColor || `${stc(activeTeam?.name || '')}80`, - ...(bgColor ? { color: bgColor ? readableColorHex : undefined } : {}) + ...(bgColor ? { color: readableColorHex } : {}) }} > {activeTeam?.image?.thumbUrl || activeTeam?.image?.fullUrl ? ( diff --git a/apps/web/lib/settings/team-size-popover.tsx b/apps/web/lib/settings/team-size-popover.tsx index 1bf7121cd..dfe730b36 100644 --- a/apps/web/lib/settings/team-size-popover.tsx +++ b/apps/web/lib/settings/team-size-popover.tsx @@ -108,10 +108,8 @@ const TeamSize = ({
{isTeamManager && (