Compare commits
2 Commits
api-admin/
...
api-admin/
| Author | SHA1 | Date | |
|---|---|---|---|
| 0770237fe5 | |||
| 6f4dd79568 |
@@ -19,7 +19,6 @@ import Toast from "react-native-toast-message";
|
|||||||
|
|
||||||
export default function CollaborationEdit() {
|
export default function CollaborationEdit() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
console.log("id :", id);
|
|
||||||
const [data, setData] = useState<any>();
|
const [data, setData] = useState<any>();
|
||||||
const [listMaster, setListMaster] = useState<any[]>([]);
|
const [listMaster, setListMaster] = useState<any[]>([]);
|
||||||
const [loadingData, setLoadingData] = useState(false);
|
const [loadingData, setLoadingData] = useState(false);
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import {
|
|||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
|
import GridTwoView from "@/components/_ShareComponent/GridTwoView";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { apiAdminCollaborationGetById } from "@/service/api-admin/api-admin-collaboration";
|
import { apiAdminCollaborationGetById } from "@/service/api-admin/api-admin-collaboration";
|
||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
@@ -28,7 +29,7 @@ export default function AdminCollaborationPublish() {
|
|||||||
try {
|
try {
|
||||||
const response = await apiAdminCollaborationGetById({
|
const response = await apiAdminCollaborationGetById({
|
||||||
id: id as string,
|
id: id as string,
|
||||||
category: status as "publish" | "reject" | "group",
|
category: status as any,
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
@@ -39,7 +40,7 @@ export default function AdminCollaborationPublish() {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const bottomFooter = (
|
const bottomFooter = status === "publish" && (
|
||||||
<BoxButtonOnFooter>
|
<BoxButtonOnFooter>
|
||||||
<ButtonCustom
|
<ButtonCustom
|
||||||
backgroundColor={MainColor.red}
|
backgroundColor={MainColor.red}
|
||||||
@@ -76,6 +77,17 @@ export default function AdminCollaborationPublish() {
|
|||||||
))}
|
))}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
|
{data?.report && (
|
||||||
|
<BaseBox>
|
||||||
|
<GridTwoView
|
||||||
|
spanLeft={4}
|
||||||
|
spanRight={8}
|
||||||
|
leftIcon={<TextCustom bold>Catatan report</TextCustom>}
|
||||||
|
rightIcon={<TextCustom>{data?.report}</TextCustom>}
|
||||||
|
/>
|
||||||
|
</BaseBox>
|
||||||
|
)}
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable react-hooks/exhaustive-deps */
|
||||||
import {
|
import {
|
||||||
BaseBox,
|
BaseBox,
|
||||||
Grid,
|
Grid,
|
||||||
@@ -6,23 +7,45 @@ import {
|
|||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import { useLocalSearchParams } from "expo-router";
|
import { apiAdminCollaborationGetById } from "@/service/api-admin/api-admin-collaboration";
|
||||||
|
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function AdminCollaborationGroup() {
|
export default function AdminCollaborationGroup() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
console.log("params:", id);
|
const [data, setData] = useState<any | null>(null);
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
onLoadData();
|
||||||
|
}, [id])
|
||||||
|
);
|
||||||
|
|
||||||
|
const onLoadData = async () => {
|
||||||
|
try {
|
||||||
|
const response = await apiAdminCollaborationGetById({
|
||||||
|
id: id as string,
|
||||||
|
category: "group",
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
setData(response.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper
|
<ViewWrapper
|
||||||
headerComponent={
|
headerComponent={<AdminBackButtonAntTitle title={`Detail Group`} />}
|
||||||
<AdminBackButtonAntTitle title={`Detail Group ${id}`} />
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom gap={"xs"}>
|
||||||
<BaseBox>
|
<BaseBox>
|
||||||
<StackCustom>
|
<StackCustom>
|
||||||
{listData.map((item, i) => (
|
{listData(data).map((item: any, index: number) => (
|
||||||
<Grid key={i}>
|
<Grid key={index}>
|
||||||
<Grid.Col
|
<Grid.Col
|
||||||
span={4}
|
span={4}
|
||||||
style={{ justifyContent: "center", paddingRight: 10 }}
|
style={{ justifyContent: "center", paddingRight: 10 }}
|
||||||
@@ -40,21 +63,36 @@ export default function AdminCollaborationGroup() {
|
|||||||
<StackCustom>
|
<StackCustom>
|
||||||
<TextCustom align="center">Anggota</TextCustom>
|
<TextCustom align="center">Anggota</TextCustom>
|
||||||
|
|
||||||
{Array.from({ length: 10 }).map((_, i) => (
|
{data?.ProjectCollaboration_AnggotaRoomChat?.map(
|
||||||
<Grid key={i}>
|
(item: any, index: number) => (
|
||||||
<Grid.Col
|
<StackCustom key={index} gap={0}>
|
||||||
span={4}
|
<Grid>
|
||||||
style={{ justifyContent: "center", paddingRight: 10 }}
|
<Grid.Col
|
||||||
>
|
span={4}
|
||||||
<TextCustom bold>Username</TextCustom>
|
style={{ justifyContent: "center", paddingRight: 10 }}
|
||||||
</Grid.Col>
|
>
|
||||||
<Grid.Col span={8} style={{ justifyContent: "center" }}>
|
<TextCustom bold>Nama</TextCustom>
|
||||||
<TextCustom>
|
</Grid.Col>
|
||||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
<Grid.Col span={8} style={{ justifyContent: "center" }}>
|
||||||
</TextCustom>
|
<TextCustom>
|
||||||
</Grid.Col>
|
{item?.User?.Profile?.name || "-"}
|
||||||
</Grid>
|
</TextCustom>
|
||||||
))}
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col
|
||||||
|
span={4}
|
||||||
|
style={{ justifyContent: "center", paddingRight: 10 }}
|
||||||
|
>
|
||||||
|
<TextCustom bold>Username</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={8} style={{ justifyContent: "center" }}>
|
||||||
|
<TextCustom>{item?.User?.username || "-"}</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</StackCustom>
|
||||||
|
)
|
||||||
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
@@ -63,35 +101,35 @@ export default function AdminCollaborationGroup() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const listData = [
|
const listData = (data: any) => [
|
||||||
{
|
{
|
||||||
label: "Admin Group",
|
label: "Admin Group",
|
||||||
value: "Bagas Banuna",
|
value: data?.ProjectCollaboration?.Author?.username || "-",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Nama Group",
|
label: "Nama Group",
|
||||||
value: "Lorem ipsum dolor sit amet consectetur adipisicing elit.",
|
value: data?.name || "-",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Industri",
|
label: "Industri",
|
||||||
value: "Kesehatan",
|
value:
|
||||||
|
data?.ProjectCollaboration?.ProjectCollaborationMaster_Industri?.name ||
|
||||||
|
"-",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Jumlah Partisipan ",
|
label: "Jumlah Partisipan ",
|
||||||
value: "0",
|
value: data?.ProjectCollaboration_AnggotaRoomChat?.length || "-",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Lokasi",
|
label: "Lokasi",
|
||||||
value: "Kuta Selatan, Bali",
|
value: data?.ProjectCollaboration?.lokasi || "-",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Tujuan Proyek",
|
label: "Tujuan Proyek",
|
||||||
value:
|
value: data?.ProjectCollaboration?.purpose || "-",
|
||||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Keuntungan",
|
label: "Keuntungan",
|
||||||
value:
|
value: data?.ProjectCollaboration?.benefit || "-",
|
||||||
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -6,12 +6,41 @@ import {
|
|||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
import AdminButtonReject from "@/components/_ShareComponent/Admin/ButtonReject";
|
||||||
|
import { apiAdminCollaborationReject } from "@/service/api-admin/api-admin-collaboration";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useLocalSearchParams } from "expo-router";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
export default function AdminCollaborationRejectInput() {
|
export default function AdminCollaborationRejectInput() {
|
||||||
const { id } = useLocalSearchParams();
|
const { id } = useLocalSearchParams();
|
||||||
const [value, setValue] = useState(id as string);
|
const [value, setValue] = useState("");
|
||||||
|
|
||||||
|
const handlerReject = async () => {
|
||||||
|
console.log("value:", value);
|
||||||
|
// router.replace(`/admin/job/reject/status`);
|
||||||
|
try {
|
||||||
|
const response = await apiAdminCollaborationReject({
|
||||||
|
id: id as string,
|
||||||
|
data: value,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!response.success) {
|
||||||
|
Toast.show({
|
||||||
|
type: "error",
|
||||||
|
text1: "Report gagal",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
Toast.show({
|
||||||
|
type: "success",
|
||||||
|
text1: "Report berhasil",
|
||||||
|
});
|
||||||
|
|
||||||
|
router.back();
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const buttonSubmit = (
|
const buttonSubmit = (
|
||||||
<BoxButtonOnFooter>
|
<BoxButtonOnFooter>
|
||||||
@@ -23,12 +52,8 @@ export default function AdminCollaborationRejectInput() {
|
|||||||
message: "Apakah anda yakin ingin menolak data ini?",
|
message: "Apakah anda yakin ingin menolak data ini?",
|
||||||
textLeft: "Batal",
|
textLeft: "Batal",
|
||||||
textRight: "Ya",
|
textRight: "Ya",
|
||||||
onPressLeft: () => {
|
|
||||||
router.back();
|
|
||||||
},
|
|
||||||
onPressRight: () => {
|
onPressRight: () => {
|
||||||
console.log("value:", value);
|
handlerReject();
|
||||||
// router.replace(`/admin/job/reject/status`);
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -40,7 +65,9 @@ export default function AdminCollaborationRejectInput() {
|
|||||||
<>
|
<>
|
||||||
<ViewWrapper
|
<ViewWrapper
|
||||||
footerComponent={buttonSubmit}
|
footerComponent={buttonSubmit}
|
||||||
headerComponent={<AdminBackButtonAntTitle title="Penolakan Collaboration" />}
|
headerComponent={
|
||||||
|
<AdminBackButtonAntTitle title="Penolakan Collaboration" />
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<TextAreaCustom
|
<TextAreaCustom
|
||||||
value={value}
|
value={value}
|
||||||
|
|||||||
@@ -1,67 +1,101 @@
|
|||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
BaseBox,
|
LoaderCustom,
|
||||||
Spacing,
|
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
||||||
import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
||||||
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
||||||
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
|
import { apiAdminCollaboration } from "@/service/api-admin/api-admin-collaboration";
|
||||||
import { Octicons } from "@expo/vector-icons";
|
import { Octicons } from "@expo/vector-icons";
|
||||||
import { router } from "expo-router";
|
import { router, useFocusEffect } from "expo-router";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { useCallback, useState } from "react";
|
||||||
|
import { View } from "react-native";
|
||||||
import { Divider } from "react-native-paper";
|
import { Divider } from "react-native-paper";
|
||||||
|
|
||||||
export default function AdminCollaborationGroup() {
|
export default function AdminCollaborationGroup() {
|
||||||
|
const [list, setList] = useState<any[] | null>(null);
|
||||||
|
const [loadList, setLoadList] = useState(false);
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
handlerLoadList();
|
||||||
|
}, [])
|
||||||
|
);
|
||||||
|
|
||||||
|
const handlerLoadList = async () => {
|
||||||
|
try {
|
||||||
|
setLoadList(true);
|
||||||
|
const response = await apiAdminCollaboration({
|
||||||
|
category: "group",
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
setList(response.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
} finally {
|
||||||
|
setLoadList(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper headerComponent={<AdminTitlePage title="Collaboration" />}>
|
<ViewWrapper headerComponent={<AdminTitlePage title="Collaboration" />}>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom>
|
||||||
<AdminComp_BoxTitle title="Group" />
|
<AdminComp_BoxTitle title="Group" />
|
||||||
<BaseBox>
|
<>
|
||||||
<AdminTitleTable
|
<AdminTitleTable
|
||||||
title1="Aksi"
|
title1="Aksi"
|
||||||
title2="Admin Group"
|
title2="Jumlah peserta"
|
||||||
title3="Nama Group"
|
title3="Nama group"
|
||||||
/>
|
/>
|
||||||
<Spacing height={10} />
|
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
{Array.from({ length: 10 }).map((_, index) => (
|
{loadList ? (
|
||||||
<AdminTableValue
|
<LoaderCustom />
|
||||||
key={index}
|
) : _.isEmpty(list) ? (
|
||||||
value1={
|
<TextCustom align="center" color="gray">
|
||||||
<ActionIcon
|
Belum ada data
|
||||||
icon={
|
</TextCustom>
|
||||||
<Octicons
|
) : (
|
||||||
name="eye"
|
list?.map((item: any, index: number) => (
|
||||||
size={ICON_SIZE_BUTTON}
|
<View key={index}>
|
||||||
color="black"
|
<AdminTableValue
|
||||||
|
value1={
|
||||||
|
<ActionIcon
|
||||||
|
icon={
|
||||||
|
<Octicons
|
||||||
|
name="eye"
|
||||||
|
size={ICON_SIZE_BUTTON}
|
||||||
|
color="black"
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
onPress={() => {
|
||||||
|
router.push(`/admin/collaboration/${item.id}/group`);
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
onPress={() => {
|
value2={
|
||||||
router.push(`/admin/collaboration/${index}/group`);
|
<TextCustom truncate={1}>
|
||||||
}}
|
{item?.ProjectCollaboration_AnggotaRoomChat?.length ||
|
||||||
|
"-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
value3={
|
||||||
|
<TextCustom truncate={2}>{item?.name || "-"}</TextCustom>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
}
|
</View>
|
||||||
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>
|
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import { useCallback, useState } from "react";
|
|||||||
|
|
||||||
export default function AdminCollaboration() {
|
export default function AdminCollaboration() {
|
||||||
const [list, setList] = useState<any | null>(null);
|
const [list, setList] = useState<any | null>(null);
|
||||||
const [loadList, setLoadList] = useState(false);
|
|
||||||
|
|
||||||
useFocusEffect(
|
useFocusEffect(
|
||||||
useCallback(() => {
|
useCallback(() => {
|
||||||
@@ -19,7 +18,6 @@ export default function AdminCollaboration() {
|
|||||||
|
|
||||||
const handlerLoadList = async () => {
|
const handlerLoadList = async () => {
|
||||||
try {
|
try {
|
||||||
setLoadList(true);
|
|
||||||
const response = await apiAdminCollaboration({
|
const response = await apiAdminCollaboration({
|
||||||
category: "dashboard",
|
category: "dashboard",
|
||||||
});
|
});
|
||||||
@@ -31,8 +29,6 @@ export default function AdminCollaboration() {
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("[ERROR]", error);
|
console.log("[ERROR]", error);
|
||||||
} finally {
|
|
||||||
setLoadList(false);
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import { Octicons } from "@expo/vector-icons";
|
|||||||
import { router, useFocusEffect } from "expo-router";
|
import { router, useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
|
import { View } from "react-native";
|
||||||
import { Divider } from "react-native-paper";
|
import { Divider } from "react-native-paper";
|
||||||
|
|
||||||
export default function AdminCollaborationPublish() {
|
export default function AdminCollaborationPublish() {
|
||||||
@@ -43,10 +44,11 @@ export default function AdminCollaborationPublish() {
|
|||||||
setLoadList(false);
|
setLoadList(false);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper headerComponent={<AdminTitlePage title="Collaboration" />}>
|
<ViewWrapper headerComponent={<AdminTitlePage title="Collaboration" />}>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom>
|
||||||
<AdminComp_BoxTitle title="Publish" />
|
<AdminComp_BoxTitle title="Publish" />
|
||||||
|
|
||||||
<AdminTitleTable
|
<AdminTitleTable
|
||||||
@@ -60,36 +62,39 @@ export default function AdminCollaborationPublish() {
|
|||||||
{loadList ? (
|
{loadList ? (
|
||||||
<LoaderCustom />
|
<LoaderCustom />
|
||||||
) : _.isEmpty(list) ? (
|
) : _.isEmpty(list) ? (
|
||||||
<TextCustom>Belum ada data</TextCustom>
|
<TextCustom align="center" color="gray">
|
||||||
|
Belum ada data
|
||||||
|
</TextCustom>
|
||||||
) : (
|
) : (
|
||||||
list?.map((item: any, index: number) => (
|
list?.map((item: any, index: number) => (
|
||||||
<AdminTableValue
|
<View key={index}>
|
||||||
key={index}
|
<AdminTableValue
|
||||||
value1={
|
value1={
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
icon={
|
icon={
|
||||||
<Octicons
|
<Octicons
|
||||||
name="eye"
|
name="eye"
|
||||||
size={ICON_SIZE_BUTTON}
|
size={ICON_SIZE_BUTTON}
|
||||||
color="black"
|
color="black"
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
router.push(`/admin/collaboration/${item?.id}/publish`);
|
router.push(`/admin/collaboration/${item?.id}/publish`);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
value2={
|
value2={
|
||||||
<TextCustom align="center" truncate={1}>
|
<TextCustom align="center" truncate={1}>
|
||||||
{item?.Author?.username || "-"}{" "}
|
{item?.Author?.username || "-"}{" "}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
value3={
|
value3={
|
||||||
<TextCustom align="center" truncate={2}>
|
<TextCustom align="center" truncate={2}>
|
||||||
{item?.title || "-"}
|
{item?.title || "-"}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
</View>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -1,67 +1,99 @@
|
|||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
BaseBox,
|
LoaderCustom,
|
||||||
Spacing,
|
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
||||||
import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
||||||
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
||||||
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
|
import { apiAdminCollaboration } from "@/service/api-admin/api-admin-collaboration";
|
||||||
import { Octicons } from "@expo/vector-icons";
|
import { Octicons } from "@expo/vector-icons";
|
||||||
import { router } from "expo-router";
|
import { router, useFocusEffect } from "expo-router";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { useCallback, useState } from "react";
|
||||||
|
import { View } from "react-native";
|
||||||
import { Divider } from "react-native-paper";
|
import { Divider } from "react-native-paper";
|
||||||
|
|
||||||
export default function AdminCollaborationReject() {
|
export default function AdminCollaborationReject() {
|
||||||
|
const [list, setList] = useState<any[] | null>(null);
|
||||||
|
const [loadList, setLoadList] = useState(false);
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
handlerLoadList();
|
||||||
|
}, [])
|
||||||
|
);
|
||||||
|
|
||||||
|
const handlerLoadList = async () => {
|
||||||
|
try {
|
||||||
|
setLoadList(true);
|
||||||
|
const response = await apiAdminCollaboration({
|
||||||
|
category: "reject",
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
setList(response.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
} finally {
|
||||||
|
setLoadList(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper headerComponent={<AdminTitlePage title="Collaboration" />}>
|
<ViewWrapper headerComponent={<AdminTitlePage title="Collaboration" />}>
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom>
|
||||||
<AdminComp_BoxTitle title="Reject" />
|
<AdminComp_BoxTitle title="Reject" />
|
||||||
<BaseBox>
|
<AdminTitleTable
|
||||||
<AdminTitleTable
|
title1="Aksi"
|
||||||
title1="Aksi"
|
title2="Username"
|
||||||
title2="Username"
|
title3="Judul Proyek"
|
||||||
title3="Judul Proyek"
|
/>
|
||||||
/>
|
<Divider />
|
||||||
<Spacing height={10} />
|
|
||||||
<Divider />
|
|
||||||
|
|
||||||
{Array.from({ length: 10 }).map((_, index) => (
|
{loadList ? (
|
||||||
<AdminTableValue
|
<LoaderCustom />
|
||||||
key={index}
|
) : _.isEmpty(list) ? (
|
||||||
value1={
|
<TextCustom>Belum ada data</TextCustom>
|
||||||
<ActionIcon
|
) : (
|
||||||
icon={
|
list?.map((item: any) => (
|
||||||
<Octicons
|
<View key={item.id}>
|
||||||
name="eye"
|
<AdminTableValue
|
||||||
size={ICON_SIZE_BUTTON}
|
key={item?.id}
|
||||||
color="black"
|
value1={
|
||||||
/>
|
<ActionIcon
|
||||||
}
|
icon={
|
||||||
onPress={() => {
|
<Octicons
|
||||||
router.push(`/admin/collaboration/${index}/reject`);
|
name="eye"
|
||||||
}}
|
size={ICON_SIZE_BUTTON}
|
||||||
/>
|
color="black"
|
||||||
}
|
/>
|
||||||
value2={
|
}
|
||||||
<TextCustom truncate={1}>Username username </TextCustom>
|
onPress={() => {
|
||||||
}
|
router.push(`/admin/collaboration/${item?.id}/reject`);
|
||||||
value3={
|
}}
|
||||||
<TextCustom truncate={2}>
|
/>
|
||||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
}
|
||||||
Blanditiis asperiores quidem deleniti architecto eaque et
|
value2={
|
||||||
nostrum, ad consequuntur eveniet quisquam quae voluptatum
|
<TextCustom align="center" truncate={1}>
|
||||||
ducimus! Dolorem nobis modi officia debitis, beatae
|
{item?.Author?.username || "-"}
|
||||||
mollitia.
|
</TextCustom>
|
||||||
</TextCustom>
|
}
|
||||||
}
|
value3={
|
||||||
/>
|
<TextCustom align="center" truncate={2}>
|
||||||
))}
|
{item?.title || "-"}
|
||||||
</BaseBox>
|
</TextCustom>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
))
|
||||||
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
|
/* eslint-disable react-hooks/exhaustive-deps */
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
BaseBox,
|
LoaderCustom,
|
||||||
SearchInput,
|
SearchInput,
|
||||||
Spacing,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper
|
ViewWrapper
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
@@ -11,17 +12,52 @@ import AdminTitleTable from "@/components/_ShareComponent/Admin/TableTitle";
|
|||||||
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
import AdminTableValue from "@/components/_ShareComponent/Admin/TableValue";
|
||||||
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
|
import { apiAdminJob } from "@/service/api-admin/api-admin-job";
|
||||||
import { Octicons } from "@expo/vector-icons";
|
import { Octicons } from "@expo/vector-icons";
|
||||||
import { router, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
|
import { useCallback, useState } from "react";
|
||||||
import { Divider } from "react-native-paper";
|
import { Divider } from "react-native-paper";
|
||||||
|
|
||||||
export default function AdminJobStatus() {
|
export default function AdminJobStatus() {
|
||||||
const { status } = useLocalSearchParams();
|
const { status } = useLocalSearchParams();
|
||||||
|
console.log("[STATUS]", status);
|
||||||
|
|
||||||
|
const [list, setList] = useState<any | null>(null);
|
||||||
|
const [loadList, setLoadList] = useState(false);
|
||||||
|
const [search, setSearch] = useState("");
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
handlerLoadList();
|
||||||
|
}, [status, search])
|
||||||
|
);
|
||||||
|
|
||||||
|
const handlerLoadList = async () => {
|
||||||
|
try {
|
||||||
|
setLoadList(true);
|
||||||
|
const response = await apiAdminJob({
|
||||||
|
category: status as "publish" | "review" | "reject",
|
||||||
|
search,
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("[RESPONSE >>]", JSON.stringify(response, null, 2));
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
setList(response.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
} finally {
|
||||||
|
setLoadList(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const rightComponent = (
|
const rightComponent = (
|
||||||
<SearchInput
|
<SearchInput
|
||||||
containerStyle={{ width: "100%", marginBottom: 0 }}
|
|
||||||
placeholder="Cari"
|
placeholder="Cari"
|
||||||
|
onChangeText={setSearch}
|
||||||
|
value={search}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
return (
|
return (
|
||||||
@@ -32,44 +68,53 @@ export default function AdminJobStatus() {
|
|||||||
rightComponent={rightComponent}
|
rightComponent={rightComponent}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<BaseBox>
|
<StackCustom>
|
||||||
<AdminTitleTable
|
<AdminTitleTable
|
||||||
title1="Aksi"
|
title1="Aksi"
|
||||||
title2="Username"
|
title2="Username"
|
||||||
title3="Judul Pekerjaan"
|
title3="Judul Pekerjaan"
|
||||||
/>
|
/>
|
||||||
<Spacing />
|
{/* <Spacing /> */}
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
{Array.from({ length: 10 }).map((_, index) => (
|
{loadList ? (
|
||||||
<AdminTableValue
|
<LoaderCustom />
|
||||||
key={index}
|
) : _.isEmpty(list) ? (
|
||||||
value1={
|
<TextCustom align="center" color="gray">
|
||||||
<ActionIcon
|
Tidak ada data
|
||||||
icon={
|
</TextCustom>
|
||||||
<Octicons
|
) : (
|
||||||
name="eye"
|
list?.map((item: any, index: number) => (
|
||||||
size={ICON_SIZE_BUTTON}
|
<AdminTableValue
|
||||||
color="black"
|
key={index}
|
||||||
/>
|
value1={
|
||||||
}
|
<ActionIcon
|
||||||
onPress={() => {
|
icon={
|
||||||
router.push(`/admin/job/${index}/${status}`);
|
<Octicons
|
||||||
}}
|
name="eye"
|
||||||
/>
|
size={ICON_SIZE_BUTTON}
|
||||||
}
|
color="black"
|
||||||
value2={<TextCustom truncate={1}>Username username</TextCustom>}
|
/>
|
||||||
value3={
|
}
|
||||||
<TextCustom truncate={2}>
|
onPress={() => {
|
||||||
Lorem ipsum dolor sit amet consectetur adipisicing elit.
|
router.push(`/admin/job/${item.id}/${status}`);
|
||||||
Blanditiis asperiores quidem deleniti architecto eaque et
|
}}
|
||||||
nostrum, ad consequuntur eveniet quisquam quae voluptatum
|
/>
|
||||||
ducimus! Dolorem nobis modi officia debitis, beatae mollitia.
|
}
|
||||||
</TextCustom>
|
value2={
|
||||||
}
|
<TextCustom align="center" truncate={1}>
|
||||||
/>
|
{item?.Author?.username || "-"}
|
||||||
))}
|
</TextCustom>
|
||||||
</BaseBox>
|
}
|
||||||
|
value3={
|
||||||
|
<TextCustom truncate={2} align="center">
|
||||||
|
{item?.title || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
))
|
||||||
|
)}
|
||||||
|
</StackCustom>
|
||||||
</ViewWrapper>
|
</ViewWrapper>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
||||||
import { Spacing, StackCustom, ViewWrapper } from "@/components";
|
import { Spacing, StackCustom, ViewWrapper } from "@/components";
|
||||||
import {
|
import {
|
||||||
IconPublish,
|
IconPublish,
|
||||||
@@ -7,15 +8,45 @@ import {
|
|||||||
import AdminComp_BoxDashboard from "@/components/_ShareComponent/Admin/BoxDashboard";
|
import AdminComp_BoxDashboard from "@/components/_ShareComponent/Admin/BoxDashboard";
|
||||||
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
import AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
|
import { apiAdminJob } from "@/service/api-admin/api-admin-job";
|
||||||
|
import { useFocusEffect } from "expo-router";
|
||||||
|
import { useCallback, useState } from "react";
|
||||||
|
|
||||||
export default function AdminJob() {
|
export default function AdminJob() {
|
||||||
|
const [data, setData] = useState<any | null>(null);
|
||||||
|
const [loadList, setLoadList] = useState(false);
|
||||||
|
|
||||||
|
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
handlerLoadList();
|
||||||
|
}, [])
|
||||||
|
);
|
||||||
|
|
||||||
|
const handlerLoadList = async () => {
|
||||||
|
try {
|
||||||
|
setLoadList(true);
|
||||||
|
const response = await apiAdminJob({
|
||||||
|
category: "dashboard",
|
||||||
|
});
|
||||||
|
|
||||||
|
if (response.success) {
|
||||||
|
setData(response.data);
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.log("[ERROR]", error);
|
||||||
|
} finally {
|
||||||
|
setLoadList(false);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ViewWrapper>
|
<ViewWrapper>
|
||||||
<AdminTitlePage title="Job Vacancy" />
|
<AdminTitlePage title="Job Vacancy" />
|
||||||
<Spacing />
|
<Spacing />
|
||||||
<StackCustom gap={"xs"}>
|
<StackCustom gap={"xs"}>
|
||||||
{listData.map((item, i) => (
|
{listData(data).map((item: any, i: number) => (
|
||||||
<AdminComp_BoxDashboard key={i} item={item} />
|
<AdminComp_BoxDashboard key={i} item={item} />
|
||||||
))}
|
))}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
@@ -24,20 +55,20 @@ export default function AdminJob() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const listData = [
|
const listData = (data: any) => [
|
||||||
{
|
{
|
||||||
label: "Publish",
|
label: "Publish",
|
||||||
value: 4,
|
value: (data && data?.publish) || 0,
|
||||||
icon: <IconPublish size={25} color={MainColor.green} />,
|
icon: <IconPublish size={25} color={MainColor.green} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Review",
|
label: "Review",
|
||||||
value: 7,
|
value: (data && data?.review) || 0,
|
||||||
icon: <IconReview size={25} color={MainColor.orange} />,
|
icon: <IconReview size={25} color={MainColor.orange} />,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "Reject",
|
label: "Reject",
|
||||||
value: 5,
|
value: (data && data?.reject) || 0,
|
||||||
icon: <IconReject size={25} color={MainColor.red} />,
|
icon: <IconReject size={25} color={MainColor.red} />,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ export default function AdminTableValue({
|
|||||||
value1,
|
value1,
|
||||||
value2,
|
value2,
|
||||||
value3,
|
value3,
|
||||||
|
bottomLine = false,
|
||||||
}: {
|
}: {
|
||||||
value1: React.ReactNode;
|
value1: React.ReactNode;
|
||||||
value2: React.ReactNode;
|
value2: React.ReactNode;
|
||||||
value3: React.ReactNode;
|
value3: React.ReactNode;
|
||||||
|
bottomLine?: boolean;
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -50,7 +52,7 @@ export default function AdminTableValue({
|
|||||||
{value3}
|
{value3}
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Divider />
|
{bottomLine && <Divider />}
|
||||||
</View>
|
</View>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { MainColor } from "@/constants/color-palet";
|
|||||||
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
import { ICON_SIZE_SMALL } from "@/constants/constans-value";
|
||||||
import TextInputCustom from "../TextInput/TextInputCustom";
|
import TextInputCustom from "../TextInput/TextInputCustom";
|
||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
import { StyleProp, ViewStyle, TextStyle, StyleSheet } from "react-native";
|
||||||
|
|
||||||
interface SearchInputProps {
|
interface SearchInputProps {
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
@@ -12,6 +12,8 @@ interface SearchInputProps {
|
|||||||
containerStyle?: StyleProp<ViewStyle>;
|
containerStyle?: StyleProp<ViewStyle>;
|
||||||
style?: StyleProp<TextStyle>;
|
style?: StyleProp<TextStyle>;
|
||||||
onChangeText?: (value: string) => void;
|
onChangeText?: (value: string) => void;
|
||||||
|
value?: string;
|
||||||
|
disabled?: boolean;
|
||||||
}
|
}
|
||||||
export default function SearchInput({
|
export default function SearchInput({
|
||||||
placeholder,
|
placeholder,
|
||||||
@@ -21,6 +23,8 @@ export default function SearchInput({
|
|||||||
containerStyle,
|
containerStyle,
|
||||||
style,
|
style,
|
||||||
onChangeText,
|
onChangeText,
|
||||||
|
value,
|
||||||
|
disabled,
|
||||||
...props
|
...props
|
||||||
}: SearchInputProps) {
|
}: SearchInputProps) {
|
||||||
return (
|
return (
|
||||||
@@ -29,14 +33,21 @@ export default function SearchInput({
|
|||||||
<Ionicons
|
<Ionicons
|
||||||
name="search-outline"
|
name="search-outline"
|
||||||
size={ICON_SIZE_SMALL}
|
size={ICON_SIZE_SMALL}
|
||||||
color={MainColor.placeholder}
|
color={disabled ? MainColor.white_gray : MainColor.placeholder}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
|
value={value}
|
||||||
onChangeText={onChangeText}
|
onChangeText={onChangeText}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
borderRadius={50}
|
borderRadius={50}
|
||||||
containerStyle={[containerStyle, { marginBottom: 0 }]}
|
containerStyle={[disabled ? styleses.disabled : styleses.containerStyle]}
|
||||||
|
disabled={disabled}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const styleses = StyleSheet.create({
|
||||||
|
containerStyle: { width: "100%", marginBottom: 0 },
|
||||||
|
disabled: { width: "100%", marginBottom: 0, color: MainColor.white_gray },
|
||||||
|
});
|
||||||
|
|||||||
@@ -15,23 +15,24 @@ function Collaboration_BoxPublishSection({
|
|||||||
data: any;
|
data: any;
|
||||||
rightComponentAvatar?: React.ReactNode;
|
rightComponentAvatar?: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<BoxWithHeaderSection href={href}>
|
<BoxWithHeaderSection href={href}>
|
||||||
<StackCustom gap={0}>
|
<StackCustom gap={0}>
|
||||||
<AvatarUsernameAndOtherComponent
|
<AvatarUsernameAndOtherComponent
|
||||||
avatarHref={`/profile/${data?.Author?.id}`}
|
avatarHref={`/profile/${data?.Author?.Profile?.id}`}
|
||||||
name={data?.Author?.username || "Username"}
|
name={data?.Author?.username || "Username"}
|
||||||
rightComponent={rightComponentAvatar}
|
rightComponent={rightComponentAvatar}
|
||||||
avatar={data?.Author?.Profile?.imageId}
|
avatar={data?.Author?.Profile?.imageId}
|
||||||
withBottomLine
|
withBottomLine
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<StackCustom>
|
<StackCustom style={{paddingBlock: 10}}>
|
||||||
<TextCustom truncate size="large" bold align="center">
|
<TextCustom truncate size="large" bold align="center">
|
||||||
{data?.title || "-"}
|
{data?.title || "-"}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
<TextCustom truncate={2}>{data?.purpose || "-"}</TextCustom>
|
{/* <TextCustom truncate={2}>{data?.purpose || "-"}</TextCustom> */}
|
||||||
{/* <TextCustom bold size="small" >
|
{/* <TextCustom bold size="small" >
|
||||||
2 Partisipan
|
2 Partisipan
|
||||||
</TextCustom> */}
|
</TextCustom> */}
|
||||||
|
|||||||
@@ -31,3 +31,20 @@ export async function apiAdminCollaborationGetById({
|
|||||||
throw error;
|
throw error;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export async function apiAdminCollaborationReject({
|
||||||
|
id,
|
||||||
|
data,
|
||||||
|
}: {
|
||||||
|
id: string;
|
||||||
|
data: any;
|
||||||
|
}) {
|
||||||
|
try {
|
||||||
|
const response = await apiConfig.put(`/mobile/admin/collaboration/${id}`, {
|
||||||
|
data: data,
|
||||||
|
});
|
||||||
|
return response.data;
|
||||||
|
} catch (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
18
service/api-admin/api-admin-job.ts
Normal file
18
service/api-admin/api-admin-job.ts
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
import { apiConfig } from "../api-config";
|
||||||
|
|
||||||
|
export async function apiAdminJob({
|
||||||
|
category,
|
||||||
|
search,
|
||||||
|
}: {
|
||||||
|
category: "dashboard" | "publish" | "review" | "reject";
|
||||||
|
search?: string;
|
||||||
|
}) {
|
||||||
|
try {
|
||||||
|
const response = await apiConfig.get(
|
||||||
|
`/mobile/admin/job?category=${category}&search=${search}`
|
||||||
|
);
|
||||||
|
return response.data;
|
||||||
|
} catch (error) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user