Merge pull request #250 from bipproduction/Nico/21Jan2025
Fix Tampilan Admin dan Modal di Donasi, Voting, dan Job Vacancy
This commit is contained in:
@@ -19,6 +19,13 @@ export const AccentColor = {
|
||||
white: "#FEFFFE"
|
||||
|
||||
};
|
||||
|
||||
export const AdminColor = {
|
||||
yellow: "#FFEB99",
|
||||
green: "#A7DCA5",
|
||||
orange: "#F7C69B",
|
||||
red: "#F4A8A8"
|
||||
}
|
||||
//yellow: "#FFC300"
|
||||
//yellow: "#FFD60A"
|
||||
// white: "#FEFFFE"
|
||||
|
||||
@@ -29,6 +29,8 @@ import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_glo
|
||||
import ComponentAdminColab_DetailData from "../component/detail_data";
|
||||
import adminColab_getOneRoomChatById from "../fun/get/get_one_room_chat_by_id";
|
||||
import adminColab_getListAllGroupChat from "../fun/get/get_list_all_group_chat";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
|
||||
export default function AdminColab_TableGroup({
|
||||
listGroup,
|
||||
@@ -148,14 +150,13 @@ function TableMenu({ listGroup }: { listGroup: any }) {
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"xs"}>
|
||||
<Group
|
||||
position="apart"
|
||||
bg={"blue.4"}
|
||||
p={"xs"}
|
||||
style={{ borderRadius: "6px" }}
|
||||
>
|
||||
<Title order={4}>Group Chat</Title>
|
||||
</Group>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Group Chat"
|
||||
color={AccentColor.softblue}
|
||||
component={
|
||||
<></>
|
||||
}
|
||||
/>
|
||||
<Paper p={"md"} withBorder shadow="lg">
|
||||
<Stack>
|
||||
<ScrollArea h={"65vh"}>
|
||||
|
||||
@@ -47,6 +47,7 @@ import { useState } from "react";
|
||||
import { adminDonasi_getListDonatur } from "../../fun/get/get_list_donatur_by_id";
|
||||
import { AdminDonasi_getOneById } from "../../fun/get/get_one_by_id";
|
||||
import adminDonasi_funUpdateStatusDanTotal from "../../fun/update/fun_update_status_dan_total";
|
||||
import { ComponentAdminGlobal_TitlePage } from "@/app_modules/admin/_admin_global/_component";
|
||||
|
||||
export default function AdminDonasi_DetailPublish({
|
||||
dataPublish,
|
||||
@@ -405,7 +406,7 @@ function TampilanListDonatur({
|
||||
<td>
|
||||
<Center>
|
||||
{e?.donasiMaster_StatusInvoiceId === "1" ||
|
||||
e?.donasiMaster_StatusInvoiceId === "2" ? (
|
||||
e?.donasiMaster_StatusInvoiceId === "2" ? (
|
||||
<Button
|
||||
loaderPosition="center"
|
||||
loading={isLoadingCek && idData === e?.id}
|
||||
@@ -455,37 +456,35 @@ function TampilanListDonatur({
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(dataDonasi, null, 2)}</pre> */}
|
||||
<Group
|
||||
position="apart"
|
||||
bg={"gray.4"}
|
||||
p={"xs"}
|
||||
style={{ borderRadius: "6px" }}
|
||||
>
|
||||
<Title order={4}>Daftar Donatur</Title>
|
||||
<Group>
|
||||
<ActionIcon
|
||||
size={"lg"}
|
||||
radius={"xl"}
|
||||
variant="light"
|
||||
onClick={() => {
|
||||
onRelaod();
|
||||
}}
|
||||
>
|
||||
<IconReload />
|
||||
</ActionIcon>
|
||||
<Select
|
||||
placeholder="Pilih status"
|
||||
value={isSelect}
|
||||
data={listMasterStatus.map((e) => ({
|
||||
value: e.id,
|
||||
label: e.name,
|
||||
}))}
|
||||
onChange={(val) => {
|
||||
onSelect(val);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Daftar Donatur"
|
||||
color="gray.4"
|
||||
component={
|
||||
<Group>
|
||||
<ActionIcon
|
||||
size={"lg"}
|
||||
radius={"xl"}
|
||||
variant="light"
|
||||
onClick={() => {
|
||||
onRelaod();
|
||||
}}
|
||||
>
|
||||
<IconReload />
|
||||
</ActionIcon>
|
||||
<Select
|
||||
placeholder="Pilih status"
|
||||
value={isSelect}
|
||||
data={listMasterStatus.map((e) => ({
|
||||
value: e.id,
|
||||
label: e.name,
|
||||
}))}
|
||||
onChange={(val) => {
|
||||
onSelect(val);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
}
|
||||
/>
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
<ScrollArea w={"100%"} h={"90%"}>
|
||||
@@ -754,14 +753,11 @@ function TampilanListPencairan({
|
||||
{/* <pre>{JSON.stringify(data, null, 2)}</pre> */}
|
||||
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<Group
|
||||
position="apart"
|
||||
bg={"gray.4"}
|
||||
p={"xs"}
|
||||
style={{ borderRadius: "6px" }}
|
||||
>
|
||||
<Title order={4}>Rincian Pencairan Dana</Title>
|
||||
<Group>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Rincian Pencairan Dana"
|
||||
color="gray.4"
|
||||
component={
|
||||
<Group>
|
||||
<ActionIcon
|
||||
size={"lg"}
|
||||
radius={"xl"}
|
||||
@@ -784,8 +780,9 @@ function TampilanListPencairan({
|
||||
}}
|
||||
/> */}
|
||||
</Group>
|
||||
</Group>
|
||||
|
||||
}
|
||||
/>
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
<ScrollArea w={"100%"} h={"90%"}>
|
||||
<Table
|
||||
|
||||
@@ -29,6 +29,7 @@ import adminDonasi_getMasterKategori from "../fun/master/get_list_kategori";
|
||||
import adminDonasi_funDeleteKategori from "../fun/delete/fun_delete_by_id";
|
||||
import adminDonasi_funUpdatekategoriById from "../fun/update/fun_update_kategori_by_id";
|
||||
import _ from "lodash";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
|
||||
export default function AdminDonasi_TableKategori({
|
||||
listKategori,
|
||||
@@ -159,7 +160,24 @@ function TableView({ list }: { list: MODEL_NEW_DEFAULT_MASTER[] }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Kategori"
|
||||
color="gray.4"
|
||||
component={
|
||||
<Button
|
||||
w={120}
|
||||
leftIcon={<IconCirclePlus />}
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
setIsCreate(true);
|
||||
setIsUpdate(false);
|
||||
}}
|
||||
>
|
||||
Tambah
|
||||
</Button>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"gray.4"}
|
||||
p={"xs"}
|
||||
@@ -177,7 +195,7 @@ function TableView({ list }: { list: MODEL_NEW_DEFAULT_MASTER[] }) {
|
||||
>
|
||||
Tambah
|
||||
</Button>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Grid>
|
||||
<Grid.Col span={"auto"}>
|
||||
|
||||
@@ -20,6 +20,9 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import adminDonasi_getListPublish from "../fun/get/get_list_publish";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminDonasi_TablePublish({
|
||||
listPublish,
|
||||
@@ -92,10 +95,10 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
<Button
|
||||
loaderPosition="center"
|
||||
loading={isLoading && e?.id === idData ? true : false}
|
||||
color={"green"}
|
||||
style={{ backgroundColor: MainColor.green, }}
|
||||
c={AccentColor.white}
|
||||
leftIcon={<IconEyeCheck />}
|
||||
radius={"xl"}
|
||||
variant="outline"
|
||||
onClick={() => {
|
||||
setLoading(true);
|
||||
setIdData(e?.id);
|
||||
@@ -113,7 +116,21 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Publish"
|
||||
color={AdminColor.green}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Masukan judul"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"green.4"}
|
||||
p={"xs"}
|
||||
@@ -128,7 +145,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
<ScrollArea w={"100%"} h={"90%"}>
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { RouterAdminDonasi_OLD } from "@/app/lib/router_hipmi/router_admin";
|
||||
import TampilanRupiahDonasi from "@/app_modules/donasi/component/tampilan_rupiah";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import { ComponentGlobal_TampilanRupiah } from "@/app_modules/_global/component";
|
||||
import { MODEL_DONASI } from "@/app_modules/donasi/model/interface";
|
||||
import {
|
||||
Button,
|
||||
Center,
|
||||
Group,
|
||||
Modal,
|
||||
Pagination,
|
||||
Paper,
|
||||
@@ -15,15 +16,15 @@ import {
|
||||
Table,
|
||||
Text,
|
||||
TextInput,
|
||||
Title,
|
||||
Title
|
||||
} from "@mantine/core";
|
||||
import { useDisclosure } from "@mantine/hooks";
|
||||
import { IconEyeEdit, IconSearch } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import adminDonasi_getListReject from "../fun/get/get_list_reject";
|
||||
import { ComponentGlobal_TampilanRupiah } from "@/app_modules/_global/component";
|
||||
|
||||
export default function AdminDonasi_TableReject({
|
||||
dataReject,
|
||||
@@ -92,10 +93,10 @@ function TableStatus({ dataReject }: { dataReject: any }) {
|
||||
<td>
|
||||
<Center>
|
||||
<Button
|
||||
color={"red"}
|
||||
style={{ backgroundColor: MainColor.green }}
|
||||
color={AccentColor.white}
|
||||
leftIcon={<IconEyeEdit />}
|
||||
radius={"xl"}
|
||||
variant="outline"
|
||||
onClick={() =>
|
||||
router.push(RouterAdminDonasi_OLD.detail_reject + `${e.id}`)
|
||||
}
|
||||
@@ -113,7 +114,21 @@ function TableStatus({ dataReject }: { dataReject: any }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Reject"
|
||||
color={AdminColor.red}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Masukan judul"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"red.4"}
|
||||
p={"xs"}
|
||||
@@ -128,7 +143,7 @@ function TableStatus({ dataReject }: { dataReject: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
<ScrollArea w={"100%"} h={"90%"}>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import { gs_adminDonasi_triggerReview } from "@/app/lib/global_state";
|
||||
import { RouterAdminDonasi_OLD } from "@/app/lib/router_hipmi/router_admin";
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import { ComponentGlobal_TampilanRupiah } from "@/app_modules/_global/component";
|
||||
import { MODEL_DONASI } from "@/app_modules/donasi/model/interface";
|
||||
import {
|
||||
@@ -26,6 +26,8 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../_admin_global/header_tamplate";
|
||||
import adminDonasi_getListReview from "../fun/get/get_list_review";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminDonasi_TableReview({
|
||||
listReview,
|
||||
@@ -139,7 +141,21 @@ function TableStatus({ listReview }: { listReview: any }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Review"
|
||||
color={AdminColor.orange}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Masukan judul"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"orange.4"}
|
||||
p={"xs"}
|
||||
@@ -154,7 +170,7 @@ function TableStatus({ listReview }: { listReview: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
{isShowReload && (
|
||||
|
||||
@@ -35,6 +35,8 @@ import { adminForum_getListPosting } from "../fun/get/get_list_publish";
|
||||
import adminJob_getListPublish from "@/app_modules/admin/job/fun/get/get_list_publish";
|
||||
import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete";
|
||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminForum_TablePosting({
|
||||
listPublish,
|
||||
@@ -168,7 +170,21 @@ function TablePublish({ listPublish }: { listPublish: any }) {
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Posting"
|
||||
color={AdminColor.green}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Cari postingan"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"green.4"}
|
||||
p={"xs"}
|
||||
@@ -185,7 +201,7 @@ function TablePublish({ listPublish }: { listPublish: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
{isEmpty(data) ? (
|
||||
<ComponentAdminGlobal_IsEmptyData />
|
||||
|
||||
@@ -27,6 +27,8 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||
import adminForum_funGetAllReportKomentar from "../fun/get/get_all_report_komentar";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminForum_TableReportKomentar({
|
||||
listData,
|
||||
@@ -156,7 +158,21 @@ function TableView({ listData }: { listData: any }) {
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Report Komentar"
|
||||
color={AdminColor.yellow}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Cari postingan"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"yellow.4"}
|
||||
p={"xs"}
|
||||
@@ -173,7 +189,7 @@ function TableView({ listData }: { listData: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
{isEmpty(data) ? (
|
||||
<ComponentAdminGlobal_IsEmptyData />
|
||||
|
||||
@@ -28,6 +28,8 @@ import { useState } from "react";
|
||||
import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data";
|
||||
import ComponentAdminForum_ButtonDeletePosting from "../component/button_delete";
|
||||
import adminForum_funGetAllReportPosting from "../fun/get/get_all_report_posting";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminForum_TableReportPosting({
|
||||
listData,
|
||||
@@ -165,7 +167,22 @@ function TableView({ listData }: { listData: any }) {
|
||||
return (
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Report Posting"
|
||||
color={AdminColor.orange}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Cari postingan"
|
||||
onChange={(val) => {
|
||||
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"orange.4"}
|
||||
p={"xs"}
|
||||
@@ -183,7 +200,7 @@ function TableView({ listData }: { listData: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
{isEmpty(data) ? (
|
||||
<ComponentAdminGlobal_IsEmptyData />
|
||||
|
||||
@@ -24,6 +24,7 @@ import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data"
|
||||
import { adminInvestasi_funGetAllPublish } from "../fun/get/get_all_publish";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { MainColor } from "@/app_modules/_global/color";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function Admin_TablePublishInvestasi({
|
||||
dataInvestsi,
|
||||
@@ -132,7 +133,7 @@ function TableView({ listData }: { listData: any }) {
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Publish"
|
||||
color={MainColor.green}
|
||||
color={AdminColor.green}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
|
||||
@@ -30,6 +30,7 @@ import { adminInvestasi_funGetAllReject } from "../fun/get/get_all_reject";
|
||||
import { RouterAdminInvestasi } from "@/app/lib/router_admin/router_admin_investasi";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { MainColor } from "@/app_modules/_global/color";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function Admin_TableRejectInvestasi({
|
||||
dataInvestsi,
|
||||
@@ -192,7 +193,7 @@ function TableView({ listData }: { listData: any }) {
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Reject"
|
||||
color={MainColor.red}
|
||||
color={AdminColor.red}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
|
||||
@@ -29,6 +29,7 @@ import ComponentAdminGlobal_IsEmptyData from "../../_admin_global/is_empty_data"
|
||||
import ComponentAdminGlobal_TampilanRupiahDonasi from "../../_admin_global/tampilan_rupiah";
|
||||
import { adminInvestasi_funGetAllReview } from "../fun/get/get_all_review";
|
||||
import { ComponentAdminGlobal_TitlePage } from "../../_admin_global/_component";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function Admin_TableReviewInvestasi({
|
||||
dataInvestsi,
|
||||
@@ -154,7 +155,7 @@ function TableView({ listData }: { listData: any }) {
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Review"
|
||||
color={MainColor.orange}
|
||||
color={AdminColor.orange}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
|
||||
@@ -44,6 +44,7 @@ import { AdminJob_funEditStatusPublishById } from "../fun/edit/fun_edit_status_p
|
||||
import adminJob_getListReview from "../fun/get/get_list_review";
|
||||
import { useAtom } from "jotai";
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminJob_ViewTavleReview({
|
||||
listReview,
|
||||
@@ -275,7 +276,7 @@ export default function AdminJob_ViewTavleReview({
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Review"
|
||||
color="orange.4"
|
||||
color={AdminColor.orange}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
|
||||
@@ -22,6 +22,7 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import adminJob_getListPublish from "../../fun/get/get_list_publish";
|
||||
import { RouterAdminGlobal } from "@/app/lib";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminJob_TablePublish({
|
||||
dataPublish,
|
||||
@@ -152,7 +153,7 @@ function TableStatus({ dataPublish }: { dataPublish: any }) {
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Publish"
|
||||
color="green.4"
|
||||
color={AdminColor.green}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
|
||||
@@ -30,6 +30,7 @@ import { useState } from "react";
|
||||
import { WibuRealtime } from "wibu-pkg";
|
||||
import { AdminJob_funEditCatatanById } from "../../fun/edit/fun_edit_catatan_by_id";
|
||||
import adminJob_getListReject from "../../fun/get/get_list_reject";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminJob_TableReject({
|
||||
dataReject,
|
||||
@@ -231,7 +232,7 @@ function TableStatus({ listReject }: { listReject: any }) {
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Reject"
|
||||
color="red.4"
|
||||
color={AdminColor.red}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
|
||||
@@ -6,7 +6,6 @@ import {
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
Group,
|
||||
Modal,
|
||||
Pagination,
|
||||
Paper,
|
||||
@@ -15,20 +14,18 @@ import {
|
||||
Stack,
|
||||
Table,
|
||||
Text,
|
||||
TextInput,
|
||||
Title,
|
||||
TextInput
|
||||
} from "@mantine/core";
|
||||
import { useDisclosure } from "@mantine/hooks";
|
||||
import { IconEyeCheck, IconSearch } from "@tabler/icons-react";
|
||||
import _ from "lodash";
|
||||
import { IconReportAnalytics, IconSearch } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
|
||||
import { ComponentAdminGlobal_TitlePage } from "@/app_modules/admin/_admin_global/_component";
|
||||
import { useState } from "react";
|
||||
import ComponentAdminVote_DetailHasil from "../../component/detail_hasil";
|
||||
import { adminVote_funGetListRiwayat } from "../../fun";
|
||||
import { AdminVote_getHasilById } from "../../fun/get/get_hasil_by_id";
|
||||
import { AdminVote_getListKontributorById } from "../../fun/get/get_list_kontributor_by_id";
|
||||
import { adminVote_funGetListRiwayat } from "../../fun";
|
||||
import { IconCircleCheckFilled } from "@tabler/icons-react";
|
||||
|
||||
export default function AdminVote_Riwayat({
|
||||
dataVote,
|
||||
@@ -88,7 +85,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
}
|
||||
radius={"xl"}
|
||||
color="green"
|
||||
leftIcon={<IconCircleCheckFilled />}
|
||||
leftIcon={<IconReportAnalytics />}
|
||||
onClick={async () => {
|
||||
setVoteId(e?.id);
|
||||
setLoading(true);
|
||||
@@ -144,7 +141,21 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Riwayat"
|
||||
color="gray.4"
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Masukan judul"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"gray.4"}
|
||||
p={"xs"}
|
||||
@@ -159,7 +170,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
<ScrollArea w={"100%"} h={"90%"}>
|
||||
|
||||
@@ -26,6 +26,9 @@ import ComponentAdminVote_DetailHasil from "../../component/detail_hasil";
|
||||
import { AdminVote_getHasilById } from "../../fun/get/get_hasil_by_id";
|
||||
import { AdminVote_getListKontributorById } from "../../fun/get/get_list_kontributor_by_id";
|
||||
import { adminVote_funGetListPublish } from "../../fun/get/status/get_list_publish";
|
||||
import { ComponentAdminGlobal_TitlePage } from "@/app_modules/admin/_admin_global/_component";
|
||||
import { MainColor } from "@/app_modules/_global/color";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminVote_TablePublish({
|
||||
dataVote,
|
||||
@@ -141,7 +144,21 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Publish"
|
||||
color={AdminColor.green}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Masukan judul"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"green.4"}
|
||||
p={"xs"}
|
||||
@@ -156,7 +173,7 @@ function TableStatus({ listPublish }: { listPublish: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
<ScrollArea w={"100%"} h={"90%"}>
|
||||
|
||||
@@ -27,6 +27,9 @@ import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { adminVote_funGetListReject } from "../../fun";
|
||||
import { AdminVote_funEditCatatanRejectById } from "../../fun/edit/fun_edit_catatan_reject_by_id";
|
||||
import { ComponentAdminGlobal_TitlePage } from "@/app_modules/admin/_admin_global/_component";
|
||||
import { MainColor } from "@/app_modules/_global/color";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminVote_TableReject({ dataVote }: { dataVote: any }) {
|
||||
return (
|
||||
@@ -169,7 +172,21 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Reject"
|
||||
color={AdminColor.red}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Masukan judul"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"red.4"}
|
||||
p={"xs"}
|
||||
@@ -184,7 +201,7 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
<ScrollArea w={"100%"} h={"90%"}>
|
||||
|
||||
@@ -33,7 +33,7 @@ import {
|
||||
gs_adminVoting_triggerReview,
|
||||
IRealtimeData,
|
||||
} from "@/app/lib/global_state";
|
||||
import { AccentColor } from "@/app_modules/_global/color";
|
||||
import { AccentColor, MainColor } from "@/app_modules/_global/color";
|
||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/_global/notif_global/notifikasi_berhasil";
|
||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/_global/notif_global/notifikasi_gagal";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global/notifikasi_peringatan";
|
||||
@@ -46,6 +46,8 @@ import { WibuRealtime } from "wibu-pkg";
|
||||
import { adminVote_funGetListReview } from "../../fun";
|
||||
import { AdminVote_funEditStatusPublishById } from "../../fun/edit/fun_edit_status_publish_by_id";
|
||||
import { AdminEvent_funEditCatatanById } from "../../fun/edit/fun_edit_status_reject_by_id";
|
||||
import { ComponentAdminGlobal_TitlePage } from "@/app_modules/admin/_admin_global/_component";
|
||||
import { AdminColor } from "@/app_modules/_global/color/color_pallet";
|
||||
|
||||
export default function AdminVote_TableReview({
|
||||
listVote,
|
||||
@@ -63,7 +65,8 @@ export default function AdminVote_TableReview({
|
||||
}
|
||||
|
||||
function TableStatus({ listData }: { listData: any }) {
|
||||
const [opened, { open, close }] = useDisclosure(false);
|
||||
const [openedReject, { open: openReject, close: closeReject }] = useDisclosure(false);
|
||||
const [openedPublish, { open: openPublish, close: closePublish }] = useDisclosure(false);
|
||||
const [data, setData] = useState<MODEL_VOTING[]>(listData.data);
|
||||
const [isNPage, setNPage] = useState(listData.nPage);
|
||||
const [votingId, setVotingId] = useState("");
|
||||
@@ -160,25 +163,28 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
<td>
|
||||
<Stack align="center">
|
||||
<Button
|
||||
loaderPosition="center"
|
||||
loading={
|
||||
e?.id === votingId ? (isLoadingPublish ? true : false) : false
|
||||
}
|
||||
// loaderPosition="center"
|
||||
// loading={
|
||||
// e?.id === votingId ? (isLoadingPublish ? true : false) : false
|
||||
// }
|
||||
w={120}
|
||||
color={"green"}
|
||||
leftIcon={<IconCircleCheck />}
|
||||
radius={"xl"}
|
||||
onClick={() =>
|
||||
onPublish({
|
||||
voteId: e.id,
|
||||
awalVote: e.awalVote,
|
||||
setLoadingPublish: setLoadingPublish,
|
||||
setVotingId: setVotingId,
|
||||
setData(val) {
|
||||
setData(val.data);
|
||||
setNPage(val.nPage);
|
||||
},
|
||||
})
|
||||
onClick={() => {
|
||||
openPublish();
|
||||
setVotingId(e.id);
|
||||
}
|
||||
// onPublish({
|
||||
// // voteId: e.id,
|
||||
// // awalVote: e.awalVote,
|
||||
// // setLoadingPublish: setLoadingPublish,
|
||||
// // setVotingId: setVotingId,
|
||||
// // setData(val) {
|
||||
// // setData(val.data);
|
||||
// // setNPage(val.nPage);
|
||||
// // },
|
||||
// })
|
||||
}
|
||||
>
|
||||
Publish
|
||||
@@ -189,7 +195,7 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
leftIcon={<IconBan />}
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
open();
|
||||
openReject();
|
||||
setVotingId(e.id);
|
||||
}}
|
||||
>
|
||||
@@ -204,7 +210,21 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
<>
|
||||
<Stack spacing={"xs"} h={"100%"}>
|
||||
{/* <pre>{JSON.stringify(listUser, null, 2)}</pre> */}
|
||||
<Group
|
||||
<ComponentAdminGlobal_TitlePage
|
||||
name="Review"
|
||||
color={AdminColor.orange}
|
||||
component={
|
||||
<TextInput
|
||||
icon={<IconSearch size={20} />}
|
||||
radius={"xl"}
|
||||
placeholder="Masukan judul"
|
||||
onChange={(val) => {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
{/* <Group
|
||||
position="apart"
|
||||
bg={"orange.4"}
|
||||
p={"xs"}
|
||||
@@ -219,7 +239,7 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
onSearch(val.currentTarget.value);
|
||||
}}
|
||||
/>
|
||||
</Group>
|
||||
</Group> */}
|
||||
|
||||
<Paper p={"md"} withBorder shadow="lg" h={"80vh"}>
|
||||
{isShowReload && (
|
||||
@@ -296,8 +316,8 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
</Stack>
|
||||
|
||||
<Modal
|
||||
opened={opened}
|
||||
onClose={close}
|
||||
opened={openedReject}
|
||||
onClose={closeReject}
|
||||
centered
|
||||
withCloseButton={false}
|
||||
size={"md"}
|
||||
@@ -315,7 +335,7 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
}}
|
||||
/>
|
||||
<Group position="right">
|
||||
<Button radius={"xl"} onClick={() => close()}>
|
||||
<Button radius={"xl"} onClick={() => closeReject()}>
|
||||
Batal
|
||||
</Button>
|
||||
<Button
|
||||
@@ -331,13 +351,61 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
setNPage(val.nPage);
|
||||
},
|
||||
close: () => {
|
||||
close();
|
||||
closeReject();
|
||||
},
|
||||
setSaveLoading(val) {
|
||||
setSaveLoading(val);
|
||||
},
|
||||
});
|
||||
}}
|
||||
style={{
|
||||
backgroundColor: MainColor.green
|
||||
}}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
</Group>
|
||||
</Stack>
|
||||
</Modal>
|
||||
<Modal
|
||||
opened={openedPublish}
|
||||
onClose={closePublish}
|
||||
centered
|
||||
withCloseButton={false}
|
||||
size={"md"}
|
||||
>
|
||||
<Stack align="center">
|
||||
<Title order={5}>Apakah anda yakin ingin mempublish vote ini?</Title>
|
||||
<Group position="center">
|
||||
<Button radius={"xl"} onClick={() => closePublish()}>
|
||||
Batal
|
||||
</Button>
|
||||
<Button
|
||||
loaderPosition="center"
|
||||
loading={isLoadingPublish ? true : false}
|
||||
radius={"xl"}
|
||||
onClick={() => {
|
||||
onPublish({
|
||||
awalVote: data[0].awalVote,
|
||||
voteId: votingId,
|
||||
setData(val) {
|
||||
setData(val.data);
|
||||
setNPage(val.nPage);
|
||||
},
|
||||
close: () => {
|
||||
closePublish();
|
||||
},
|
||||
setLoadingPublish: (val) => {
|
||||
setLoadingPublish(val);
|
||||
},
|
||||
setVotingId: (val) => {
|
||||
setVotingId(val);
|
||||
},
|
||||
});
|
||||
}}
|
||||
style={{
|
||||
backgroundColor: MainColor.green,
|
||||
}}
|
||||
>
|
||||
Simpan
|
||||
</Button>
|
||||
@@ -349,12 +417,14 @@ function TableStatus({ listData }: { listData: any }) {
|
||||
}
|
||||
|
||||
async function onPublish({
|
||||
close,
|
||||
voteId,
|
||||
setData,
|
||||
awalVote,
|
||||
setLoadingPublish,
|
||||
setVotingId,
|
||||
}: {
|
||||
close: any,
|
||||
voteId: string;
|
||||
setData: (val: { data: any[]; nPage: number }) => void;
|
||||
awalVote: Date;
|
||||
@@ -473,4 +543,4 @@ async function onReject({
|
||||
} else {
|
||||
ComponentGlobal_NotifikasiGagal(res.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user