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

## NO Issue
This commit is contained in:
2025-08-05 17:40:46 +08:00
parent 48c34aa26c
commit c4c16f19c1
17 changed files with 857 additions and 73 deletions

View File

@@ -1,43 +0,0 @@
/* 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

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

View File

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

View File

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

View File

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

View File

@@ -0,0 +1,94 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import {
ClickableCustom,
DrawerCustom,
StackCustom,
TextCustom,
} from "@/components";
import DrawerAdmin from "@/components/Drawer/DrawerAdmin";
import NavbarMenu from "@/components/Drawer/NavbarMenu";
import SidebarMenu from "@/components/Drawer/SidebarMenu";
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 { router, Stack } from "expo-router";
import { useState } from "react";
import { View } from "react-native";
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}
onPress={() => setOpenDrawer(true)}
/>
),
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.Screen name="job/index" options={{ title: "Job" }} />
<Stack.Screen name="job/publish" options={{ title: "Job Publish" }} />
<Stack.Screen name="job/review" options={{ title: "Job Review" }} />
<Stack.Screen name="job/reject" options={{ title: "Job Reject" }} />
</Stack>
<DrawerAdmin isVisible={openDrawer} onClose={() => setOpenDrawer(false)}>
<StackCustom gap={"lg"}>
<Ionicons
name="close"
size={ICON_SIZE_SMALL}
color={MainColor.white}
onPress={() => setOpenDrawer(false)}
style={{ alignSelf: "flex-end" }}
/>
<NavbarMenu
items={[
{ label: "Dashboard", icon: "home", link: "/admin/dashboard" },
{ label: "Maps", icon: "map", link: "/admin/maps" },
{
label: "Information",
icon: "information-circle",
link: "/admin/information",
},
{
label: "Job",
icon: "calendar",
links: [
{ label: "Summary", link: "/admin/job" },
{ label: "Publish", link: "/admin/job/publish" },
{ label: "Review", link: "/admin/job/review" },
{ label: "Reject", link: "/admin/job/reject" },
],
},
]}
onClose={() => setOpenDrawer(false)}
/>
</StackCustom>
</DrawerAdmin>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function AdminDashboard() {
return (
<>
<ViewWrapper>
<TextCustom>Admin Dashboard</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function AdminInformation() {
return (
<>
<ViewWrapper>
<TextCustom>Information</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function AdminJob() {
return (
<>
<ViewWrapper>
<TextCustom>Admin Job</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function AdminJobPublish() {
return (
<>
<ViewWrapper>
<TextCustom>Admin Job Publish</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function AdminJobReject() {
return (
<>
<ViewWrapper>
<TextCustom>Admin Job Reject</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function AdminJobReview() {
return (
<>
<ViewWrapper>
<TextCustom>Admin Job Review</TextCustom>
</ViewWrapper>
</>
);
}

View File

@@ -0,0 +1,11 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function AdminMaps() {
return (
<>
<ViewWrapper>
<TextCustom>Maps</TextCustom>
</ViewWrapper>
</>
);
}