Fix: admin donasi
Deskripsi: - Fix image dari server wibu ## No Isuue
This commit is contained in:
@@ -1,22 +1,23 @@
|
||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import {
|
||||
Paper,
|
||||
Stack,
|
||||
Title,
|
||||
Spoiler,
|
||||
Center,
|
||||
Button,
|
||||
Center,
|
||||
Paper,
|
||||
Spoiler,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { IconImageInPicture } from "@tabler/icons-react";
|
||||
import moment from "moment";
|
||||
|
||||
import { MODEL_DONASI_PENCAIRAN_DANA } from "../../model/interface";
|
||||
import { RouterImagePreview } from "@/app/lib";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import { MODEL_DONASI_PENCAIRAN_DANA } from "../../model/interface";
|
||||
|
||||
export function ComponentDonasi_CardPencairanDana({
|
||||
data,
|
||||
@@ -24,6 +25,7 @@ export function ComponentDonasi_CardPencairanDana({
|
||||
data: MODEL_DONASI_PENCAIRAN_DANA;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [isLoading, setLoading] = useState(false);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -48,12 +50,13 @@ export function ComponentDonasi_CardPencairanDana({
|
||||
</Spoiler>
|
||||
<Center>
|
||||
<Button
|
||||
loaderPosition="center"
|
||||
loading={isLoading}
|
||||
radius={"xl"}
|
||||
leftIcon={<IconImageInPicture />}
|
||||
onClick={() => {
|
||||
// open();
|
||||
// setIdGambar(e.imagesId);
|
||||
router.push(RouterDonasi.bukti_transfer + data.imagesId, {
|
||||
setLoading(true);
|
||||
router.push(RouterImagePreview.main({ id: data.imageId }), {
|
||||
scroll: false,
|
||||
});
|
||||
}}
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
"use client";
|
||||
|
||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||
import { MainColor } from "@/app_modules/_global/color/color_pallet";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
ComponentGlobal_CardStyles,
|
||||
ComponentGlobal_LoadImageLandscape,
|
||||
} from "@/app_modules/_global/component";
|
||||
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global";
|
||||
import {
|
||||
AspectRatio,
|
||||
Divider,
|
||||
Grid,
|
||||
Group,
|
||||
Image,
|
||||
Progress,
|
||||
Stack,
|
||||
Text,
|
||||
@@ -29,11 +29,6 @@ import { Donasi_findDonaturByTokenId } from "../../fun/get/get_donatur_by_token_
|
||||
import { MODEL_DONASI } from "../../model/interface";
|
||||
import ComponentDonasi_TampilanHitungMundur from "../tampilan_hitung_mundur";
|
||||
import TampilanRupiahDonasi from "../tampilan_rupiah";
|
||||
import {
|
||||
ComponentGlobal_CardStyles,
|
||||
ComponentGlobal_LoadImageLandscape,
|
||||
} from "@/app_modules/_global/component";
|
||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/_global/notif_global";
|
||||
|
||||
export function ComponentDonasi_DetailDataMain({
|
||||
donasi,
|
||||
@@ -70,7 +65,7 @@ export function ComponentDonasi_DetailDataMain({
|
||||
<TampilanRupiahDonasi nominal={+donasi?.terkumpul} />
|
||||
</Title>
|
||||
<Group>
|
||||
<Text fz={10}>Dari total</Text>{" "}
|
||||
<Text fz={10}>Dari target</Text>{" "}
|
||||
<TampilanRupiahDonasi
|
||||
nominal={+donasi?.target}
|
||||
fontSize={10}
|
||||
|
||||
@@ -1,37 +1,14 @@
|
||||
"use client";
|
||||
|
||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||
import {
|
||||
AccentColor,
|
||||
MainColor,
|
||||
} from "@/app_modules/_global/color/color_pallet";
|
||||
import ComponentGlobal_BoxInformation from "@/app_modules/_global/component/box_information";
|
||||
import ComponentGlobal_IsEmptyData from "@/app_modules/_global/component/is_empty_data";
|
||||
import { ComponentDonasi_InformasiPencairanDana } from "@/app_modules/donasi/component/card_view/box_informasi_pencarian_dana";
|
||||
import { ComponentDonasi_BoxPencariranDana } from "@/app_modules/donasi/component/card_view/box_pencairan_dana";
|
||||
import TampilanRupiahDonasi from "@/app_modules/donasi/component/tampilan_rupiah";
|
||||
import {
|
||||
MODEL_DONASI,
|
||||
MODEL_DONASI_PENCAIRAN_DANA,
|
||||
} from "@/app_modules/donasi/model/interface";
|
||||
import {
|
||||
AspectRatio,
|
||||
Button,
|
||||
Center,
|
||||
Grid,
|
||||
Image,
|
||||
Modal,
|
||||
Paper,
|
||||
Spoiler,
|
||||
Stack,
|
||||
Text,
|
||||
Title,
|
||||
Stack
|
||||
} from "@mantine/core";
|
||||
import { useDisclosure } from "@mantine/hooks";
|
||||
import { IconImageInPicture } from "@tabler/icons-react";
|
||||
import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function PencairanDanaDonasi({
|
||||
@@ -49,7 +26,10 @@ export default function PencairanDanaDonasi({
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentDonasi_BoxPencariranDana akumulasi={akumulasi} />
|
||||
<ComponentDonasi_InformasiPencairanDana donasiId={donasiId} listPD={listPD} />
|
||||
<ComponentDonasi_InformasiPencairanDana
|
||||
donasiId={donasiId}
|
||||
listPD={listPD}
|
||||
/>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -144,4 +144,5 @@ export interface MODEL_DONASI_PENCAIRAN_DANA {
|
||||
donasiId: string;
|
||||
imagesId: string
|
||||
Donasi: MODEL_DONASI;
|
||||
imageId: string
|
||||
}
|
||||
|
||||
@@ -300,6 +300,8 @@ export default function Donasi_InvoiceProses({
|
||||
|
||||
{file !== null ? (
|
||||
<Button
|
||||
loaderPosition="center"
|
||||
loading={isLoading}
|
||||
radius={"xl"}
|
||||
bg={MainColor.yellow}
|
||||
color="yellow"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { ActionIcon, AppShell, Group, Header, Title } from "@mantine/core";
|
||||
import React from "react";
|
||||
import React, { useState } from "react";
|
||||
import ComponentDonasi_HeaderTamplate from "../../component/header_tamplate";
|
||||
import { IconX } from "@tabler/icons-react";
|
||||
import { useRouter } from "next/navigation";
|
||||
@@ -11,6 +11,7 @@ import { gs_donasi_hot_menu } from "../../global_state";
|
||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/_global/component_layout_tamplate";
|
||||
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
|
||||
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
|
||||
import ComponentGlobal_Loader from "@/app_modules/_global/component/loader";
|
||||
|
||||
export default function LayoutDonasi_ProsesTransaksi({
|
||||
children,
|
||||
@@ -18,8 +19,10 @@ export default function LayoutDonasi_ProsesTransaksi({
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
const [donasiHotMenu, setDonasiHotMenu] = useAtom(gs_donasi_hot_menu);
|
||||
async function onClick() {
|
||||
setIsLoading(true);
|
||||
setDonasiHotMenu(2);
|
||||
router.push(RouterDonasi.main_donasi_saya);
|
||||
}
|
||||
@@ -31,20 +34,10 @@ export default function LayoutDonasi_ProsesTransaksi({
|
||||
title="Proses Transaksi"
|
||||
customButtonLeft={
|
||||
<ActionIcon variant="transparent" onClick={() => onClick()}>
|
||||
<IconX />
|
||||
{isLoading ? <ComponentGlobal_Loader /> : <IconX />}
|
||||
</ActionIcon>
|
||||
}
|
||||
/>
|
||||
|
||||
// <Header height={50} sx={{ borderStyle: "none" }}>
|
||||
// <Group h={50} position="apart" px={"md"}>
|
||||
// <ActionIcon variant="transparent" onClick={() => onClick()}>
|
||||
// <IconX />
|
||||
// </ActionIcon>
|
||||
// <Title order={5}>Proses Transaksi</Title>
|
||||
// <ActionIcon disabled variant="transparent"></ActionIcon>
|
||||
// </Group>
|
||||
// </Header>
|
||||
}
|
||||
>
|
||||
{children}
|
||||
|
||||
Reference in New Issue
Block a user