QC Investasi
# fix Tampilan admin investasi Tampilan admin donasi ## No issuee
This commit is contained in:
@@ -15,11 +15,16 @@ export default function CeritaPenggalangDonasi({
|
||||
return (
|
||||
<>
|
||||
{/* <pre>{JSON.stringify(data.imageCeritaDonasi, null, 2)}</pre> */}
|
||||
<Stack>
|
||||
{moment(data.createdAt).format("ll")}
|
||||
<Stack px={"xs"}>
|
||||
<Text>
|
||||
{new Intl.DateTimeFormat("id-ID", { dateStyle: "full" }).format(
|
||||
data.createdAt
|
||||
)}
|
||||
</Text>
|
||||
<Text fw={"bold"}> #HaloOrangBaik</Text>
|
||||
<Text>{data.pembukaan}</Text>
|
||||
<Image
|
||||
radius={"sm"}
|
||||
alt="Foto"
|
||||
src={RouterDonasi.api_image_cerita + `${data.imageCeritaDonasi.url}`}
|
||||
/>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import ComponentDonasi_IsEmptyData from "@/app_modules/donasi/component/is_empty_data";
|
||||
import TampilanRupiahDonasi from "@/app_modules/donasi/component/tampilan_rupiah";
|
||||
import { MODEL_DONASI_INVOICE } from "@/app_modules/donasi/model/interface";
|
||||
import {
|
||||
@@ -14,12 +15,18 @@ import {
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { IconMoodSmile, IconMoodSmileBeam } from "@tabler/icons-react";
|
||||
import { size } from "lodash";
|
||||
import _, { size } from "lodash";
|
||||
import moment from "moment";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function DonaturDonasi({listDonatur}: {listDonatur: MODEL_DONASI_INVOICE[]}) {
|
||||
const [donatur, setDonatur] = useState(listDonatur)
|
||||
export default function DonaturDonasi({
|
||||
listDonatur,
|
||||
}: {
|
||||
listDonatur: MODEL_DONASI_INVOICE[];
|
||||
}) {
|
||||
const [donatur, setDonatur] = useState(listDonatur);
|
||||
if (_.isEmpty(donatur)) return <ComponentDonasi_IsEmptyData />;
|
||||
|
||||
return (
|
||||
<>
|
||||
<SimpleGrid
|
||||
@@ -31,31 +38,30 @@ export default function DonaturDonasi({listDonatur}: {listDonatur: MODEL_DONASI_
|
||||
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
|
||||
]}
|
||||
>
|
||||
{donatur
|
||||
.map((e, i) => (
|
||||
<Paper key={i} bg={"gray.1"} p={"sm"}>
|
||||
<Grid>
|
||||
<Grid.Col span={3}>
|
||||
<Center h={"100%"}>
|
||||
{/* <Avatar variant="filled" radius={"xl"} size={"md"} /> */}
|
||||
<IconMoodSmileBeam size={50}/>
|
||||
</Center>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={9}>
|
||||
<Stack spacing={0}>
|
||||
<Title order={5}>{e.Author.username}</Title>
|
||||
<Group spacing={"xs"}>
|
||||
<Text fz={"xs"}>Berdonasi sebesar</Text>
|
||||
<Text truncate fw={"bold"}>
|
||||
<TampilanRupiahDonasi nominal={+e.nominal}/>
|
||||
</Text>
|
||||
</Group>
|
||||
<Text fz={"xs"}>{moment(e.createdAt).format("ll")}</Text>
|
||||
</Stack>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Paper>
|
||||
))}
|
||||
{donatur.map((e, i) => (
|
||||
<Paper key={i} bg={"gray.1"} p={"sm"}>
|
||||
<Grid>
|
||||
<Grid.Col span={3}>
|
||||
<Center h={"100%"}>
|
||||
{/* <Avatar variant="filled" radius={"xl"} size={"md"} /> */}
|
||||
<IconMoodSmileBeam size={50} />
|
||||
</Center>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={9}>
|
||||
<Stack spacing={0}>
|
||||
<Title order={5}>{e.Author.username}</Title>
|
||||
<Group spacing={"xs"}>
|
||||
<Text fz={"xs"}>Berdonasi sebesar</Text>
|
||||
<Text truncate fw={"bold"}>
|
||||
<TampilanRupiahDonasi nominal={+e.nominal} />
|
||||
</Text>
|
||||
</Group>
|
||||
<Text fz={"xs"}>{moment(e.createdAt).format("ll")}</Text>
|
||||
</Stack>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
</Paper>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||
import ComponentDonasi_ListKabar from "@/app_modules/donasi/component/detail_main/list_kabar";
|
||||
import ComponentDonasi_IsEmptyData from "@/app_modules/donasi/component/is_empty_data";
|
||||
import { MODEL_DONASI_KABAR } from "@/app_modules/donasi/model/interface";
|
||||
import {
|
||||
ActionIcon,
|
||||
@@ -16,6 +17,7 @@ import {
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import { IconCircleChevronRight } from "@tabler/icons-react";
|
||||
import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
@@ -27,6 +29,9 @@ export default function KabarDonasi({
|
||||
}) {
|
||||
const router = useRouter();
|
||||
const [kabar, setKabar] = useState(listKabar);
|
||||
|
||||
if (_.isEmpty(kabar)) return <ComponentDonasi_IsEmptyData />;
|
||||
|
||||
return (
|
||||
<>
|
||||
<SimpleGrid
|
||||
@@ -39,9 +44,12 @@ export default function KabarDonasi({
|
||||
]}
|
||||
>
|
||||
{kabar.map((e, i) => (
|
||||
<Box key={i}>
|
||||
<ComponentDonasi_ListKabar kabar={e} route={RouterDonasi.detail_kabar} />
|
||||
</Box>
|
||||
<Box key={i}>
|
||||
<ComponentDonasi_ListKabar
|
||||
kabar={e}
|
||||
route={RouterDonasi.detail_kabar}
|
||||
/>
|
||||
</Box>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||
import ComponentDonasi_BoxPublish from "@/app_modules/donasi/component/box_publish";
|
||||
import TampilanRupiahDonasi from "@/app_modules/donasi/component/tampilan_rupiah";
|
||||
import {
|
||||
@@ -45,7 +46,7 @@ export default function PenggalangDanaDonasi({
|
||||
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<Stack >
|
||||
<InformasiPenggalang value={value as any} />
|
||||
<ComponentDonasi_BoxPublish
|
||||
dataDonasi={value.Donasi}
|
||||
@@ -59,6 +60,7 @@ export default function PenggalangDanaDonasi({
|
||||
function InformasiPenggalang({ value }: { value: MODEL_USER }) {
|
||||
return (
|
||||
<>
|
||||
{/* <pre>{JSON.stringify(value, null, 2)}</pre> */}
|
||||
<Paper radius={"md"}>
|
||||
<Stack
|
||||
bg={"gray.1"}
|
||||
@@ -75,10 +77,13 @@ function InformasiPenggalang({ value }: { value: MODEL_USER }) {
|
||||
>
|
||||
<Center h={"100%"}>
|
||||
<Image
|
||||
radius={"100%"}
|
||||
width={100}
|
||||
height={100}
|
||||
alt="Foto"
|
||||
src={"/aset/avatar.png"}
|
||||
src={
|
||||
RouterProfile.api_foto_profile + value?.Profile?.imagesId
|
||||
}
|
||||
/>
|
||||
</Center>
|
||||
</Paper>
|
||||
|
||||
Reference in New Issue
Block a user