diff --git a/app/(application)/discussion/[id].tsx b/app/(application)/discussion/[id].tsx index d071514..2d846d7 100644 --- a/app/(application)/discussion/[id].tsx +++ b/app/(application)/discussion/[id].tsx @@ -210,10 +210,11 @@ export default function DetailDiscussionGeneral() { disable={(data?.status === 2 || !data?.isActive || (!memberDiscussion && (entityUser.role == "user" || entityUser.role == "coadmin")))} type="default" round - placeholder="Kirim Komentar" + placeholder="Kirim Komentar2" bg="white" onChange={setKomentar} value={komentar} + multiline itemRight={ { (komentar != '' && data?.status === 1 && data?.isActive && (memberDiscussion || (entityUser.role != "user" && entityUser.role != "coadmin"))) diff --git a/app/(application)/division/[id]/(fitur-division)/discussion/[detail]/index.tsx b/app/(application)/division/[id]/(fitur-division)/discussion/[detail]/index.tsx index dba1b1c..529ba7f 100644 --- a/app/(application)/division/[id]/(fitur-division)/discussion/[detail]/index.tsx +++ b/app/(application)/division/[id]/(fitur-division)/discussion/[detail]/index.tsx @@ -304,6 +304,7 @@ export default function DiscussionDetail() { bg="white" type="default" round + multiline placeholder="Kirim Komentar" onChange={setKomentar} value={komentar} diff --git a/app/(application)/division/create/add-admin-division.tsx b/app/(application)/division/create/add-admin-division.tsx index aa7b9b9..1461b3f 100644 --- a/app/(application)/division/create/add-admin-division.tsx +++ b/app/(application)/division/create/add-admin-division.tsx @@ -9,6 +9,7 @@ import { setFormCreateDivision } from "@/lib/divisionCreate"; import { setUpdateDivision } from "@/lib/divisionUpdate"; import { useAuthSession } from "@/providers/AuthProvider"; import { AntDesign } from "@expo/vector-icons"; +import { StackActions, useNavigation } from "@react-navigation/native"; import { router, Stack, useLocalSearchParams } from "expo-router"; import { useEffect, useState } from "react"; import { Pressable, SafeAreaView, ScrollView, View } from "react-native"; @@ -23,6 +24,7 @@ type Props = { export default function CreateDivisionAddAdmin() { const { token, decryptToken } = useAuthSession() + const navigation = useNavigation() const { id } = useLocalSearchParams<{ id: string }>() const [dataOld, setDataOld] = useState([]) const [data, setData] = useState([]) @@ -57,7 +59,8 @@ export default function CreateDivisionAddAdmin() { Toast.show({ type: 'small', text1: 'Berhasil membuat divisi', }) dispatch(setFormCreateDivision({ admin: [], member: [], data: { idGroup: '', name: '', desc: '' } })) dispatch(setUpdateDivision(!updateDivision)) - router.replace(`/division/`) + navigation.dispatch(StackActions.pop(3)) + // router.replace(`/division/`) } else { Toast.show({ type: 'small', text1: response.message, }) } diff --git a/app/(application)/edit-profile.tsx b/app/(application)/edit-profile.tsx index c0fd456..9192726 100644 --- a/app/(application)/edit-profile.tsx +++ b/app/(application)/edit-profile.tsx @@ -10,11 +10,14 @@ import { apiEditProfile, apiGetProfile } from "@/lib/api"; import { setEntities } from "@/lib/entitiesSlice"; import { useAuthSession } from "@/providers/AuthProvider"; import { MaterialCommunityIcons } from "@expo/vector-icons"; +import { useHeaderHeight } from "@react-navigation/elements"; import * as ImagePicker from "expo-image-picker"; import { router, Stack } from "expo-router"; import { useEffect, useState } from "react"; import { Image, + KeyboardAvoidingView, + Platform, Pressable, SafeAreaView, ScrollView, @@ -37,6 +40,7 @@ type Props = { }; export default function EditProfile() { + const headerHeight = useHeaderHeight() const dispatch = useDispatch() const entities = useSelector((state: any) => state.entities) const { token, decryptToken } = useAuthSession() @@ -231,116 +235,122 @@ export default function EditProfile() { ), }} /> - - - - { - selectedImage != undefined ? ( - - { setErrorImg(true) }} - /> - - - - - ) : ( - - { setErrorImg(true) }} - /> - - - - - ) - } + + + + + { + selectedImage != undefined ? ( + + { setErrorImg(true) }} + /> + + + + + ) : ( + + { setErrorImg(true) }} + /> + + + + + ) + } + + { + setValChoose(choosePosition.val); + setValSelect("position"); + setSelect(true); + }} + error={error.position} + errorText="Jabatan tidak boleh kosong" + /> + { + validationForm("nik", val) + }} + /> + { + validationForm("name", val) + }} + /> + { + validationForm("email", val) + }} + /> + +62} + value={data?.phone} + error={error.phone} + errorText="Nomor Telepon tidak valid" + onChange={val => { + validationForm("phone", val) + }} + /> + { + setValChoose(chooseGender.val); + setValSelect("gender"); + setSelect(true); + }} + error={error.gender} + errorText="Jenis Kelamin tidak boleh kosong" + /> - { - setValChoose(choosePosition.val); - setValSelect("position"); - setSelect(true); - }} - error={error.position} - errorText="Jabatan tidak boleh kosong" - /> - { - validationForm("nik", val) - }} - /> - { - validationForm("name", val) - }} - /> - { - validationForm("email", val) - }} - /> - +62} - value={data?.phone} - error={error.phone} - errorText="Nomor Telepon tidak valid" - onChange={val => { - validationForm("phone", val) - }} - /> - { - setValChoose(chooseGender.val); - setValSelect("gender"); - setSelect(true); - }} - error={error.gender} - errorText="Jenis Kelamin tidak boleh kosong" - /> - - + + - Filter : - { - (entityUser.role == "supadmin" || entityUser.role == "developer") && nameGroup - } - { - (entityUser.role == 'user' || entityUser.role == 'coadmin' || entityUser.role == 'cosupadmin') - ? (cat == 'null' || cat == 'undefined' || cat == undefined || cat == '' || cat == 'data-saya') ? 'Kegiatan Saya' : 'Semua Kegiatan' - : '' - } - + { + entityUser.role != 'cosupadmin' && entityUser.role != 'admin' && + Filter : + { + (entityUser.role == "supadmin" || entityUser.role == "developer") && nameGroup + } + { + (entityUser.role == 'user' || entityUser.role == 'coadmin') + ? (cat == 'null' || cat == 'undefined' || cat == undefined || cat == '' || cat == 'data-saya') ? 'Kegiatan Saya' : 'Semua Kegiatan' + : '' + } + + } diff --git a/components/drawerBottom.tsx b/components/drawerBottom.tsx index 009d2b0..75f0a93 100644 --- a/components/drawerBottom.tsx +++ b/components/drawerBottom.tsx @@ -35,6 +35,7 @@ export default function DrawerBottom({ isVisible, setVisible, title, children, a backdropTransitionInTiming={500} backdropTransitionOutTiming={500} useNativeDriverForBackdrop={true} + propagateSwipe={true} > { keyboard ? @@ -62,7 +63,7 @@ export default function DrawerBottom({ isVisible, setVisible, title, children, a - + {children} diff --git a/components/inputForm.tsx b/components/inputForm.tsx index 35573d1..294db84 100644 --- a/components/inputForm.tsx +++ b/components/inputForm.tsx @@ -40,6 +40,7 @@ export function InputForm({ label, value, placeholder, onChange, info, disable, {error && ({errorText})} diff --git a/components/project/headerProjectList.tsx b/components/project/headerProjectList.tsx index b0d42f0..56818e6 100644 --- a/components/project/headerProjectList.tsx +++ b/components/project/headerProjectList.tsx @@ -30,16 +30,20 @@ export default function HeaderRightProjectList() { }} /> } - } - title="Filter" - onPress={() => { - setVisible(false) - setTimeout(() => { - setFilter(true) - }, 600) - }} - /> + { + (entityUser.role == "user" || entityUser.role == "coadmin" || entityUser.role == "supadmin" || entityUser.role == "developer") && + } + title="Filter" + onPress={() => { + setVisible(false) + setTimeout(() => { + setFilter(true) + }, 600) + }} + /> + } + - - \ No newline at end of file + + aps-environment + development + + diff --git a/ios/Desa/Info.plist b/ios/Desa/Info.plist index 46f4c76..1c1cf85 100644 --- a/ios/Desa/Info.plist +++ b/ios/Desa/Info.plist @@ -1,95 +1,99 @@ - - CADisableMinimumFrameDurationOnPhone - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleDisplayName - Desa+ - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - $(PRODUCT_BUNDLE_PACKAGE_TYPE) - CFBundleShortVersionString - 1.0.5 - CFBundleSignature - ???? - CFBundleURLTypes - - - CFBundleURLSchemes - - myapp - mobiledarmasaba.app - - - - CFBundleURLSchemes - - exp+mobile-darmasaba - - - - CFBundleVersion - 2 - ITSAppUsesNonExemptEncryption - - LSMinimumSystemVersion - 12.0 - LSRequiresIPhoneOS - - NSAppTransportSecurity - - NSAllowsArbitraryLoads - - NSAllowsLocalNetworking - - - NSCameraUsageDescription - Allow $(PRODUCT_NAME) to access your camera - NSMicrophoneUsageDescription - Allow $(PRODUCT_NAME) to access your microphone - NSPhotoLibraryAddUsageDescription - Allow $(PRODUCT_NAME) to save photos - NSPhotoLibraryUsageDescription - Allow $(PRODUCT_NAME) to access your photos - NSUserActivityTypes - - $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route - - UILaunchStoryboardName - SplashScreen - UIRequiredDeviceCapabilities - - arm64 - - UIRequiresFullScreen - - UIStatusBarStyle - UIStatusBarStyleDefault - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UIUserInterfaceStyle - Automatic - UIViewControllerBasedStatusBarAppearance - - - \ No newline at end of file + + CADisableMinimumFrameDurationOnPhone + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Desa+ + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + $(PRODUCT_BUNDLE_PACKAGE_TYPE) + CFBundleShortVersionString + 1.0.5 + CFBundleSignature + ???? + CFBundleURLTypes + + + CFBundleURLSchemes + + myapp + mobiledarmasaba.app + + + + CFBundleURLSchemes + + exp+mobile-darmasaba + + + + CFBundleVersion + 2 + ITSAppUsesNonExemptEncryption + + LSMinimumSystemVersion + 12.0 + LSRequiresIPhoneOS + + NSAppTransportSecurity + + NSAllowsArbitraryLoads + + NSAllowsLocalNetworking + + + NSCameraUsageDescription + Allow $(PRODUCT_NAME) to access your camera + NSMicrophoneUsageDescription + Allow $(PRODUCT_NAME) to access your microphone + NSPhotoLibraryAddUsageDescription + Allow $(PRODUCT_NAME) to save photos + NSPhotoLibraryUsageDescription + Allow $(PRODUCT_NAME) to access your photos + NSUserActivityTypes + + $(PRODUCT_BUNDLE_IDENTIFIER).expo.index_route + + UIBackgroundModes + + remote-notification + + UILaunchStoryboardName + SplashScreen + UIRequiredDeviceCapabilities + + arm64 + + UIRequiresFullScreen + + UIStatusBarStyle + UIStatusBarStyleDefault + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIUserInterfaceStyle + Automatic + UIViewControllerBasedStatusBarAppearance + + + diff --git a/providers/AuthProvider.tsx b/providers/AuthProvider.tsx index d01eac0..bff0a8a 100644 --- a/providers/AuthProvider.tsx +++ b/providers/AuthProvider.tsx @@ -5,7 +5,6 @@ import AsyncStorage from '@react-native-async-storage/async-storage'; import CryptoES from "crypto-es"; import { router } from "expo-router"; import { createContext, MutableRefObject, ReactNode, useCallback, useContext, useEffect, useRef, useState } from 'react'; -import { Platform } from 'react-native'; const AuthContext = createContext<{ signIn: (arg0: string) => void; @@ -57,13 +56,13 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea const permission = await requestPermission() if (permission) { try { - // COMING SOON - if (Platform.OS === 'android') { - const tokenDevice = await getToken() - const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) }) - }else{ - const register = await apiRegisteredToken({ user: hasil, token: "" }) - } + // if (Platform.OS === 'android') { + const tokenDevice = await getToken() + const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) }) + // }else{ + // const tokenDevice = await getToken() + // const register = await apiRegisteredToken({ user: hasil, token: String(tokenDevice) }) + // } } catch (error) { console.error(error) } finally { @@ -82,13 +81,12 @@ export default function AuthProvider({ children }: { children: ReactNode }): Rea const signOut = useCallback(async () => { try { const hasil = await decryptToken(String(tokenRef.current)) - // COMING SOON - if (Platform.OS === 'android') { - const token = await getToken() - const response = await apiUnregisteredToken({ user: hasil, token: String(token) }) - }else{ - const response = await apiUnregisteredToken({ user: hasil, token: "" }) - } + // if (Platform.OS === 'android') { + const token = await getToken() + const response = await apiUnregisteredToken({ user: hasil, token: String(token) }) + // }else{ + // const response = await apiUnregisteredToken({ user: hasil, token: "" }) + // } } catch (error) { console.error(error) } finally {