QC Investasi
# fix Tampilan admin investasi Tampilan admin donasi ## No issuee
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
import { useRouter } from "next/navigation";
|
||||
import { MODEL_Investasi } from "../model/model_investasi";
|
||||
import _ from "lodash";
|
||||
import ComponentInvestasi_IsEmptyData from "../component/is_empty_data";
|
||||
|
||||
export default function Draft({ data }: { data: MODEL_Investasi[] }) {
|
||||
const router = useRouter();
|
||||
@@ -27,7 +28,7 @@ export default function Draft({ data }: { data: MODEL_Investasi[] }) {
|
||||
if (_.isEmpty(data))
|
||||
return (
|
||||
<>
|
||||
<Center h={"50vh"}>Tidak ada Draft</Center>
|
||||
<ComponentInvestasi_IsEmptyData text="Tidak ada data" />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -40,7 +41,6 @@ export default function Draft({ data }: { data: MODEL_Investasi[] }) {
|
||||
p={"xs"}
|
||||
key={e.id}
|
||||
mb={"md"}
|
||||
bg={"yellow.1"}
|
||||
withBorder
|
||||
onClick={() => router.push(RouterInvestasi.detail_draft + `${e.id}`)}
|
||||
>
|
||||
|
||||
@@ -25,6 +25,7 @@ import _ from "lodash";
|
||||
import moment from "moment";
|
||||
import { useState } from "react";
|
||||
import { IconChecklist, IconCircleCheck } from "@tabler/icons-react";
|
||||
import ComponentInvestasi_IsEmptyData from "../component/is_empty_data";
|
||||
|
||||
export default function Publish({ data }: { data: MODEL_Investasi[] }) {
|
||||
const router = useRouter();
|
||||
@@ -33,7 +34,7 @@ export default function Publish({ data }: { data: MODEL_Investasi[] }) {
|
||||
if (_.isEmpty(data))
|
||||
return (
|
||||
<>
|
||||
<Center h={"50vh"}>Tidak ada Publish</Center>
|
||||
<ComponentInvestasi_IsEmptyData text="Tidak ada data" />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -45,7 +46,6 @@ export default function Publish({ data }: { data: MODEL_Investasi[] }) {
|
||||
withBorder
|
||||
mb={"md"}
|
||||
p={"xs"}
|
||||
bg={"green.1"}
|
||||
onClick={() =>
|
||||
router.push(RouterInvestasi.detail_publish + `${e.id}`)
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@ import {
|
||||
} from "../model/model_investasi";
|
||||
import { useState } from "react";
|
||||
import _ from "lodash";
|
||||
import ComponentInvestasi_IsEmptyData from "../component/is_empty_data";
|
||||
|
||||
export default function Reject({ data }: { data: MODEL_Investasi[] }) {
|
||||
const [investasi, setInvestasi] = useState(data);
|
||||
@@ -30,7 +31,7 @@ export default function Reject({ data }: { data: MODEL_Investasi[] }) {
|
||||
if (_.isEmpty(data))
|
||||
return (
|
||||
<>
|
||||
<Center h={"50vh"}>Tidak ada Reject</Center>
|
||||
<ComponentInvestasi_IsEmptyData text="Tidak ada data" />
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -43,7 +44,6 @@ export default function Reject({ data }: { data: MODEL_Investasi[] }) {
|
||||
withBorder
|
||||
mb={"md"}
|
||||
p={"xs"}
|
||||
bg={"red.1"}
|
||||
onClick={() => router.push(RouterInvestasi.detail_reject + `${e.id}`)}
|
||||
>
|
||||
<Grid>
|
||||
|
||||
@@ -21,6 +21,7 @@ import {
|
||||
MODEL_Investasi,
|
||||
} from "../model/model_investasi";
|
||||
import _ from "lodash";
|
||||
import ComponentInvestasi_IsEmptyData from "../component/is_empty_data";
|
||||
|
||||
export default function Review({ data }: { data: MODEL_Investasi[] }) {
|
||||
const router = useRouter();
|
||||
@@ -28,7 +29,7 @@ export default function Review({ data }: { data: MODEL_Investasi[] }) {
|
||||
if (_.isEmpty(data))
|
||||
return (
|
||||
<>
|
||||
<Center h={"50vh"}>Tidak ada Review</Center>
|
||||
<ComponentInvestasi_IsEmptyData text="Tidak ada data" />
|
||||
</>
|
||||
);
|
||||
return (
|
||||
@@ -38,7 +39,6 @@ export default function Review({ data }: { data: MODEL_Investasi[] }) {
|
||||
// sx={{ borderStyle: "solid", borderColor: "orange", borderWidth: "1px" }}
|
||||
key={e.id}
|
||||
mb={"md"}
|
||||
bg={"orange.1"}
|
||||
p={"xs"}
|
||||
withBorder
|
||||
onClick={() => router.push(RouterInvestasi.detail_review + `${e.id}`)}
|
||||
|
||||
@@ -78,7 +78,7 @@ export default function PortofolioInvestasi({
|
||||
<>
|
||||
{/* <pre>{JSON.stringify(dataInvestasi, null, 2)}</pre> */}
|
||||
<Stack>
|
||||
<Button
|
||||
{/* <Button
|
||||
radius={"xl"}
|
||||
bg={Warna.hijau_muda}
|
||||
color="green"
|
||||
@@ -86,7 +86,7 @@ export default function PortofolioInvestasi({
|
||||
onClick={() => router.push(RouterInvestasi.create)}
|
||||
>
|
||||
Buat Proyek Invetasi
|
||||
</Button>
|
||||
</Button> */}
|
||||
<Tabs
|
||||
variant="pills"
|
||||
radius="xl"
|
||||
@@ -94,30 +94,41 @@ export default function PortofolioInvestasi({
|
||||
value={activeTab}
|
||||
onTabChange={setActiveTab}
|
||||
>
|
||||
<Tabs.List grow>
|
||||
{status_inves.map((e) => (
|
||||
<Tabs.Tab
|
||||
key={e.id}
|
||||
value={e.name}
|
||||
color={!activeTab ? "gray" : e.color}
|
||||
>
|
||||
{e.name}
|
||||
</Tabs.Tab>
|
||||
))}
|
||||
</Tabs.List>
|
||||
<Divider my={"xs"} />
|
||||
<Tabs.Panel key={"1"} value="Draft">
|
||||
<Draft data={dataDraft as any} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel key={"2"} value="Review">
|
||||
<Review data={dataReview as any} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel key={"3"} value="Publish">
|
||||
<Publish data={dataPublish as any} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel key={"4"} value="Reject">
|
||||
<Reject data={dataReject as any} />
|
||||
</Tabs.Panel>
|
||||
<Stack>
|
||||
<Tabs.List grow>
|
||||
{status_inves.map((e) => (
|
||||
<Tabs.Tab
|
||||
sx={
|
||||
activeTab === e.name
|
||||
? {
|
||||
boxShadow:
|
||||
"0 2px 4px 0 rgba(0, 0, 0, 0.1), 0 2px 6px 0 rgba(0, 0, 0, 0.2)",
|
||||
}
|
||||
: {}
|
||||
}
|
||||
key={e.id}
|
||||
value={e.name}
|
||||
bg={activeTab === e.name ? "blue" : "gray.1"}
|
||||
fw={activeTab === e.name ? "bold" : "normal"}
|
||||
>
|
||||
{e.name}
|
||||
</Tabs.Tab>
|
||||
))}
|
||||
</Tabs.List>
|
||||
|
||||
<Tabs.Panel key={"1"} value="Draft">
|
||||
<Draft data={dataDraft as any} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel key={"2"} value="Review">
|
||||
<Review data={dataReview as any} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel key={"3"} value="Publish">
|
||||
<Publish data={dataPublish as any} />
|
||||
</Tabs.Panel>
|
||||
<Tabs.Panel key={"4"} value="Reject">
|
||||
<Reject data={dataReject as any} />
|
||||
</Tabs.Panel>
|
||||
</Stack>
|
||||
</Tabs>
|
||||
</Stack>
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user