Skip to content

Commit

Permalink
Merge pull request #1609 from ever-co/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
evereq authored Oct 20, 2023
2 parents fd8c4f6 + 6e51a50 commit 3e397a4
Show file tree
Hide file tree
Showing 25 changed files with 635 additions and 456 deletions.
2 changes: 1 addition & 1 deletion apps/mobile/app/components/HamburgerMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ const HamburgerMenu = observer((props: any) => {
marginTop: 4,
}}
>
{user?.email}s
{user?.email}
</Text>
{activeTeam ? (
<DropDown
Expand Down
8 changes: 6 additions & 2 deletions apps/mobile/app/components/TaskPriority.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const TaskPriority: FC<TaskPriorityProps> = observer(
return (
<>
<TaskPriorityPopup
priorityName={task?.priority}
priorityName={task ? task?.priority : priority}
visible={openModal}
setSelectedPriority={(e) => onChangePriority(e.value)}
onDismiss={() => setOpenModal(false)}
Expand Down Expand Up @@ -81,7 +81,11 @@ const TaskPriority: FC<TaskPriorityProps> = observer(
</Text>
</View>
)}
<AntDesign name="down" size={14} color={colors.primary} />
<AntDesign
name="down"
size={14}
color={task?.priority || priority ? "#000000" : colors.primary}
/>
</View>
</TouchableOpacity>
</>
Expand Down
6 changes: 5 additions & 1 deletion apps/mobile/app/components/TaskSize.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,11 @@ const TaskSize: FC<TaskSizeProps> = observer(({ task, containerStyle, setSize, s
</Text>
</View>
)}
<AntDesign name="down" size={14} color={colors.primary} />
<AntDesign
name="down"
size={14}
color={task?.size || size ? "#000000" : colors.primary}
/>
</View>
</TouchableOpacity>
</>
Expand Down
1 change: 1 addition & 0 deletions apps/mobile/app/components/TaskSizePopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ interface ItemProps {
const Item: FC<ItemProps> = ({ currentSizeName, size, onSizeSelected }) => {
const { colors } = useAppTheme()
const selected = size.value === currentSizeName

return (
<TouchableOpacity onPress={() => onSizeSelected(size)}>
<View style={{ ...styles.wrapperItem, borderColor: colors.border }}>
Expand Down
8 changes: 6 additions & 2 deletions apps/mobile/app/components/TaskStatus.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const TaskStatus: FC<TaskStatusProps> = observer(
return (
<>
<TaskStatusPopup
statusName={task?.status}
statusName={task ? task?.status : status}
visible={openModal}
setSelectedStatus={(e) => onChangeStatus(e)}
onDismiss={() => setOpenModal(false)}
Expand Down Expand Up @@ -90,7 +90,11 @@ const TaskStatus: FC<TaskStatusProps> = observer(
)}
</Text>
)}
<AntDesign name="down" size={14} color={colors.primary} />
<AntDesign
name="down"
size={14}
color={task?.status || status ? "#000000" : colors.primary}
/>
</View>
</TouchableOpacity>
</>
Expand Down
32 changes: 23 additions & 9 deletions apps/mobile/app/components/TeamDropdown/DropDownSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import { Avatar } from "react-native-paper"
import { observer } from "mobx-react-lite"
import { limitTextCharaters } from "../../helpers/sub-text"
import { useNavigation } from "@react-navigation/native"
import { FlatList } from "react-native-gesture-handler"

export interface Props {
teams: IOrganizationTeamList[]
Expand Down Expand Up @@ -73,15 +74,28 @@ const DropDownSection: FC<Props> = observer(function DropDownSection({
{activeTeamId && (
<DropItem resized={resized} team={activeTeam} changeTeam={changeTeam} isActiveTeam={true} />
)}
{others.map((item, index) => (
<DropItem
key={index}
team={item}
resized={resized}
changeTeam={changeTeam}
isActiveTeam={false}
/>
))}

<FlatList
data={others}
scrollEnabled={false}
renderItem={({ item, index }) => (
<View
style={{
width: resized ? "100%" : "90%",
justifyContent: "center",
alignItems: "center",
}}
>
<DropItem
key={index}
team={item}
resized={resized}
changeTeam={changeTeam}
isActiveTeam={false}
/>
</View>
)}
/>
<TouchableOpacity
style={{ width: "90%", opacity: isAccountVerified ? 1 : 0.5 }}
onPress={() => onCreateTeam()}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ const ListCardItem: React.FC<Props> = (props) => {
return (
<Card
style={[
{ borderRadius: 14, ...GS.shadow },
styles.cardContainer,
!dark && activeAuthTask && { borderColor: "#8C7AE4", borderWidth: 3 },
]}
>
Expand All @@ -285,6 +285,14 @@ const ListCardItem: React.FC<Props> = (props) => {
export default ListCardItem

const styles = StyleSheet.create({
cardContainer: {
borderRadius: 14,
elevation: 24,
shadowColor: "#000",
shadowOffset: { width: 0, height: 12 },
shadowOpacity: 0.05,
shadowRadius: 5,
},
dropdownTxt: {
color: "#282048",
fontFamily: typography.primary.semiBold,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
Text,
StyleSheet,
ViewStyle,
ScrollView,
Dimensions,
Animated,
Modal,
TouchableWithoutFeedback,
FlatList,
} from "react-native"
import { AntDesign, Feather, FontAwesome } from "@expo/vector-icons"
import { GLOBAL_STYLE as GS } from "../../../../../assets/ts/styles"
Expand Down Expand Up @@ -92,16 +92,21 @@ const TaskStatusFilterDropDown: FC<DropDownProps> = observer(
>
<View style={styles.secondContainer}>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>Statuses</Text>
<ScrollView bounces={false} style={{ paddingHorizontal: 16, height: height / 2.55 }}>
{allTaskLabels.map((item, idx) => (
<DropDownItem
selectedLabels={selectedLabels}
setSelectedLabels={setSelectedLabels}
label={item}
key={idx}
/>
))}
</ScrollView>
<View style={{ paddingHorizontal: 16, height: height / 2.55 }}>
<FlatList
bounces={false}
showsVerticalScrollIndicator={false}
data={allTaskLabels}
renderItem={({ item, index }) => (
<DropDownItem
selectedLabels={selectedLabels}
setSelectedLabels={setSelectedLabels}
label={item}
key={index}
/>
)}
/>
</View>
</View>
</View>
</TouchableWithoutFeedback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
Text,
StyleSheet,
ViewStyle,
ScrollView,
Dimensions,
Animated,
Modal,
TouchableWithoutFeedback,
FlatList,
} from "react-native"
import { AntDesign, Feather, FontAwesome } from "@expo/vector-icons"
import { GLOBAL_STYLE as GS } from "../../../../../assets/ts/styles"
Expand Down Expand Up @@ -99,16 +99,21 @@ const TaskStatusFilterDropDown: FC<DropDownProps> = observer(
>
<View style={styles.secondContainer}>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>Statuses</Text>
<ScrollView bounces={false} style={{ paddingHorizontal: 16, height: height / 2.55 }}>
{allTaskPriorities.map((item, idx) => (
<DropDownItem
selectedPriorities={selectedPriorities}
setSelectedPriorities={setSelectedPriorities}
priority={item}
key={idx}
/>
))}
</ScrollView>
<View style={{ paddingHorizontal: 16, height: height / 2.55 }}>
<FlatList
bounces={false}
showsVerticalScrollIndicator={false}
data={allTaskPriorities}
renderItem={({ item, index }) => (
<DropDownItem
selectedPriorities={selectedPriorities}
setSelectedPriorities={setSelectedPriorities}
priority={item}
key={index}
/>
)}
/>
</View>
</View>
</View>
</TouchableWithoutFeedback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
Text,
StyleSheet,
ViewStyle,
ScrollView,
Dimensions,
Animated,
Modal,
TouchableWithoutFeedback,
FlatList,
} from "react-native"
import { AntDesign, Feather, FontAwesome } from "@expo/vector-icons"
import { GLOBAL_STYLE as GS } from "../../../../../assets/ts/styles"
Expand Down Expand Up @@ -92,16 +92,21 @@ const TaskStatusFilterDropDown: FC<DropDownProps> = observer(
>
<View style={styles.secondContainer}>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>Statuses</Text>
<ScrollView bounces={false} style={{ paddingHorizontal: 16, height: height / 2.55 }}>
{allTaskSizes.map((item, idx) => (
<DropDownItem
selectedSizes={selectedSizes}
setSelectedSizes={setSelectedSizes}
size={item}
key={idx}
/>
))}
</ScrollView>
<View style={{ paddingHorizontal: 16, height: height / 2.55 }}>
<FlatList
bounces={false}
showsVerticalScrollIndicator={false}
data={allTaskSizes}
renderItem={({ item, index }) => (
<DropDownItem
selectedSizes={selectedSizes}
setSelectedSizes={setSelectedSizes}
size={item}
key={index}
/>
)}
/>
</View>
</View>
</View>
</TouchableWithoutFeedback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
Text,
StyleSheet,
ViewStyle,
ScrollView,
Dimensions,
Animated,
Modal,
TouchableWithoutFeedback,
FlatList,
} from "react-native"
import { AntDesign, Feather, FontAwesome } from "@expo/vector-icons"
import { GLOBAL_STYLE as GS } from "../../../../../assets/ts/styles"
Expand Down Expand Up @@ -93,16 +93,21 @@ const TaskStatusFilterDropDown: FC<DropDownProps> = observer(
>
<View style={styles.secondContainer}>
<Text style={[styles.dropdownTitle, { color: colors.primary }]}>Statuses</Text>
<ScrollView bounces={false} style={{ paddingHorizontal: 16, height: height / 2.55 }}>
{allStatuses.map((item, idx) => (
<DropDownItem
selectedStatus={selectedStatus}
setSelectedStatus={setSelectedStatus}
status={item}
key={idx}
/>
))}
</ScrollView>
<View style={{ paddingHorizontal: 16, height: height / 2.55 }}>
<FlatList
bounces={false}
showsVerticalScrollIndicator={false}
data={allStatuses}
renderItem={({ item, index }) => (
<DropDownItem
selectedStatus={selectedStatus}
setSelectedStatus={setSelectedStatus}
status={item}
key={index}
/>
)}
/>
</View>
</View>
</View>
</TouchableWithoutFeedback>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const styles = StyleSheet.create({
shadowTimerNotRunning: {
elevation: 10,
shadowColor: "#3826A6",
shadowOffset: { width: 0, height: 10 },
shadowOffset: { width: 0, height: 8 },
shadowOpacity: 0.5,
shadowRadius: 10,
},
Expand Down
Loading

0 comments on commit 3e397a4

Please sign in to comment.