Portofolio
#feat - Create porto - Edit Porto - Upload gambar background profile - List user - Search user ## No issuue
@@ -49,19 +49,21 @@ model UserSession {
|
|||||||
}
|
}
|
||||||
|
|
||||||
model Profile {
|
model Profile {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
name String
|
name String
|
||||||
email String @unique
|
email String @unique
|
||||||
alamat String
|
alamat String
|
||||||
jenisKelamin String
|
jenisKelamin String
|
||||||
active Boolean @default(true)
|
active Boolean @default(true)
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
User User? @relation(fields: [userId], references: [id])
|
User User? @relation(fields: [userId], references: [id])
|
||||||
userId String? @unique
|
userId String? @unique
|
||||||
ImageProfile Images? @relation(fields: [imagesId], references: [id])
|
ImageProfile Images? @relation(fields: [imagesId], references: [id])
|
||||||
imagesId String? @unique
|
imagesId String? @unique
|
||||||
Katalog Katalog[]
|
Portofolio Portofolio[]
|
||||||
|
ImagesBackground ImagesBackground? @relation(fields: [imagesBackgroundId], references: [id])
|
||||||
|
imagesBackgroundId String? @unique
|
||||||
}
|
}
|
||||||
|
|
||||||
model Images {
|
model Images {
|
||||||
@@ -80,30 +82,58 @@ model Images {
|
|||||||
Donasi_Kabar Donasi_Kabar[]
|
Donasi_Kabar Donasi_Kabar[]
|
||||||
Donasi_PencairanDana Donasi_PencairanDana[]
|
Donasi_PencairanDana Donasi_PencairanDana[]
|
||||||
Donasi_Invoice Donasi_Invoice[]
|
Donasi_Invoice Donasi_Invoice[]
|
||||||
|
Portofolio Portofolio[]
|
||||||
}
|
}
|
||||||
|
|
||||||
model Katalog {
|
model ImagesBackground {
|
||||||
id String @id @default(cuid())
|
id String @id @default(cuid())
|
||||||
namaBisnis String
|
url String
|
||||||
alamatKantor String
|
label String
|
||||||
tlpn String
|
active Boolean @default(true)
|
||||||
deskripsi String
|
createdAt DateTime @default(now())
|
||||||
active Boolean @default(true)
|
updatedAt DateTime @updatedAt
|
||||||
createdAt DateTime @default(now())
|
Profile Profile?
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
}
|
||||||
Profile Profile? @relation(fields: [profileId], references: [id])
|
|
||||||
profileId String?
|
model Portofolio {
|
||||||
MasterBidangBisnis MasterBidangBisnis @relation(fields: [masterBidangBisnisId], references: [id])
|
id String @id @default(cuid())
|
||||||
masterBidangBisnisId String
|
namaBisnis String
|
||||||
|
alamatKantor String
|
||||||
|
tlpn String
|
||||||
|
deskripsi String
|
||||||
|
active Boolean @default(true)
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
|
Profile Profile? @relation(fields: [profileId], references: [id])
|
||||||
|
profileId String?
|
||||||
|
MasterBidangBisnis MasterBidangBisnis @relation(fields: [masterBidangBisnisId], references: [id])
|
||||||
|
masterBidangBisnisId String
|
||||||
|
Logo Images? @relation(fields: [logoId], references: [id])
|
||||||
|
logoId String?
|
||||||
|
Portofolio_MediaSosial Portofolio_MediaSosial?
|
||||||
|
}
|
||||||
|
|
||||||
|
model Portofolio_MediaSosial {
|
||||||
|
id String @id @default(cuid())
|
||||||
|
facebook String?
|
||||||
|
twitter String?
|
||||||
|
instagram String?
|
||||||
|
tiktok String?
|
||||||
|
youtube String?
|
||||||
|
active Boolean @default(true)
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
updatedAt DateTime @updatedAt
|
||||||
|
Portofolio Portofolio? @relation(fields: [portofolioId], references: [id])
|
||||||
|
portofolioId String? @unique
|
||||||
}
|
}
|
||||||
|
|
||||||
model MasterBidangBisnis {
|
model MasterBidangBisnis {
|
||||||
id String @id
|
id String @id
|
||||||
name String
|
name String
|
||||||
active Boolean @default(true)
|
active Boolean @default(true)
|
||||||
createdAt DateTime @default(now())
|
createdAt DateTime @default(now())
|
||||||
updatedAt DateTime @default(now()) @updatedAt
|
updatedAt DateTime @default(now()) @updatedAt
|
||||||
Katalog Katalog[]
|
Portofolio Portofolio[]
|
||||||
}
|
}
|
||||||
|
|
||||||
// -------------------- INVESTASI --------------------- //
|
// -------------------- INVESTASI --------------------- //
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
BIN
public/portofolio/logo/bdf4000d-626a-4c87-a6dc-6c63dad52a26.jpg
Normal file
|
After Width: | Height: | Size: 37 KiB |
1
public/portofolio/logo/test.md
Normal file
@@ -0,0 +1 @@
|
|||||||
|
# Test
|
||||||
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 263 KiB |
BIN
public/profile/foto/4985d154-8120-4f8a-89d9-36d4cb9a62c0.png
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
public/profile/foto/85fd67b1-28a5-40e2-ab19-463c8fad7386.png
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
public/profile/foto/8cf7990e-b101-466b-bad2-9b0d06a5213f.jpeg
Normal file
|
After Width: | Height: | Size: 108 KiB |
BIN
public/profile/foto/f1bf74e9-7282-4266-becf-2461f30c68f7.png
Normal file
|
After Width: | Height: | Size: 122 KiB |
32
src/app/api/portofolio/logo/[id]/route.ts
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
import fs from "fs";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
req: NextRequest,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const get = await prisma.images.findUnique({
|
||||||
|
where: {
|
||||||
|
id: params.id,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
url: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!fs.existsSync(`./public/portofolio/logo/${get?.url}`)) {
|
||||||
|
const notFile = fs.readFileSync("./public/aset/global/no_img.png");
|
||||||
|
return new NextResponse(notFile, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const file = fs.readFileSync(`./public/portofolio/logo/${get?.url}`);
|
||||||
|
return new NextResponse(file, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
32
src/app/api/profile/background/[id]/route.ts
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
import fs from "fs";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
req: NextRequest,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const get = await prisma.imagesBackground.findUnique({
|
||||||
|
where: {
|
||||||
|
id: params.id,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
url: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!fs.existsSync(`./public/profile/background/${get?.url}`)) {
|
||||||
|
const notFile = fs.readFileSync("./public/aset/global/no_img.png");
|
||||||
|
return new NextResponse(notFile, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const file = fs.readFileSync(`./public/profile/background/${get?.url}`);
|
||||||
|
return new NextResponse(file, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
32
src/app/api/profile/foto/[id]/route.ts
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
import fs from "fs";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
req: NextRequest,
|
||||||
|
{ params }: { params: { id: string } }
|
||||||
|
) {
|
||||||
|
const get = await prisma.images.findUnique({
|
||||||
|
where: {
|
||||||
|
id: params.id,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
url: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (!fs.existsSync(`./public/profile/foto/${get?.url}`)) {
|
||||||
|
const notFile = fs.readFileSync("./public/aset/global/avatar.png");
|
||||||
|
return new NextResponse(notFile, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const file = fs.readFileSync(`./public/profile/foto/${get?.url}`);
|
||||||
|
return new NextResponse(file, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { NextRequest, NextResponse } from "next/server";
|
|
||||||
import fs from "fs";
|
|
||||||
|
|
||||||
export async function GET(
|
|
||||||
req: NextRequest,
|
|
||||||
{ params }: { params: { name: string } }
|
|
||||||
) {
|
|
||||||
if (!fs.existsSync(`./public/img/${params.name}`)) {
|
|
||||||
const fl = fs.readFileSync(`./public/aset/avatar.png`);
|
|
||||||
return new NextResponse(fl, {
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "image/png",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
const fl = fs.readFileSync(`./public/img/${params.name}`);
|
|
||||||
return new NextResponse(fl, {
|
|
||||||
headers: {
|
|
||||||
"Content-Type": "image/png",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
}
|
|
||||||
23
src/app/api/profile/url_background/[url]/route.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import fs from "fs";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
req: NextRequest,
|
||||||
|
{ params }: { params: { url: string } }
|
||||||
|
) {
|
||||||
|
if (!fs.existsSync(`./public/profile/background/${params.url}`)) {
|
||||||
|
const notFile = fs.readFileSync("./public/aset/global/no_img.png");
|
||||||
|
return new NextResponse(notFile, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const file = fs.readFileSync(`./public/profile/background/${params.url}`);
|
||||||
|
return new NextResponse(file, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
23
src/app/api/profile/url_foto/[url]/route.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import fs from "fs";
|
||||||
|
import { NextRequest, NextResponse } from "next/server";
|
||||||
|
|
||||||
|
export async function GET(
|
||||||
|
req: NextRequest,
|
||||||
|
{ params }: { params: { url: string } }
|
||||||
|
) {
|
||||||
|
if (!fs.existsSync(`./public/profile/foto/${params.url}`)) {
|
||||||
|
const notFile = fs.readFileSync("./public/aset/global/avatar.png");
|
||||||
|
return new NextResponse(notFile, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const file = fs.readFileSync(`./public/profile/foto/${params.url}`);
|
||||||
|
return new NextResponse(file, {
|
||||||
|
headers: {
|
||||||
|
"Content-Type": "image/png",
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { AdminDonasi_TableReview } from "@/app_modules/admin/donasi";
|
import { AdminDonasi_TableReview } from "@/app_modules/admin/donasi";
|
||||||
import { AdminDonasi_getByStatus } from "@/app_modules/admin/donasi/fun/get/get_list_donasi_by_status";
|
import { AdminDonasi_getByStatus } from "@/app_modules/admin/donasi/fun/get/get_list_donasi_by_status";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const listReview = await AdminDonasi_getByStatus("2");
|
const listReview = await AdminDonasi_getByStatus("2");
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Admin_KonfirmasiInvestasi } from "@/app_modules/admin/investasi";
|
import { Admin_KonfirmasiInvestasi } from "@/app_modules/admin/investasi";
|
||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { CreateCeritaPenggalangDonasi } from "@/app_modules/donasi";
|
import { CreateCeritaPenggalangDonasi } from "@/app_modules/donasi";
|
||||||
import { Donasi_getTemporaryCreate } from "@/app_modules/donasi/fun/get/get_temporary_create";
|
import { Donasi_getTemporaryCreate } from "@/app_modules/donasi/fun/get/get_temporary_create";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
|
||||||
const getTemporaryCreate = await Donasi_getTemporaryCreate(params.id);
|
const getTemporaryCreate = await Donasi_getTemporaryCreate(params.id);
|
||||||
const userId = await getToken_UserId()
|
const userId = await User_getUserId()
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
Donasi_getMasterDurasi,
|
Donasi_getMasterDurasi,
|
||||||
Donasi_getMasterKategori,
|
Donasi_getMasterKategori,
|
||||||
} from "@/app_modules/donasi/fun";
|
} from "@/app_modules/donasi/fun";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const masterKategori = await Donasi_getMasterKategori();
|
const masterKategori = await Donasi_getMasterKategori();
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { DetailMainDonasi } from "@/app_modules/donasi";
|
import { DetailMainDonasi } from "@/app_modules/donasi";
|
||||||
import { Donasi_getCountDonatur } from "@/app_modules/donasi/fun/count/get_count_donatur";
|
import { Donasi_getCountDonatur } from "@/app_modules/donasi/fun/count/get_count_donatur";
|
||||||
import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id";
|
import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
let donasiId = params.id;
|
let donasiId = params.id;
|
||||||
const dataDonasi = await Donasi_getOneById(donasiId);
|
const dataDonasi = await Donasi_getOneById(donasiId);
|
||||||
const countDonatur = await Donasi_getCountDonatur(donasiId)
|
const countDonatur = await Donasi_getCountDonatur(donasiId)
|
||||||
const userLoginId = await getToken_UserId();
|
const userLoginId = await User_getUserId();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { DetailPublishDonasi } from "@/app_modules/donasi";
|
import { DetailPublishDonasi } from "@/app_modules/donasi";
|
||||||
import { Donasi_getCountDonatur } from "@/app_modules/donasi/fun/count/get_count_donatur";
|
import { Donasi_getCountDonatur } from "@/app_modules/donasi/fun/count/get_count_donatur";
|
||||||
import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id";
|
import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
const dataPublish = await Donasi_getOneById(params.id);
|
const dataPublish = await Donasi_getOneById(params.id);
|
||||||
const countDonatur= await Donasi_getCountDonatur(params.id)
|
const countDonatur= await Donasi_getCountDonatur(params.id)
|
||||||
const userLoginId = await getToken_UserId();
|
const userLoginId = await User_getUserId();
|
||||||
|
|
||||||
console.log(userLoginId)
|
console.log(userLoginId)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { DonasiSayaDonasi } from "@/app_modules/donasi";
|
import { DonasiSayaDonasi } from "@/app_modules/donasi";
|
||||||
import { Donasi_getInvoiceByAuthorId } from "@/app_modules/donasi/fun/get/get_list_invoice_by_author_id";
|
import { Donasi_getInvoiceByAuthorId } from "@/app_modules/donasi/fun/get/get_list_invoice_by_author_id";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const authorId = await getToken_UserId();
|
const authorId = await User_getUserId();
|
||||||
const listInvoice = await Donasi_getInvoiceByAuthorId(authorId);
|
const listInvoice = await Donasi_getInvoiceByAuthorId(authorId);
|
||||||
|
|
||||||
return <DonasiSayaDonasi listInvoice={listInvoice as any} />;
|
return <DonasiSayaDonasi listInvoice={listInvoice as any} />;
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { PostingDonasi } from "@/app_modules/donasi";
|
import { PostingDonasi } from "@/app_modules/donasi";
|
||||||
import Donasi_getByStatus from "@/app_modules/donasi/fun/get/get_donasi_by_status";
|
import Donasi_getByStatus from "@/app_modules/donasi/fun/get/get_donasi_by_status";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const authorId = await getToken_UserId();
|
const authorId = await User_getUserId();
|
||||||
const listPublish = await Donasi_getByStatus(authorId, "1")
|
const listPublish = await Donasi_getByStatus(authorId, "1")
|
||||||
const listReview = await Donasi_getByStatus(authorId, "2");
|
const listReview = await Donasi_getByStatus(authorId, "2");
|
||||||
const listDraft = await Donasi_getByStatus(authorId, "3");
|
const listDraft = await Donasi_getByStatus(authorId, "3");
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { LayoutDonasi } from "@/app_modules/donasi";
|
import { LayoutDonasi } from "@/app_modules/donasi";
|
||||||
import { Donasi_getNotifByUserId } from "@/app_modules/donasi/fun/get/get_notif_by_user_id";
|
import { Donasi_getNotifByUserId } from "@/app_modules/donasi/fun/get/get_notif_by_user_id";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
export default async function Layout({
|
export default async function Layout({
|
||||||
@@ -8,7 +8,7 @@ export default async function Layout({
|
|||||||
}: {
|
}: {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}) {
|
}) {
|
||||||
const userId = await getToken_UserId();
|
const userId = await User_getUserId();
|
||||||
// const dataDonasi = await DOnasi_getList
|
// const dataDonasi = await DOnasi_getList
|
||||||
const isRead = await Donasi_getNotifByUserId(userId).then((res) => res.map((val) => val.isRead))
|
const isRead = await Donasi_getNotifByUserId(userId).then((res) => res.map((val) => val.isRead))
|
||||||
// console.log(isRead)
|
// console.log(isRead)
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import { PencairanDanaDonasi } from "@/app_modules/donasi";
|
import { PencairanDanaDonasi } from "@/app_modules/donasi";
|
||||||
import ComponentDonasi_LoaderOverlay from "@/app_modules/donasi/component/loader_overlay";
|
|
||||||
import { NotifPeringatan } from "@/app_modules/donasi/component/notifikasi/notif_peringatan";
|
import { NotifPeringatan } from "@/app_modules/donasi/component/notifikasi/notif_peringatan";
|
||||||
import { Donasi_getListPencairanDanaById } from "@/app_modules/donasi/fun/get/get_list_pencairan_dana_by_id";
|
import { Donasi_getListPencairanDanaById } from "@/app_modules/donasi/fun/get/get_list_pencairan_dana_by_id";
|
||||||
import { Donasi_getTotalPencairanDanaById } from "@/app_modules/donasi/fun/get/get_pencairan_dana_by_id";
|
import { Donasi_getTotalPencairanDanaById } from "@/app_modules/donasi/fun/get/get_pencairan_dana_by_id";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
import { Loader } from "@mantine/core";
|
import { Loader } from "@mantine/core";
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import { Donasi_MetodePembayaran } from "@/app_modules/donasi";
|
import { Donasi_MetodePembayaran } from "@/app_modules/donasi";
|
||||||
import { Donasi_getMasterBank } from "@/app_modules/donasi/fun/master/get_bank";
|
import { Donasi_getMasterBank } from "@/app_modules/donasi/fun/master/get_bank";
|
||||||
import { getToken_UserId } from "@/app_modules/fun/get_user_token";
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
|
||||||
export default async function Page({params}: {params: {id: string}}) {
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
let donasiId= params.id
|
let donasiId= params.id
|
||||||
const listBank = await Donasi_getMasterBank()
|
const listBank = await Donasi_getMasterBank()
|
||||||
const authorId = await getToken_UserId()
|
const authorId = await User_getUserId()
|
||||||
|
|
||||||
return<>
|
return<>
|
||||||
<Donasi_MetodePembayaran listBank={listBank} donasiId={donasiId} authorId={authorId}/>
|
<Donasi_MetodePembayaran listBank={listBank} donasiId={donasiId} authorId={authorId}/>
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
import { HomeLayout } from "@/app_modules/home";
|
import { HomeLayout } from "@/app_modules/home";
|
||||||
|
import { User_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||||
|
|
||||||
export default async function Layout({children}: {children: any}) {
|
export default async function Layout({ children }: { children: any }) {
|
||||||
return <>
|
const userId = await User_getUserId();
|
||||||
<HomeLayout>{children}</HomeLayout>
|
const dataUser = await User_getOneById(userId);
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<HomeLayout dataUser={dataUser as any}>{children}</HomeLayout>
|
||||||
</>
|
</>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,26 +6,15 @@ import { redirect } from "next/navigation";
|
|||||||
|
|
||||||
import yaml from "yaml";
|
import yaml from "yaml";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
import { User_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page() {
|
||||||
const c = cookies().get("ssn");
|
|
||||||
|
|
||||||
if (!c?.value) return redirect("/dev/auth/login");
|
|
||||||
const usr = JSON.parse(
|
|
||||||
await unsealData(c?.value as string, {
|
|
||||||
password: config.server.password,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
const dataProfile = await funGetUserProfile(usr.id)
|
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(usr)} */}
|
<HomeView />
|
||||||
<HomeView user={dataProfile as any} />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import { DetailInvestasi } from "@/app_modules/investasi";
|
import { DetailInvestasi } from "@/app_modules/investasi";
|
||||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { ProsesTransaksiInvestasi } from "@/app_modules/investasi";
|
|||||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||||
import { unsealData } from "iron-session";
|
import { unsealData } from "iron-session";
|
||||||
import { cookies } from "next/headers";
|
import { cookies } from "next/headers";
|
||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import yaml from "yaml";
|
import yaml from "yaml";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||||
|
|||||||
@@ -1,34 +1,29 @@
|
|||||||
import prisma from "@/app/lib/prisma";
|
import prisma from "@/app/lib/prisma";
|
||||||
import { getProfile } from "@/app_modules/katalog/profile";
|
|
||||||
import { KatalogView } from "@/app_modules/katalog/main";
|
import { KatalogView } from "@/app_modules/katalog/main";
|
||||||
import { url } from "inspector";
|
import { url } from "inspector";
|
||||||
import { unsealData } from "iron-session";
|
import { unsealData } from "iron-session";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { cookies } from "next/headers";
|
import { cookies } from "next/headers";
|
||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import yaml from "yaml";
|
import yaml from "yaml";
|
||||||
import fs from "fs";
|
import fs from "fs";
|
||||||
import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get_list_portofolio";
|
import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/get_list_portofolio";
|
||||||
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
|
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile";
|
||||||
|
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||||
|
|
||||||
export default async function Page() {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
const data = await getProfile();
|
let profileId = params.id;
|
||||||
|
const userLoginId = await User_getUserId()
|
||||||
const u = cookies().get("ssn");
|
const listPorto = await funGetListPortofolio(profileId);
|
||||||
const usr = JSON.parse(
|
const dataProfile = await Profile_getOneProfileAndUserById(profileId)
|
||||||
await unsealData(u?.value as string, {
|
// console.log(dataProfile)
|
||||||
password: config.server.password,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
const user = await funGetUserProfile(usr.id);
|
|
||||||
|
|
||||||
const listPorto = await funGetListPortofolio(user?.Profile?.id)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<KatalogView user={user as any} listPorto={listPorto as any} />
|
<KatalogView profile={dataProfile as any} listPorto={listPorto as any} userLoginId={userLoginId} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
import { myConsole } from "@/app/fun/my_console";
|
import { myConsole } from "@/app/fun/my_console";
|
||||||
import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
|
import { CreatePortofolio } from "@/app_modules/katalog/portofolio";
|
||||||
import { getBidangBisnis } from "@/app_modules/katalog/portofolio/fun/get_bidang_bisnis";
|
import { Portofolio_getMasterBidangBisnis } from "@/app_modules/katalog/portofolio/fun/master/get_bidang_bisnis";
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
const bidangBisnis = await getBidangBisnis();
|
const bidangBisnis = await Portofolio_getMasterBidangBisnis();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
14
src/app/dev/portofolio/edit/data/[id]/layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { LayoutPortofolio_EditDataBisnis } from "@/app_modules/katalog/portofolio";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<LayoutPortofolio_EditDataBisnis>
|
||||||
|
{children}
|
||||||
|
</LayoutPortofolio_EditDataBisnis>
|
||||||
|
);
|
||||||
|
}
|
||||||
25
src/app/dev/portofolio/edit/data/[id]/page.tsx
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
import { Portofolio_EditDataBisnis } from "@/app_modules/katalog/portofolio";
|
||||||
|
import { Portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/get_one_portofolio";
|
||||||
|
import { Portofolio_getMasterBidangBisnis } from "@/app_modules/katalog/portofolio/fun/master/get_bidang_bisnis";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
let portoId = params.id;
|
||||||
|
const data = await Portofolio_getOneById(portoId);
|
||||||
|
const dataPorto = _.omit(data, [
|
||||||
|
"Logo",
|
||||||
|
"Portofolio_MediaSosial",
|
||||||
|
"Portofolio_MediaSosial",
|
||||||
|
"logoId",
|
||||||
|
"profileId",
|
||||||
|
]);
|
||||||
|
|
||||||
|
|
||||||
|
const listBidang = await Portofolio_getMasterBidangBisnis()
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Portofolio_EditDataBisnis dataPorto={dataPorto as any} listBidang={listBidang as any} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
15
src/app/dev/portofolio/edit/logo/[id]/layout.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
import { LayoutPortofolio_EditLogoBisnis } from "@/app_modules/katalog/portofolio";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<LayoutPortofolio_EditLogoBisnis>
|
||||||
|
{children}
|
||||||
|
</LayoutPortofolio_EditLogoBisnis>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
27
src/app/dev/portofolio/edit/logo/[id]/page.tsx
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
import { Portofolio_EditLogoBisnis } from "@/app_modules/katalog/portofolio";
|
||||||
|
import { Portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/get_one_portofolio";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
let portoId = params.id;
|
||||||
|
const dataPorto = await Portofolio_getOneById(portoId).then((res) =>
|
||||||
|
_.omit(res, [
|
||||||
|
"Logo",
|
||||||
|
"MasterBidangBisnis",
|
||||||
|
"Portofolio_MediaSosial",
|
||||||
|
"active",
|
||||||
|
"alamatKantor",
|
||||||
|
"deskripsi",
|
||||||
|
"masterBidangBisnisId",
|
||||||
|
"profileId",
|
||||||
|
"tlpn",
|
||||||
|
"namaBisnis"
|
||||||
|
])
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Portofolio_EditLogoBisnis dataPorto={dataPorto as any} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
14
src/app/dev/portofolio/edit/medsos/[id]/layout.tsx
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
import { LayoutPortofolio_EditMedsosBisnis } from "@/app_modules/katalog/portofolio";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<LayoutPortofolio_EditMedsosBisnis>
|
||||||
|
{children}
|
||||||
|
</LayoutPortofolio_EditMedsosBisnis>
|
||||||
|
);
|
||||||
|
}
|
||||||
16
src/app/dev/portofolio/edit/medsos/[id]/page.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { Portofolio_EditMedsosBisnis } from "@/app_modules/katalog/portofolio";
|
||||||
|
import { Portofolio_geOnetMedsosById } from "@/app_modules/katalog/portofolio/fun/get/get_one_medsos_by_id";
|
||||||
|
import _ from "lodash";
|
||||||
|
|
||||||
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
let portoId = params.id;
|
||||||
|
const dataMedsos = await Portofolio_geOnetMedsosById(portoId).then((res) =>
|
||||||
|
_.omit(res, ["active", "createdAt", "updatedAt", "portofolioId"])
|
||||||
|
);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<Portofolio_EditMedsosBisnis dataMedsos={dataMedsos as any} />
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
import { PortofolioLayout } from "@/app_modules/katalog/portofolio";
|
||||||
import { getOnePortofolio } from "@/app_modules/katalog/portofolio/fun/get_one_portofolio";
|
import { Portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/get_one_portofolio";
|
||||||
|
|
||||||
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||||
const getPorto = await getOnePortofolio(params.id)
|
let portoId = params.id
|
||||||
|
const getPorto = await Portofolio_getOneById(portoId)
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<PortofolioLayout profileId={getPorto?.profileId}>{children}</PortofolioLayout>
|
<PortofolioLayout portoId={portoId}>{children}</PortofolioLayout>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
import { ViewPortofolio } from "@/app_modules/katalog/portofolio";
|
import { ViewPortofolio } from "@/app_modules/katalog/portofolio";
|
||||||
import { getOnePortofolio } from "@/app_modules/katalog/portofolio/fun/get_one_portofolio";
|
import { Portofolio_getOneById } from "@/app_modules/katalog/portofolio/fun/get/get_one_portofolio";
|
||||||
|
|
||||||
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 getOnePortofolio(params.id)
|
|
||||||
// console.log(getPorto)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(getPorto)} */}
|
{/* {JSON.stringify(getPorto)} */}
|
||||||
<ViewPortofolio dataPorto={getPorto as any} />
|
<ViewPortofolio dataPorto={getPorto as any} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
import { User_getUserId } from "@/app_modules/fun_global/get_user_token";
|
||||||
import { CreateProfile } from "@/app_modules/katalog/profile";
|
import { CreateProfile } from "@/app_modules/katalog/profile";
|
||||||
|
|
||||||
export default async function Page({params}: {params: {id: string}}) {
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
// console.log(params.id)
|
const userId = await User_getUserId()
|
||||||
|
|
||||||
return <>
|
return <>
|
||||||
<CreateProfile userId={params.id}/>
|
<CreateProfile userId={userId}/>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import { EditProfileLayout } from "@/app_modules/katalog/profile";
|
import { EditProfileLayout } from "@/app_modules/katalog/profile";
|
||||||
|
|
||||||
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
export default async function Layout({ children, params }: { children: any, params: {id: string} }) {
|
||||||
|
|||||||
@@ -1,14 +1,16 @@
|
|||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import { getProfile } from "@/app_modules/katalog/profile";
|
|
||||||
import EditProfile from "@/app_modules/katalog/profile/edit/view";
|
import EditProfile from "@/app_modules/katalog/profile/edit/view";
|
||||||
|
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
|
||||||
|
|
||||||
export default async function Page({ params }: { params: { id: string } }) {
|
export default async function Page({ params }: { params: { id: string } }) {
|
||||||
|
let profileId = params.id
|
||||||
const data = await funGetUserProfile(params.id);
|
const data = await funGetUserProfile(params.id);
|
||||||
|
const dataProfile = await Profile_getOneProfileAndUserById(profileId)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {JSON.stringify(data)} */}
|
{/* {JSON.stringify(data)} */}
|
||||||
<EditProfile data={data as any} />
|
<EditProfile data={dataProfile as any} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +0,0 @@
|
|||||||
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
|
||||||
import { AppShell } from "@mantine/core";
|
|
||||||
|
|
||||||
export default function Layout({ children, params }: { children: any, params: {id: string} }) {
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
|
|
||||||
<UploadFotoProfileLayout profileId={params.id}>{children}</UploadFotoProfileLayout>
|
|
||||||
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
import { UploadFotoProfile } from "@/app_modules/katalog/profile";
|
|
||||||
import { unsealData } from "iron-session";
|
|
||||||
import { cookies } from "next/headers";
|
|
||||||
import yaml from "yaml";
|
|
||||||
import fs from "fs";
|
|
||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
|
||||||
|
|
||||||
export default async function Page() {
|
|
||||||
const c = cookies().get("ssn");
|
|
||||||
const usr = JSON.parse(
|
|
||||||
await unsealData(c?.value as string, {
|
|
||||||
password: config.server.password,
|
|
||||||
})
|
|
||||||
);
|
|
||||||
|
|
||||||
const imageUrl = await funGetUserProfile(usr.id).then(
|
|
||||||
(res) => res?.Profile?.ImageProfile?.url
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<>
|
|
||||||
<UploadFotoProfile imageUrl={imageUrl} />
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
}
|
|
||||||
8
src/app/dev/profile/upload/background/[id]/layout.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import LayoutProfile_UpdateFotoBackground from "@/app_modules/katalog/profile/upload/foto_background/layout";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children}: {children: React.ReactNode}) {
|
||||||
|
return<>
|
||||||
|
<LayoutProfile_UpdateFotoBackground>{children}</LayoutProfile_UpdateFotoBackground>
|
||||||
|
</>
|
||||||
|
}
|
||||||
12
src/app/dev/profile/upload/background/[id]/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile"
|
||||||
|
import Profile_UpdateFotoBackground from "@/app_modules/katalog/profile/upload/foto_background"
|
||||||
|
|
||||||
|
export default async function Page({params}:{params: {id: string}}) {
|
||||||
|
let profileId = params.id
|
||||||
|
const dataProfile = await Profile_getOneById(profileId)
|
||||||
|
|
||||||
|
return <>
|
||||||
|
<Profile_UpdateFotoBackground dataProfile={dataProfile as any}/>
|
||||||
|
</>
|
||||||
|
|
||||||
|
}
|
||||||
9
src/app/dev/profile/upload/foto/[id]/layout.tsx
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) {
|
||||||
|
let profileId = params.id
|
||||||
|
return <>
|
||||||
|
<UploadFotoProfileLayout profileId={profileId} >{children}</UploadFotoProfileLayout>
|
||||||
|
</>
|
||||||
|
}
|
||||||
11
src/app/dev/profile/upload/foto/[id]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
import { UploadFotoProfile } from "@/app_modules/katalog/profile";
|
||||||
|
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile";
|
||||||
|
|
||||||
|
export default async function Page({params}: {params: {id: string}}) {
|
||||||
|
let profileId = params.id
|
||||||
|
const dataProfile = await Profile_getOneById(profileId)
|
||||||
|
|
||||||
|
return <>
|
||||||
|
<UploadFotoProfile dataProfile={dataProfile as any}/>
|
||||||
|
</>
|
||||||
|
}
|
||||||
10
src/app/dev/user_search/main/layout.tsx
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
import { LayoutUserSearch_MainView } from "@/app_modules/user_search";
|
||||||
|
import React from "react";
|
||||||
|
|
||||||
|
export default async function Layout({
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return <LayoutUserSearch_MainView>{children}</LayoutUserSearch_MainView>;
|
||||||
|
}
|
||||||
8
src/app/dev/user_search/main/page.tsx
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
import { UserSearch_MainView } from "@/app_modules/user_search";
|
||||||
|
import { UserSearch_getListUser } from "@/app_modules/user_search/fun/get/get_list_user";
|
||||||
|
|
||||||
|
export default async function Page() {
|
||||||
|
const listUser = await UserSearch_getListUser()
|
||||||
|
|
||||||
|
return <UserSearch_MainView listUser={listUser as any} />;
|
||||||
|
}
|
||||||
29
src/app/lib/router_hipmi/router_katalog.ts
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
export const RouterProfile = {
|
||||||
|
katalog: "/dev/katalog/",
|
||||||
|
|
||||||
|
// create
|
||||||
|
create: "/dev/profile/create/",
|
||||||
|
|
||||||
|
// edit
|
||||||
|
edit: "/dev/profile/edit/",
|
||||||
|
|
||||||
|
// api
|
||||||
|
api_foto_profile: "/api/profile/foto/",
|
||||||
|
api_background_profile: "/api/profile/background/",
|
||||||
|
api_url_foto: "/api/profile/url_foto/",
|
||||||
|
api_url_background: "/api/profile/url_background/",
|
||||||
|
|
||||||
|
// upload
|
||||||
|
update_foto_profile: "/dev/profile/upload/foto/",
|
||||||
|
update_foto_background: "/dev/profile/upload/background/",
|
||||||
|
};
|
||||||
|
|
||||||
|
export const RouterPortofolio = {
|
||||||
|
api_logo_porto: "/api/portofolio/logo/",
|
||||||
|
create: "/dev/portofolio/create/",
|
||||||
|
|
||||||
|
//edit
|
||||||
|
edit_data_bisnis: "/dev/portofolio/edit/data/",
|
||||||
|
edit_logo_bisnis: "/dev/portofolio/edit/logo/",
|
||||||
|
edit_medsos_bisnis: "/dev/portofolio/edit/medsos/",
|
||||||
|
};
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
export const RouterUserProfile = {
|
|
||||||
api_foto: "/api/profile/foto/",
|
|
||||||
};
|
|
||||||
3
src/app/lib/router_hipmi/router_user_search.ts
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
export const RouterUserSearch = {
|
||||||
|
main: "/dev/user_search/main"
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default function Admin_LayoutBuktiTransferInvestasi({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Bukti Transfer" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Bukti Transfer" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ export default function Admin_LayoutHalamanAksi({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{/* {children} */}
|
{/* {children} */}
|
||||||
<AppShell padding={"md"} header={<HeaderTamplate title="Pilih Aksi" />}>
|
<AppShell padding={"md"} header={<ComponentGlobal_HeaderTamplate title="Pilih Aksi" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default function Admin_LayoutKonfirmasiInvestasi({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Konfimasi Investasi" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Konfimasi Investasi" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
||||||
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { RouterUserProfile } from "@/app/lib/router_hipmi/router_user_profile";
|
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import funEditInvestasi from "@/app_modules/investasi/fun/fun_edit_investasi";
|
import funEditInvestasi from "@/app_modules/investasi/fun/fun_edit_investasi";
|
||||||
import funGantiStatusInvestasi from "@/app_modules/investasi/fun/fun_ganti_status";
|
import funGantiStatusInvestasi from "@/app_modules/investasi/fun/fun_ganti_status";
|
||||||
import { gs_StatusPortoInvestasi } from "@/app_modules/investasi/g_state";
|
import { gs_StatusPortoInvestasi } from "@/app_modules/investasi/g_state";
|
||||||
import { MODEL_Investasi } from "@/app_modules/investasi/model/model_investasi";
|
import { MODEL_Investasi } from "@/app_modules/investasi/model/model_investasi";
|
||||||
import { MODEL_User_profile } from "@/app_modules/home/models/user_profile";
|
import { MODEL_PROFILE_OLD } from "@/app_modules/home/model/user_profile";
|
||||||
import {
|
import {
|
||||||
Group,
|
Group,
|
||||||
Flex,
|
Flex,
|
||||||
@@ -64,7 +64,7 @@ export default function Admin_KonfirmasiInvestasi({
|
|||||||
dataUser,
|
dataUser,
|
||||||
}: {
|
}: {
|
||||||
dataInvestasi: MODEL_Investasi;
|
dataInvestasi: MODEL_Investasi;
|
||||||
dataUser: MODEL_User_profile;
|
dataUser: MODEL_PROFILE_OLD;
|
||||||
}) {
|
}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [investasi, setInvestasi] = useState(dataInvestasi);
|
const [investasi, setInvestasi] = useState(dataInvestasi);
|
||||||
@@ -139,14 +139,14 @@ export default function Admin_KonfirmasiInvestasi({
|
|||||||
<IconChevronLeft />
|
<IconChevronLeft />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
<Flex align={"center"} gap={"xs"} pl={"lg"}>
|
<Flex align={"center"} gap={"xs"} pl={"lg"}>
|
||||||
<Avatar
|
{/* <Avatar
|
||||||
radius={50}
|
radius={50}
|
||||||
size={"md"}
|
size={"md"}
|
||||||
src={
|
src={
|
||||||
RouterUserProfile.api_foto +
|
RouterProfile.api_foto +
|
||||||
`${user.Profile?.ImageProfile?.url}`
|
`${user.Profile?.ImageProfile?.url}`
|
||||||
}
|
}
|
||||||
/>
|
/> */}
|
||||||
<Text>{user.username}</Text>
|
<Text>{user.username}</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
</Group>
|
</Group>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default function Admin_LayoutStatusTransferInvesatasi({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Status Transfer" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Status Transfer" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ import {
|
|||||||
useMantineTheme,
|
useMantineTheme,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import React, { useState } from "react";
|
import React, { useState } from "react";
|
||||||
import HeaderTamplate from "../../component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "../../component_global/header_tamplate";
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
import { IconLetterH, IconLogout } from "@tabler/icons-react";
|
import { IconLetterH, IconLogout } from "@tabler/icons-react";
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ import Login from "./login/view";
|
|||||||
import Validasi from "./validasi/view";
|
import Validasi from "./validasi/view";
|
||||||
import LayoutValidasi from "./validasi/layout";
|
import LayoutValidasi from "./validasi/layout";
|
||||||
import Register from "./register/view";
|
import Register from "./register/view";
|
||||||
import Logout from "./logout/view";
|
import User_Logout from "./logout/view";
|
||||||
|
|
||||||
export { SplashScreen, Login, Validasi, Register, Logout, LayoutValidasi };
|
export { SplashScreen, Login, Validasi, Register, User_Logout as Logout, LayoutValidasi };
|
||||||
|
|||||||
@@ -1,33 +1,28 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { myConsole } from "@/app/fun/my_console";
|
import { myConsole } from "@/app/fun/my_console";
|
||||||
import { ApiHipmi } from "@/app/lib/api";
|
import { ApiHipmi } from "@/app/lib/api";
|
||||||
import { ActionIcon, Button, Group, Modal } from "@mantine/core";
|
import { ActionIcon, Button, Group, Modal, Stack, Title } from "@mantine/core";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { gs_nomor, gs_otp } from "../state/state";
|
import { gs_nomor, gs_otp } from "../state/state";
|
||||||
import { IconLogout } from "@tabler/icons-react";
|
import { IconLogout } from "@tabler/icons-react";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import { gs_token } from "@/app_modules/home/state/global_state";
|
|
||||||
import { useDisclosure } from "@mantine/hooks";
|
import { useDisclosure } from "@mantine/hooks";
|
||||||
|
|
||||||
export default function Logout() {
|
export default function User_Logout() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [nomor, setnomor] = useAtom(gs_nomor);
|
const [nomor, setnomor] = useAtom(gs_nomor);
|
||||||
const [code, setCode] = useAtom(gs_otp);
|
const [code, setCode] = useAtom(gs_otp);
|
||||||
const [token, setToken] = useAtom(gs_token);
|
|
||||||
|
|
||||||
const [opened, { toggle }] = useDisclosure(false);
|
const [opened, { toggle }] = useDisclosure(false);
|
||||||
|
|
||||||
const onLogout = async () => {
|
const onLogout = async () => {
|
||||||
// MyConsole("keluar");
|
|
||||||
|
|
||||||
await fetch(ApiHipmi.logout)
|
await fetch(ApiHipmi.logout)
|
||||||
.then((res) => res.json())
|
.then((res) => res.json())
|
||||||
.then((val) => {
|
.then((val) => {
|
||||||
if (val.status == 200) {
|
if (val.status == 200) {
|
||||||
setnomor(null);
|
setnomor(null);
|
||||||
setCode(null);
|
setCode(null);
|
||||||
setToken(null);
|
|
||||||
|
|
||||||
return router.push("/dev/auth/login");
|
return router.push("/dev/auth/login");
|
||||||
}
|
}
|
||||||
@@ -36,25 +31,31 @@ export default function Logout() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Modal opened={opened} onClose={toggle} centered title="Yakin ingin keluar ?">
|
<Modal opened={opened} onClose={toggle} centered withCloseButton={false}>
|
||||||
<Group align="center" position="center">
|
<Stack>
|
||||||
<Button compact onClick={toggle} radius={50}>
|
<Title order={6}>Anda yakin ingin keluar ?</Title>
|
||||||
Batal
|
<Group align="center" position="center">
|
||||||
</Button>
|
<Button compact onClick={toggle} radius={50}>
|
||||||
<Button
|
Batal
|
||||||
compact
|
</Button>
|
||||||
radius={50}
|
<Button
|
||||||
bg={Warna.merah}
|
compact
|
||||||
color="red"
|
radius={50}
|
||||||
onClick={() => onLogout()}
|
bg={Warna.merah}
|
||||||
>
|
color="red"
|
||||||
Keluar
|
onClick={() => onLogout()}
|
||||||
</Button>
|
>
|
||||||
</Group>
|
Keluar
|
||||||
|
</Button>
|
||||||
|
</Group>
|
||||||
|
</Stack>
|
||||||
</Modal>
|
</Modal>
|
||||||
<ActionIcon variant="transparent">
|
{/* <ActionIcon variant="transparent">
|
||||||
<IconLogout color={Warna.merah} onClick={toggle} />
|
<IconLogout color={Warna.merah} onClick={toggle} />
|
||||||
</ActionIcon>
|
</ActionIcon> */}
|
||||||
|
<Button radius={"xl"} color={"red"} onClick={toggle}>
|
||||||
|
Logout
|
||||||
|
</Button>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ import { IconChevronLeft, IconCircleLetterH } from "@tabler/icons-react";
|
|||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
import { ApiHipmi } from "@/app/lib/api";
|
import { ApiHipmi } from "@/app/lib/api";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { funGetUserProfile } from "@/app_modules/fun/get_user_profile";
|
import { funGetUserProfile } from "@/app_modules/fun_global/get_user_profile";
|
||||||
import { useFocusTrap } from "@mantine/hooks";
|
import { useFocusTrap } from "@mantine/hooks";
|
||||||
import { NotifBerhasil } from "@/app_modules/donasi/component/notifikasi/notif_berhasil";
|
import { NotifBerhasil } from "@/app_modules/donasi/component/notifikasi/notif_berhasil";
|
||||||
import { NotifGagal } from "@/app_modules/donasi/component/notifikasi/notif_gagal";
|
import { NotifGagal } from "@/app_modules/donasi/component/notifikasi/notif_gagal";
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Header, Group, ActionIcon, Text } from "@mantine/core";
|
import { Header, Group, ActionIcon, Text, Title } from "@mantine/core";
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
import { IconArrowLeft, IconChevronLeft } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|
||||||
export default function HeaderTamplate({
|
export default function ComponentGlobal_HeaderTamplate({
|
||||||
route,
|
route,
|
||||||
route2,
|
route2,
|
||||||
title,
|
title,
|
||||||
@@ -18,7 +18,7 @@ export default function HeaderTamplate({
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Header height={50}>
|
<Header height={50} sx={{ borderStyle: "none" }}>
|
||||||
<Group h={50} position="apart" px={"md"}>
|
<Group h={50} position="apart" px={"md"}>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
variant="transparent"
|
variant="transparent"
|
||||||
@@ -30,11 +30,11 @@ export default function HeaderTamplate({
|
|||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<IconArrowLeft />
|
<IconChevronLeft />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
<Text>{title}</Text>
|
<Title order={5}>{title}</Title>
|
||||||
{(() => {
|
{(() => {
|
||||||
if (route2 === null ||route2 === undefined) {
|
if (route2 === null || route2 === undefined) {
|
||||||
return <ActionIcon disabled variant="transparent"></ActionIcon>;
|
return <ActionIcon disabled variant="transparent"></ActionIcon>;
|
||||||
} else {
|
} else {
|
||||||
return (
|
return (
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import { Center, Text } from "@mantine/core";
|
||||||
|
import { notifications } from "@mantine/notifications";
|
||||||
|
import { IconAlertTriangle, IconChecklist, IconCircleCheck } from "@tabler/icons-react";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param text | masukan text untuk peringatan
|
||||||
|
* @type string
|
||||||
|
* @returns notifikasi peringatan
|
||||||
|
*/
|
||||||
|
export async function ComponentGlobal_NotifikasiBerhasil(text: string) {
|
||||||
|
return notifications.show({
|
||||||
|
message: (
|
||||||
|
<Center>
|
||||||
|
<Text fw={"bold"}>{text}</Text>
|
||||||
|
</Center>
|
||||||
|
),
|
||||||
|
color: "green",
|
||||||
|
radius: "md",
|
||||||
|
autoClose: 1000,
|
||||||
|
icon: <IconCircleCheck color="white" />,
|
||||||
|
withCloseButton: false,
|
||||||
|
|
||||||
|
styles: (theme) => ({
|
||||||
|
description: { color: theme.white },
|
||||||
|
root: {
|
||||||
|
backgroundColor: theme.colors.green[7],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import { Center, Text } from "@mantine/core";
|
||||||
|
import { notifications } from "@mantine/notifications";
|
||||||
|
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param text | masukan text untuk peringatan
|
||||||
|
* @type string
|
||||||
|
* @returns notifikasi peringatan
|
||||||
|
*/
|
||||||
|
export async function ComponentGlobal_NotifikasiGagal(text: string) {
|
||||||
|
return notifications.show({
|
||||||
|
message: (
|
||||||
|
<Center>
|
||||||
|
<Text fw={"bold"}>{text}</Text>
|
||||||
|
</Center>
|
||||||
|
),
|
||||||
|
color: "red",
|
||||||
|
radius: "md",
|
||||||
|
autoClose: 1000,
|
||||||
|
icon: <IconAlertTriangle color="white" />,
|
||||||
|
withCloseButton: false,
|
||||||
|
|
||||||
|
styles: (theme) => ({
|
||||||
|
description: { color: theme.white },
|
||||||
|
root: {
|
||||||
|
backgroundColor: theme.colors.red[7],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
import { ActionIcon, Avatar, Center, Text } from "@mantine/core";
|
||||||
|
import { notifications } from "@mantine/notifications";
|
||||||
|
import { IconAlertTriangle } from "@tabler/icons-react";
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param text | masukan text untuk peringatan
|
||||||
|
* @type string
|
||||||
|
* @returns notifikasi peringatan
|
||||||
|
*/
|
||||||
|
export async function ComponentGlobal_NotifikasiPeringatan(text: string) {
|
||||||
|
return notifications.show({
|
||||||
|
message: (
|
||||||
|
<Center>
|
||||||
|
<Text fw={"bold"}>{text}</Text>
|
||||||
|
</Center>
|
||||||
|
),
|
||||||
|
color: "yellow.3",
|
||||||
|
radius: "md",
|
||||||
|
autoClose: 1000,
|
||||||
|
icon: <ActionIcon radius={"xl"} bg={"white"} p={3}><IconAlertTriangle color="red" /></ActionIcon>,
|
||||||
|
withCloseButton: false,
|
||||||
|
|
||||||
|
styles: (theme) => ({
|
||||||
|
description: { color: theme.white },
|
||||||
|
root: {
|
||||||
|
backgroundColor: theme.colors.yellow[7],
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
import { IconArrowLeft } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -15,7 +15,7 @@ export default function LayoutMainCrowd({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={<HeaderTamplate route="/dev/home" title="HIPMI Crowd Funding" />}
|
header={<ComponentGlobal_HeaderTamplate route="/dev/home" title="HIPMI Crowd Funding" />}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
import { RouterDonasi } from "@/app/lib/router_hipmi/router_donasi";
|
||||||
import { MODEL_AUTHOR } from "@/app_modules/home/models/interface";
|
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||||
import { Stack, Title, Paper, Group, ActionIcon, Avatar, Text } from "@mantine/core";
|
import { Stack, Title, Paper, Group, ActionIcon, Avatar, Text } from "@mantine/core";
|
||||||
import { IconCircleChevronRight } from "@tabler/icons-react";
|
import { IconCircleChevronRight } from "@tabler/icons-react";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import ComponentDonasi_NotedBox from "../noted_box";
|
import ComponentDonasi_NotedBox from "../noted_box";
|
||||||
|
|
||||||
export default function ComponentDonasi_InformasiPenggalangMain({ author }: { author: MODEL_AUTHOR}) {
|
export default function ComponentDonasi_InformasiPenggalangMain({ author }: { author: MODEL_USER}) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
MODEL_DONASI,
|
MODEL_DONASI,
|
||||||
MODEL_DONASI_INFO_PENGGALANG,
|
MODEL_DONASI_INFO_PENGGALANG,
|
||||||
} from "@/app_modules/donasi/model/interface";
|
} from "@/app_modules/donasi/model/interface";
|
||||||
import { MODEL_AUTHOR } from "@/app_modules/home/models/interface";
|
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||||
import {
|
import {
|
||||||
AspectRatio,
|
AspectRatio,
|
||||||
Avatar,
|
Avatar,
|
||||||
@@ -56,7 +56,7 @@ export default function PenggalangDanaDonasi({
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function InformasiPenggalang({ value }: { value: MODEL_AUTHOR }) {
|
function InformasiPenggalang({ value }: { value: MODEL_USER }) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Paper radius={"md"}>
|
<Paper radius={"md"}>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { MODEL_AUTHOR } from "@/app_modules/home/models/interface";
|
import { MODEL_USER } from "@/app_modules/home/model/interface";
|
||||||
import { Model_Nama_Bank } from "@/app_modules/investasi/model/model_investasi";
|
import { Model_Nama_Bank } from "@/app_modules/investasi/model/model_investasi";
|
||||||
import { MODEL_IMAGES } from "@/app_modules/models/interface";
|
import { MODEL_IMAGES } from "@/app_modules/models/interface";
|
||||||
|
|
||||||
@@ -24,7 +24,7 @@ export interface MODEL_DONASI {
|
|||||||
donasiMaster_DurasiId: string;
|
donasiMaster_DurasiId: string;
|
||||||
donasiMaster_StatusDonasiId: string;
|
donasiMaster_StatusDonasiId: string;
|
||||||
CeritaDonasi: MODEL_CERITA_DONASI;
|
CeritaDonasi: MODEL_CERITA_DONASI;
|
||||||
Author: MODEL_AUTHOR;
|
Author: MODEL_USER;
|
||||||
imageDonasi: MODEL_IMAGES;
|
imageDonasi: MODEL_IMAGES;
|
||||||
DonasiMaster_Ketegori: MODEL_DONASI_ALL_MASTER;
|
DonasiMaster_Ketegori: MODEL_DONASI_ALL_MASTER;
|
||||||
DonasiMaster_Durasi: MODEL_DONASI_ALL_MASTER;
|
DonasiMaster_Durasi: MODEL_DONASI_ALL_MASTER;
|
||||||
@@ -78,7 +78,7 @@ export interface MODEL_DONASI_INVOICE {
|
|||||||
active: boolean;
|
active: boolean;
|
||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
Author: MODEL_AUTHOR;
|
Author: MODEL_USER;
|
||||||
authorId: string;
|
authorId: string;
|
||||||
donasiMaster_BankId: string;
|
donasiMaster_BankId: string;
|
||||||
donasiMaster_StatusInvoiceId: string;
|
donasiMaster_StatusInvoiceId: string;
|
||||||
|
|||||||
@@ -19,11 +19,14 @@ export async function funGetUserProfile( userId: string ) {
|
|||||||
email: true,
|
email: true,
|
||||||
jenisKelamin: true,
|
jenisKelamin: true,
|
||||||
name: true,
|
name: true,
|
||||||
|
imagesId: true,
|
||||||
ImageProfile: {
|
ImageProfile: {
|
||||||
select: {
|
select: {
|
||||||
url: true,
|
url: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
ImagesBackground: true,
|
||||||
|
imagesBackgroundId: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -7,7 +7,7 @@ import { unsealData } from "iron-session";
|
|||||||
import { redirect } from "next/navigation";
|
import { redirect } from "next/navigation";
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||||
|
|
||||||
export async function getToken_UserId() {
|
export async function User_getUserId() {
|
||||||
const c = cookies().get("ssn");
|
const c = cookies().get("ssn");
|
||||||
if (!c?.value) return redirect("/dev/auth/login");
|
if (!c?.value) return redirect("/dev/auth/login");
|
||||||
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
"use server";
|
|
||||||
|
|
||||||
import prisma from "@/app/lib/prisma";
|
|
||||||
import { getConfig } from "@/bin/config";
|
|
||||||
import { unsealData } from "iron-session";
|
|
||||||
import { cookies } from "next/headers";
|
|
||||||
|
|
||||||
import fs from "fs";
|
|
||||||
import yaml from "yaml";
|
|
||||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @returns token(id and username)
|
|
||||||
*/
|
|
||||||
export async function getToken() {
|
|
||||||
const c = cookies().get("ssn");
|
|
||||||
|
|
||||||
const token = await unsealData(c?.value as string, {
|
|
||||||
password: await config.server.password,
|
|
||||||
});
|
|
||||||
|
|
||||||
const data = JSON.parse(token as any)
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
17
src/app_modules/home/fun/get/get_one_user_by_id.ts
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
"use server";
|
||||||
|
|
||||||
|
import prisma from "@/app/lib/prisma";
|
||||||
|
|
||||||
|
export async function User_getOneById(userId: string) {
|
||||||
|
const data = await prisma.user.findFirst({
|
||||||
|
where: {
|
||||||
|
id: userId,
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
Profile: true,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import HomeView from "./view";
|
import HomeView from "./view";
|
||||||
import HomeLayout from "./layout";
|
import HomeLayout from "./layout";
|
||||||
import { getToken } from "./api/api-get-token";
|
|
||||||
export {HomeView, HomeLayout, getToken}
|
export {HomeView, HomeLayout}
|
||||||
@@ -1,10 +1,59 @@
|
|||||||
"use client";
|
"use client";
|
||||||
import { ActionIcon, AppShell, Flex, Group, Header, Text } from "@mantine/core";
|
import {
|
||||||
|
ActionIcon,
|
||||||
|
AppShell,
|
||||||
|
Avatar,
|
||||||
|
Center,
|
||||||
|
Flex,
|
||||||
|
Footer,
|
||||||
|
Grid,
|
||||||
|
Group,
|
||||||
|
Header,
|
||||||
|
SimpleGrid,
|
||||||
|
Stack,
|
||||||
|
Text,
|
||||||
|
ThemeIcon,
|
||||||
|
} from "@mantine/core";
|
||||||
import { HomeView } from ".";
|
import { HomeView } from ".";
|
||||||
import { IconUserSearch, IconAward, IconQrcode } from "@tabler/icons-react";
|
import {
|
||||||
|
IconUserSearch,
|
||||||
|
IconAward,
|
||||||
|
IconQrcode,
|
||||||
|
IconUserCircle,
|
||||||
|
} from "@tabler/icons-react";
|
||||||
import { Logout } from "../auth";
|
import { Logout } from "../auth";
|
||||||
|
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
|
import { MODEL_USER } from "./model/interface";
|
||||||
|
import React, { useState } from "react";
|
||||||
|
import { useRouter } from "next/navigation";
|
||||||
|
import { ComponentGlobal_NotifikasiPeringatan } from "../component_global/notif_global/notifikasi_peringatan";
|
||||||
|
import { ComponentGlobal_NotifikasiBerhasil } from "../component_global/notif_global/notifikasi_berhasil";
|
||||||
|
import { RouterUserSearch } from "@/app/lib/router_hipmi/router_user_search";
|
||||||
|
|
||||||
|
export default function HomeLayout({
|
||||||
|
dataUser,
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
dataUser: MODEL_USER;
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
const router = useRouter();
|
||||||
|
const [user, setUser] = useState(dataUser);
|
||||||
|
const listFooter = [
|
||||||
|
{
|
||||||
|
id: 1,
|
||||||
|
name: "Temukan user",
|
||||||
|
icon: <IconUserSearch />,
|
||||||
|
link: ``,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 2,
|
||||||
|
name: "Profile",
|
||||||
|
icon: <IconUserCircle />,
|
||||||
|
link: RouterProfile.katalog,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export default function HomeLayout({ children }: { children: any }) {
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
@@ -12,9 +61,6 @@ export default function HomeLayout({ children }: { children: any }) {
|
|||||||
<Header height={50} bg={"dark"}>
|
<Header height={50} bg={"dark"}>
|
||||||
<Group position="apart" align="center" h={50} p={"sm"}>
|
<Group position="apart" align="center" h={50} p={"sm"}>
|
||||||
<Group spacing={"sm"}>
|
<Group spacing={"sm"}>
|
||||||
<ActionIcon>
|
|
||||||
<IconUserSearch />
|
|
||||||
</ActionIcon>
|
|
||||||
<ActionIcon>
|
<ActionIcon>
|
||||||
<IconAward />
|
<IconAward />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
@@ -26,12 +72,57 @@ export default function HomeLayout({ children }: { children: any }) {
|
|||||||
<ActionIcon>
|
<ActionIcon>
|
||||||
<IconQrcode />
|
<IconQrcode />
|
||||||
</ActionIcon>
|
</ActionIcon>
|
||||||
<Logout />
|
|
||||||
</Group>
|
</Group>
|
||||||
</Group>
|
</Group>
|
||||||
</Header>
|
</Header>
|
||||||
}
|
}
|
||||||
|
footer={
|
||||||
|
<Footer height={70} bg={"dark"}>
|
||||||
|
<Grid p={"xs"}>
|
||||||
|
<Grid.Col
|
||||||
|
span={"auto"}
|
||||||
|
onClick={() => {
|
||||||
|
if (user.Profile === null) {
|
||||||
|
ComponentGlobal_NotifikasiPeringatan("Lengkapi Profile");
|
||||||
|
} else {
|
||||||
|
// router.push(RouterProfile.katalog + `${user.Profile.id}`);
|
||||||
|
router.push(RouterUserSearch.main)
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Stack align="center" spacing={0}>
|
||||||
|
<ActionIcon variant={"transparent"}>
|
||||||
|
<IconUserSearch color="white" />
|
||||||
|
</ActionIcon>
|
||||||
|
<Text fz={"xs"} c={"white"}>
|
||||||
|
Temukan pengguna
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
<Grid.Col
|
||||||
|
span={"auto"}
|
||||||
|
onClick={() => {
|
||||||
|
if (user.Profile === null) {
|
||||||
|
router.push(RouterProfile.create + `${user.id}`);
|
||||||
|
} else {
|
||||||
|
router.push(RouterProfile.katalog + `${user.Profile.id}`);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Stack align="center" spacing={0}>
|
||||||
|
<ActionIcon variant={"transparent"}>
|
||||||
|
{user.Profile === null ? <IconUserCircle color="white" /> : <Avatar radius={"xl"} size={20} src={RouterProfile.api_foto_profile + `${user.Profile.imagesId}`}/>}
|
||||||
|
</ActionIcon>
|
||||||
|
<Text fz={"xs"} c={"white"}>
|
||||||
|
Profile
|
||||||
|
</Text>
|
||||||
|
</Stack>
|
||||||
|
</Grid.Col>
|
||||||
|
</Grid>
|
||||||
|
</Footer>
|
||||||
|
}
|
||||||
>
|
>
|
||||||
|
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
export interface MODEL_AUTHOR {
|
import { MODEL_PROFILE } from "@/app_modules/katalog/profile/model/interface";
|
||||||
|
|
||||||
|
export interface MODEL_USER {
|
||||||
id: string;
|
id: string;
|
||||||
username: string;
|
username: string;
|
||||||
nomor: string;
|
nomor: string;
|
||||||
@@ -6,4 +8,6 @@ export interface MODEL_AUTHOR {
|
|||||||
createdAt: Date;
|
createdAt: Date;
|
||||||
updatedAt: Date;
|
updatedAt: Date;
|
||||||
masterUserRoleId: string;
|
masterUserRoleId: string;
|
||||||
|
Profile: MODEL_PROFILE
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
export interface MODEL_User_profile {
|
import { MODEL_IMAGES } from "@/app_modules/models/interface";
|
||||||
|
|
||||||
|
export interface MODEL_PROFILE_OLD {
|
||||||
id: string;
|
id: string;
|
||||||
username: string;
|
username: string;
|
||||||
nomor: string;
|
nomor: string;
|
||||||
@@ -8,8 +10,11 @@ export interface MODEL_User_profile {
|
|||||||
email: string;
|
email: string;
|
||||||
jenisKelamin: string;
|
jenisKelamin: string;
|
||||||
name: string;
|
name: string;
|
||||||
|
imagesId: string
|
||||||
ImageProfile: {
|
ImageProfile: {
|
||||||
url: string;
|
url: string;
|
||||||
} | null;
|
}
|
||||||
} | null;
|
imagesBackgroundId: string,
|
||||||
|
ImagesBackground: MODEL_IMAGES
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -13,11 +13,6 @@ import {
|
|||||||
ThemeIcon,
|
ThemeIcon,
|
||||||
Title,
|
Title,
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { Logout } from "../auth";
|
|
||||||
import { useState } from "react";
|
|
||||||
import { ApiHipmi } from "@/app/lib/api";
|
|
||||||
import { useShallowEffect } from "@mantine/hooks";
|
|
||||||
import { getToken } from "./api/api-get-token";
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
IconAffiliate,
|
IconAffiliate,
|
||||||
@@ -32,40 +27,28 @@ import {
|
|||||||
} from "@tabler/icons-react";
|
} from "@tabler/icons-react";
|
||||||
|
|
||||||
import toast from "react-simple-toasts";
|
import toast from "react-simple-toasts";
|
||||||
import { getProfile } from "../katalog/profile";
|
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import { useAtom } from "jotai";
|
import { MODEL_PROFILE_OLD } from "./model/user_profile";
|
||||||
import { gs_token } from "./state/global_state";
|
|
||||||
import { loadDataProfile } from "../katalog/profile/fun/fun_get_profile";
|
|
||||||
import {
|
|
||||||
gs_fotoProfile,
|
|
||||||
gs_profile,
|
|
||||||
} from "../katalog/profile/state/global_state";
|
|
||||||
import { gs_ListPortofolio } from "../katalog/portofolio/state/global_state";
|
|
||||||
import { myConsole } from "@/app/fun/my_console";
|
|
||||||
import { getFotoProfile } from "../katalog/profile/api/get-foto-profile";
|
|
||||||
import { funGetUserProfile } from "../fun/get_user_profile";
|
|
||||||
import { MODEL_User_profile } from "./models/user_profile";
|
|
||||||
import AppNotif from "../notif";
|
import AppNotif from "../notif";
|
||||||
|
|
||||||
// export const dynamic = "force-dynamic"
|
// export const dynamic = "force-dynamic"
|
||||||
// export const revalidate = 0
|
// export const revalidate = 0
|
||||||
|
|
||||||
export default function HomeView({ user }: { user: MODEL_User_profile }) {
|
export default function HomeView() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [stateUser, setStateUser] = useState(user);
|
// const [stateUser, setStateUser] = useState(user);
|
||||||
|
|
||||||
const listHalaman = [
|
const listHalaman = [
|
||||||
{
|
{
|
||||||
id: 1,
|
id: 1,
|
||||||
name: "Forums",
|
name: "Crowd Funding",
|
||||||
icon: <IconMessages size={50} />,
|
icon: <IconHeartHandshake size={50} />,
|
||||||
link: "",
|
link: `/dev/crowd/splash`,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 2,
|
id: 2,
|
||||||
name: "Project Collaboration",
|
name: "Event",
|
||||||
icon: <IconAffiliate size={50} />,
|
icon: <IconPresentation size={50} />,
|
||||||
link: "",
|
link: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -76,15 +59,15 @@ export default function HomeView({ user }: { user: MODEL_User_profile }) {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 4,
|
id: 4,
|
||||||
name: "Event",
|
name: "Project Collaboration",
|
||||||
icon: <IconPresentation size={50} />,
|
icon: <IconAffiliate size={50} />,
|
||||||
link: "",
|
link: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 5,
|
id: 5,
|
||||||
name: "Crowd Funding",
|
name: "Forums",
|
||||||
icon: <IconHeartHandshake size={50} />,
|
icon: <IconMessages size={50} />,
|
||||||
link: `/dev/crowd/splash`,
|
link: "",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 6,
|
id: 6,
|
||||||
@@ -109,7 +92,7 @@ export default function HomeView({ user }: { user: MODEL_User_profile }) {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Box>
|
<Box>
|
||||||
<Flex align={"center"} gap={"sm"}>
|
{/* <Flex align={"center"} gap={"sm"}>
|
||||||
<ActionIcon
|
<ActionIcon
|
||||||
size={30}
|
size={30}
|
||||||
variant="transparent"
|
variant="transparent"
|
||||||
@@ -128,7 +111,7 @@ export default function HomeView({ user }: { user: MODEL_User_profile }) {
|
|||||||
Welcome to ,{" "}
|
Welcome to ,{" "}
|
||||||
{stateUser.username ? stateUser.username : <Loader size={"xs"} />}
|
{stateUser.username ? stateUser.username : <Loader size={"xs"} />}
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex> */}
|
||||||
|
|
||||||
<Paper bg={"dark"} radius={5} my={"xs"}>
|
<Paper bg={"dark"} radius={5} my={"xs"}>
|
||||||
<Image alt="logo" src={"/aset/investasi/home-hipmi.png"} />
|
<Image alt="logo" src={"/aset/investasi/home-hipmi.png"} />
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default function LayoutBeritaInvestasi({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Berita" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Berita" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ export default function InvestasiCreateLayout({
|
|||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate title="Investasi Baru" />
|
<ComponentGlobal_HeaderTamplate title="Investasi Baru" />
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell, Button, Center, Footer } from "@mantine/core";
|
import { AppShell, Button, Center, Footer } from "@mantine/core";
|
||||||
import { IconPencilPlus } from "@tabler/icons-react";
|
import { IconPencilPlus } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -20,7 +20,7 @@ export default function LayoutCreateBeritaInvestasi({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={<HeaderTamplate title="Buat Berita" />}
|
header={<ComponentGlobal_HeaderTamplate title="Buat Berita" />}
|
||||||
// footer={
|
// footer={
|
||||||
// <Footer height={70} sx={{ borderStyle: "none" }}>
|
// <Footer height={70} sx={{ borderStyle: "none" }}>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
||||||
import { IconArrowLeft, IconEdit } from "@tabler/icons-react";
|
import { IconArrowLeft, IconEdit } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ import { useRouter } from "next/navigation";
|
|||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { MODEL_Investasi } from "../model/model_investasi";
|
import { MODEL_Investasi } from "../model/model_investasi";
|
||||||
import moment from "moment";
|
import moment from "moment";
|
||||||
import { MODEL_User_profile } from "@/app_modules/home/models/user_profile";
|
import { MODEL_PROFILE_OLD } from "@/app_modules/home/model/user_profile";
|
||||||
import { RouterUserProfile } from "@/app/lib/router_hipmi/router_user_profile";
|
import { RouterProfile } from "@/app/lib/router_hipmi/router_katalog";
|
||||||
import { gs_TransferValue } from "../g_state";
|
import { gs_TransferValue } from "../g_state";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import _ from "lodash";
|
import _ from "lodash";
|
||||||
@@ -45,7 +45,7 @@ export default function DetailInvestasi({
|
|||||||
totalInvestor,
|
totalInvestor,
|
||||||
}: {
|
}: {
|
||||||
dataInvestasi: MODEL_Investasi;
|
dataInvestasi: MODEL_Investasi;
|
||||||
dataUser: MODEL_User_profile;
|
dataUser: MODEL_PROFILE_OLD;
|
||||||
loginUserId: string;
|
loginUserId: string;
|
||||||
progress: number;
|
progress: number;
|
||||||
totalInvestor: number;
|
totalInvestor: number;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default function LayoutDetailBeritaInvestasi({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Detail Berita" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Detail Berita" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default function LayoutDetailDokumenInvestasi({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Dokumen" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Dokumen" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -16,7 +16,7 @@ export default function LayoutDetailDraftInvestasi({
|
|||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate
|
<ComponentGlobal_HeaderTamplate
|
||||||
title="Detail Draft"
|
title="Detail Draft"
|
||||||
icon={<IconEdit />}
|
icon={<IconEdit />}
|
||||||
route2={`/dev/investasi/edit/${id}`}
|
route2={`/dev/investasi/edit/${id}`}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate"
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"
|
||||||
import { AppShell } from "@mantine/core"
|
import { AppShell } from "@mantine/core"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ export default function LayoutDetailPublishInvestasi({children}: {children: Reac
|
|||||||
|
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate title="Detail Publish"/>
|
<ComponentGlobal_HeaderTamplate title="Detail Publish"/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -16,7 +16,7 @@ export default function LayoutDetailRejecttInvestasi({
|
|||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate
|
<ComponentGlobal_HeaderTamplate
|
||||||
title="Detail Reject"
|
title="Detail Reject"
|
||||||
// icon={<IconEdit />}
|
// icon={<IconEdit />}
|
||||||
// route2={`/dev/investasi/edit/${idInves}`}
|
// route2={`/dev/investasi/edit/${idInves}`}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate"
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"
|
||||||
import { AppShell } from "@mantine/core"
|
import { AppShell } from "@mantine/core"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ export default function LayoutDetailReviewInvestasi({children}: {children: React
|
|||||||
|
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate title="Detail Review"/>
|
<ComponentGlobal_HeaderTamplate title="Detail Review"/>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
import { ActionIcon, AppShell, Group, Header, Text } from "@mantine/core";
|
||||||
import { IconArrowLeft } from "@tabler/icons-react";
|
import { IconArrowLeft } from "@tabler/icons-react";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
@@ -16,7 +16,7 @@ export default function LayoutDetailProspektus({
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Prospektus" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Prospektus" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -11,7 +11,7 @@ export default function LayoutDetailSahamTerbeli({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Saham Terbeli" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Saham Terbeli" />}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
"use client"
|
"use client"
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate"
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate"
|
||||||
import { AppShell } from "@mantine/core"
|
import { AppShell } from "@mantine/core"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
|
|
||||||
export default function LayoutEditInvestasi({children}: {children: React.ReactNode}){
|
export default function LayoutEditInvestasi({children}: {children: React.ReactNode}){
|
||||||
return<>
|
return<>
|
||||||
<AppShell header={<HeaderTamplate title="Edit Portofolio Investasi"/>}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Edit Portofolio Investasi"/>}>
|
||||||
{children}
|
{children}
|
||||||
</AppShell>
|
</AppShell>
|
||||||
</>
|
</>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import { Warna } from "@/app/lib/warna";
|
import { Warna } from "@/app/lib/warna";
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell, Button, Center, Footer } from "@mantine/core";
|
import { AppShell, Button, Center, Footer } from "@mantine/core";
|
||||||
import { useRouter } from "next/navigation";
|
import { useRouter } from "next/navigation";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -17,7 +17,7 @@ export default function LayoutEditBeritaInvestasi({
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={<HeaderTamplate title="Edit Berita" />}
|
header={<ComponentGlobal_HeaderTamplate title="Edit Berita" />}
|
||||||
// footer={
|
// footer={
|
||||||
// <Footer height={70} sx={{ borderStyle: "none" }}>
|
// <Footer height={70} sx={{ borderStyle: "none" }}>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -17,7 +17,7 @@ export default function LayoutEditDokumenInvestasi({
|
|||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate
|
<ComponentGlobal_HeaderTamplate
|
||||||
title="Edit Dokumen"
|
title="Edit Dokumen"
|
||||||
icon={<IconEdit />}
|
icon={<IconEdit />}
|
||||||
route2={RouterInvestasi.upload_dokumen + `${idInves}`}
|
route2={RouterInvestasi.upload_dokumen + `${idInves}`}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell, Stack, Text } from "@mantine/core";
|
import { AppShell, Stack, Text } from "@mantine/core";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
|
|
||||||
@@ -13,7 +13,7 @@ export default function LayoutEditIntroInvestasi({
|
|||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<AppShell header={<HeaderTamplate title="Edit Intro" />}>
|
<AppShell header={<ComponentGlobal_HeaderTamplate title="Edit Intro" />}>
|
||||||
<Stack>
|
<Stack>
|
||||||
{children}
|
{children}
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi";
|
||||||
import HeaderTamplate from "@/app_modules/component/header_tamplate";
|
import ComponentGlobal_HeaderTamplate from "@/app_modules/component_global/header_tamplate";
|
||||||
import { AppShell } from "@mantine/core";
|
import { AppShell } from "@mantine/core";
|
||||||
import { IconEdit } from "@tabler/icons-react";
|
import { IconEdit } from "@tabler/icons-react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
@@ -19,7 +19,7 @@ export default function LayoutEditProspektusInvestasi({
|
|||||||
<>
|
<>
|
||||||
<AppShell
|
<AppShell
|
||||||
header={
|
header={
|
||||||
<HeaderTamplate
|
<ComponentGlobal_HeaderTamplate
|
||||||
title="Edit Prospektus"
|
title="Edit Prospektus"
|
||||||
icon={<IconEdit />}
|
icon={<IconEdit />}
|
||||||
route2={RouterInvestasi.upload_prospektus + `${dataInvestasi.id}`}
|
route2={RouterInvestasi.upload_prospektus + `${dataInvestasi.id}`}
|
||||||
|
|||||||