upd: division
Deskripsi: - mengeluarkan anggota divisi - mengubah status admin anggota divisi No Issues
This commit is contained in:
@@ -1,14 +1,34 @@
|
||||
import AlertKonfirmasi from "@/components/alertKonfirmasi"
|
||||
import BorderBottomItem from "@/components/borderBottomItem"
|
||||
import ButtonBackHeader from "@/components/buttonBackHeader"
|
||||
import HeaderRightDivisionInfo from "@/components/division/headerDivisionInfo"
|
||||
import DrawerBottom from "@/components/drawerBottom"
|
||||
import { ColorsStatus } from "@/constants/ColorsStatus"
|
||||
import Styles from "@/constants/Styles"
|
||||
import { Feather } from "@expo/vector-icons"
|
||||
import { Feather, MaterialCommunityIcons, MaterialIcons } from "@expo/vector-icons"
|
||||
import { router, Stack, useLocalSearchParams } from "expo-router"
|
||||
import { Image, SafeAreaView, ScrollView, Text, View } from "react-native"
|
||||
import { useState } from "react"
|
||||
import { Image, Pressable, SafeAreaView, ScrollView, Text, ToastAndroid, View } from "react-native"
|
||||
|
||||
export default function InformationDivision() {
|
||||
const { id } = useLocalSearchParams()
|
||||
const [isModal, setModal] = useState(false)
|
||||
|
||||
function handleMemberOut() {
|
||||
AlertKonfirmasi({
|
||||
title: 'Konfirmasi',
|
||||
desc: 'Apakah anda yakin ingin mengeluarkan anggota?',
|
||||
onPress: () => {
|
||||
ToastAndroid.show('Berhasil mengeluarkan anggota', ToastAndroid.SHORT)
|
||||
setModal(false)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function handleMemberAdmin() {
|
||||
ToastAndroid.show('Berhasil memberhentikan admin', ToastAndroid.SHORT)
|
||||
setModal(false)
|
||||
}
|
||||
|
||||
return (
|
||||
<SafeAreaView>
|
||||
@@ -43,6 +63,7 @@ export default function InformationDivision() {
|
||||
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
onPress={() => { setModal(true) }}
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
@@ -54,6 +75,7 @@ export default function InformationDivision() {
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
onPress={() => { setModal(true) }}
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
@@ -65,6 +87,7 @@ export default function InformationDivision() {
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
onPress={() => { setModal(true) }}
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
@@ -76,6 +99,7 @@ export default function InformationDivision() {
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
onPress={() => { setModal(true) }}
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
@@ -87,6 +111,7 @@ export default function InformationDivision() {
|
||||
/>
|
||||
<BorderBottomItem
|
||||
borderType="bottom"
|
||||
onPress={() => { setModal(true) }}
|
||||
icon={
|
||||
<Image
|
||||
source={require("../../../../assets/images/user.jpeg")}
|
||||
@@ -100,6 +125,36 @@ export default function InformationDivision() {
|
||||
</View>
|
||||
</View>
|
||||
</ScrollView>
|
||||
|
||||
<DrawerBottom animation="slide" isVisible={isModal} setVisible={setModal} title="Amalia">
|
||||
<View>
|
||||
<Pressable style={[Styles.wrapItemBorderBottom]} onPress={() => { handleMemberAdmin() }}>
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<View style={[Styles.iconContent, ColorsStatus.info]}>
|
||||
<MaterialIcons name="verified-user" size={25} color='#19345E' />
|
||||
</View>
|
||||
<View style={[Styles.rowSpaceBetween, { width: '88%' }]}>
|
||||
<View style={[Styles.ml10]}>
|
||||
<Text style={[Styles.textDefault]}>Memberhentikan sebagai admin</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</Pressable>
|
||||
|
||||
<Pressable style={[Styles.wrapItemBorderBottom]} onPress={() => { handleMemberOut() }}>
|
||||
<View style={[Styles.rowItemsCenter]}>
|
||||
<View style={[Styles.iconContent, ColorsStatus.info]}>
|
||||
<MaterialCommunityIcons name="close-circle" size={25} color='#19345E' />
|
||||
</View>
|
||||
<View style={[Styles.rowSpaceBetween, { width: '88%' }]}>
|
||||
<View style={[Styles.ml10]}>
|
||||
<Text style={[Styles.textDefault]}>Keluarkan dari divisi</Text>
|
||||
</View>
|
||||
</View>
|
||||
</View>
|
||||
</Pressable>
|
||||
</View>
|
||||
</DrawerBottom>
|
||||
</SafeAreaView>
|
||||
)
|
||||
}
|
||||
@@ -6,7 +6,7 @@ export const ColorsStatus = {
|
||||
backgroundColor: '#40c057'
|
||||
},
|
||||
info: {
|
||||
backgroundColor: 'blue'
|
||||
backgroundColor: '#eaf3fd'
|
||||
},
|
||||
warning: {
|
||||
backgroundColor: '#FCAA4B'
|
||||
|
||||
Reference in New Issue
Block a user