Fix QC Ayu
Fix: - modified: app/(application)/(user)/event/[id]/publish.tsx - modified: app/(application)/(user)/event/create.tsx - modified: app/(application)/(user)/portofolio/[id]/create.tsx - modified: app/(application)/(user)/portofolio/[id]/edit.tsx - modified: app/(application)/admin/collaboration/[id]/group.tsx - modified: app/(application)/admin/collaboration/group.tsx - modified: app/(application)/admin/collaboration/publish.tsx - modified: app/(application)/admin/forum/[id]/list-report-comment.tsx - modified: app/(application)/admin/forum/[id]/list-report-posting.tsx - modified: app/(application)/admin/forum/posting.tsx - modified: app/(application)/admin/forum/report-comment.tsx - modified: app/(application)/admin/forum/report-posting.tsx - modified: app/(application)/admin/voting/[status]/status.tsx - modified: app/(application)/admin/voting/history.tsx - modified: components/Select/SelectCustom.tsx - modified: components/_ShareComponent/GridSpan_4_8.tsx - modified: screens/Authentication/LoginView.tsx - modified: screens/Collaboration/BoxPublishSection.tsx - modified: screens/Event/BoxDetailPublishSection.tsx - modified: screens/Home/topFeatureSection.tsx - modified: screens/Portofolio/ButtonCreatePortofolio.tsx Add: - components/_ShareComponent/GridSpan_NewComponent.tsx ### No Issue
This commit is contained in:
@@ -71,8 +71,6 @@ export default function EventDetailPublish() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log("[participans]", isParticipant);
|
|
||||||
|
|
||||||
const handlePress = (item: IMenuDrawerItem) => {
|
const handlePress = (item: IMenuDrawerItem) => {
|
||||||
console.log("PATH ", item.path);
|
console.log("PATH ", item.path);
|
||||||
router.navigate(item.path as any);
|
router.navigate(item.path as any);
|
||||||
@@ -139,7 +137,7 @@ export default function EventDetailPublish() {
|
|||||||
<>
|
<>
|
||||||
<Stack.Screen
|
<Stack.Screen
|
||||||
options={{
|
options={{
|
||||||
title: `Event publish`,
|
title: `Event Publish`,
|
||||||
headerLeft: () => <LeftButtonCustom />,
|
headerLeft: () => <LeftButtonCustom />,
|
||||||
headerRight: () => <DotButton onPress={() => setOpenDrawer(true)} />,
|
headerRight: () => <DotButton onPress={() => setOpenDrawer(true)} />,
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ export default function EventCreate() {
|
|||||||
label: item.name,
|
label: item.name,
|
||||||
value: item.id,
|
value: item.id,
|
||||||
}))}
|
}))}
|
||||||
value={data?.eventMaster_TipeAcaraId || ""}
|
value={data?.eventMaster_TipeAcaraId || null}
|
||||||
onChange={(value: any) =>
|
onChange={(value: any) =>
|
||||||
setData({ ...data, eventMaster_TipeAcaraId: value })
|
setData({ ...data, eventMaster_TipeAcaraId: value })
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ export default function PortofolioCreate() {
|
|||||||
function handleInputValue(phoneNumber: string) {
|
function handleInputValue(phoneNumber: string) {
|
||||||
setInputValue(phoneNumber);
|
setInputValue(phoneNumber);
|
||||||
const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
||||||
const fixNumber = inputValue.replace(/\s+/g, "");
|
let fixNumber = inputValue.replace(/\s+/g, "").replace(/^0+/, "");
|
||||||
const realNumber = callingCode + fixNumber;
|
const realNumber = callingCode + fixNumber;
|
||||||
setData({ ...data, tlpn: realNumber });
|
setData({ ...data, tlpn: realNumber });
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ export default function PortofolioEdit() {
|
|||||||
|
|
||||||
const handleSubmitUpdate = async () => {
|
const handleSubmitUpdate = async () => {
|
||||||
const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
const callingCode = selectedCountry?.callingCode.replace(/^\+/, "") || "";
|
||||||
const fixNumber = data.tlpn.replace(/\s+/g, "");
|
let fixNumber = data.tlpn.replace(/\s+/g, "").replace(/^0+/, "");
|
||||||
const realNumber = callingCode + fixNumber;
|
const realNumber = callingCode + fixNumber;
|
||||||
|
|
||||||
const newData: IFormData = {
|
const newData: IFormData = {
|
||||||
|
|||||||
@@ -2,11 +2,13 @@
|
|||||||
import {
|
import {
|
||||||
BaseBox,
|
BaseBox,
|
||||||
Grid,
|
Grid,
|
||||||
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
import AdminBackButtonAntTitle from "@/components/_ShareComponent/Admin/BackButtonAntTitle";
|
||||||
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
import { apiAdminCollaborationGetById } from "@/service/api-admin/api-admin-collaboration";
|
import { apiAdminCollaborationGetById } from "@/service/api-admin/api-admin-collaboration";
|
||||||
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { useFocusEffect, useLocalSearchParams } from "expo-router";
|
||||||
import { useCallback, useState } from "react";
|
import { useCallback, useState } from "react";
|
||||||
@@ -28,6 +30,8 @@ export default function AdminCollaborationGroup() {
|
|||||||
category: "group",
|
category: "group",
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("[DATA]", JSON.stringify(response.data, null, 2));
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
setData(response.data);
|
setData(response.data);
|
||||||
}
|
}
|
||||||
@@ -59,38 +63,33 @@ export default function AdminCollaborationGroup() {
|
|||||||
))}
|
))}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
|
<TextCustom bold>Anggota</TextCustom>
|
||||||
|
<Spacing height={5}/>
|
||||||
<BaseBox>
|
<BaseBox>
|
||||||
<StackCustom>
|
<StackCustom>
|
||||||
<TextCustom align="center">Anggota</TextCustom>
|
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={6} style={{ justifyContent: "center", paddingRight: 10 }}>
|
||||||
|
<TextCustom bold>Nomor</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={6} style={{ justifyContent: "center" }}>
|
||||||
|
<TextCustom bold>Username</TextCustom>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
{data?.ProjectCollaboration_AnggotaRoomChat?.map(
|
{data?.ProjectCollaboration_AnggotaRoomChat?.map(
|
||||||
(item: any, index: number) => (
|
(item: any, index: number) => (
|
||||||
<StackCustom key={index} gap={0}>
|
<Grid key={index}>
|
||||||
<Grid>
|
<Grid.Col span={6} style={{ justifyContent: "center", paddingRight: 10 }}>
|
||||||
<Grid.Col
|
<TextCustom bold truncate>+{item?.User?.nomor || "-"}</TextCustom>
|
||||||
span={4}
|
</Grid.Col>
|
||||||
style={{ justifyContent: "center", paddingRight: 10 }}
|
<Grid.Col span={6} style={{ justifyContent: "center" }}>
|
||||||
>
|
<TextCustom bold>
|
||||||
<TextCustom bold>Nama</TextCustom>
|
{item?.User?.username || "-"}
|
||||||
</Grid.Col>
|
</TextCustom>
|
||||||
<Grid.Col span={8} style={{ justifyContent: "center" }}>
|
</Grid.Col>
|
||||||
<TextCustom>
|
</Grid>
|
||||||
{item?.User?.Profile?.name || "-"}
|
|
||||||
</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>
|
||||||
|
|||||||
@@ -1,17 +1,14 @@
|
|||||||
import {
|
import {
|
||||||
ActionIcon,
|
ClickableCustom,
|
||||||
LoaderCustom,
|
LoaderCustom,
|
||||||
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 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 { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { apiAdminCollaboration } from "@/service/api-admin/api-admin-collaboration";
|
import { apiAdminCollaboration } from "@/service/api-admin/api-admin-collaboration";
|
||||||
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";
|
||||||
@@ -34,7 +31,7 @@ export default function AdminCollaborationGroup() {
|
|||||||
const response = await apiAdminCollaboration({
|
const response = await apiAdminCollaboration({
|
||||||
category: "group",
|
category: "group",
|
||||||
});
|
});
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
setList(response.data);
|
setList(response.data);
|
||||||
}
|
}
|
||||||
@@ -51,10 +48,19 @@ export default function AdminCollaborationGroup() {
|
|||||||
<StackCustom>
|
<StackCustom>
|
||||||
<AdminComp_BoxTitle title="Group" />
|
<AdminComp_BoxTitle title="Group" />
|
||||||
<>
|
<>
|
||||||
<AdminTitleTable
|
<GridSpan_NewComponent
|
||||||
title1="Aksi"
|
span1={6}
|
||||||
title2="Jumlah peserta"
|
span2={6}
|
||||||
title3="Nama group"
|
text1={
|
||||||
|
<TextCustom bold truncate align="center">
|
||||||
|
Jumlah Anggota
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text2={
|
||||||
|
<TextCustom bold truncate>
|
||||||
|
Nama Group
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
@@ -67,31 +73,27 @@ export default function AdminCollaborationGroup() {
|
|||||||
) : (
|
) : (
|
||||||
list?.map((item: any, index: number) => (
|
list?.map((item: any, index: number) => (
|
||||||
<View key={index}>
|
<View key={index}>
|
||||||
<AdminTableValue
|
<ClickableCustom
|
||||||
value1={
|
onPress={() => {
|
||||||
<ActionIcon
|
router.push(`/admin/collaboration/${item.id}/group`);
|
||||||
icon={
|
}}
|
||||||
<Octicons
|
>
|
||||||
name="eye"
|
<GridSpan_NewComponent
|
||||||
size={ICON_SIZE_BUTTON}
|
span1={6}
|
||||||
color="black"
|
span2={6}
|
||||||
/>
|
text1={
|
||||||
}
|
<TextCustom truncate={1} align="center">
|
||||||
onPress={() => {
|
{item?.ProjectCollaboration_AnggotaRoomChat?.length ||
|
||||||
router.push(`/admin/collaboration/${item.id}/group`);
|
"-"}
|
||||||
}}
|
</TextCustom>
|
||||||
/>
|
}
|
||||||
}
|
text2={
|
||||||
value2={
|
<TextCustom truncate={2}>
|
||||||
<TextCustom truncate={1}>
|
{item?.name || "-"}
|
||||||
{item?.ProjectCollaboration_AnggotaRoomChat?.length ||
|
</TextCustom>
|
||||||
"-"}
|
}
|
||||||
</TextCustom>
|
/>
|
||||||
}
|
</ClickableCustom>
|
||||||
value3={
|
|
||||||
<TextCustom truncate={2}>{item?.name || "-"}</TextCustom>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
|
ClickableCustom,
|
||||||
LoaderCustom,
|
LoaderCustom,
|
||||||
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
@@ -9,6 +11,7 @@ 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 { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
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 { apiAdminCollaboration } from "@/service/api-admin/api-admin-collaboration";
|
||||||
import { Octicons } from "@expo/vector-icons";
|
import { Octicons } from "@expo/vector-icons";
|
||||||
@@ -51,11 +54,7 @@ export default function AdminCollaborationPublish() {
|
|||||||
<StackCustom>
|
<StackCustom>
|
||||||
<AdminComp_BoxTitle title="Publish" />
|
<AdminComp_BoxTitle title="Publish" />
|
||||||
|
|
||||||
<AdminTitleTable
|
<GridSpan_NewComponent text1={<TextCustom bold>Username</TextCustom>} text2={<TextCustom bold>Judul Proyek</TextCustom>} />
|
||||||
title1="Aksi"
|
|
||||||
title2="Username"
|
|
||||||
title3="Judul Proyek"
|
|
||||||
/>
|
|
||||||
{/* <Spacing height={10} /> */}
|
{/* <Spacing height={10} /> */}
|
||||||
<Divider />
|
<Divider />
|
||||||
|
|
||||||
@@ -68,32 +67,26 @@ export default function AdminCollaborationPublish() {
|
|||||||
) : (
|
) : (
|
||||||
list?.map((item: any, index: number) => (
|
list?.map((item: any, index: number) => (
|
||||||
<View key={index}>
|
<View key={index}>
|
||||||
<AdminTableValue
|
<ClickableCustom
|
||||||
value1={
|
onPress={() => {
|
||||||
<ActionIcon
|
router.push(`/admin/collaboration/${item?.id}/publish`);
|
||||||
icon={
|
}}
|
||||||
<Octicons
|
>
|
||||||
name="eye"
|
<GridSpan_NewComponent
|
||||||
size={ICON_SIZE_BUTTON}
|
text1={
|
||||||
color="black"
|
<TextCustom truncate={1}>
|
||||||
/>
|
{item?.Author?.username || "-"}{" "}
|
||||||
}
|
</TextCustom>
|
||||||
onPress={() => {
|
}
|
||||||
router.push(`/admin/collaboration/${item?.id}/publish`);
|
text2={
|
||||||
}}
|
<TextCustom truncate={2}>
|
||||||
/>
|
{item?.title || "-"}
|
||||||
}
|
</TextCustom>
|
||||||
value2={
|
}
|
||||||
<TextCustom align="center" truncate={1}>
|
/>
|
||||||
{item?.Author?.username || "-"}{" "}
|
</ClickableCustom>
|
||||||
</TextCustom>
|
<Spacing height={8}/>
|
||||||
}
|
<Divider/>
|
||||||
value3={
|
|
||||||
<TextCustom align="center" truncate={2}>
|
|
||||||
{item?.title || "-"}
|
|
||||||
</TextCustom>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</View>
|
</View>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
ActionIcon,
|
ActionIcon,
|
||||||
AlertDefaultSystem,
|
AlertDefaultSystem,
|
||||||
BaseBox,
|
BaseBox,
|
||||||
|
CenterCustom,
|
||||||
DrawerCustom,
|
DrawerCustom,
|
||||||
LoaderCustom,
|
LoaderCustom,
|
||||||
MenuDrawerDynamicGrid,
|
MenuDrawerDynamicGrid,
|
||||||
@@ -17,6 +18,7 @@ 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 { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
|
import { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
import {
|
import {
|
||||||
@@ -27,6 +29,7 @@ import {
|
|||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } 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";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
@@ -95,24 +98,24 @@ export default function AdminForumReportComment() {
|
|||||||
>
|
>
|
||||||
<BaseBox>
|
<BaseBox>
|
||||||
<StackCustom gap={"sm"}>
|
<StackCustom gap={"sm"}>
|
||||||
<GridSpan_4_8
|
<GridSpan_NewComponent
|
||||||
label={<TextCustom bold>Username</TextCustom>}
|
text1={<TextCustom bold>Username</TextCustom>}
|
||||||
value={<TextCustom>{data?.Author?.username || "-"}</TextCustom>}
|
text2={<TextCustom>{data?.Author?.username || "-"}</TextCustom>}
|
||||||
/>
|
/>
|
||||||
<GridSpan_4_8
|
<GridSpan_NewComponent
|
||||||
label={<TextCustom bold>Komentar</TextCustom>}
|
text1={<TextCustom bold>Komentar</TextCustom>}
|
||||||
value={<TextCustom>{data?.komentar || "-"}</TextCustom>}
|
text2={<TextCustom>{data?.komentar || "-"}</TextCustom>}
|
||||||
/>
|
/>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
<AdminComp_BoxTitle title="Daftar Report Komentar" />
|
<AdminComp_BoxTitle title="Daftar Report Komentar" />
|
||||||
|
|
||||||
<StackCustom>
|
<StackCustom gap={"sm"}>
|
||||||
<AdminTitleTable
|
<GridSpan_NewComponent
|
||||||
title1="Aksi"
|
text1={<TextCustom bold align="center">Aksi</TextCustom>}
|
||||||
title2="Pelapor"
|
text2={<TextCustom bold>Pelapor</TextCustom>}
|
||||||
title3="Kategori Report"
|
text3={<TextCustom bold>Kategori Report</TextCustom>}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
<Divider />
|
||||||
{loadList ? (
|
{loadList ? (
|
||||||
@@ -123,34 +126,39 @@ export default function AdminForumReportComment() {
|
|||||||
</TextCustom>
|
</TextCustom>
|
||||||
) : (
|
) : (
|
||||||
listReport?.map((item: any, index: number) => (
|
listReport?.map((item: any, index: number) => (
|
||||||
<AdminTableValue
|
<View key={index}>
|
||||||
key={index}
|
<GridSpan_NewComponent
|
||||||
value1={
|
text1={
|
||||||
<ActionIcon
|
<CenterCustom>
|
||||||
icon={<IconView size={ICON_SIZE_BUTTON} color="black" />}
|
<ActionIcon
|
||||||
onPress={() => {
|
icon={<IconView size={ICON_SIZE_BUTTON} color="black" />}
|
||||||
setOpenDrawerAction(true);
|
onPress={() => {
|
||||||
setSelectedReport({
|
setOpenDrawerAction(true);
|
||||||
id: item.id,
|
setSelectedReport({
|
||||||
username: item.User?.username,
|
id: item.id,
|
||||||
kategori: item.ForumMaster_KategoriReport?.title,
|
username: item.User?.username,
|
||||||
keterangan: item.ForumMaster_KategoriReport?.deskripsi,
|
kategori: item.ForumMaster_KategoriReport?.title,
|
||||||
deskripsi: item.deskripsi,
|
keterangan:
|
||||||
});
|
item.ForumMaster_KategoriReport?.deskripsi,
|
||||||
}}
|
deskripsi: item.deskripsi,
|
||||||
/>
|
});
|
||||||
}
|
}}
|
||||||
value2={
|
/>
|
||||||
<TextCustom truncate={1}>
|
</CenterCustom>
|
||||||
{item?.User?.username || "-"}
|
}
|
||||||
</TextCustom>
|
text2={
|
||||||
}
|
<TextCustom truncate={1}>
|
||||||
value3={
|
{item?.User?.username || "-"}
|
||||||
<TextCustom truncate={2} align="center">
|
</TextCustom>
|
||||||
{item?.ForumMaster_KategoriReport?.title || "-"}
|
}
|
||||||
</TextCustom>
|
text3={
|
||||||
}
|
<TextCustom truncate={2}>
|
||||||
/>
|
{item?.ForumMaster_KategoriReport?.title || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Divider />
|
||||||
|
</View>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import {
|
|||||||
AlertDefaultSystem,
|
AlertDefaultSystem,
|
||||||
BadgeCustom,
|
BadgeCustom,
|
||||||
BaseBox,
|
BaseBox,
|
||||||
|
CenterCustom,
|
||||||
DrawerCustom,
|
DrawerCustom,
|
||||||
LoaderCustom,
|
LoaderCustom,
|
||||||
MenuDrawerDynamicGrid,
|
MenuDrawerDynamicGrid,
|
||||||
@@ -18,6 +19,7 @@ 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 { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
|
import { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
import {
|
import {
|
||||||
@@ -28,6 +30,7 @@ import {
|
|||||||
import { router, useFocusEffect, useLocalSearchParams } from "expo-router";
|
import { router, useFocusEffect, useLocalSearchParams } 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";
|
||||||
import Toast from "react-native-toast-message";
|
import Toast from "react-native-toast-message";
|
||||||
|
|
||||||
@@ -95,14 +98,14 @@ export default function AdminForumReportPosting() {
|
|||||||
>
|
>
|
||||||
<BaseBox>
|
<BaseBox>
|
||||||
<StackCustom gap={"sm"}>
|
<StackCustom gap={"sm"}>
|
||||||
<GridSpan_4_8
|
<GridSpan_NewComponent
|
||||||
label={<TextCustom bold>Username</TextCustom>}
|
text1={<TextCustom bold>Username</TextCustom>}
|
||||||
value={<TextCustom>{data?.Author?.username || "-"}</TextCustom>}
|
text2={<TextCustom>{data?.Author?.username || "-"}</TextCustom>}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<GridSpan_4_8
|
<GridSpan_NewComponent
|
||||||
label={<TextCustom bold>Status</TextCustom>}
|
text1={<TextCustom bold>Status</TextCustom>}
|
||||||
value={
|
text2={
|
||||||
data && data?.ForumMaster_StatusPosting?.status ? (
|
data && data?.ForumMaster_StatusPosting?.status ? (
|
||||||
<BadgeCustom
|
<BadgeCustom
|
||||||
color={
|
color={
|
||||||
@@ -121,19 +124,23 @@ export default function AdminForumReportPosting() {
|
|||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<GridSpan_4_8
|
<GridSpan_NewComponent
|
||||||
label={<TextCustom bold>Postingan</TextCustom>}
|
text1={<TextCustom bold>Postingan</TextCustom>}
|
||||||
value={<TextCustom>{data?.diskusi || "-"}</TextCustom>}
|
text2={<TextCustom>{data?.diskusi || "-"}</TextCustom>}
|
||||||
/>
|
/>
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
</BaseBox>
|
</BaseBox>
|
||||||
|
|
||||||
<AdminComp_BoxTitle title="Daftar Report Posting" />
|
<AdminComp_BoxTitle title="Daftar Report Posting" />
|
||||||
<StackCustom gap={"sm"}>
|
<StackCustom gap={"sm"}>
|
||||||
<AdminTitleTable
|
<GridSpan_NewComponent
|
||||||
title1="Aksi"
|
text1={
|
||||||
title2="Pelapor"
|
<TextCustom bold align="center">
|
||||||
title3="Kategori Report"
|
Aksi
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text2={<TextCustom bold>Pelapor</TextCustom>}
|
||||||
|
text3={<TextCustom bold>Kategori Report</TextCustom>}
|
||||||
/>
|
/>
|
||||||
<Divider />
|
<Divider />
|
||||||
{loadListReport ? (
|
{loadListReport ? (
|
||||||
@@ -144,34 +151,41 @@ export default function AdminForumReportPosting() {
|
|||||||
</TextCustom>
|
</TextCustom>
|
||||||
) : (
|
) : (
|
||||||
listReport?.map((item: any, index: number) => (
|
listReport?.map((item: any, index: number) => (
|
||||||
<AdminTableValue
|
<View key={index}>
|
||||||
key={index}
|
<GridSpan_NewComponent
|
||||||
value1={
|
text1={
|
||||||
<ActionIcon
|
<CenterCustom>
|
||||||
icon={<IconView size={ICON_SIZE_BUTTON} color="black" />}
|
<ActionIcon
|
||||||
onPress={() => {
|
icon={
|
||||||
setOpenDrawerAction(true);
|
<IconView size={ICON_SIZE_BUTTON} color="black" />
|
||||||
setSelectedReport({
|
}
|
||||||
id: item?.id,
|
onPress={() => {
|
||||||
username: item?.User?.username,
|
setOpenDrawerAction(true);
|
||||||
kategori: item?.ForumMaster_KategoriReport?.title,
|
setSelectedReport({
|
||||||
keterangan: item?.ForumMaster_KategoriReport?.deskripsi,
|
id: item?.id,
|
||||||
deskripsi: item?.deskripsi,
|
username: item?.User?.username,
|
||||||
});
|
kategori: item?.ForumMaster_KategoriReport?.title,
|
||||||
}}
|
keterangan:
|
||||||
/>
|
item?.ForumMaster_KategoriReport?.deskripsi,
|
||||||
}
|
deskripsi: item?.deskripsi,
|
||||||
value2={
|
});
|
||||||
<TextCustom truncate={1}>
|
}}
|
||||||
{item?.User?.username || "-"}
|
/>
|
||||||
</TextCustom>
|
</CenterCustom>
|
||||||
}
|
}
|
||||||
value3={
|
text2={
|
||||||
<TextCustom truncate={2} align="center">
|
<TextCustom truncate>
|
||||||
{item?.ForumMaster_KategoriReport?.title || "-"}
|
{item?.User?.username || "-"}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
/>
|
text3={
|
||||||
|
<TextCustom truncate={2}>
|
||||||
|
{item?.ForumMaster_KategoriReport?.title || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Divider />
|
||||||
|
</View>
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -1,22 +1,22 @@
|
|||||||
/* eslint-disable react-hooks/exhaustive-deps */
|
/* eslint-disable react-hooks/exhaustive-deps */
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ClickableCustom,
|
||||||
LoaderCustom,
|
LoaderCustom,
|
||||||
SearchInput,
|
SearchInput,
|
||||||
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { IconView } from "@/components/_Icon/IconComponent";
|
|
||||||
import AdminComp_BoxTitle from "@/components/_ShareComponent/Admin/BoxTitlePage";
|
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 AdminTitlePage from "@/components/_ShareComponent/Admin/TitlePage";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { GridSpan_4_8 } from "@/components/_ShareComponent/GridSpan_4_8";
|
||||||
|
import { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { apiAdminForum } from "@/service/api-admin/api-admin-forum";
|
import { apiAdminForum } from "@/service/api-admin/api-admin-forum";
|
||||||
import { router, useFocusEffect } from "expo-router";
|
import { router, useFocusEffect } from "expo-router";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import React, { 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 AdminForumPosting() {
|
export default function AdminForumPosting() {
|
||||||
@@ -37,7 +37,9 @@ export default function AdminForumPosting() {
|
|||||||
category: "posting",
|
category: "posting",
|
||||||
search: search,
|
search: search,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log("DATA", JSON.stringify(response, null, 2));
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
setList(response.data);
|
setList(response.data);
|
||||||
}
|
}
|
||||||
@@ -51,7 +53,7 @@ export default function AdminForumPosting() {
|
|||||||
const rightComponent = (
|
const rightComponent = (
|
||||||
<SearchInput
|
<SearchInput
|
||||||
containerStyle={{ width: "100%", marginBottom: 0 }}
|
containerStyle={{ width: "100%", marginBottom: 0 }}
|
||||||
placeholder="Cari"
|
placeholder="Cari postingan"
|
||||||
value={search}
|
value={search}
|
||||||
onChangeText={setSearch}
|
onChangeText={setSearch}
|
||||||
/>
|
/>
|
||||||
@@ -61,9 +63,15 @@ export default function AdminForumPosting() {
|
|||||||
<>
|
<>
|
||||||
<ViewWrapper headerComponent={<AdminTitlePage title="Forum" />}>
|
<ViewWrapper headerComponent={<AdminTitlePage title="Forum" />}>
|
||||||
<AdminComp_BoxTitle title={"Posting"} rightComponent={rightComponent} />
|
<AdminComp_BoxTitle title={"Posting"} rightComponent={rightComponent} />
|
||||||
|
<GridSpan_NewComponent
|
||||||
|
text1={<TextCustom bold truncate>Username</TextCustom>}
|
||||||
|
text2={<TextCustom bold truncate> Postingan</TextCustom>}
|
||||||
|
text3={<TextCustom bold align="center" truncate> Report Posting</TextCustom>}
|
||||||
|
text4={<TextCustom bold align="center" truncate> Komentar</TextCustom>}
|
||||||
|
/>
|
||||||
|
<Divider />
|
||||||
|
<Spacing />
|
||||||
<StackCustom>
|
<StackCustom>
|
||||||
<AdminTitleTable title1="Aksi" title2="Username" title3="Postingan" />
|
|
||||||
<Divider />
|
|
||||||
{loadList ? (
|
{loadList ? (
|
||||||
<LoaderCustom />
|
<LoaderCustom />
|
||||||
) : _.isEmpty(list) ? (
|
) : _.isEmpty(list) ? (
|
||||||
@@ -72,25 +80,38 @@ export default function AdminForumPosting() {
|
|||||||
</TextCustom>
|
</TextCustom>
|
||||||
) : (
|
) : (
|
||||||
list?.map((item: any, index: number) => (
|
list?.map((item: any, index: number) => (
|
||||||
<AdminTableValue
|
<View key={index}>
|
||||||
key={index}
|
<ClickableCustom
|
||||||
value1={
|
onPress={() => {
|
||||||
<ActionIcon
|
router.push(`/admin/forum/${item.id}`);
|
||||||
icon={<IconView size={ICON_SIZE_BUTTON} color="black" />}
|
}}
|
||||||
onPress={() => {
|
>
|
||||||
router.push(`/admin/forum/${item?.id}`);
|
<GridSpan_NewComponent
|
||||||
}}
|
text1={
|
||||||
|
<TextCustom truncate={1}>
|
||||||
|
{item?.Author?.username || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text2={
|
||||||
|
<TextCustom truncate>
|
||||||
|
{item?.diskusi || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text3={
|
||||||
|
<TextCustom align="center" truncate={2}>
|
||||||
|
{item?.reportPosting || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text4={
|
||||||
|
<TextCustom align="center" truncate={2}>
|
||||||
|
{item?.komentar || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
}
|
|
||||||
value2={
|
</ClickableCustom>
|
||||||
<TextCustom truncate={1}>
|
<Divider />
|
||||||
{item?.Author?.username || "-"}
|
</View>
|
||||||
</TextCustom>
|
|
||||||
}
|
|
||||||
value3={
|
|
||||||
<TextCustom truncate={2}>{item?.diskusi || "-"}</TextCustom>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
/* eslint-disable react-hooks/exhaustive-deps */
|
/* eslint-disable react-hooks/exhaustive-deps */
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
|
ClickableCustom,
|
||||||
LoaderCustom,
|
LoaderCustom,
|
||||||
SearchInput,
|
SearchInput,
|
||||||
|
Spacing,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper,
|
ViewWrapper,
|
||||||
@@ -12,12 +14,14 @@ 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 { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
import { apiAdminForum } from "@/service/api-admin/api-admin-forum";
|
import { apiAdminForum } from "@/service/api-admin/api-admin-forum";
|
||||||
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 AdminForumReportComment() {
|
export default function AdminForumReportComment() {
|
||||||
@@ -67,13 +71,26 @@ export default function AdminForumReportComment() {
|
|||||||
rightComponent={rightComponent}
|
rightComponent={rightComponent}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<StackCustom gap={"sm"}>
|
<GridSpan_NewComponent
|
||||||
<AdminTitleTable
|
text1={
|
||||||
title1="Aksi"
|
<TextCustom bold truncate>
|
||||||
title2="Pelapor"
|
Pelapor
|
||||||
title3="Jenis Laporan"
|
</TextCustom>
|
||||||
/>
|
}
|
||||||
<Divider />
|
text2={
|
||||||
|
<TextCustom bold truncate>
|
||||||
|
Komentar
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text3={
|
||||||
|
<TextCustom bold truncate>
|
||||||
|
Jenis Laporan
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Divider />
|
||||||
|
<Spacing />
|
||||||
|
<StackCustom gap={"lg"}>
|
||||||
{loadList ? (
|
{loadList ? (
|
||||||
<LoaderCustom />
|
<LoaderCustom />
|
||||||
) : _.isEmpty(listData) ? (
|
) : _.isEmpty(listData) ? (
|
||||||
@@ -82,34 +99,35 @@ export default function AdminForumReportComment() {
|
|||||||
</TextCustom>
|
</TextCustom>
|
||||||
) : (
|
) : (
|
||||||
listData?.map((item: any, index: number) => (
|
listData?.map((item: any, index: number) => (
|
||||||
<AdminTableValue
|
<View key={index}>
|
||||||
key={index}
|
<ClickableCustom
|
||||||
value1={
|
onPress={() => {
|
||||||
<ActionIcon
|
router.push(
|
||||||
icon={
|
`/admin/forum/${item?.Forum_Komentar?.id}/list-report-comment`
|
||||||
<IconView
|
);
|
||||||
size={ICON_SIZE_BUTTON}
|
}}
|
||||||
color={MainColor.black}
|
>
|
||||||
/>
|
<GridSpan_NewComponent
|
||||||
|
text1={
|
||||||
|
<TextCustom truncate={1}>
|
||||||
|
{item?.User?.username || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text2={
|
||||||
|
<TextCustom truncate={2}>
|
||||||
|
{item?.Forum_Komentar?.komentar || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text3={
|
||||||
|
<TextCustom truncate={2}>
|
||||||
|
{item?.ForumMaster_KategoriReport?.title || "-"}
|
||||||
|
</TextCustom>
|
||||||
}
|
}
|
||||||
onPress={() => {
|
|
||||||
router.push(
|
|
||||||
`/admin/forum/${item?.Forum_Komentar?.id}/list-report-comment`
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
}
|
</ClickableCustom>
|
||||||
value2={
|
<Spacing />
|
||||||
<TextCustom truncate={1}>
|
<Divider />
|
||||||
{item?.User?.username || "-"}
|
</View>
|
||||||
</TextCustom>
|
|
||||||
}
|
|
||||||
value3={
|
|
||||||
<TextCustom truncate={2} align="center">
|
|
||||||
{item?.ForumMaster_KategoriReport?.title || "-"}
|
|
||||||
</TextCustom>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -1,24 +1,27 @@
|
|||||||
/* eslint-disable react-hooks/exhaustive-deps */
|
/* eslint-disable react-hooks/exhaustive-deps */
|
||||||
import {
|
import {
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
|
ClickableCustom,
|
||||||
Divider,
|
Divider,
|
||||||
LoaderCustom,
|
LoaderCustom,
|
||||||
SearchInput,
|
SearchInput,
|
||||||
StackCustom,
|
StackCustom,
|
||||||
TextCustom,
|
TextCustom,
|
||||||
ViewWrapper
|
ViewWrapper,
|
||||||
} from "@/components";
|
} from "@/components";
|
||||||
import { IconView } from "@/components/_Icon/IconComponent";
|
import { IconView } from "@/components/_Icon/IconComponent";
|
||||||
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 { GridSpan_NewComponent } from "@/components/_ShareComponent/GridSpan_NewComponent";
|
||||||
import { MainColor } from "@/constants/color-palet";
|
import { MainColor } from "@/constants/color-palet";
|
||||||
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
import { ICON_SIZE_BUTTON } from "@/constants/constans-value";
|
||||||
import { apiAdminForum } from "@/service/api-admin/api-admin-forum";
|
import { apiAdminForum } from "@/service/api-admin/api-admin-forum";
|
||||||
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";
|
||||||
|
|
||||||
export default function AdminForumReportPosting() {
|
export default function AdminForumReportPosting() {
|
||||||
const [listData, setListData] = useState<any[] | null>(null);
|
const [listData, setListData] = useState<any[] | null>(null);
|
||||||
@@ -67,46 +70,51 @@ export default function AdminForumReportPosting() {
|
|||||||
rightComponent={rightComponent}
|
rightComponent={rightComponent}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<StackCustom gap={"sm"}>
|
<GridSpan_NewComponent
|
||||||
<AdminTitleTable title1="Aksi" title2="Pelapor" title3="Postingan" />
|
text1={
|
||||||
|
<TextCustom bold truncate>
|
||||||
<Divider />
|
Username
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text2={
|
||||||
|
<TextCustom bold truncate>
|
||||||
|
Postingan
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<Divider />
|
||||||
|
<StackCustom>
|
||||||
{loadList ? (
|
{loadList ? (
|
||||||
<LoaderCustom />
|
<LoaderCustom />
|
||||||
) : _.isEmpty(listData) ? (
|
) : _.isEmpty(listData) ? (
|
||||||
<TextCustom align="center" color="gray">
|
<TextCustom align="center" color="gray">
|
||||||
Belum ada data
|
Belum ada data
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
) : (
|
) : (
|
||||||
listData?.map((item: any, index: number) => (
|
listData?.map((item: any, index: number) => (
|
||||||
<AdminTableValue
|
<View key={index}>
|
||||||
key={index}
|
<ClickableCustom
|
||||||
value1={
|
onPress={() => {
|
||||||
<ActionIcon
|
router.push(
|
||||||
icon={
|
`/admin/forum/${item?.Forum_Posting?.id}/list-report-posting`
|
||||||
<IconView
|
);
|
||||||
size={ICON_SIZE_BUTTON}
|
}}
|
||||||
color={MainColor.black}
|
>
|
||||||
/>
|
<GridSpan_NewComponent
|
||||||
|
text1={
|
||||||
|
<TextCustom truncate={1}>
|
||||||
|
{item?.User?.username || "-"}
|
||||||
|
</TextCustom>
|
||||||
|
}
|
||||||
|
text2={
|
||||||
|
<TextCustom truncate={1}>
|
||||||
|
{item?.Forum_Posting?.diskusi || "-"}
|
||||||
|
</TextCustom>
|
||||||
}
|
}
|
||||||
onPress={() => {
|
|
||||||
router.push(
|
|
||||||
`/admin/forum/${item?.Forum_Posting?.id}/list-report-posting`
|
|
||||||
);
|
|
||||||
}}
|
|
||||||
/>
|
/>
|
||||||
}
|
</ClickableCustom>
|
||||||
value2={
|
<Divider />
|
||||||
<TextCustom truncate={1}>
|
</View>
|
||||||
{item?.User?.username || "-"}
|
|
||||||
</TextCustom>
|
|
||||||
}
|
|
||||||
value3={
|
|
||||||
<TextCustom truncate={2} align="center">
|
|
||||||
{item?.Forum_Posting?.diskusi || "-"}
|
|
||||||
</TextCustom>
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
))
|
))
|
||||||
)}
|
)}
|
||||||
</StackCustom>
|
</StackCustom>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ export default function AdminVotingStatus() {
|
|||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
value3={
|
value3={
|
||||||
<TextCustom align="center" truncate={2}>
|
<TextCustom truncate={2}>
|
||||||
{item?.title || "-"}
|
{item?.title || "-"}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ export default function AdminVotingHistory() {
|
|||||||
}
|
}
|
||||||
value2={<TextCustom truncate={1}>{item?.Author?.username || "-"}</TextCustom>}
|
value2={<TextCustom truncate={1}>{item?.Author?.username || "-"}</TextCustom>}
|
||||||
value3={
|
value3={
|
||||||
<TextCustom align="center" truncate={2}>
|
<TextCustom truncate={2}>
|
||||||
{item?.title || "-"}
|
{item?.title || "-"}
|
||||||
</TextCustom>
|
</TextCustom>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ const SelectCustom: React.FC<SelectProps> = ({
|
|||||||
borderRadius,
|
borderRadius,
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
paddingHorizontal: 10,
|
// paddingHorizontal: 0,
|
||||||
height: 50,
|
height: 50,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { Grid } from "@/components";
|
import { Grid } from "@/components";
|
||||||
|
|
||||||
export const GridSpan_4_8 = ({
|
export const GridSpan_4_8 = ({
|
||||||
label,
|
label: text1,
|
||||||
value,
|
value: text2,
|
||||||
}: {
|
}: {
|
||||||
label: React.ReactNode;
|
label: React.ReactNode;
|
||||||
value: React.ReactNode;
|
value: React.ReactNode;
|
||||||
@@ -17,10 +17,10 @@ export const GridSpan_4_8 = ({
|
|||||||
paddingLeft: 8,
|
paddingLeft: 8,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{label}
|
{text1}
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={8} style={{ justifyContent: "center", paddingRight: 8 }}>
|
<Grid.Col span={8} style={{ justifyContent: "center", paddingRight: 8 }}>
|
||||||
{value}
|
{text2}
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
|
|||||||
54
components/_ShareComponent/GridSpan_NewComponent.tsx
Normal file
54
components/_ShareComponent/GridSpan_NewComponent.tsx
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
import { Grid } from "@/components";
|
||||||
|
|
||||||
|
export const GridSpan_NewComponent = ({
|
||||||
|
text1,
|
||||||
|
text2,
|
||||||
|
text3,
|
||||||
|
text4,
|
||||||
|
span1,
|
||||||
|
span2,
|
||||||
|
}: {
|
||||||
|
text1: React.ReactNode;
|
||||||
|
text2: React.ReactNode;
|
||||||
|
text3?: React.ReactNode;
|
||||||
|
text4?: React.ReactNode;
|
||||||
|
span1?: number;
|
||||||
|
span2?: number;
|
||||||
|
}) => {
|
||||||
|
return (
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col
|
||||||
|
span={span1 ? span1 : text4 ? 3 : 4}
|
||||||
|
style={{
|
||||||
|
justifyContent: "flex-start",
|
||||||
|
paddingRight: 5,
|
||||||
|
paddingLeft: 5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{text1}
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col
|
||||||
|
span={span2 ? span2 : text4 ? 3 : text3 ? 4 : 8}
|
||||||
|
style={{ justifyContent: "flex-start", paddingRight: 5 }}
|
||||||
|
>
|
||||||
|
{text2}
|
||||||
|
</Grid.Col>
|
||||||
|
{text3 && (
|
||||||
|
<Grid.Col
|
||||||
|
span={text4 ? 3 : 4}
|
||||||
|
style={{ justifyContent: "flex-start", paddingRight: 5 }}
|
||||||
|
>
|
||||||
|
{text3}
|
||||||
|
</Grid.Col>
|
||||||
|
)}
|
||||||
|
{text4 && (
|
||||||
|
<Grid.Col
|
||||||
|
span={3}
|
||||||
|
style={{ justifyContent: "flex-start", paddingRight: 5 }}
|
||||||
|
>
|
||||||
|
{text4}
|
||||||
|
</Grid.Col>
|
||||||
|
)}
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -134,10 +134,10 @@ export default function LoginView() {
|
|||||||
|
|
||||||
if (token && token !== "" && isAdmin) {
|
if (token && token !== "" && isAdmin) {
|
||||||
// Akan di aktifkan jika sudah losos review
|
// Akan di aktifkan jika sudah losos review
|
||||||
// return <Redirect href={"/(application)/admin/dashboard"} />;
|
return <Redirect href={"/(application)/admin/dashboard"} />;
|
||||||
|
|
||||||
// Sementara gunakan ini
|
// Sementara gunakan ini
|
||||||
return <Redirect href={"/(application)/(user)/home"} />;
|
// return <Redirect href={"/(application)/(user)/home"} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function Collaboration_BoxPublishSection({
|
|||||||
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 style={{paddingBlock: 10}}>
|
<StackCustom style={{paddingBlock: 10}}>
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function Event_BoxDetailPublishSection({
|
|||||||
<Grid.Col span={4}>
|
<Grid.Col span={4}>
|
||||||
<TextCustom bold>{item.title}</TextCustom>
|
<TextCustom bold>{item.title}</TextCustom>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
<Grid.Col span={8}>
|
<Grid.Col span={8} style={{ paddingLeft: 10 }}>
|
||||||
<TextCustom>{item.value}</TextCustom>
|
<TextCustom>{item.value}</TextCustom>
|
||||||
</Grid.Col>
|
</Grid.Col>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ export default function Home_FeatureSection() {
|
|||||||
name: "Collaboration",
|
name: "Collaboration",
|
||||||
icon: <Ionicons name="share" size={48} color="gray" />,
|
icon: <Ionicons name="share" size={48} color="gray" />,
|
||||||
onPress: () => router.push("/(application)/(user)/collaboration/(tabs)"),
|
onPress: () => router.push("/(application)/(user)/collaboration/(tabs)"),
|
||||||
status: "inactive",
|
status: "active",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Voting",
|
name: "Voting",
|
||||||
|
|||||||
@@ -55,10 +55,6 @@ export default function Portofolio_ButtonCreate({
|
|||||||
};
|
};
|
||||||
|
|
||||||
const handleCreatePortofolio = async () => {
|
const handleCreatePortofolio = async () => {
|
||||||
console.log(
|
|
||||||
"Data sub bidang >>",
|
|
||||||
JSON.stringify(subBidangSelected, null, 2)
|
|
||||||
);
|
|
||||||
if (!validaasiData()) {
|
if (!validaasiData()) {
|
||||||
Toast.show({
|
Toast.show({
|
||||||
type: "info",
|
type: "info",
|
||||||
|
|||||||
Reference in New Issue
Block a user