upd: tampilan
Deskripsi: - masang toast - ganti tag Text No Issues
This commit is contained in:
@@ -5,7 +5,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
|
||||
import { AntDesign, Ionicons, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { router } 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 AlertKonfirmasi from "../alertKonfirmasi"
|
||||
import ButtonMenuHeader from "../buttonMenuHeader"
|
||||
@@ -59,10 +60,10 @@ export default function HeaderRightTaskDetail({ id, division, status }: Props) {
|
||||
const response = await apiDeleteTask({ user: hasil }, String(id))
|
||||
if (response.success) {
|
||||
dispatch(setUpdateTask({ ...update, data: !update.data }))
|
||||
ToastAndroid.show('Berhasil menghapus tugas', ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: 'Berhasil menghapus tugas', })
|
||||
router.back()
|
||||
} else {
|
||||
ToastAndroid.show(response.message, ToastAndroid.SHORT)
|
||||
Toast.show({ type: 'small', text1: response.message, })
|
||||
}
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
@@ -102,7 +103,7 @@ export default function HeaderRightTaskDetail({ id, division, status }: Props) {
|
||||
disabled={status == 3}
|
||||
/>
|
||||
{
|
||||
( (entityUser.role != "user" && entityUser.role != "coadmin") || isAdminDivision)
|
||||
((entityUser.role != "user" && entityUser.role != "coadmin") || isAdminDivision)
|
||||
&&
|
||||
<MenuItemRow
|
||||
icon={<MaterialIcons name="groups" color="black" size={25} />}
|
||||
@@ -120,7 +121,7 @@ export default function HeaderRightTaskDetail({ id, division, status }: Props) {
|
||||
</View>
|
||||
|
||||
{
|
||||
( (entityUser.role != "user" && entityUser.role != "coadmin") || isAdminDivision )
|
||||
((entityUser.role != "user" && entityUser.role != "coadmin") || isAdminDivision)
|
||||
&&
|
||||
<View style={[Styles.rowItemsCenter, Styles.mt15]}>
|
||||
<MenuItemRow
|
||||
|
||||
Reference in New Issue
Block a user