Skip to content

Commit

Permalink
Merge pull request #1873 from ever-co/develop
Browse files Browse the repository at this point in the history
bring latest
  • Loading branch information
evereq authored Nov 24, 2023
2 parents 3a9b7d9 + e133c2d commit 51da2e8
Show file tree
Hide file tree
Showing 32 changed files with 298 additions and 130 deletions.
8 changes: 6 additions & 2 deletions apps/mobile/app/components/CodeField.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react-native/no-inline-styles */
/* eslint-disable react-native/no-color-literals */
import React, { FC, useEffect, useState } from 'react';
import { View, StyleSheet, Text } from 'react-native';
import { View, StyleSheet, Text, Dimensions, PixelRatio, Platform } from 'react-native';
import { colors, typography, useAppTheme } from '../theme';
import { CodeField, Cursor, useBlurOnFulfill, useClearByFocusCell } from 'react-native-confirmation-code-field';

Expand All @@ -12,6 +12,9 @@ interface ICodeField {
defaultValue?: string;
}

const { height: screeHeight } = Dimensions.get('screen');
const screenDimension = PixelRatio.get();

export const CodeInputField: FC<ICodeField> = (props) => {
const { onChange, editable, length = 6 } = props;
const { colors } = useAppTheme();
Expand Down Expand Up @@ -54,7 +57,8 @@ export const CodeInputField: FC<ICodeField> = (props) => {
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
lineHeight: 52
lineHeight:
Platform.OS === 'ios' ? screeHeight * 0.055 * (screenDimension / 3) : undefined
}
]}
onLayout={getCellOnLayoutHandler(index)}
Expand Down
45 changes: 45 additions & 0 deletions apps/mobile/app/components/svgs/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -650,6 +650,28 @@ export const pauseStatusIconLarge = `<svg
<path d="M8.70566 7.92772V2.07242C8.70566 1.51654 8.47096 1.29419 7.87802 1.29419H6.38331C5.79449 1.29419 5.55566 1.51654 5.55566 2.07242V7.92772C5.55566 8.4836 5.79037 8.70595 6.38331 8.70595H7.87802C8.47096 8.70595 8.70566 8.4836 8.70566 7.92772Z" />
</svg>`;

// Profile Screen //

export const filterLightIcon = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.8334 3.79175H9.33337" stroke="#282048" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3.49996 3.79175H1.16663" stroke="#292D32" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.83329 5.83333C6.96087 5.83333 7.87496 4.91925 7.87496 3.79167C7.87496 2.66409 6.96087 1.75 5.83329 1.75C4.70571 1.75 3.79163 2.66409 3.79163 3.79167C3.79163 4.91925 4.70571 5.83333 5.83329 5.83333Z" stroke="#292D32" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12.8333 10.2083H10.5" stroke="#292D32" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.66663 10.2083H1.16663" stroke="#292D32" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.16667 12.2501C9.29425 12.2501 10.2083 11.336 10.2083 10.2084C10.2083 9.08083 9.29425 8.16675 8.16667 8.16675C7.03909 8.16675 6.125 9.08083 6.125 10.2084C6.125 11.336 7.03909 12.2501 8.16667 12.2501Z" stroke="#292D32" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`;

export const filterDarkIcon = `<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M12.8334 3.79163H9.33337" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M3.49996 3.79163H1.16663" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M5.83329 5.83333C6.96087 5.83333 7.87496 4.91925 7.87496 3.79167C7.87496 2.66409 6.96087 1.75 5.83329 1.75C4.70571 1.75 3.79163 2.66409 3.79163 3.79167C3.79163 4.91925 4.70571 5.83333 5.83329 5.83333Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12.8333 10.2084H10.5" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M4.66663 10.2084H1.16663" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M8.16667 12.25C9.29425 12.25 10.2083 11.3359 10.2083 10.2083C10.2083 9.08071 9.29425 8.16663 8.16667 8.16663C7.03909 8.16663 6.125 9.08071 6.125 10.2083C6.125 11.3359 7.03909 12.25 8.16667 12.25Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`;

