QC Investasi
# fix Tampilan admin investasi Tampilan admin donasi ## No issuee
This commit is contained in:
@@ -20,6 +20,8 @@ import { MODEL_DONASI } from "../model/interface";
|
||||
import { useViewportSize } from "@mantine/hooks";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useState } from "react";
|
||||
import _ from "lodash";
|
||||
import ComponentDonasi_IsEmptyData from "./is_empty_data";
|
||||
|
||||
export default function ComponentDonasi_BoxPublish({
|
||||
dataDonasi,
|
||||
@@ -33,62 +35,66 @@ export default function ComponentDonasi_BoxPublish({
|
||||
const [donasi, setDonasi] = useState(dataDonasi);
|
||||
return (
|
||||
<>
|
||||
<SimpleGrid
|
||||
cols={4}
|
||||
spacing="lg"
|
||||
breakpoints={[
|
||||
{ maxWidth: "62rem", cols: 3, spacing: "md" },
|
||||
{ maxWidth: "48rem", cols: 2, spacing: "sm" },
|
||||
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
|
||||
]}
|
||||
>
|
||||
{donasi.map((e, i) => (
|
||||
<Box
|
||||
key={i}
|
||||
onClick={() => {
|
||||
router.push(path + `${e.id}`);
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Grid>
|
||||
<Grid.Col span={7}>
|
||||
<AspectRatio ratio={16 / 9}>
|
||||
<Paper radius={"md"}>
|
||||
<Image
|
||||
alt="Foto"
|
||||
src={RouterDonasi.api_gambar + `${e.imagesId}`}
|
||||
radius={"md"}
|
||||
/>
|
||||
</Paper>
|
||||
</AspectRatio>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={5}>
|
||||
<Stack spacing={"xs"}>
|
||||
<Stack spacing={0}>
|
||||
<Text fz={"sm"} fw={"bold"} lineClamp={2}>
|
||||
{e.title}
|
||||
</Text>
|
||||
<ComponentDonasi_TampilanHitungMundur
|
||||
durasi={e.DonasiMaster_Durasi.name}
|
||||
publishTime={e.publishTime}
|
||||
textSize={10}
|
||||
/>
|
||||
{_.isEmpty(dataDonasi) ? (
|
||||
<ComponentDonasi_IsEmptyData text="Tidak ada data" />
|
||||
) : (
|
||||
<SimpleGrid
|
||||
cols={4}
|
||||
spacing="lg"
|
||||
breakpoints={[
|
||||
{ maxWidth: "62rem", cols: 3, spacing: "md" },
|
||||
{ maxWidth: "48rem", cols: 2, spacing: "sm" },
|
||||
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
|
||||
]}
|
||||
>
|
||||
{donasi.map((e, i) => (
|
||||
<Box
|
||||
key={i}
|
||||
onClick={() => {
|
||||
router.push(path + `${e.id}`);
|
||||
}}
|
||||
>
|
||||
<Stack>
|
||||
<Grid>
|
||||
<Grid.Col span={7}>
|
||||
<AspectRatio ratio={16 / 9}>
|
||||
<Paper radius={"md"}>
|
||||
<Image
|
||||
alt="Foto"
|
||||
src={RouterDonasi.api_gambar + `${e.imagesId}`}
|
||||
radius={"md"}
|
||||
/>
|
||||
</Paper>
|
||||
</AspectRatio>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={5}>
|
||||
<Stack spacing={"xs"}>
|
||||
<Stack spacing={0}>
|
||||
<Text fz={"sm"} fw={"bold"} lineClamp={2}>
|
||||
{e.title}
|
||||
</Text>
|
||||
<ComponentDonasi_TampilanHitungMundur
|
||||
durasi={e.DonasiMaster_Durasi.name}
|
||||
publishTime={e.publishTime}
|
||||
textSize={10}
|
||||
/>
|
||||
</Stack>
|
||||
<Progress value={+e.progres} color="orange" />
|
||||
<Stack spacing={0}>
|
||||
<Text fz={"sm"}>Terkumpul</Text>
|
||||
<Text fz={"sm"} fw={"bold"} c={"orange"} truncate>
|
||||
<TampilanRupiahDonasi nominal={+e.terkumpul} />
|
||||
</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
<Progress value={+e.progres} color="orange" />
|
||||
<Stack spacing={0}>
|
||||
<Text fz={"sm"}>Terkumpul</Text>
|
||||
<Text fz={"sm"} fw={"bold"} c={"orange"} truncate>
|
||||
<TampilanRupiahDonasi nominal={+e.terkumpul} />
|
||||
</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
{width > 575 ? "" : <Divider />}
|
||||
</Stack>
|
||||
</Box>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
{width > 575 ? "" : <Divider />}
|
||||
</Stack>
|
||||
</Box>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
)}
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user