Update Versi 1.5.27 #32
10
.env
10
.env
@@ -1,10 +0,0 @@
|
||||
# Environment variables declared in this file are automatically made available to Prisma.
|
||||
# See the documentation for more detail: https://pris.ly/d/prisma-schema#accessing-environment-variables-from-the-schema
|
||||
|
||||
# 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"
|
||||
PWD="QWERTYUIOPLKJHGFDSAZXCVBNMQAZWSXEDCRFVTGBYHNUJMIKOLPPOIUYTREWQLKJHGFDSAMNBVCXZlghvftyguhijknhbgvcfytguu8okjnhbgvfty7u8oilkjnhgvtygu7u8ojilnkhbgvhujnkhghvjhukjnhb"
|
||||
Client_KEY="SB-Mid-client-9NDTxltqdZrEB9m-"
|
||||
Server_KEY="SB-Mid-server-NyltU-U7fLVQd1nv1LWBKylr"
|
||||
5
.gitignore
vendored
5
.gitignore
vendored
@@ -28,9 +28,14 @@ yarn-error.log*
|
||||
# local env files
|
||||
.env*.local
|
||||
|
||||
# env here
|
||||
.env
|
||||
|
||||
# vercel
|
||||
.vercel
|
||||
|
||||
# typescript
|
||||
*.tsbuildinfo
|
||||
next-env.d.ts
|
||||
|
||||
certificates
|
||||
153
CHANGELOG.md
Normal file
153
CHANGELOG.md
Normal file
@@ -0,0 +1,153 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
||||
|
||||
## [1.2.18](https://github.com/bipproduction/hipmi/compare/v1.2.17...v1.2.18) (2024-12-04)
|
||||
|
||||
## [1.2.17](https://github.com/bipproduction/hipmi/compare/v1.2.16...v1.2.17) (2024-12-04)
|
||||
|
||||
## [1.2.16](https://github.com/bipproduction/hipmi/compare/v1.2.15...v1.2.16) (2024-12-03)
|
||||
|
||||
## [1.2.15](https://github.com/bipproduction/hipmi/compare/v1.2.14...v1.2.15) (2024-12-03)
|
||||
|
||||
## [1.2.14](https://github.com/bipproduction/hipmi/compare/v1.2.13...v1.2.14) (2024-12-03)
|
||||
|
||||
## [1.2.13](https://github.com/bipproduction/hipmi/compare/v1.2.12...v1.2.13) (2024-12-03)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* event ([fc38813](https://github.com/bipproduction/hipmi/commit/fc388133a638d4288314dd3faeddfcce61fe7292))
|
||||
* version 1.2.12 ([932735f](https://github.com/bipproduction/hipmi/commit/932735f9238db07b331b1b26328624247371c3d6))
|
||||
|
||||
## [1.2.12](https://github.com/bipproduction/hipmi/compare/v1.2.11...v1.2.12) (2024-12-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* version 1.2.11 ([7afcc9c](https://github.com/bipproduction/hipmi/commit/7afcc9ced02eafab1df669fd71fdbcd4556bb322))
|
||||
|
||||
## [1.2.11](https://github.com/bipproduction/hipmi/compare/v1.2.10...v1.2.11) (2024-12-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* version 1.2.10 ([08eed15](https://github.com/bipproduction/hipmi/commit/08eed15b798d549146b035ffd9a44cea5e55b283))
|
||||
|
||||
## [1.2.10](https://github.com/bipproduction/hipmi/compare/v1.2.9...v1.2.10) (2024-12-02)
|
||||
|
||||
## [1.2.9](https://github.com/bipproduction/hipmi/compare/v1.2.8...v1.2.9) (2024-12-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* version 1.2.8 ([378b2c1](https://github.com/bipproduction/hipmi/commit/378b2c19ff7a7fb07647c6a093d803d299c091f7))
|
||||
* version 1.2.8 ([23edb2d](https://github.com/bipproduction/hipmi/commit/23edb2d6317f2a8344ac3190f492f718c05b65c9))
|
||||
|
||||
## [1.2.8](https://github.com/bipproduction/hipmi/compare/v1.2.7...v1.2.8) (2024-12-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* version 1.2.7 ([1b83de0](https://github.com/bipproduction/hipmi/commit/1b83de0189b4581a8511cc58af2de0d5c613646b))
|
||||
|
||||
## [1.2.7](https://github.com/bipproduction/hipmi/compare/v1.2.6...v1.2.7) (2024-12-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* version 1.2.6 ([13142f2](https://github.com/bipproduction/hipmi/commit/13142f283d804fead233cf6bff6a41e4732a3ec0))
|
||||
|
||||
## [1.2.6](https://github.com/bipproduction/hipmi/compare/v1.2.5...v1.2.6) (2024-12-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Donasi ([517b2bb](https://github.com/bipproduction/hipmi/commit/517b2bb9b0e256d31d7a10332a6e7880c58ad48f))
|
||||
* Event ([45279cd](https://github.com/bipproduction/hipmi/commit/45279cd37fb4b2a293012c9cb1a8d6e977d0edb3))
|
||||
* middleware ([31124c5](https://github.com/bipproduction/hipmi/commit/31124c5500d10a4d831c45c0da1a46a1dee995db))
|
||||
|
||||
## [1.2.5](https://github.com/bipproduction/hipmi/compare/v1.2.4...v1.2.5) (2024-11-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Cookies ([038c40a](https://github.com/bipproduction/hipmi/commit/038c40a6fbc4062e1c3f1659ec0d1a4ab92205ae))
|
||||
* Donasi ([2335807](https://github.com/bipproduction/hipmi/commit/2335807b427ee24e7a28ae78a3ca9dae981a79e2))
|
||||
|
||||
## [1.2.4](https://github.com/bipproduction/hipmi/compare/v1.2.3...v1.2.4) (2024-11-25)
|
||||
|
||||
## [1.2.3](https://github.com/bipproduction/hipmi/compare/v1.2.2...v1.2.3) (2024-11-25)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Middlerawe/7 ([13c855f](https://github.com/bipproduction/hipmi/commit/13c855f2f64212857cb6c143f135d2fe160d9ee9))
|
||||
|
||||
## [1.2.2](https://github.com/bipproduction/hipmi/compare/v1.2.1...v1.2.2) (2024-11-21)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* Middlerawe/6 ([b9e4b97](https://github.com/bipproduction/hipmi/commit/b9e4b97b31f1f86cd3ee64c1a51827d3d724b1e7))
|
||||
|
||||
## [1.2.1](https://github.com/bipproduction/hipmi/compare/v1.2.0...v1.2.1) (2024-11-21)
|
||||
|
||||
## 1.2.0 (2024-11-21)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **app / dev / login:** membuat page login ([91333b5](https://github.com/bipproduction/hipmi/commit/91333b5c00b87da35a0d965f0678ff971484825b))
|
||||
* **app / dev / page:** modified file ([90c32b3](https://github.com/bipproduction/hipmi/commit/90c32b345c1099c943a9b8f67b8aa257941484d9))
|
||||
* **app / dev / register:** membuat page register ([1e06aeb](https://github.com/bipproduction/hipmi/commit/1e06aeb6998f00d77fa74849de11be182a0be676))
|
||||
* **dashboard admin:** membuat dashboard admin ([46da772](https://github.com/bipproduction/hipmi/commit/46da772f3895bde770942c3d9044e6da0620ef1c))
|
||||
* **dashboard super admin:** membuat dashboard super admin ([c363736](https://github.com/bipproduction/hipmi/commit/c3637366f9ebf24507c470714952ad2e572a0b0d))
|
||||
* **image:** menambahkan gambar logo ([c74bb6e](https://github.com/bipproduction/hipmi/commit/c74bb6eceb401c55c3c297889fe43181406f3a22))
|
||||
* **landing page:** buat komponen landing page ([38cb10d](https://github.com/bipproduction/hipmi/commit/38cb10da4ac8d68f1abd0163a0671036c15e1743))
|
||||
* **login:** - Membuat login page - Membuat register page ([b6cc83c](https://github.com/bipproduction/hipmi/commit/b6cc83c004cacb2289c51491fce7ebc2b29e126f))
|
||||
* **src/app/page:** mengedit page ([ca66fde](https://github.com/bipproduction/hipmi/commit/ca66fde1dc6751f3749cb1d582f7bbd299241318))
|
||||
* tambah dependensi 'jose' versi 5.9.2 pada package.json ([6ee43ed](https://github.com/bipproduction/hipmi/commit/6ee43ed20faa273cbca0be948295e95d36bbd760))
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* admin ([604077c](https://github.com/bipproduction/hipmi/commit/604077cc8dda568951fa1cd1b8ddfe862e1d321d))
|
||||
* Admin ([74108c3](https://github.com/bipproduction/hipmi/commit/74108c30969bd2c607b51f302209de91430e7792))
|
||||
* admin donasi ([d624d61](https://github.com/bipproduction/hipmi/commit/d624d61a33069a9c578a1af780bc2229dd3bad96))
|
||||
* admin investasi ([9b4a6fd](https://github.com/bipproduction/hipmi/commit/9b4a6fdc1c49ea982bb5e166aa8b3f4f40b3a392))
|
||||
* admin job ([3aea046](https://github.com/bipproduction/hipmi/commit/3aea0460462e87c30b0e7a939a24aaf5d9ce6978))
|
||||
* admin map ([8cedf7d](https://github.com/bipproduction/hipmi/commit/8cedf7db61702dc67300fdd11570022d84b1d857))
|
||||
* Bug ([7e9dfce](https://github.com/bipproduction/hipmi/commit/7e9dfce293bda5a4577ea16a4867e340b9883b3f))
|
||||
* Cookies ([abaec2c](https://github.com/bipproduction/hipmi/commit/abaec2c1c3be2a54975246e89cfe7047c962f2a8))
|
||||
* dashboard admin ([ac432d1](https://github.com/bipproduction/hipmi/commit/ac432d1eb7b975d621889b0d2e13e366e806cf56))
|
||||
* Db Profile ([cf9355e](https://github.com/bipproduction/hipmi/commit/cf9355e91f623171e7708d37a9ce8590ff473a44))
|
||||
* Donasi ([a798f9a](https://github.com/bipproduction/hipmi/commit/a798f9a3bc9996811ca55e70ea407297e1f939d8))
|
||||
* Event ([1f8bfcb](https://github.com/bipproduction/hipmi/commit/1f8bfcbed924ec1b53cdcc42393884f554299c5b))
|
||||
* Event ([8f76067](https://github.com/bipproduction/hipmi/commit/8f760673804d114c3f04ce65a648fa0ff5962822))
|
||||
* Event ([81543d6](https://github.com/bipproduction/hipmi/commit/81543d678cb515b36f8393ee257b8a6a6c4a0834))
|
||||
* File view ([84b7b38](https://github.com/bipproduction/hipmi/commit/84b7b381f62d2f69d8b1e9d7c2411175e5d48e38))
|
||||
* Image donasi ([0371ca5](https://github.com/bipproduction/hipmi/commit/0371ca5e0137354bb0d7a89300aa112112cf194d))
|
||||
* Investasi ([5ff74b0](https://github.com/bipproduction/hipmi/commit/5ff74b00f55751cc951b959f2d9bccda403158dc))
|
||||
* Job ([1b58ba7](https://github.com/bipproduction/hipmi/commit/1b58ba7d905f490fdba9e1d90e722faf251b2ae3))
|
||||
* Job ([aa612d2](https://github.com/bipproduction/hipmi/commit/aa612d24bc7cb729db66841bd3a48379cf875f70))
|
||||
* Job ([30743b0](https://github.com/bipproduction/hipmi/commit/30743b02ae0c2d0a83310af05711ed255000c7ce))
|
||||
* Map ([56548b4](https://github.com/bipproduction/hipmi/commit/56548b425876a7fa9be49f2a290de6a1916609a1))
|
||||
* Middlerawe/1 ([cc690ee](https://github.com/bipproduction/hipmi/commit/cc690eec0686e4306a440a8b38fffacb2c2b78c6))
|
||||
* Middlerawe/2 ([ac749f3](https://github.com/bipproduction/hipmi/commit/ac749f3d9d348162a2b8e8c88091dce97f9cca27))
|
||||
* Middlerawe/3 ([10dee19](https://github.com/bipproduction/hipmi/commit/10dee19f98b011de19a21e9ef4a5282e37ffdf38))
|
||||
* Middlerawe/4 ([0a03b05](https://github.com/bipproduction/hipmi/commit/0a03b05d4e0d9c369844859cac8879ba5505efa7))
|
||||
* Middlerawe/5 ([6e5a9f7](https://github.com/bipproduction/hipmi/commit/6e5a9f785a06f6b31b6010f8b89dfd146112a44a))
|
||||
* Navbar admin ([6b8ace7](https://github.com/bipproduction/hipmi/commit/6b8ace772c54aa00eebf9228da0d1543ed593d2d))
|
||||
* Navbar admin ([5fcb09b](https://github.com/bipproduction/hipmi/commit/5fcb09b88906e74c2f2be76f5fd325daa48f5ae5))
|
||||
* Notifikasi ([82f5b23](https://github.com/bipproduction/hipmi/commit/82f5b237ae52dc087711452f4bd6baa7acce8a1f))
|
||||
* Profile ([b13110b](https://github.com/bipproduction/hipmi/commit/b13110be6f475df7d5b36909cdc8f92f80a62d57))
|
||||
* update version ([3d6ec14](https://github.com/bipproduction/hipmi/commit/3d6ec1410d0a54bad35dea2740101aaad589fdd7))
|
||||
* update version in package.json ([ca99de7](https://github.com/bipproduction/hipmi/commit/ca99de7dd5a48dca66f33b3d63b6c278e0367c9d))
|
||||
* Upload image ([360ba26](https://github.com/bipproduction/hipmi/commit/360ba267ec69404dd45bb7d6510fe6113d9087ab))
|
||||
* Upload image ([370e3ec](https://github.com/bipproduction/hipmi/commit/370e3ec4e4c6e1f342c966feb7a65b62a09d2945))
|
||||
* User search & Event ([ca5c304](https://github.com/bipproduction/hipmi/commit/ca5c30499a2630e5d8a8c87f569f2b50fa88ad6e))
|
||||
* validasi ([a6548f7](https://github.com/bipproduction/hipmi/commit/a6548f7b364e403d5265a0015003021b5c11f004))
|
||||
* Voting ([e65a8d3](https://github.com/bipproduction/hipmi/commit/e65a8d30a2a70593f3e4268518ae4c0c542a02dd))
|
||||
* voting status ([9bb68b2](https://github.com/bipproduction/hipmi/commit/9bb68b216fc444e390fccf7131af886bc6d12d60))
|
||||
* voting status ([e5e36a3](https://github.com/bipproduction/hipmi/commit/e5e36a38893f21037688cd3153a57dc29ce1347e))
|
||||
@@ -293,5 +293,7 @@ if (isDiscountAvailable(customer)) {
|
||||
14. halaman informasi galery
|
||||
15. api
|
||||
16. database
|
||||
|
||||
|
||||
version_controll:
|
||||
dev:v1.0.1
|
||||
|
||||
|
||||
210
gen_api.ts
210
gen_api.ts
@@ -1,210 +0,0 @@
|
||||
import app_config from "@/util/app_config";
|
||||
|
||||
export const gen_api = {
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/test-scroll/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/test-scroll/route.ts)
|
||||
*/
|
||||
testScroll : async ({isServer}: {isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/test-scroll/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/seeder/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/seeder/route.ts)
|
||||
*/
|
||||
seeder : async ({isServer}: {isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/seeder/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/url_foto/[url]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/url_foto/[url]/route.ts)
|
||||
*/
|
||||
profileUrl_fotoUrlByUrl : async ({url, isServer}: {url: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/profile/url_foto/${url}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/url_background/[url]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/url_background/[url]/route.ts)
|
||||
*/
|
||||
profileUrl_backgroundUrlByUrl : async ({url, isServer}: {url: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/profile/url_background/${url}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/foto/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/foto/[id]/route.ts)
|
||||
*/
|
||||
profileFotoIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/profile/foto/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/background/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/profile/background/[id]/route.ts)
|
||||
*/
|
||||
profileBackgroundIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/profile/background/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/portofolio/logo/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/portofolio/logo/[id]/route.ts)
|
||||
*/
|
||||
portofolioLogoIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/portofolio/logo/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/job/gambar/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/job/gambar/[id]/route.ts)
|
||||
*/
|
||||
jobGambarIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/job/gambar/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/prospektus/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/prospektus/[id]/route.ts)
|
||||
*/
|
||||
investasiProspektusIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/investasi/prospektus/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/midtrans/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/midtrans/[id]/route.ts)
|
||||
*/
|
||||
investasiMidtransIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/investasi/midtrans/${id}/`, { method: 'POST', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/gambar/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/gambar/[id]/route.ts)
|
||||
*/
|
||||
investasiGambarIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/investasi/gambar/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/dokumen/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/investasi/dokumen/[id]/route.ts)
|
||||
*/
|
||||
investasiDokumenIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/investasi/dokumen/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/image_cerita/[url]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/image_cerita/[url]/route.ts)
|
||||
*/
|
||||
donasiImage_ceritaUrlByUrl : async ({url, isServer}: {url: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/donasi/image_cerita/${url}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/image/[url]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/image/[url]/route.ts)
|
||||
*/
|
||||
donasiImageUrlByUrl : async ({url, isServer}: {url: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/donasi/image/${url}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_pencairan/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_pencairan/[id]/route.ts)
|
||||
*/
|
||||
donasiGambar_pencairanIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/donasi/gambar_pencairan/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_kabar/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_kabar/[id]/route.ts)
|
||||
*/
|
||||
donasiGambar_kabarIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/donasi/gambar_kabar/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_cerita/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_cerita/[id]/route.ts)
|
||||
*/
|
||||
donasiGambar_ceritaIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/donasi/gambar_cerita/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_bukti_transfer/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar_bukti_transfer/[id]/route.ts)
|
||||
*/
|
||||
donasiGambar_bukti_transferIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/donasi/gambar_bukti_transfer/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar/[id]/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/donasi/gambar/[id]/route.ts)
|
||||
*/
|
||||
donasiGambarIdById : async ({id, isServer}: {id: string, isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/donasi/gambar/${id}/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/validasi/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/validasi/route.ts)
|
||||
*/
|
||||
authValidasi : async ({isServer}: {isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/auth/validasi/`, { method: 'POST', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/register/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/register/route.ts)
|
||||
*/
|
||||
authRegister : async ({isServer}: {isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/auth/register/`, { method: 'POST', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/logout/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/logout/route.ts)
|
||||
*/
|
||||
authLogout : async ({isServer}: {isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/auth/logout/`, { method: 'GET', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
,
|
||||
/**
|
||||
* [/Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/login/route.ts](file:///Users/bagasbanuna/Documents/BIP/hipmi/src/app/api/auth/login/route.ts)
|
||||
*/
|
||||
authLogin : async ({isServer}: {isServer?: boolean}) => {
|
||||
|
||||
return fetch(`${isServer && app_config.host || ''}/api/auth/login/`, { method: 'POST', cache: 'no-cache' })
|
||||
.then(res => res.json());
|
||||
}
|
||||
};
|
||||
32
package.json
32
package.json
@@ -1,16 +1,23 @@
|
||||
{
|
||||
"name": "hipmi",
|
||||
"version": "0.1.0",
|
||||
"version": "1.2.18",
|
||||
"private": true,
|
||||
"prisma": {
|
||||
"seed": "npx tsx prisma/seed.ts --yes"
|
||||
},
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"start": "next start",
|
||||
"lint": "next lint"
|
||||
"dev": "bun --bun run next dev --experimental-https",
|
||||
"build": "NODE_OPTIONS='--max-old-space-size=2048' bun --bun run next build",
|
||||
"start": "bun --bun run next start",
|
||||
"lint": "bun --bun run next lint",
|
||||
"ver": "bunx commit-and-tag-version -- --prerelease"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bounceapp/iframe": "^0.3.0",
|
||||
"@cyntler/react-doc-viewer": "^1.16.6",
|
||||
"@emotion/react": "^11.11.1",
|
||||
"@emotion/server": "^11.11.0",
|
||||
"@hookstate/core": "^4.0.1",
|
||||
"@mantine/carousel": "^7.1.5",
|
||||
"@mantine/core": "^6.0.17",
|
||||
"@mantine/dates": "^6.0.17",
|
||||
@@ -21,6 +28,7 @@
|
||||
"@mantine/notifications": "^6.0.17",
|
||||
"@mantine/tiptap": "^7.5.3",
|
||||
"@prisma/client": "^5.0.0",
|
||||
"@react-pdf/renderer": "^3.4.4",
|
||||
"@tabler/icons-react": "^2.38.0",
|
||||
"@tiptap/extension-highlight": "^2.2.3",
|
||||
"@tiptap/extension-link": "^2.2.3",
|
||||
@@ -32,6 +40,7 @@
|
||||
"@tiptap/react": "^2.2.3",
|
||||
"@tiptap/starter-kit": "^2.2.3",
|
||||
"@types/lodash": "^4.17.4",
|
||||
"@types/mapbox-gl": "^3.4.0",
|
||||
"@types/node": "20.4.5",
|
||||
"@types/react": "18.2.17",
|
||||
"@types/react-dom": "18.2.7",
|
||||
@@ -39,32 +48,40 @@
|
||||
"autoprefixer": "10.4.14",
|
||||
"bufferutil": "^4.0.8",
|
||||
"dayjs": "^1.11.10",
|
||||
"dotenv": "^16.4.5",
|
||||
"echarts": "^5.4.3",
|
||||
"echarts-for-react": "^3.0.2",
|
||||
"embla-carousel-react": "^8.0.0-rc14",
|
||||
"eslint": "8.45.0",
|
||||
"eslint-config-next": "13.4.12",
|
||||
"iron-session": "^6.3.1",
|
||||
"jose": "^5.9.2",
|
||||
"jotai": "^2.4.3",
|
||||
"lodash": "^4.17.21",
|
||||
"mapbox-gl": "^3.5.2",
|
||||
"midtrans-client": "^1.3.1",
|
||||
"moment": "^2.29.4",
|
||||
"mqtt": "^5.5.0",
|
||||
"next": "^13.5.4-canary.8",
|
||||
"next-dev": "^1.1.9",
|
||||
"next-scroll-loader": "^1.0.9",
|
||||
"pdfjs-dist": "^4.6.82",
|
||||
"postcss": "8.4.27",
|
||||
"prisma": "^5.19.1",
|
||||
"react": "18.2.0",
|
||||
"react-countdown": "^2.3.5",
|
||||
"react-dom": "18.2.0",
|
||||
"react-easy-infinite-scroll-hook": "^2.1.4",
|
||||
"react-fast-marquee": "^1.6.4",
|
||||
"react-icons": "^5.0.1",
|
||||
"react-iframe": "^1.8.5",
|
||||
"react-infinite-scroll-component": "^6.1.0",
|
||||
"react-international-phone": "^4.2.6",
|
||||
"react-map-gl": "^7.1.7",
|
||||
"react-pdf": "^9.1.0",
|
||||
"react-qr-code": "^2.0.15",
|
||||
"react-quill": "^2.0.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",
|
||||
@@ -72,6 +89,9 @@
|
||||
"typescript": "5.1.6",
|
||||
"utf-8-validate": "^6.0.3",
|
||||
"uuid": "^9.0.1",
|
||||
"wibu": "bipproduction/wibu",
|
||||
"wibu-cli": "^1.0.91",
|
||||
"wibu-pkg": "^1.0.3",
|
||||
"yaml": "^2.3.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ model User {
|
||||
id String @id @default(cuid())
|
||||
username String @unique
|
||||
nomor String @unique
|
||||
active Boolean @default(true)
|
||||
active Boolean @default(false)
|
||||
createdAt DateTime? @default(now())
|
||||
updatedAt DateTime? @updatedAt
|
||||
MasterUserRole MasterUserRole @relation(fields: [masterUserRoleId], references: [id])
|
||||
@@ -45,6 +45,8 @@ model User {
|
||||
UserProjectCollaboration_Notifikasi ProjectCollaboration_Notifikasi[] @relation("UserNotifProjectToUser")
|
||||
Admin_Notifikasi Notifikasi[] @relation("AdminNotifikasi")
|
||||
User_Notifikasi Notifikasi[] @relation("UserNotifikasi")
|
||||
BusinessMaps BusinessMaps[]
|
||||
Investasi_Invoice Investasi_Invoice[]
|
||||
}
|
||||
|
||||
model MasterUserRole {
|
||||
@@ -58,14 +60,14 @@ model MasterUserRole {
|
||||
}
|
||||
|
||||
model UserSession {
|
||||
id String @id @default(cuid())
|
||||
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
|
||||
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 KodeOtp {
|
||||
@@ -78,21 +80,19 @@ model KodeOtp {
|
||||
}
|
||||
|
||||
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
|
||||
Portofolio Portofolio[]
|
||||
ImagesBackground ImagesBackground? @relation(fields: [imagesBackgroundId], references: [id])
|
||||
imagesBackgroundId String? @unique
|
||||
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
|
||||
Portofolio Portofolio[]
|
||||
imageId String?
|
||||
imageBackgroundId String?
|
||||
}
|
||||
|
||||
model Images {
|
||||
@@ -102,7 +102,6 @@ model Images {
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
Profile Profile?
|
||||
Investasi Investasi?
|
||||
BeritaInvestasi BeritaInvestasi[]
|
||||
Donasi Donasi?
|
||||
@@ -111,18 +110,7 @@ model Images {
|
||||
Donasi_Kabar Donasi_Kabar[]
|
||||
Donasi_PencairanDana Donasi_PencairanDana[]
|
||||
Donasi_Invoice Donasi_Invoice[]
|
||||
Portofolio Portofolio[]
|
||||
Job Job[]
|
||||
}
|
||||
|
||||
model ImagesBackground {
|
||||
id String @id @default(cuid())
|
||||
url String
|
||||
label String
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
Profile Profile?
|
||||
Investasi_Invoice Investasi_Invoice[]
|
||||
}
|
||||
|
||||
model Portofolio {
|
||||
@@ -139,9 +127,9 @@ model Portofolio {
|
||||
profileId String?
|
||||
MasterBidangBisnis MasterBidangBisnis @relation(fields: [masterBidangBisnisId], references: [id])
|
||||
masterBidangBisnisId String
|
||||
Logo Images? @relation(fields: [logoId], references: [id])
|
||||
logoId String?
|
||||
Portofolio_MediaSosial Portofolio_MediaSosial?
|
||||
BusinessMaps BusinessMaps?
|
||||
logoId String?
|
||||
}
|
||||
|
||||
model Portofolio_MediaSosial {
|
||||
@@ -167,6 +155,19 @@ model MasterBidangBisnis {
|
||||
Portofolio Portofolio[]
|
||||
}
|
||||
|
||||
// ------------------- MASTER -------------------------- //
|
||||
|
||||
model MasterBank {
|
||||
id String @id @default(cuid())
|
||||
namaBank String
|
||||
namaAkun String
|
||||
norek String
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
Investasi_Invoice Investasi_Invoice[]
|
||||
}
|
||||
|
||||
model MasterStatus {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
@@ -214,6 +215,10 @@ model Investasi {
|
||||
TransaksiInvestasi TransaksiInvestasi[]
|
||||
MasterProgresInvestasi MasterProgresInvestasi? @relation(fields: [masterProgresInvestasiId], references: [id])
|
||||
masterProgresInvestasiId String?
|
||||
Investasi_Invoice Investasi_Invoice[]
|
||||
|
||||
imageId String?
|
||||
prospektusFileId String?
|
||||
}
|
||||
|
||||
model MasterPencarianInvestor {
|
||||
@@ -261,17 +266,22 @@ model ProspektusInvestasi {
|
||||
updatedAt DateTime @default(now()) @updatedAt
|
||||
investasi Investasi? @relation(fields: [investasiId], references: [id])
|
||||
investasiId String? @unique
|
||||
|
||||
fileId String?
|
||||
title String?
|
||||
}
|
||||
|
||||
model DokumenInvestasi {
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
url 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?
|
||||
|
||||
fileId String?
|
||||
}
|
||||
|
||||
model BeritaInvestasi {
|
||||
@@ -285,15 +295,8 @@ model BeritaInvestasi {
|
||||
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
|
||||
imageId String?
|
||||
}
|
||||
|
||||
model MasterProgresInvestasi {
|
||||
@@ -348,6 +351,42 @@ model MasterStatusTransaksiInvestasi {
|
||||
TransaksiInvestasi TransaksiInvestasi[]
|
||||
}
|
||||
|
||||
model Investasi_Invoice {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
nominal String
|
||||
lembarTerbeli String
|
||||
|
||||
Investasi Investasi? @relation(fields: [investasiId], references: [id])
|
||||
investasiId String?
|
||||
|
||||
MasterBank MasterBank? @relation(fields: [masterBankId], references: [id])
|
||||
masterBankId String?
|
||||
|
||||
StatusInvoice InvestasiMaster_StatusInvoice? @relation(fields: [statusInvoiceId], references: [id])
|
||||
statusInvoiceId String?
|
||||
|
||||
Author User? @relation(fields: [authorId], references: [id])
|
||||
authorId String?
|
||||
|
||||
Images Images? @relation(fields: [imagesId], references: [id])
|
||||
imagesId String?
|
||||
|
||||
imageId String?
|
||||
}
|
||||
|
||||
model InvestasiMaster_StatusInvoice {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
Investasi_Invoice Investasi_Invoice[]
|
||||
}
|
||||
|
||||
/// ---------------------------------------- DONASI ----------------------------------------- //
|
||||
model Donasi {
|
||||
id String @id @default(cuid())
|
||||
@@ -379,6 +418,8 @@ model Donasi {
|
||||
Donasi_Invoice Donasi_Invoice[]
|
||||
Donasi_Kabar Donasi_Kabar[]
|
||||
Donasi_PencairanDana Donasi_PencairanDana[]
|
||||
|
||||
imageId String?
|
||||
}
|
||||
|
||||
model Donasi_TemporaryCreate {
|
||||
@@ -394,6 +435,8 @@ model Donasi_TemporaryCreate {
|
||||
donasiMaster_KategoriId String?
|
||||
durasi DonasiMaster_Durasi? @relation(fields: [donasiMaster_DurasiId], references: [id])
|
||||
donasiMaster_DurasiId String?
|
||||
|
||||
imageId String?
|
||||
}
|
||||
|
||||
model DonasiMaster_Kategori {
|
||||
@@ -428,6 +471,8 @@ model Donasi_Cerita {
|
||||
imagesId String? @unique
|
||||
Donasi Donasi? @relation(fields: [donasiId], references: [id])
|
||||
donasiId String? @unique
|
||||
|
||||
imageId String?
|
||||
}
|
||||
|
||||
model DonasiMaster_StatusDonasi {
|
||||
@@ -475,6 +520,8 @@ model Donasi_Invoice {
|
||||
authorId String?
|
||||
Images Images? @relation(fields: [imagesId], references: [id])
|
||||
imagesId String?
|
||||
|
||||
imageId String?
|
||||
}
|
||||
|
||||
model Donasi_Kabar {
|
||||
@@ -490,6 +537,8 @@ model Donasi_Kabar {
|
||||
ImagesKabar Images? @relation(fields: [imagesId], references: [id])
|
||||
imagesId String?
|
||||
Donasi_Notif Donasi_Notif[]
|
||||
|
||||
imageId String?
|
||||
}
|
||||
|
||||
model Donasi_Notif {
|
||||
@@ -517,21 +566,26 @@ model Donasi_PencairanDana {
|
||||
donasiId String?
|
||||
Images Images? @relation(fields: [imagesId], references: [id])
|
||||
imagesId String?
|
||||
|
||||
imageId String?
|
||||
}
|
||||
|
||||
// ========================================= EVENT ========================================= //
|
||||
|
||||
model Event {
|
||||
id String @id @default(cuid())
|
||||
id String @id @default(cuid())
|
||||
title String
|
||||
lokasi String
|
||||
tanggal DateTime
|
||||
tanggal DateTime?
|
||||
deskripsi String
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
catatan String?
|
||||
|
||||
tanggalSelesai DateTime?
|
||||
isArsip Boolean? @default(false)
|
||||
|
||||
Author User? @relation(fields: [authorId], references: [id])
|
||||
authorId String?
|
||||
EventMaster_Status EventMaster_Status? @relation(fields: [eventMaster_StatusId], references: [id])
|
||||
@@ -564,6 +618,7 @@ model Event_Peserta {
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
isPresent Boolean @default(false)
|
||||
|
||||
Event Event? @relation(fields: [eventId], references: [id])
|
||||
eventId String?
|
||||
@@ -578,6 +633,7 @@ model Voting {
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
isArsip Boolean @default(false)
|
||||
|
||||
title String
|
||||
deskripsi String
|
||||
@@ -638,16 +694,15 @@ model Job {
|
||||
updatedAt DateTime @updatedAt
|
||||
isArsip Boolean @default(false)
|
||||
catatan String?
|
||||
title String
|
||||
content String @db.Text
|
||||
deskripsi String @db.Text
|
||||
|
||||
title String
|
||||
content String @db.Text
|
||||
deskripsi String @db.Text
|
||||
Images Images? @relation(fields: [imagesId], references: [id])
|
||||
imagesId String?
|
||||
Author User? @relation(fields: [authorId], references: [id])
|
||||
authorId String?
|
||||
MasterStatus MasterStatus? @relation(fields: [masterStatusId], references: [id])
|
||||
masterStatusId String? @default("2")
|
||||
imageId String?
|
||||
}
|
||||
|
||||
// ========================================= FORUM ========================================= //
|
||||
@@ -865,9 +920,35 @@ model Notifikasi {
|
||||
Role MasterUserRole? @relation(fields: [userRoleId], references: [id])
|
||||
userRoleId String
|
||||
|
||||
User User? @relation("UserNotifikasi", fields: [userId], references: [id], map: "NotifikasiUser")
|
||||
User User? @relation("UserNotifikasi", fields: [userId], references: [id], map: "NotifikasiUser")
|
||||
userId String?
|
||||
Admin User? @relation("AdminNotifikasi", fields: [adminId], references: [id], map: "NotifikasiAdmin")
|
||||
adminId String?
|
||||
|
||||
}
|
||||
|
||||
// MAPS
|
||||
model BusinessMaps {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
namePin String
|
||||
latitude Float
|
||||
longitude Float
|
||||
Author User? @relation(fields: [authorId], references: [id])
|
||||
authorId String?
|
||||
Portofolio Portofolio? @relation(fields: [portofolioId], references: [id])
|
||||
portofolioId String? @unique
|
||||
imageId String?
|
||||
pinId String?
|
||||
}
|
||||
|
||||
// Kategori App
|
||||
model MasterKategoriApp {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
name String
|
||||
value String?
|
||||
}
|
||||
|
||||
18
prisma/seed.ts
Normal file
18
prisma/seed.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import prisma from "./../src/app/lib/prisma";
|
||||
import { generate_seeder } from "./../src/app_modules/_global/fun/generate_seeder";
|
||||
|
||||
(async () => {
|
||||
console.log("start");
|
||||
await generate_seeder();
|
||||
})()
|
||||
.then(() => {
|
||||
console.log("success");
|
||||
process.exit(0);
|
||||
})
|
||||
.catch((e) => {
|
||||
console.error(e);
|
||||
process.exit(1);
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect();
|
||||
});
|
||||
BIN
public/aset/global/loading.gif
Normal file
BIN
public/aset/global/loading.gif
Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
2
public/aset/global/no-image.svg
Normal file
2
public/aset/global/no-image.svg
Normal file
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!-- Uploaded to: SVG Repo, www.svgrepo.com, Generator: SVG Repo Mixer Tools -->
|
||||
<svg fill="#000000" width="800px" height="800px" viewBox="0 0 32 32" id="icon" xmlns="http://www.w3.org/2000/svg"><defs><style>.cls-1{fill:none;}</style></defs><title>no-image</title><path d="M30,3.4141,28.5859,2,2,28.5859,3.4141,30l2-2H26a2.0027,2.0027,0,0,0,2-2V5.4141ZM26,26H7.4141l7.7929-7.793,2.3788,2.3787a2,2,0,0,0,2.8284,0L22,19l4,3.9973Zm0-5.8318-2.5858-2.5859a2,2,0,0,0-2.8284,0L19,19.1682l-2.377-2.3771L26,7.4141Z"/><path d="M6,22V19l5-4.9966,1.3733,1.3733,1.4159-1.416-1.375-1.375a2,2,0,0,0-2.8284,0L6,16.1716V6H22V4H6A2.002,2.002,0,0,0,4,6V22Z"/><rect id="_Transparent_Rectangle_" data-name="<Transparent Rectangle>" class="cls-1" width="32" height="32"/></svg>
|
||||
|
Before Width: | Height: | Size: 799 B After Width: | Height: | Size: 799 B |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
// Image for file
|
||||
Binary file not shown.
@@ -1 +0,0 @@
|
||||
// Image for investasi
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +0,0 @@
|
||||
# Test
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
13
src/app/(not-user)/job-vacancy/[id]/page.tsx
Normal file
13
src/app/(not-user)/job-vacancy/[id]/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Job_UiNotUserView } from "@/app_modules/job/_ui";
|
||||
import { job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const jobId = params.id;
|
||||
const dataJob = await job_getOneById(jobId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Job_UiNotUserView data={dataJob} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
10
src/app/(not-user)/preview-image/[id]/page.tsx
Normal file
10
src/app/(not-user)/preview-image/[id]/page.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { UIGlobal_ImagePreview, UIGlobal_NotUserImagePreview } from "@/app_modules/_global/ui";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const fileId = params.id;
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_NotUserImagePreview fileId={fileId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/(user)/login/page.tsx
Normal file
13
src/app/(user)/login/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
import { Login } from "@/app_modules/auth";
|
||||
import versionUpdate from "../../../../package.json";
|
||||
|
||||
export default async function Page() {
|
||||
const version = versionUpdate.version;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Login version={version} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
5
src/app/(user)/register/page.tsx
Normal file
5
src/app/(user)/register/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Register } from "@/app_modules/auth";
|
||||
|
||||
export default async function Page() {
|
||||
return <Register />;
|
||||
}
|
||||
7
src/app/(user)/splash/page.tsx
Normal file
7
src/app/(user)/splash/page.tsx
Normal file
@@ -0,0 +1,7 @@
|
||||
import { SplashScreen } from "@/app_modules/auth";
|
||||
|
||||
export default async function Page() {
|
||||
return <>
|
||||
<SplashScreen/>
|
||||
</>
|
||||
}
|
||||
5
src/app/(user)/validasi/page.tsx
Normal file
5
src/app/(user)/validasi/page.tsx
Normal file
@@ -0,0 +1,5 @@
|
||||
import { Validasi } from "@/app_modules/auth";
|
||||
|
||||
export default async function Page() {
|
||||
return <Validasi />;
|
||||
}
|
||||
19
src/app/(user)/waiting-room/page.tsx
Normal file
19
src/app/(user)/waiting-room/page.tsx
Normal file
@@ -0,0 +1,19 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { funGlobal_checkActivationUseById } from "@/app_modules/_global/fun/get/fun_check_activation_use_by_id";
|
||||
import WaitingRoom_View from "@/app_modules/waiting_room/view";
|
||||
|
||||
export default async function Page() {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const activationUser = await funGlobal_checkActivationUseById({
|
||||
userId: userLoginId as string,
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<WaitingRoom_View
|
||||
activationUser={activationUser as boolean}
|
||||
userLoginId={userLoginId as string}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
21
src/app/api/auth/check/route.ts
Normal file
21
src/app/api/auth/check/route.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { prisma } from "@/app/lib";
|
||||
import { data } from "autoprefixer";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(request: Request) {
|
||||
const { searchParams } = new URL(request.url);
|
||||
const id = searchParams.get("id");
|
||||
|
||||
try {
|
||||
const data = await prisma.kodeOtp.findFirst({
|
||||
where: {
|
||||
id: id as string,
|
||||
},
|
||||
});
|
||||
return new Response(JSON.stringify({ data }), { status: 200 });
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
return new Response(JSON.stringify({ data: null }), { status: 404 });
|
||||
}
|
||||
@@ -1,35 +1,64 @@
|
||||
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 { prisma } from "@/app/lib";
|
||||
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
if (req.method === "POST") {
|
||||
const codeOtp = randomOTP();
|
||||
const body = await req.json();
|
||||
// console.log(body);
|
||||
const { nomor } = 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}`
|
||||
try {
|
||||
const res = await fetch(
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.
|
||||
\n
|
||||
>> Kode OTP anda: ${codeOtp}.
|
||||
`
|
||||
);
|
||||
|
||||
const sendWa = await res.json();
|
||||
if (sendWa.status !== "success")
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Nomor Whatsapp Tidak Aktif",
|
||||
}),
|
||||
{ status: 400 }
|
||||
);
|
||||
return NextResponse.json({
|
||||
body,
|
||||
status: 200,
|
||||
message: "Login Success",
|
||||
});
|
||||
} catch (error) {
|
||||
return NextResponse.json({ status: 500, message: "Server Error !!!" });
|
||||
}
|
||||
|
||||
const createOtpId = await prisma.kodeOtp.create({
|
||||
data: {
|
||||
nomor: nomor,
|
||||
otp: codeOtp,
|
||||
},
|
||||
});
|
||||
|
||||
if (!createOtpId)
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Gagal Membuat Kode OTP",
|
||||
}),
|
||||
{ status: 400 }
|
||||
);
|
||||
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: true,
|
||||
message: "Kode Verifikasi Dikirim",
|
||||
kodeId: createOtpId.id,
|
||||
}),
|
||||
{ status: 200 }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Server Whatsapp Error !!",
|
||||
}),
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
return NextResponse.json({ success: false });
|
||||
|
||||
@@ -1,12 +1,28 @@
|
||||
import { prisma } from "@/app/lib";
|
||||
import { cookies } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
export async function GET(request: Request) {
|
||||
const { searchParams } = new URL(request.url);
|
||||
const id = searchParams.get("id");
|
||||
|
||||
export async function GET() {
|
||||
cookies().set({
|
||||
name: "ssn",
|
||||
value: "",
|
||||
maxAge: 0,
|
||||
});
|
||||
const delToken = await prisma.userSession.delete({
|
||||
where: {
|
||||
userId: id as string,
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json({ status: 200, message: "Logout" });
|
||||
const del = cookies().delete(process.env.NEXT_PUBLIC_BASE_SESSION_KEY!);
|
||||
return new Response(JSON.stringify({ success: true, message: "Logout Berhasil" }), {status: 200});
|
||||
}
|
||||
|
||||
// import { cookies } from "next/headers";
|
||||
// import { NextResponse } from "next/server";
|
||||
|
||||
// export async function GET() {
|
||||
// cookies().set({
|
||||
// name: "mySession",
|
||||
// value: "",
|
||||
// maxAge: 0,
|
||||
// });
|
||||
|
||||
// return NextResponse.json({ status: 200, message: "Logout" });
|
||||
// }
|
||||
|
||||
@@ -1,59 +1,70 @@
|
||||
import { sealData } from "iron-session";
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { sessionCreate } from "@/app/auth/_lib/session_create";
|
||||
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 { data } = await req.json();
|
||||
|
||||
const cekUsername = await prisma.user.findUnique({
|
||||
where: {
|
||||
username: body.username,
|
||||
username: data.username,
|
||||
},
|
||||
});
|
||||
|
||||
myConsole(cekUsername);
|
||||
|
||||
if (cekUsername)
|
||||
return NextResponse.json({ status: 400, message: "Username sudah ada" });
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Username sudah digunakan",
|
||||
}),
|
||||
{ status: 400 }
|
||||
);
|
||||
|
||||
const data = await prisma.user.create({
|
||||
const createUser = await prisma.user.create({
|
||||
data: {
|
||||
username: body.username,
|
||||
nomor: body.nomor,
|
||||
username: data.username,
|
||||
nomor: data.nomor,
|
||||
active: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (data) {
|
||||
const seal = await sealData(
|
||||
JSON.stringify({
|
||||
id: data.id,
|
||||
username: data.username,
|
||||
}),
|
||||
{
|
||||
password: await config.server.password,
|
||||
}
|
||||
);
|
||||
const token = await sessionCreate({
|
||||
sessionKey: process.env.NEXT_PUBLIC_BASE_SESSION_KEY!,
|
||||
encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!,
|
||||
user: createUser as any,
|
||||
});
|
||||
|
||||
cookies().set({
|
||||
name: "ssn",
|
||||
value: seal,
|
||||
maxAge: 60 * 60 * 24 * 7,
|
||||
try {
|
||||
const createUserSession = await prisma.userSession.create({
|
||||
data: {
|
||||
token: token as string,
|
||||
userId: createUser.id,
|
||||
},
|
||||
});
|
||||
|
||||
return NextResponse.json({ status: 201 });
|
||||
if (!createUserSession)
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Gagal Membuat Session",
|
||||
}),
|
||||
{ status: 400 }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
return NextResponse.json({ success: true });
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: true,
|
||||
message: "Berhasil Login",
|
||||
}),
|
||||
|
||||
{ status: 200 }
|
||||
);
|
||||
}
|
||||
return NextResponse.json({ success: false });
|
||||
return new Response(
|
||||
JSON.stringify({ success: false, message: "Method Not Allowed" }),
|
||||
{ status: 405 }
|
||||
);
|
||||
}
|
||||
|
||||
65
src/app/api/auth/resend/route.ts
Normal file
65
src/app/api/auth/resend/route.ts
Normal file
@@ -0,0 +1,65 @@
|
||||
import { prisma } from "@/app/lib";
|
||||
import { randomOTP } from "@/app_modules/auth/fun/rondom_otp";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
if (req.method === "POST") {
|
||||
const codeOtp = randomOTP();
|
||||
const body = await req.json();
|
||||
const { nomor } = body;
|
||||
|
||||
try {
|
||||
const res = await fetch(
|
||||
`https://wa.wibudev.com/code?nom=${nomor}&text=HIPMI - Kode ini bersifat RAHASIA dan JANGAN DI BAGIKAN KEPADA SIAPAPUN, termasuk anggota ataupun pengurus HIPMI lainnya.
|
||||
\n
|
||||
>> Kode OTP anda: ${codeOtp}.
|
||||
`
|
||||
);
|
||||
|
||||
const sendWa = await res.json();
|
||||
if (sendWa.status !== "success")
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Nomor Whatsapp Tidak Aktif",
|
||||
}),
|
||||
{ status: 400 }
|
||||
);
|
||||
|
||||
const createOtpId = await prisma.kodeOtp.create({
|
||||
data: {
|
||||
nomor: nomor,
|
||||
otp: codeOtp,
|
||||
},
|
||||
});
|
||||
|
||||
if (!createOtpId)
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Gagal Membuat Kode OTP",
|
||||
}),
|
||||
{ status: 400 }
|
||||
);
|
||||
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: true,
|
||||
message: "Kode Verifikasi Dikirim",
|
||||
kodeId: createOtpId.id,
|
||||
}),
|
||||
{ status: 200 }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: false,
|
||||
message: "Server Whatsapp Error !!",
|
||||
}),
|
||||
{ status: 500 }
|
||||
);
|
||||
}
|
||||
}
|
||||
return NextResponse.json({ success: false });
|
||||
}
|
||||
@@ -1,59 +1,107 @@
|
||||
import { myConsole } from "@/app/fun/my_console";
|
||||
import { sessionCreate } from "@/app/auth/_lib/session_create";
|
||||
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 { ServerEnv } from "@/app/lib/server_env";
|
||||
import { sealData } from "iron-session";
|
||||
import { revalidatePath } from "next/cache";
|
||||
import fs from "fs";
|
||||
import yaml from "yaml";
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
import { cookies } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
|
||||
if (req.method === "POST") {
|
||||
const body = await req.json();
|
||||
const { nomor } = await req.json();
|
||||
|
||||
|
||||
const data = await prisma.user.findUnique({
|
||||
const dataUser = await prisma.user.findUnique({
|
||||
where: {
|
||||
nomor: body.nomor,
|
||||
nomor: nomor,
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
nomor: true,
|
||||
username: true,
|
||||
active: true,
|
||||
masterUserRoleId: 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),
|
||||
}
|
||||
if (dataUser === null)
|
||||
return new Response(
|
||||
JSON.stringify({ success: false, message: "Nomor Belum Terdaftar" }),
|
||||
{ status: 404 }
|
||||
);
|
||||
|
||||
cookies().set({
|
||||
name: "ssn",
|
||||
value: res,
|
||||
maxAge: 60 * 60 * 24 * 7,
|
||||
const token = await sessionCreate({
|
||||
sessionKey: process.env.NEXT_PUBLIC_BASE_SESSION_KEY!,
|
||||
encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!,
|
||||
user: dataUser as any,
|
||||
});
|
||||
|
||||
const cekSessionUser = await prisma.userSession.findFirst({
|
||||
where: {
|
||||
userId: dataUser.id,
|
||||
},
|
||||
});
|
||||
|
||||
if (cekSessionUser !== null) {
|
||||
await prisma.userSession.delete({
|
||||
where: {
|
||||
userId: dataUser.id,
|
||||
},
|
||||
});
|
||||
|
||||
revalidatePath("/dev/home")
|
||||
|
||||
return NextResponse.json({ status: 200, data });
|
||||
}
|
||||
|
||||
return NextResponse.json({ success: true });
|
||||
try {
|
||||
const createUserSession = await prisma.userSession.create({
|
||||
data: {
|
||||
token: token as string,
|
||||
userId: dataUser.id,
|
||||
},
|
||||
});
|
||||
|
||||
if (!createUserSession)
|
||||
return new Response(
|
||||
JSON.stringify({ success: false, message: "Gagal Membuat Session" }),
|
||||
{ status: 400 }
|
||||
);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
|
||||
// if (data) {
|
||||
// const res = await sealData(
|
||||
// JSON.stringify({
|
||||
// id: data.id,
|
||||
// username: data.username,
|
||||
// }),
|
||||
// {
|
||||
// password: ServerEnv.value?.WIBU_PWD as string,
|
||||
// }
|
||||
// );
|
||||
|
||||
// cookies().set({
|
||||
// name: "mySession",
|
||||
// value: res,
|
||||
// maxAge: 60 * 60 * 24 * 7,
|
||||
// });
|
||||
|
||||
// revalidatePath("/dev/home");
|
||||
|
||||
// return NextResponse.json({ status: 200, data });
|
||||
// }
|
||||
|
||||
// return NextResponse.json({ success: true });
|
||||
return new Response(
|
||||
JSON.stringify({
|
||||
success: true,
|
||||
message: "Berhasil Login",
|
||||
roleId: dataUser.masterUserRoleId,
|
||||
active: dataUser.active,
|
||||
}),
|
||||
{ status: 200 }
|
||||
);
|
||||
}
|
||||
return NextResponse.json({ success: false });
|
||||
return new Response(
|
||||
JSON.stringify({ success: false, message: "Method Not Allowed" }),
|
||||
{ status: 405 }
|
||||
);
|
||||
}
|
||||
|
||||
14
src/app/api/check-cookies/route.ts
Normal file
14
src/app/api/check-cookies/route.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import _ from "lodash";
|
||||
import { cookies } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const cekCookies = cookies();
|
||||
const c = cekCookies.get("mySession");
|
||||
|
||||
if (!c || !c?.value || _.isEmpty(c?.value) || _.isUndefined(c?.value)) {
|
||||
return NextResponse.json({ success: false });
|
||||
// return new Response(JSON.stringify({ success: false }));
|
||||
}
|
||||
return NextResponse.json({ success: true });
|
||||
}
|
||||
15
src/app/api/event/check-kehadiran/route.ts
Normal file
15
src/app/api/event/check-kehadiran/route.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { event_funCheckKehadiran } from "@/app_modules/event/fun";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const { searchParams } = new URL(req.url);
|
||||
const userId = searchParams.get("userId");
|
||||
const eventId = searchParams.get("eventId");
|
||||
|
||||
const res = await event_funCheckKehadiran({
|
||||
eventId: eventId as string,
|
||||
userId: userId as string,
|
||||
});
|
||||
|
||||
return NextResponse.json({ res });
|
||||
}
|
||||
33
src/app/api/investasi/bukti-transfer/[id]/route.ts
Normal file
33
src/app/api/investasi/bukti-transfer/[id]/route.ts
Normal file
@@ -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/invoice/${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/invoice/${data?.url}`);
|
||||
return new NextResponse(fl, {
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
},
|
||||
});
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import fs from "fs";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
import path from "path";
|
||||
const root = process.cwd();
|
||||
|
||||
export async function GET(
|
||||
req: NextRequest,
|
||||
@@ -15,15 +17,17 @@ export async function GET(
|
||||
},
|
||||
});
|
||||
|
||||
if (!fs.existsSync(`./public/job/${get?.url}`)) {
|
||||
const notFile = fs.readFileSync("./public/aset/global/no-file.png");
|
||||
if (!fs.existsSync(path.join(root, `public/job/${get?.url}`))) {
|
||||
const notFile = fs.readFileSync(
|
||||
path.join(root, "public/aset/global/no-file.png")
|
||||
);
|
||||
return new NextResponse(notFile, {
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
},
|
||||
});
|
||||
}
|
||||
const file = fs.readFileSync(`./public/job/${get?.url}`);
|
||||
const file = fs.readFileSync(path.join(root, `public/job/${get?.url}`));
|
||||
return new NextResponse(file, {
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
|
||||
@@ -6,7 +6,7 @@ export async function GET(
|
||||
req: NextRequest,
|
||||
{ params }: { params: { id: string } }
|
||||
) {
|
||||
const get = await prisma.imagesBackground.findUnique({
|
||||
const get = await prisma.images.findUnique({
|
||||
where: {
|
||||
id: params.id,
|
||||
},
|
||||
@@ -15,7 +15,7 @@ export async function GET(
|
||||
},
|
||||
});
|
||||
|
||||
if (!fs.existsSync(`./public/profile/background/${get?.url}`)) {
|
||||
if (!fs.existsSync(`./public/map/foto/${get?.url}`)) {
|
||||
const notFile = fs.readFileSync("./public/aset/global/no_img.png");
|
||||
return new NextResponse(notFile, {
|
||||
headers: {
|
||||
@@ -23,7 +23,7 @@ export async function GET(
|
||||
},
|
||||
});
|
||||
}
|
||||
const file = fs.readFileSync(`./public/profile/background/${get?.url}`);
|
||||
const file = fs.readFileSync(`./public/map/foto/${get?.url}`);
|
||||
return new NextResponse(file, {
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
32
src/app/api/map/pin/[id]/route.ts
Normal file
32
src/app/api/map/pin/[id]/route.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import fs from "fs";
|
||||
import { NextRequest, NextResponse } from "next/server";
|
||||
|
||||
export async function GET(
|
||||
req: NextRequest,
|
||||
{ params }: { params: { id: string } }
|
||||
) {
|
||||
const get = await prisma.images.findUnique({
|
||||
where: {
|
||||
id: params.id,
|
||||
},
|
||||
select: {
|
||||
url: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!fs.existsSync(`./public/map/pin/${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/map/pin/${get?.url}`);
|
||||
return new NextResponse(file, {
|
||||
headers: {
|
||||
"Content-Type": "image/png",
|
||||
},
|
||||
});
|
||||
}
|
||||
6
src/app/api/origin-url/route.ts
Normal file
6
src/app/api/origin-url/route.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import { headers } from "next/headers";
|
||||
export async function GET(req: Request) {
|
||||
const origin = new URL(req.url).origin;
|
||||
|
||||
return new Response(JSON.stringify({ success: true, origin }));
|
||||
}
|
||||
@@ -6,7 +6,6 @@ import pencarianInvestor from "./../../../bin/seeder/investasi/pencarian_investo
|
||||
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";
|
||||
@@ -25,6 +24,7 @@ import collaboration_industri from "../../../bin/seeder/colab/master_industri.js
|
||||
import collaboration_status from "../../../bin/seeder/colab/master_status.json";
|
||||
import collaboration_jumlah_minimal_room from "../../../bin/seeder/colab/jumlah_minimal_room.json";
|
||||
import nomor_admin from "../../../bin/seeder/nomor_admin.json";
|
||||
import { master_nama_bank } from "@/bin/seeder/master";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const dev = new URL(req.url).searchParams.get("dev");
|
||||
@@ -145,19 +145,21 @@ export async function GET(req: Request) {
|
||||
});
|
||||
}
|
||||
|
||||
for (let i of namaBank) {
|
||||
for (let i of master_nama_bank) {
|
||||
await prisma.masterBank.upsert({
|
||||
where: {
|
||||
id: i.id.toString(),
|
||||
},
|
||||
create: {
|
||||
id: i.id.toString(),
|
||||
name: i.name,
|
||||
namaBank: i.namaBank,
|
||||
namaAkun: i.namaAkun,
|
||||
norek: i.norek.toString(),
|
||||
},
|
||||
update: {
|
||||
id: i.id.toString(),
|
||||
name: i.name,
|
||||
namaBank: i.namaBank,
|
||||
namaAkun: i.namaAkun,
|
||||
norek: i.norek.toString(),
|
||||
},
|
||||
});
|
||||
|
||||
41
src/app/api/user/route.ts
Normal file
41
src/app/api/user/route.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { jwtVerify } from "jose";
|
||||
import _ from "lodash";
|
||||
import { cookies } from "next/headers";
|
||||
import { NextResponse } from "next/server";
|
||||
|
||||
export async function GET() {
|
||||
// const data = await req.text();
|
||||
// console.log(data);
|
||||
const c = cookies().get(process.env.NEXT_PUBLIC_BASE_SESSION_KEY!);
|
||||
|
||||
if (!c || !c?.value || _.isEmpty(c?.value) || _.isUndefined(c?.value)) {
|
||||
return NextResponse.json({ status: 401, message: "Unauthorized" });
|
||||
}
|
||||
|
||||
const token = c.value;
|
||||
const dataUser = await decrypt({
|
||||
token: token,
|
||||
encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!,
|
||||
});
|
||||
|
||||
return NextResponse.json({ status: 200, message: "OK", data: dataUser });
|
||||
}
|
||||
|
||||
async function decrypt({
|
||||
token,
|
||||
encodedKey,
|
||||
}: {
|
||||
token: string;
|
||||
encodedKey: string;
|
||||
}): Promise<Record<string, any> | null> {
|
||||
try {
|
||||
const enc = new TextEncoder().encode(encodedKey);
|
||||
const { payload } = await jwtVerify(token, enc, {
|
||||
algorithms: ["HS256"],
|
||||
});
|
||||
return (payload.user as Record<string, any>) || null;
|
||||
} catch (error) {
|
||||
console.error("Gagal verifikasi session", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
7
src/app/api/validasi/route.ts
Normal file
7
src/app/api/validasi/route.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
export async function GET(req: Request) {
|
||||
const auth = req.headers.get("Authorization");
|
||||
const token = auth?.split(" ")[1];
|
||||
if (!token)
|
||||
return new Response(JSON.stringify({ success: false }), { status: 401 });
|
||||
return new Response(JSON.stringify({ success: true }));
|
||||
}
|
||||
7
src/app/api/zz-makuro/route.ts
Normal file
7
src/app/api/zz-makuro/route.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { headers } from "next/headers";
|
||||
export async function GET(
|
||||
req: Request) {
|
||||
const origin = new URL(req.url).origin;
|
||||
|
||||
return new Response(JSON.stringify({ success: true, origin }));
|
||||
}
|
||||
22
src/app/auth/_lib/decrypt.ts
Normal file
22
src/app/auth/_lib/decrypt.ts
Normal file
@@ -0,0 +1,22 @@
|
||||
import { jwtVerify } from "jose";
|
||||
|
||||
export async function decrypt({
|
||||
token,
|
||||
encodedKey,
|
||||
}: {
|
||||
token: string;
|
||||
encodedKey: string;
|
||||
}): Promise<Record<string, any> | null> {
|
||||
try {
|
||||
const enc = new TextEncoder().encode(encodedKey);
|
||||
const { payload } = await jwtVerify(token, enc, {
|
||||
algorithms: ["HS256"],
|
||||
});
|
||||
return (payload.user as Record<string, any>) || null;
|
||||
} catch (error) {
|
||||
console.error("Gagal verifikasi session", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// wibu:0.2.82
|
||||
25
src/app/auth/_lib/encrypt.ts
Normal file
25
src/app/auth/_lib/encrypt.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { SignJWT } from "jose";
|
||||
|
||||
export async function encrypt({
|
||||
user,
|
||||
exp = "7 year",
|
||||
encodedKey,
|
||||
}: {
|
||||
user: Record<string, any>;
|
||||
exp?: string;
|
||||
encodedKey: string;
|
||||
}): Promise<string | null> {
|
||||
try {
|
||||
const enc = new TextEncoder().encode(encodedKey);
|
||||
return new SignJWT({ user })
|
||||
.setProtectedHeader({ alg: "HS256" })
|
||||
.setIssuedAt()
|
||||
.setExpirationTime(exp)
|
||||
.sign(enc);
|
||||
} catch (error) {
|
||||
console.error("Gagal mengenkripsi", error);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
// wibu:0.2.82
|
||||
35
src/app/auth/_lib/session_create.ts
Normal file
35
src/app/auth/_lib/session_create.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { cookies } from "next/headers";
|
||||
import { encrypt } from "./encrypt";
|
||||
|
||||
export async function sessionCreate({
|
||||
sessionKey,
|
||||
exp = "7 year",
|
||||
encodedKey,
|
||||
user,
|
||||
}: {
|
||||
sessionKey: string;
|
||||
exp?: string;
|
||||
encodedKey: string;
|
||||
user: Record<string, unknown>;
|
||||
}) {
|
||||
const token = await encrypt({
|
||||
exp,
|
||||
encodedKey,
|
||||
user,
|
||||
});
|
||||
|
||||
const cookie: any = {
|
||||
key: sessionKey,
|
||||
value: token,
|
||||
options: {
|
||||
httpOnly: true,
|
||||
sameSite: "lax",
|
||||
path: "/",
|
||||
},
|
||||
};
|
||||
|
||||
cookies().set(cookie.key, cookie.value, { ...cookie.options });
|
||||
return token;
|
||||
}
|
||||
|
||||
// wibu:0.2.82
|
||||
27
src/app/auth/api/login/route.ts
Normal file
27
src/app/auth/api/login/route.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { prisma } from "@/app/lib";
|
||||
import { sessionCreate } from "../../_lib/session_create";
|
||||
|
||||
export async function POST(req: Request) {
|
||||
const user = await prisma.user.findUnique({
|
||||
where: {
|
||||
nomor: "6281339158911",
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
nomor: true,
|
||||
},
|
||||
});
|
||||
|
||||
if (!user)
|
||||
return new Response(
|
||||
JSON.stringify({ success: false, message: "User not found" }), {status: 404}
|
||||
);
|
||||
|
||||
const token = await sessionCreate({
|
||||
sessionKey: process.env.NEXT_PUBLIC_BASE_SESSION_KEY!,
|
||||
encodedKey: process.env.NEXT_PUBLIC_BASE_TOKEN_KEY!,
|
||||
user: user as any,
|
||||
});
|
||||
|
||||
return new Response(JSON.stringify({ success: true, token }));
|
||||
}
|
||||
5
src/app/auth/api/logout/route.ts
Normal file
5
src/app/auth/api/logout/route.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import { cookies } from "next/headers";
|
||||
export async function GET() {
|
||||
const del = cookies().delete(process.env.NEXT_PUBLIC_BASE_SESSION_KEY!);
|
||||
return new Response(JSON.stringify({ success: true }));
|
||||
}
|
||||
39
src/app/auth/login/page.tsx
Normal file
39
src/app/auth/login/page.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
"use client";
|
||||
import { Button } from "@mantine/core";
|
||||
import { useState } from "react";
|
||||
|
||||
export default function Page() {
|
||||
const [loading, setLoading] = useState(false);
|
||||
|
||||
|
||||
async function login() {
|
||||
setLoading(true);
|
||||
try {
|
||||
const res = await fetch("/auth/api/login", {
|
||||
method: "POST",
|
||||
});
|
||||
|
||||
const dataText = await res.text();
|
||||
|
||||
if (!res.ok) {
|
||||
console.error(dataText);
|
||||
throw new Error(res.statusText);
|
||||
}
|
||||
|
||||
const dataJson = JSON.parse(dataText);
|
||||
console.log(dataJson);
|
||||
// window.location.replace("/dev/home");
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
} finally {
|
||||
setLoading(false);
|
||||
}
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<Button loading={loading} onClick={login}>
|
||||
Login
|
||||
</Button>
|
||||
</>
|
||||
);
|
||||
}
|
||||
32
src/app/dev/(user)/home/page.tsx
Normal file
32
src/app/dev/(user)/home/page.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
import { funGetUserIdByToken } from "@/app_modules/_global/fun/get";
|
||||
import { HomeView } from "@/app_modules/home";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { job_getTwoForHomeView } from "@/app_modules/job/fun/get/get_two_for_home_view";
|
||||
import notifikasi_countUserNotifikasi from "@/app_modules/notifikasi/fun/count/fun_count_by_id";
|
||||
|
||||
export default async function PageHome() {
|
||||
const userLoginId = await funGetUserIdByToken();
|
||||
const dataUser = await user_getOneByUserId(userLoginId as string);
|
||||
const dataJob = await job_getTwoForHomeView();
|
||||
const countNotifikasi = await notifikasi_countUserNotifikasi();
|
||||
|
||||
// console.log(userLoginId, "ini di home");
|
||||
// console.log(dataUser, "ini di home");
|
||||
|
||||
// if (dataUser?.active === false) {
|
||||
// return redirect(RouterHome.home_user_non_active);
|
||||
// }
|
||||
|
||||
// if (dataUser?.masterUserRoleId === "2" || dataUser?.masterUserRoleId === "3")
|
||||
// return redirect(RouterAdminDashboard.main_admin);
|
||||
|
||||
return (
|
||||
<>
|
||||
<HomeView
|
||||
dataUser={dataUser as any}
|
||||
dataJob={dataJob as any}
|
||||
countNotifikasi={countNotifikasi}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
11
src/app/dev/(user)/image-preview/[id]/page.tsx
Normal file
11
src/app/dev/(user)/image-preview/[id]/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { UIGlobal_ImagePreview } from "@/app_modules/_global/ui";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const fileId = params.id;
|
||||
|
||||
return (
|
||||
<>
|
||||
<UIGlobal_ImagePreview fileId={fileId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,16 +1,19 @@
|
||||
import { AdminAppInformation_MainView } from "@/app_modules/admin/app_info";
|
||||
import { adminAppInformation_funGetBidangBisnis } from "@/app_modules/admin/app_info/fun";
|
||||
import adminAppInformation_getMasterBank from "@/app_modules/admin/app_info/fun/master/get_list_bank";
|
||||
import adminAppInformation_getNomorAdmin from "@/app_modules/admin/app_info/fun/master/get_nomor_admin";
|
||||
import { AdminAppInformation_UiMain } from "@/app_modules/admin/app_info/ui";
|
||||
|
||||
export default async function Page() {
|
||||
const nomorAdmin = await adminAppInformation_getNomorAdmin();
|
||||
const listBank = await adminAppInformation_getMasterBank();
|
||||
const dataBidangBisnis = await adminAppInformation_funGetBidangBisnis()
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminAppInformation_MainView
|
||||
<AdminAppInformation_UiMain
|
||||
nomorAdmin={nomorAdmin}
|
||||
listBank={listBank}
|
||||
dataBidangBisnis={dataBidangBisnis}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Admin_Award } from "@/app_modules/admin/award";
|
||||
import { gen_api } from "../../../../../../gen_api";
|
||||
|
||||
export default async function Page() {
|
||||
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component_global/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component_global/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component_global/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,8 @@
|
||||
import { AdminDonasi_DetailReview } from "@/app_modules/admin/donasi";
|
||||
import { AdminDonasi_getOneById } 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_getOneById(params.id)
|
||||
// console.log(dataReview)
|
||||
return <AdminDonasi_DetailReview dataReview={dataReview as any}/>
|
||||
}
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const dataReview = await AdminDonasi_getOneById(params.id);
|
||||
|
||||
return <AdminDonasi_DetailReview dataReview={dataReview as any} />;
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component_global/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
import { AdminDonasi_TableReview } from "@/app_modules/admin/donasi";
|
||||
import adminDonasi_getListReview from "@/app_modules/admin/donasi/fun/get/get_list_review";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
export default async function Page() {
|
||||
const listReview = await adminDonasi_getListReview({page: 1});
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { AdminEvent_Riwayat } from "@/app_modules/admin/event";
|
||||
import { AdminEvent_getListAllRiwayat } from "@/app_modules/admin/event/fun/get/get_list_all_riwayat";
|
||||
import { adminEvent_funGetListAllRiwayat } from "@/app_modules/admin/event/fun/get/get_list_all_riwayat";
|
||||
|
||||
export default async function Page() {
|
||||
const listRiwayat = await AdminEvent_getListAllRiwayat()
|
||||
|
||||
const listRiwayat = await adminEvent_funGetListAllRiwayat({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
3
src/app/dev/admin/event/detail/main-detail/page.tsx
Normal file
3
src/app/dev/admin/event/detail/main-detail/page.tsx
Normal file
@@ -0,0 +1,3 @@
|
||||
export default function Page({ params }: { params: { id: string } }) {
|
||||
return null;
|
||||
}
|
||||
13
src/app/dev/admin/event/detail/peserta/[id]/page.tsx
Normal file
13
src/app/dev/admin/event/detail/peserta/[id]/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { AdminEvent_UiDetailPeserta } from "@/app_modules/admin/event/_ui";
|
||||
import { adminEvent_getListPesertaById } from "@/app_modules/admin/event/fun/get/get_list_peserta_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const eventId = params.id;
|
||||
const dataPeserta = await adminEvent_getListPesertaById({ eventId, page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminEvent_UiDetailPeserta dataPeserta={dataPeserta} eventId={eventId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component_global/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,8 +1,8 @@
|
||||
import { AdminEvent_TablePublish } from "@/app_modules/admin/event";
|
||||
import { AdminEvent_getListTableByStatusId } from "@/app_modules/admin/event/fun/get/get_list_table_by_status_id";
|
||||
import { adminEvent_funGetListPublish } from "@/app_modules/admin/event/fun";
|
||||
|
||||
export default async function Page() {
|
||||
const listPublish = await AdminEvent_getListTableByStatusId("1");
|
||||
async function Page() {
|
||||
const listPublish = await adminEvent_funGetListPublish({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -10,3 +10,5 @@ export default async function Page() {
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default Page;
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { AdminEvent_TableReject } from "@/app_modules/admin/event";
|
||||
import { AdminEvent_getListTableByStatusId } from "@/app_modules/admin/event/fun/get/get_list_table_by_status_id";
|
||||
import { adminEvent_funGetListReject } from "@/app_modules/admin/event/fun";
|
||||
|
||||
export default async function Page() {
|
||||
const listReject = await AdminEvent_getListTableByStatusId("4")
|
||||
const listReject = await adminEvent_funGetListReject({ page: 1 });
|
||||
|
||||
return <>
|
||||
<AdminEvent_TableReject listReject={listReject as any}/>
|
||||
return (
|
||||
<>
|
||||
<AdminEvent_TableReject listReject={listReject as any} />
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import { AdminEvent_TableReview } from "@/app_modules/admin/event";
|
||||
import { AdminEvent_getListTableByStatusId } from "@/app_modules/admin/event/fun/get/get_list_table_by_status_id";
|
||||
import { adminEvent_funGetListReview } from "@/app_modules/admin/event/fun";
|
||||
|
||||
export default async function Page() {
|
||||
const listReview = await AdminEvent_getListTableByStatusId("2")
|
||||
const listReview = await adminEvent_funGetListReview({ page: 1 });
|
||||
|
||||
return <>
|
||||
<AdminEvent_TableReview listReview={listReview as any}/>
|
||||
</>
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<AdminEvent_TableReview listData={listReview as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +0,0 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component_global/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
10
src/app/dev/admin/investasi/bukti-transfer/[id]/page.tsx
Normal file
10
src/app/dev/admin/investasi/bukti-transfer/[id]/page.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import { AdminInvestasi_DetailBuktiTransfer } from "@/app_modules/admin/investasi/detail";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const imageId = params.id;
|
||||
return (
|
||||
<>
|
||||
<AdminInvestasi_DetailBuktiTransfer imageId={imageId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
import { Admin_LayoutBuktiTransferInvestasi } from "@/app_modules/admin/investasi";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Admin_LayoutBuktiTransferInvestasi>
|
||||
{children}
|
||||
</Admin_LayoutBuktiTransferInvestasi>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
import { Admin_BuktiTransferInvestasi } from "@/app_modules/admin/investasi";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<Admin_BuktiTransferInvestasi />
|
||||
</>
|
||||
);
|
||||
}
|
||||
27
src/app/dev/admin/investasi/detail/publish/[id]/page.tsx
Normal file
27
src/app/dev/admin/investasi/detail/publish/[id]/page.tsx
Normal file
@@ -0,0 +1,27 @@
|
||||
import { AdminInvestasi_DetailPublish } from "@/app_modules/admin/investasi";
|
||||
import {
|
||||
adminInvestasi_funGetAllTransaksiById,
|
||||
adminInvestasi_getStatusInvestasi,
|
||||
} from "@/app_modules/admin/investasi/fun";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const investasiId = params.id;
|
||||
const dataInvestasi = await getOneInvestasiById(investasiId);
|
||||
const statusTransaksi = await adminInvestasi_getStatusInvestasi();
|
||||
const dataTransaksi = await adminInvestasi_funGetAllTransaksiById({
|
||||
investasiId,
|
||||
page: 1,
|
||||
});
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminInvestasi_DetailPublish
|
||||
data={dataInvestasi as any}
|
||||
dataTransaksi={dataTransaksi as any}
|
||||
statusTransaksi={statusTransaksi}
|
||||
investasiId={investasiId as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/admin/investasi/detail/reject/[id]/page.tsx
Normal file
13
src/app/dev/admin/investasi/detail/reject/[id]/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { AdminInvestasi_DetailReject } from "@/app_modules/admin/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const investasiId = params.id;
|
||||
const dataInvestasi = await getOneInvestasiById(investasiId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminInvestasi_DetailReject data={dataInvestasi as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app/dev/admin/investasi/detail/review/[id]/page.tsx
Normal file
13
src/app/dev/admin/investasi/detail/review/[id]/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Admin_KonfirmasiInvestasi } from "@/app_modules/admin/investasi";
|
||||
import getOneInvestasiById from "@/app_modules/investasi/fun/get_one_investasi_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const investasiId = params.id;
|
||||
const dataInvestasi = await getOneInvestasiById(investasiId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Admin_KonfirmasiInvestasi dataInvestasi={dataInvestasi as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
|
||||
|
||||
import { Admin_LayoutHalamanAksi } from "@/app_modules/admin/investasi";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({ children }: { children: React.ReactNode }) {
|
||||
return <>
|
||||
<Admin_LayoutHalamanAksi>{children}</Admin_LayoutHalamanAksi>
|
||||
</>;
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user