// Task Screen //
// Task Title
export const tickIconLight = `<svg
Expand Down Expand Up @@ -981,3 +1003,26 @@ export const moreButtonDark = `<svg width="24" height="24" viewBox="0 0 24 24" f
<path d="M12 10C10.9 10 10 10.9 10 12C10 13.1 10.9 14 12 14C13.1 14 14 13.1 14 12C14 10.9 13.1 10 12 10Z" stroke="#FFFFFF" stroke-width="1.5"/>
</svg>
`;

// Settings Screen Icons //

export const danGerZoneRemoveUserIcon = `<svg width="45" height="44" viewBox="0 0 45 44" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.4997 22.0001C27.5623 22.0001 31.6663 17.896 31.6663 12.8334C31.6663 7.7708 27.5623 3.66675 22.4997 3.66675C17.4371 3.66675 13.333 7.7708 13.333 12.8334C13.333 17.896 17.4371 22.0001 22.4997 22.0001Z" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M6.75195 40.3333C6.75195 33.2383 13.8103 27.5 22.5003 27.5C24.2603 27.5 25.9653 27.7383 27.5603 28.1783" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M40.8337 33.0001C40.8337 33.5867 40.7603 34.1551 40.6137 34.7051C40.4487 35.4384 40.1553 36.1534 39.7703 36.7767C38.5053 38.9034 36.177 40.3334 33.5003 40.3334C31.612 40.3334 29.907 39.6184 28.6237 38.445C28.0737 37.9684 27.597 37.4001 27.2303 36.7767C26.552 35.6767 26.167 34.3751 26.167 33.0001C26.167 31.0201 26.9553 29.2051 28.2387 27.8851C29.577 26.5101 31.447 25.6667 33.5003 25.6667C35.6637 25.6667 37.6253 26.6018 38.9453 28.1051C40.1187 29.4068 40.8337 31.1301 40.8337 33.0001Z" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M35.3888 31.0566L31.5205 34.9249" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M31.5576 31.0933L35.4443 34.9616" stroke="white" stroke-width="2" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`;

export const galleryLightIcon = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.1799 16.9599L19.0499 9.64988C17.9899 7.16988 16.0399 7.06988 14.7299 9.42988L12.8399 12.8399C11.8799 14.5699 10.0899 14.7199 8.84993 13.1699L8.62993 12.8899C7.33993 11.2699 5.51993 11.4699 4.58993 13.3199L2.86993 16.7699C1.65993 19.1699 3.40993 21.9999 6.08993 21.9999H18.8499C21.4499 21.9999 23.1999 19.3499 22.1799 16.9599Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7.46973 8C9.12658 8 10.4697 6.65685 10.4697 5C10.4697 3.34315 9.12658 2 7.46973 2C5.81287 2 4.46973 3.34315 4.46973 5C4.46973 6.65685 5.81287 8 7.46973 8Z" stroke="#292D32" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`;

