Component

Icon:
- IconContribution
- IconHistory

Voting
Add:
- voting (tabs)
- (user)/_layout : penambahan layout voting

# No Issue
This commit is contained in:
2025-07-25 16:58:06 +08:00
parent 51d696128e
commit 20258d1fe5
12 changed files with 164 additions and 21 deletions

View File

@@ -150,6 +150,38 @@ export default function UserLayout() {
{/* ========== End Collaboration Section ========= */}
{/* ========== Voting Section ========= */}
<Stack.Screen
name="voting/create"
options={{
title: "Tambah Voting",
headerLeft: () => <BackButton />,
}}
/>
<Stack.Screen
name="voting/(tabs)"
options={{
title: "Voting",
headerLeft: () => <BackButton path="/home" />,
}}
/>
{/* <Stack.Screen
name="voting/[id]/index"
options={{
title: "Detail Voting",
headerLeft: () => <BackButton />,
}}
/>
<Stack.Screen
name="voting/[id]/edit"
options={{
title: "Edit Voting",
headerLeft: () => <BackButton />,
}}
/> */}
{/* ========== End Voting Section ========= */}
{/* ========== Job Section ========= */}
<Stack.Screen
name="job/create"

View File

@@ -1,50 +1,43 @@
import { IconHome, IconStatus } from "@/components/_Icon";
import {
IconContribution,
IconHistory,
IconHome,
IconStatus,
} from "@/components/_Icon";
import { TabsStyles } from "@/styles/tabs-styles";
import { FontAwesome5, Ionicons } from "@expo/vector-icons";
import { Tabs } from "expo-router";
export default function EventTabsLayout() {
return (
<Tabs
screenOptions={TabsStyles}
>
<Tabs screenOptions={TabsStyles}>
<Tabs.Screen
name="index"
options={{
title: "Beranda",
tabBarIcon: ({ color }) => (
<IconHome color={color}/>
),
tabBarIcon: ({ color }) => <IconHome color={color} />,
}}
/>
<Tabs.Screen
name="status"
options={{
title: "Status",
tabBarIcon: ({ color }) => (
<IconStatus color={color}/>
),
tabBarIcon: ({ color }) => <IconStatus color={color} />,
}}
/>
<Tabs.Screen
name="contribution"
options={{
title: "Kontribusi",
tabBarIcon: ({ color }) => (
<Ionicons size={20} name="extension-puzzle" color={color} />
),
tabBarIcon: ({ color }) => <IconContribution color={color} />,
}}
/>
<Tabs.Screen
name="history"
options={{
title: "Riwayat",
tabBarIcon: ({ color }) => (
<FontAwesome5 size={20} name="history" color={color} />
),
tabBarIcon: ({ color }) => <IconHistory color={color} />,
}}
/>
</Tabs>
);
}

View File

@@ -0,0 +1,43 @@
import {
IconContribution,
IconHistory,
IconHome,
IconStatus,
} from "@/components/_Icon";
import { TabsStyles } from "@/styles/tabs-styles";
import { Tabs } from "expo-router";
export default function VotingTabsLayout() {
return (
<Tabs screenOptions={TabsStyles}>
<Tabs.Screen
name="index"
options={{
title: "Beranda",
tabBarIcon: ({ color }) => <IconHome color={color} />,
}}
/>
<Tabs.Screen
name="status"
options={{
title: "Status",
tabBarIcon: ({ color }) => <IconStatus color={color} />,
}}
/>
<Tabs.Screen
name="contribution"
options={{
title: "Kontribusi",
tabBarIcon: ({ color }) => <IconContribution color={color} />,
}}
/>
<Tabs.Screen
name="history"
options={{
title: "Riwayat",
tabBarIcon: ({ color }) => <IconHistory color={color} />,
}}
/>
</Tabs>
);
}

View File

@@ -0,0 +1,9 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function VotingContribution() {
return (
<ViewWrapper>
<TextCustom>Voting Contribution</TextCustom>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,9 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function VotingHistory() {
return (
<ViewWrapper>
<TextCustom>Voting History</TextCustom>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,9 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function VotingBeranda() {
return (
<ViewWrapper>
<TextCustom>Voting Beranda</TextCustom>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,9 @@
import { TextCustom, ViewWrapper } from "@/components";
export default function VotingStatus() {
return (
<ViewWrapper>
<TextCustom>Voting Status</TextCustom>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,9 @@
import { TextInputCustom, ViewWrapper } from "@/components";
export default function CreateVoting() {
return (
<ViewWrapper>
<TextInputCustom>Create Voting</TextInputCustom>
</ViewWrapper>
);
}

View File

@@ -0,0 +1,14 @@
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
import { Ionicons } from "@expo/vector-icons";
export default function IconContribution({ color }: { color?: string }) {
return (
<>
<Ionicons
size={ICON_SIZE_SMALL}
name="extension-puzzle"
color={color || "white"}
/>
</>
);
}

View File

@@ -0,0 +1,9 @@
import { FontAwesome5 } from "@expo/vector-icons";
export default function IconHistory({ color }: { color?: string }) {
return (
<>
<FontAwesome5 size={20} name="history" color={color} />
</>
);
}

View File

@@ -1,5 +1,7 @@
import IconContribution from "./IconContribution";
import IconEdit from "./IconEdit";
import IconHistory from "./IconHistory";
import IconHome from "./IconHome";
import IconStatus from "./IconStatus";
export { IconEdit, IconHome, IconStatus };
export { IconContribution, IconEdit, IconHistory, IconHome, IconStatus };

View File

@@ -16,12 +16,17 @@ export default function Home_FeatureSection() {
</TouchableOpacity>
<TouchableOpacity
style={stylesHome.gridItem}
onPress={() => router.push("/(application)/(user)/collaboration/(tabs)")}
onPress={() =>
router.push("/(application)/(user)/collaboration/(tabs)")
}
>
<Ionicons name="share" size={48} color="white" />
<Text style={stylesHome.gridLabel}>Collaboration</Text>
</TouchableOpacity>
<TouchableOpacity style={stylesHome.gridItem}>
<TouchableOpacity
style={stylesHome.gridItem}
onPress={() => router.push("/(application)/(user)/voting/(tabs)")}
>
<Ionicons name="cube" size={48} color="white" />
<Text style={stylesHome.gridLabel}>Voting</Text>
</TouchableOpacity>