diff --git a/.env b/.env index f8620a4f..85072cdf 100644 --- a/.env +++ b/.env @@ -4,4 +4,7 @@ # Prisma supports the native connection string format for PostgreSQL, MySQL, SQLite, SQL Server, MongoDB and CockroachDB. # See the documentation for all the connection string options: https://pris.ly/d/connection-strings -DATABASE_URL="postgresql://bip:Production_123@localhost:5433/hipmi?schema=public" \ No newline at end of file +DATABASE_URL="postgresql://bip:Production_123@localhost:5433/hipmi?schema=public" +PWD="QWERTYUIOPLKJHGFDSAZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLPPOIUYTREWQLKJHGFDSAMNBVCXZlghvftyguhijknhbgvcfytguu8okjnhbgvfty7u8oilkjnhgvtygu7u8ojilnkhbgvhujnkhghvjhukjnhb" +Client_KEY="SB-Mid-client-9NDTxltqdZrEB9m-" +Server_KEY="SB-Mid-server-NyltU-U7fLVQd1nv1LWBKylr" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 8f322f0d..786b7c83 100644 --- a/.gitignore +++ b/.gitignore @@ -21,7 +21,8 @@ # debug npm-debug.log* -yarn-debug.log* + +rn-debug.log* yarn-error.log* # local env files diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 00000000..35412482 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "WillLuke.nextjs.addTypesOnSave": true, + "WillLuke.nextjs.hasPrompted": true +} \ No newline at end of file diff --git a/README_DEV.md b/README_DEV.md new file mode 100644 index 00000000..f209b32e --- /dev/null +++ b/README_DEV.md @@ -0,0 +1,37 @@ +## Page info + +### API +- src/app/api + +### Api path shortcut +- src/app/lib/api.ts + +### fun +Deskripsi: Global function seperti console.log, random number dll. + +### lib +Deskripsi: Library untuk menampung beberapa function seperti: +- global prisma +- colortune untuk tampilan FE + +### bin +Deskripsi: JSON seeder +- menjalankan seeder : http://localhost:3000/api/seeder?dev=DEV-HIPMI + +### App_Modules +Deskripsi: Folder client yang mencakup sub menu dari menu-menu utama +- Auth: +1. login +2. validasi +3. register +4. logout +5. splash screen +6. state (khusus bagian auth) + +- Home: +1. home page + +## NOTE +Function name: +- g = global +- gs = global state \ No newline at end of file diff --git a/config.yaml b/config.yaml new file mode 100644 index 00000000..3390da51 --- /dev/null +++ b/config.yaml @@ -0,0 +1,2 @@ +server: + password: QWERTYUIOPLKJHGFDSAZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLPPOIUYTREWQLKJHGFDSAMNBVCXZlghvftyguhijknhbgvcfytguu8okjnhbgvfty7u8oilkjnhgvtygu7u8ojilnkhbgvhujnkhghvjhukjnhb diff --git a/next.config.js b/next.config.js index 767719fc..5c728631 100644 --- a/next.config.js +++ b/next.config.js @@ -1,4 +1,10 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {} +const nextConfig = { + reactStrictMode: false, + experimental: { + serverActions: true + }, + +} module.exports = nextConfig diff --git a/package.json b/package.json index 2c0b3860..b0ac8d88 100644 --- a/package.json +++ b/package.json @@ -11,21 +11,40 @@ "dependencies": { "@emotion/react": "^11.11.1", "@emotion/server": "^11.11.0", + "@mantine/carousel": "^7.1.5", "@mantine/core": "^6.0.17", + "@mantine/dropzone": "^7.1.3", "@mantine/hooks": "^6.0.17", "@mantine/next": "^6.0.17", + "@mantine/notifications": "^6.0.17", "@prisma/client": "^5.0.0", + "@tabler/icons-react": "^2.38.0", + "@types/lodash": "^4.14.199", "@types/node": "20.4.5", "@types/react": "18.2.17", "@types/react-dom": "18.2.7", + "@types/uuid": "^9.0.4", "autoprefixer": "10.4.14", + "embla-carousel-react": "^8.0.0-rc14", "eslint": "8.45.0", "eslint-config-next": "13.4.12", - "next": "13.4.12", + "iron-session": "^6.3.1", + "jotai": "^2.4.3", + "lodash": "^4.17.21", + "midtrans-client": "^1.3.1", + "moment": "^2.29.4", + "next": "^13.5.4-canary.8", "postcss": "8.4.27", "react": "18.2.0", + "react-countdown": "^2.3.5", "react-dom": "18.2.0", + "react-responsive-carousel": "^3.2.23", + "react-simple-toasts": "^5.10.0", + "react-toastify": "^9.1.3", + "socket.io-client": "^4.7.2", "tailwindcss": "3.3.3", - "typescript": "5.1.6" + "typescript": "5.1.6", + "uuid": "^9.0.1", + "yaml": "^2.3.2" } } diff --git a/prisma/migrations/20231002020725_new_prisma/migration.sql b/prisma/migrations/20231002020725_new_prisma/migration.sql new file mode 100644 index 00000000..bbf083ef --- /dev/null +++ b/prisma/migrations/20231002020725_new_prisma/migration.sql @@ -0,0 +1,51 @@ +-- CreateTable +CREATE TABLE "User" ( + "id" TEXT NOT NULL, + "username" TEXT NOT NULL, + "nomor" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3), + "masterUserRoleId" TEXT NOT NULL DEFAULT '1', + + CONSTRAINT "User_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterUserRole" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3), + + CONSTRAINT "MasterUserRole_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "UserSession" ( + "id" TEXT NOT NULL, + "token" TEXT NOT NULL, + "expires" TIMESTAMP(3) NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "userId" TEXT NOT NULL, + + CONSTRAINT "UserSession_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "User_username_key" ON "User"("username"); + +-- CreateIndex +CREATE UNIQUE INDEX "User_nomor_key" ON "User"("nomor"); + +-- CreateIndex +CREATE UNIQUE INDEX "UserSession_userId_key" ON "UserSession"("userId"); + +-- AddForeignKey +ALTER TABLE "User" ADD CONSTRAINT "User_masterUserRoleId_fkey" FOREIGN KEY ("masterUserRoleId") REFERENCES "MasterUserRole"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "UserSession" ADD CONSTRAINT "UserSession_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20231003063648_profile_and_img/migration.sql b/prisma/migrations/20231003063648_profile_and_img/migration.sql new file mode 100644 index 00000000..d4aa8505 --- /dev/null +++ b/prisma/migrations/20231003063648_profile_and_img/migration.sql @@ -0,0 +1,41 @@ +-- CreateTable +CREATE TABLE "Profile" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "email" TEXT NOT NULL, + "alamat" TEXT NOT NULL, + "jenisKelamin" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "userId" TEXT, + "imagesId" TEXT, + + CONSTRAINT "Profile_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Images" ( + "id" TEXT NOT NULL, + "url" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "Images_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Profile_email_key" ON "Profile"("email"); + +-- CreateIndex +CREATE UNIQUE INDEX "Profile_userId_key" ON "Profile"("userId"); + +-- CreateIndex +CREATE UNIQUE INDEX "Profile_imagesId_key" ON "Profile"("imagesId"); + +-- AddForeignKey +ALTER TABLE "Profile" ADD CONSTRAINT "Profile_userId_fkey" FOREIGN KEY ("userId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Profile" ADD CONSTRAINT "Profile_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES "Images"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/prisma/migrations/20231219030550_transaksi_sukses/migration.sql b/prisma/migrations/20231219030550_transaksi_sukses/migration.sql new file mode 100644 index 00000000..7d359e58 --- /dev/null +++ b/prisma/migrations/20231219030550_transaksi_sukses/migration.sql @@ -0,0 +1,257 @@ +-- CreateTable +CREATE TABLE "Katalog" ( + "id" TEXT NOT NULL, + "namaBisnis" TEXT NOT NULL, + "alamatKantor" TEXT NOT NULL, + "tlpn" TEXT NOT NULL, + "deskripsi" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "profileId" TEXT, + "masterBidangBisnisId" TEXT NOT NULL, + + CONSTRAINT "Katalog_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterBidangBisnis" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "MasterBidangBisnis_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "Investasi" ( + "id" TEXT NOT NULL, + "title" TEXT NOT NULL, + "targetDana" TEXT NOT NULL, + "hargaLembar" TEXT NOT NULL, + "totalLembar" TEXT NOT NULL, + "roi" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "countDown" TIMESTAMP(3), + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "authorId" TEXT, + "catatan" TEXT, + "sisaLembar" TEXT NOT NULL, + "lembarTerbeli" TEXT DEFAULT '0', + "progress" TEXT DEFAULT '0', + "masterPeriodeDevidenId" TEXT, + "masterPembagianDevidenId" TEXT, + "masterPencarianInvestorId" TEXT, + "imagesId" TEXT, + "masterStatusInvestasiId" TEXT DEFAULT '2', + "masterProgresInvestasiId" TEXT, + + CONSTRAINT "Investasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterPencarianInvestor" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "MasterPencarianInvestor_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterPeriodeDeviden" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "MasterPeriodeDeviden_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterPembagianDeviden" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "MasterPembagianDeviden_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterStatusInvestasi" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "color" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + + CONSTRAINT "MasterStatusInvestasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "ProspektusInvestasi" ( + "id" TEXT NOT NULL, + "url" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "investasiId" TEXT, + + CONSTRAINT "ProspektusInvestasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "DokumenInvestasi" ( + "id" TEXT NOT NULL, + "title" TEXT NOT NULL, + "url" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "investasiId" TEXT, + + CONSTRAINT "DokumenInvestasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "BeritaInvestasi" ( + "id" TEXT NOT NULL, + "title" TEXT NOT NULL, + "deskripsi" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "imagesId" TEXT, + "investasiId" TEXT NOT NULL, + + CONSTRAINT "BeritaInvestasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterBank" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "norek" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "MasterBank_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterProgresInvestasi" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "MasterProgresInvestasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "TransaksiInvestasi" ( + "id" TEXT NOT NULL, + "investasiId" TEXT NOT NULL, + "authorId" TEXT NOT NULL, + "namaBank" TEXT, + "nomorRekening" TEXT, + "token" TEXT, + "redirect_url" TEXT, + "quantity" TEXT NOT NULL, + "price" TEXT NOT NULL, + "gross_amount" TEXT NOT NULL, + "merchant_name" TEXT NOT NULL, + "status_code" TEXT, + "status_message" TEXT, + "transaction_id" TEXT, + "order_id" TEXT, + "payment_type" TEXT, + "transaction_time" TEXT, + "transaction_status" TEXT, + "fraud_status" TEXT, + "pdf_url" TEXT, + "finish_redirect_url" TEXT, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + "masterStatusTransaksiInvestasiId" TEXT DEFAULT '1', + + CONSTRAINT "TransaksiInvestasi_pkey" PRIMARY KEY ("id") +); + +-- CreateTable +CREATE TABLE "MasterStatusTransaksiInvestasi" ( + "id" TEXT NOT NULL, + "name" TEXT NOT NULL, + "color" TEXT, + "active" BOOLEAN NOT NULL DEFAULT true, + "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updatedAt" TIMESTAMP(3) NOT NULL, + + CONSTRAINT "MasterStatusTransaksiInvestasi_pkey" PRIMARY KEY ("id") +); + +-- CreateIndex +CREATE UNIQUE INDEX "Investasi_imagesId_key" ON "Investasi"("imagesId"); + +-- CreateIndex +CREATE UNIQUE INDEX "ProspektusInvestasi_investasiId_key" ON "ProspektusInvestasi"("investasiId"); + +-- AddForeignKey +ALTER TABLE "Katalog" ADD CONSTRAINT "Katalog_profileId_fkey" FOREIGN KEY ("profileId") REFERENCES "Profile"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Katalog" ADD CONSTRAINT "Katalog_masterBidangBisnisId_fkey" FOREIGN KEY ("masterBidangBisnisId") REFERENCES "MasterBidangBisnis"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterPeriodeDevidenId_fkey" FOREIGN KEY ("masterPeriodeDevidenId") REFERENCES "MasterPeriodeDeviden"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterPembagianDevidenId_fkey" FOREIGN KEY ("masterPembagianDevidenId") REFERENCES "MasterPembagianDeviden"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterPencarianInvestorId_fkey" FOREIGN KEY ("masterPencarianInvestorId") REFERENCES "MasterPencarianInvestor"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES "Images"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterStatusInvestasiId_fkey" FOREIGN KEY ("masterStatusInvestasiId") REFERENCES "MasterStatusInvestasi"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "Investasi" ADD CONSTRAINT "Investasi_masterProgresInvestasiId_fkey" FOREIGN KEY ("masterProgresInvestasiId") REFERENCES "MasterProgresInvestasi"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "ProspektusInvestasi" ADD CONSTRAINT "ProspektusInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "DokumenInvestasi" ADD CONSTRAINT "DokumenInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BeritaInvestasi" ADD CONSTRAINT "BeritaInvestasi_imagesId_fkey" FOREIGN KEY ("imagesId") REFERENCES "Images"("id") ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "BeritaInvestasi" ADD CONSTRAINT "BeritaInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TransaksiInvestasi" ADD CONSTRAINT "TransaksiInvestasi_investasiId_fkey" FOREIGN KEY ("investasiId") REFERENCES "Investasi"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TransaksiInvestasi" ADD CONSTRAINT "TransaksiInvestasi_authorId_fkey" FOREIGN KEY ("authorId") REFERENCES "User"("id") ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE "TransaksiInvestasi" ADD CONSTRAINT "TransaksiInvestasi_masterStatusTransaksiInvestasiId_fkey" FOREIGN KEY ("masterStatusTransaksiInvestasiId") REFERENCES "MasterStatusTransaksiInvestasi"("id") ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/prisma/migrations/migration_lock.toml b/prisma/migrations/migration_lock.toml new file mode 100644 index 00000000..fbffa92c --- /dev/null +++ b/prisma/migrations/migration_lock.toml @@ -0,0 +1,3 @@ +# Please do not edit this file manually +# It should be added in your version-control system (i.e. Git) +provider = "postgresql" \ No newline at end of file diff --git a/prisma/schema.prisma b/prisma/schema.prisma index 7aed529a..8890f763 100644 --- a/prisma/schema.prisma +++ b/prisma/schema.prisma @@ -9,5 +9,347 @@ datasource db { provider = "postgresql" url = env("DATABASE_URL") } - +model User { + id String @id @default(cuid()) + username String @unique + nomor String @unique + active Boolean @default(true) + createdAt DateTime? @default(now()) + updatedAt DateTime? @updatedAt + MasterUserRole MasterUserRole @relation(fields: [masterUserRoleId], references: [id]) + masterUserRoleId String @default("1") + UserSession UserSession? + Profile Profile? + Investasi Investasi[] + TransaksiInvestasi TransaksiInvestasi[] + Donasi Donasi[] +} + +model MasterUserRole { + id String @id + name String + active Boolean @default(true) + createdAt DateTime? @default(now()) + updatedAt DateTime? @updatedAt + User User[] +} + +model UserSession { + id String @id @default(cuid()) + token String + expires DateTime + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + User User @relation(fields: [userId], references: [id]) + userId String @unique +} + +model Profile { + id String @id @default(cuid()) + name String + email String @unique + alamat String + jenisKelamin String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + User User? @relation(fields: [userId], references: [id]) + userId String? @unique + ImageProfile Images? @relation(fields: [imagesId], references: [id]) + imagesId String? @unique + Katalog Katalog[] +} + +model Images { + id String @id @default(cuid()) + url String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + Profile Profile? + Investasi Investasi? + BeritaInvestasi BeritaInvestasi[] + Donasi Donasi? + CeritaDonasi Donasi_Cerita[] + Donasi_TemporaryCreate Donasi_TemporaryCreate[] +} + +model Katalog { + id String @id @default(cuid()) + 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 +} + +model MasterBidangBisnis { + id String @id + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + Katalog Katalog[] +} + +// -------------------- INVESTASI --------------------- // +// Table investasi / saham +model Investasi { + id String @id @default(cuid()) + title String + targetDana String + hargaLembar String + totalLembar String + roi String + active Boolean @default(true) + + countDown DateTime? + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + author User? @relation(fields: [authorId], references: [id]) + authorId String? + catatan String? + sisaLembar String + lembarTerbeli String? @default("0") + progress String? @default("0") + + MasterPeriodeDeviden MasterPeriodeDeviden? @relation(fields: [masterPeriodeDevidenId], references: [id]) + masterPeriodeDevidenId String? + MasterPembagianDeviden MasterPembagianDeviden? @relation(fields: [masterPembagianDevidenId], references: [id]) + masterPembagianDevidenId String? + MasterPencarianInvestor MasterPencarianInvestor? @relation(fields: [masterPencarianInvestorId], references: [id]) + masterPencarianInvestorId String? + ImageInvestasi Images? @relation(fields: [imagesId], references: [id]) + imagesId String? @unique + + MasterStatusInvestasi MasterStatusInvestasi? @relation(fields: [masterStatusInvestasiId], references: [id]) + masterStatusInvestasiId String? @default("2") + ProspektusInvestasi ProspektusInvestasi? + BeritaInvestasi BeritaInvestasi[] + DokumenInvestasi DokumenInvestasi[] + TransaksiInvestasi TransaksiInvestasi[] + MasterProgresInvestasi MasterProgresInvestasi? @relation(fields: [masterProgresInvestasiId], references: [id]) + masterProgresInvestasiId String? +} + +model MasterPencarianInvestor { + id String @id @default(cuid()) + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + investasi Investasi[] +} + +model MasterPeriodeDeviden { + id String @id @default(cuid()) + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + investasi Investasi[] +} + +model MasterPembagianDeviden { + id String @id @default(cuid()) + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + investasi Investasi[] +} + +model MasterStatusInvestasi { + id String @id @default(cuid()) + name String + color String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + investasi Investasi[] +} + +model ProspektusInvestasi { + id String @id @default(cuid()) + url String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + investasi Investasi? @relation(fields: [investasiId], references: [id]) + investasiId String? @unique +} + +model DokumenInvestasi { + id String @id @default(cuid()) + title String + url String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @default(now()) @updatedAt + investasi Investasi? @relation(fields: [investasiId], references: [id]) + investasiId String? +} + +model BeritaInvestasi { + id String @id @default(cuid()) + title String + deskripsi String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + ImageBerita Images? @relation(fields: [imagesId], references: [id]) + imagesId String? + investasi Investasi @relation(fields: [investasiId], references: [id]) + investasiId String +} + +model MasterBank { + id String @id @default(cuid()) + name String + norek String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt +} + +model MasterProgresInvestasi { + id String @id @default(cuid()) + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + Investasi Investasi[] +} + +model TransaksiInvestasi { + id String @id @default(cuid()) + Investasi Investasi @relation(fields: [investasiId], references: [id]) + investasiId String + Author User @relation(fields: [authorId], references: [id]) + authorId String + + namaBank String? + nomorRekening String? + token String? + redirect_url String? + quantity String + price String + gross_amount String + merchant_name String + status_code String? + status_message String? + transaction_id String? + order_id String? + payment_type String? + transaction_time String? + transaction_status String? + fraud_status String? + pdf_url String? + finish_redirect_url String? + + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + MasterStatusTransaksiInvestasi MasterStatusTransaksiInvestasi? @relation(fields: [masterStatusTransaksiInvestasiId], references: [id]) + masterStatusTransaksiInvestasiId String? @default("1") +} + +model MasterStatusTransaksiInvestasi { + id String @id @default(cuid()) + name String + color String? + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + TransaksiInvestasi TransaksiInvestasi[] +} + +// -------------------- DONASI --------------------- // +model Donasi { + id String @id @default(cuid()) + title String + target String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + publishTime DateTime? + catatan String? + + Author User? @relation(fields: [authorId], references: [id]) + authorId String? + imageDonasi Images? @relation(fields: [imagesId], references: [id]) + imagesId String? @unique + CeritaDonasi Donasi_Cerita? + DonasiMaster_Ketegori DonasiMaster_Kategori? @relation(fields: [donasiMaster_KategoriId], references: [id]) + donasiMaster_KategoriId String? + DonasiMaster_Durasi DonasiMaster_Durasi? @relation(fields: [donasiMaster_DurasiId], references: [id]) + donasiMaster_DurasiId String? + DonasiMaster_Status DonasiMaster_StatusDonasi? @relation(fields: [donasiMaster_StatusDonasiId], references: [id]) + donasiMaster_StatusDonasiId String? @default("2") +} + +model Donasi_TemporaryCreate { + id String @id @default(cuid()) + title String + target String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + imageDonasiTemporary Images? @relation(fields: [imagesId], references: [id]) + imagesId String? @unique + kategori DonasiMaster_Kategori? @relation(fields: [donasiMaster_KategoriId], references: [id]) + donasiMaster_KategoriId String? + durasi DonasiMaster_Durasi? @relation(fields: [donasiMaster_DurasiId], references: [id]) + donasiMaster_DurasiId String? +} + +model DonasiMaster_Kategori { + id String @id @default(cuid()) + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + Donasi Donasi[] + Donasi_TemporaryCreate Donasi_TemporaryCreate[] +} + +model DonasiMaster_Durasi { + id String @id @default(cuid()) + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + Donasi Donasi[] + Donasi_TemporaryCreate Donasi_TemporaryCreate[] +} + +model Donasi_Cerita { + id String @id @default(cuid()) + pembukaan String + cerita String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + + imageCeritaDonasi Images? @relation(fields: [imagesId], references: [id]) + imagesId String? @unique + Donasi Donasi? @relation(fields: [donasiId], references: [id]) + donasiId String? @unique +} + +model DonasiMaster_StatusDonasi { + id String @id @default(cuid()) + name String + active Boolean @default(true) + createdAt DateTime @default(now()) + updatedAt DateTime @updatedAt + Donasi Donasi[] +} diff --git a/public/aset/avatar.png b/public/aset/avatar.png new file mode 100644 index 00000000..20e377a6 Binary files /dev/null and b/public/aset/avatar.png differ diff --git a/public/aset/donasi/bukti.jpg b/public/aset/donasi/bukti.jpg new file mode 100644 index 00000000..9bb96f9b Binary files /dev/null and b/public/aset/donasi/bukti.jpg differ diff --git a/public/aset/dummy_file.pdf b/public/aset/dummy_file.pdf new file mode 100644 index 00000000..92b2f709 Binary files /dev/null and b/public/aset/dummy_file.pdf differ diff --git a/public/aset/global/no_img.png b/public/aset/global/no_img.png new file mode 100644 index 00000000..00953883 Binary files /dev/null and b/public/aset/global/no_img.png differ diff --git a/public/aset/investasi/home-hipmi.png b/public/aset/investasi/home-hipmi.png new file mode 100644 index 00000000..ad584afc Binary files /dev/null and b/public/aset/investasi/home-hipmi.png differ diff --git a/public/aset/investasi/logo-crowd-panjang.png b/public/aset/investasi/logo-crowd-panjang.png new file mode 100644 index 00000000..1bcf8cea Binary files /dev/null and b/public/aset/investasi/logo-crowd-panjang.png differ diff --git a/public/aset/investasi/logo-crowd.png b/public/aset/investasi/logo-crowd.png new file mode 100644 index 00000000..74b04efd Binary files /dev/null and b/public/aset/investasi/logo-crowd.png differ diff --git a/public/img/logo.png b/public/aset/logo.png similarity index 100% rename from public/img/logo.png rename to public/aset/logo.png diff --git a/public/aset/logo/logo-hipmi round white.png b/public/aset/logo/logo-hipmi round white.png new file mode 100644 index 00000000..92746638 Binary files /dev/null and b/public/aset/logo/logo-hipmi round white.png differ diff --git a/public/aset/logo/logo-hipmi round.png b/public/aset/logo/logo-hipmi round.png new file mode 100644 index 00000000..59b439e8 Binary files /dev/null and b/public/aset/logo/logo-hipmi round.png differ diff --git a/public/aset/logo/logo-hipmi.png b/public/aset/logo/logo-hipmi.png new file mode 100644 index 00000000..1bebbd56 Binary files /dev/null and b/public/aset/logo/logo-hipmi.png differ diff --git a/public/aset/no-file.png b/public/aset/no-file.png new file mode 100644 index 00000000..da332135 Binary files /dev/null and b/public/aset/no-file.png differ diff --git a/public/aset/no-img.png b/public/aset/no-img.png new file mode 100644 index 00000000..65ec0740 Binary files /dev/null and b/public/aset/no-img.png differ diff --git a/public/aset/pdf-icon.png b/public/aset/pdf-icon.png new file mode 100644 index 00000000..7b86a45e Binary files /dev/null and b/public/aset/pdf-icon.png differ diff --git a/public/donasi/image/454e636f-9631-45cd-99ae-27efdb44be91.jpeg b/public/donasi/image/454e636f-9631-45cd-99ae-27efdb44be91.jpeg new file mode 100644 index 00000000..5652497a Binary files /dev/null and b/public/donasi/image/454e636f-9631-45cd-99ae-27efdb44be91.jpeg differ diff --git a/public/donasi/image/4e1a2302-5471-4a95-a79c-0fbe3c3f0677.jpeg b/public/donasi/image/4e1a2302-5471-4a95-a79c-0fbe3c3f0677.jpeg new file mode 100644 index 00000000..5652497a Binary files /dev/null and b/public/donasi/image/4e1a2302-5471-4a95-a79c-0fbe3c3f0677.jpeg differ diff --git a/public/donasi/image/7d8d0898-4c8a-470f-afde-755d6133425f.jpeg b/public/donasi/image/7d8d0898-4c8a-470f-afde-755d6133425f.jpeg new file mode 100644 index 00000000..d3ea1214 Binary files /dev/null and b/public/donasi/image/7d8d0898-4c8a-470f-afde-755d6133425f.jpeg differ diff --git a/public/donasi/image/84a72cf5-1b0e-47f8-bca9-763edef28c0b.jpeg b/public/donasi/image/84a72cf5-1b0e-47f8-bca9-763edef28c0b.jpeg new file mode 100644 index 00000000..6453d730 Binary files /dev/null and b/public/donasi/image/84a72cf5-1b0e-47f8-bca9-763edef28c0b.jpeg differ diff --git a/public/donasi/image/b9b270aa-f0db-42a6-822e-a35b6b28c883.jpeg b/public/donasi/image/b9b270aa-f0db-42a6-822e-a35b6b28c883.jpeg new file mode 100644 index 00000000..5652497a Binary files /dev/null and b/public/donasi/image/b9b270aa-f0db-42a6-822e-a35b6b28c883.jpeg differ diff --git a/public/donasi/image/bf8c9bae-e3c9-4d33-89ec-9a88c3740da8.jpeg b/public/donasi/image/bf8c9bae-e3c9-4d33-89ec-9a88c3740da8.jpeg new file mode 100644 index 00000000..289b1a56 Binary files /dev/null and b/public/donasi/image/bf8c9bae-e3c9-4d33-89ec-9a88c3740da8.jpeg differ diff --git a/public/donasi/image/c6b8d269-7e15-4711-81e0-35d1d2f757dc.jpeg b/public/donasi/image/c6b8d269-7e15-4711-81e0-35d1d2f757dc.jpeg new file mode 100644 index 00000000..289b1a56 Binary files /dev/null and b/public/donasi/image/c6b8d269-7e15-4711-81e0-35d1d2f757dc.jpeg differ diff --git a/public/donasi/image/c77f246e-d572-4acb-9b41-0b9e5d973e69.jpg b/public/donasi/image/c77f246e-d572-4acb-9b41-0b9e5d973e69.jpg new file mode 100644 index 00000000..b71d094e Binary files /dev/null and b/public/donasi/image/c77f246e-d572-4acb-9b41-0b9e5d973e69.jpg differ diff --git a/public/donasi/image/ddd5a80a-f5d9-4483-8fe0-5216c372a536.jpg b/public/donasi/image/ddd5a80a-f5d9-4483-8fe0-5216c372a536.jpg new file mode 100644 index 00000000..b71d094e Binary files /dev/null and b/public/donasi/image/ddd5a80a-f5d9-4483-8fe0-5216c372a536.jpg differ diff --git a/public/donasi/image_cerita/0d904f72-972b-4b04-959d-80ae0456f832.jpg b/public/donasi/image_cerita/0d904f72-972b-4b04-959d-80ae0456f832.jpg new file mode 100644 index 00000000..b71d094e Binary files /dev/null and b/public/donasi/image_cerita/0d904f72-972b-4b04-959d-80ae0456f832.jpg differ diff --git a/public/donasi/image_cerita/0e1cee5c-6dd7-4024-b2d8-16da46421f17.jpg b/public/donasi/image_cerita/0e1cee5c-6dd7-4024-b2d8-16da46421f17.jpg new file mode 100644 index 00000000..b71d094e Binary files /dev/null and b/public/donasi/image_cerita/0e1cee5c-6dd7-4024-b2d8-16da46421f17.jpg differ diff --git a/public/donasi/image_cerita/1f2f7595-15c3-4eb4-9cf7-256ce8871d77.jpeg b/public/donasi/image_cerita/1f2f7595-15c3-4eb4-9cf7-256ce8871d77.jpeg new file mode 100644 index 00000000..d3ea1214 Binary files /dev/null and b/public/donasi/image_cerita/1f2f7595-15c3-4eb4-9cf7-256ce8871d77.jpeg differ diff --git a/public/donasi/image_cerita/3f56e88a-141f-4370-bbe2-dbac623bcb67.jpeg b/public/donasi/image_cerita/3f56e88a-141f-4370-bbe2-dbac623bcb67.jpeg new file mode 100644 index 00000000..6302e96c Binary files /dev/null and b/public/donasi/image_cerita/3f56e88a-141f-4370-bbe2-dbac623bcb67.jpeg differ diff --git a/public/donasi/image_cerita/48ddfea8-1c95-431e-abd2-6a03c43e7cca.jpeg b/public/donasi/image_cerita/48ddfea8-1c95-431e-abd2-6a03c43e7cca.jpeg new file mode 100644 index 00000000..d3ea1214 Binary files /dev/null and b/public/donasi/image_cerita/48ddfea8-1c95-431e-abd2-6a03c43e7cca.jpeg differ diff --git a/public/donasi/image_cerita/627f9ce6-466f-413c-a6fc-4416feb260a6.jpeg b/public/donasi/image_cerita/627f9ce6-466f-413c-a6fc-4416feb260a6.jpeg new file mode 100644 index 00000000..5652497a Binary files /dev/null and b/public/donasi/image_cerita/627f9ce6-466f-413c-a6fc-4416feb260a6.jpeg differ diff --git a/public/donasi/image_cerita/e1b466b9-0d77-46f5-ad16-50b81f4e36cb.jpeg b/public/donasi/image_cerita/e1b466b9-0d77-46f5-ad16-50b81f4e36cb.jpeg new file mode 100644 index 00000000..4f712802 Binary files /dev/null and b/public/donasi/image_cerita/e1b466b9-0d77-46f5-ad16-50b81f4e36cb.jpeg differ diff --git a/public/donasi/image_cerita/ffdb4c10-df64-404c-8b0a-cea952324119.jpeg b/public/donasi/image_cerita/ffdb4c10-df64-404c-8b0a-cea952324119.jpeg new file mode 100644 index 00000000..4f712802 Binary files /dev/null and b/public/donasi/image_cerita/ffdb4c10-df64-404c-8b0a-cea952324119.jpeg differ diff --git a/public/file/06714b9b-5ed3-44df-b512-36110c5b91dd.pdf b/public/file/06714b9b-5ed3-44df-b512-36110c5b91dd.pdf new file mode 100644 index 00000000..92b2f709 Binary files /dev/null and b/public/file/06714b9b-5ed3-44df-b512-36110c5b91dd.pdf differ diff --git a/public/file/0bfd9239-0853-42d9-bb7f-681adbec25ae.pdf b/public/file/0bfd9239-0853-42d9-bb7f-681adbec25ae.pdf new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/file/0bfd9239-0853-42d9-bb7f-681adbec25ae.pdf differ diff --git a/public/file/3ece02cd-8472-42ee-9721-356041bcd655.pdf b/public/file/3ece02cd-8472-42ee-9721-356041bcd655.pdf new file mode 100644 index 00000000..326da9f2 Binary files /dev/null and b/public/file/3ece02cd-8472-42ee-9721-356041bcd655.pdf differ diff --git a/public/file/5ef5daeb-0ef7-47d4-847d-a201ff0bd818.pdf b/public/file/5ef5daeb-0ef7-47d4-847d-a201ff0bd818.pdf new file mode 100644 index 00000000..ab4bd256 Binary files /dev/null and b/public/file/5ef5daeb-0ef7-47d4-847d-a201ff0bd818.pdf differ diff --git a/public/file/6e9274d3-5c39-47ee-bf7c-114189618dff.pdf b/public/file/6e9274d3-5c39-47ee-bf7c-114189618dff.pdf new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/file/6e9274d3-5c39-47ee-bf7c-114189618dff.pdf differ diff --git a/public/file/c8904500-c9fd-40e4-a500-7ccb9fb48eb5.pdf b/public/file/c8904500-c9fd-40e4-a500-7ccb9fb48eb5.pdf new file mode 100644 index 00000000..92b2f709 Binary files /dev/null and b/public/file/c8904500-c9fd-40e4-a500-7ccb9fb48eb5.pdf differ diff --git a/public/file/e1366e3c-26c3-4939-8503-0ac3e2e68f03.pdf b/public/file/e1366e3c-26c3-4939-8503-0ac3e2e68f03.pdf new file mode 100644 index 00000000..92b2f709 Binary files /dev/null and b/public/file/e1366e3c-26c3-4939-8503-0ac3e2e68f03.pdf differ diff --git a/public/file/index.ts b/public/file/index.ts new file mode 100644 index 00000000..e50a6f8e --- /dev/null +++ b/public/file/index.ts @@ -0,0 +1 @@ +// Image for file \ No newline at end of file diff --git a/public/investasi/0815b390-ff1c-4139-a67f-ff4603b9e2ca.png b/public/investasi/0815b390-ff1c-4139-a67f-ff4603b9e2ca.png new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/investasi/0815b390-ff1c-4139-a67f-ff4603b9e2ca.png differ diff --git a/public/investasi/24c94a56-5563-4a2e-a401-b5f771d9ba12.png b/public/investasi/24c94a56-5563-4a2e-a401-b5f771d9ba12.png new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/investasi/24c94a56-5563-4a2e-a401-b5f771d9ba12.png differ diff --git a/public/investasi/2756d89c-0156-4252-920a-443d25ead85e.png b/public/investasi/2756d89c-0156-4252-920a-443d25ead85e.png new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/investasi/2756d89c-0156-4252-920a-443d25ead85e.png differ diff --git a/public/investasi/4297c21c-529d-4f71-bb52-b2fcb60a2bac.png b/public/investasi/4297c21c-529d-4f71-bb52-b2fcb60a2bac.png new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/investasi/4297c21c-529d-4f71-bb52-b2fcb60a2bac.png differ diff --git a/public/investasi/59b1d508-1b64-46f2-99c2-a43f268a2a86.jpeg b/public/investasi/59b1d508-1b64-46f2-99c2-a43f268a2a86.jpeg new file mode 100644 index 00000000..326da9f2 Binary files /dev/null and b/public/investasi/59b1d508-1b64-46f2-99c2-a43f268a2a86.jpeg differ diff --git a/public/investasi/83fd7d43-e40d-4a4c-bdff-bd7eeb75ac04.jpeg b/public/investasi/83fd7d43-e40d-4a4c-bdff-bd7eeb75ac04.jpeg new file mode 100644 index 00000000..803e3c56 Binary files /dev/null and b/public/investasi/83fd7d43-e40d-4a4c-bdff-bd7eeb75ac04.jpeg differ diff --git a/public/investasi/d5b525d2-f460-4b0e-af8a-02b9c21a972e.png b/public/investasi/d5b525d2-f460-4b0e-af8a-02b9c21a972e.png new file mode 100644 index 00000000..98983643 Binary files /dev/null and b/public/investasi/d5b525d2-f460-4b0e-af8a-02b9c21a972e.png differ diff --git a/public/investasi/ddf1e9c2-92f0-4885-b467-01cc35d1bf46.png b/public/investasi/ddf1e9c2-92f0-4885-b467-01cc35d1bf46.png new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/investasi/ddf1e9c2-92f0-4885-b467-01cc35d1bf46.png differ diff --git a/public/investasi/ed305bf4-65e1-441a-a8bb-2d815a6e49c1.png b/public/investasi/ed305bf4-65e1-441a-a8bb-2d815a6e49c1.png new file mode 100644 index 00000000..d0f301d6 Binary files /dev/null and b/public/investasi/ed305bf4-65e1-441a-a8bb-2d815a6e49c1.png differ diff --git a/public/investasi/f3e7698b-44de-4dc5-9238-65196abc4fe7.png b/public/investasi/f3e7698b-44de-4dc5-9238-65196abc4fe7.png new file mode 100644 index 00000000..24d01eeb Binary files /dev/null and b/public/investasi/f3e7698b-44de-4dc5-9238-65196abc4fe7.png differ diff --git a/public/investasi/index.ts b/public/investasi/index.ts new file mode 100644 index 00000000..21598c3d --- /dev/null +++ b/public/investasi/index.ts @@ -0,0 +1 @@ +// Image for investasi \ No newline at end of file diff --git a/src/app/api/auth/login/route.ts b/src/app/api/auth/login/route.ts new file mode 100644 index 00000000..f7442d2c --- /dev/null +++ b/src/app/api/auth/login/route.ts @@ -0,0 +1,36 @@ +import { redirect } from "next/navigation"; + +import { myConsole } from "@/app/fun/my_console"; +import prisma from "@/app/lib/prisma"; +import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin"; + +import { NextResponse } from "next/server"; + +export async function POST(req: Request) { + if (req.method === "POST") { + const body = await req.json(); + // console.log(body); + + if (body.nomor === "1234567890") { + return NextResponse.json({ + success: true, + status: 200, + message: "Login Success", + }); + } else { + try { + await fetch( + `https://wa.wibudev.com/code?nom=${body.nomor}&text=Masukan Kode OTP:${body.otp}` + ); + return NextResponse.json({ + body, + status: 200, + message: "Login Success", + }); + } catch (error) { + return NextResponse.json({ status: 500, message: "Server Error !!!" }); + } + } + } + return NextResponse.json({ success: false }); +} diff --git a/src/app/api/auth/logout/route.ts b/src/app/api/auth/logout/route.ts new file mode 100644 index 00000000..d4c9049e --- /dev/null +++ b/src/app/api/auth/logout/route.ts @@ -0,0 +1,12 @@ +import { cookies } from "next/headers"; +import { NextResponse } from "next/server"; + +export async function GET() { + cookies().set({ + name: "ssn", + value: "", + maxAge: 0, + }); + + return NextResponse.json({ status: 200, message: "Logout" }); +} diff --git a/src/app/api/auth/register/route.ts b/src/app/api/auth/register/route.ts new file mode 100644 index 00000000..21f71ac4 --- /dev/null +++ b/src/app/api/auth/register/route.ts @@ -0,0 +1,59 @@ +import { sealData } from "iron-session"; +import { myConsole } from "@/app/fun/my_console"; +import prisma from "@/app/lib/prisma"; +import { data } from "autoprefixer"; +import { NextResponse } from "next/server"; +import { cookies } from "next/headers"; +import { getConfig } from "@/bin/config"; + +import fs from "fs"; +import yaml from "yaml"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export async function POST(req: Request) { + if (req.method === "POST") { + const body = await req.json(); + // MyConsole(body); + + const cekUsername = await prisma.user.findUnique({ + where: { + username: body.username, + }, + }); + + myConsole(cekUsername); + + if (cekUsername) + return NextResponse.json({ status: 400, message: "Username sudah ada" }); + + const data = await prisma.user.create({ + data: { + username: body.username, + nomor: body.nomor, + }, + }); + + if (data) { + const seal = await sealData( + JSON.stringify({ + id: data.id, + username: data.username, + }), + { + password: await config.server.password, + } + ); + + cookies().set({ + name: "ssn", + value: seal, + maxAge: 60 * 60 * 24 * 7, + }); + + return NextResponse.json({ status: 201 }); + } + + return NextResponse.json({ success: true }); + } + return NextResponse.json({ success: false }); +} diff --git a/src/app/api/auth/validasi/route.ts b/src/app/api/auth/validasi/route.ts new file mode 100644 index 00000000..ba849d0e --- /dev/null +++ b/src/app/api/auth/validasi/route.ts @@ -0,0 +1,59 @@ +import { myConsole } from "@/app/fun/my_console"; +import prisma from "@/app/lib/prisma"; +import { NextResponse } from "next/server"; +import { cookies } from "next/headers"; +import { sealData, unsealData } from "iron-session"; +import { getConfig } from "@/bin/config"; +import yaml from "yaml"; +import fs from "fs"; +import { revalidatePath } from "next/cache"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export async function POST(req: Request) { + + if (req.method === "POST") { + const body = await req.json(); + + + const data = await prisma.user.findUnique({ + where: { + nomor: body.nomor, + }, + select: { + id: true, + nomor: true, + username: true, + active: true, + }, + }); + + myConsole(data) + + if (!data) return NextResponse.json({ status: 404 }); + + if (data) { + const res = await sealData( + JSON.stringify({ + id: data.id, + username: data.username, + }), + { + password: (await config.server.password), + } + ); + + cookies().set({ + name: "ssn", + value: res, + maxAge: 60 * 60 * 24 * 7, + }); + + revalidatePath("/dev/home") + + return NextResponse.json({ status: 200, data }); + } + + return NextResponse.json({ success: true }); + } + return NextResponse.json({ success: false }); +} diff --git a/src/app/api/donasi/gambar/[id]/route.ts b/src/app/api/donasi/gambar/[id]/route.ts new file mode 100644 index 00000000..1bf25d16 --- /dev/null +++ b/src/app/api/donasi/gambar/[id]/route.ts @@ -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/donasi/image/${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/donasi/image/${get?.url}`); + return new NextResponse(file, { + headers: { + "Content-Type": "image/png", + }, + }); +} diff --git a/src/app/api/donasi/gambar_cerita/[id]/route.ts b/src/app/api/donasi/gambar_cerita/[id]/route.ts new file mode 100644 index 00000000..26728087 --- /dev/null +++ b/src/app/api/donasi/gambar_cerita/[id]/route.ts @@ -0,0 +1,34 @@ +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/donasi/image_cerita/${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/donasi/image_cerita/${get?.url}`); + return new NextResponse(file, { + headers: { + "Content-Type": "image/png", + }, + }); +} diff --git a/src/app/api/donasi/image/[url]/route.ts b/src/app/api/donasi/image/[url]/route.ts new file mode 100644 index 00000000..b23bbf31 --- /dev/null +++ b/src/app/api/donasi/image/[url]/route.ts @@ -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/donasi/image/${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/donasi/image/${params.url}`); + return new NextResponse(file, { + headers: { + "Content-Type": "image/png", + }, + }); +} diff --git a/src/app/api/donasi/image_cerita/[url]/route.ts b/src/app/api/donasi/image_cerita/[url]/route.ts new file mode 100644 index 00000000..17635968 --- /dev/null +++ b/src/app/api/donasi/image_cerita/[url]/route.ts @@ -0,0 +1,25 @@ +import { NextRequest, NextResponse } from "next/server"; +import fs from "fs" + +export async function GET( + req: NextRequest, + { params }: { params: { url: string } } +) { + + if (!fs.existsSync(`./public/donasi/image_cerita/${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/donasi/image_cerita/${params.url}`); + return new NextResponse(file, { + headers: { + "Content-Type": "image/png", + }, + }); + +} diff --git a/src/app/api/donasi/index.md b/src/app/api/donasi/index.md new file mode 100644 index 00000000..21e60f83 --- /dev/null +++ b/src/app/api/donasi/index.md @@ -0,0 +1 @@ +# Test \ No newline at end of file diff --git a/src/app/api/investasi/dokumen/[id]/route.ts b/src/app/api/investasi/dokumen/[id]/route.ts new file mode 100644 index 00000000..e5d4c94c --- /dev/null +++ b/src/app/api/investasi/dokumen/[id]/route.ts @@ -0,0 +1,22 @@ +import prisma from "@/app/lib/prisma"; +import { NextRequest, NextResponse } from "next/server"; +import fs from "fs"; + +export async function GET( + req: NextRequest, + { params }: { params: { id: string } } +) { + const data = await prisma.dokumenInvestasi.findUnique({ + where: { id: params.id }, + select: { + url: true, + }, + }); + + const file = fs.readFileSync(`./public/file/${data?.url}`); + return new NextResponse(file, { + headers: { + "Content-Type": "application/pdf", + }, + }); +} diff --git a/src/app/api/investasi/gambar/[id]/route.ts b/src/app/api/investasi/gambar/[id]/route.ts new file mode 100644 index 00000000..8fce01cc --- /dev/null +++ b/src/app/api/investasi/gambar/[id]/route.ts @@ -0,0 +1,33 @@ +import { NextRequest, NextResponse } from "next/server"; +import fs from "fs"; +import prisma from "@/app/lib/prisma"; + +export async function GET( + req: NextRequest, + { params }: { params: { id: string } } +) { + + const data = await prisma.images.findUnique({ + where: { + id: params.id, + }, + select: { + url: true, + }, + }); + + if (!fs.existsSync(`./public/investasi/${data?.url}`)) { + const fl = fs.readFileSync(`./public/aset/no-img.png`); + return new NextResponse(fl, { + headers: { + "Content-Type": "image/png", + }, + }); + } + const fl = fs.readFileSync(`./public/investasi/${data?.url}`); + return new NextResponse(fl, { + headers: { + "Content-Type": "image/png", + }, + }); +} diff --git a/src/app/api/investasi/midtrans/[id]/route.ts b/src/app/api/investasi/midtrans/[id]/route.ts new file mode 100644 index 00000000..4c1b0cd8 --- /dev/null +++ b/src/app/api/investasi/midtrans/[id]/route.ts @@ -0,0 +1,9 @@ +import { NextRequest, NextResponse } from "next/server"; + +export async function POST(req: NextRequest, {params}: {params: {id: any}}) { + + const body = await req.json() + console.log(body) + + return NextResponse.json({ status: 200, message: "OK", data: body }); +} diff --git a/src/app/api/investasi/prospektus/[id]/route.ts b/src/app/api/investasi/prospektus/[id]/route.ts new file mode 100644 index 00000000..243b204a --- /dev/null +++ b/src/app/api/investasi/prospektus/[id]/route.ts @@ -0,0 +1,23 @@ +import prisma from "@/app/lib/prisma"; +import { NextRequest, NextResponse } from "next/server"; +import fs from "fs"; + +export async function GET( + req: NextRequest, + { params }: { params: { id: string } } +) { + // console.log(params.id) + const data = await prisma.prospektusInvestasi.findUnique({ + where: { id: params.id }, + select: { + url: true, + }, + }); + + const file = fs.readFileSync(`./public/file/${data?.url}`); + return new NextResponse(file, { + headers: { + "Content-Type": "application/pdf", + }, + }); +} diff --git a/src/app/api/profile/foto/[name]/route.ts b/src/app/api/profile/foto/[name]/route.ts new file mode 100644 index 00000000..c1d3a267 --- /dev/null +++ b/src/app/api/profile/foto/[name]/route.ts @@ -0,0 +1,22 @@ +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", + }, + }); +} diff --git a/src/app/api/seeder/route.ts b/src/app/api/seeder/route.ts new file mode 100644 index 00000000..fdaaac19 --- /dev/null +++ b/src/app/api/seeder/route.ts @@ -0,0 +1,236 @@ +import prisma from "@/app/lib/prisma"; +import { NextResponse } from "next/server"; +import userRole from "../../../bin/seeder/user_role.json"; +import bidangBisnis from "../../../bin/seeder/bidang_bisnis.json"; +import pencarianInvestor from "./../../../bin/seeder/investasi/pencarian_investor.json"; +import periodeDeviden from "./../../../bin/seeder/investasi/periode_deviden.json"; +import pembagianDeviden from "./../../../bin/seeder/investasi/pembagian_deviden.json"; +import statusInvestasi from "./../../../bin/seeder/investasi/status_investasi.json"; +import namaBank from "./../../../bin/seeder/investasi/nama_bank.json"; +import statusTransaksiInvestasi from "./../../../bin/seeder/investasi/status_transaksi_investasi.json"; +import jenisProgres from "../../../bin/seeder/investasi/master_progres.json"; +import userSeeder from "../../../bin/seeder/user_seeder.json"; +import donasi_status from "../../../bin/seeder/donasi/master_status.json"; +import donasi_kategori from "../../../bin/seeder/donasi/master_kategori.json"; +import donasi_durasi from "../../../bin/seeder/donasi/master_durasi.json"; + +export async function GET(req: Request) { + const dev = new URL(req.url).searchParams.get("dev"); + if (dev === "DEV-HIPMI") { + for (let i of userRole) { + const data = await prisma.masterUserRole.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of userSeeder) { + await prisma.user.upsert({ + where: { + nomor: i.nomor, + }, + create: { + nomor: i.nomor, + username: i.name, + masterUserRoleId: i.masterUserRoleId, + }, + update: { + nomor: i.nomor, + username: i.name, + masterUserRoleId: i.masterUserRoleId, + }, + }); + } + + for (let i of bidangBisnis) { + await prisma.masterBidangBisnis.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of pencarianInvestor) { + await prisma.masterPencarianInvestor.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of pembagianDeviden) { + await prisma.masterPembagianDeviden.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of periodeDeviden) { + await prisma.masterPeriodeDeviden.upsert({ + where: { + id: i.id.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + }, + create: { + id: i.id.toString(), + name: i.name, + }, + }); + } + + for (let i of statusInvestasi) { + await prisma.masterStatusInvestasi.upsert({ + where: { + id: i.id, + }, + create: { + id: i.id, + name: i.name, + color: i.color, + }, + update: { + id: i.id, + name: i.name, + color: i.color, + }, + }); + } + + for (let i of namaBank) { + await prisma.masterBank.upsert({ + where: { + id: i.id.toString(), + }, + create: { + id: i.id.toString(), + name: i.name, + norek: i.norek.toString(), + }, + update: { + id: i.id.toString(), + name: i.name, + norek: i.norek.toString(), + }, + }); + } + + for (let i of statusTransaksiInvestasi) { + await prisma.masterStatusTransaksiInvestasi.upsert({ + where: { + id: i.id, + }, + create: { + id: i.id, + name: i.name, + color: i.color, + }, + update: { + id: i.id, + name: i.name, + color: i.color, + }, + }); + } + + for (let i of jenisProgres) { + await prisma.masterProgresInvestasi.upsert({ + where: { + id: i.id, + }, + create: { + id: i.id, + name: i.name, + }, + update: { + name: i.name, + }, + }); + } + + for (let d of donasi_status) { + await prisma.donasiMaster_StatusDonasi.upsert({ + where: { + id: d.id, + }, + create: { + id: d.id, + name: d.name, + }, + update: { + name: d.name, + }, + }); + } + + for (let d of donasi_kategori) { + await prisma.donasiMaster_Kategori.upsert({ + where: { + id: d.id, + }, + create: { + id: d.id, + name: d.name, + }, + update: { + name: d.name, + }, + }); + } + + for (let d of donasi_durasi) { + await prisma.donasiMaster_Durasi.upsert({ + where: { + id: d.id, + }, + create: { + id: d.id, + name: d.name, + }, + update: { + name: d.name, + }, + }); + } + + return NextResponse.json({ success: true }); + } + + return NextResponse.json({ success: false }); +} diff --git a/src/app/dev/admin/award/main/page.tsx b/src/app/dev/admin/award/main/page.tsx new file mode 100644 index 00000000..94e470f0 --- /dev/null +++ b/src/app/dev/admin/award/main/page.tsx @@ -0,0 +1,9 @@ +import { Admin_Award } from "@/app_modules/admin/award"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/award/page.tsx b/src/app/dev/admin/award/page.tsx new file mode 100644 index 00000000..dfbbbb84 --- /dev/null +++ b/src/app/dev/admin/award/page.tsx @@ -0,0 +1,9 @@ +import Admin_Award from "@/app_modules/admin/award/main"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/donasi/detail/publish/page.tsx b/src/app/dev/admin/donasi/detail/publish/page.tsx new file mode 100644 index 00000000..aadb50b3 --- /dev/null +++ b/src/app/dev/admin/donasi/detail/publish/page.tsx @@ -0,0 +1,9 @@ +import { AdminDonasi_DetailPublish } from "@/app_modules/admin/donasi"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/donasi/detail/review/[id]/page.tsx b/src/app/dev/admin/donasi/detail/review/[id]/page.tsx new file mode 100644 index 00000000..8dbbc3ce --- /dev/null +++ b/src/app/dev/admin/donasi/detail/review/[id]/page.tsx @@ -0,0 +1,9 @@ +import { AdminDonasi_DetailReview } from "@/app_modules/admin/donasi"; +import { AdminDonasi_getById } from "@/app_modules/admin/donasi/fun/get/get_one_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + // console.log(params.id) + const dataReview = await AdminDonasi_getById(params.id) + // console.log(dataReview) + return +} \ No newline at end of file diff --git a/src/app/dev/admin/donasi/main/page.tsx b/src/app/dev/admin/donasi/main/page.tsx new file mode 100644 index 00000000..63f2c0ce --- /dev/null +++ b/src/app/dev/admin/donasi/main/page.tsx @@ -0,0 +1,20 @@ +import { AdminDonasi_Main } from "@/app_modules/admin/donasi"; +import AdminDonasi_funCountByStatus from "@/app_modules/admin/donasi/fun/count/fun_count_donasi_by_status"; + +export default async function Page() { + const countPublish = await AdminDonasi_funCountByStatus("1"); + const countReview = await AdminDonasi_funCountByStatus("2"); + const countDraft = await AdminDonasi_funCountByStatus("3"); + const countReject = await AdminDonasi_funCountByStatus("4"); + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/donasi/table/publish/page.tsx b/src/app/dev/admin/donasi/table/publish/page.tsx new file mode 100644 index 00000000..c1d70e82 --- /dev/null +++ b/src/app/dev/admin/donasi/table/publish/page.tsx @@ -0,0 +1,10 @@ +import { AdminDonasi_TablePublish } from "@/app_modules/admin/donasi"; +import { AdminDonasi_getByStatus } from "@/app_modules/admin/donasi/fun/get/get_donasi_by_status"; + +export default async function Page() { + const listPublish = await AdminDonasi_getByStatus("1") + // console.log(listPublish) + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/admin/donasi/table/reject/page.tsx b/src/app/dev/admin/donasi/table/reject/page.tsx new file mode 100644 index 00000000..7a62da99 --- /dev/null +++ b/src/app/dev/admin/donasi/table/reject/page.tsx @@ -0,0 +1,10 @@ +import { AdminDonasi_TableReject } from "@/app_modules/admin/donasi"; +import { AdminDonasi_getByStatus } from "@/app_modules/admin/donasi/fun/get/get_donasi_by_status"; + +export default async function Page() { + const dataReject = await AdminDonasi_getByStatus("4") + // console.log(dataReject) + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/admin/donasi/table/review/page.tsx b/src/app/dev/admin/donasi/table/review/page.tsx new file mode 100644 index 00000000..8fa21952 --- /dev/null +++ b/src/app/dev/admin/donasi/table/review/page.tsx @@ -0,0 +1,9 @@ +import { AdminDonasi_TableReview } from "@/app_modules/admin/donasi"; +import { AdminDonasi_getByStatus } from "@/app_modules/admin/donasi/fun/get/get_donasi_by_status"; +import { getToken_UserId } from "@/app_modules/fun/get_user_token"; + +export default async function Page() { + const listReview = await AdminDonasi_getByStatus("2"); + // console.log(listReview); + return ; +} diff --git a/src/app/dev/admin/investasi/bukti_transfer/layout.tsx b/src/app/dev/admin/investasi/bukti_transfer/layout.tsx new file mode 100644 index 00000000..cac14c4b --- /dev/null +++ b/src/app/dev/admin/investasi/bukti_transfer/layout.tsx @@ -0,0 +1,16 @@ +import { Admin_LayoutBuktiTransferInvestasi } from "@/app_modules/admin/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/admin/investasi/bukti_transfer/page.tsx b/src/app/dev/admin/investasi/bukti_transfer/page.tsx new file mode 100644 index 00000000..90040a12 --- /dev/null +++ b/src/app/dev/admin/investasi/bukti_transfer/page.tsx @@ -0,0 +1,9 @@ +import { Admin_BuktiTransferInvestasi } from "@/app_modules/admin/investasi"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/investasi/halaman_aksi/[id]/layout.tsx b/src/app/dev/admin/investasi/halaman_aksi/[id]/layout.tsx new file mode 100644 index 00000000..c769c7ad --- /dev/null +++ b/src/app/dev/admin/investasi/halaman_aksi/[id]/layout.tsx @@ -0,0 +1,10 @@ + + +import { Admin_LayoutHalamanAksi } from "@/app_modules/admin/investasi"; +import React from "react"; + +export default async function Layout({ children }: { children: React.ReactNode }) { + return <> + {children} + ; +} diff --git a/src/app/dev/admin/investasi/halaman_aksi/[id]/page.tsx b/src/app/dev/admin/investasi/halaman_aksi/[id]/page.tsx new file mode 100644 index 00000000..4d899bd7 --- /dev/null +++ b/src/app/dev/admin/investasi/halaman_aksi/[id]/page.tsx @@ -0,0 +1,10 @@ +import { Admin_HalamanAksi } from "@/app_modules/admin/investasi"; + +export default async function Page({params}:{params: {id: string}}) { + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/investasi/konfirmasi/[id]/page.tsx b/src/app/dev/admin/investasi/konfirmasi/[id]/page.tsx new file mode 100644 index 00000000..57b53ff0 --- /dev/null +++ b/src/app/dev/admin/investasi/konfirmasi/[id]/page.tsx @@ -0,0 +1,16 @@ +import { Admin_KonfirmasiInvestasi } from "@/app_modules/admin/investasi"; +import { funGetUserProfile } from "@/app_modules/fun/get_user_profile"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + + +export default async function Page({ params }: { params: { id: string } }) { + const dataInvestasi = await getOneInvestasiById(params.id) + const dataUser = await funGetUserProfile(dataInvestasi?.authorId as any) + // console.log(dataUser) + + return ( + <> + + + ); +} diff --git a/src/app/dev/admin/investasi/main/page.tsx b/src/app/dev/admin/investasi/main/page.tsx new file mode 100644 index 00000000..fdeee026 --- /dev/null +++ b/src/app/dev/admin/investasi/main/page.tsx @@ -0,0 +1,32 @@ +import { Admin_Investasi } from "@/app_modules/admin/investasi"; +import Admin_CountStatusInvestasi from "@/app_modules/admin/investasi/fun/count_status"; +import Admin_funGetAllInvestasi from "@/app_modules/admin/investasi/fun/get_all_investasi"; +import Admin_getPublishProgresInvestasi from "@/app_modules/admin/investasi/fun/get_publish_progres"; +import Admin_getTotalInvestasiByUser from "@/app_modules/admin/investasi/fun/get_total_investasi_by_user"; + +export default async function Page() { + const listInvestasi = await Admin_funGetAllInvestasi(); + const countDraft = await Admin_CountStatusInvestasi(1); + const countReview = await Admin_CountStatusInvestasi(2); + const countPublish = await Admin_CountStatusInvestasi(3); + const countReject = await Admin_CountStatusInvestasi(4); + const totalInvestasiByUser = await Admin_getTotalInvestasiByUser() + const publishProgres = await Admin_getPublishProgresInvestasi() + // console.log(targetTerbesar) + + return ( + <> + + {/*
{JSON.stringify(totalInvestasiByUser, null,2)}
*/} + + ); +} diff --git a/src/app/dev/admin/investasi/status_transfer/layout.tsx b/src/app/dev/admin/investasi/status_transfer/layout.tsx new file mode 100644 index 00000000..549f12ff --- /dev/null +++ b/src/app/dev/admin/investasi/status_transfer/layout.tsx @@ -0,0 +1,16 @@ +import { Admin_LayoutStatusTransferInvesatasi } from "@/app_modules/admin/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/admin/investasi/status_transfer/page.tsx b/src/app/dev/admin/investasi/status_transfer/page.tsx new file mode 100644 index 00000000..8a5203a3 --- /dev/null +++ b/src/app/dev/admin/investasi/status_transfer/page.tsx @@ -0,0 +1,8 @@ +import { Admin_StatusTransferInvesatasi } from "@/app_modules/admin/investasi"; + +export default async function Page() { + return<> + + + +} \ No newline at end of file diff --git a/src/app/dev/admin/investasi/table_status/publish/page.tsx b/src/app/dev/admin/investasi/table_status/publish/page.tsx new file mode 100644 index 00000000..1d9f989c --- /dev/null +++ b/src/app/dev/admin/investasi/table_status/publish/page.tsx @@ -0,0 +1,10 @@ +import { Admin_TablePublishInvestasi } from "@/app_modules/admin/investasi"; +import Admin_funGetAllInvestasi from "@/app_modules/admin/investasi/fun/get_all_investasi"; + +export default async function Page() { + const listInvestasi = await Admin_funGetAllInvestasi(); + + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/admin/investasi/table_status/reject/page.tsx b/src/app/dev/admin/investasi/table_status/reject/page.tsx new file mode 100644 index 00000000..55092f60 --- /dev/null +++ b/src/app/dev/admin/investasi/table_status/reject/page.tsx @@ -0,0 +1,10 @@ +import { Admin_TableRejectInvestasi } from "@/app_modules/admin/investasi"; +import Admin_funGetAllInvestasi from "@/app_modules/admin/investasi/fun/get_all_investasi"; + +export default async function Page() { + const dataInvestsi = await Admin_funGetAllInvestasi() + return <> + + + +} \ No newline at end of file diff --git a/src/app/dev/admin/investasi/table_status/review/page.tsx b/src/app/dev/admin/investasi/table_status/review/page.tsx new file mode 100644 index 00000000..350245f7 --- /dev/null +++ b/src/app/dev/admin/investasi/table_status/review/page.tsx @@ -0,0 +1,9 @@ +import { Admin_TableReviewInvestasi } from "@/app_modules/admin/investasi"; +import Admin_funGetAllInvestasi from "@/app_modules/admin/investasi/fun/get_all_investasi"; + +export default async function Page() { + const dataInvestsi = await Admin_funGetAllInvestasi() + return <> + + +} \ No newline at end of file diff --git a/src/app/dev/admin/layout.tsx b/src/app/dev/admin/layout.tsx new file mode 100644 index 00000000..e7937178 --- /dev/null +++ b/src/app/dev/admin/layout.tsx @@ -0,0 +1,14 @@ +import { AdminLayout } from "@/app_modules/admin/main"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/admin/main/dashboard/page.tsx b/src/app/dev/admin/main/dashboard/page.tsx new file mode 100644 index 00000000..2151cea9 --- /dev/null +++ b/src/app/dev/admin/main/dashboard/page.tsx @@ -0,0 +1,5 @@ +import { AdminMain } from "@/app_modules/admin/main"; + +export default async function Page() { + return ; +} diff --git a/src/app/dev/auth/login/page.tsx b/src/app/dev/auth/login/page.tsx new file mode 100644 index 00000000..b36236db --- /dev/null +++ b/src/app/dev/auth/login/page.tsx @@ -0,0 +1,14 @@ +import { Login } from "@/app_modules/auth"; +import { cookies } from "next/headers"; + +export default function Page() { + const c = cookies().getAll(); + const tkn = c; + + return ( + <> + {/* {JSON.stringify(tkn)} */} + ; + + ); +} diff --git a/src/app/dev/auth/register/page.tsx b/src/app/dev/auth/register/page.tsx new file mode 100644 index 00000000..f35d8b13 --- /dev/null +++ b/src/app/dev/auth/register/page.tsx @@ -0,0 +1,5 @@ +import { Register } from "@/app_modules/auth"; + +export default function Page() { + return ; +} diff --git a/src/app/dev/auth/splash/page.tsx b/src/app/dev/auth/splash/page.tsx index 4f33da8f..183d35c3 100644 --- a/src/app/dev/auth/splash/page.tsx +++ b/src/app/dev/auth/splash/page.tsx @@ -1,7 +1,28 @@ import { SplashScreen } from "@/app_modules/auth"; +import { useShallowEffect } from "@mantine/hooks"; +import { cookies } from "next/headers"; +import { useRouter } from "next/navigation"; +import { useState } from "react"; +import { unsealData } from "iron-session"; +import { getConfig } from "@/bin/config"; +import yaml from "yaml"; +import fs from "fs"; -export default function Page(){ - return<> - +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function PageSplash() { + const c = cookies().get("ssn"); + const tkn = !c + ? null + : JSON.parse( + await unsealData(c.value as string, { + password: (await getConfig()).server.password, + }) + ); + + return ( + <> + -} \ No newline at end of file + ); +} diff --git a/src/app/dev/auth/validasi/layout.tsx b/src/app/dev/auth/validasi/layout.tsx new file mode 100644 index 00000000..86a4fa5e --- /dev/null +++ b/src/app/dev/auth/validasi/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutValidasi } from "@/app_modules/auth"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/auth/validasi/page.tsx b/src/app/dev/auth/validasi/page.tsx new file mode 100644 index 00000000..9f5a20d0 --- /dev/null +++ b/src/app/dev/auth/validasi/page.tsx @@ -0,0 +1,7 @@ +import { Validasi } from "@/app_modules/auth"; + + +export default function Page() { + + return ; +} diff --git a/src/app/dev/crowd/main/layout.tsx b/src/app/dev/crowd/main/layout.tsx new file mode 100644 index 00000000..7a50a1ba --- /dev/null +++ b/src/app/dev/crowd/main/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutMainCrowd } from "@/app_modules/crowd"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/crowd/main/page.tsx b/src/app/dev/crowd/main/page.tsx new file mode 100644 index 00000000..7a7c3586 --- /dev/null +++ b/src/app/dev/crowd/main/page.tsx @@ -0,0 +1,9 @@ +import { MainCrowd } from "@/app_modules/crowd"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/crowd/splash/page.tsx b/src/app/dev/crowd/splash/page.tsx new file mode 100644 index 00000000..2fc01434 --- /dev/null +++ b/src/app/dev/crowd/splash/page.tsx @@ -0,0 +1,7 @@ +import { SplashCrowd } from "@/app_modules/crowd"; + +export default async function Page() { + return <> + + +} \ No newline at end of file diff --git a/src/app/dev/donasi/cerita_penggalang/[id]/layout.tsx b/src/app/dev/donasi/cerita_penggalang/[id]/layout.tsx new file mode 100644 index 00000000..ef779963 --- /dev/null +++ b/src/app/dev/donasi/cerita_penggalang/[id]/layout.tsx @@ -0,0 +1,21 @@ +import { LayoutCeritaPenggalangDonasi } from "@/app_modules/donasi"; +import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id"; +import React from "react"; + +export default async function Layout({ + children, + params, +}: { + children: React.ReactNode; + params: { id: string }; +}) { + const dataDonasi = await Donasi_getOneById(params.id); + const statusDonasiId = dataDonasi?.donasiMaster_StatusDonasiId; + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/donasi/cerita_penggalang/[id]/page.tsx b/src/app/dev/donasi/cerita_penggalang/[id]/page.tsx new file mode 100644 index 00000000..b9518bed --- /dev/null +++ b/src/app/dev/donasi/cerita_penggalang/[id]/page.tsx @@ -0,0 +1,12 @@ +import { CeritaPenggalangDonasi } from "@/app_modules/donasi"; +import Donasi_getCeritaByDonasiId from "@/app_modules/donasi/fun/get/get_cerita_penggalang"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataCerita = await Donasi_getCeritaByDonasiId(params.id); + // console.log(dataCerita) + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/create/cerita_penggalang/[id]/page.tsx b/src/app/dev/donasi/create/cerita_penggalang/[id]/page.tsx new file mode 100644 index 00000000..17038f30 --- /dev/null +++ b/src/app/dev/donasi/create/cerita_penggalang/[id]/page.tsx @@ -0,0 +1,16 @@ +import { CreateCeritaPenggalangDonasi } from "@/app_modules/donasi"; +import { Donasi_getTemporaryCreate } from "@/app_modules/donasi/fun/get/get_temporary_create"; +import { getToken_UserId } from "@/app_modules/fun/get_user_token"; + + +export default async function Page({ params }: { params: { id: string } }) { + + const getTemporaryCreate = await Donasi_getTemporaryCreate(params.id); + const userId = await getToken_UserId() + + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/create/layout.tsx b/src/app/dev/donasi/create/layout.tsx new file mode 100644 index 00000000..966bf13c --- /dev/null +++ b/src/app/dev/donasi/create/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutCreateDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/create/page.tsx b/src/app/dev/donasi/create/page.tsx new file mode 100644 index 00000000..19d14d03 --- /dev/null +++ b/src/app/dev/donasi/create/page.tsx @@ -0,0 +1,15 @@ +import { CreateDonasi } from "@/app_modules/donasi"; +import { + Donasi_getMasterDurasi, + Donasi_getMasterKategori, +} from "@/app_modules/donasi/fun"; +import { getToken_UserId } from "@/app_modules/fun/get_user_token"; + +export default async function Page() { + const masterKategori = await Donasi_getMasterKategori(); + const masterDurasi = await Donasi_getMasterDurasi(); + + return ( + + ); +} diff --git a/src/app/dev/donasi/detail/detail_donasi_saya/layout.tsx b/src/app/dev/donasi/detail/detail_donasi_saya/layout.tsx new file mode 100644 index 00000000..b1c163ab --- /dev/null +++ b/src/app/dev/donasi/detail/detail_donasi_saya/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailDonasiSaya } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/detail/detail_donasi_saya/page.tsx b/src/app/dev/donasi/detail/detail_donasi_saya/page.tsx new file mode 100644 index 00000000..e3c3c3f1 --- /dev/null +++ b/src/app/dev/donasi/detail/detail_donasi_saya/page.tsx @@ -0,0 +1,7 @@ +import { DetailDonasiSaya } from "@/app_modules/donasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/donasi/detail/detail_draft/[id]/layout.tsx b/src/app/dev/donasi/detail/detail_draft/[id]/layout.tsx new file mode 100644 index 00000000..2877c7ed --- /dev/null +++ b/src/app/dev/donasi/detail/detail_draft/[id]/layout.tsx @@ -0,0 +1,16 @@ +import { LayoutDetailDraftDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, + params +}: { + children: React.ReactNode; + params: {id: string} +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/detail/detail_draft/[id]/page.tsx b/src/app/dev/donasi/detail/detail_draft/[id]/page.tsx new file mode 100644 index 00000000..4439b3ae --- /dev/null +++ b/src/app/dev/donasi/detail/detail_draft/[id]/page.tsx @@ -0,0 +1,12 @@ +import { DetailDraftDonasi } from "@/app_modules/donasi"; +import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataDonasi = await Donasi_getOneById(params.id); + + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/detail/detail_kabar/layout.tsx b/src/app/dev/donasi/detail/detail_kabar/layout.tsx new file mode 100644 index 00000000..7eef5bd4 --- /dev/null +++ b/src/app/dev/donasi/detail/detail_kabar/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailKabarDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/detail/detail_kabar/page.tsx b/src/app/dev/donasi/detail/detail_kabar/page.tsx new file mode 100644 index 00000000..08d151f1 --- /dev/null +++ b/src/app/dev/donasi/detail/detail_kabar/page.tsx @@ -0,0 +1,5 @@ +import { DetailKabarDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return +} \ No newline at end of file diff --git a/src/app/dev/donasi/detail/detail_main/layout.tsx b/src/app/dev/donasi/detail/detail_main/layout.tsx new file mode 100644 index 00000000..57dd7b23 --- /dev/null +++ b/src/app/dev/donasi/detail/detail_main/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailMainDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/detail/detail_main/page.tsx b/src/app/dev/donasi/detail/detail_main/page.tsx new file mode 100644 index 00000000..0d188a27 --- /dev/null +++ b/src/app/dev/donasi/detail/detail_main/page.tsx @@ -0,0 +1,9 @@ +import { DetailMainDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/detail/detail_publish/layout.tsx b/src/app/dev/donasi/detail/detail_publish/layout.tsx new file mode 100644 index 00000000..b23aed9e --- /dev/null +++ b/src/app/dev/donasi/detail/detail_publish/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailPublishDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/detail/detail_publish/page.tsx b/src/app/dev/donasi/detail/detail_publish/page.tsx new file mode 100644 index 00000000..e7ca2cdb --- /dev/null +++ b/src/app/dev/donasi/detail/detail_publish/page.tsx @@ -0,0 +1,7 @@ +import { DetailPublishDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/donasi/detail/detail_reject/layout.tsx b/src/app/dev/donasi/detail/detail_reject/layout.tsx new file mode 100644 index 00000000..9edc1d02 --- /dev/null +++ b/src/app/dev/donasi/detail/detail_reject/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDetailRejectDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/donasi/detail/detail_reject/page.tsx b/src/app/dev/donasi/detail/detail_reject/page.tsx new file mode 100644 index 00000000..a8b4d15c --- /dev/null +++ b/src/app/dev/donasi/detail/detail_reject/page.tsx @@ -0,0 +1,7 @@ +import { DetailRejectDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/donasi/detail/detail_review/[id]/layout.tsx b/src/app/dev/donasi/detail/detail_review/[id]/layout.tsx new file mode 100644 index 00000000..13071fc5 --- /dev/null +++ b/src/app/dev/donasi/detail/detail_review/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailReviewDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/detail/detail_review/[id]/page.tsx b/src/app/dev/donasi/detail/detail_review/[id]/page.tsx new file mode 100644 index 00000000..c7a4279b --- /dev/null +++ b/src/app/dev/donasi/detail/detail_review/[id]/page.tsx @@ -0,0 +1,12 @@ +import { DetailReviewDonasi } from "@/app_modules/donasi"; +import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataDonasi = await Donasi_getOneById(params.id); + + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/donatur/layout.tsx b/src/app/dev/donasi/donatur/layout.tsx new file mode 100644 index 00000000..86fcd7cb --- /dev/null +++ b/src/app/dev/donasi/donatur/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDonaturDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/donatur/page.tsx b/src/app/dev/donasi/donatur/page.tsx new file mode 100644 index 00000000..823c1be8 --- /dev/null +++ b/src/app/dev/donasi/donatur/page.tsx @@ -0,0 +1,8 @@ +import { DonaturDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return<> + + + +} \ No newline at end of file diff --git a/src/app/dev/donasi/edit/edit_cerita/[id]/layout.tsx b/src/app/dev/donasi/edit/edit_cerita/[id]/layout.tsx new file mode 100644 index 00000000..009acb93 --- /dev/null +++ b/src/app/dev/donasi/edit/edit_cerita/[id]/layout.tsx @@ -0,0 +1,16 @@ +import { LayoutEditCeritaPenggalangDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/donasi/edit/edit_cerita/[id]/page.tsx b/src/app/dev/donasi/edit/edit_cerita/[id]/page.tsx new file mode 100644 index 00000000..1467178d --- /dev/null +++ b/src/app/dev/donasi/edit/edit_cerita/[id]/page.tsx @@ -0,0 +1,12 @@ +import { EditCeritaPenggalangDonasi } from "@/app_modules/donasi"; +import Donasi_getCeritaByDonasiId from "@/app_modules/donasi/fun/get/get_cerita_penggalang"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataCerita = await Donasi_getCeritaByDonasiId(params.id) + // console.log(dataCerita); + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/edit/edit_donasi/[id]/layout.tsx b/src/app/dev/donasi/edit/edit_donasi/[id]/layout.tsx new file mode 100644 index 00000000..ed3f460d --- /dev/null +++ b/src/app/dev/donasi/edit/edit_donasi/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutEditDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/edit/edit_donasi/[id]/page.tsx b/src/app/dev/donasi/edit/edit_donasi/[id]/page.tsx new file mode 100644 index 00000000..cb62d88a --- /dev/null +++ b/src/app/dev/donasi/edit/edit_donasi/[id]/page.tsx @@ -0,0 +1,15 @@ +import { EditDonasi } from "@/app_modules/donasi"; +import { Donasi_getMasterDurasi, Donasi_getMasterKategori } from "@/app_modules/donasi/fun"; +import { Donasi_getOneById } from "@/app_modules/donasi/fun/get/get_one_donasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + const dataDonasi = await Donasi_getOneById(params.id) + const masterKategori = await Donasi_getMasterKategori() + const masterDurasi = await Donasi_getMasterDurasi() + + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/edit/update_kabar/layout.tsx b/src/app/dev/donasi/edit/update_kabar/layout.tsx new file mode 100644 index 00000000..7d7abf48 --- /dev/null +++ b/src/app/dev/donasi/edit/update_kabar/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutUpdateKabarDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/edit/update_kabar/page.tsx b/src/app/dev/donasi/edit/update_kabar/page.tsx new file mode 100644 index 00000000..65e24c8a --- /dev/null +++ b/src/app/dev/donasi/edit/update_kabar/page.tsx @@ -0,0 +1,7 @@ +import { UpdateKabarDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/donasi/kabar/layout.tsx b/src/app/dev/donasi/kabar/layout.tsx new file mode 100644 index 00000000..3b7e6330 --- /dev/null +++ b/src/app/dev/donasi/kabar/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutKabarDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/kabar/page.tsx b/src/app/dev/donasi/kabar/page.tsx new file mode 100644 index 00000000..ff47e41e --- /dev/null +++ b/src/app/dev/donasi/kabar/page.tsx @@ -0,0 +1,9 @@ +import { KabarDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/list_kabar/layout.tsx b/src/app/dev/donasi/list_kabar/layout.tsx new file mode 100644 index 00000000..01770051 --- /dev/null +++ b/src/app/dev/donasi/list_kabar/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutListKabarDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layput({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/list_kabar/page.tsx b/src/app/dev/donasi/list_kabar/page.tsx new file mode 100644 index 00000000..f7021644 --- /dev/null +++ b/src/app/dev/donasi/list_kabar/page.tsx @@ -0,0 +1,9 @@ +import { ListKabarDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/main/beranda/page.tsx b/src/app/dev/donasi/main/beranda/page.tsx new file mode 100644 index 00000000..bd1c5f72 --- /dev/null +++ b/src/app/dev/donasi/main/beranda/page.tsx @@ -0,0 +1,5 @@ +import { MainDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return +} \ No newline at end of file diff --git a/src/app/dev/donasi/main/donasi_saya/page.tsx b/src/app/dev/donasi/main/donasi_saya/page.tsx new file mode 100644 index 00000000..f915391f --- /dev/null +++ b/src/app/dev/donasi/main/donasi_saya/page.tsx @@ -0,0 +1,5 @@ +import { DonasiSayaDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return +} \ No newline at end of file diff --git a/src/app/dev/donasi/main/galang_dana/page.tsx b/src/app/dev/donasi/main/galang_dana/page.tsx new file mode 100644 index 00000000..bd6092ba --- /dev/null +++ b/src/app/dev/donasi/main/galang_dana/page.tsx @@ -0,0 +1,17 @@ +import { PostingDonasi } from "@/app_modules/donasi"; +import Donasi_getByStatus from "@/app_modules/donasi/fun/get/get_donasi_by_status"; +import { getToken_UserId } from "@/app_modules/fun/get_user_token"; + +export default async function Page() { + const authorId = await getToken_UserId(); + const listReview = await Donasi_getByStatus(authorId, "2"); + const listDraft = await Donasi_getByStatus(authorId, "3"); + +// console.log(listReview) + + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/main/layout.tsx b/src/app/dev/donasi/main/layout.tsx new file mode 100644 index 00000000..15206dfa --- /dev/null +++ b/src/app/dev/donasi/main/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return <> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/donasi/masukan_donasi/layout.tsx b/src/app/dev/donasi/masukan_donasi/layout.tsx new file mode 100644 index 00000000..749879e9 --- /dev/null +++ b/src/app/dev/donasi/masukan_donasi/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutMasukanDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/masukan_donasi/page.tsx b/src/app/dev/donasi/masukan_donasi/page.tsx new file mode 100644 index 00000000..72b4922f --- /dev/null +++ b/src/app/dev/donasi/masukan_donasi/page.tsx @@ -0,0 +1,5 @@ +import { MasukanDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return +} \ No newline at end of file diff --git a/src/app/dev/donasi/page_pop_up/create/page.tsx b/src/app/dev/donasi/page_pop_up/create/page.tsx new file mode 100644 index 00000000..740abe0e --- /dev/null +++ b/src/app/dev/donasi/page_pop_up/create/page.tsx @@ -0,0 +1,5 @@ +import { PagePopUpCreateDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return ; +} diff --git a/src/app/dev/donasi/pencairan_dana/layout.tsx b/src/app/dev/donasi/pencairan_dana/layout.tsx new file mode 100644 index 00000000..a28ed92d --- /dev/null +++ b/src/app/dev/donasi/pencairan_dana/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutPencairanDanaDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/pencairan_dana/page.tsx b/src/app/dev/donasi/pencairan_dana/page.tsx new file mode 100644 index 00000000..c45f962c --- /dev/null +++ b/src/app/dev/donasi/pencairan_dana/page.tsx @@ -0,0 +1,9 @@ +import { PencairanDanaDonasi } from "@/app_modules/donasi"; + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/donasi/penggalang_dana/layout.tsx b/src/app/dev/donasi/penggalang_dana/layout.tsx new file mode 100644 index 00000000..768206c4 --- /dev/null +++ b/src/app/dev/donasi/penggalang_dana/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutPenggalangDanaDonasi } from "@/app_modules/donasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/donasi/penggalang_dana/page.tsx b/src/app/dev/donasi/penggalang_dana/page.tsx new file mode 100644 index 00000000..faeb2166 --- /dev/null +++ b/src/app/dev/donasi/penggalang_dana/page.tsx @@ -0,0 +1,10 @@ +import { PenggalangDanaDonasi } from "@/app_modules/donasi"; + + +export default async function Page() { + return ( + <> + + + ); +} diff --git a/src/app/dev/home/layout.tsx b/src/app/dev/home/layout.tsx new file mode 100644 index 00000000..6d14346a --- /dev/null +++ b/src/app/dev/home/layout.tsx @@ -0,0 +1,9 @@ +import { HomeLayout } from "@/app_modules/home"; + +export default async function Layout({children}: {children: any}) { + return <> + {children} + + + +} \ No newline at end of file diff --git a/src/app/dev/home/page.tsx b/src/app/dev/home/page.tsx new file mode 100644 index 00000000..499c6b37 --- /dev/null +++ b/src/app/dev/home/page.tsx @@ -0,0 +1,31 @@ +import { HomeView } from "@/app_modules/home"; +import { cookies } from "next/headers"; +import { unsealData } from "iron-session"; +import _ from "lodash"; +import { redirect } from "next/navigation"; + +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"); + + 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 ( + <> + {/* {JSON.stringify(usr)} */} + + + ); +} diff --git a/src/app/dev/investasi/berita/[id]/layout.tsx b/src/app/dev/investasi/berita/[id]/layout.tsx new file mode 100644 index 00000000..d8d02c47 --- /dev/null +++ b/src/app/dev/investasi/berita/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/berita/[id]/page.tsx b/src/app/dev/investasi/berita/[id]/page.tsx new file mode 100644 index 00000000..b37fb6b6 --- /dev/null +++ b/src/app/dev/investasi/berita/[id]/page.tsx @@ -0,0 +1,13 @@ +import { BeritaInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + + const dataInvestasi = await getOneInvestasiById(params.id) + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/create/layout.tsx b/src/app/dev/investasi/create/layout.tsx new file mode 100644 index 00000000..e86d95c8 --- /dev/null +++ b/src/app/dev/investasi/create/layout.tsx @@ -0,0 +1,14 @@ +import { InvestasiCreateLayout } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/create/page.tsx b/src/app/dev/investasi/create/page.tsx new file mode 100644 index 00000000..35ed259c --- /dev/null +++ b/src/app/dev/investasi/create/page.tsx @@ -0,0 +1,38 @@ +import { InvestasiCreate } from "@/app_modules/investasi"; +import { unsealData } from "iron-session"; +import { cookies } from "next/headers"; +import yaml from "yaml"; +import fs from "fs"; +import { funCreateInvestasi } from "@/app_modules/investasi/fun/fun_create_investasi"; +import getPencarianInvestor from "@/app_modules/investasi/fun/master/get_pencarian_investor"; +import getPeriodeDeviden from "@/app_modules/investasi/fun/master/get_periode_deviden"; +import getPembagianDeviden from "@/app_modules/investasi/fun/master/get_pembagian_deviden"; +import getStatusInvestasi from "@/app_modules/investasi/fun/master/get_status_investasi"; + +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page() { + const c = cookies().get("ssn"); + const tkn = JSON.parse( + await unsealData(c?.value as string, { + password: config.server.password, + }) + ); + + const pencarianInvestor = await getPencarianInvestor(); + const periodeDeviden = await getPeriodeDeviden(); + const pembagianDeviden = await getPembagianDeviden(); + const statusInvestasi = await getStatusInvestasi(); + + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/create_berita/[id]/layout.tsx b/src/app/dev/investasi/create_berita/[id]/layout.tsx new file mode 100644 index 00000000..833d254b --- /dev/null +++ b/src/app/dev/investasi/create_berita/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutCreateBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/create_berita/[id]/page.tsx b/src/app/dev/investasi/create_berita/[id]/page.tsx new file mode 100644 index 00000000..0c6fcbee --- /dev/null +++ b/src/app/dev/investasi/create_berita/[id]/page.tsx @@ -0,0 +1,8 @@ +import { CreateBeritaInvestasi } from "@/app_modules/investasi"; + +export default async function Page({params}: {params: {id: string}}) { + return<> + + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail/[id]/layout.tsx b/src/app/dev/investasi/detail/[id]/layout.tsx new file mode 100644 index 00000000..bd4ccaa3 --- /dev/null +++ b/src/app/dev/investasi/detail/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/detail/[id]/page.tsx b/src/app/dev/investasi/detail/[id]/page.tsx new file mode 100644 index 00000000..f2f23011 --- /dev/null +++ b/src/app/dev/investasi/detail/[id]/page.tsx @@ -0,0 +1,44 @@ +import { funGetUserProfile } from "@/app_modules/fun/get_user_profile"; +import { DetailInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +import yaml from "yaml"; +import fs from "fs"; +import { cookies } from "next/headers"; +import { unsealData } from "iron-session"; +import funProgressBar from "@/app_modules/investasi/fun/fun_progress_bar"; +import funTotalInvestorByIdInvestasi from "@/app_modules/investasi/fun/fun_total_investor_by_id"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page({ params }: { params: { id: string } }) { + const c = cookies().get("ssn"); + const usr = JSON.parse( + await unsealData(c?.value as string, { + password: config.server.password, + }) + ); + + const loginUserId = usr.id; + const dataInvestasi = await getOneInvestasiById(params.id); + const dataUser = await funGetUserProfile(dataInvestasi?.authorId as any) + + let total = Number(dataInvestasi?.totalLembar) + let beli = Number(dataInvestasi?.lembarTerbeli) + const progress = await funProgressBar(total, beli) + + const totalInvestor = await funTotalInvestorByIdInvestasi(dataInvestasi?.id) + + // console.log(dataInvestasi?.MasterProgresInvestasi?.name) + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/detail_berita/[id]/layout.tsx b/src/app/dev/investasi/detail_berita/[id]/layout.tsx new file mode 100644 index 00000000..c75c0992 --- /dev/null +++ b/src/app/dev/investasi/detail_berita/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/detail_berita/[id]/page.tsx b/src/app/dev/investasi/detail_berita/[id]/page.tsx new file mode 100644 index 00000000..c8f77c5e --- /dev/null +++ b/src/app/dev/investasi/detail_berita/[id]/page.tsx @@ -0,0 +1,12 @@ +import { DetailBeritaInvestasi } from "@/app_modules/investasi"; +import getOneBeritaInvestasiById from "@/app_modules/investasi/fun/get_one_berita_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + // console.log(params.id) + const dataBerita = await getOneBeritaInvestasiById(params.id) + // console.log(dataBerita) + + return <> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_dokumen/[id]/layout.tsx b/src/app/dev/investasi/detail_dokumen/[id]/layout.tsx new file mode 100644 index 00000000..5f040396 --- /dev/null +++ b/src/app/dev/investasi/detail_dokumen/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutDetailDokumenInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/detail_dokumen/[id]/page.tsx b/src/app/dev/investasi/detail_dokumen/[id]/page.tsx new file mode 100644 index 00000000..6037f374 --- /dev/null +++ b/src/app/dev/investasi/detail_dokumen/[id]/page.tsx @@ -0,0 +1,10 @@ +import { DetailDokumenInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + const dataInvestasi = await getOneInvestasiById(params.id) + // console.log(params.id) + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_portofolio/draft/[id]/layout.tsx b/src/app/dev/investasi/detail_portofolio/draft/[id]/layout.tsx new file mode 100644 index 00000000..34780b41 --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/draft/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDetailDraftInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_portofolio/draft/[id]/page.tsx b/src/app/dev/investasi/detail_portofolio/draft/[id]/page.tsx new file mode 100644 index 00000000..bf07c1eb --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/draft/[id]/page.tsx @@ -0,0 +1,13 @@ +import { DetailDraftInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + + + const dataInvestasi = await getOneInvestasiById(params.id) + + return<> + + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_portofolio/publish/[id]/layout.tsx b/src/app/dev/investasi/detail_portofolio/publish/[id]/layout.tsx new file mode 100644 index 00000000..a52bced1 --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/publish/[id]/layout.tsx @@ -0,0 +1,9 @@ +import { LayoutDetailPublishInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_portofolio/publish/[id]/page.tsx b/src/app/dev/investasi/detail_portofolio/publish/[id]/page.tsx new file mode 100644 index 00000000..71c85689 --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/publish/[id]/page.tsx @@ -0,0 +1,10 @@ +import { DetailPublishInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + + const dataInvestasi = await getOneInvestasiById(params.id) + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_portofolio/reject/[id]/layout.tsx b/src/app/dev/investasi/detail_portofolio/reject/[id]/layout.tsx new file mode 100644 index 00000000..f0653738 --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/reject/[id]/layout.tsx @@ -0,0 +1,18 @@ +import { LayoutDetailRejectInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, + params, +}: { + children: React.ReactNode; + params: { id: string }; +}) { + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/investasi/detail_portofolio/reject/[id]/page.tsx b/src/app/dev/investasi/detail_portofolio/reject/[id]/page.tsx new file mode 100644 index 00000000..23368b5b --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/reject/[id]/page.tsx @@ -0,0 +1,10 @@ +import { DetailRejectInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + const dataInvestasi = await getOneInvestasiById(params.id) +// console.log(dataInvestasi) + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_portofolio/review/[id]/layout.tsx b/src/app/dev/investasi/detail_portofolio/review/[id]/layout.tsx new file mode 100644 index 00000000..30869978 --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/review/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDetailReviewInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_portofolio/review/[id]/page.tsx b/src/app/dev/investasi/detail_portofolio/review/[id]/page.tsx new file mode 100644 index 00000000..0b1bcf64 --- /dev/null +++ b/src/app/dev/investasi/detail_portofolio/review/[id]/page.tsx @@ -0,0 +1,12 @@ +import { DetailReviewInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}:{params : {id: string}}) { + + const dataInvestasi = await getOneInvestasiById(params.id) + // console.log(dataInvestasi) + + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_prospektus/[id]/layout.tsx b/src/app/dev/investasi/detail_prospektus/[id]/layout.tsx new file mode 100644 index 00000000..49640fcf --- /dev/null +++ b/src/app/dev/investasi/detail_prospektus/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDetailPropektus } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_prospektus/[id]/page.tsx b/src/app/dev/investasi/detail_prospektus/[id]/page.tsx new file mode 100644 index 00000000..492bdad5 --- /dev/null +++ b/src/app/dev/investasi/detail_prospektus/[id]/page.tsx @@ -0,0 +1,12 @@ +import { DetailPropektus } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataInvestasi = await getOneInvestasiById(params.id); + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/detail_saham_terbeli/[id]/layout.tsx b/src/app/dev/investasi/detail_saham_terbeli/[id]/layout.tsx new file mode 100644 index 00000000..fed30f04 --- /dev/null +++ b/src/app/dev/investasi/detail_saham_terbeli/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutDetailSahamTerbeli } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/detail_saham_terbeli/[id]/page.tsx b/src/app/dev/investasi/detail_saham_terbeli/[id]/page.tsx new file mode 100644 index 00000000..af7e1425 --- /dev/null +++ b/src/app/dev/investasi/detail_saham_terbeli/[id]/page.tsx @@ -0,0 +1,13 @@ +import { DetailSahamTerbeli } from "@/app_modules/investasi"; +import funTotalInvestorByIdInvestasi from "@/app_modules/investasi/fun/fun_total_investor_by_id"; +import getOneTransaksiBerhasilByIdInvestasi from "@/app_modules/investasi/fun/get_one_transaksi_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataTransaksi = await getOneTransaksiBerhasilByIdInvestasi(params.id); + const investor = await funTotalInvestorByIdInvestasi( + dataTransaksi?.Investasi.id as any + ); + // console.log(investor); + + return ; +} diff --git a/src/app/dev/investasi/dialog_page/create/layout.tsx b/src/app/dev/investasi/dialog_page/create/layout.tsx new file mode 100644 index 00000000..85568b94 --- /dev/null +++ b/src/app/dev/investasi/dialog_page/create/layout.tsx @@ -0,0 +1,16 @@ +import { LayoutDialogPageCreateInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/investasi/dialog_page/create/page.tsx b/src/app/dev/investasi/dialog_page/create/page.tsx new file mode 100644 index 00000000..df3fb522 --- /dev/null +++ b/src/app/dev/investasi/dialog_page/create/page.tsx @@ -0,0 +1,7 @@ +import { DialogPageCreateInvestasi } from "@/app_modules/investasi"; + +export default async function Page(){ + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/dialog_page/transaksi_saham/layout.tsx b/src/app/dev/investasi/dialog_page/transaksi_saham/layout.tsx new file mode 100644 index 00000000..9184d8ea --- /dev/null +++ b/src/app/dev/investasi/dialog_page/transaksi_saham/layout.tsx @@ -0,0 +1,8 @@ +import LayoutCountDownTransaksiInvestasi from "@/app_modules/investasi/dialog_page/transaksi_saham/layout"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/dialog_page/transaksi_saham/page.tsx b/src/app/dev/investasi/dialog_page/transaksi_saham/page.tsx new file mode 100644 index 00000000..9dec4842 --- /dev/null +++ b/src/app/dev/investasi/dialog_page/transaksi_saham/page.tsx @@ -0,0 +1,7 @@ +import { KonfirmasiBuktiInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return <> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/edit/[id]/layout.tsx b/src/app/dev/investasi/edit/[id]/layout.tsx new file mode 100644 index 00000000..5ab6c294 --- /dev/null +++ b/src/app/dev/investasi/edit/[id]/layout.tsx @@ -0,0 +1,9 @@ + +import { LayoutEditInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children, params}: {children: React.ReactNode, params:{id: string}}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/edit/[id]/page.tsx b/src/app/dev/investasi/edit/[id]/page.tsx new file mode 100644 index 00000000..e4aa7e1a --- /dev/null +++ b/src/app/dev/investasi/edit/[id]/page.tsx @@ -0,0 +1,11 @@ +import { EditInvestasi } from "@/app_modules/investasi"; + + +export default async function Page({params}: {params: {id: string}}) { + return ( + <> + + + + ); +} diff --git a/src/app/dev/investasi/edit_berita/[id]/layout.tsx b/src/app/dev/investasi/edit_berita/[id]/layout.tsx new file mode 100644 index 00000000..68855271 --- /dev/null +++ b/src/app/dev/investasi/edit_berita/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutEditBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: { children: React.ReactNode }) { + return<> + {children} + +} diff --git a/src/app/dev/investasi/edit_berita/[id]/page.tsx b/src/app/dev/investasi/edit_berita/[id]/page.tsx new file mode 100644 index 00000000..245f1308 --- /dev/null +++ b/src/app/dev/investasi/edit_berita/[id]/page.tsx @@ -0,0 +1,10 @@ +import { EditBeritaInvestasi } from "@/app_modules/investasi"; +import getOneBeritaInvestasiById from "@/app_modules/investasi/fun/get_one_berita_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + const dataBerita = await getOneBeritaInvestasiById(params.id) + // console.log(dataBerita) + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/edit_dokumen/[id]/layout.tsx b/src/app/dev/investasi/edit_dokumen/[id]/layout.tsx new file mode 100644 index 00000000..e051bfc5 --- /dev/null +++ b/src/app/dev/investasi/edit_dokumen/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutEditDokumenInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/edit_dokumen/[id]/page.tsx b/src/app/dev/investasi/edit_dokumen/[id]/page.tsx new file mode 100644 index 00000000..b7100cfe --- /dev/null +++ b/src/app/dev/investasi/edit_dokumen/[id]/page.tsx @@ -0,0 +1,10 @@ +import { EditDokumenInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + const dataInvestasi = await getOneInvestasiById(params.id) + // console.log(dataInvestasi) + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/edit_intro/[id]/layout.tsx b/src/app/dev/investasi/edit_intro/[id]/layout.tsx new file mode 100644 index 00000000..9ffdc3cd --- /dev/null +++ b/src/app/dev/investasi/edit_intro/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutEditIntroInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/edit_intro/[id]/page.tsx b/src/app/dev/investasi/edit_intro/[id]/page.tsx new file mode 100644 index 00000000..b726841c --- /dev/null +++ b/src/app/dev/investasi/edit_intro/[id]/page.tsx @@ -0,0 +1,23 @@ +import { EditIntroInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; +import getPembagianDeviden from "@/app_modules/investasi/fun/master/get_pembagian_deviden"; +import getPencarianInvestor from "@/app_modules/investasi/fun/master/get_pencarian_investor"; +import getPeriodeDeviden from "@/app_modules/investasi/fun/master/get_periode_deviden"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataInvestasi = await getOneInvestasiById(params.id); + const listPencarian = await getPencarianInvestor(); + const listPeriode = await getPeriodeDeviden(); + const listPembagian = await getPembagianDeviden(); + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/edit_prospektus/[id]/layout.tsx b/src/app/dev/investasi/edit_prospektus/[id]/layout.tsx new file mode 100644 index 00000000..0c6a45a1 --- /dev/null +++ b/src/app/dev/investasi/edit_prospektus/[id]/layout.tsx @@ -0,0 +1,21 @@ +import { LayoutEditProspektusInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; +import React from "react"; + +export default async function Layout({ + children, + params, +}: { + children: React.ReactNode; + params: { id: string }; +}) { + const dataInvestasi = await getOneInvestasiById(params.id); + + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/investasi/edit_prospektus/[id]/page.tsx b/src/app/dev/investasi/edit_prospektus/[id]/page.tsx new file mode 100644 index 00000000..521d1475 --- /dev/null +++ b/src/app/dev/investasi/edit_prospektus/[id]/page.tsx @@ -0,0 +1,12 @@ +import { EditProspektusInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataInvestasi = await getOneInvestasiById(params.id); +// console.log(dataInvestasi); + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/list_edit_berita/[id]/layout.tsx b/src/app/dev/investasi/list_edit_berita/[id]/layout.tsx new file mode 100644 index 00000000..f6361a2c --- /dev/null +++ b/src/app/dev/investasi/list_edit_berita/[id]/layout.tsx @@ -0,0 +1,16 @@ +import { LayoutListEditBeritaInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, + params +}: { + children: React.ReactNode; + params: { id: string }; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/list_edit_berita/[id]/page.tsx b/src/app/dev/investasi/list_edit_berita/[id]/page.tsx new file mode 100644 index 00000000..898fd9ad --- /dev/null +++ b/src/app/dev/investasi/list_edit_berita/[id]/page.tsx @@ -0,0 +1,15 @@ +import { ListEditBeritaInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + + const dataInvestasi = await getOneInvestasiById(params.id) + // console.log(dataInvestasi) + + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/main/layout.tsx b/src/app/dev/investasi/main/layout.tsx new file mode 100644 index 00000000..652b25c9 --- /dev/null +++ b/src/app/dev/investasi/main/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutMainInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return <> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/main/page.tsx b/src/app/dev/investasi/main/page.tsx new file mode 100644 index 00000000..be5f6f53 --- /dev/null +++ b/src/app/dev/investasi/main/page.tsx @@ -0,0 +1,45 @@ +import { MainInvestasi } from "@/app_modules/investasi"; +import funUpadteProgresPersenInvestasi from "@/app_modules/investasi/fun/fun_update_progres_persen"; +import funUpadteProgresWaktuInvestasi from "@/app_modules/investasi/fun/fun_update_progres_waktu"; +import getAllDataPublishInvestasi from "@/app_modules/investasi/fun/get_list_all_investasi"; +import { getListAllPublish } from "@/app_modules/investasi/fun/get_list_all_publish"; +import { MODEL_Investasi } from "@/app_modules/investasi/model/model_investasi"; + +import _ from "lodash"; + +export default async function Page() { + const dataOnProgres = await getListAllPublish("1"); + const dataSelesai = await getListAllPublish("2"); + const dataWaktuHabis = await getListAllPublish("3"); + const allData = await getAllDataPublishInvestasi(); + // console.log(allData) + + // const dataInves: MODEL_Investasi[] = []; + + // for (let i of allData as any) { + // await funUpadteProgresWaktuInvestasi(i).then( + // async () => + // await funUpadteProgresPersenInvestasi(i).then( + // async () => + // await getAllDataPublishInvestasi().then((val: any) => + // dataInves.push(val) + // ) + // ) + // ); + // } + + // const realData = dataInves.map((e) => e) + // console.log(allData) + + + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/main/portofolio/page.tsx b/src/app/dev/investasi/main/portofolio/page.tsx new file mode 100644 index 00000000..53d718e2 --- /dev/null +++ b/src/app/dev/investasi/main/portofolio/page.tsx @@ -0,0 +1,39 @@ +import { PortofolioInvestasi } from "@/app_modules/investasi"; +import { cookies } from "next/headers"; +import fs from "fs"; +import yaml from "yaml"; +import { unsealData } from "iron-session"; +import getInvestasiByStatusId from "@/app_modules/investasi/fun/get_investasi_by_id"; +import getStatusInvestasi from "@/app_modules/investasi/fun/master/get_status_investasi"; +import getPortoByStatusId from "@/app_modules/investasi/fun/get_porto_status_by_id"; + +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page() { + const c = cookies().get("ssn"); + const tkn = JSON.parse( + await unsealData(c?.value as string, { + password: config.server.password, + }) + ); + + const listStatusInvestasi = await getStatusInvestasi(); + const dataDraft = await getPortoByStatusId(tkn.id, 1) + const dataReview = await getPortoByStatusId(tkn.id, 2) + const dataPublish = await getPortoByStatusId(tkn.id, 3) + const dataReject = await getPortoByStatusId(tkn.id, 4) + + + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/main/saham_saya/page.tsx b/src/app/dev/investasi/main/saham_saya/page.tsx new file mode 100644 index 00000000..9601e2b8 --- /dev/null +++ b/src/app/dev/investasi/main/saham_saya/page.tsx @@ -0,0 +1,23 @@ +import { InvestasiSahamTerbeli } from "@/app_modules/investasi"; +import getListTransaksiBerhasilInvestasi from "@/app_modules/investasi/fun/get_list_transaksi_berhasil_by_id"; +import yaml from "yaml"; +import fs from "fs"; +import { cookies } from "next/headers"; +import { unsealData } from "iron-session"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page() { + const c = cookies().get("ssn"); + const user = JSON.parse( + await unsealData(c?.value as string, { + password: config.server.password, + }) + ); + const listTransaksi = await getListTransaksiBerhasilInvestasi(user.id) + // console.log(listTransaksi) + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/main/transaksi/page.tsx b/src/app/dev/investasi/main/transaksi/page.tsx new file mode 100644 index 00000000..525a1a51 --- /dev/null +++ b/src/app/dev/investasi/main/transaksi/page.tsx @@ -0,0 +1,33 @@ +import { TransaksiInvestasi } from "@/app_modules/investasi"; +import getListAllTransaksiById_Investasi from "@/app_modules/investasi/fun/get_list_all_transaksi_by_id"; +import getMaster_StatusTransaksiInvestasi from "@/app_modules/investasi/fun/master/get_status_transaksi"; + +import fs from "fs"; +import yaml from "yaml"; +import { unsealData } from "iron-session"; +import { cookies } from "next/headers"; +import funCountDown from "@/app_modules/investasi/fun/fun_countdown_investasi"; +import funCekSisaWaktuTransaksiInvestasi from "@/app_modules/investasi/fun/fun_cek_sisa_waktu"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page() { + const c = cookies().get("ssn"); + const tkn = JSON.parse( + await unsealData(c?.value as string, { + password: config.server.password, + }) + ); + const userId = tkn.id; + const statusTransaksi = await getMaster_StatusTransaksiInvestasi(); + const listTransaksi = await getListAllTransaksiById_Investasi(userId); + // console.log(listTransaksi) + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/metode_transfer/[id]/layout.tsx b/src/app/dev/investasi/metode_transfer/[id]/layout.tsx new file mode 100644 index 00000000..eb622d97 --- /dev/null +++ b/src/app/dev/investasi/metode_transfer/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutMetodeTransferInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/metode_transfer/[id]/page.tsx b/src/app/dev/investasi/metode_transfer/[id]/page.tsx new file mode 100644 index 00000000..b350f945 --- /dev/null +++ b/src/app/dev/investasi/metode_transfer/[id]/page.tsx @@ -0,0 +1,32 @@ +import { MetodeTransferInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; +import getMaster_NamaBank from "@/app_modules/investasi/fun/master/get_nama_bank"; + +import yaml from "yaml"; +import fs from "fs"; +import { cookies } from "next/headers"; +import { unsealData } from "iron-session"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page({ params }: { params: { id: string } }) { + const c = cookies().get("ssn"); + const usr = JSON.parse( + await unsealData(c?.value as string, { + password: config.server.password, + }) + ); + + const authorId = usr.id; + const dataInvestasi = await getOneInvestasiById(params.id); + const namaBank = await getMaster_NamaBank(); + // console.log(namaBank) + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/proses_investasi/[id]/layout.tsx b/src/app/dev/investasi/proses_investasi/[id]/layout.tsx new file mode 100644 index 00000000..2d8b6959 --- /dev/null +++ b/src/app/dev/investasi/proses_investasi/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutProsesInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/proses_investasi/[id]/page.tsx b/src/app/dev/investasi/proses_investasi/[id]/page.tsx new file mode 100644 index 00000000..c77a06a0 --- /dev/null +++ b/src/app/dev/investasi/proses_investasi/[id]/page.tsx @@ -0,0 +1,11 @@ +import { ProsesInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; + +export default async function Page({params}: {params: {id: string}}) { + + const dataInvestasi = await getOneInvestasiById(params.id) + + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/proses_transaksi/[id]/layout.tsx b/src/app/dev/investasi/proses_transaksi/[id]/layout.tsx new file mode 100644 index 00000000..733d73b5 --- /dev/null +++ b/src/app/dev/investasi/proses_transaksi/[id]/layout.tsx @@ -0,0 +1,12 @@ +import { LayoutProsesTransaksiInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + {children} + ); +} diff --git a/src/app/dev/investasi/proses_transaksi/[id]/page.tsx b/src/app/dev/investasi/proses_transaksi/[id]/page.tsx new file mode 100644 index 00000000..40f0b6c3 --- /dev/null +++ b/src/app/dev/investasi/proses_transaksi/[id]/page.tsx @@ -0,0 +1,30 @@ +import { ProsesTransaksiInvestasi } from "@/app_modules/investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; +import { unsealData } from "iron-session"; +import { cookies } from "next/headers"; +import { funGetUserProfile } from "@/app_modules/fun/get_user_profile"; +import yaml from "yaml"; +import fs from "fs"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page({ params }: { params: { id: string } }) { + const c = cookies().get("ssn"); + const user = JSON.parse( + await unsealData(c?.value as string, { + password: config.server.password, + }) + ); + + const userLogin = await funGetUserProfile(user.id); + const dataInvestasi = await getOneInvestasiById(params.id); + + // console.log(dataInvestasi); + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/status_pesanan/[id]/layout.tsx b/src/app/dev/investasi/status_pesanan/[id]/layout.tsx new file mode 100644 index 00000000..2b040878 --- /dev/null +++ b/src/app/dev/investasi/status_pesanan/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutStatusPesananInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return <> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/status_pesanan/[id]/page.tsx b/src/app/dev/investasi/status_pesanan/[id]/page.tsx new file mode 100644 index 00000000..f5f6c5c7 --- /dev/null +++ b/src/app/dev/investasi/status_pesanan/[id]/page.tsx @@ -0,0 +1,14 @@ +import { RouterInvestasi } from "@/app/lib/router_hipmi/router_investasi"; +import { StatusPesananInvetsatsi } from "@/app_modules/investasi"; +import getOneTransaksiByIdInvestasi from "@/app_modules/investasi/fun/get_one_transaksi_by_id"; +import getTransaksiByIdInvestasi from "@/app_modules/investasi/fun/get_transaksi_investasi"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataTransaksi = await getOneTransaksiByIdInvestasi(params.id); + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/status_transaksi/berhasil/layout.tsx b/src/app/dev/investasi/status_transaksi/berhasil/layout.tsx new file mode 100644 index 00000000..6b2fd6be --- /dev/null +++ b/src/app/dev/investasi/status_transaksi/berhasil/layout.tsx @@ -0,0 +1,9 @@ + +import { LayoutStatusTransaksiInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/status_transaksi/berhasil/page.tsx b/src/app/dev/investasi/status_transaksi/berhasil/page.tsx new file mode 100644 index 00000000..b751d50b --- /dev/null +++ b/src/app/dev/investasi/status_transaksi/berhasil/page.tsx @@ -0,0 +1,8 @@ +import { StatusTransaksiInvestasi } from "@/app_modules/investasi"; + + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/status_transaksi/gagal/[id]/layout.tsx b/src/app/dev/investasi/status_transaksi/gagal/[id]/layout.tsx new file mode 100644 index 00000000..d9a96998 --- /dev/null +++ b/src/app/dev/investasi/status_transaksi/gagal/[id]/layout.tsx @@ -0,0 +1,16 @@ +import { LayoutStatusTransaksiInvestasi_Gagal } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/investasi/status_transaksi/gagal/[id]/page.tsx b/src/app/dev/investasi/status_transaksi/gagal/[id]/page.tsx new file mode 100644 index 00000000..fb6362ad --- /dev/null +++ b/src/app/dev/investasi/status_transaksi/gagal/[id]/page.tsx @@ -0,0 +1,14 @@ +import { StatusTransaksiInvestasi_Gagal } from "@/app_modules/investasi"; +import getTransaksiByIdInvestasi from "@/app_modules/investasi/fun/get_transaksi_investasi"; + +export default async function Page({ params }: { params: { id: string } }) { + // console.log(params.id) + const dataTransaksi = await getTransaksiByIdInvestasi(params.id); +// console.log(dataTransaksi); + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/transfer/[id]/layout.tsx b/src/app/dev/investasi/transfer/[id]/layout.tsx new file mode 100644 index 00000000..a5a1a6b9 --- /dev/null +++ b/src/app/dev/investasi/transfer/[id]/layout.tsx @@ -0,0 +1,14 @@ +import { LayoutTransferInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({ + children, +}: { + children: React.ReactNode; +}) { + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/investasi/transfer/[id]/page.tsx b/src/app/dev/investasi/transfer/[id]/page.tsx new file mode 100644 index 00000000..7c89ddce --- /dev/null +++ b/src/app/dev/investasi/transfer/[id]/page.tsx @@ -0,0 +1,17 @@ +import { TransferInvestasi } from "@/app_modules/investasi"; +import funCountDown from "@/app_modules/investasi/fun/fun_countdown_investasi"; +import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id"; +import getTransaksiByIdInvestasi from "@/app_modules/investasi/fun/get_transaksi_investasi"; + +export default async function Page({ params }: { params: { id: string } }) { + const dataTransaksi = await getTransaksiByIdInvestasi(params.id); + // const cd = await funCountDown(params.id) + // console.log(dataTransaksi) + // const cd = await funCountDown("" + dataTransaksi?.id); + + return ( + <> + + + ); +} diff --git a/src/app/dev/investasi/upload/layout.tsx b/src/app/dev/investasi/upload/layout.tsx new file mode 100644 index 00000000..f0dc3953 --- /dev/null +++ b/src/app/dev/investasi/upload/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutUploadGambarInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/upload/page.tsx b/src/app/dev/investasi/upload/page.tsx new file mode 100644 index 00000000..96feb763 --- /dev/null +++ b/src/app/dev/investasi/upload/page.tsx @@ -0,0 +1,7 @@ +import { UploadGambarInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/dev/investasi/upload_bukti/layout.tsx b/src/app/dev/investasi/upload_bukti/layout.tsx new file mode 100644 index 00000000..2e61e6c1 --- /dev/null +++ b/src/app/dev/investasi/upload_bukti/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutBuktiTransferInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/upload_bukti/page.tsx b/src/app/dev/investasi/upload_bukti/page.tsx new file mode 100644 index 00000000..681868f8 --- /dev/null +++ b/src/app/dev/investasi/upload_bukti/page.tsx @@ -0,0 +1,5 @@ +import { UploadBuktiTransferInvestasi } from "@/app_modules/investasi"; + +export default async function Page() { + return ; +} diff --git a/src/app/dev/investasi/upload_dokumen/[id]/layout.tsx b/src/app/dev/investasi/upload_dokumen/[id]/layout.tsx new file mode 100644 index 00000000..1f1ff79e --- /dev/null +++ b/src/app/dev/investasi/upload_dokumen/[id]/layout.tsx @@ -0,0 +1,6 @@ +import { LayoutUploadDokumenInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return {children} +} \ No newline at end of file diff --git a/src/app/dev/investasi/upload_dokumen/[id]/page.tsx b/src/app/dev/investasi/upload_dokumen/[id]/page.tsx new file mode 100644 index 00000000..f96c9080 --- /dev/null +++ b/src/app/dev/investasi/upload_dokumen/[id]/page.tsx @@ -0,0 +1,5 @@ +import { UploadDokumenInvestasi } from "@/app_modules/investasi"; + +export default async function Page({ params }: { params: { id: string } }) { + return ; +} diff --git a/src/app/dev/investasi/upload_prospektus/[id]/layout.tsx b/src/app/dev/investasi/upload_prospektus/[id]/layout.tsx new file mode 100644 index 00000000..f8ce7fe2 --- /dev/null +++ b/src/app/dev/investasi/upload_prospektus/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { LayoutUploadProspektusInvestasi } from "@/app_modules/investasi"; +import React from "react"; + +export default async function Layout({children}: {children: React.ReactNode}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/investasi/upload_prospektus/[id]/page.tsx b/src/app/dev/investasi/upload_prospektus/[id]/page.tsx new file mode 100644 index 00000000..40d56782 --- /dev/null +++ b/src/app/dev/investasi/upload_prospektus/[id]/page.tsx @@ -0,0 +1,5 @@ +import { UploadProspektusInvestasi } from "@/app_modules/investasi"; + +export default async function Page({ params }: { params: { id: string } }) { + return ; +} diff --git a/src/app/dev/katalog/[id]/layout.tsx b/src/app/dev/katalog/[id]/layout.tsx new file mode 100644 index 00000000..62c2dc48 --- /dev/null +++ b/src/app/dev/katalog/[id]/layout.tsx @@ -0,0 +1,10 @@ +import { KatalogLayout } from "@/app_modules/katalog/main"; + +export default async function Layout({ children, params }: { children: any, params: {id: string} }) { + // const a = atob(params.id.toString()) + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/katalog/[id]/page.tsx b/src/app/dev/katalog/[id]/page.tsx new file mode 100644 index 00000000..6ed3a573 --- /dev/null +++ b/src/app/dev/katalog/[id]/page.tsx @@ -0,0 +1,34 @@ +import prisma from "@/app/lib/prisma"; +import { getProfile } from "@/app_modules/katalog/profile"; +import { KatalogView } from "@/app_modules/katalog/main"; +import { url } from "inspector"; +import { unsealData } from "iron-session"; +import _ from "lodash"; +import { cookies } from "next/headers"; +import { redirect } from "next/navigation"; +import { funGetUserProfile } from "@/app_modules/fun/get_user_profile"; +import yaml from "yaml"; +import fs from "fs"; +import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get_list_portofolio"; +const config = yaml.parse(fs.readFileSync("config.yaml").toString()); + +export default async function Page() { + const data = await getProfile(); + + const u = cookies().get("ssn"); + const usr = JSON.parse( + await unsealData(u?.value as string, { + password: config.server.password, + }) + ); + + const user = await funGetUserProfile(usr.id); + + const listPorto = await funGetListPortofolio(user?.Profile?.id) + + return ( + <> + + + ); +} diff --git a/src/app/dev/portofolio/create/[id]/layout.tsx b/src/app/dev/portofolio/create/[id]/layout.tsx new file mode 100644 index 00000000..be0a02bc --- /dev/null +++ b/src/app/dev/portofolio/create/[id]/layout.tsx @@ -0,0 +1,8 @@ +import { CreatePortofolio, CreatePortofolioLayout, PortofolioLayout } from "@/app_modules/katalog/portofolio"; +import React from "react"; + +export default async function Layout({children, params}: {children: React.ReactNode, params: {id: string}}) { + return<> + {children} + +} \ No newline at end of file diff --git a/src/app/dev/portofolio/create/[id]/page.tsx b/src/app/dev/portofolio/create/[id]/page.tsx new file mode 100644 index 00000000..2bdd09e8 --- /dev/null +++ b/src/app/dev/portofolio/create/[id]/page.tsx @@ -0,0 +1,16 @@ +import { myConsole } from "@/app/fun/my_console"; +import { CreatePortofolio } from "@/app_modules/katalog/portofolio"; +import { getBidangBisnis } from "@/app_modules/katalog/portofolio/fun/get_bidang_bisnis"; + +export default async function Page({ params }: { params: { id: string } }) { + const bidangBisnis = await getBidangBisnis(); + + return ( + <> + + + ); +} diff --git a/src/app/dev/portofolio/main/[id]/layout.tsx b/src/app/dev/portofolio/main/[id]/layout.tsx new file mode 100644 index 00000000..f46699c1 --- /dev/null +++ b/src/app/dev/portofolio/main/[id]/layout.tsx @@ -0,0 +1,13 @@ +import { PortofolioLayout } from "@/app_modules/katalog/portofolio"; +import { getOnePortofolio } from "@/app_modules/katalog/portofolio/fun/get_one_portofolio"; + +export default async function Layout({ children, params }: { children: any, params: {id: string} }) { + const getPorto = await getOnePortofolio(params.id) + + + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/portofolio/main/[id]/page.tsx b/src/app/dev/portofolio/main/[id]/page.tsx new file mode 100644 index 00000000..25e9a13e --- /dev/null +++ b/src/app/dev/portofolio/main/[id]/page.tsx @@ -0,0 +1,15 @@ +import { ViewPortofolio } from "@/app_modules/katalog/portofolio"; +import { getOnePortofolio } from "@/app_modules/katalog/portofolio/fun/get_one_portofolio"; + +export default async function Page({params}: {params: {id: string}}) { + + const getPorto = await getOnePortofolio(params.id) + // console.log(getPorto) + + return ( + <> + {/* {JSON.stringify(getPorto)} */} + + + ); +} diff --git a/src/app/dev/profile/create/[id]/layout.tsx b/src/app/dev/profile/create/[id]/layout.tsx new file mode 100644 index 00000000..a4737a19 --- /dev/null +++ b/src/app/dev/profile/create/[id]/layout.tsx @@ -0,0 +1,10 @@ +import { ProfileLayout } from "@/app_modules/katalog/profile"; + +export default function Layout({ children }: { children: any }) { + return ( + <> + {children} + + ); +} + diff --git a/src/app/dev/profile/create/[id]/page.tsx b/src/app/dev/profile/create/[id]/page.tsx new file mode 100644 index 00000000..fb1c2751 --- /dev/null +++ b/src/app/dev/profile/create/[id]/page.tsx @@ -0,0 +1,9 @@ +import { CreateProfile } from "@/app_modules/katalog/profile"; + +export default async function Page({params}: {params: {id: string}}) { + // console.log(params.id) + + return <> + + +} \ No newline at end of file diff --git a/src/app/dev/profile/edit/[id]/layout.tsx b/src/app/dev/profile/edit/[id]/layout.tsx new file mode 100644 index 00000000..34a5c84c --- /dev/null +++ b/src/app/dev/profile/edit/[id]/layout.tsx @@ -0,0 +1,12 @@ +import { funGetUserProfile } from "@/app_modules/fun/get_user_profile"; +import { EditProfileLayout } from "@/app_modules/katalog/profile"; + +export default async function Layout({ children, params }: { children: any, params: {id: string} }) { + const data = await funGetUserProfile(params.id) + const profileId = data?.Profile?.id + return ( + <> + {children} + + ); +} diff --git a/src/app/dev/profile/edit/[id]/page.tsx b/src/app/dev/profile/edit/[id]/page.tsx new file mode 100644 index 00000000..dca06bfe --- /dev/null +++ b/src/app/dev/profile/edit/[id]/page.tsx @@ -0,0 +1,14 @@ +import { funGetUserProfile } from "@/app_modules/fun/get_user_profile"; +import { getProfile } from "@/app_modules/katalog/profile"; +import EditProfile from "@/app_modules/katalog/profile/edit/view"; + +export default async function Page({ params }: { params: { id: string } }) { + const data = await funGetUserProfile(params.id); + + return ( + <> + {/* {JSON.stringify(data)} */} + + + ); +} diff --git a/src/app/dev/profile/upload/[id]/layout.tsx b/src/app/dev/profile/upload/[id]/layout.tsx new file mode 100644 index 00000000..a204721f --- /dev/null +++ b/src/app/dev/profile/upload/[id]/layout.tsx @@ -0,0 +1,13 @@ +import { UploadFotoProfileLayout } from "@/app_modules/katalog/profile"; +import { AppShell } from "@mantine/core"; + +export default function Layout({ children, params }: { children: any, params: {id: string} }) { + + return ( + <> + + {children} + + + ); +} diff --git a/src/app/dev/profile/upload/[id]/page.tsx b/src/app/dev/profile/upload/[id]/page.tsx new file mode 100644 index 00000000..9c98a056 --- /dev/null +++ b/src/app/dev/profile/upload/[id]/page.tsx @@ -0,0 +1,26 @@ +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 ( + <> + + + ); +} diff --git a/src/app/dev/splash/admin/page.tsx b/src/app/dev/splash/admin/page.tsx new file mode 100644 index 00000000..6597e069 --- /dev/null +++ b/src/app/dev/splash/admin/page.tsx @@ -0,0 +1,7 @@ +import { SplashDashboardAdmin } from "@/app_modules/admin/main"; + +export default async function Page() { + return<> + + +} \ No newline at end of file diff --git a/src/app/emotion.tsx b/src/app/emotion.tsx index 07deb7bf..cb3adb61 100644 --- a/src/app/emotion.tsx +++ b/src/app/emotion.tsx @@ -1,31 +1,42 @@ -'use client'; +"use client"; +import AppNotif from "@/app_modules/notif"; // import './globals.css' -import { CacheProvider } from '@emotion/react'; -import { MantineProvider, useEmotionCache } from '@mantine/core'; -import { useServerInsertedHTML } from 'next/navigation'; +import { CacheProvider } from "@emotion/react"; +import { MantineProvider, useEmotionCache } from "@mantine/core"; +import { Notifications } from "@mantine/notifications"; +import { useServerInsertedHTML } from "next/navigation"; +import { ToastContainer, toast } from "react-toastify"; +import "react-toastify/dist/ReactToastify.css"; -export default function RootStyleRegistry({ children }: { children: React.ReactNode }) { - const cache = useEmotionCache(); - cache.compat = true; +export default function RootStyleRegistry({ + children, +}: { + children: React.ReactNode; +}) { + const cache = useEmotionCache(); + cache.compat = true; - useServerInsertedHTML(() => ( -