### File Baru (4) - `screens/Admin/Voting/ScreenVotingStatus.tsx` - `screens/Admin/Voting/ScreenVotingHistory.tsx` - `screens/Admin/Voting/ScreenEventTypeOfEvent.tsx` - `screens/Admin/Voting/BoxVotingStatus.tsx` ### File Diubah (3) - `app/(application)/admin/voting/[status]/status.tsx` → 5 baris - `app/(application)/admin/voting/history.tsx` → 5 baris - `app/(application)/admin/event/type-of-event.tsx` → 5 baris ### API Updates (2) - `service/api-admin/api-admin-voting.ts` → tambah param `page` - `service/api-admin/api-master-admin.ts` → tambah param `page` ## Fitur Baru - Pagination (infinite scroll) - Pull-to-Refresh - Skeleton Loading - Empty State - Search Functionality ### No Issue"
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
import { Divider, StackCustom, TextCustom } from "@/components";
|
|
import AdminBasicBox from "@/components/_ShareComponent/Admin/AdminBasicBox";
|
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
|
import { dateTimeView } from "@/utils/dateTimeView";
|
|
import { router } from "expo-router";
|
|
import { View } from "react-native";
|
|
|
|
interface BoxVotingStatusProps {
|
|
item: any;
|
|
status?: string;
|
|
path: any;
|
|
}
|
|
|
|
export default function Admin_BoxVotingStatus({
|
|
item,
|
|
status,
|
|
path,
|
|
}: BoxVotingStatusProps) {
|
|
return (
|
|
<>
|
|
<AdminBasicBox
|
|
style={{ marginHorizontal: 10, marginVertical: 5 }}
|
|
onPress={() => {
|
|
router.push(path);
|
|
}}
|
|
>
|
|
<StackCustom gap={0}>
|
|
<View style={{ paddingBlock: 8 }}>
|
|
<TextCustom size={"large"} bold truncate={2}>
|
|
{item?.title || "-"}
|
|
</TextCustom>
|
|
</View>
|
|
<Divider />
|
|
<GridSpan_4_8
|
|
label={<TextCustom>Mulai</TextCustom>}
|
|
value={
|
|
<TextCustom>
|
|
{dateTimeView({ date: item?.awalVote }) || "-"}
|
|
</TextCustom>
|
|
}
|
|
/>
|
|
<GridSpan_4_8
|
|
label={<TextCustom>Berakhir</TextCustom>}
|
|
value={
|
|
<TextCustom>
|
|
{dateTimeView({ date: item?.akhirVote }) || "-"}
|
|
</TextCustom>
|
|
}
|
|
/>
|
|
</StackCustom>
|
|
</AdminBasicBox>
|
|
</>
|
|
);
|
|
}
|