Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

created the members settings screen #1615

Merged
merged 1 commit into from
Oct 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions apps/mobile/app/i18n/ar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
cancel: "حذف",
loading: "Loading",
back: "خلف",
logOut: "تسجيل خروج",

Check warning on line 9 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (تسجيل)

Check warning on line 9 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (خروج)
save: "حفظ",
edit: "Edit",
confirm: "Confirm",
Expand All @@ -15,7 +15,7 @@
},
welcomeScreen: {
postscript:
"ربما لا يكون هذا هو الشكل الذي يبدو عليه تطبيقك مالم يمنحك المصمم هذه الشاشات وشحنها في هذه الحالة",

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (ربما)

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (يكون)

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (الشكل)

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (الذي)

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (يبدو)

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (عليه)

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (تطبيقك)

Check warning on line 18 in apps/mobile/app/i18n/ar.ts

View workflow job for this annotation

GitHub Actions / Cspell

Unknown word (مالم)
readyForLaunch: "تطبيقك تقريبا جاهز للتشغيل",
exciting: "اوه هذا مثير",
letsGo: "لنذهب", // @demo remove-current-line
Expand Down Expand Up @@ -232,6 +232,9 @@
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} />
</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"
Loading