upd: tampilan
Deskripsi: - masang toast - ganti tag Text No Issues
This commit is contained in:
@@ -6,7 +6,8 @@ import { MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons";
|
||||
import * as DocumentPicker from "expo-document-picker";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { useState } from "react";
|
||||
import { ToastAndroid, View } from "react-native";
|
||||
import { View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import ButtonMenuHeader from "../buttonMenuHeader";
|
||||
import DrawerBottom from "../drawerBottom";
|
||||
@@ -28,14 +29,14 @@ export default function HeaderRightDocument({ path }: { path: string }) {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiCreateFolderDocument({ user: hasil, name, path, idDivision: id })
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil membuat folder baru", ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil membuat folder baru', })
|
||||
dispatch(setUpdateDokumen(!update))
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show("Terjadi kesalahan", ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Terjadi kesalahan', })
|
||||
} finally {
|
||||
setNewFolder(false)
|
||||
}
|
||||
@@ -74,14 +75,14 @@ export default function HeaderRightDocument({ path }: { path: string }) {
|
||||
|
||||
const response = await apiUploadFileDocument({ data: fd })
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil mengunggah file", ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengunggah file', })
|
||||
dispatch(setUpdateDokumen(!update))
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show("Terjadi kesalahan", ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Terjadi kesalahan', })
|
||||
} finally {
|
||||
setVisible(false)
|
||||
}
|
||||
|
||||
@@ -2,8 +2,9 @@ import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { useState } from "react";
|
||||
import { Pressable, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { Pressable, ScrollView, View } from "react-native";
|
||||
import { useSharedValue } from "react-native-reanimated";
|
||||
import Toast from "react-native-toast-message";
|
||||
import AlertKonfirmasi from "../alertKonfirmasi";
|
||||
import DrawerBottom from "../drawerBottom";
|
||||
import { InputForm } from "../inputForm";
|
||||
@@ -13,6 +14,7 @@ import MenuItemRow from "../menuItemRow";
|
||||
import ModalFloat from "../modalFloat";
|
||||
import ModalSelectMultiple from "../modalSelectMultiple";
|
||||
import ModalSalinMove from "./modalSalinMove";
|
||||
import Text from "../Text";
|
||||
|
||||
|
||||
type Props = {
|
||||
@@ -60,7 +62,7 @@ export default function MenuBottomSelectDocument({ onDone }: Props) {
|
||||
|
||||
onPress: () => {
|
||||
onDone()
|
||||
ToastAndroid.show('Berhasil menghapus data', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menghapus data', })
|
||||
}
|
||||
})
|
||||
}}
|
||||
@@ -94,7 +96,7 @@ export default function MenuBottomSelectDocument({ onDone }: Props) {
|
||||
<ModalFloat title="Ganti Nama Dokumen" isVisible={isRename} setVisible={setRename}
|
||||
onSubmit={() => {
|
||||
onDone()
|
||||
ToastAndroid.show('Berhasil mengganti nama dokumen', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengganti nama dokumen', })
|
||||
}}>
|
||||
<View>
|
||||
<InputForm type="default" placeholder="Nama File" required label="Nama File" />
|
||||
@@ -204,7 +206,7 @@ export default function MenuBottomSelectDocument({ onDone }: Props) {
|
||||
|
||||
<ModalSelectMultiple choose="dinas" title="Bagikan" category="share-division" open={isShare} close={setShare}
|
||||
onSelect={() => {
|
||||
ToastAndroid.show('Success', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Success', })
|
||||
setShare(false)
|
||||
}}
|
||||
/>
|
||||
|
||||
@@ -3,10 +3,11 @@ import { apiGetDocumentInformasi } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, ScrollView, Text, View } from "react-native";
|
||||
import { Pressable, ScrollView, View } from "react-native";
|
||||
import { useSharedValue } from "react-native-reanimated";
|
||||
import ItemAccordion from "../itemAccordion";
|
||||
import ItemDetailMember from "../itemDetailMember";
|
||||
import Text from "../Text";
|
||||
|
||||
type Props = {
|
||||
category: string,
|
||||
|
||||
@@ -5,7 +5,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { ToastAndroid, View } from "react-native";
|
||||
import { View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
import DrawerBottom from "../drawerBottom";
|
||||
import MenuItemRow from "../menuItemRow";
|
||||
@@ -63,14 +64,14 @@ export default function ModalMore({
|
||||
path,
|
||||
});
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil memindahkan file", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil memindahkan file', });
|
||||
dispatch(setUpdateDokumen(!update));
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show("Terjadi kesalahan", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Terjadi kesalahan', });
|
||||
} finally {
|
||||
setIsCut(false);
|
||||
onClose();
|
||||
@@ -87,14 +88,14 @@ export default function ModalMore({
|
||||
idDivision: id
|
||||
});
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil menyalin file", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menyalin file', });
|
||||
dispatch(setUpdateDokumen(!update));
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show("Terjadi kesalahan", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Terjadi kesalahan', });
|
||||
} finally {
|
||||
setIsCopy(false);
|
||||
onClose();
|
||||
|
||||
Reference in New Issue
Block a user