upd: tampilan
Deskripsi: - masang toast - ganti tag Text No Issues
This commit is contained in:
@@ -3,6 +3,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import ImageWithLabel from "@/components/imageWithLabel";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiAddMemberCalendar, apiGetCalendarOne, apiGetDivisionMember } from "@/lib/api";
|
||||
import { setUpdateCalendar } from "@/lib/calendarUpdate";
|
||||
@@ -10,7 +11,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -79,15 +81,15 @@ export default function AddMemberCalendarEvent() {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiAddMemberCalendar({ id: idCalendar, data: { user: hasil, member: selectMember } })
|
||||
if (response.success) {
|
||||
ToastAndroid.show('Berhasil menambahkan anggota', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menambahkan anggota', })
|
||||
dispatch(setUpdateCalendar({ ...update, member: !update.member }))
|
||||
router.back()
|
||||
} 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', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { Stack, router, useLocalSearchParams } from "expo-router"
|
||||
import moment from "moment"
|
||||
import { useEffect, useState } from "react"
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"
|
||||
import { SafeAreaView, ScrollView, View } from "react-native"
|
||||
import Toast from "react-native-toast-message"
|
||||
|
||||
export default function EditEventCalendar() {
|
||||
const { token, decryptToken } = useAuthSession();
|
||||
@@ -53,7 +54,7 @@ export default function EditEventCalendar() {
|
||||
setChoose({ val: response.data.repeatEventTyper, label: valueTypeEventRepeat.find((item) => item.id == response.data.repeatEventTyper)?.name || "" })
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show('Gagal mendapatkan data', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal mendapatkan data', })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,13 +144,13 @@ export default function EditEventCalendar() {
|
||||
const response = await apiUpdateCalendar({ data: { ...data, user: hasil }, id: idCalendar })
|
||||
if (response.success) {
|
||||
router.replace(`/division/${id}/calendar/`)
|
||||
ToastAndroid.show('Berhasil mengubah acara', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah acara', })
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show('Gagal mengubah acara', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal mengubah acara', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { MaterialCommunityIcons } from "@expo/vector-icons"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native"
|
||||
import { SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||
import Toast from "react-native-toast-message"
|
||||
import { useDispatch, useSelector } from "react-redux"
|
||||
|
||||
type Props = {
|
||||
@@ -122,13 +123,11 @@ export default function DetailEventCalendar() {
|
||||
|
||||
if (response.success) {
|
||||
dispatch(setUpdateCalendar({ ...update, member: !update.member }));
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
} 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 {
|
||||
setModalMember(false)
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import ImageWithLabel from "@/components/imageWithLabel";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiCreateCalendar, apiGetDivisionMember } from "@/lib/api";
|
||||
import { setFormCreateCalendar } from "@/lib/calendarCreate";
|
||||
@@ -11,7 +12,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -59,7 +61,7 @@ export default function CreateCalendarAddMember() {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiCreateCalendar({ data: { ...update, user: hasil, idDivision: id, member: selectMember } })
|
||||
if (response.success) {
|
||||
ToastAndroid.show('Berhasil membuat acara', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil membuat acara', })
|
||||
dispatch(setFormCreateCalendar({
|
||||
title: "",
|
||||
desc: "",
|
||||
@@ -74,11 +76,11 @@ export default function CreateCalendarAddMember() {
|
||||
dispatch(setUpdateCalendar({ ...updateRefresh, data: !updateRefresh.data }));
|
||||
router.replace(`/division/${id}/calendar`)
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show('Gagal membuat acara', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal membuat acara', })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,7 +133,7 @@ export default function CreateCalendarAddMember() {
|
||||
<Pressable
|
||||
key={index}
|
||||
style={[Styles.itemSelectModal]}
|
||||
onPress={() => {onChoose(item.idUser, item.name, item.img) }}
|
||||
onPress={() => { onChoose(item.idUser, item.name, item.img) }}
|
||||
>
|
||||
<View style={[Styles.rowItemsCenter, Styles.w70]}>
|
||||
<ImageUser src={`https://wibu-storage.wibudev.com/api/files/${item.img}`} border />
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Skeleton from "@/components/skeleton";
|
||||
import Text from "@/components/Text";
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetCalendarHistory } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { FlatList, Text, View, VirtualizedList } from "react-native";
|
||||
import { FlatList, View, VirtualizedList } from "react-native";
|
||||
|
||||
type Props = {
|
||||
dateStart: Date
|
||||
|
||||
@@ -1,19 +1,20 @@
|
||||
import 'intl';
|
||||
import 'intl/locale-data/jsonp/id';
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import HeaderRightCalendarList from "@/components/calendar/headerCalendarList";
|
||||
import ItemDateCalendar from "@/components/calendar/itemDateCalendar";
|
||||
import EventItem from "@/components/eventItem";
|
||||
import Skeleton from "@/components/skeleton";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetCalendarByDateDivision, apiGetIndicatorCalendar } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { Feather } from "@expo/vector-icons";
|
||||
import dayjs from "dayjs";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import 'intl';
|
||||
import 'intl/locale-data/jsonp/id';
|
||||
import moment from "moment";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, RefreshControl, SafeAreaView, ScrollView, Text, View } from "react-native";
|
||||
import { Pressable, RefreshControl, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Datepicker, {
|
||||
CalendarComponents,
|
||||
CalendarDay
|
||||
|
||||
@@ -7,7 +7,8 @@ import { setUpdateDiscussion } from "@/lib/discussionUpdate";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
export default function DiscussionDivisionEdit() {
|
||||
@@ -43,7 +44,7 @@ export default function DiscussionDivisionEdit() {
|
||||
id: detail,
|
||||
});
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil mengubah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah data', })
|
||||
dispatch(setUpdateDiscussion({ ...update, data: !update.data }));
|
||||
router.back();
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ import { InputForm } from "@/components/inputForm";
|
||||
import LabelStatus from "@/components/labelStatus";
|
||||
import Skeleton from "@/components/skeleton";
|
||||
import SkeletonContent from "@/components/skeletonContent";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import {
|
||||
apiGetDiscussionOne,
|
||||
@@ -17,7 +18,7 @@ import { Ionicons, MaterialIcons } from "@expo/vector-icons";
|
||||
import { firebase } from "@react-native-firebase/database";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, ScrollView, Text, View } from "react-native";
|
||||
import { Pressable, ScrollView, View } from "react-native";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -226,9 +227,7 @@ export default function DiscussionDetail() {
|
||||
color="grey"
|
||||
style={Styles.mr05}
|
||||
/>
|
||||
<Text
|
||||
style={[Styles.textInformation, Styles.cGray, Styles.mb05]}
|
||||
>
|
||||
<Text style={[Styles.textInformation, Styles.cGray, Styles.mb05]} >
|
||||
{dataComment.length} Komentar
|
||||
</Text>
|
||||
</View>
|
||||
|
||||
@@ -7,7 +7,8 @@ import { setUpdateDiscussion } from "@/lib/discussionUpdate"
|
||||
import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { useState } from "react"
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"
|
||||
import { SafeAreaView, ScrollView, View } from "react-native"
|
||||
import Toast from "react-native-toast-message"
|
||||
import { useDispatch, useSelector } from "react-redux"
|
||||
|
||||
export default function CreateDiscussionDivision() {
|
||||
@@ -22,15 +23,15 @@ export default function CreateDiscussionDivision() {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiCreateDiscussion({ data: { user: hasil, desc, idDivision: id } })
|
||||
if (response.success) {
|
||||
ToastAndroid.show('Berhasil menambahkan data', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menambahkan data', })
|
||||
dispatch(setUpdateDiscussion({ ...update, data: !update.data }));
|
||||
router.back()
|
||||
} 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', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4,13 +4,14 @@ import ImageUser from "@/components/imageNew";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import LabelStatus from "@/components/labelStatus";
|
||||
import SkeletonContent from "@/components/skeletonContent";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetDiscussion } from "@/lib/api";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign, Feather, Ionicons } from "@expo/vector-icons";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { RefreshControl, Text, View, VirtualizedList } from "react-native";
|
||||
import { RefreshControl, View, VirtualizedList } from "react-native";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
|
||||
|
||||
@@ -39,10 +39,10 @@ import {
|
||||
RefreshControl,
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
ToastAndroid,
|
||||
View,
|
||||
View
|
||||
} from "react-native";
|
||||
import * as mime from 'react-native-mime-types';
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -207,15 +207,15 @@ export default function DocumentDivision() {
|
||||
const hasil = await decryptToken(String(token?.current));
|
||||
const response = await apiDocumentRename({ user: hasil, ...bodyRename });
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil mengubah nama", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah nama', })
|
||||
dispatch(setUpdateDokumen(!update));
|
||||
handleBatal();
|
||||
} 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 {
|
||||
setRename(false);
|
||||
}
|
||||
@@ -229,15 +229,15 @@ export default function DocumentDivision() {
|
||||
data: selectedFiles,
|
||||
});
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil menghapus", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menghapus', })
|
||||
dispatch(setUpdateDokumen(!update));
|
||||
handleBatal();
|
||||
} 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', })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,15 +254,15 @@ export default function DocumentDivision() {
|
||||
dataItem: selectedFiles,
|
||||
});
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil membagikan item", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil membagikan item', })
|
||||
dispatch(setUpdateDokumen(!update));
|
||||
handleBatal();
|
||||
} 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 {
|
||||
setShare(false);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ButtonSelect from "@/components/buttonSelect";
|
||||
import DrawerBottom from "@/components/drawerBottom";
|
||||
import MenuItemRow from "@/components/menuItemRow";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiAddFileTask, apiCheckFileTask } from "@/lib/api";
|
||||
import { setUpdateTask } from "@/lib/taskUpdate";
|
||||
@@ -16,10 +17,9 @@ import {
|
||||
ActivityIndicator,
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
Text,
|
||||
ToastAndroid,
|
||||
View,
|
||||
View
|
||||
} from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
export default function TaskDivisionAddFile() {
|
||||
@@ -45,7 +45,7 @@ export default function TaskDivisionAddFile() {
|
||||
setFileForm([...fileForm, result.assets?.[0]]);
|
||||
setListFile([...listFile, result.assets?.[0].name]);
|
||||
} else {
|
||||
ToastAndroid.show("File sudah ada", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'File sudah ada', })
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -108,15 +108,15 @@ export default function TaskDivisionAddFile() {
|
||||
|
||||
const response = await apiAddFileTask({ data: fd, id: detail });
|
||||
if (response.success) {
|
||||
ToastAndroid.show("Berhasil menambahkan file", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menambahkan file', })
|
||||
dispatch(setUpdateTask({ ...update, file: !update.file }));
|
||||
router.back();
|
||||
} 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', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import ImageWithLabel from "@/components/imageWithLabel";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiAddMemberTask, apiGetDivisionMember, apiGetTaskOne } from "@/lib/api";
|
||||
import { setUpdateTask } from "@/lib/taskUpdate";
|
||||
@@ -10,7 +11,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -73,15 +75,15 @@ export default function AddMemberTask() {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiAddMemberTask({ id: detail, data: { user: hasil, member: selectMember, idDivision: id } })
|
||||
if (response.success) {
|
||||
ToastAndroid.show('Berhasil menambahkan anggota', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menambahkan anggota', })
|
||||
dispatch(setUpdateTask({ ...update, member: !update.member }))
|
||||
router.back()
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show('Gagal menambahkan anggota', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal menambahkan anggota', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiCreateTaskTugas } from "@/lib/api";
|
||||
import { setUpdateTask } from "@/lib/taskUpdate";
|
||||
@@ -11,10 +12,9 @@ import { useEffect, useState } from "react";
|
||||
import {
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
Text,
|
||||
ToastAndroid,
|
||||
View,
|
||||
View
|
||||
} from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import DateTimePicker, { DateType } from "react-native-ui-datepicker";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
@@ -86,14 +86,14 @@ export default function TaskDivisionAddTask() {
|
||||
});
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, task: !update.task, progress: !update.progress }));
|
||||
ToastAndroid.show("Berhasil menambah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menambah data', })
|
||||
router.back();
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show("Gagal menambah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Gagal menambah data', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ import { setUpdateTask } from "@/lib/taskUpdate";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
export default function TaskDivisionCancel() {
|
||||
@@ -52,14 +53,14 @@ export default function TaskDivisionCancel() {
|
||||
);
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, data: !update.data }));
|
||||
ToastAndroid.show("Berhasil membatalkan kegiatan", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil membatalkan kegiatan', })
|
||||
router.back();
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show("Gagal membatalkan kegiatan", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Gagal membatalkan kegiatan', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ import { setUpdateTask } from "@/lib/taskUpdate";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
export default function TaskDivisionEdit() {
|
||||
@@ -41,7 +42,7 @@ export default function TaskDivisionEdit() {
|
||||
setJudul(val);
|
||||
if (val == "" || val == "null") {
|
||||
setError(true);
|
||||
}else{
|
||||
} else {
|
||||
setError(false);
|
||||
}
|
||||
}
|
||||
@@ -70,14 +71,14 @@ export default function TaskDivisionEdit() {
|
||||
);
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, data: !update.data }));
|
||||
ToastAndroid.show("Berhasil mengubah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah data', })
|
||||
router.back();
|
||||
} 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', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@ import { InputForm } from "@/components/inputForm";
|
||||
import MenuItemRow from "@/components/menuItemRow";
|
||||
import ModalSelect from "@/components/modalSelect";
|
||||
import SectionListAddTask from "@/components/project/sectionListAddTask";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiCreateTask } from "@/lib/api";
|
||||
import { setMemberChoose } from "@/lib/memberChoose";
|
||||
@@ -18,7 +19,8 @@ import { Ionicons, MaterialCommunityIcons } from "@expo/vector-icons";
|
||||
import * as DocumentPicker from "expo-document-picker";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
|
||||
@@ -91,10 +93,10 @@ export default function CreateTaskDivision() {
|
||||
const response = await apiCreateTask(fd)
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, data: !update.data }))
|
||||
ToastAndroid.show('Berhasil menambahkan data', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menambahkan data', })
|
||||
handleBack()
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
|
||||
@@ -3,6 +3,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import ImageWithLabel from "@/components/imageWithLabel";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetDivisionMember } from "@/lib/api";
|
||||
import { setMemberChoose } from "@/lib/memberChoose";
|
||||
@@ -10,7 +11,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -56,7 +58,7 @@ export default function AddMemberCreateTask() {
|
||||
router.back()
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show('Gagal menambahkan anggota', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal menambahkan anggota', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { setTaskCreate } from "@/lib/taskCreate";
|
||||
import dayjs from "dayjs";
|
||||
@@ -9,7 +10,6 @@ import { useEffect, useState } from "react";
|
||||
import {
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
Text,
|
||||
View
|
||||
} from "react-native";
|
||||
import DateTimePicker, {
|
||||
|
||||
@@ -6,6 +6,7 @@ import PaperGridContent from "@/components/paperGridContent";
|
||||
import ProgressBar from "@/components/progressBar";
|
||||
import Skeleton from "@/components/skeleton";
|
||||
import SkeletonTwoItem from "@/components/skeletonTwoItem";
|
||||
import Text from "@/components/Text";
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetTask } from "@/lib/api";
|
||||
@@ -17,7 +18,7 @@ import {
|
||||
} from "@expo/vector-icons";
|
||||
import { router, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, RefreshControl, ScrollView, Text, View, VirtualizedList } from "react-native";
|
||||
import { Pressable, RefreshControl, ScrollView, View, VirtualizedList } from "react-native";
|
||||
import { useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -257,7 +258,7 @@ export default function ListTask() {
|
||||
>
|
||||
<ProgressBar category="list" value={item.progress} />
|
||||
<View style={[Styles.rowSpaceBetween]}>
|
||||
<Text></Text>
|
||||
<Text> </Text>
|
||||
<LabelStatus
|
||||
size="default"
|
||||
category={
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import { InputForm } from "@/components/inputForm";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiEditTaskTugas, apiGetTaskTugas } from "@/lib/api";
|
||||
import { setUpdateTask } from "@/lib/taskUpdate";
|
||||
@@ -11,10 +12,9 @@ import { useEffect, useState } from "react";
|
||||
import {
|
||||
SafeAreaView,
|
||||
ScrollView,
|
||||
Text,
|
||||
ToastAndroid,
|
||||
View,
|
||||
View
|
||||
} from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import DateTimePicker, { DateType } from "react-native-ui-datepicker";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
@@ -75,14 +75,14 @@ export default function UpdateProjectTaskDivision() {
|
||||
const response = await apiEditTaskTugas({ data: { title, dateStart: dayjs(range.startDate).format("YYYY-MM-DD"), dateEnd: dayjs(range.endDate).format("YYYY-MM-DD"), user: hasil }, id: detail });
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, task: !update.task }))
|
||||
ToastAndroid.show("Berhasil mengubah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah data', })
|
||||
router.back();
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
ToastAndroid.show("Gagal mengubah data", ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: 'Gagal mengubah data', })
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,9 +180,7 @@ export default function UpdateProjectTaskDivision() {
|
||||
</View>
|
||||
</View>
|
||||
{(error.endDate || error.startDate) && (
|
||||
<Text
|
||||
style={[Styles.textInformation, Styles.cError, Styles.mt05]}
|
||||
>
|
||||
<Text style={[Styles.textInformation, Styles.cError, Styles.mt05]} >
|
||||
Tanggal tidak boleh kosong
|
||||
</Text>
|
||||
)}
|
||||
|
||||
@@ -3,6 +3,7 @@ import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import ImageWithLabel from "@/components/imageWithLabel";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiAddMemberDivision, apiGetDivisionOneDetail, apiGetUser } from "@/lib/api";
|
||||
import { setUpdateDivision } from "@/lib/divisionUpdate";
|
||||
@@ -10,7 +11,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -74,14 +76,14 @@ export default function AddMemberDivision() {
|
||||
const response = await apiAddMemberDivision({ id: id, data: { user: hasil, member: selectMember } })
|
||||
if (response.success) {
|
||||
dispatch(setUpdateDivision(!update))
|
||||
ToastAndroid.show('Berhasil menambahkan anggota', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menambahkan anggota', })
|
||||
router.replace(`/division/${id}/info`)
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show('Gagal menambahkan anggota', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal menambahkan anggota', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ import { setUpdateDivision } from "@/lib/divisionUpdate";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
export default function EditDivision() {
|
||||
@@ -46,14 +47,14 @@ export default function EditDivision() {
|
||||
const response = await apiEditDivision({ user: hasil, name: data.name, desc: data.desc }, id)
|
||||
if (response.success) {
|
||||
dispatch(setUpdateDivision(!update))
|
||||
ToastAndroid.show('Berhasil mengubah data', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengubah data', })
|
||||
router.back()
|
||||
} 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', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { Feather, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native"
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||
import Toast from "react-native-toast-message"
|
||||
import { useSelector } from "react-redux"
|
||||
|
||||
type PropsDetail = {
|
||||
@@ -66,13 +67,13 @@ export default function InformationDivision() {
|
||||
const response = await apiDeleteMemberDivision({ user: hasil, id: dataMemberChoose.id }, id)
|
||||
if (response.success) {
|
||||
setRefresh(!refresh)
|
||||
ToastAndroid.show('Berhasil mengeluarkan anggota', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil mengeluarkan anggota', })
|
||||
} 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 {
|
||||
setModal(false)
|
||||
}
|
||||
@@ -84,13 +85,13 @@ export default function InformationDivision() {
|
||||
const response = await apiUpdateStatusAdminDivision({ user: hasil, id: dataMemberChoose.id, isAdmin: dataMemberChoose.isAdmin }, id)
|
||||
if (response.success) {
|
||||
setRefresh(!refresh)
|
||||
ToastAndroid.show(dataMemberChoose.isAdmin ? 'Berhasil memberhentikan admin' : 'Berhasil menjadi admin', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: dataMemberChoose.isAdmin ? 'Berhasil memberhentikan admin' : 'Berhasil menjadi admin', })
|
||||
} 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 {
|
||||
setModal(false)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import dayjs from "dayjs"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { useEffect, useState } from "react"
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native"
|
||||
import { SafeAreaView, ScrollView, View } from "react-native"
|
||||
import Toast from "react-native-toast-message"
|
||||
|
||||
export default function ReportDivision() {
|
||||
const { id } = useLocalSearchParams<{ id: string }>()
|
||||
@@ -31,7 +32,7 @@ export default function ReportDivision() {
|
||||
dateEnd: false,
|
||||
});
|
||||
|
||||
function validationForm( cat: "date" | "dateEnd", val: string) {
|
||||
function validationForm(cat: "date" | "dateEnd", val: string) {
|
||||
if (cat == "date") {
|
||||
setData({ ...data, date: val, dateEnd: "" });
|
||||
if (val == "" || val == "null") {
|
||||
@@ -89,7 +90,7 @@ export default function ReportDivision() {
|
||||
})
|
||||
setShowReport(true);
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, });
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader";
|
||||
import ButtonSaveHeader from "@/components/buttonSaveHeader";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiCreateDivision } from "@/lib/api";
|
||||
import { setFormCreateDivision } from "@/lib/divisionCreate";
|
||||
@@ -9,7 +10,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
@@ -50,16 +52,16 @@ export default function CreateDivisionAddAdmin() {
|
||||
const hasil = await decryptToken(String(token?.current))
|
||||
const response = await apiCreateDivision({ ...update, user: hasil })
|
||||
if (response.success) {
|
||||
ToastAndroid.show('Berhasil membuat divisi', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil membuat divisi', })
|
||||
dispatch(setFormCreateDivision({ admin: [], member: [], data: { idGroup: '', name: '', desc: '' } }))
|
||||
dispatch(setUpdateDivision(!updateDivision))
|
||||
router.replace(`/division/`)
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
ToastAndroid.show('Gagal membuat divisi', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Gagal membuat divisi', })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,15 +3,15 @@ import ButtonNextHeader from "@/components/buttonNextHeader";
|
||||
import ImageUser from "@/components/imageNew";
|
||||
import ImageWithLabel from "@/components/imageWithLabel";
|
||||
import InputSearch from "@/components/inputSearch";
|
||||
import Text from "@/components/Text";
|
||||
import Styles from "@/constants/Styles";
|
||||
import { apiGetUser } from "@/lib/api";
|
||||
import { setFormCreateDivision } from "@/lib/divisionCreate";
|
||||
import { setUpdateDivision } from "@/lib/divisionUpdate";
|
||||
import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import { AntDesign } from "@expo/vector-icons";
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { Pressable, SafeAreaView, ScrollView, Text, View } from "react-native";
|
||||
import { Pressable, SafeAreaView, ScrollView, View } from "react-native";
|
||||
import { useDispatch, useSelector } from "react-redux";
|
||||
|
||||
type Props = {
|
||||
|
||||
@@ -12,7 +12,8 @@ import { useAuthSession } from "@/providers/AuthProvider";
|
||||
import dayjs from "dayjs";
|
||||
import { router, Stack } from "expo-router";
|
||||
import { useEffect, useState } from "react";
|
||||
import { SafeAreaView, ScrollView, ToastAndroid, View } from "react-native";
|
||||
import { SafeAreaView, ScrollView, View } from "react-native";
|
||||
import Toast from "react-native-toast-message";
|
||||
|
||||
export default function Report() {
|
||||
const { token, decryptToken } = useAuthSession();
|
||||
@@ -107,7 +108,7 @@ export default function Report() {
|
||||
})
|
||||
setShowReport(true);
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT);
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
|
||||
Reference in New Issue
Block a user