#style: UI Katalog
Deskripsi: - UI Katalog selesai - UI Portofolio selesai - UI Profile selesa ## NO Isuuee
This commit is contained in:
BIN
public/portofolio/logo/55409a1f-8d3d-455a-b5bf-10cd64eda28b.png
Normal file
BIN
public/portofolio/logo/55409a1f-8d3d-455a-b5bf-10cd64eda28b.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.5 KiB |
BIN
public/portofolio/logo/a7ebdb61-1200-45b3-b868-ed9cc811c8b8.png
Normal file
BIN
public/portofolio/logo/a7ebdb61-1200-45b3-b868-ed9cc811c8b8.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/portofolio/logo/c457514a-9b0b-48b8-8ae6-2d903f8964bc.jpg
Normal file
BIN
public/portofolio/logo/c457514a-9b0b-48b8-8ae6-2d903f8964bc.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
17
src/app/dev/portofolio/daftar-portofolio/[id]/page.tsx
Normal file
17
src/app/dev/portofolio/daftar-portofolio/[id]/page.tsx
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { Portofolio_ViewListDetail } from "@/app_modules/katalog/portofolio";
|
||||||
|
import { portofolio_funGetAllDaftarByid } from "@/app_modules/katalog/portofolio/fun/get/get_all_portofolio";
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
const profileId = params.id;
|
||||||
|
const dataPortofolio = await portofolio_funGetAllDaftarByid({
|
||||||
|
profileId,
|
||||||
|
page: 1,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Portofolio_ViewListDetail dataPortofolio={dataPortofolio as any} profileId={profileId} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -4,14 +4,15 @@ import { portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/
|
|||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
const getPorto = await portofolio_getOneById(params.id);
|
const getPorto = await portofolio_getOneById(params.id);
|
||||||
const userLoginId = await user_getOneUserId()
|
const userLoginId = await user_getOneUserId();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(getPorto)} */}
|
{/* {JSON.stringify(getPorto)} */}
|
||||||
<ViewPortofolio dataPorto={getPorto as any} userLoginId={userLoginId as any} />
|
<ViewPortofolio
|
||||||
|
dataPorto={getPorto as any}
|
||||||
|
userLoginId={userLoginId as any}
|
||||||
|
/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,8 +1,16 @@
|
|||||||
import LayoutProfile_UpdateFotoBackground from "@/app_modules/katalog/profile/upload/foto_background/layout";
|
import LayoutProfile_UpdateFotoBackground from "@/app_modules/katalog/profile/upload/foto_background/layout";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default async function Layout({children}: {children: React.ReactNode}) {
|
export default async function Layout({
|
||||||
return<>
|
children,
|
||||||
<LayoutProfile_UpdateFotoBackground>{children}</LayoutProfile_UpdateFotoBackground>
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<LayoutProfile_UpdateFotoBackground>
|
||||||
|
{children}
|
||||||
|
</LayoutProfile_UpdateFotoBackground>
|
||||||
</>
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,9 +1,14 @@
|
|||||||
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
export default async function Layout({
|
||||||
let profileId = params.id
|
children,
|
||||||
return <>
|
}: {
|
||||||
<UploadFotoProfileLayout profileId={profileId} >{children}</UploadFotoProfileLayout>
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<UploadFotoProfileLayout>{children}</UploadFotoProfileLayout>
|
||||||
</>
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<ComponentGlobal_V2_LoadingPage />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -19,9 +19,13 @@ export const RouterProfile = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const RouterPortofolio = {
|
export const RouterPortofolio = {
|
||||||
|
main_detail: "/dev/portofolio/main/",
|
||||||
|
|
||||||
api_logo_porto: "/api/portofolio/logo/",
|
api_logo_porto: "/api/portofolio/logo/",
|
||||||
create: "/dev/portofolio/create/",
|
create: "/dev/portofolio/create/",
|
||||||
|
|
||||||
|
daftar_portofolio: "/dev/portofolio/daftar-portofolio/",
|
||||||
|
|
||||||
//edit
|
//edit
|
||||||
edit_data_bisnis: "/dev/portofolio/edit/data/",
|
edit_data_bisnis: "/dev/portofolio/edit/data/",
|
||||||
edit_logo_bisnis: "/dev/portofolio/edit/logo/",
|
edit_logo_bisnis: "/dev/portofolio/edit/logo/",
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import Coba_TestLoading from "@/app_modules/zCoba";
|
import Coba_TestLoading from "@/app_modules/zCoba";
|
||||||
import { Text } from "@mantine/core";
|
import { Text } from "@mantine/core";
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,20 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Stack, Loader, ActionIcon, ThemeIcon } from "@mantine/core";
|
import { Stack, Loader, ActionIcon, ThemeIcon } from "@mantine/core";
|
||||||
import LayoutGlobal_UI_Tamplate from "../ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "../ui/ui_layout_tamplate";
|
||||||
import { IconMessages, IconX } from "@tabler/icons-react";
|
import { IconMessages, IconX } from "@tabler/icons-react";
|
||||||
|
|
||||||
export default function ComponentGlobal_SplashScreen({ icon }: { icon: any }) {
|
export default function ComponentGlobal_SplashScreen({ icon }: { icon: any }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate>
|
<UIGlobal_LayoutTamplate>
|
||||||
<Stack h={"90vh"} align="center" justify="center" spacing={"xl"}>
|
<Stack h={"90vh"} align="center" justify="center" spacing={"xl"}>
|
||||||
<ThemeIcon variant="transparent" size={300} c="white">
|
<ThemeIcon variant="transparent" size={300} c="white">
|
||||||
{icon}
|
{icon}
|
||||||
</ThemeIcon>
|
</ThemeIcon>
|
||||||
<Loader variant="dots" color="white" />
|
<Loader variant="dots" color="white" />
|
||||||
</Stack>
|
</Stack>
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,16 @@
|
|||||||
import {
|
import {
|
||||||
Drawer,
|
|
||||||
Stack,
|
|
||||||
Group,
|
|
||||||
ActionIcon,
|
ActionIcon,
|
||||||
|
Drawer,
|
||||||
|
Group,
|
||||||
SimpleGrid,
|
SimpleGrid,
|
||||||
|
Stack,
|
||||||
Text,
|
Text,
|
||||||
Box,
|
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconX, IconEdit } from "@tabler/icons-react";
|
import { IconX } from "@tabler/icons-react";
|
||||||
import { MainColor, AccentColor } from "../color/color_pallet";
|
|
||||||
import React from "react";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { AccentColor } from "../color/color_pallet";
|
||||||
|
import ComponentGlobal_UI_Loader from "./ui_loader";
|
||||||
|
|
||||||
interface MODEL_DRAWER {
|
interface MODEL_DRAWER {
|
||||||
id: string;
|
id: string;
|
||||||
@@ -25,9 +25,19 @@ export default function ComponentGlobal_UI_Drawer({
|
|||||||
}: {
|
}: {
|
||||||
opened: boolean;
|
opened: boolean;
|
||||||
close: () => void;
|
close: () => void;
|
||||||
component: MODEL_DRAWER[] | any[];
|
component:
|
||||||
|
| {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
icon: string;
|
||||||
|
path: string;
|
||||||
|
}[]
|
||||||
|
| any[];
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
const [pageId, setPageId] = useState("");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Drawer
|
<Drawer
|
||||||
@@ -69,12 +79,20 @@ export default function ComponentGlobal_UI_Drawer({
|
|||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="transparent"
|
variant="transparent"
|
||||||
c="white"
|
c="white"
|
||||||
onClick={() => router.push(e.path)}
|
onClick={() => {
|
||||||
|
setPageId(e?.id);
|
||||||
|
setIsLoading(true);
|
||||||
|
router.push(e?.path);
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
{e.icon}
|
{isLoading && e?.id === pageId ? (
|
||||||
|
<ComponentGlobal_UI_Loader />
|
||||||
|
) : (
|
||||||
|
e?.icon
|
||||||
|
)}
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
<Text align="center" color="white">
|
<Text align="center" color="white">
|
||||||
{e.name}
|
{e?.name}
|
||||||
</Text>
|
</Text>
|
||||||
</Stack>
|
</Stack>
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { useRouter } from "next/navigation";
|
|||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import { AccentColor, MainColor } from "../color/color_pallet";
|
import { AccentColor, MainColor } from "../color/color_pallet";
|
||||||
|
|
||||||
export default function LayoutGlobal_UI_HeaderTamplate({
|
export default function UIGlobal_LayoutHeaderTamplate({
|
||||||
title,
|
title,
|
||||||
posotion,
|
posotion,
|
||||||
// left button
|
// left button
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
import { AccentColor, MainColor } from "../color/color_pallet";
|
import { AccentColor, MainColor } from "../color/color_pallet";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutGlobal_UI_Tamplate({
|
export default function UIGlobal_LayoutTamplate({
|
||||||
children,
|
children,
|
||||||
header,
|
header,
|
||||||
footer,
|
footer,
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { AppShell } from "@mantine/core";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ComponentForum_HeaderTamplate from "../component/header/header_tamplate";
|
import ComponentForum_HeaderTamplate from "../component/header/header_tamplate";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
|
||||||
export default function LayoutForum_Create({
|
export default function LayoutForum_Create({
|
||||||
children,
|
children,
|
||||||
@@ -14,11 +14,11 @@ export default function LayoutForum_Create({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Tambah Postingan"/>}
|
header={<UIGlobal_LayoutHeaderTamplate title="Tambah Postingan"/>}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
|
|
||||||
{/* <AppComponentGlobal_LayoutTamplate header={<ComponentForum_HeaderTamplate title="Tambah Postingan" />}>
|
{/* <AppComponentGlobal_LayoutTamplate header={<ComponentForum_HeaderTamplate title="Tambah Postingan" />}>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { ComponentForum_UiDetailReportKomentar } from "../component/detail_component/ui_report_komentar";
|
import { ComponentForum_UiDetailReportKomentar } from "../component/detail_component/ui_report_komentar";
|
||||||
|
|
||||||
|
|
||||||
@@ -10,11 +10,11 @@ export default function Forum_DetailReportKomentar({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Report Komentar" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Report Komentar" />}
|
||||||
>
|
>
|
||||||
{<ComponentForum_UiDetailReportKomentar dataKomentar={dataKomentar} />}
|
{<ComponentForum_UiDetailReportKomentar dataKomentar={dataKomentar} />}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { Stack, Text } from "@mantine/core";
|
import { Stack, Text } from "@mantine/core";
|
||||||
import { ComponentForum_UiDetailReportPosting } from "../component/detail_component/ui_report_posting";
|
import { ComponentForum_UiDetailReportPosting } from "../component/detail_component/ui_report_posting";
|
||||||
|
|
||||||
@@ -10,11 +10,11 @@ export default function Forum_DetailReportPosting({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Report Posting" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Report Posting" />}
|
||||||
>
|
>
|
||||||
<ComponentForum_UiDetailReportPosting dataPosting={dataPosting} />
|
<ComponentForum_UiDetailReportPosting dataPosting={dataPosting} />
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import { IconChevronLeft } from "@tabler/icons-react";
|
|||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
||||||
import { revalidatePath } from "next/cache";
|
import { revalidatePath } from "next/cache";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
|
||||||
export const dynamic = "force-dynamic";
|
export const dynamic = "force-dynamic";
|
||||||
export default function LayoutForum_Detail({
|
export default function LayoutForum_Detail({
|
||||||
@@ -24,11 +24,11 @@ export default function LayoutForum_Detail({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Postingan" posotion={"left"} />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Postingan" posotion={"left"} />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
{/* <AppComponentGlobal_LayoutTamplate
|
{/* <AppComponentGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { AppShell } from "@mantine/core";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ComponentForum_HeaderTamplate from "../../component/header/header_tamplate";
|
import ComponentForum_HeaderTamplate from "../../component/header/header_tamplate";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
|
||||||
export default function LayoutForum_EditPosting({
|
export default function LayoutForum_EditPosting({
|
||||||
children,
|
children,
|
||||||
@@ -14,11 +14,11 @@ export default function LayoutForum_EditPosting({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Edit Postingan" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Postingan" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
{/* <AppComponentGlobal_LayoutTamplate
|
{/* <AppComponentGlobal_LayoutTamplate
|
||||||
header={<ComponentForum_HeaderTamplate title="Edit Postingan" />}
|
header={<ComponentForum_HeaderTamplate title="Edit Postingan" />}
|
||||||
|
|||||||
@@ -6,8 +6,8 @@ import ComponentForum_HeaderTamplate from "../component/header/header_tamplate";
|
|||||||
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||||
import { IconX } from "@tabler/icons-react";
|
import { IconX } from "@tabler/icons-react";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
|
||||||
export default function LayoutForum_Forumku({
|
export default function LayoutForum_Forumku({
|
||||||
children,
|
children,
|
||||||
@@ -18,16 +18,16 @@ export default function LayoutForum_Forumku({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title={`${username}`}
|
title={`${username}`}
|
||||||
iconLeft={<IconX />}
|
iconLeft={<IconX />}
|
||||||
/>
|
/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
{/* <AppComponentGlobal_LayoutTamplate
|
{/* <AppComponentGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import { MODEL_USER } from "@/app_modules/home/model/interface";
|
|||||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
|
||||||
export default function LayoutForum_Main({
|
export default function LayoutForum_Main({
|
||||||
children,
|
children,
|
||||||
@@ -43,9 +43,9 @@ export default function LayoutForum_Main({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="FORUM"
|
title="FORUM"
|
||||||
iconRight={
|
iconRight={
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
@@ -80,7 +80,7 @@ export default function LayoutForum_Main({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
{/* <AppComponentGlobal_LayoutTamplate
|
{/* <AppComponentGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import ComponentForum_HeaderRataKiri from "../../component/header/header_rata_kiri";
|
import ComponentForum_HeaderRataKiri from "../../component/header/header_rata_kiri";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
|
||||||
export default function LayoutForum_ReportKomentar({
|
export default function LayoutForum_ReportKomentar({
|
||||||
children,
|
children,
|
||||||
@@ -13,13 +13,13 @@ export default function LayoutForum_ReportKomentar({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate title="Mengumpulkan Informasi Komentar" />
|
<UIGlobal_LayoutHeaderTamplate title="Mengumpulkan Informasi Komentar" />
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
{/* <AppComponentGlobal_LayoutTamplate
|
{/* <AppComponentGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<ComponentForum_HeaderRataKiri title="Mengumpulkan Informasi Komentar"/>
|
<ComponentForum_HeaderRataKiri title="Mengumpulkan Informasi Komentar"/>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutForum_ReportPosting({
|
export default function LayoutForum_ReportPosting({
|
||||||
@@ -11,13 +11,13 @@ export default function LayoutForum_ReportPosting({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate title="Mengumpulkan Informasi Posting" />
|
<UIGlobal_LayoutHeaderTamplate title="Mengumpulkan Informasi Posting" />
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
|
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { RouterForum } from "@/app/lib/router_hipmi/router_forum";
|
import { RouterForum } from "@/app/lib/router_hipmi/router_forum";
|
||||||
import ComponentGlobal_SplashScreen from "@/app_modules/component_global/splash/splash_global";
|
import ComponentGlobal_SplashScreen from "@/app_modules/component_global/splash/splash_global";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import {
|
import {
|
||||||
Avatar,
|
Avatar,
|
||||||
Center,
|
Center,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import { ActionIcon, Indicator, Loader, Text } from "@mantine/core";
|
import { ActionIcon, Indicator, Loader, Text } from "@mantine/core";
|
||||||
import { MODEL_USER } from "../model/interface";
|
import { MODEL_USER } from "../model/interface";
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "../component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "../component_global/ui/ui_layout_tamplate";
|
||||||
import { MODEL_JOB } from "../job/model/interface";
|
import { MODEL_JOB } from "../job/model/interface";
|
||||||
import {
|
import {
|
||||||
ComponentHome_ButtonHeaderLeft,
|
ComponentHome_ButtonHeaderLeft,
|
||||||
@@ -19,9 +19,9 @@ export default function HomeView({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="HIPMI"
|
title="HIPMI"
|
||||||
customButtonLeft={
|
customButtonLeft={
|
||||||
<ComponentHome_ButtonHeaderLeft dataUser={dataUser} />
|
<ComponentHome_ButtonHeaderLeft dataUser={dataUser} />
|
||||||
@@ -37,7 +37,7 @@ export default function HomeView({
|
|||||||
footer={<Home_UiFooter dataUser={dataUser} />}
|
footer={<Home_UiFooter dataUser={dataUser} />}
|
||||||
>
|
>
|
||||||
<Home_UiView dataJob={dataJob} dataUser={dataUser} />
|
<Home_UiView dataJob={dataJob} dataUser={dataUser} />
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutJob_Create({
|
export default function LayoutJob_Create({
|
||||||
@@ -11,11 +11,11 @@ export default function LayoutJob_Create({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Tambah Job" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Tambah Job" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutJob_DetailArsip({
|
export default function LayoutJob_DetailArsip({
|
||||||
@@ -11,11 +11,11 @@ export default function LayoutJob_DetailArsip({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Detail Arsip" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Detail Arsip" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import ComponentJob_HeaderTamplate from "../../component/header_tamplate";
|
|||||||
import { IconDots, IconDotsVertical, IconEdit, IconX } from "@tabler/icons-react";
|
import { IconDots, IconDotsVertical, IconEdit, IconX } from "@tabler/icons-react";
|
||||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
import {
|
import {
|
||||||
@@ -48,9 +48,9 @@ export default function LayoutJob_DetailDraft({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="Detail Draft"
|
title="Detail Draft"
|
||||||
iconRight={
|
iconRight={
|
||||||
<ActionIcon variant="transparent" onClick={() => open()}>
|
<ActionIcon variant="transparent" onClick={() => open()}>
|
||||||
@@ -62,7 +62,7 @@ export default function LayoutJob_DetailDraft({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
<ComponentGlobal_UI_Drawer
|
<ComponentGlobal_UI_Drawer
|
||||||
opened={opened}
|
opened={opened}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutJob_MainDetail({
|
export default function LayoutJob_MainDetail({
|
||||||
@@ -11,11 +11,11 @@ export default function LayoutJob_MainDetail({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Detail Job" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Detail Job" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutJob_DetailPublish({
|
export default function LayoutJob_DetailPublish({
|
||||||
@@ -11,11 +11,11 @@ export default function LayoutJob_DetailPublish({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Detail Publish" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Detail Publish" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import React from "react";
|
|||||||
import ComponentJob_HeaderTamplate from "../../component/header_tamplate";
|
import ComponentJob_HeaderTamplate from "../../component/header_tamplate";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
|
|
||||||
export default function LayoutJob_DetailReject({
|
export default function LayoutJob_DetailReject({
|
||||||
@@ -16,11 +16,11 @@ export default function LayoutJob_DetailReject({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Detail Reject" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Detail Reject" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutJob_DetailReview({
|
export default function LayoutJob_DetailReview({
|
||||||
@@ -11,11 +11,11 @@ export default function LayoutJob_DetailReview({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Detail Review" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Detail Review" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutJob_Edit({
|
export default function LayoutJob_Edit({
|
||||||
@@ -11,11 +11,11 @@ export default function LayoutJob_Edit({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Edit Job" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Job" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
import { RouterJob } from "@/app/lib/router_hipmi/router_job";
|
||||||
import { MainColor } from "@/app_modules/component_global/color/color_pallet";
|
import { MainColor } from "@/app_modules/component_global/color/color_pallet";
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { ActionIcon, SimpleGrid, Stack, Text } from "@mantine/core";
|
import { ActionIcon, SimpleGrid, Stack, Text } from "@mantine/core";
|
||||||
import { IconHistory, IconHome, IconReservedLine } from "@tabler/icons-react";
|
import { IconHistory, IconHome, IconReservedLine } from "@tabler/icons-react";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
@@ -46,9 +46,9 @@ export default function LayoutJob_Main({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="JOB"
|
title="JOB"
|
||||||
routerLeft={RouterHome.main_home}
|
routerLeft={RouterHome.main_home}
|
||||||
/>
|
/>
|
||||||
@@ -118,7 +118,7 @@ export default function LayoutJob_Main({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@ import { AppShell, Center } from "@mantine/core";
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import ComponentJob_HeaderTamplate from "../component/header_tamplate";
|
import ComponentJob_HeaderTamplate from "../component/header_tamplate";
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
|
||||||
export default function LayoutJob_NonUserView({
|
export default function LayoutJob_NonUserView({
|
||||||
children,
|
children,
|
||||||
@@ -14,11 +14,11 @@ export default function LayoutJob_NonUserView({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Job Vacancy" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Job Vacancy" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import KatalogView from "./view_katalog";
|
|
||||||
import KatalogLayout from "./layout";
|
import KatalogLayout from "./layout";
|
||||||
|
|
||||||
export {KatalogView, KatalogLayout}
|
export { KatalogLayout };
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { ComponentKatalog_ButtonHeaderRight } from "../component/button_header_right";
|
import { ComponentKatalog_ButtonHeaderRight } from "../component/button_header_right";
|
||||||
|
|
||||||
export default function KatalogLayout({
|
export default function KatalogLayout({
|
||||||
@@ -17,9 +17,9 @@ export default function KatalogLayout({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<LayoutGlobal_UI_HeaderTamplate
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
title="KATALOG"
|
title="KATALOG"
|
||||||
customButtonRight={
|
customButtonRight={
|
||||||
<ComponentKatalog_ButtonHeaderRight
|
<ComponentKatalog_ButtonHeaderRight
|
||||||
@@ -32,7 +32,7 @@ export default function KatalogLayout({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,33 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import Component_Logout from "@/app_modules/auth/logout/view";
|
|
||||||
import {
|
|
||||||
Stack
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { MODEL_PORTOFOLIO } from "../portofolio/model/interface";
|
|
||||||
import { Portofolio_UiView } from "../portofolio/ui_portofolio";
|
|
||||||
import { MODEL_PROFILE } from "../profile/model/interface";
|
|
||||||
import { Profile_UiView } from "../profile/ui_profile";
|
|
||||||
|
|
||||||
export default function KatalogView({
|
|
||||||
profile,
|
|
||||||
listPorto,
|
|
||||||
userLoginId,
|
|
||||||
}: {
|
|
||||||
profile: MODEL_PROFILE;
|
|
||||||
listPorto: MODEL_PORTOFOLIO;
|
|
||||||
userLoginId: string;
|
|
||||||
}) {
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Stack>
|
|
||||||
<Profile_UiView profile={profile as any} userLoginId={userLoginId} />
|
|
||||||
<Portofolio_UiView
|
|
||||||
listPorto={listPorto as any}
|
|
||||||
profile={profile}
|
|
||||||
userLoginId={userLoginId}
|
|
||||||
/>
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,80 @@
|
|||||||
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||||
|
import { Button, Group, Modal, Stack, Title } from "@mantine/core";
|
||||||
|
import { IconTrash } from "@tabler/icons-react";
|
||||||
|
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||||
|
import router from "next/router";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { Portofolio_funDeletePortofolioById } from "../fun/delete/fun_delete_by_id";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import ComponentGlobal_UI_Modal from "@/app_modules/component_global/ui/ui_modal";
|
||||||
|
|
||||||
|
export function ComponentPortofolio_ButtonDelete({
|
||||||
|
userLoginId,
|
||||||
|
dataPorto,
|
||||||
|
}: {
|
||||||
|
userLoginId: string;
|
||||||
|
dataPorto: MODEL_PORTOFOLIO;
|
||||||
|
}) {
|
||||||
|
const router = useRouter();
|
||||||
|
const [openModal, setModal] = useState(false);
|
||||||
|
const [loadingDel, setLoadingDel] = useState(false);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{userLoginId === dataPorto?.Profile.userId ? (
|
||||||
|
<Button
|
||||||
|
radius={"xl"}
|
||||||
|
bg={"red"}
|
||||||
|
color="red"
|
||||||
|
onClick={() => {
|
||||||
|
setModal(true)
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<IconTrash />
|
||||||
|
</Button>
|
||||||
|
) : (
|
||||||
|
""
|
||||||
|
)}
|
||||||
|
|
||||||
|
<ComponentGlobal_UI_Modal
|
||||||
|
title={"Anda yakin menghapus portofolio ini ?"}
|
||||||
|
opened={openModal}
|
||||||
|
close={() => setModal(false)}
|
||||||
|
buttonKiri={
|
||||||
|
<Button radius={"xl"} onClick={() => setModal(false)}>
|
||||||
|
Batal
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
buttonKanan={
|
||||||
|
<Button
|
||||||
|
radius={"xl"}
|
||||||
|
color="red"
|
||||||
|
loaderPosition="center"
|
||||||
|
loading={loadingDel ? true : false}
|
||||||
|
onClick={() => onDelete(router, dataPorto as any, setLoadingDel)}
|
||||||
|
>
|
||||||
|
Hapus
|
||||||
|
</Button>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function onDelete(
|
||||||
|
router: AppRouterInstance,
|
||||||
|
dataPorto: MODEL_PORTOFOLIO,
|
||||||
|
setLoadingDel: any
|
||||||
|
) {
|
||||||
|
await Portofolio_funDeletePortofolioById(dataPorto).then((res) => {
|
||||||
|
if (res.status === 200) {
|
||||||
|
setLoadingDel(true);
|
||||||
|
ComponentGlobal_NotifikasiBerhasil(res.message);
|
||||||
|
router.back();
|
||||||
|
} else {
|
||||||
|
ComponentGlobal_NotifikasiGagal(res.message);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
64
src/app_modules/katalog/portofolio/component/button_more.tsx
Normal file
64
src/app_modules/katalog/portofolio/component/button_more.tsx
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
|
import ComponentGlobal_UI_Drawer from "@/app_modules/component_global/ui/ui_drawer";
|
||||||
|
import { ActionIcon } from "@mantine/core";
|
||||||
|
import {
|
||||||
|
IconDots,
|
||||||
|
IconDotsVertical,
|
||||||
|
IconEdit,
|
||||||
|
IconId,
|
||||||
|
IconPhotoEdit,
|
||||||
|
} from "@tabler/icons-react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
|
||||||
|
export function ComponentPortofolio_ButtonMore({
|
||||||
|
portoId,
|
||||||
|
userLoginId,
|
||||||
|
authorId,
|
||||||
|
}: {
|
||||||
|
portoId: string;
|
||||||
|
userLoginId: string;
|
||||||
|
authorId: string;
|
||||||
|
}) {
|
||||||
|
const [openDrawer, setOpenDrawer] = useState(false);
|
||||||
|
const listPage = [
|
||||||
|
{
|
||||||
|
id: "1",
|
||||||
|
name: "Update detail bisnis",
|
||||||
|
icon: <IconEdit />,
|
||||||
|
path: RouterPortofolio.edit_data_bisnis + `${portoId}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "2",
|
||||||
|
name: "Update logo ",
|
||||||
|
icon: <IconPhotoEdit />,
|
||||||
|
path: RouterPortofolio.edit_logo_bisnis + `${portoId}`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "3",
|
||||||
|
name: "Update sosial media",
|
||||||
|
icon: <IconId />,
|
||||||
|
path: RouterPortofolio.edit_medsos_bisnis + `${portoId}`,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
{userLoginId === authorId ? (
|
||||||
|
<ActionIcon variant="transparent" onClick={() => setOpenDrawer(true)}>
|
||||||
|
<IconDotsVertical color="white" />
|
||||||
|
</ActionIcon>
|
||||||
|
) : (
|
||||||
|
<ActionIcon disabled variant="transparent"></ActionIcon>
|
||||||
|
)}
|
||||||
|
|
||||||
|
<ComponentGlobal_UI_Drawer
|
||||||
|
opened={openDrawer}
|
||||||
|
close={() => setOpenDrawer(false)}
|
||||||
|
component={listPage}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,50 @@
|
|||||||
|
import { Group, Paper, Stack, Text } from "@mantine/core";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
import { AccentColor } from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader";
|
||||||
|
import { IconCaretRight } from "@tabler/icons-react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
|
|
||||||
|
export function ComponentPortofolio_DaftarBoxView({
|
||||||
|
data,
|
||||||
|
}: {
|
||||||
|
data: MODEL_PORTOFOLIO;
|
||||||
|
}) {
|
||||||
|
const router = useRouter();
|
||||||
|
const [isLoading, setIsLoading] = useState(false);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Paper
|
||||||
|
shadow="sm"
|
||||||
|
radius={"md"}
|
||||||
|
mb={"lg"}
|
||||||
|
onClick={() => {
|
||||||
|
setIsLoading(true);
|
||||||
|
router.push(RouterPortofolio.main_detail + data.id);
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Group position="apart">
|
||||||
|
<Text fw={"bold"} lineClamp={1} w={"80%"}>
|
||||||
|
{data?.namaBisnis}
|
||||||
|
</Text>
|
||||||
|
<Stack>
|
||||||
|
{isLoading ? (
|
||||||
|
<ComponentGlobal_UI_Loader />
|
||||||
|
) : (
|
||||||
|
<IconCaretRight color="white" size={25} />
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
</Group>
|
||||||
|
</Paper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,22 +1,18 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import ComponentKatalog_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function CreatePortofolioLayout({ children, profileId }: { children: any, profileId: any }) {
|
export default function CreatePortofolioLayout({ children, profileId }: { children: any, profileId: any }) {
|
||||||
const router = useRouter();
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={
|
header={
|
||||||
<ComponentKatalog_HeaderTamplate title="Buat Portofolio"/>
|
<UIGlobal_LayoutHeaderTamplate title="Buat Portofolio"/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
Select,
|
Select,
|
||||||
Stack,
|
Stack,
|
||||||
TextInput,
|
TextInput,
|
||||||
Textarea
|
Textarea,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconCamera } from "@tabler/icons-react";
|
import { IconCamera } from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
@@ -29,6 +29,11 @@ import { useRouter } from "next/navigation";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import ComponentKatalog_NotedBox from "../../component/noted_box";
|
import ComponentKatalog_NotedBox from "../../component/noted_box";
|
||||||
import funCreatePortofolio from "../fun/fun_create_portofolio";
|
import funCreatePortofolio from "../fun/fun_create_portofolio";
|
||||||
|
import ComponentGlobal_BoxInformation from "@/app_modules/component_global/box_information";
|
||||||
|
import {
|
||||||
|
AccentColor,
|
||||||
|
MainColor,
|
||||||
|
} from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
export default function CreatePortofolio({
|
export default function CreatePortofolio({
|
||||||
bidangBisnis,
|
bidangBisnis,
|
||||||
@@ -63,10 +68,15 @@ export default function CreatePortofolio({
|
|||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(profileId)} */}
|
{/* {JSON.stringify(profileId)} */}
|
||||||
|
|
||||||
<Stack px={"sm"} spacing={50}>
|
<Stack px={"sm"} mb={"lg"} spacing={50}>
|
||||||
<Stack spacing={"sm"}>
|
<Stack spacing={"sm"}>
|
||||||
<ComponentKatalog_NotedBox informasi="Lengkapi Data Bisnis" />
|
<ComponentGlobal_BoxInformation informasi="Lengkapi Data Bisnis" />
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Nama Bisnis"
|
label="Nama Bisnis"
|
||||||
placeholder="Nama bisnis"
|
placeholder="Nama bisnis"
|
||||||
@@ -79,6 +89,11 @@ export default function CreatePortofolio({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Bidang Bisnis"
|
label="Bidang Bisnis"
|
||||||
placeholder="Pilih salah satu bidang bisnis"
|
placeholder="Pilih salah satu bidang bisnis"
|
||||||
@@ -94,6 +109,11 @@ export default function CreatePortofolio({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Alamat Kantor"
|
label="Alamat Kantor"
|
||||||
placeholder="Alamat kantor"
|
placeholder="Alamat kantor"
|
||||||
@@ -106,6 +126,11 @@ export default function CreatePortofolio({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Nomor Telepon Kantor"
|
label="Nomor Telepon Kantor"
|
||||||
placeholder="Nomor telepon kantor"
|
placeholder="Nomor telepon kantor"
|
||||||
@@ -119,6 +144,11 @@ export default function CreatePortofolio({
|
|||||||
/>
|
/>
|
||||||
<Stack spacing={5}>
|
<Stack spacing={5}>
|
||||||
<Textarea
|
<Textarea
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
maxLength={150}
|
maxLength={150}
|
||||||
autosize
|
autosize
|
||||||
minRows={2}
|
minRows={2}
|
||||||
@@ -141,7 +171,7 @@ export default function CreatePortofolio({
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack>
|
<Stack>
|
||||||
<ComponentKatalog_NotedBox informasi="Upload Logo Bisnis Anda!" />
|
<ComponentGlobal_BoxInformation informasi="Upload Logo Bisnis Anda!" />
|
||||||
<AspectRatio ratio={16 / 9}>
|
<AspectRatio ratio={16 / 9}>
|
||||||
<Paper radius={"md"} withBorder>
|
<Paper radius={"md"} withBorder>
|
||||||
<Image alt="Foto" src={img ? img : "/aset/no-img.png"} />
|
<Image alt="Foto" src={img ? img : "/aset/no-img.png"} />
|
||||||
@@ -176,10 +206,10 @@ export default function CreatePortofolio({
|
|||||||
<Button
|
<Button
|
||||||
{...props}
|
{...props}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
variant="outline"
|
|
||||||
w={150}
|
|
||||||
leftIcon={<IconCamera />}
|
leftIcon={<IconCamera />}
|
||||||
compact
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</Button>
|
</Button>
|
||||||
@@ -191,6 +221,11 @@ export default function CreatePortofolio({
|
|||||||
<Stack>
|
<Stack>
|
||||||
<ComponentKatalog_NotedBox informasi="Isi hanya pada sosial media yang anda miliki" />
|
<ComponentKatalog_NotedBox informasi="Isi hanya pada sosial media yang anda miliki" />
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Facebook"
|
label="Facebook"
|
||||||
maxLength={100}
|
maxLength={100}
|
||||||
placeholder="Facebook"
|
placeholder="Facebook"
|
||||||
@@ -202,6 +237,11 @@ export default function CreatePortofolio({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Instagram"
|
label="Instagram"
|
||||||
maxLength={100}
|
maxLength={100}
|
||||||
placeholder="Instagram"
|
placeholder="Instagram"
|
||||||
@@ -213,6 +253,11 @@ export default function CreatePortofolio({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Tiktok"
|
label="Tiktok"
|
||||||
maxLength={100}
|
maxLength={100}
|
||||||
placeholder="Tiktok"
|
placeholder="Tiktok"
|
||||||
@@ -224,6 +269,11 @@ export default function CreatePortofolio({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Twitter"
|
label="Twitter"
|
||||||
maxLength={100}
|
maxLength={100}
|
||||||
placeholder="Twitter"
|
placeholder="Twitter"
|
||||||
@@ -235,6 +285,11 @@ export default function CreatePortofolio({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Youtube"
|
label="Youtube"
|
||||||
maxLength={100}
|
maxLength={100}
|
||||||
placeholder="Youtube"
|
placeholder="Youtube"
|
||||||
@@ -250,8 +305,6 @@ export default function CreatePortofolio({
|
|||||||
<Button
|
<Button
|
||||||
mt={"md"}
|
mt={"md"}
|
||||||
radius={50}
|
radius={50}
|
||||||
bg={Warna.hijau_muda}
|
|
||||||
color="green"
|
|
||||||
loading={loading ? true : false}
|
loading={loading ? true : false}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
@@ -265,6 +318,12 @@ export default function CreatePortofolio({
|
|||||||
setIsFile
|
setIsFile
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
|
style={{
|
||||||
|
border: `2px solid ${AccentColor.yellow}`,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Simpan
|
Simpan
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import ComponentKatalog_HeaderTamplate from "@/app_modules/katalog/component/header_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
|
|
||||||
@@ -13,11 +12,11 @@ export default function LayoutPortofolio_EditDataBisnis({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentKatalog_HeaderTamplate title="Edit Data Bisnis" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Data Bisnis" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,22 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Box, Button, Select, Stack, TextInput, Textarea } from "@mantine/core";
|
import {
|
||||||
|
MainColor
|
||||||
|
} from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input";
|
||||||
|
import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown";
|
||||||
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||||
|
import { Button, Select, Stack, TextInput, Textarea } from "@mantine/core";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { Portofolio_funEditDataBisnis } from "../../fun/edit/fun_edit_data_bisnis_by_id";
|
||||||
import {
|
import {
|
||||||
MODEL_PORTOFOLIO,
|
MODEL_PORTOFOLIO,
|
||||||
MODEL_PORTOFOLIO_BIDANG_BISNIS,
|
MODEL_PORTOFOLIO_BIDANG_BISNIS,
|
||||||
} from "../../model/interface";
|
} from "../../model/interface";
|
||||||
import { useState } from "react";
|
|
||||||
import _ from "lodash";
|
|
||||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { Portofolio_funEditDataBisnis } from "../../fun/edit/fun_edit_data_bisnis_by_id";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
|
||||||
import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input";
|
|
||||||
import ComponentGlobal_InputCountDown from "@/app_modules/component_global/input_countdown";
|
|
||||||
|
|
||||||
export default function Portofolio_EditDataBisnis({
|
export default function Portofolio_EditDataBisnis({
|
||||||
dataPorto,
|
dataPorto,
|
||||||
@@ -30,9 +32,14 @@ export default function Portofolio_EditDataBisnis({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <pre>{JSON.stringify(porto, null, 2)}</pre> */}
|
{/* <pre>{JSON.stringify(porto, null, 2)}</pre> */}
|
||||||
<Stack spacing={50} p={"md"}>
|
<Stack spacing={50} p={"sm"}>
|
||||||
<Stack>
|
<Stack>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
value={value.namaBisnis}
|
value={value.namaBisnis}
|
||||||
label="Nama Bisnis"
|
label="Nama Bisnis"
|
||||||
@@ -53,6 +60,11 @@ export default function Portofolio_EditDataBisnis({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Select
|
<Select
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
value={value.MasterBidangBisnis.id}
|
value={value.MasterBidangBisnis.id}
|
||||||
label="Bidang Bisnis"
|
label="Bidang Bisnis"
|
||||||
@@ -71,6 +83,11 @@ export default function Portofolio_EditDataBisnis({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
value={value.alamatKantor}
|
value={value.alamatKantor}
|
||||||
label="Alamat Kantor"
|
label="Alamat Kantor"
|
||||||
@@ -91,6 +108,11 @@ export default function Portofolio_EditDataBisnis({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
value={value.tlpn}
|
value={value.tlpn}
|
||||||
label="Nomor Telepon Kantor"
|
label="Nomor Telepon Kantor"
|
||||||
@@ -113,6 +135,11 @@ export default function Portofolio_EditDataBisnis({
|
|||||||
/>
|
/>
|
||||||
<Stack spacing={5}>
|
<Stack spacing={5}>
|
||||||
<Textarea
|
<Textarea
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
autosize
|
autosize
|
||||||
minRows={2}
|
minRows={2}
|
||||||
maxRows={5}
|
maxRows={5}
|
||||||
@@ -142,12 +169,19 @@ export default function Portofolio_EditDataBisnis({
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
<Button
|
<Button
|
||||||
|
disabled={_.values(value).includes("") ? true : false}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
loading={loading ? true : false}
|
loading={loading ? true : false}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUpdate(router, value as any, setLoading);
|
onUpdate(router, value as any, setLoading);
|
||||||
}}
|
}}
|
||||||
|
bg={MainColor.yellow}
|
||||||
|
color={"yellow"}
|
||||||
|
c={"black"}
|
||||||
|
style={{
|
||||||
|
transition: "0.5s",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
</Button>
|
</Button>
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
||||||
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import ComponentKatalog_HeaderTamplate from "@/app_modules/katalog/component/header_tamplate";
|
import ComponentKatalog_HeaderTamplate from "@/app_modules/katalog/component/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -12,11 +14,11 @@ export default function LayoutPortofolio_EditLogoBisnis({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentKatalog_HeaderTamplate title="Edit Logo Bisnis" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Logo Bisnis" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,30 +1,29 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
RouterPortofolio,
|
RouterPortofolio
|
||||||
RouterProfile,
|
|
||||||
} from "@/app/lib/router_hipmi/router_katalog";
|
} from "@/app/lib/router_hipmi/router_katalog";
|
||||||
|
import {
|
||||||
|
AccentColor,
|
||||||
|
MainColor,
|
||||||
|
} from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||||
import {
|
import {
|
||||||
AspectRatio,
|
AspectRatio,
|
||||||
Box,
|
|
||||||
Button,
|
Button,
|
||||||
Center,
|
Center,
|
||||||
FileButton,
|
FileButton,
|
||||||
Image,
|
Image,
|
||||||
Paper,
|
Paper,
|
||||||
Stack,
|
Stack
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { IconCamera } from "@tabler/icons-react";
|
import { IconCamera } from "@tabler/icons-react";
|
||||||
import { profile } from "console";
|
|
||||||
import image from "next/image";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import router from "next/router";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { MODEL_PORTOFOLIO } from "../../model/interface";
|
|
||||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
import { Portofolio_funEditLogoBisnisById } from "../../fun/edit/fun_edit_logo_bisnis_by_id";
|
import { Portofolio_funEditLogoBisnisById } from "../../fun/edit/fun_edit_logo_bisnis_by_id";
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
import { MODEL_PORTOFOLIO } from "../../model/interface";
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
|
||||||
|
|
||||||
export default function Portofolio_EditLogoBisnis({
|
export default function Portofolio_EditLogoBisnis({
|
||||||
dataPorto,
|
dataPorto,
|
||||||
@@ -38,7 +37,16 @@ export default function Portofolio_EditLogoBisnis({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xl"} px={"sm"}>
|
<Stack spacing={"xl"} px={"sm"}>
|
||||||
<Paper p={"sm"} withBorder radius={"sm"} shadow="lg">
|
<Paper
|
||||||
|
p={"sm"}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<AspectRatio ratio={1 / 1}>
|
<AspectRatio ratio={1 / 1}>
|
||||||
<Image
|
<Image
|
||||||
@@ -71,10 +79,10 @@ export default function Portofolio_EditLogoBisnis({
|
|||||||
<Button
|
<Button
|
||||||
{...props}
|
{...props}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
variant="outline"
|
|
||||||
w={150}
|
|
||||||
leftIcon={<IconCamera />}
|
leftIcon={<IconCamera />}
|
||||||
compact
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</Button>
|
</Button>
|
||||||
@@ -88,8 +96,16 @@ export default function Portofolio_EditLogoBisnis({
|
|||||||
<Button
|
<Button
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
onUpdate(router, dataPorto.id, file as any, setLoading)
|
// onUpdate(router, dataPorto.id, file as any, setLoading)
|
||||||
|
console.log("apa")
|
||||||
}
|
}
|
||||||
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
|
style={{
|
||||||
|
transition: "0.5s",
|
||||||
|
border: `1px solid ${AccentColor.yellow}`,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Simpan
|
Simpan
|
||||||
</Button>
|
</Button>
|
||||||
@@ -97,11 +113,7 @@ export default function Portofolio_EditLogoBisnis({
|
|||||||
<Button
|
<Button
|
||||||
disabled
|
disabled
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
loading={loading ? true : false}
|
|
||||||
loaderPosition="center"
|
|
||||||
onClick={() =>
|
|
||||||
onUpdate(router, dataPorto.id, file as any, setLoading)
|
|
||||||
}
|
|
||||||
>
|
>
|
||||||
Simpan
|
Simpan
|
||||||
</Button>
|
</Button>
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import ComponentKatalog_HeaderTamplate from "@/app_modules/katalog/component/header_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default function LayoutPortofolio_EditMedsosBisnis({
|
export default function LayoutPortofolio_EditMedsosBisnis({
|
||||||
@@ -12,11 +11,11 @@ export default function LayoutPortofolio_EditMedsosBisnis({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentKatalog_HeaderTamplate title="Edit Media Sosial" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Media Sosial" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,6 +10,10 @@ import { useRouter } from "next/navigation";
|
|||||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||||
|
import {
|
||||||
|
AccentColor,
|
||||||
|
MainColor,
|
||||||
|
} from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
export default function Portofolio_EditMedsosBisnis({
|
export default function Portofolio_EditMedsosBisnis({
|
||||||
dataMedsos,
|
dataMedsos,
|
||||||
@@ -23,9 +27,23 @@ export default function Portofolio_EditMedsosBisnis({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* <pre>{JSON.stringify(dataMedsos, null, 2)}</pre> */}
|
{/* <pre>{JSON.stringify(dataMedsos, null, 2)}</pre> */}
|
||||||
<Paper shadow="lg" p={"sm"}>
|
<Paper
|
||||||
|
p={"sm"}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Stack px={"sm"}>
|
<Stack px={"sm"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Facebook"
|
label="Facebook"
|
||||||
value={medsos.facebook}
|
value={medsos.facebook}
|
||||||
placeholder="Facebook"
|
placeholder="Facebook"
|
||||||
@@ -37,6 +55,11 @@ export default function Portofolio_EditMedsosBisnis({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Instagram"
|
label="Instagram"
|
||||||
value={medsos.instagram}
|
value={medsos.instagram}
|
||||||
placeholder="Instagram"
|
placeholder="Instagram"
|
||||||
@@ -48,6 +71,11 @@ export default function Portofolio_EditMedsosBisnis({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Tiktok"
|
label="Tiktok"
|
||||||
value={medsos.tiktok}
|
value={medsos.tiktok}
|
||||||
placeholder="Tiktok"
|
placeholder="Tiktok"
|
||||||
@@ -59,6 +87,11 @@ export default function Portofolio_EditMedsosBisnis({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Twitter"
|
label="Twitter"
|
||||||
value={medsos.twitter}
|
value={medsos.twitter}
|
||||||
placeholder="Twitter"
|
placeholder="Twitter"
|
||||||
@@ -70,6 +103,11 @@ export default function Portofolio_EditMedsosBisnis({
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
label="Youtube"
|
label="Youtube"
|
||||||
value={medsos.youtube}
|
value={medsos.youtube}
|
||||||
placeholder="Youtube"
|
placeholder="Youtube"
|
||||||
@@ -87,6 +125,12 @@ export default function Portofolio_EditMedsosBisnis({
|
|||||||
loading={loading ? true : false}
|
loading={loading ? true : false}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
onClick={() => onUpdate(router, medsos, setLoading)}
|
onClick={() => onUpdate(router, medsos, setLoading)}
|
||||||
|
style={{
|
||||||
|
backgroundColor: MainColor.yellow,
|
||||||
|
border: `2px solid ${AccentColor.yellow}`,
|
||||||
|
transition: "0.5s",
|
||||||
|
color: "black",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
</Button>
|
</Button>
|
||||||
@@ -0,0 +1,28 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
|
||||||
|
export async function portofolio_funGetAllDaftarByid({
|
||||||
|
profileId,
|
||||||
|
page,
|
||||||
|
}: {
|
||||||
|
profileId: string;
|
||||||
|
page: number;
|
||||||
|
}) {
|
||||||
|
const takeData = 10;
|
||||||
|
const skipData = page * takeData - takeData;
|
||||||
|
|
||||||
|
const data = await prisma.portofolio.findMany({
|
||||||
|
take: takeData,
|
||||||
|
skip: skipData,
|
||||||
|
orderBy: {
|
||||||
|
createdAt: "desc",
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
profileId: profileId,
|
||||||
|
active: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return data
|
||||||
|
}
|
||||||
@@ -4,19 +4,20 @@ import prisma from "@/app/lib/prisma";
|
|||||||
|
|
||||||
export async function funGetListPortofolio(profileId: any) {
|
export async function funGetListPortofolio(profileId: any) {
|
||||||
const data = await prisma.portofolio.findMany({
|
const data = await prisma.portofolio.findMany({
|
||||||
|
take: 2,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
createdAt: "desc"
|
createdAt: "desc",
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
profileId: profileId,
|
profileId: profileId,
|
||||||
active: true
|
active: true,
|
||||||
},
|
},
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
namaBisnis: true,
|
namaBisnis: true,
|
||||||
profileId: true
|
profileId: true,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
return data
|
return data;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export async function portofolio_getOneById(portoId: string) {
|
|||||||
Portofolio_MediaSosial: true,
|
Portofolio_MediaSosial: true,
|
||||||
Profile: {
|
Profile: {
|
||||||
select: {
|
select: {
|
||||||
|
userId: true,
|
||||||
User: {
|
User: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import CreatePortofolio from "./create/view";
|
import CreatePortofolio from "./create/view";
|
||||||
import CreatePortofolioLayout from "./create/layout";
|
import CreatePortofolioLayout from "./create/layout";
|
||||||
import ListPortofolioView from "./list_view/view";
|
import PortofolioLayout from "./ui/ui_layout";
|
||||||
import PortofolioLayout from "./main/layout";
|
import Portofolio_UiDetail from "./ui/ui_detail_portofolio";
|
||||||
import ViewPortofolio from "./main/view";
|
import Portofolio_EditDataBisnis from "./edit/data/ui_edit_data";
|
||||||
import Portofolio_EditDataBisnis from "./edit/data";
|
import Portofolio_EditLogoBisnis from "./edit/logo/ui_edit_logo";
|
||||||
import Portofolio_EditLogoBisnis from "./edit/logo";
|
import Portofolio_EditMedsosBisnis from "./edit/medsos/ui_edit_medsos";
|
||||||
import Portofolio_EditMedsosBisnis from "./edit/medsos";
|
|
||||||
import LayoutPortofolio_EditBisnis from "./edit/layout";
|
import LayoutPortofolio_EditBisnis from "./edit/layout";
|
||||||
import LayoutPortofolio_EditDataBisnis from "./edit/data/layout";
|
import LayoutPortofolio_EditDataBisnis from "./edit/data/layout";
|
||||||
import LayoutPortofolio_EditLogoBisnis from "./edit/logo/layout";
|
import LayoutPortofolio_EditLogoBisnis from "./edit/logo/layout";
|
||||||
@@ -14,9 +13,8 @@ import LayoutPortofolio_EditMedsosBisnis from "./edit/medsos/layout";
|
|||||||
export {
|
export {
|
||||||
CreatePortofolio,
|
CreatePortofolio,
|
||||||
CreatePortofolioLayout,
|
CreatePortofolioLayout,
|
||||||
ListPortofolioView,
|
|
||||||
PortofolioLayout,
|
PortofolioLayout,
|
||||||
ViewPortofolio,
|
Portofolio_UiDetail as ViewPortofolio,
|
||||||
Portofolio_EditDataBisnis,
|
Portofolio_EditDataBisnis,
|
||||||
Portofolio_EditLogoBisnis,
|
Portofolio_EditLogoBisnis,
|
||||||
Portofolio_EditMedsosBisnis,
|
Portofolio_EditMedsosBisnis,
|
||||||
@@ -25,3 +23,5 @@ export {
|
|||||||
LayoutPortofolio_EditLogoBisnis,
|
LayoutPortofolio_EditLogoBisnis,
|
||||||
LayoutPortofolio_EditMedsosBisnis,
|
LayoutPortofolio_EditMedsosBisnis,
|
||||||
};
|
};
|
||||||
|
export { Portofolio_ViewListDetail } from "./view/view_list_detail_portofolio";
|
||||||
|
|
||||||
|
|||||||
@@ -1,138 +0,0 @@
|
|||||||
"use client";
|
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
Box,
|
|
||||||
Center,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Loader,
|
|
||||||
Paper,
|
|
||||||
ScrollArea,
|
|
||||||
SimpleGrid,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { useState } from "react";
|
|
||||||
import _ from "lodash";
|
|
||||||
import {
|
|
||||||
IconCaretRight,
|
|
||||||
IconCaretRightFilled,
|
|
||||||
IconChevronRight,
|
|
||||||
IconCirclePlus,
|
|
||||||
IconEyeCheck,
|
|
||||||
IconPencilPlus,
|
|
||||||
} from "@tabler/icons-react";
|
|
||||||
|
|
||||||
import { MODEL_PORTOFOLIO_Lama } from "@/app_modules/model_global/portofolio";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import { MODEL_PROFILE } from "../../profile/model/interface";
|
|
||||||
import { MODEL_PORTOFOLIO } from "../model/interface";
|
|
||||||
|
|
||||||
export default function ListPortofolioView({
|
|
||||||
listPorto,
|
|
||||||
profile,
|
|
||||||
userLoginId,
|
|
||||||
}: {
|
|
||||||
listPorto: MODEL_PORTOFOLIO[];
|
|
||||||
profile: MODEL_PROFILE;
|
|
||||||
userLoginId: string;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [loadingPorto, setLoadingPorto] = useState(false);
|
|
||||||
const [idPorto, setIdPorto] = useState("");
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* <pre>{JSON.stringify(porto, null, 2)}</pre> */}
|
|
||||||
<Paper p={"md"} shadow="lg" withBorder bg={"gray.1"}>
|
|
||||||
<Stack spacing={"sm"}>
|
|
||||||
<Group position="apart">
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
<Title order={4}>Portofolio</Title>
|
|
||||||
{profile?.User.id === userLoginId ? (
|
|
||||||
<ActionIcon
|
|
||||||
loading={loading ? true : false}
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
router.push(RouterPortofolio.create + `${profile.id}`);
|
|
||||||
setLoading(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconPencilPlus color={Warna.biru} />
|
|
||||||
</ActionIcon>
|
|
||||||
) : (
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
)}
|
|
||||||
</Group>
|
|
||||||
<Box
|
|
||||||
h={
|
|
||||||
_.isEmpty(listPorto)
|
|
||||||
? 50
|
|
||||||
: listPorto.length === 1
|
|
||||||
? 100
|
|
||||||
: listPorto.length === 2
|
|
||||||
? 150
|
|
||||||
: 200
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<ScrollArea h={"100%"} scrollbarSize={10}>
|
|
||||||
{_.isEmpty(listPorto) ? (
|
|
||||||
<Center>
|
|
||||||
<Text fs={"italic"} fz={"xs"} c={"gray"}>
|
|
||||||
- Belum Ada Portofolio -
|
|
||||||
</Text>
|
|
||||||
</Center>
|
|
||||||
) : (
|
|
||||||
<SimpleGrid
|
|
||||||
cols={4}
|
|
||||||
spacing="md"
|
|
||||||
breakpoints={[
|
|
||||||
{ maxWidth: "md", cols: 3, spacing: "md" },
|
|
||||||
{ maxWidth: "sm", cols: 2, spacing: "sm" },
|
|
||||||
{ maxWidth: "xs", cols: 1, spacing: "sm" },
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{listPorto.map((e, i) => (
|
|
||||||
<Paper
|
|
||||||
shadow="sm"
|
|
||||||
key={i}
|
|
||||||
bg={"gray.5"}
|
|
||||||
radius={"md"}
|
|
||||||
onClick={() => {
|
|
||||||
setIdPorto(e?.id);
|
|
||||||
setLoadingPorto(true);
|
|
||||||
router.push(`/dev/portofolio/main/${e?.id}/`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Grid align="center" p={"sm"}>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Text fw={"bold"} lineClamp={1}>
|
|
||||||
{e?.namaBisnis}
|
|
||||||
</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"content"}>
|
|
||||||
<Stack>
|
|
||||||
{idPorto === e?.id && loadingPorto ? (
|
|
||||||
<Loader color="gray" size={25} />
|
|
||||||
) : (
|
|
||||||
<IconCaretRight color="black" size={25} />
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Paper>
|
|
||||||
))}
|
|
||||||
</SimpleGrid>
|
|
||||||
)}
|
|
||||||
</ScrollArea>
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
|
||||||
</Paper>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,114 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
Button,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Modal,
|
|
||||||
Stack,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import HeaderTransparent from "../../component/header_transparent";
|
|
||||||
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { IconArrowLeft, IconChevronLeft, IconEdit } from "@tabler/icons-react";
|
|
||||||
import ComponentKatalog_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import { title } from "process";
|
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
|
||||||
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
|
|
||||||
import { useState } from "react";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function PortofolioLayout({
|
|
||||||
children,
|
|
||||||
portoId,
|
|
||||||
userLoginId,
|
|
||||||
authorId,
|
|
||||||
}: {
|
|
||||||
children: any;
|
|
||||||
portoId: any;
|
|
||||||
userLoginId: string;
|
|
||||||
authorId: string;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
|
||||||
const [loadingData, setLoadingData] = useState(false);
|
|
||||||
const [loadingLogo, setLoadingLogo] = useState(false);
|
|
||||||
const [loadingMedia, setLoadingMedia] = useState(false);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<AppComponentGlobal_LayoutTamplate
|
|
||||||
header={
|
|
||||||
<Header height={50} sx={{ borderStyle: "none" }}>
|
|
||||||
<Group h={50} position="apart" px={"md"}>
|
|
||||||
<ActionIcon
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
router.back();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconChevronLeft />
|
|
||||||
</ActionIcon>
|
|
||||||
<Title order={5}>Detail Portofolio</Title>
|
|
||||||
{userLoginId === authorId ? (
|
|
||||||
<ActionIcon variant="transparent" onClick={() => open()}>
|
|
||||||
<IconEdit />
|
|
||||||
</ActionIcon>
|
|
||||||
) : (
|
|
||||||
<ActionIcon disabled variant="transparent"></ActionIcon>
|
|
||||||
)}
|
|
||||||
</Group>
|
|
||||||
</Header>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<Modal opened={opened} onClose={close} centered withCloseButton={false}>
|
|
||||||
<Stack>
|
|
||||||
<Title order={6}>Anda ingin mengupdate Detail Bisnis ?</Title>
|
|
||||||
<Button
|
|
||||||
radius={"xl"}
|
|
||||||
variant="outline"
|
|
||||||
loaderPosition="center"
|
|
||||||
loading={loadingData ? true : false}
|
|
||||||
onClick={() => {
|
|
||||||
setLoadingData(true);
|
|
||||||
router.push(RouterPortofolio.edit_data_bisnis + `${portoId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Data Bisnis
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
radius={"xl"}
|
|
||||||
variant="outline"
|
|
||||||
color="green"
|
|
||||||
loaderPosition="center"
|
|
||||||
loading={loadingLogo ? true : false}
|
|
||||||
onClick={() => {
|
|
||||||
setLoadingLogo(true);
|
|
||||||
router.push(RouterPortofolio.edit_logo_bisnis + `${portoId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Logo Bisnis
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
radius={"xl"}
|
|
||||||
variant="outline"
|
|
||||||
color="orange"
|
|
||||||
loaderPosition="center"
|
|
||||||
loading={loadingMedia ? true : false}
|
|
||||||
onClick={() => {
|
|
||||||
setLoadingMedia(true);
|
|
||||||
router.push(RouterPortofolio.edit_medsos_bisnis + `${portoId}`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Media Sosial
|
|
||||||
</Button>
|
|
||||||
</Stack>
|
|
||||||
</Modal>
|
|
||||||
{children}
|
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,241 +0,0 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import {
|
|
||||||
RouterPortofolio,
|
|
||||||
RouterProfile,
|
|
||||||
} from "@/app/lib/router_hipmi/router_katalog";
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import { MODEL_PORTOFOLIO_OLD } from "@/app_modules/model_global/portofolio";
|
|
||||||
import {
|
|
||||||
AspectRatio,
|
|
||||||
Box,
|
|
||||||
Button,
|
|
||||||
Center,
|
|
||||||
Grid,
|
|
||||||
Group,
|
|
||||||
Image,
|
|
||||||
Modal,
|
|
||||||
Paper,
|
|
||||||
Stack,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import {
|
|
||||||
IconBrandFacebook,
|
|
||||||
IconBrandInstagram,
|
|
||||||
IconBrandTiktok,
|
|
||||||
IconBrandTwitter,
|
|
||||||
IconBrandYoutube,
|
|
||||||
IconBuilding,
|
|
||||||
IconBuildingSkyscraper,
|
|
||||||
IconListDetails,
|
|
||||||
IconMapPin,
|
|
||||||
IconNotes,
|
|
||||||
IconPhoneCall,
|
|
||||||
IconPinned,
|
|
||||||
IconTrash,
|
|
||||||
} from "@tabler/icons-react";
|
|
||||||
import { redirect, useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { MODEL_PORTOFOLIO } from "../model/interface";
|
|
||||||
import { useDisclosure, useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { portofolio_getOneById } from "../fun/get/get_one_portofolio";
|
|
||||||
import _ from "lodash";
|
|
||||||
import { Portofolio_funDeletePortofolioById } from "../fun/delete/fun_delete_by_id";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
|
||||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
|
||||||
|
|
||||||
export default function ViewPortofolio({
|
|
||||||
dataPorto,
|
|
||||||
userLoginId,
|
|
||||||
}: {
|
|
||||||
dataPorto: MODEL_PORTOFOLIO;
|
|
||||||
userLoginId: string;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [porto, setPorto] = useState(dataPorto);
|
|
||||||
const [opened, { open, close }] = useDisclosure(false);
|
|
||||||
const [loadingDel, setLoadingDel] = useState(false);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
{/* <pre>{JSON.stringify(porto, null, 2)}</pre> */}
|
|
||||||
<Stack>
|
|
||||||
<Paper p={"sm"} withBorder shadow="lg">
|
|
||||||
<Title order={6}>Data Bisnis</Title>
|
|
||||||
<Stack p={"sm"}>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconBuildingSkyscraper />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Text>{dataPorto?.namaBisnis}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconPhoneCall />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Text>+{dataPorto?.tlpn}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconMapPin />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Text>{dataPorto?.alamatKantor}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconListDetails />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Text>{dataPorto?.MasterBidangBisnis.name}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconPinned />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Text>{dataPorto?.deskripsi}</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
</Paper>
|
|
||||||
<Paper p={"sm"} withBorder shadow="lg">
|
|
||||||
<Title order={6}>Logo Bisnis</Title>
|
|
||||||
|
|
||||||
<AspectRatio ratio={1 / 1}>
|
|
||||||
<Paper>
|
|
||||||
<Image
|
|
||||||
alt="Foto"
|
|
||||||
src={RouterPortofolio.api_logo_porto + `${dataPorto?.logoId}`}
|
|
||||||
/>
|
|
||||||
</Paper>
|
|
||||||
</AspectRatio>
|
|
||||||
</Paper>
|
|
||||||
<Paper p={"sm"} withBorder shadow="lg">
|
|
||||||
<Title order={6}>Media Sosial Bisnis</Title>
|
|
||||||
|
|
||||||
<Stack p={"sm"}>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconBrandFacebook />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
{dataPorto?.Portofolio_MediaSosial.facebook ? (
|
|
||||||
<Text>{dataPorto?.Portofolio_MediaSosial.facebook}</Text>
|
|
||||||
) : (
|
|
||||||
"-"
|
|
||||||
)}
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconBrandInstagram />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
{dataPorto?.Portofolio_MediaSosial.instagram ? (
|
|
||||||
<Text>{dataPorto?.Portofolio_MediaSosial.instagram}</Text>
|
|
||||||
) : (
|
|
||||||
"-"
|
|
||||||
)}
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconBrandTiktok />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
{dataPorto?.Portofolio_MediaSosial.tiktok ? (
|
|
||||||
<Text>{dataPorto?.Portofolio_MediaSosial.tiktok}</Text>
|
|
||||||
) : (
|
|
||||||
"-"
|
|
||||||
)}
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconBrandTwitter />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
{dataPorto?.Portofolio_MediaSosial.twitter ? (
|
|
||||||
<Text>{dataPorto?.Portofolio_MediaSosial.twitter}</Text>
|
|
||||||
) : (
|
|
||||||
"-"
|
|
||||||
)}
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
<Grid>
|
|
||||||
<Grid.Col span={2}>
|
|
||||||
<IconBrandYoutube />
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
{dataPorto?.Portofolio_MediaSosial.youtube ? (
|
|
||||||
<Text>{dataPorto?.Portofolio_MediaSosial.youtube}</Text>
|
|
||||||
) : (
|
|
||||||
"-"
|
|
||||||
)}
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Stack>
|
|
||||||
</Paper>
|
|
||||||
{userLoginId === dataPorto?.Profile?.User?.id ? (
|
|
||||||
<Button
|
|
||||||
radius={"xl"}
|
|
||||||
bg={"red"}
|
|
||||||
color="red"
|
|
||||||
onClick={() => {
|
|
||||||
open();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<IconTrash />
|
|
||||||
</Button>
|
|
||||||
) : (
|
|
||||||
""
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
|
|
||||||
<Modal opened={opened} onClose={close} centered withCloseButton={false}>
|
|
||||||
<Stack>
|
|
||||||
<Title order={6}>Anda yakin menghapus portofolio ini ?</Title>
|
|
||||||
<Group position="center">
|
|
||||||
<Button radius={"xl"} onClick={() => close()}>
|
|
||||||
Batal
|
|
||||||
</Button>
|
|
||||||
<Button
|
|
||||||
radius={"xl"}
|
|
||||||
color="red"
|
|
||||||
loaderPosition="center"
|
|
||||||
loading={loadingDel ? true : false}
|
|
||||||
onClick={() => onDelete(router, dataPorto as any, setLoadingDel)}
|
|
||||||
>
|
|
||||||
Hapus
|
|
||||||
</Button>
|
|
||||||
</Group>
|
|
||||||
</Stack>
|
|
||||||
</Modal>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function onDelete(
|
|
||||||
router: AppRouterInstance,
|
|
||||||
dataPorto: MODEL_PORTOFOLIO,
|
|
||||||
setLoadingDel: any
|
|
||||||
) {
|
|
||||||
await Portofolio_funDeletePortofolioById(dataPorto).then((res) => {
|
|
||||||
if (res.status === 200) {
|
|
||||||
setLoadingDel(true);
|
|
||||||
ComponentGlobal_NotifikasiBerhasil(res.message);
|
|
||||||
router.back();
|
|
||||||
} else {
|
|
||||||
ComponentGlobal_NotifikasiGagal(res.message);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
75
src/app_modules/katalog/portofolio/ui/ui_detail_data.tsx
Normal file
75
src/app_modules/katalog/portofolio/ui/ui_detail_data.tsx
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
import { Paper, Title, Stack, Grid, Text } from "@mantine/core";
|
||||||
|
import {
|
||||||
|
IconBuildingSkyscraper,
|
||||||
|
IconPhoneCall,
|
||||||
|
IconMapPin,
|
||||||
|
IconListDetails,
|
||||||
|
IconPinned,
|
||||||
|
} from "@tabler/icons-react";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
import { AccentColor } from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
|
export function Portofolio_UiDetailData({
|
||||||
|
dataPorto,
|
||||||
|
}: {
|
||||||
|
dataPorto: MODEL_PORTOFOLIO;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Paper
|
||||||
|
p={"sm"}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Title order={6}>Data Bisnis</Title>
|
||||||
|
<Stack p={"sm"}>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconBuildingSkyscraper />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
<Text>{dataPorto?.namaBisnis}</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconPhoneCall />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
<Text>+{dataPorto?.tlpn}</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconMapPin />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
<Text>{dataPorto?.alamatKantor}</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconListDetails />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
<Text>{dataPorto?.MasterBidangBisnis.name}</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconPinned />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
<Text>{dataPorto?.deskripsi}</Text>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
</Paper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
36
src/app_modules/katalog/portofolio/ui/ui_detail_logo.tsx
Normal file
36
src/app_modules/katalog/portofolio/ui/ui_detail_logo.tsx
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
|
import { Paper, Title, AspectRatio, Image } from "@mantine/core";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
import { AccentColor } from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
|
export function Portofolio_UiDetailLogo({
|
||||||
|
dataPorto,
|
||||||
|
}: {
|
||||||
|
dataPorto: MODEL_PORTOFOLIO;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Paper
|
||||||
|
p={"sm"}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Title mb={"lg"} order={6}>Logo Bisnis</Title>
|
||||||
|
|
||||||
|
<AspectRatio ratio={1 / 1}>
|
||||||
|
<Paper>
|
||||||
|
<Image
|
||||||
|
alt="Foto"
|
||||||
|
src={RouterPortofolio.api_logo_porto + `${dataPorto?.logoId}`}
|
||||||
|
/>
|
||||||
|
</Paper>
|
||||||
|
</AspectRatio>
|
||||||
|
</Paper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
98
src/app_modules/katalog/portofolio/ui/ui_detail_media.tsx
Normal file
98
src/app_modules/katalog/portofolio/ui/ui_detail_media.tsx
Normal file
@@ -0,0 +1,98 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import { Paper, Title, Stack, Grid, Text } from "@mantine/core";
|
||||||
|
import {
|
||||||
|
IconBrandFacebook,
|
||||||
|
IconBrandInstagram,
|
||||||
|
IconBrandTiktok,
|
||||||
|
IconBrandTwitter,
|
||||||
|
IconBrandYoutube,
|
||||||
|
} from "@tabler/icons-react";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
import { AccentColor } from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
|
export function Portofolio_UiSosialMedia({
|
||||||
|
dataPorto,
|
||||||
|
}: {
|
||||||
|
dataPorto: MODEL_PORTOFOLIO;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Paper
|
||||||
|
p={"sm"}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Title order={6}>Media Sosial Bisnis</Title>
|
||||||
|
|
||||||
|
<Stack p={"sm"}>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconBrandFacebook />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
{dataPorto?.Portofolio_MediaSosial.facebook ? (
|
||||||
|
<Text>{dataPorto?.Portofolio_MediaSosial.facebook}</Text>
|
||||||
|
) : (
|
||||||
|
"-"
|
||||||
|
)}
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconBrandInstagram />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
{dataPorto?.Portofolio_MediaSosial.instagram ? (
|
||||||
|
<Text>{dataPorto?.Portofolio_MediaSosial.instagram}</Text>
|
||||||
|
) : (
|
||||||
|
"-"
|
||||||
|
)}
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconBrandTiktok />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
{dataPorto?.Portofolio_MediaSosial.tiktok ? (
|
||||||
|
<Text>{dataPorto?.Portofolio_MediaSosial.tiktok}</Text>
|
||||||
|
) : (
|
||||||
|
"-"
|
||||||
|
)}
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconBrandTwitter />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
{dataPorto?.Portofolio_MediaSosial.twitter ? (
|
||||||
|
<Text>{dataPorto?.Portofolio_MediaSosial.twitter}</Text>
|
||||||
|
) : (
|
||||||
|
"-"
|
||||||
|
)}
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
<Grid>
|
||||||
|
<Grid.Col span={2}>
|
||||||
|
<IconBrandYoutube />
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col span={"auto"}>
|
||||||
|
{dataPorto?.Portofolio_MediaSosial.youtube ? (
|
||||||
|
<Text>{dataPorto?.Portofolio_MediaSosial.youtube}</Text>
|
||||||
|
) : (
|
||||||
|
"-"
|
||||||
|
)}
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Stack>
|
||||||
|
</Paper>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import {
|
||||||
|
Stack
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { ComponentPortofolio_ButtonDelete } from "../component/button_delete";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
import { Portofolio_UiDetailData } from "./ui_detail_data";
|
||||||
|
import { Portofolio_UiDetailLogo } from "./ui_detail_logo";
|
||||||
|
import { Portofolio_UiSosialMedia } from "./ui_detail_media";
|
||||||
|
|
||||||
|
export default function Portofolio_UiDetail({
|
||||||
|
dataPorto,
|
||||||
|
userLoginId,
|
||||||
|
}: {
|
||||||
|
dataPorto: MODEL_PORTOFOLIO;
|
||||||
|
userLoginId: string;
|
||||||
|
}) {
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Stack mb={"lg"}>
|
||||||
|
<Portofolio_UiDetailData dataPorto={dataPorto} />
|
||||||
|
<Portofolio_UiDetailLogo dataPorto={dataPorto} />
|
||||||
|
<Portofolio_UiSosialMedia dataPorto={dataPorto} />
|
||||||
|
|
||||||
|
<ComponentPortofolio_ButtonDelete
|
||||||
|
dataPorto={dataPorto}
|
||||||
|
userLoginId={userLoginId}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
36
src/app_modules/katalog/portofolio/ui/ui_layout.tsx
Normal file
36
src/app_modules/katalog/portofolio/ui/ui_layout.tsx
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
|
import { ComponentPortofolio_ButtonMore } from "../component/button_more";
|
||||||
|
|
||||||
|
export default function PortofolioLayout({
|
||||||
|
children,
|
||||||
|
portoId,
|
||||||
|
userLoginId,
|
||||||
|
authorId,
|
||||||
|
}: {
|
||||||
|
children: any;
|
||||||
|
portoId: any;
|
||||||
|
userLoginId: string;
|
||||||
|
authorId: string;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<UIGlobal_LayoutTamplate
|
||||||
|
header={
|
||||||
|
<UIGlobal_LayoutHeaderTamplate
|
||||||
|
title="Detail Portofolio"
|
||||||
|
customButtonRight={
|
||||||
|
<ComponentPortofolio_ButtonMore
|
||||||
|
portoId={portoId}
|
||||||
|
authorId={authorId}
|
||||||
|
userLoginId={userLoginId}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</UIGlobal_LayoutTamplate>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
"use client";
|
||||||
|
|
||||||
|
import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader";
|
||||||
|
import { Box, Center } from "@mantine/core";
|
||||||
|
import { ScrollOnly } from "next-scroll-loader";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { ComponentPortofolio_DaftarBoxView } from "../component/card_view_daftar";
|
||||||
|
import { portofolio_funGetAllDaftarByid } from "../fun/get/get_all_portofolio";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
|
||||||
|
export function Portofolio_UiListDetail({
|
||||||
|
dataPortofolio,
|
||||||
|
profileId,
|
||||||
|
}: {
|
||||||
|
dataPortofolio: MODEL_PORTOFOLIO[];
|
||||||
|
profileId: string;
|
||||||
|
}) {
|
||||||
|
const [data, setData] = useState(dataPortofolio);
|
||||||
|
const [activePage, setActivePage] = useState(1);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Box py={5}>
|
||||||
|
<ScrollOnly
|
||||||
|
height="90vh"
|
||||||
|
renderLoading={() => (
|
||||||
|
<Center mt={"lg"}>
|
||||||
|
<ComponentGlobal_UI_Loader />
|
||||||
|
</Center>
|
||||||
|
)}
|
||||||
|
data={data}
|
||||||
|
setData={setData}
|
||||||
|
moreData={async () => {
|
||||||
|
const loadData = await portofolio_funGetAllDaftarByid({
|
||||||
|
profileId,
|
||||||
|
page: activePage + 1,
|
||||||
|
});
|
||||||
|
setActivePage((val) => val + 1);
|
||||||
|
|
||||||
|
return loadData;
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{(item) => <ComponentPortofolio_DaftarBoxView data={item} />}
|
||||||
|
</ScrollOnly>
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,141 +0,0 @@
|
|||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { MODEL_PROFILE } from "../profile/model/interface";
|
|
||||||
import { MODEL_PORTOFOLIO } from "./model/interface";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
|
||||||
import {
|
|
||||||
Paper,
|
|
||||||
Stack,
|
|
||||||
Group,
|
|
||||||
ActionIcon,
|
|
||||||
Title,
|
|
||||||
Box,
|
|
||||||
ScrollArea,
|
|
||||||
Center,
|
|
||||||
SimpleGrid,
|
|
||||||
Grid,
|
|
||||||
Loader,
|
|
||||||
Text,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { IconPencilPlus, IconCaretRight } from "@tabler/icons-react";
|
|
||||||
import _ from "lodash";
|
|
||||||
import {
|
|
||||||
AccentColor,
|
|
||||||
MainColor,
|
|
||||||
} from "@/app_modules/component_global/color/color_pallet";
|
|
||||||
import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader";
|
|
||||||
|
|
||||||
export function Portofolio_UiView({
|
|
||||||
listPorto,
|
|
||||||
profile,
|
|
||||||
userLoginId,
|
|
||||||
}: {
|
|
||||||
listPorto: MODEL_PORTOFOLIO[];
|
|
||||||
profile: MODEL_PROFILE;
|
|
||||||
userLoginId: string;
|
|
||||||
}) {
|
|
||||||
const router = useRouter();
|
|
||||||
const [loading, setLoading] = useState(false);
|
|
||||||
const [loadingPorto, setLoadingPorto] = useState(false);
|
|
||||||
const [idPorto, setIdPorto] = useState("");
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<Box
|
|
||||||
style={{
|
|
||||||
backgroundColor: AccentColor.darkblue,
|
|
||||||
border: `2px solid ${AccentColor.blue}`,
|
|
||||||
borderRadius: "10px ",
|
|
||||||
padding: "15px",
|
|
||||||
color: "white",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Stack spacing={"sm"}>
|
|
||||||
<Group position="apart">
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
<Title order={4}>Portofolio</Title>
|
|
||||||
{profile?.User.id === userLoginId ? (
|
|
||||||
<ActionIcon
|
|
||||||
variant="transparent"
|
|
||||||
onClick={() => {
|
|
||||||
router.push(RouterPortofolio.create + `${profile.id}`);
|
|
||||||
setLoading(true);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{loading ? (
|
|
||||||
<ComponentGlobal_UI_Loader />
|
|
||||||
) : (
|
|
||||||
<IconPencilPlus color={AccentColor.yellow} />
|
|
||||||
)}
|
|
||||||
</ActionIcon>
|
|
||||||
) : (
|
|
||||||
<ActionIcon variant="transparent" disabled></ActionIcon>
|
|
||||||
)}
|
|
||||||
</Group>
|
|
||||||
<Box
|
|
||||||
h={
|
|
||||||
_.isEmpty(listPorto)
|
|
||||||
? 50
|
|
||||||
: listPorto.length === 1
|
|
||||||
? 100
|
|
||||||
: listPorto.length === 2
|
|
||||||
? 150
|
|
||||||
: 200
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<ScrollArea h={"100%"} scrollbarSize={10}>
|
|
||||||
{_.isEmpty(listPorto) ? (
|
|
||||||
<Center>
|
|
||||||
<Text fs={"italic"} fz={"xs"} c={"gray"}>
|
|
||||||
- Belum Ada Portofolio -
|
|
||||||
</Text>
|
|
||||||
</Center>
|
|
||||||
) : (
|
|
||||||
<SimpleGrid
|
|
||||||
cols={4}
|
|
||||||
spacing="md"
|
|
||||||
breakpoints={[
|
|
||||||
{ maxWidth: "md", cols: 3, spacing: "md" },
|
|
||||||
{ maxWidth: "sm", cols: 2, spacing: "sm" },
|
|
||||||
{ maxWidth: "xs", cols: 1, spacing: "sm" },
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
{listPorto.map((e, i) => (
|
|
||||||
<Paper
|
|
||||||
shadow="sm"
|
|
||||||
key={i}
|
|
||||||
bg={"gray.5"}
|
|
||||||
radius={"md"}
|
|
||||||
onClick={() => {
|
|
||||||
setIdPorto(e?.id);
|
|
||||||
setLoadingPorto(true);
|
|
||||||
router.push(`/dev/portofolio/main/${e?.id}/`);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Grid align="center" p={"sm"}>
|
|
||||||
<Grid.Col span={"auto"}>
|
|
||||||
<Text fw={"bold"} lineClamp={1}>
|
|
||||||
{e?.namaBisnis}
|
|
||||||
</Text>
|
|
||||||
</Grid.Col>
|
|
||||||
<Grid.Col span={"content"}>
|
|
||||||
<Stack>
|
|
||||||
{idPorto === e?.id && loadingPorto ? (
|
|
||||||
<Loader color="gray" size={25} />
|
|
||||||
) : (
|
|
||||||
<IconCaretRight color="black" size={25} />
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
</Grid.Col>
|
|
||||||
</Grid>
|
|
||||||
</Paper>
|
|
||||||
))}
|
|
||||||
</SimpleGrid>
|
|
||||||
)}
|
|
||||||
</ScrollArea>
|
|
||||||
</Box>
|
|
||||||
</Stack>
|
|
||||||
</Box>
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
|
import React from "react";
|
||||||
|
import { Portofolio_UiListDetail } from "../ui/ui_list_detail_portofolio";
|
||||||
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../model/interface";
|
||||||
|
|
||||||
|
export async function Portofolio_ViewListDetail({
|
||||||
|
dataPortofolio,
|
||||||
|
profileId
|
||||||
|
}: {
|
||||||
|
dataPortofolio: MODEL_PORTOFOLIO[]
|
||||||
|
profileId: string
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<UIGlobal_LayoutTamplate
|
||||||
|
header={<UIGlobal_LayoutHeaderTamplate title="Daftar Portofolio" />}
|
||||||
|
>
|
||||||
|
<Portofolio_UiListDetail dataPortofolio={dataPortofolio} profileId={profileId} />
|
||||||
|
</UIGlobal_LayoutTamplate>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,27 +1,15 @@
|
|||||||
"use client";
|
|
||||||
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
|
|
||||||
export default function ProfileLayout({ children }: { children: any }) {
|
export default function ProfileLayout({ children }: { children: any }) {
|
||||||
const router = useRouter();
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentGlobal_HeaderTamplate title="Buat Profile" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Buat Profile" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,12 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { myConsole } from "@/app/fun/my_console";
|
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
||||||
import { ApiHipmi } from "@/app/lib/api";
|
import ComponentGlobal_BoxInformation from "@/app_modules/component_global/box_information";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { AccentColor, MainColor } from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input";
|
||||||
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||||
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||||
import {
|
import {
|
||||||
AspectRatio,
|
AspectRatio,
|
||||||
Avatar,
|
Avatar,
|
||||||
@@ -17,25 +21,13 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
TextInput,
|
TextInput,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useAtom } from "jotai";
|
import { IconAt, IconCamera, IconUpload } from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import toast from "react-simple-toasts";
|
|
||||||
import funCreateNewProfile from "../fun/fun_create_profile";
|
|
||||||
import { IconAt, IconCamera, IconUpload } from "@tabler/icons-react";
|
|
||||||
import ComponentKatalog_NotedBox from "../../component/noted_box";
|
|
||||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
|
||||||
import { MODEL_PROFILE } from "../model/interface";
|
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
|
||||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
|
||||||
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
|
||||||
import { useForm } from "@mantine/form";
|
|
||||||
import { useTimeout } from "@mantine/hooks";
|
|
||||||
import { validRegex } from "../../component/regular_expressions";
|
import { validRegex } from "../../component/regular_expressions";
|
||||||
import ComponentGlobal_ErrorInput from "@/app_modules/component_global/error_input";
|
import funCreateNewProfile from "../fun/fun_create_profile";
|
||||||
|
import { MODEL_PROFILE } from "../model/interface";
|
||||||
|
|
||||||
export default function CreateProfile({ userId }: { userId: any }) {
|
export default function CreateProfile({ userId }: { userId: any }) {
|
||||||
const [filePP, setFilePP] = useState<File | null>(null);
|
const [filePP, setFilePP] = useState<File | null>(null);
|
||||||
@@ -55,7 +47,7 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
<Stack px={"sm"} spacing={"xl"}>
|
<Stack px={"sm"} spacing={"xl"}>
|
||||||
<Box>
|
<Box>
|
||||||
<Stack>
|
<Stack>
|
||||||
<ComponentKatalog_NotedBox informasi="Upload foto profile anda." />
|
<ComponentGlobal_BoxInformation informasi="Upload foto profile anda." />
|
||||||
<Center>
|
<Center>
|
||||||
{imgPP ? (
|
{imgPP ? (
|
||||||
<Paper shadow="lg" radius={"100%"}>
|
<Paper shadow="lg" radius={"100%"}>
|
||||||
@@ -100,8 +92,6 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
setImgPP(buffer);
|
setImgPP(buffer);
|
||||||
setFilePP(files);
|
setFilePP(files);
|
||||||
}
|
}
|
||||||
// console.log(buffer, "ini buffer");
|
|
||||||
// console.log(files, " ini file");
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error);
|
console.log(error);
|
||||||
}
|
}
|
||||||
@@ -112,10 +102,10 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
<Button
|
<Button
|
||||||
{...props}
|
{...props}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
variant="outline"
|
|
||||||
w={150}
|
|
||||||
leftIcon={<IconCamera />}
|
leftIcon={<IconCamera />}
|
||||||
compact
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</Button>
|
</Button>
|
||||||
@@ -127,7 +117,7 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
|
|
||||||
<Box>
|
<Box>
|
||||||
<Stack>
|
<Stack>
|
||||||
<ComponentKatalog_NotedBox informasi="Upload foto latar belakang profile anda." />
|
<ComponentGlobal_BoxInformation informasi="Upload foto latar belakang profile anda." />
|
||||||
<AspectRatio ratio={16 / 9}>
|
<AspectRatio ratio={16 / 9}>
|
||||||
<Paper radius={"md"} withBorder shadow="lg" bg={"gray.2"}>
|
<Paper radius={"md"} withBorder shadow="lg" bg={"gray.2"}>
|
||||||
{imgBG ? (
|
{imgBG ? (
|
||||||
@@ -171,10 +161,10 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
<Button
|
<Button
|
||||||
{...props}
|
{...props}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
variant="outline"
|
|
||||||
w={150}
|
|
||||||
leftIcon={<IconCamera />}
|
leftIcon={<IconCamera />}
|
||||||
compact
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</Button>
|
</Button>
|
||||||
@@ -186,8 +176,11 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
|
|
||||||
<Stack mb={"lg"}>
|
<Stack mb={"lg"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: { color: "white" },
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Nama"
|
label={"Nama"}
|
||||||
maxLength={50}
|
maxLength={50}
|
||||||
placeholder="Nama lengkap"
|
placeholder="Nama lengkap"
|
||||||
onChange={(val) => {
|
onChange={(val) => {
|
||||||
@@ -198,6 +191,9 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: { color: "white" },
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
icon={<IconAt size={15} />}
|
icon={<IconAt size={15} />}
|
||||||
label="Email"
|
label="Email"
|
||||||
@@ -218,6 +214,9 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: { color: "white" },
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Alamat"
|
label="Alamat"
|
||||||
maxLength={100}
|
maxLength={100}
|
||||||
@@ -231,6 +230,9 @@ export default function CreateProfile({ userId }: { userId: any }) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
|
styles={{
|
||||||
|
label: { color: "white" },
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Jenis Kelamin"
|
label="Jenis Kelamin"
|
||||||
placeholder="Pilih satu"
|
placeholder="Pilih satu"
|
||||||
@@ -315,11 +317,15 @@ function ButtonAction({
|
|||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
mt={"md"}
|
mt={"md"}
|
||||||
radius={50}
|
radius={50}
|
||||||
bg={Warna.hijau_muda}
|
bg={MainColor.yellow}
|
||||||
color="green"
|
color="yellow"
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
onSubmit();
|
onSubmit();
|
||||||
}}
|
}}
|
||||||
|
style={{
|
||||||
|
border: `2px solid ${AccentColor.yellow}`,
|
||||||
|
color: "black",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
Simpan
|
Simpan
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,27 +1,14 @@
|
|||||||
"use client";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Text,
|
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import ComponentKatalog_HeaderTamplate from "../../component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function EditProfileLayout({ children }: { children: any }) {
|
export default function EditProfileLayout({ children }: { children: any }) {
|
||||||
const router = useRouter();
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentKatalog_HeaderTamplate title="Edit Profile" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Edit Profile" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/
|
|||||||
import { validRegex } from "../../component/regular_expressions";
|
import { validRegex } from "../../component/regular_expressions";
|
||||||
import { Profile_funEditById } from "../fun/update/fun_edit_profile_by_id";
|
import { Profile_funEditById } from "../fun/update/fun_edit_profile_by_id";
|
||||||
import { MODEL_PROFILE } from "../model/interface";
|
import { MODEL_PROFILE } from "../model/interface";
|
||||||
|
import { MainColor } from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@@ -50,6 +51,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
|||||||
{/* <pre>{JSON.stringify(dataProfile, null, 2)}</pre> */}
|
{/* <pre>{JSON.stringify(dataProfile, null, 2)}</pre> */}
|
||||||
<Stack px={"sm"}>
|
<Stack px={"sm"}>
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Nomor"
|
label="Nomor"
|
||||||
disabled
|
disabled
|
||||||
@@ -57,6 +63,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Username"
|
label="Username"
|
||||||
error={
|
error={
|
||||||
@@ -78,6 +89,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Nama"
|
label="Nama"
|
||||||
placeholder="nama"
|
placeholder="nama"
|
||||||
@@ -99,6 +115,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Email"
|
label="Email"
|
||||||
placeholder="email"
|
placeholder="email"
|
||||||
@@ -122,6 +143,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<TextInput
|
<TextInput
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Alamat"
|
label="Alamat"
|
||||||
placeholder="alamat"
|
placeholder="alamat"
|
||||||
@@ -143,6 +169,11 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
|||||||
/>
|
/>
|
||||||
|
|
||||||
<Select
|
<Select
|
||||||
|
styles={{
|
||||||
|
label: {
|
||||||
|
color: "white",
|
||||||
|
},
|
||||||
|
}}
|
||||||
withAsterisk
|
withAsterisk
|
||||||
label="Jenis Kelamin"
|
label="Jenis Kelamin"
|
||||||
value={dataProfile?.jenisKelamin}
|
value={dataProfile?.jenisKelamin}
|
||||||
@@ -161,8 +192,9 @@ export default function EditProfile({ data }: { data: MODEL_PROFILE }) {
|
|||||||
<Button
|
<Button
|
||||||
mt={"md"}
|
mt={"md"}
|
||||||
radius={50}
|
radius={50}
|
||||||
bg={Warna.biru}
|
bg={MainColor.yellow}
|
||||||
color="cyan"
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
loading={loading ? true : false}
|
loading={loading ? true : false}
|
||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
onClick={() => onUpdate()}
|
onClick={() => onUpdate()}
|
||||||
|
|||||||
@@ -8,21 +8,23 @@ import {
|
|||||||
Image,
|
Image,
|
||||||
Paper,
|
Paper,
|
||||||
Stack,
|
Stack,
|
||||||
Title,
|
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
import { MODEL_PROFILE } from "../../model/interface";
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||||
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||||
import { IconCamera } from "@tabler/icons-react";
|
import { IconCamera } from "@tabler/icons-react";
|
||||||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { Profile_funUpdateFoto } from "../../fun/update/fun_update_foto_profile";
|
|
||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
|
||||||
import { Profile_funUpdateBackground } from "../../fun/update/fun_update_background";
|
import { Profile_funUpdateBackground } from "../../fun/update/fun_update_background";
|
||||||
|
import { MODEL_PROFILE } from "../../model/interface";
|
||||||
|
import {
|
||||||
|
AccentColor,
|
||||||
|
MainColor,
|
||||||
|
} from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
export default function Profile_UpdateFotoBackground({
|
export default function Profile_UpdateFotoBackground({
|
||||||
dataProfile,
|
dataProfile,
|
||||||
@@ -38,7 +40,14 @@ export default function Profile_UpdateFotoBackground({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xl"}>
|
<Stack spacing={"xl"}>
|
||||||
<Paper p={"sm"} withBorder radius={"sm"} shadow="">
|
<Paper
|
||||||
|
p={"sm"}
|
||||||
|
radius={"sm"}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<AspectRatio ratio={16 / 9}>
|
<AspectRatio ratio={16 / 9}>
|
||||||
<Image
|
<Image
|
||||||
@@ -77,10 +86,10 @@ export default function Profile_UpdateFotoBackground({
|
|||||||
<Button
|
<Button
|
||||||
{...props}
|
{...props}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
variant="outline"
|
|
||||||
w={150}
|
|
||||||
leftIcon={<IconCamera />}
|
leftIcon={<IconCamera />}
|
||||||
compact
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</Button>
|
</Button>
|
||||||
@@ -96,6 +105,10 @@ export default function Profile_UpdateFotoBackground({
|
|||||||
loaderPosition="center"
|
loaderPosition="center"
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
onClick={() => onUpdate(router, profile.id, file as any, setLoading)}
|
onClick={() => onUpdate(router, profile.id, file as any, setLoading)}
|
||||||
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
|
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,38 +1,18 @@
|
|||||||
"use client";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
FileButton,
|
|
||||||
Flex,
|
|
||||||
Footer,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Text,
|
|
||||||
} from "@mantine/core";
|
|
||||||
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
import ComponentKatalog_HeaderTamplate from "@/app_modules/katalog/component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function LayoutProfile_UpdateFotoBackground({
|
export default function LayoutProfile_UpdateFotoBackground({
|
||||||
children,
|
children,
|
||||||
|
|
||||||
}: {
|
}: {
|
||||||
children: any;
|
children: any;
|
||||||
|
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentKatalog_HeaderTamplate title="Update Background" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Update Background" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,10 @@ import { Profile_funUpdateFoto } from "../../fun/update/fun_update_foto_profile"
|
|||||||
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
import { ComponentGlobal_NotifikasiBerhasil } from "@/app_modules/component_global/notif_global/notifikasi_berhasil";
|
||||||
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
import { ComponentGlobal_NotifikasiGagal } from "@/app_modules/component_global/notif_global/notifikasi_gagal";
|
||||||
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
import { ComponentGlobal_NotifikasiPeringatan } from "@/app_modules/component_global/notif_global/notifikasi_peringatan";
|
||||||
|
import {
|
||||||
|
AccentColor,
|
||||||
|
MainColor,
|
||||||
|
} from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
|
||||||
export default function UploadFotoProfile({
|
export default function UploadFotoProfile({
|
||||||
dataProfile,
|
dataProfile,
|
||||||
@@ -35,7 +39,14 @@ export default function UploadFotoProfile({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack spacing={"xl"}>
|
<Stack spacing={"xl"}>
|
||||||
<Paper p={"sm"} withBorder radius={"sm"} shadow="">
|
<Paper
|
||||||
|
p={"sm"}
|
||||||
|
radius={"sm"}
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Stack>
|
<Stack>
|
||||||
<AspectRatio ratio={1 / 1}>
|
<AspectRatio ratio={1 / 1}>
|
||||||
<Image
|
<Image
|
||||||
@@ -73,10 +84,10 @@ export default function UploadFotoProfile({
|
|||||||
<Button
|
<Button
|
||||||
{...props}
|
{...props}
|
||||||
radius={"xl"}
|
radius={"xl"}
|
||||||
variant="outline"
|
|
||||||
w={150}
|
|
||||||
leftIcon={<IconCamera />}
|
leftIcon={<IconCamera />}
|
||||||
compact
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
>
|
>
|
||||||
Upload
|
Upload
|
||||||
</Button>
|
</Button>
|
||||||
@@ -94,6 +105,9 @@ export default function UploadFotoProfile({
|
|||||||
onClick={() => {
|
onClick={() => {
|
||||||
onUpdate(router, profile.id, file as any, setLoading);
|
onUpdate(router, profile.id, file as any, setLoading);
|
||||||
}}
|
}}
|
||||||
|
bg={MainColor.yellow}
|
||||||
|
color="yellow"
|
||||||
|
c={"black"}
|
||||||
>
|
>
|
||||||
Update
|
Update
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -1,38 +1,20 @@
|
|||||||
"use client";
|
import UIGlobal_LayoutHeaderTamplate from "@/app_modules/component_global/ui/ui_header_tamplate";
|
||||||
|
import UIGlobal_LayoutTamplate from "@/app_modules/component_global/ui/ui_layout_tamplate";
|
||||||
import {
|
|
||||||
ActionIcon,
|
|
||||||
AppShell,
|
|
||||||
FileButton,
|
|
||||||
Flex,
|
|
||||||
Footer,
|
|
||||||
Group,
|
|
||||||
Header,
|
|
||||||
Text,
|
|
||||||
} from "@mantine/core";
|
|
||||||
|
|
||||||
import { useRouter } from "next/navigation";
|
|
||||||
import { useState } from "react";
|
|
||||||
import ComponentKatalog_HeaderTamplate from "@/app_modules/katalog/component/header_tamplate";
|
|
||||||
import AppComponentGlobal_LayoutTamplate from "@/app_modules/component_global/component_layout_tamplate";
|
|
||||||
|
|
||||||
export default function UploadFotoProfileLayout({
|
export default function UploadFotoProfileLayout({
|
||||||
children,
|
children,
|
||||||
profileId,
|
|
||||||
}: {
|
}: {
|
||||||
children: any;
|
children: any;
|
||||||
profileId: any;
|
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
|
||||||
const [profile, setProfile] = useState(profileId);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppComponentGlobal_LayoutTamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<ComponentKatalog_HeaderTamplate title="Update Foto" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Update Foto" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppComponentGlobal_LayoutTamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { Stack } from "@mantine/core";
|
import { Stack } from "@mantine/core";
|
||||||
import { Portofolio_UiView } from "../portofolio/ui_portofolio";
|
import { Portofolio_UiListView } from "./ui_list_portofolio";
|
||||||
import { Profile_UiView } from "../profile/ui_profile";
|
import { Profile_UiView } from "./ui_profile";
|
||||||
import { MODEL_PORTOFOLIO } from "../portofolio/model/interface";
|
import { MODEL_PORTOFOLIO } from "../portofolio/model/interface";
|
||||||
import { MODEL_PROFILE } from "../profile/model/interface";
|
import { MODEL_PROFILE } from "../profile/model/interface";
|
||||||
|
|
||||||
@@ -18,9 +18,9 @@ export function Katalog_UiView({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Stack>
|
<Stack mb={"lg"}>
|
||||||
<Profile_UiView profile={profile as any} userLoginId={userLoginId} />
|
<Profile_UiView profile={profile as any} userLoginId={userLoginId} />
|
||||||
<Portofolio_UiView
|
<Portofolio_UiListView
|
||||||
listPorto={listPorto as any}
|
listPorto={listPorto as any}
|
||||||
profile={profile}
|
profile={profile}
|
||||||
userLoginId={userLoginId}
|
userLoginId={userLoginId}
|
||||||
|
|||||||
146
src/app_modules/katalog/ui/ui_list_portofolio.tsx
Normal file
146
src/app_modules/katalog/ui/ui_list_portofolio.tsx
Normal file
@@ -0,0 +1,146 @@
|
|||||||
|
"use cleint";
|
||||||
|
|
||||||
|
import { RouterPortofolio } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
|
import {
|
||||||
|
AccentColor,
|
||||||
|
MainColor,
|
||||||
|
} from "@/app_modules/component_global/color/color_pallet";
|
||||||
|
import ComponentGlobal_UI_Loader from "@/app_modules/component_global/ui/ui_loader";
|
||||||
|
import {
|
||||||
|
ActionIcon,
|
||||||
|
Box,
|
||||||
|
Center,
|
||||||
|
Group,
|
||||||
|
Paper,
|
||||||
|
Stack,
|
||||||
|
Text,
|
||||||
|
Title,
|
||||||
|
} from "@mantine/core";
|
||||||
|
import { IconCaretRight, IconPencilPlus } from "@tabler/icons-react";
|
||||||
|
import _ from "lodash";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { useState } from "react";
|
||||||
|
import { MODEL_PORTOFOLIO } from "../portofolio/model/interface";
|
||||||
|
import { MODEL_PROFILE } from "../profile/model/interface";
|
||||||
|
|
||||||
|
export function Portofolio_UiListView({
|
||||||
|
listPorto,
|
||||||
|
profile,
|
||||||
|
userLoginId,
|
||||||
|
}: {
|
||||||
|
listPorto: MODEL_PORTOFOLIO[];
|
||||||
|
profile: MODEL_PROFILE;
|
||||||
|
userLoginId: string;
|
||||||
|
}) {
|
||||||
|
const router = useRouter();
|
||||||
|
const [loading, setLoading] = useState(false);
|
||||||
|
const [loadingPorto, setLoadingPorto] = useState(false);
|
||||||
|
const [idPorto, setIdPorto] = useState("");
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Box
|
||||||
|
style={{
|
||||||
|
backgroundColor: AccentColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Stack spacing={"sm"}>
|
||||||
|
<Group position="apart">
|
||||||
|
<ActionIcon variant="transparent" disabled></ActionIcon>
|
||||||
|
<Title order={4}>Portofolio</Title>
|
||||||
|
{profile?.User.id === userLoginId ? (
|
||||||
|
<ActionIcon
|
||||||
|
variant="transparent"
|
||||||
|
onClick={() => {
|
||||||
|
router.push(RouterPortofolio.create + `${profile.id}`);
|
||||||
|
setLoading(true);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{loading ? (
|
||||||
|
<ComponentGlobal_UI_Loader />
|
||||||
|
) : (
|
||||||
|
<IconPencilPlus color={AccentColor.yellow} />
|
||||||
|
)}
|
||||||
|
</ActionIcon>
|
||||||
|
) : (
|
||||||
|
<ActionIcon variant="transparent" disabled></ActionIcon>
|
||||||
|
)}
|
||||||
|
</Group>
|
||||||
|
|
||||||
|
<Stack
|
||||||
|
style={{
|
||||||
|
height: "auto",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{_.isEmpty(listPorto) ? (
|
||||||
|
<Center>
|
||||||
|
<Text fs={"italic"} fz={"xs"} c={"gray"}>
|
||||||
|
- Belum Ada Portofolio -
|
||||||
|
</Text>
|
||||||
|
</Center>
|
||||||
|
) : (
|
||||||
|
<Stack>
|
||||||
|
{listPorto.map((e, i) => (
|
||||||
|
<Paper
|
||||||
|
shadow="sm"
|
||||||
|
key={i}
|
||||||
|
radius={"md"}
|
||||||
|
onClick={() => {
|
||||||
|
setIdPorto(e?.id);
|
||||||
|
setLoadingPorto(true);
|
||||||
|
router.push(RouterPortofolio.main_detail + e?.id);
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
backgroundColor: MainColor.darkblue,
|
||||||
|
border: `2px solid ${AccentColor.blue}`,
|
||||||
|
borderRadius: "10px ",
|
||||||
|
padding: "15px",
|
||||||
|
color: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Group position="apart">
|
||||||
|
<Text fw={"bold"} lineClamp={1} w={"80%"}>
|
||||||
|
{e?.namaBisnis}
|
||||||
|
</Text>
|
||||||
|
<Stack>
|
||||||
|
{idPorto === e?.id && loadingPorto ? (
|
||||||
|
<ComponentGlobal_UI_Loader />
|
||||||
|
) : (
|
||||||
|
<IconCaretRight color="white" size={25} />
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
</Group>
|
||||||
|
</Paper>
|
||||||
|
))}
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
|
{_.isEmpty(listPorto) ? (
|
||||||
|
""
|
||||||
|
) : (
|
||||||
|
<Group position="right">
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
cursor: "pointer",
|
||||||
|
}}
|
||||||
|
onClick={() =>
|
||||||
|
router.push(
|
||||||
|
RouterPortofolio.daftar_portofolio + profile.id,
|
||||||
|
{ scroll: false }
|
||||||
|
)
|
||||||
|
}
|
||||||
|
fw={"bold"}
|
||||||
|
fz={"sm"}
|
||||||
|
>
|
||||||
|
Lihat semua
|
||||||
|
</Text>
|
||||||
|
</Group>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
</Box>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -15,7 +15,7 @@ import {
|
|||||||
Text,
|
Text,
|
||||||
ThemeIcon,
|
ThemeIcon,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { MODEL_PROFILE } from "./model/interface";
|
import { MODEL_PROFILE } from "../profile/model/interface";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
@@ -12,7 +12,7 @@ export default async function notifikasi_getByUserId({page}: {page: number }) {
|
|||||||
take: takeData,
|
take: takeData,
|
||||||
skip: skipData,
|
skip: skipData,
|
||||||
orderBy: {
|
orderBy: {
|
||||||
createdAt: "desc",
|
isRead: "asc"
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
userId: userId,
|
userId: userId,
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "../component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "../component_global/ui/ui_layout_tamplate";
|
||||||
import { Notifikasi_UiView } from "./component/ui_notifiaksi";
|
import { Notifikasi_UiView } from "./component/ui_notifiaksi";
|
||||||
|
|
||||||
export default function Notifikasi_MainView({
|
export default function Notifikasi_MainView({
|
||||||
@@ -9,11 +9,11 @@ export default function Notifikasi_MainView({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Notifikasi" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Notifikasi" />}
|
||||||
>
|
>
|
||||||
<Notifikasi_UiView listNotifikasi={listNotifikasi} />
|
<Notifikasi_UiView listNotifikasi={listNotifikasi} />
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||||
import LayoutGlobal_UI_HeaderTamplate from "../component_global/ui/ui_header_tamplate";
|
import UIGlobal_LayoutHeaderTamplate from "../component_global/ui/ui_header_tamplate";
|
||||||
import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "../component_global/ui/ui_layout_tamplate";
|
||||||
import { UserSearch_UiView } from "./component/ui_user_search";
|
import { UserSearch_UiView } from "./component/ui_user_search";
|
||||||
|
|
||||||
export default function UserSearch_MainView({
|
export default function UserSearch_MainView({
|
||||||
@@ -11,11 +11,11 @@ export default function UserSearch_MainView({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate
|
<UIGlobal_LayoutTamplate
|
||||||
header={<LayoutGlobal_UI_HeaderTamplate title="Pencarian Pengguna" />}
|
header={<UIGlobal_LayoutHeaderTamplate title="Pencarian Pengguna" />}
|
||||||
>
|
>
|
||||||
<UserSearch_UiView listUser={listUser} />
|
<UserSearch_UiView listUser={listUser} />
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
{/* <pre>{JSON.stringify(data, null, 2)}</pre> */}
|
{/* <pre>{JSON.stringify(data, null, 2)}</pre> */}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import { useState } from "react";
|
|||||||
|
|
||||||
import { IconPencilPlus } from "@tabler/icons-react";
|
import { IconPencilPlus } from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import LayoutGlobal_UI_Tamplate from "../component_global/ui/ui_layout_tamplate";
|
import UIGlobal_LayoutTamplate from "../component_global/ui/ui_layout_tamplate";
|
||||||
|
|
||||||
|
|
||||||
const newData = Array(20)
|
const newData = Array(20)
|
||||||
@@ -41,10 +41,10 @@ export default function Coba_TestLoading() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<LayoutGlobal_UI_Tamplate>
|
<UIGlobal_LayoutTamplate>
|
||||||
{/* <CreateButton /> */}
|
{/* <CreateButton /> */}
|
||||||
<Button onClick={() => setOpenDrawer(true)}>Click</Button>
|
<Button onClick={() => setOpenDrawer(true)}>Click</Button>
|
||||||
</LayoutGlobal_UI_Tamplate>
|
</UIGlobal_LayoutTamplate>
|
||||||
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user