Add:
- app/(application)/(admin)/

## No Issue
This commit is contained in:
2025-08-05 12:11:25 +08:00
parent e16b0c2fce
commit 48c34aa26c
8 changed files with 91 additions and 9 deletions

View File

@@ -0,0 +1,43 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import { AccentColor, MainColor } from "@/constants/color-palet";
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
import { GStyles } from "@/styles/global-styles";
import { FontAwesome6, Ionicons } from "@expo/vector-icons";
import { Stack } from "expo-router";
import { useState } from "react";
export default function AdminLayout() {
const [openDrawer, setOpenDrawer] = useState(false);
return (
<>
<Stack
screenOptions={{
headerStyle: GStyles.headerStyle,
headerTitleStyle: GStyles.headerTitleStyle,
headerTitleAlign: "center",
contentStyle: {
borderBottomColor: AccentColor.blue,
},
headerLeft: () => (
<Ionicons
name="menu"
size={ICON_SIZE_SMALL}
color={MainColor.white}
/>
),
headerRight: () => (
<FontAwesome6
name="circle-user"
size={ICON_SIZE_SMALL}
color={MainColor.white}
/>
),
}}
>
<Stack.Screen name="dashboard" options={{ title: "Dashboard" }} />
<Stack.Screen name="maps" options={{ title: "Maps" }} />
<Stack.Screen name="information" options={{ title: "Information" }} />
</Stack>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Text } from "react-native";
export default function AdminDashboard() {
return (
<>
<Text>Dashboard</Text>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Text } from "react-native";
export default function AdminInformation() {
return (
<>
<Text>Information</Text>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { Text } from "react-native";
export default function AdminMaps() {
return (
<>
<Text>Maps</Text>
</>
);
}

View File

@@ -7,6 +7,7 @@ export default function ApplicationLayout() {
<>
<Stack screenOptions={HeaderStyles}>
<Stack.Screen name="(user)" options={{ headerShown: false }} />
<Stack.Screen name="(admin)" options={{ headerShown: false }} />
{/* Take Picture */}
<Stack.Screen

View File

@@ -30,9 +30,9 @@ export default function LoginView() {
const id = randomAlfabet + randomNumber + fixNumber;
console.log("login user id :", id);
router.navigate("/verification");
// router.navigate("/verification");
// router.navigate(`/(application)/(user)/profile/${id}`);
// router.navigate("/(application)/(user)/home");
router.navigate("/(application)/(user)/home");
// router.navigate(`/(application)/profile/${id}/edit`);
// router.navigate(`/(application)/(user)/portofolio/${id}`)
// router.navigate(`/(application)/(image)/preview-image/${id}`);

View File

@@ -52,11 +52,17 @@ export const drawerItemsProfile = ({
label: "Tambah portofolio",
path: `/(application)/portofolio/${id}/create`,
},
// {
// icon: "settings",
// label: "Dashboard Admin",
// path: `/(application)/profile/dashboard-admin`,
// },
{
icon: (
<Ionicons
name="settings"
size={ICON_SIZE_MEDIUM}
color={AccentColor.white}
/>
),
label: "Dashboard Admin",
path: `/(application)/(admin)/dashboard`,
},
{
icon: (
<Ionicons

View File

@@ -26,9 +26,14 @@ export default function Profile_MenuDrawerSection({
<>
{/* Menu Items */}
<MenuDrawerDynamicGrid
data={drawerItems}
data={drawerItems.map((item) => ({
icon: item.icon,
label: item.label,
path: item.path as any,
color: item.color,
}))}
columns={4} // Ubah ke 2 jika ingin 2 kolom per baris
onPressItem={handlePress}
onPressItem={(item) => handlePress(item as any)}
/>
</>
);