Admin Job:
Add: - admin/job/[status]/ - dmin/job/[id]/ ### No issue
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
import { ViewWrapper } from "@/components";
|
import { ViewWrapper } from "@/components";
|
||||||
import TabsTwoHeaderCustom from "@/components/_ShareComponent/TabsTwoHeaderCustom";
|
import TabsTwoButtonCustom from "@/components/_ShareComponent/TabsTwoHeaderCustom";
|
||||||
import Voting_BoxPublishSection from "@/screens/Voting/BoxPublishSection";
|
import Voting_BoxPublishSection from "@/screens/Voting/BoxPublishSection";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ export default function VotingHistory() {
|
|||||||
<ViewWrapper
|
<ViewWrapper
|
||||||
hideFooter
|
hideFooter
|
||||||
headerComponent={
|
headerComponent={
|
||||||
<TabsTwoHeaderCustom
|
<TabsTwoButtonCustom
|
||||||
leftValue="all"
|
leftValue="all"
|
||||||
rightValue="main"
|
rightValue="main"
|
||||||
leftText="Semua Riwayat"
|
leftText="Semua Riwayat"
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ export default function AdminLayout() {
|
|||||||
<Stack.Screen name="job/publish" />
|
<Stack.Screen name="job/publish" />
|
||||||
<Stack.Screen name="job/review" />
|
<Stack.Screen name="job/review" />
|
||||||
<Stack.Screen name="job/reject" />
|
<Stack.Screen name="job/reject" />
|
||||||
|
<Stack.Screen name="job/[status]/status" />
|
||||||
|
<Stack.Screen name="job/[id]/[status]/index" />
|
||||||
|
|
||||||
{/* ================== Collaboration Start ================== */}
|
{/* ================== Collaboration Start ================== */}
|
||||||
<Stack.Screen name="collaboration/index" />
|
<Stack.Screen name="collaboration/index" />
|
||||||
|
|||||||
110
app/(application)/admin/job/[id]/[status]/index.tsx
Normal file
110
app/(application)/admin/job/[id]/[status]/index.tsx
Normal file
@@ -0,0 +1,110 @@
|
|||||||
|
import {
|
||||||
|
BadgeCustom,
|
||||||
|
BaseBox,
|
||||||
|
ButtonCustom,
|
||||||
|
DummyLandscapeImage,
|
||||||
|
Grid,
|
||||||
|
StackCustom,
|
||||||
|
TextCustom,
|
||||||
|
ViewWrapper,
|
||||||
|
} from "@/components";
|
||||||
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { useLocalSearchParams } from "expo-router";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export default function AdminJobDetailStatus() {
|
||||||
|
const { id, status } = useLocalSearchParams();
|
||||||
|
|
||||||
|
const colorBadge = () => {
|
||||||
|
if (status === "publish") {
|
||||||
|
return MainColor.green;
|
||||||
|
} else if (status === "review") {
|
||||||
|
return MainColor.orange;
|
||||||
|
} else if (status === "reject") {
|
||||||
|
return MainColor.red;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const listData = [
|
||||||
|
{
|
||||||
|
label: "Username",
|
||||||
|
value: "Bagas Banuna",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Judul",
|
||||||
|
value: `Judul Proyek: ${id}Lorem ipsum dolor sit amet consectetur adipisicing elit.`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Status",
|
||||||
|
value: (
|
||||||
|
<BadgeCustom color={colorBadge()}>
|
||||||
|
{_.startCase(status as string)}
|
||||||
|
</BadgeCustom>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Konten",
|
||||||
|
value: "Lorem ipsum dolor sit amet consectetur adipisicing elit.",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Deskripsi",
|
||||||
|
value: "Lorem ipsum dolor sit amet consectetur adipisicing elit.",
|
||||||
|
},
|
||||||
|
// {
|
||||||
|
// label: "Poster",
|
||||||
|
// value: (
|
||||||
|
// <ButtonCustom
|
||||||
|
// href={`/(application)/()/${id}`}
|
||||||
|
// >
|
||||||
|
// Lihat Poster
|
||||||
|
// </ButtonCustom>
|
||||||
|
// ),
|
||||||
|
// },
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ViewWrapper
|
||||||
|
headerComponent={<AdminBackButtonAntTitle title={`Detail Data`} />}
|
||||||
|
>
|
||||||
|
<BaseBox>
|
||||||
|
<StackCustom>
|
||||||
|
{listData.map((item, i) => (
|
||||||
|
<Grid key={i}>
|
||||||
|
<Grid.Col
|
||||||
|
span={4}
|
||||||
|
style={{ justifyContent: "center", paddingRight: 10 }}
|
||||||
|
>
|
||||||
|
<TextCustom bold>{item.label}</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={8} style={{ justifyContent: "center" }}>
|
||||||
|
<TextCustom>{item.value}</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
))}
|
||||||
|
|
||||||
|
<TextCustom bold>Poster</TextCustom>
|
||||||
|
|
||||||
|
<DummyLandscapeImage />
|
||||||
|
</StackCustom>
|
||||||
|
</BaseBox>
|
||||||
|
|
||||||
|
{status === "review" && (
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={6} style={{ paddingRight: 10 }}>
|
||||||
|
<ButtonCustom backgroundColor={MainColor.green} textColor="white">
|
||||||
|
Publish
|
||||||
|
</ButtonCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6} style={{ paddingLeft: 10 }}>
|
||||||
|
<ButtonCustom backgroundColor={MainColor.red} textColor="white">
|
||||||
|
Reject
|
||||||
|
</ButtonCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
)}
|
||||||
|
</ViewWrapper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
76
app/(application)/admin/job/[status]/status.tsx
Normal file
76
app/(application)/admin/job/[status]/status.tsx
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
import {
|
||||||
|
ActionIcon,
|
||||||
|
BaseBox,
|
||||||
|
SearchInput,
|
||||||
|
Spacing,
|
||||||
|
TextCustom,
|
||||||
|
ViewWrapper
|
||||||
|
} from "@/components";
|
||||||
|
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
||||||
|
import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
||||||
|
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
||||||
|
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
||||||
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
|
import { Octicons } from "@expo/vector-icons";
|
||||||
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { Divider } from "react-native-paper";
|
||||||
|
|
||||||
|
export default function AdminJobStatus() {
|
||||||
|
const { status } = useLocalSearchParams();
|
||||||
|
const rightComponent = (
|
||||||
|
<SearchInput
|
||||||
|
containerStyle={{ width: "100%", marginBottom: 0 }}
|
||||||
|
placeholder="Cari"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<ViewWrapper headerComponent={<AdminTitlePage title="Job Vacancy" />}>
|
||||||
|
<AdminComp_BoxTitle
|
||||||
|
title={`${_.startCase(status as string)}`}
|
||||||
|
rightComponent={rightComponent}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<BaseBox>
|
||||||
|
<AdminTitleTable
|
||||||
|
title1="Aksi"
|
||||||
|
title2="Username"
|
||||||
|
title3="Judul Pekerjaan"
|
||||||
|
/>
|
||||||
|
<Spacing />
|
||||||
|
<Divider />
|
||||||
|
|
||||||
|
{Array.from({ length: 10 }).map((_, index) => (
|
||||||
|
<AdminTableValue
|
||||||
|
key={index}
|
||||||
|
value1={
|
||||||
|
<ActionIcon
|
||||||
|
icon={
|
||||||
|
<Octicons
|
||||||
|
name="eye"
|
||||||
|
size={ICON_SIZE_BUTTON}
|
||||||
|
color="black"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
onPress={() => {
|
||||||
|
router.push(`/admin/job/${index}/${status}`);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
value2={<TextCustom truncate={1}>Username username</TextCustom>}
|
||||||
|
value3={
|
||||||
|
<TextCustom truncate={2}>
|
||||||
|
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
||||||
|
Blanditiis asperiores quidem deleniti architecto eaque et
|
||||||
|
nostrum, ad consequuntur eveniet quisquam quae voluptatum
|
||||||
|
ducimus! Dolorem nobis modi officia debitis, beatae mollitia.
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</BaseBox>
|
||||||
|
</ViewWrapper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,11 +1,45 @@
|
|||||||
import { TextCustom, ViewWrapper } from "@/components";
|
import { Spacing, StackCustom, ViewWrapper } from "@/components";
|
||||||
|
import AdminComp_BoxDashboard from "@/components/_ShareComponent/Admin/BoxDashboard";
|
||||||
|
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
||||||
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { Entypo, FontAwesome, FontAwesome6 } from "@expo/vector-icons";
|
||||||
|
|
||||||
export default function AdminJob() {
|
export default function AdminJob() {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
<TextCustom>Admin Job</TextCustom>
|
<AdminTitlePage title="Job Vacancy" />
|
||||||
|
<Spacing />
|
||||||
|
<StackCustom gap={"xs"}>
|
||||||
|
{listData.map((item, i) => (
|
||||||
|
<AdminComp_BoxDashboard key={i} item={item} />
|
||||||
|
))}
|
||||||
|
</StackCustom>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const listData = [
|
||||||
|
{
|
||||||
|
label: "Publish",
|
||||||
|
value: 4,
|
||||||
|
icon: <Entypo name="publish" size={25} color={MainColor.green} />,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Review",
|
||||||
|
value: 7,
|
||||||
|
icon: (
|
||||||
|
<FontAwesome6
|
||||||
|
name="person-circle-check"
|
||||||
|
size={25}
|
||||||
|
color={MainColor.orange}
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "Reject",
|
||||||
|
value: 5,
|
||||||
|
icon: <FontAwesome name="warning" size={25} color={MainColor.red} />,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ import { MainColor } from "@/constants/color-palet";
|
|||||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
|
|
||||||
export default function IconArchive({ color }: { color?: string }) {
|
export default function IconArchive({ color, size }: { color?: string; size?: number }) {
|
||||||
return (
|
return (
|
||||||
<Ionicons
|
<Ionicons
|
||||||
name="archive"
|
name="archive"
|
||||||
size={ICON_SIZE_SMALL}
|
size={size || ICON_SIZE_SMALL}
|
||||||
color={color || MainColor.white}
|
color={color || MainColor.white}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export default function SearchInput({
|
|||||||
onPress,
|
onPress,
|
||||||
iconLeft,
|
iconLeft,
|
||||||
iconRight,
|
iconRight,
|
||||||
containerStyle = { marginBottom: 0 },
|
containerStyle,
|
||||||
style,
|
style,
|
||||||
...props
|
...props
|
||||||
}: SearchInputProps) {
|
}: SearchInputProps) {
|
||||||
@@ -32,7 +32,7 @@ export default function SearchInput({
|
|||||||
}
|
}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
borderRadius={50}
|
borderRadius={50}
|
||||||
containerStyle={containerStyle}
|
containerStyle={[containerStyle, { marginBottom: 0 }]}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,15 +1,16 @@
|
|||||||
import { MainColor, AccentColor } from "@/constants/color-palet";
|
import { AccentColor, MainColor } from "@/constants/color-palet";
|
||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
import ButtonCustom from "../Button/ButtonCustom";
|
import ButtonCustom from "../Button/ButtonCustom";
|
||||||
import Spacing from "./Spacing";
|
import Spacing from "./Spacing";
|
||||||
|
|
||||||
export default function TabsTwoHeaderCustom ({
|
export default function TabsTwoButtonCustom ({
|
||||||
leftValue,
|
leftValue,
|
||||||
rightValue,
|
rightValue,
|
||||||
leftText,
|
leftText,
|
||||||
rightText,
|
rightText,
|
||||||
activeCategory,
|
activeCategory,
|
||||||
handlePress,
|
handlePress,
|
||||||
|
hideBackground,
|
||||||
}: {
|
}: {
|
||||||
leftValue: string;
|
leftValue: string;
|
||||||
rightValue: string;
|
rightValue: string;
|
||||||
@@ -17,6 +18,7 @@ export default function TabsTwoHeaderCustom ({
|
|||||||
rightText: string;
|
rightText: string;
|
||||||
activeCategory: string | null;
|
activeCategory: string | null;
|
||||||
handlePress: (item: string) => void;
|
handlePress: (item: string) => void;
|
||||||
|
hideBackground?: boolean;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -25,7 +27,7 @@ export default function TabsTwoHeaderCustom ({
|
|||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
padding: 5,
|
padding: 5,
|
||||||
backgroundColor: MainColor.soft_darkblue,
|
backgroundColor: hideBackground ? "transparent" : MainColor.soft_darkblue,
|
||||||
borderRadius: 50,
|
borderRadius: 50,
|
||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -57,9 +57,9 @@ const adminListMenu: NavbarItem[] = [
|
|||||||
icon: "desktop-outline",
|
icon: "desktop-outline",
|
||||||
links: [
|
links: [
|
||||||
{ label: "Dashboard", link: "/admin/job" },
|
{ label: "Dashboard", link: "/admin/job" },
|
||||||
{ label: "Publish", link: "/admin/job/publish" },
|
{ label: "Publish", link: "/admin/job/publish/status" },
|
||||||
{ label: "Review", link: "/admin/job/review" },
|
{ label: "Review", link: "/admin/job/review/status" },
|
||||||
{ label: "Reject", link: "/admin/job/reject" },
|
{ label: "Reject", link: "/admin/job/reject/status" },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,9 +30,9 @@ export default function LoginView() {
|
|||||||
const id = randomAlfabet + randomNumber + fixNumber;
|
const id = randomAlfabet + randomNumber + fixNumber;
|
||||||
console.log("login user id :", id);
|
console.log("login user id :", id);
|
||||||
|
|
||||||
// router.navigate("/verification");
|
router.navigate("/verification");
|
||||||
// router.navigate(`/(application)/(user)/profile/${id}`);
|
// 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)/profile/${id}/edit`);
|
||||||
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
// router.navigate(`/(application)/(user)/portofolio/${id}`)
|
||||||
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
// router.navigate(`/(application)/(image)/preview-image/${id}`);
|
||||||
@@ -84,9 +84,9 @@ export default function LoginView() {
|
|||||||
|
|
||||||
<Spacing />
|
<Spacing />
|
||||||
|
|
||||||
<ButtonCustom onPress={() => router.navigate("/admin/collaboration")}>
|
{/* <ButtonCustom onPress={() => router.navigate("/admin/job")}>
|
||||||
Admin ( Delete Soon )
|
Admin ( Delete Soon )
|
||||||
</ButtonCustom>
|
</ButtonCustom> */}
|
||||||
</View>
|
</View>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user