export const galleryDarkIcon = `<svg width="25" height="24" viewBox="0 0 25 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M22.1799 16.96L19.0499 9.65001C17.9899 7.17001 16.0399 7.07001 14.7299 9.43001L12.8399 12.84C11.8799 14.57 10.0899 14.72 8.84993 13.17L8.62993 12.89C7.33993 11.27 5.51993 11.47 4.58993 13.32L2.86993 16.77C1.65993 19.17 3.40993 22 6.08993 22H18.8499C21.4499 22 23.1999 19.35 22.1799 16.96Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M7.46973 8C9.12658 8 10.4697 6.65685 10.4697 5C10.4697 3.34315 9.12658 2 7.46973 2C5.81287 2 4.46973 3.34315 4.46973 5C4.46973 6.65685 5.81287 8 7.46973 8Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,14 @@ export const ListItemContent: React.FC<ListItemProps> = observer((props) => {

<View style={{ marginBottom: 16 }}>
<View style={styles.wrapperTask}>
<TouchableOpacity onPress={() => navigateToTask(props.task?.id)}>
<View style={{ flexDirection: 'row', width: '80%' }}>
<TouchableOpacity onPress={() => navigateToTask(props.task?.id)} style={{ width: '80%' }}>
<View
style={{
flexDirection: 'row',
width: '80%',
alignItems: 'center'
}}
>
<View style={{ marginRight: 3 }}>
<IssuesModal task={props.task} readonly={true} />
</View>
Expand Down Expand Up @@ -309,7 +315,7 @@ export default ListCardItem;
const styles = StyleSheet.create({
cardContainer: {
borderRadius: 14,
elevation: 24,
elevation: 5,
shadowColor: '#000',
shadowOffset: { width: 0, height: 12 },
shadowOpacity: 0.05,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable react-native/no-inline-styles */
import { Text, TouchableOpacity, Image, View, TextStyle, ViewStyle, Dimensions } from 'react-native';
import { Text, TouchableOpacity, View, TextStyle, ViewStyle, Dimensions } from 'react-native';
import React, { useState } from 'react';
import { typography, useAppTheme } from '../../../../theme';
import { translate } from '../../../../i18n';
Expand All @@ -8,6 +8,8 @@ import ProfileTabs from './ProfileTabs';
import AssignTaskFormModal from './AssignTaskSection';
import FilterPopup from './FilterPopup';
import { ITaskFilter } from '../../../../services/hooks/features/useTaskFilters';
import { SvgXml } from 'react-native-svg';
import { filterDarkIcon, filterLightIcon } from '../../../../components/svgs/icons';

const TaskFilter = ({ profile, hook }: { profile: IUserProfile; hook: ITaskFilter }) => {
const { colors, dark } = useAppTheme();
Expand Down Expand Up @@ -47,11 +49,7 @@ const TaskFilter = ({ profile, hook }: { profile: IUserProfile; hook: ITaskFilte
style={{ ...$filterButton, borderColor: colors.border }}
onPress={() => setShowFilterPopup(true)}
>
{dark ? (
<Image source={require('../../../../../assets/icons/new/setting-dark.png')} />
) : (
<Image source={require('../../../../../assets/icons/new/setting-light.png')} />
)}
{dark ? <SvgXml xml={filterDarkIcon} /> : <SvgXml xml={filterLightIcon} />}
<Text style={{ ...$createTaskTitle, color: colors.primary, marginLeft: 10 }}>
{translate('tasksScreen.filter')}
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useTaskLabels } from '../../../../services/hooks/features/useTaskLabels
import { ITaskLabelItem } from '../../../../services/interfaces/ITaskLabel';
import { StatusType } from './FilterPopup';
import { BlurView } from 'expo-blur';
import { translate } from '../../../../i18n';

interface TaskLabelFilterProps {
showLabelPopup: boolean;
Expand All @@ -48,7 +49,9 @@ const TaskStatusFilter: FC<TaskLabelFilterProps> = observer(
<TouchableOpacity onPress={() => setShowLabelPopup(!showLabelPopup)}>
<View style={{ ...styles.container, borderColor: colors.divider }}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Text style={{ marginRight: 10, color: colors.primary }}>Labels</Text>
<Text style={{ marginRight: 10, color: colors.primary }}>
{translate('settingScreen.labelScreen.labels')}
</Text>
{selectedLabels.length === 0 ? null : (
<FontAwesome name="circle" size={24} color={colors.secondary} />
)}
Expand Down Expand Up @@ -92,7 +95,9 @@ const TaskStatusFilterDropDown: FC<DropDownProps> = observer(
]}
>
<View style={styles.secondContainer}>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>Statuses</Text>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>
{translate('settingScreen.labelScreen.labels')}
</Text>
<View style={{ paddingHorizontal: 16, height: height / 2.55 }}>
<FlatList
bounces={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useTaskPriority } from '../../../../services/hooks/features/useTaskPrio
import { ITaskPriorityItem } from '../../../../services/interfaces/ITaskPriority';
import { StatusType } from './FilterPopup';
import { BlurView } from 'expo-blur';
import { translate } from '../../../../i18n';

interface TaskPriorityFilterProps {
showPriorityPopup: boolean;
Expand All @@ -49,7 +50,9 @@ const TaskPriorityFilter: FC<TaskPriorityFilterProps> = observer(
<TouchableOpacity onPress={() => setShowPriorityPopup(!showPriorityPopup)}>
<View style={{ ...styles.container, borderColor: colors.divider }}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Text style={{ marginRight: 10, color: colors.primary }}>Priorities</Text>
<Text style={{ marginRight: 10, color: colors.primary }}>
{translate('settingScreen.priorityScreen.priorities')}
</Text>
{selectedPriorities.length === 0 ? null : (
<FontAwesome name="circle" size={24} color={colors.secondary} />
)}
Expand Down Expand Up @@ -93,7 +96,9 @@ const TaskStatusFilterDropDown: FC<DropDownProps> = observer(
]}
>
<View style={styles.secondContainer}>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>Statuses</Text>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>
{translate('settingScreen.priorityScreen.priorities')}
</Text>
<View style={{ paddingHorizontal: 16, height: height / 2.55 }}>
<FlatList
bounces={false}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { useTaskSizes } from '../../../../services/hooks/features/useTaskSizes';
import { ITaskSizeItem } from '../../../../services/interfaces/ITaskSize';
import { StatusType } from './FilterPopup';
import { BlurView } from 'expo-blur';
import { translate } from '../../../../i18n';

interface TaskSizeFilterProps {
showSizePopup: boolean;
Expand All @@ -48,7 +49,9 @@ const TaskStatusFilter: FC<TaskSizeFilterProps> = observer(
<TouchableOpacity onPress={() => setShowSizePopup(!showSizePopup)}>
<View style={{ ...styles.container, borderColor: colors.divider }}>
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
<Text style={{ marginRight: 10, color: colors.primary }}>Sizes</Text>
<Text style={{ marginRight: 10, color: colors.primary }}>
{translate('settingScreen.sizeScreen.sizes')}
</Text>
{selectedSizes.length === 0 ? null : (
<FontAwesome name="circle" size={24} color={colors.secondary} />
)}
Expand Down Expand Up @@ -92,7 +95,9 @@ const TaskStatusFilterDropDown: FC<DropDownProps> = observer(
]}
>
<View style={styles.secondContainer}>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>Statuses</Text>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>
{translate('settingScreen.sizeScreen.sizes')}
</Text>
<View style={{ paddingHorizontal: 16, height: height / 2.55 }}>
<FlatList
bounces={false}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable react-native/no-inline-styles */
/* eslint-disable react-native/no-color-literals */
import React, { FC, useState } from 'react';
import { View, StyleSheet, Text, TextInput, TouchableOpacity, ActivityIndicator } from 'react-native';
import { View, StyleSheet, Text, TextInput, TouchableOpacity, ActivityIndicator, Dimensions } from 'react-native';
import { limitTextCharaters } from '../../../../helpers/sub-text';
import { ITeamTask } from '../../../../services/interfaces/ITask';
import { typography, useAppTheme } from '../../../../theme';
Expand All @@ -15,6 +15,8 @@ interface Props {
navigateToTask: (taskId: string) => void;
}

const { width: screenWidth } = Dimensions.get('screen');

const TaskTitleDisplay: FC<Props> = ({ editMode, setEditMode, task, navigateToTask }) => {
const { colors } = useAppTheme();
const { updateTask } = useTeamTasks();
Expand Down Expand Up @@ -65,7 +67,11 @@ const TaskTitleDisplay: FC<Props> = ({ editMode, setEditMode, task, navigateToTa
<View style={styles.container}>
<View style={styles.titleContainer}>
<Text style={[styles.totalTimeTitle, { marginRight: 5 }]}>#{task.number}</Text>
<Text style={[styles.totalTimeTitle, { color: colors.primary }]}>
<Text
numberOfLines={1}
ellipsizeMode="tail"
style={[styles.totalTimeTitle, { color: colors.primary }]}
>
{limitTextCharaters({
text: task.title,
numChars: 43
Expand All @@ -78,7 +84,7 @@ const TaskTitleDisplay: FC<Props> = ({ editMode, setEditMode, task, navigateToTa
};

const styles = StyleSheet.create({
container: {},
container: { width: '90%' },
titleContainer: {
flexDirection: 'row',
width: '100%'
Expand All @@ -93,8 +99,7 @@ const styles = StyleSheet.create({
totalTimeTitle: {
color: '#7E7991',
fontFamily: typography.secondary.medium,
fontSize: 14,
maxWidth: '78%'
fontSize: screenWidth * 0.0327
},
wrapTitleInput: {
alignItems: 'center',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/* eslint-disable react-native/no-inline-styles */
/* eslint-disable react-native/no-color-literals */
import React from 'react';
import { View, Text, Image, TouchableOpacity, StyleSheet, TouchableWithoutFeedback } from 'react-native';
import { View, Text, TouchableOpacity, StyleSheet, TouchableWithoutFeedback } from 'react-native';
import { useOrganizationTeam } from '../../../../services/hooks/useOrganization';
import { translate } from '../../../../i18n';
import { typography, useAppTheme } from '../../../../theme';
import { observer } from 'mobx-react-lite';
import useAuthenticateUser from '../../../../services/hooks/features/useAuthentificateUser';
import { SvgXml } from 'react-native-svg';
import { danGerZoneRemoveUserIcon } from '../../../../components/svgs/icons';

const QuitTheTeam = observer(({ onDismiss }: { onDismiss: () => unknown }) => {
const { colors, dark } = useAppTheme();
Expand All @@ -23,8 +25,8 @@ const QuitTheTeam = observer(({ onDismiss }: { onDismiss: () => unknown }) => {
<TouchableWithoutFeedback onPress={() => onDismiss()}>
<View style={styles.transparentContainer}>
<TouchableWithoutFeedback>
<View style={{ ...styles.circleFrame, shadowColor: colors.border }}>
<Image source={require('../../../../../assets/images/new/user-remove.png')} />
<View style={{ ...styles.circleFrame, shadowColor: dark ? 'transparent' : colors.border }}>
<SvgXml xml={danGerZoneRemoveUserIcon} />
</View>
</TouchableWithoutFeedback>
</View>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
/* eslint-disable react-native/no-color-literals */
/* eslint-disable react-native/no-inline-styles */
import React from 'react';
import { View, Text, Image, TouchableOpacity, StyleSheet, TouchableWithoutFeedback } from 'react-native';
import { View, Text, TouchableOpacity, StyleSheet, TouchableWithoutFeedback } from 'react-native';
import { useOrganizationTeam } from '../../../../services/hooks/useOrganization';
import { translate } from '../../../../i18n';
import { typography, useAppTheme } from '../../../../theme';
import { useStores } from '../../../../models';
import { observer } from 'mobx-react-lite';
import { SvgXml } from 'react-native-svg';
import { danGerZoneRemoveUserIcon } from '../../../../components/svgs/icons';

const RemoveTeam = observer(({ onDismiss }: { onDismiss: () => unknown }) => {
const { colors, dark } = useAppTheme();
Expand All @@ -29,8 +31,8 @@ const RemoveTeam = observer(({ onDismiss }: { onDismiss: () => unknown }) => {
<TouchableWithoutFeedback onPress={() => onDismiss()}>
<View style={styles.transparentContainer}>
<TouchableWithoutFeedback>
<View style={{ ...styles.circleFrame, shadowColor: colors.border }}>
<Image source={require('../../../../../assets/images/new/user-remove.png')} />
<View style={{ ...styles.circleFrame, shadowColor: dark ? 'transparent' : colors.border }}>
<SvgXml xml={danGerZoneRemoveUserIcon} />
</View>
</TouchableWithoutFeedback>
</View>
Expand Down
Loading

0 comments on commit 51da2e8

Please sign in to comment.