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() { export default async function Page() {
const userLoginId = await funGetUserIdByToken(); const userLoginId = await funGetUserIdByToken();
const statusTransaksi = await getMaster_StatusTransaksiInvestasi(); // const statusTransaksi = await getMaster_StatusTransaksiInvestasi();
const listTransaksi = await getListAllTransaksiById_Investasi( // const listTransaksi = await getListAllTransaksiById_Investasi(
userLoginId as string // userLoginId as string
); // );
// NEW // NEW
const dataTransaksi = await investasi_funGetTransaksiByUserId({ page: 1 }); // const dataTransaksi = await investasi_funGetTransaksiByUserId({ page: 1 });
return ( return (
<> <>

View File

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

View File

@@ -1,8 +1,14 @@
"use client"; "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_LayoutHeaderTamplate from "@/app_modules/_global/ui/ui_header_tamplate";
import UIGlobal_LayoutTamplate from "@/app_modules/_global/ui/ui_layout_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 React from "react";
import { Investasi_ComponentFooterMain } from "../../_component"; import { Investasi_ComponentFooterMain } from "../../_component";
@@ -13,7 +19,7 @@ export function Investasi_UiLayoutMain({
}) { }) {
return ( return (
<> <>
<UIGlobal_LayoutTamplate {/* <UIGlobal_LayoutTamplate
header={ header={
<UIGlobal_LayoutHeaderTamplate <UIGlobal_LayoutHeaderTamplate
routerLeft={RouterCrowd.main} routerLeft={RouterCrowd.main}
@@ -23,7 +29,17 @@ export function Investasi_UiLayoutMain({
footer={<Investasi_ComponentFooterMain />} footer={<Investasi_ComponentFooterMain />}
> >
{children} {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> <Stack>
<Tabs.List grow mb={"xs"}> <Tabs.List grow>
{status.map((e) => ( {status.map((e) => (
<Tabs.Tab <Tabs.Tab
w={"20%"} w={"20%"}

View File

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