Skip to content

Commit

Permalink
Merge pull request #1615 from ever-co/improve/team-settings-member-roles
Browse files Browse the repository at this point in the history
created the members settings screen
  • Loading branch information
evereq authored Oct 21, 2023
2 parents cf0bb98 + 7755a38 commit bbf96bf
Show file tree
Hide file tree
Showing 12 changed files with 107 additions and 2 deletions.
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,9 @@ const ar: Translations = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "الأعضاء والأدوار",
},
changeFullName: {
firstNamePlaceholder: "First Name",
lastNamePlaholder: "Last Name",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/bg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ const bg = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "Members & Roles",
},
changeFullName: {
firstNamePlaceholder: "First Name",
lastNamePlaholder: "Last Name",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ const en = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "Members & Roles",
},
changeFullName: {
firstNamePlaceholder: "First Name",
lastNamePlaholder: "Last Name",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ const es = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "Members & Roles",
},
changeFullName: {
firstNamePlaceholder: "First Name",
lastNamePlaholder: "Last Name",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ const fr = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "Membres et rôles",
},
changeAvatar: {
recentPictures: "Photos récentes",
recentFiles: "Fichiers récents",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/he.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ const he = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "Members & Roles",
},
changeFullName: {
firstNamePlaceholder: "First Name",
lastNamePlaholder: "Last Name",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/ko.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,9 @@ const ko: Translations = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "Members & Roles",
},
changeFullName: {
firstNamePlaceholder: "First Name",
lastNamePlaholder: "Last Name",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/ru.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ const ru = {
createButtonText: "Create",
updateButtonText: "Update",
},
membersSettingsScreen: {
mainTitle: "Members & Roles",
},
changeFullName: {
firstNamePlaceholder: "First Name",
lastNamePlaholder: "Last Name",
Expand Down
3 changes: 3 additions & 0 deletions apps/mobile/app/navigators/AuthenticatedNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
TaskLabelScreen,
TaskSizeScreen,
TaskPriorityScreen,
MembersSettingsScreen,
} from "../screens"

// HELPERS
Expand Down Expand Up @@ -57,6 +58,7 @@ export type AuthenticatedDrawerParamList = {
TaskSizeScreen: undefined
TaskStatus: undefined
TaskPriority: undefined
MembersSettingsScreen: undefined
}
/**
* Helper for automatically generating navigation prop types for each route.
Expand Down Expand Up @@ -236,6 +238,7 @@ export const AuthenticatedNavigator = observer(function AuthenticatedNavigator()
<drawer.Screen name="TaskLabelScreen" component={TaskLabelScreen} />
<drawer.Screen name="TaskSizeScreen" component={TaskSizeScreen} />
<drawer.Screen name="TaskPriority" component={TaskPriorityScreen} />
<drawer.Screen name="MembersSettingsScreen" component={MembersSettingsScreen} />
</drawer.Navigator>
)
})
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import { View, Text, ViewStyle, TouchableOpacity, StyleSheet } from "react-native"
import React, { FC } from "react"
import { AuthenticatedDrawerScreenProps } from "../../../navigators/AuthenticatedNavigator"
import { Screen } from "../../../components"
import Animated from "react-native-reanimated"
import { typography, useAppTheme } from "../../../theme"
import { AntDesign } from "@expo/vector-icons"
import { translate } from "../../../i18n"

export const MembersSettingsScreen: FC<AuthenticatedDrawerScreenProps<"MembersSettingsScreen">> = (
_props,
) => {
const { colors } = useAppTheme()
const { navigation } = _props
const fall = new Animated.Value(1)

return (
<Screen
preset="scroll"
ScrollViewProps={{ bounces: false }}
contentContainerStyle={[$container, { backgroundColor: colors.background2 }]}
safeAreaEdges={["top"]}
>
<Animated.View style={{ opacity: Animated.add(0.1, Animated.multiply(fall, 1.0)) }}>
<View style={[$headerContainer, { backgroundColor: colors.background }]}>
<View style={[styles.container, { backgroundColor: colors.background }]}>
<TouchableOpacity onPress={() => navigation.navigate("Setting")}>
<AntDesign name="arrowleft" size={24} color={colors.primary} />

Check warning on line 28 in apps/mobile/app/screens/Authenticated/MembersSettingsScreen/index.tsx

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (arrowleft)
</TouchableOpacity>
<Text style={[styles.title, { color: colors.primary }]}>
{translate("settingScreen.membersSettingsScreen.mainTitle")}
</Text>
</View>
</View>
<Text>Members list will be here</Text>
</Animated.View>
</Screen>
)
}

const $container: ViewStyle = {
flex: 1,
}

const $headerContainer: ViewStyle = {
padding: 20,
paddingVertical: 16,
shadowColor: "rgba(0, 0, 0, 0.6)",
shadowOffset: {
width: 0,
height: 2,
},
shadowOpacity: 0.07,
shadowRadius: 1.0,
elevation: 1,
zIndex: 10,
}

const styles = StyleSheet.create({
container: {
alignItems: "center",
flexDirection: "row",
width: "100%",
},

title: {
alignSelf: "center",
fontFamily: typography.primary.semiBold,
fontSize: 16,
textAlign: "center",
width: "80%",
},
})
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,11 @@ const TeamSettings: FC<ITeamSettingProps> = observer(({ props, onOpenBottomSheet
}`}
onPress={() => navigation.navigate("TaskLabelScreen")}
/>
<SingleInfo title={translate("settingScreen.teamSection.teamRole")} value={"No"} />
<SingleInfo
title={translate("settingScreen.teamSection.teamRole")}
value={"No"}
onPress={() => navigation.navigate("MembersSettingsScreen")}
/>
<SingleInfo
title={translate("settingScreen.teamSection.workSchedule")}
value={translate("settingScreen.teamSection.workScheduleHint")}
Expand Down
3 changes: 2 additions & 1 deletion apps/mobile/app/screens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export * from "./Authenticated/SettingScreen"
export * from "./Authenticated/TaskStatusScreen"
export * from "./Authenticated/TaskPrioritiesScreen"
export * from "./Authenticated/TaskLabelScreen"
export * from "./Authenticated/TaskSizeScreen"
export * from "./Authenticated/TaskSizeScreen"
export * from "./Authenticated/MembersSettingsScreen"

0 comments on commit bbf96bf

Please sign in to comment.