fix layout investasi

deskripsi:
- fix layout investasi main
This commit is contained in:
2025-03-17 10:43:28 +08:00
parent fa43661c9a
commit e745e7b1ef
5 changed files with 56 additions and 41 deletions

View File

@@ -9,13 +9,13 @@ import { Investasi_ViewDaftarTransaksiNew } from "@/app_modules/investasi/_view/
export default async function Page() {
const userLoginId = await funGetUserIdByToken();
const statusTransaksi = await getMaster_StatusTransaksiInvestasi();
const listTransaksi = await getListAllTransaksiById_Investasi(
userLoginId as string
);
// const statusTransaksi = await getMaster_StatusTransaksiInvestasi();
// const listTransaksi = await getListAllTransaksiById_Investasi(
// userLoginId as string
// );
// NEW
const dataTransaksi = await investasi_funGetTransaksiByUserId({ page: 1 });
// const dataTransaksi = await investasi_funGetTransaksiByUserId({ page: 1 });
return (
<>

View File

@@ -47,7 +47,7 @@ export function Investasi_ComponentFooterMain() {
return (
<>
<SimpleGrid cols={listFooter.length} h={"9vh"} mx={"xs"}>
<SimpleGrid cols={listFooter.length} h={"9vh"} mx={"xs"} w={"100%"}>
{listFooter.map((e: any, i) => (
<Stack key={i} align="center" justify="center" spacing={0}>
<ActionIcon

View File

@@ -1,8 +1,14 @@
"use client";
import { RouterCrowd } from "@/lib/router_hipmi/router_crowd";
import { Component_Header } from "@/app_modules/_global/component/new/component_header";
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_tamplate";
import UI_NewLayoutTamplate, {
UI_NewChildren,
UI_NewFooter,
UI_NewHeader,
} from "@/app_modules/_global/ui/V2_layout_tamplate";
import { RouterCrowd } from "@/lib/router_hipmi/router_crowd";
import React from "react";
import { Investasi_ComponentFooterMain } from "../../_component";
@@ -13,7 +19,7 @@ export function Investasi_UiLayoutMain({
}) {
return (
<>
<UIGlobal_LayoutTamplate
{/* <UIGlobal_LayoutTamplate
header={
<UIGlobal_LayoutHeaderTamplate
routerLeft={RouterCrowd.main}
@@ -23,7 +29,17 @@ export function Investasi_UiLayoutMain({
footer={<Investasi_ComponentFooterMain />}
>
{children}
</UIGlobal_LayoutTamplate>
</UIGlobal_LayoutTamplate> */}
<UI_NewLayoutTamplate>
<UI_NewHeader>
<Component_Header routerLeft={RouterCrowd.main} title="Investasi" />
</UI_NewHeader>
<UI_NewChildren>{children}</UI_NewChildren>
<UI_NewFooter>
<Investasi_ComponentFooterMain />
</UI_NewFooter>
</UI_NewLayoutTamplate>
</>
);
}

View File

@@ -50,7 +50,7 @@ export function Investasi_UiPortofolioNew() {
}}
>
<Stack>
<Tabs.List grow mb={"xs"}>
<Tabs.List grow>
{status.map((e) => (
<Tabs.Tab
w={"20%"}

View File

@@ -37,37 +37,36 @@ export function Investasi_ViewSahamSayaNew() {
}, []);
return (
<>
<Box>
{
loading ?
<SkeletonInvestasiSahamSaya />
:
_.isEmpty(data) ? (
<ComponentGlobal_IsEmptyData />
) : (
<ScrollOnly
height="82vh"
renderLoading={() => (
<Center>
<ComponentGlobal_Loader size={25} />
</Center>
)}
data={data}
setData={setData}
moreData={async () => {
const pageNew = activePage + 1
const loadData = await apiGetAllSahamSaya(`?cat=saham-saya&page=${pageNew}`)
setActivePage((val) => val + 1);
<>
<Box>
{loading ? (
<SkeletonInvestasiSahamSaya />
) : _.isEmpty(data) ? (
<ComponentGlobal_IsEmptyData />
) : (
<ScrollOnly
height="82vh"
renderLoading={() => (
<Center>
<ComponentGlobal_Loader size={25} />
</Center>
)}
data={data}
setData={setData}
moreData={async () => {
const pageNew = activePage + 1;
const loadData = await apiGetAllSahamSaya(
`?cat=saham-saya&page=${pageNew}`
);
setActivePage((val) => val + 1);
return loadData.data;
}}
>
{(item) => <Investasi_ComponentSahamSayaNew data={item} />}
</ScrollOnly>
)
}
</Box>
</>
return loadData.data;
}}
>
{(item) => <Investasi_ComponentSahamSayaNew data={item} />}
</ScrollOnly>
)}
</Box>
</>
);
}