upd: tampilan

Deskripsi:
- masang toast
- ganti tag Text

No Issues
This commit is contained in:
2025-07-29 11:41:03 +08:00
parent db98c3afc5
commit 42bf1589b4
86 changed files with 379 additions and 307 deletions

View File

@@ -5,7 +5,8 @@ import { useAuthSession } from "@/providers/AuthProvider"
import { MaterialCommunityIcons } from "@expo/vector-icons"
import { router } 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 AlertKonfirmasi from "../alertKonfirmasi"
import ButtonMenuHeader from "../buttonMenuHeader"
@@ -29,13 +30,13 @@ export default function HeaderRightDivisionInfo({ id, active }: Props) {
const response = await apiUpdateStatusDivision({ data: { user: hasil, isActive: Boolean(active) }, id: String(id) })
if (response.success) {
dispatch(setUpdateDivision(!update))
ToastAndroid.show('Berhasil mengubah status', ToastAndroid.SHORT)
Toast.show({ type: 'small', text1: 'Berhasil mengubah status', })
} 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)
}

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Dimensions, Text, View } from "react-native";
import { Dimensions, View } from "react-native";
import { BarChart } from "react-native-gifted-charts";
import Text from "../Text";
export default function ReportChartDocument({ data }: { data: { label: string; value: number; }[] }) {
const maxValue = Math.max(...data.map(i => i.value))

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Dimensions, Text, View } from "react-native";
import { Dimensions, View } from "react-native";
import { BarChart } from "react-native-gifted-charts";
import Text from "../Text";
export default function ReportChartEvent({ data }: { data: { label: string; value: number; }[] }) {
const width = Dimensions.get("window").width;

View File

@@ -1,6 +1,7 @@
import Styles from "@/constants/Styles";
import { Text, View } from "react-native";
import { View } from "react-native";
import { PieChart } from "react-native-gifted-charts";
import Text from "../Text";
export default function ReportChartProgress({ data }: { data: { color: string; text: string; value: number; }[] }) {
const pieData = [