210
gen_api.ts
Normal file
@@ -0,0 +1,210 @@
|
||||
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());
|
||||
}
|
||||
};
|
||||
2431
gen_page.tsx
Normal file
@@ -31,12 +31,14 @@
|
||||
"@tiptap/pm": "^2.2.3",
|
||||
"@tiptap/react": "^2.2.3",
|
||||
"@tiptap/starter-kit": "^2.2.3",
|
||||
"@types/lodash": "^4.14.199",
|
||||
"@types/lodash": "^4.17.4",
|
||||
"@types/node": "20.4.5",
|
||||
"@types/react": "18.2.17",
|
||||
"@types/react-dom": "18.2.7",
|
||||
"@types/react-virtualized": "^9.21.30",
|
||||
"@types/uuid": "^9.0.4",
|
||||
"autoprefixer": "10.4.14",
|
||||
"bufferutil": "^4.0.8",
|
||||
"dayjs": "^1.11.10",
|
||||
"echarts": "^5.4.3",
|
||||
"echarts-for-react": "^3.0.2",
|
||||
@@ -54,16 +56,20 @@
|
||||
"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-infinite-scroll-component": "^6.1.0",
|
||||
"react-international-phone": "^4.2.6",
|
||||
"react-quill": "^2.0.0",
|
||||
"react-responsive-carousel": "^3.2.23",
|
||||
"react-simple-toasts": "^5.10.0",
|
||||
"react-toastify": "^9.1.3",
|
||||
"react-virtualized": "^9.22.5",
|
||||
"socket.io-client": "^4.7.2",
|
||||
"tailwindcss": "3.3.3",
|
||||
"typescript": "5.1.6",
|
||||
"utf-8-validate": "^6.0.3",
|
||||
"uuid": "^9.0.1",
|
||||
"yaml": "^2.3.2"
|
||||
}
|
||||
|
||||
@@ -12,33 +12,37 @@ datasource db {
|
||||
}
|
||||
|
||||
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[]
|
||||
Donasi_Invoice Donasi_Invoice[]
|
||||
Donasi_Notif Donasi_Notif[]
|
||||
Event Event[]
|
||||
Event_Peserta Event_Peserta[]
|
||||
Voting Voting[]
|
||||
Voting_Kontributor Voting_Kontributor[]
|
||||
Job Job[]
|
||||
Forum_Posting Forum_Posting[]
|
||||
Forum_Komentar Forum_Komentar[]
|
||||
Forum_ReportPosting Forum_ReportPosting[]
|
||||
Forum_ReportKomentar Forum_ReportKomentar[]
|
||||
ProjectCollaboration ProjectCollaboration[]
|
||||
ProjectCollaboration_Partisipasi ProjectCollaboration_Partisipasi[]
|
||||
ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat[]
|
||||
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[]
|
||||
Donasi_Invoice Donasi_Invoice[]
|
||||
Donasi_Notif Donasi_Notif[]
|
||||
Event Event[]
|
||||
Event_Peserta Event_Peserta[]
|
||||
Voting Voting[]
|
||||
Voting_Kontributor Voting_Kontributor[]
|
||||
Job Job[]
|
||||
Forum_Posting Forum_Posting[]
|
||||
Forum_Komentar Forum_Komentar[]
|
||||
Forum_ReportPosting Forum_ReportPosting[]
|
||||
Forum_ReportKomentar Forum_ReportKomentar[]
|
||||
ProjectCollaboration ProjectCollaboration[]
|
||||
ProjectCollaboration_Partisipasi ProjectCollaboration_Partisipasi[]
|
||||
ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat[]
|
||||
ProjectCollaboration_AnggotaRoomChat ProjectCollaboration_AnggotaRoomChat[]
|
||||
ProjectCollaboration_Message ProjectCollaboration_Message[]
|
||||
AdminProjectCollaboration_Notifikasi ProjectCollaboration_Notifikasi[] @relation("AdminNotifProjectToUser")
|
||||
UserProjectCollaboration_Notifikasi ProjectCollaboration_Notifikasi[] @relation("UserNotifProjectToUser")
|
||||
}
|
||||
|
||||
model MasterUserRole {
|
||||
@@ -730,11 +734,13 @@ model ProjectCollaboration {
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
catatan String?
|
||||
title String
|
||||
lokasi String
|
||||
purpose String @db.Text
|
||||
benefit String? @db.Text
|
||||
isReject Boolean? @default(false)
|
||||
report String?
|
||||
// jumlah_partisipan Int @default(0)
|
||||
|
||||
ProjectCollaborationMaster_Industri ProjectCollaborationMaster_Industri? @relation(fields: [projectCollaborationMaster_IndustriId], references: [id])
|
||||
projectCollaborationMaster_IndustriId Int?
|
||||
@@ -743,6 +749,8 @@ model ProjectCollaboration {
|
||||
ProjectCollaborationMaster_Status ProjectCollaborationMaster_Status? @relation(fields: [projectCollaborationMaster_StatusId], references: [id])
|
||||
projectCollaborationMaster_StatusId Int? @default(1)
|
||||
ProjectCollaboration_Partisipasi ProjectCollaboration_Partisipasi[]
|
||||
ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat[]
|
||||
ProjectCollaboration_Notifikasi ProjectCollaboration_Notifikasi[]
|
||||
}
|
||||
|
||||
model ProjectCollaborationMaster_Industri {
|
||||
@@ -766,24 +774,67 @@ model ProjectCollaborationMaster_Status {
|
||||
}
|
||||
|
||||
model ProjectCollaboration_Partisipasi {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
User User? @relation(fields: [userId], references: [id])
|
||||
userId String?
|
||||
ProjectCollaboration ProjectCollaboration? @relation(fields: [projectCollaborationId], references: [id])
|
||||
projectCollaborationId String?
|
||||
deskripsi_diri String
|
||||
}
|
||||
|
||||
model ProjectCollaboration_RoomChat {
|
||||
id String @id @default(cuid())
|
||||
name String
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
Author User? @relation(fields: [userId], references: [id])
|
||||
userId String?
|
||||
|
||||
ProjectCollaboration ProjectCollaboration? @relation(fields: [projectCollaborationId], references: [id])
|
||||
projectCollaborationId String?
|
||||
ProjectCollaboration_AnggotaRoomChat ProjectCollaboration_AnggotaRoomChat[]
|
||||
ProjectCollaboration_Message ProjectCollaboration_Message[]
|
||||
}
|
||||
|
||||
model ProjectCollaboration_AnggotaRoomChat {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
User User? @relation(fields: [userId], references: [id])
|
||||
userId String?
|
||||
ProjectCollaboration ProjectCollaboration? @relation(fields: [projectCollaborationId], references: [id])
|
||||
projectCollaborationId String?
|
||||
User User @relation(fields: [userId], references: [id])
|
||||
userId String
|
||||
ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat? @relation(fields: [projectCollaboration_RoomChatId], references: [id])
|
||||
projectCollaboration_RoomChatId String?
|
||||
}
|
||||
|
||||
model ProjectCollaboration_RoomChat {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
Author User? @relation(fields: [userId], references: [id])
|
||||
userId String?
|
||||
ProjectCollaboration_Partisipasi ProjectCollaboration_Partisipasi[]
|
||||
model ProjectCollaboration_Message {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
message String
|
||||
isFile Boolean? @default(false)
|
||||
User User? @relation(fields: [userId], references: [id])
|
||||
userId String?
|
||||
ProjectCollaboration_RoomChat ProjectCollaboration_RoomChat? @relation(fields: [projectCollaboration_RoomChatId], references: [id])
|
||||
projectCollaboration_RoomChatId String?
|
||||
}
|
||||
|
||||
model ProjectCollaboration_Notifikasi {
|
||||
id String @id @default(cuid())
|
||||
isActive Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
isRead Boolean @default(false)
|
||||
note String?
|
||||
ProjectCollaboration ProjectCollaboration? @relation(fields: [projectCollaborationId], references: [id])
|
||||
projectCollaborationId String
|
||||
AdminId User @relation("AdminNotifProjectToUser", fields: [adminId], references: [id], map: "AdminNotifProjectUser")
|
||||
adminId String
|
||||
User User @relation("UserNotifProjectToUser", fields: [userId], references: [id], map: "UserNotifProjectUser")
|
||||
userId String
|
||||
}
|
||||
|
||||
BIN
public/file/7be86df1-64ec-457f-b6dd-4768262ade8f.pdf
Normal file
BIN
public/investasi/9ba9ec4d-f287-40e7-9163-af306ce97188.jpeg
Normal file
|
After Width: | Height: | Size: 9.2 KiB |
BIN
public/job/0b5b73b1-9eef-46e2-9e68-3912b8560365.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/job/8fbf6297-3671-4d2e-baf1-54b3a1fcc95f.jpg
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
public/job/df04072d-fac0-4551-9ee1-da8105fa4901.png
Normal file
|
After Width: | Height: | Size: 6.4 KiB |
BIN
public/portofolio/logo/27f1b4f7-0574-472f-97cf-91aeb038c938.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/portofolio/logo/5fc311b4-8a01-4385-a87d-87d1a3953d88.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/portofolio/logo/869458f1-44ce-4075-a7c8-4c85f85c4664.png
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
public/portofolio/logo/a8b687db-75f3-4087-bf8a-b8e4c9f0a748.jpg
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
public/portofolio/logo/bd2c3ce3-e94d-4309-ac48-6fbaa2f72c66.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/portofolio/logo/ddb0dced-949e-4601-9e35-45dce4a801c6.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
BIN
public/portofolio/logo/e3a15736-527c-4b3c-a730-074fa44a48ed.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 7.6 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
|
After Width: | Height: | Size: 7.5 KiB |
BIN
public/profile/foto/0ebe8c38-ded7-4faa-b944-769e6bb254a6.jpeg
Normal file
|
After Width: | Height: | Size: 6.1 KiB |
BIN
public/profile/foto/2ab67615-039d-4ef2-98ad-f1573eaf9125.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/2b25412b-0bcd-4608-aa48-ed0eb34a1dc1.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/2c10a620-4222-43bc-886e-2f317de4711c.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/2d677fbd-29dd-4930-a112-82c4e111e5dc.jpeg
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/profile/foto/51b1addd-2e15-409e-8f72-388dc1cc1c2e.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/577ce4f3-ab43-4264-bbf5-2552bc22ae45.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/5bb79d2d-c5bc-4886-af9c-90546edcd944.jpeg
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
public/profile/foto/6d96d9c1-c5fd-452a-96ad-ff626918460b.jpeg
Normal file
|
After Width: | Height: | Size: 6.5 KiB |
BIN
public/profile/foto/86585f77-3e32-417f-a414-22ea6858e3fd.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/89e12784-3361-4033-9212-ec8758c30032.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/994ecb8e-59f6-43b7-a4ea-e14d8e441200.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/9d993366-a1d1-4de6-a54d-c6b6e57c2eb3.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/ae45dd05-9851-44bc-9ea8-c305b4b731da.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/bfd2132b-493e-4d1e-bc4b-808937ac4b7e.jpeg
Normal file
|
After Width: | Height: | Size: 4.7 KiB |
BIN
public/profile/foto/d40b5363-d94b-4cf0-8190-2426124a694f.jpeg
Normal file
|
After Width: | Height: | Size: 9.7 KiB |
BIN
public/profile/foto/d9e798e1-be4c-446b-8c82-1cabf8662bc8.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
public/profile/foto/ffdbacbe-131a-4790-b500-9cf256452083.jpeg
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
@@ -23,6 +23,8 @@ import forum_kategori_report from "../../../bin/seeder/forum/master_report.json"
|
||||
import forum_status_posting from "../../../bin/seeder/forum/master_status.json";
|
||||
import collaboration_industri from "../../../bin/seeder/colab/master_industri.json";
|
||||
import collaboration_status from "../../../bin/seeder/colab/master_status.json";
|
||||
import collaboration_jumlah_minimal_room from "../../../bin/seeder/colab/jumlah_minimal_room.json";
|
||||
import { randomId } from "@mantine/hooks";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const dev = new URL(req.url).searchParams.get("dev");
|
||||
|
||||
12
src/app/api/test-scroll/route.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export async function GET(req: Request) {
|
||||
const page = new URL(req.url).searchParams.get("page");
|
||||
if (!page) return new Response("page require", { status: 400 });
|
||||
const res = await prisma.projectCollaboration_Message.findMany({
|
||||
take: 5,
|
||||
skip: +page * 5 - 5,
|
||||
});
|
||||
|
||||
// return Response.json(res);
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
import { Admin_Award } from "@/app_modules/admin/award";
|
||||
import { gen_api } from "../../../../../../gen_api";
|
||||
|
||||
export default async function Page() {
|
||||
|
||||
return (
|
||||
<>
|
||||
<Admin_Award />
|
||||
|
||||
9
src/app/dev/admin/colab/dashboard/loading.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
20
src/app/dev/admin/colab/dashboard/page.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
import { AdminColab_Dashboard } from "@/app_modules/admin/colab";
|
||||
import adminColab_countGroupChat from "@/app_modules/admin/colab/fun/count/count_group_chat";
|
||||
import adminColab_countIsPublish from "@/app_modules/admin/colab/fun/count/count_publish";
|
||||
import adminColab_countIsReject from "@/app_modules/admin/colab/fun/count/count_reject";
|
||||
|
||||
export default async function Page() {
|
||||
const countPublish = await adminColab_countIsPublish();
|
||||
const countRoom = await adminColab_countGroupChat();
|
||||
const countReject = await adminColab_countIsReject()
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminColab_Dashboard
|
||||
countPublish={countPublish}
|
||||
countRoom={countRoom}
|
||||
countReject={countReject}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/admin/colab/sub-menu/group/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { AdminColab_TableGroup } from "@/app_modules/admin/colab";
|
||||
import adminColab_getListAllGroupChat from "@/app_modules/admin/colab/fun/get/get_list_all_group_chat";
|
||||
|
||||
export default async function Page() {
|
||||
const listGroup = await adminColab_getListAllGroupChat({page: 1})
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminColab_TableGroup listGroup={listGroup as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
9
src/app/dev/admin/colab/sub-menu/loading.tsx
Normal file
@@ -0,0 +1,9 @@
|
||||
import ComponentAdminGlobal_LoadingPage from "@/app_modules/admin/component/loading_admin_page";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<ComponentAdminGlobal_LoadingPage />
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/admin/colab/sub-menu/publish/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { AdminColab_TablePublish } from "@/app_modules/admin/colab";
|
||||
import adminColab_getListAllPublish from "@/app_modules/admin/colab/fun/get/get_list_all_publish";
|
||||
|
||||
export default async function Page() {
|
||||
const listData = await adminColab_getListAllPublish({ page: 1 });
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminColab_TablePublish listData={listData} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
12
src/app/dev/admin/colab/sub-menu/reject/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { AdminColab_TableRejected } from "@/app_modules/admin/colab";
|
||||
import adminColab_getListAllRejected from "@/app_modules/admin/colab/fun/get/get_list_all_reject";
|
||||
|
||||
export default async function Page() {
|
||||
const listReject = await adminColab_getListAllRejected({page: 1})
|
||||
|
||||
return (
|
||||
<>
|
||||
<AdminColab_TableRejected listReject={listReject as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
import { AdminLayout } from "@/app_modules/admin/main_dashboard";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -9,7 +9,7 @@ export default async function Layout({
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const userId = await user_getOneUserId()
|
||||
const dataUser = await user_getOneById(userId)
|
||||
const dataUser = await user_getOneByUserId(userId)
|
||||
const userRole = dataUser?.masterUserRoleId
|
||||
|
||||
return (
|
||||
|
||||
39
src/app/dev/colab/detail/group/[id]/page.tsx
Normal file
@@ -0,0 +1,39 @@
|
||||
import adminColab_getOneRoomChatById from "@/app_modules/admin/colab/fun/get/get_one_room_chat_by_id";
|
||||
import { Colab_GroupChatView } from "@/app_modules/colab";
|
||||
import ColabViewChat from "@/app_modules/colab/detail/chat";
|
||||
import colab_V2getListMessageByRoomId from "@/app_modules/colab/fun/chat/get_message_by_room_id";
|
||||
import colab_getMessageByRoomId from "@/app_modules/colab/fun/get/room_chat/get_message_by_room_id";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const roomId = params.id;
|
||||
const userLoginId = await user_getOneUserId();
|
||||
const getData = (await adminColab_getOneRoomChatById({ roomId: roomId }))
|
||||
.data;
|
||||
const dataRoom = _.omit(getData, [
|
||||
"ProjectCollaboration",
|
||||
"ProjectCollaboration_AnggotaRoomChat",
|
||||
]);
|
||||
let listMsg = await colab_getMessageByRoomId({ roomId: roomId, page: 1 });
|
||||
const dataUserLogin = await user_getOneByUserId(userLoginId);
|
||||
// console.log(dataUserLogin);
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* <ColabViewChat
|
||||
listMsg={listMsg as any}
|
||||
dataRoom={dataRoom as any}
|
||||
userLoginId={userLoginId}
|
||||
/> */}
|
||||
|
||||
<Colab_GroupChatView
|
||||
userLoginId={userLoginId}
|
||||
listMsg={listMsg}
|
||||
selectRoom={dataRoom as any}
|
||||
dataUserLogin={dataUserLogin as any}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,14 +1,24 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { LayoutColab_DetailGrupDiskusi } from "@/app_modules/colab";
|
||||
import colab_getListAnggotaByRoomId from "@/app_modules/colab/fun/get/room_chat/get_list_anggota_by_room_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
let roomId = params.id;
|
||||
const dataRoom = await colab_getListAnggotaByRoomId(roomId);
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutColab_DetailGrupDiskusi>{children}</LayoutColab_DetailGrupDiskusi>
|
||||
<LayoutColab_DetailGrupDiskusi dataRoom={dataRoom as any}>
|
||||
{children}
|
||||
</LayoutColab_DetailGrupDiskusi>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,20 @@
|
||||
import { Colab_DetailGrupDiskusi } from "@/app_modules/colab";
|
||||
import colab_getMessageByRoomId from "@/app_modules/colab/fun/get/room_chat/get_message_by_room_id";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import _ from "lodash";
|
||||
|
||||
export default async function Page() {
|
||||
return<>
|
||||
<Colab_DetailGrupDiskusi/>
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let roomId = params.id;
|
||||
const userLoginId = await user_getOneUserId();
|
||||
let listMsg = await colab_getMessageByRoomId({ page: 1, roomId: roomId });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Colab_DetailGrupDiskusi
|
||||
roomId={roomId}
|
||||
listMsg={listMsg}
|
||||
userLoginId={userLoginId}
|
||||
/>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
14
src/app/dev/colab/detail/info-grup/[id]/page.tsx
Normal file
@@ -0,0 +1,14 @@
|
||||
import prisma from "@/app/lib/prisma";
|
||||
import { Colab_DetailInfoGrup } from "@/app_modules/colab";
|
||||
import colab_getListAnggotaByRoomId from "@/app_modules/colab/fun/get/room_chat/get_list_anggota_by_room_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let roomId = params.id;
|
||||
const dataRoom = await colab_getListAnggotaByRoomId(roomId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Colab_DetailInfoGrup dataRoom={dataRoom as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import { LayoutColab_MainDetail } from "@/app_modules/colab";
|
||||
import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -9,9 +11,16 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const colabId = params.id;
|
||||
const dataColab = await colab_getOneCollaborationById(colabId);
|
||||
const authorId = dataColab?.Author?.id;
|
||||
const userLoginId = await user_getOneUserId();
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutColab_MainDetail colabId={colabId}>
|
||||
<LayoutColab_MainDetail
|
||||
colabId={colabId}
|
||||
isAuthor={authorId === userLoginId ? true : false}
|
||||
>
|
||||
{children}
|
||||
</LayoutColab_MainDetail>
|
||||
</>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Colab_MainDetail } from "@/app_modules/colab";
|
||||
import colab_funCekPartisipasiById from "@/app_modules/colab/fun/get/cek_partisipasi_by_user_id";
|
||||
import colab_getListPartisipanById from "@/app_modules/colab/fun/get/get_list_partisipan_by_id";
|
||||
import colab_getListPartisipanByColabId from "@/app_modules/colab/fun/get/get_list_partisipan_by_id";
|
||||
import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
|
||||
@@ -8,9 +8,8 @@ export default async function Page({ params }: { params: { id: string } }) {
|
||||
let colabId = params.id;
|
||||
const userLoginId = await user_getOneUserId();
|
||||
const dataColab = await colab_getOneCollaborationById(colabId);
|
||||
const listPartisipan = await colab_getListPartisipanById(colabId)
|
||||
const cekPartisipan = await colab_funCekPartisipasiById(colabId)
|
||||
|
||||
const listPartisipan = await colab_getListPartisipanByColabId(colabId);
|
||||
const cekPartisipan = await colab_funCekPartisipasiById(colabId);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
13
src/app/dev/colab/detail/notifikasi/[id]/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { Colab_DetailNotifikasi } from "@/app_modules/colab";
|
||||
import colab_getOneNotifikasiById from "@/app_modules/colab/fun/get/get_one_notifikasi_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let notifId = params.id;
|
||||
const data = await colab_getOneNotifikasiById({ notifId: notifId });
|
||||
|
||||
return (
|
||||
<>
|
||||
<Colab_DetailNotifikasi data={data as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Colab_DetailPartisipasiProyek } from "@/app_modules/colab";
|
||||
import colab_getListPartisipanById from "@/app_modules/colab/fun/get/get_list_partisipan_by_id";
|
||||
import colab_getListPartisipanByColabId from "@/app_modules/colab/fun/get/get_list_partisipan_by_id";
|
||||
import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
const colabId = params.id
|
||||
const dataColab = await colab_getOneCollaborationById(colabId)
|
||||
const listPartisipan = await colab_getListPartisipanById(colabId)
|
||||
const listPartisipan = await colab_getListPartisipanByColabId(colabId)
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
import { LayoutColab_DetailProyekSaya } from "@/app_modules/colab";
|
||||
import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
children,
|
||||
params,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
let colabId = params.id;
|
||||
const dataColab = await colab_getOneCollaborationById(colabId)
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutColab_DetailProyekSaya>{children}</LayoutColab_DetailProyekSaya>
|
||||
<LayoutColab_DetailProyekSaya dataColab={dataColab as any}>
|
||||
{children}
|
||||
</LayoutColab_DetailProyekSaya>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import { Colab_DetailProyekSaya } from "@/app_modules/colab";
|
||||
import colab_getListPartisipanById from "@/app_modules/colab/fun/get/get_list_partisipan_by_id";
|
||||
import colab_getListPartisipanByColabId from "@/app_modules/colab/fun/get/get_list_partisipan_by_id";
|
||||
import colab_getOneCollaborationById from "@/app_modules/colab/fun/get/get_one_by_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const colabId = params.id
|
||||
const dataColab = await colab_getOneCollaborationById(colabId)
|
||||
const listPartisipan = await colab_getListPartisipanById(colabId);
|
||||
|
||||
const colabId = params.id;
|
||||
const dataColab = await colab_getOneCollaborationById(colabId);
|
||||
const listPartisipan = await colab_getListPartisipanByColabId(colabId);
|
||||
|
||||
return (
|
||||
<>
|
||||
{/* <pre>{JSON.stringify(listPartisipan, null,2)}</pre> */}
|
||||
{/* <pre>{JSON.stringify(listPartisipan, null,2)}</pre> */}
|
||||
<Colab_DetailProyekSaya
|
||||
dataColab={dataColab as any}
|
||||
listPartisipan={listPartisipan as any}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
import colab_getListRoomChatByAuthorId from "@/app_modules/colab/fun/get/room_chat/get_list_room_by_author_id";
|
||||
import Colab_GrupDiskus from "@/app_modules/colab/main/grup";
|
||||
|
||||
export default async function Page() {
|
||||
const listRoom = await colab_getListRoomChatByAuthorId();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Colab_GrupDiskus />
|
||||
<Colab_GrupDiskus listRoom={listRoom as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { LayoutColab_Main } from "@/app_modules/colab";
|
||||
import colab_CekNotifikasi from "@/app_modules/colab/fun/get/cek_notifikasi";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -6,9 +7,11 @@ export default async function Layout({
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const cekNotif = await colab_CekNotifikasi();
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutColab_Main>{children}</LayoutColab_Main>
|
||||
<LayoutColab_Main cekNotif={cekNotif as any}>{children}</LayoutColab_Main>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,9 +1,13 @@
|
||||
import { Colab_NotifikasiView } from "@/app_modules/colab";
|
||||
import colab_getListNotifikasiByUserId from "@/app_modules/colab/fun/get/get_list_notifikasi_by_user_id";
|
||||
|
||||
export default async function Page() {
|
||||
const listNotifikasi = await colab_getListNotifikasiByUserId();
|
||||
// console.log(listNotifikasi);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Colab_NotifikasiView />
|
||||
<Colab_NotifikasiView listNotifikasi={listNotifikasi as any} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
import { Colab_Proyek } from "@/app_modules/colab";
|
||||
import colab_getListPartisipasiByAuthorId from "@/app_modules/colab/fun/get/get_list_partisipasi_by_author_id";
|
||||
import colab_getListAllProyekByAuthorId from "@/app_modules/colab/fun/get/get_list_proyek_by_author_id";
|
||||
import colab_getListPartisipasiProyekByAuthorId from "@/app_modules/colab/fun/get/get_list_partisipasi_proyek_by_author_id";
|
||||
import colab_getListAllProyekSayaByAuthorId from "@/app_modules/colab/fun/get/get_list_proyek_saya_by_author_id";
|
||||
|
||||
export default async function Page() {
|
||||
const listPartisipasiUser = (await colab_getListPartisipasiByAuthorId()).data;
|
||||
const listProyekSaya = (await colab_getListAllProyekByAuthorId()).data;
|
||||
const listPartisipasiProyek = (await colab_getListPartisipasiProyekByAuthorId()).data;
|
||||
const listProyekSaya = (await colab_getListAllProyekSayaByAuthorId()).data;
|
||||
|
||||
return (
|
||||
<>
|
||||
<Colab_Proyek
|
||||
listPartisipasiUser={listPartisipasiUser as any}
|
||||
listPartisipasiUser={listPartisipasiProyek as any}
|
||||
listProyekSaya={listProyekSaya as any}
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -8,9 +8,13 @@ export default async function Page({
|
||||
children: React.ReactNode;
|
||||
params: { id: string };
|
||||
}) {
|
||||
let eventId = params.id
|
||||
let eventId = params.id;
|
||||
|
||||
return <>
|
||||
<LayoutEvent_DetailDraft eventId={eventId}>{children}</LayoutEvent_DetailDraft>;
|
||||
</>
|
||||
return (
|
||||
<>
|
||||
<LayoutEvent_DetailDraft eventId={eventId}>
|
||||
{children}
|
||||
</LayoutEvent_DetailDraft>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { Event_DetailDraft } from "@/app_modules/event";
|
||||
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id";
|
||||
import { Event_DetailDraft } from "@/app_modules/event"
|
||||
import { Event_getOneById } from "@/app_modules/event/fun/get/get_one_by_id"
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let eventId = params.id
|
||||
const dataEvent = await Event_getOneById(eventId)
|
||||
return <Event_DetailDraft dataEvent={dataEvent as any} />;
|
||||
return <Event_DetailDraft dataEvent={dataEvent as any} />
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LayoutForum_Forumku } from "@/app_modules/forum";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -11,7 +11,7 @@ export default async function Layout({
|
||||
params: { id: string };
|
||||
}) {
|
||||
const authorId = params.id;
|
||||
const dataAuthor = await user_getOneById(authorId);
|
||||
const dataAuthor = await user_getOneByUserId(authorId);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -2,14 +2,14 @@ import { Forum_Forumku } from "@/app_modules/forum";
|
||||
import { forum_getListPostingByAuhtorId } from "@/app_modules/forum/fun/get/get_list_posting_by_author_id";
|
||||
import { forum_countOneTotalKomentarById } from "@/app_modules/forum/fun/count/count_one_total_komentar_by_id";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import _ from "lodash";
|
||||
import { forum_countPostingByAuthorId } from "@/app_modules/forum/fun/count/count_posting_by_author_id";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const authorId = params.id;
|
||||
const userLoginId = await user_getOneUserId()
|
||||
const dataAuthor = await user_getOneById(authorId);
|
||||
const userLoginId = await user_getOneUserId();
|
||||
const dataAuthor = await user_getOneByUserId(authorId);
|
||||
const auhtorSelectedData = _.omit(dataAuthor, [
|
||||
"Profile.email",
|
||||
"Profile.alamat",
|
||||
@@ -25,14 +25,11 @@ export default async function Page({ params }: { params: { id: string } }) {
|
||||
// setTimeout(a, 1000);
|
||||
// });
|
||||
|
||||
|
||||
|
||||
const dataPosting = await forum_getListPostingByAuhtorId(authorId);
|
||||
const totalPosting = await forum_countPostingByAuthorId(authorId);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
<Forum_Forumku
|
||||
auhtorSelectedData={auhtorSelectedData as any}
|
||||
dataPosting={dataPosting as any}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { LayoutForum_Main } from "@/app_modules/forum";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import React from "react";
|
||||
|
||||
export default async function Layout({
|
||||
@@ -9,7 +9,7 @@ export default async function Layout({
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
const authorId = await user_getOneUserId();
|
||||
const dataAuthor = await user_getOneById(authorId);
|
||||
const dataAuthor = await user_getOneByUserId(authorId);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { HomeLayout } from "@/app_modules/home";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function Layout({ children }: { children: any }) {
|
||||
const userId = await user_getOneUserId();
|
||||
const dataUser = await user_getOneById(userId);
|
||||
const dataUser = await user_getOneByUserId(userId);
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -3,22 +3,25 @@ import { cookies } from "next/headers";
|
||||
import { unsealData } from "iron-session";
|
||||
import _ from "lodash";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { redirect } from "next/navigation";
|
||||
import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin";
|
||||
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
||||
import ComponentGlobal_V2_LoadingPage from "@/app_modules/component_global/loading_page_v2";
|
||||
|
||||
export default async function Page() {
|
||||
const userId = await user_getOneUserId();
|
||||
const dataUser = await user_getOneById(userId);
|
||||
const dataUser = await user_getOneByUserId(userId);
|
||||
|
||||
if (dataUser?.active === false) {
|
||||
return redirect(RouterHome.home_user_non_active);
|
||||
}
|
||||
|
||||
|
||||
if (dataUser?.masterUserRoleId === "2" || dataUser?.masterUserRoleId === "3")
|
||||
return redirect(RouterAdminDashboard.splash_admin);
|
||||
|
||||
// if (dataUser?.Profile === null) return <ComponentGlobal_V2_LoadingPage />;
|
||||
|
||||
// await new Promise((a, b) => {
|
||||
// setTimeout(a, 4000);
|
||||
// });
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
"use server";
|
||||
import { Job_MainDetail } from "@/app_modules/job";
|
||||
import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id";
|
||||
import app_config from "@/util/app_config";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
const jobId = params.id;
|
||||
const dataJob = await Job_getOneById(jobId)
|
||||
const idJob = params.id;
|
||||
const dataJob = await Job_getOneById(idJob);
|
||||
|
||||
return (
|
||||
<>
|
||||
<Job_MainDetail dataJob={dataJob as any} />
|
||||
<Job_MainDetail dataJob={dataJob as any} hostName={app_config.host} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
"use server";
|
||||
import { Job_NonUserView } from "@/app_modules/job";
|
||||
import { Job_getOneById } from "@/app_modules/job/fun/get/get_one_by_id";
|
||||
import os from "os";
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let jobId = params.id;
|
||||
const dataJob = await Job_getOneById(jobId);
|
||||
|
||||
// const platform = os.platform();
|
||||
// const hostName =
|
||||
// platform === "darwin"
|
||||
// ? "http://localhost:3000"
|
||||
// : "https://test-hipmi.wibudev.com";
|
||||
return (
|
||||
<>
|
||||
<Job_NonUserView data={dataJob as any} />
|
||||
|
||||
@@ -12,13 +12,13 @@ import { funGetListPortofolio } from "@/app_modules/katalog/portofolio/fun/get/g
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { Profile_getOneById } from "@/app_modules/katalog/profile/fun/get/get_one_profile";
|
||||
import { Profile_getOneProfileAndUserById } from "@/app_modules/katalog/profile/fun/get/get_one_user_profile";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
const config = yaml.parse(fs.readFileSync("config.yaml").toString());
|
||||
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let profileId = params.id;
|
||||
const authorId = await user_getOneUserId();
|
||||
const dataUser = await user_getOneById(authorId)
|
||||
const dataUser = await user_getOneByUserId(authorId)
|
||||
const listPorto = await funGetListPortofolio(profileId);
|
||||
const dataProfile = await Profile_getOneProfileAndUserById(profileId);
|
||||
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { CreateProfile } from "@/app_modules/katalog/profile";
|
||||
|
||||
export default async function Page({params}: {params: {id: string}}) {
|
||||
const userId = await user_getOneUserId()
|
||||
|
||||
return <>
|
||||
<CreateProfile userId={userId}/>
|
||||
</>
|
||||
}
|
||||
12
src/app/dev/profile/create/page.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { CreateProfile } from "@/app_modules/katalog/profile";
|
||||
|
||||
export default async function Page() {
|
||||
const userId = await user_getOneUserId();
|
||||
|
||||
return (
|
||||
<>
|
||||
<CreateProfile userId={userId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -2,12 +2,12 @@ import { RouterAdminDashboard } from "@/app/lib/router_hipmi/router_admin";
|
||||
import { RouterHome } from "@/app/lib/router_hipmi/router_home";
|
||||
import { user_getOneUserId } from "@/app_modules/fun_global/get_user_token";
|
||||
import { Home_UserNonActive } from "@/app_modules/home";
|
||||
import { user_getOneById } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { user_getOneByUserId } from "@/app_modules/home/fun/get/get_one_user_by_id";
|
||||
import { redirect } from "next/navigation";
|
||||
|
||||
export default async function Page() {
|
||||
const userId = await user_getOneUserId();
|
||||
const dataUser = await user_getOneById(userId);
|
||||
const dataUser = await user_getOneByUserId(userId);
|
||||
|
||||
if (dataUser?.active === true) {
|
||||
return redirect(RouterHome.main_home);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { UserSearch_MainView } from "@/app_modules/user_search";
|
||||
import { UserSearch_getListUser } from "@/app_modules/user_search/fun/get/get_list_user";
|
||||
|
||||
export default async function Page() {
|
||||
const listUser = await UserSearch_getListUser()
|
||||
const listUser = await UserSearch_getListUser({ name: "" });
|
||||
|
||||
return <UserSearch_MainView listUser={listUser as any} />;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ export default function RootStyleRegistry({
|
||||
<body suppressHydrationWarning={true}>
|
||||
<CacheProvider value={cache}>
|
||||
<MantineProvider withGlobalStyles withNormalizeCSS>
|
||||
<Notifications position="top-center" containerWidth="250px" />
|
||||
<Notifications position="top-center" containerWidth={300} />
|
||||
{children}
|
||||
{/* <ToastContainer position="bottom-center" />
|
||||
<AppNotif /> */}
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
// import MqttLoader from '@/util/mqtt_loader';
|
||||
import RootStyleRegistry from './emotion';
|
||||
import MqttLoader from "@/util/mqtt_loader";
|
||||
import RootStyleRegistry from "./emotion";
|
||||
|
||||
|
||||
export default function RootLayout({ children }: { children: React.ReactNode }) {
|
||||
export default function RootLayout({
|
||||
children,
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
}) {
|
||||
return (
|
||||
<RootStyleRegistry>
|
||||
{/* <MqttLoader /> */}
|
||||
{children}</RootStyleRegistry>
|
||||
<MqttLoader />
|
||||
{children}
|
||||
</RootStyleRegistry>
|
||||
);
|
||||
}
|
||||
|
||||
6
src/app/lib/router_admin/router_admin_colab.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
export const RouterAdminColab = {
|
||||
dashboard: "/dev/admin/colab/dashboard",
|
||||
table_publish: "/dev/admin/colab/sub-menu/publish",
|
||||
table_group: "/dev/admin/colab/sub-menu/group",
|
||||
table_reject: "/dev/admin/colab/sub-menu/reject",
|
||||
};
|
||||
@@ -21,6 +21,9 @@ export const RouterColab = {
|
||||
detail_partisipasi_proyek: "/dev/colab/detail/proyek/partisipasi/",
|
||||
detail_proyek_saya: "/dev/colab/detail/proyek/saya/",
|
||||
detail_grup: "/dev/colab/detail/grup/",
|
||||
info_grup: "/dev/colab/detail/info-grup/",
|
||||
detail_notifikasi: "/dev/colab/detail/notifikasi/",
|
||||
group_chat: "/dev/colab/detail/group/",
|
||||
|
||||
// proyek
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@ export const RouterProfile = {
|
||||
katalog: "/dev/katalog/",
|
||||
|
||||
// create
|
||||
create: "/dev/profile/create/",
|
||||
create: "/dev/profile/create",
|
||||
|
||||
// edit
|
||||
edit: "/dev/profile/edit/",
|
||||
|
||||
9
src/app/makuro/_util.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { v4 as uuidv4 } from "uuid";
|
||||
|
||||
export const createItems = (length = 100): string[] =>
|
||||
Array.from({ length }).map(() => uuidv4());
|
||||
|
||||
export const loadMore = async (length = 100): Promise<string[]> => {
|
||||
console.log("Loading more items...");
|
||||
return new Promise((res) => setTimeout(() => res(createItems(length)), 100));
|
||||
};
|
||||
@@ -1,116 +1,101 @@
|
||||
"use client";
|
||||
import { useState } from "react";
|
||||
import useInfiniteScroll, {
|
||||
ScrollDirection,
|
||||
} from "react-easy-infinite-scroll-hook";
|
||||
import { createItems, loadMore } from "./_util";
|
||||
import { useShallowEffect } from "@mantine/hooks";
|
||||
import { Center, Loader, Text } from "@mantine/core";
|
||||
// Beda Package
|
||||
import InfiniteScroll from "react-infinite-scroll-component";
|
||||
|
||||
import {
|
||||
Box,
|
||||
Button,
|
||||
Center,
|
||||
Paper,
|
||||
ScrollArea,
|
||||
SimpleGrid,
|
||||
Stack,
|
||||
Text,
|
||||
TextInput,
|
||||
Title,
|
||||
} from "@mantine/core";
|
||||
import _ from "lodash";
|
||||
// import ViewMakuro from "./_server/makuro_view";
|
||||
// import mqtt_client from "@/util/mqtt_client";
|
||||
// import { useState } from "react";
|
||||
// import { useAtom } from "jotai";
|
||||
// import { gs_coba_chat } from "./gs_coba";
|
||||
export default function App() {
|
||||
const [data, setData] = useState<any[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(false);
|
||||
|
||||
// export default function Page() {
|
||||
// const [data1, setData1] = useState("");
|
||||
// const [data2, setData2] = useState("");
|
||||
const ttlData = Array.from({ length: 21 });
|
||||
const [list, setList] = useState<any[]>(ttlData);
|
||||
|
||||
// const [msg, setMsg] = useAtom(gs_coba_chat);
|
||||
// useShallowEffect(() => {
|
||||
// setData(createItems());
|
||||
// }, []);
|
||||
|
||||
// return (
|
||||
// <>
|
||||
// <SimpleGrid cols={2} mt={"lg"}>
|
||||
// <Stack align="center" justify="center">
|
||||
// <TextInput
|
||||
// label="User 1"
|
||||
// value={data1}
|
||||
// onChange={(val) => setData1(val.currentTarget.value)}
|
||||
// />
|
||||
// <button
|
||||
// onClick={() => {
|
||||
// mqtt_client.publish("example_hipmi", data1);
|
||||
// setData1("");
|
||||
// }}
|
||||
// >
|
||||
// kirim
|
||||
// </button>
|
||||
// </Stack>
|
||||
// <Stack align="center" justify="center">
|
||||
// <TextInput
|
||||
// label="User 2"
|
||||
// value={data2}
|
||||
// onChange={(val) => setData2(val.currentTarget.value)}
|
||||
// />
|
||||
// <button
|
||||
// onClick={() => {
|
||||
// mqtt_client.publish("example_hipmi", data2);
|
||||
// setData2("");
|
||||
// }}
|
||||
// >
|
||||
// kirim
|
||||
// </button>
|
||||
// </Stack>
|
||||
// </SimpleGrid>
|
||||
// <Stack align="center" justify="center" mt={"xl"}>
|
||||
// <Paper withBorder shadow="lg" p={"lg"}>
|
||||
// {msg}
|
||||
// </Paper>
|
||||
// </Stack>
|
||||
// {/* <ViewMakuro /> */}
|
||||
// </>
|
||||
// );
|
||||
// }
|
||||
// const next = async (direction: ScrollDirection) => {
|
||||
// console.log("next", direction);
|
||||
// try {
|
||||
// setIsLoading(true);
|
||||
// const newData = await loadMore();
|
||||
|
||||
// const d = direction === "up" ? [...newData, ...data] : [];
|
||||
// setData(d);
|
||||
// } finally {
|
||||
// setIsLoading(false);
|
||||
// }
|
||||
// };
|
||||
|
||||
// const ref = useInfiniteScroll({
|
||||
// next,
|
||||
// rowCount: data.length,
|
||||
// hasMore: { up: true },
|
||||
// });
|
||||
|
||||
const fetchMoreData = () => {
|
||||
setTimeout(() => {
|
||||
setList(list.concat(Array.from({ length: 20 })));
|
||||
}, 100);
|
||||
};
|
||||
|
||||
const style = {
|
||||
height: 30,
|
||||
border: "1px solid green",
|
||||
margin: 6,
|
||||
padding: 8,
|
||||
};
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<Box>
|
||||
<Box
|
||||
style={{
|
||||
zIndex: 99,
|
||||
}}
|
||||
w={"100%"}
|
||||
bg={"green"}
|
||||
pos={"sticky"}
|
||||
top={0}
|
||||
h={"10vh"}
|
||||
>
|
||||
header
|
||||
</Box>
|
||||
|
||||
<Box bg={"red"} pos={"static"} >
|
||||
<Stack>
|
||||
{Array.from(new Array(15)).map((v, k) => (
|
||||
<Title key={k}>Cek halaman {k+1}</Title>
|
||||
<>
|
||||
<div id="scrollableDiv" style={{ height: "100vh", overflow: "auto" }}>
|
||||
<InfiniteScroll
|
||||
dataLength={list.length}
|
||||
next={fetchMoreData}
|
||||
hasMore={true}
|
||||
loader={
|
||||
<center>
|
||||
<h4>Loading...</h4>
|
||||
</center>
|
||||
}
|
||||
scrollableTarget="scrollableDiv"
|
||||
>
|
||||
{list.map((i, index) => (
|
||||
<div style={style} key={index}>
|
||||
div - #{index}
|
||||
</div>
|
||||
))}
|
||||
<Box style={{
|
||||
height: "10vh"
|
||||
}}>
|
||||
</InfiniteScroll>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
|
||||
</Box>
|
||||
</Stack>
|
||||
</Box>
|
||||
return (
|
||||
<Center>
|
||||
<div>
|
||||
<Center>{isLoading && <Loader />}</Center>
|
||||
|
||||
|
||||
<Text
|
||||
style={{
|
||||
zIndex: 98,
|
||||
}}
|
||||
w={"100%"}
|
||||
bg={"blue"}
|
||||
pos={"fixed"}
|
||||
bottom={0}
|
||||
h={"10vh"}
|
||||
>
|
||||
footer
|
||||
</Text>
|
||||
</Box>
|
||||
<div
|
||||
// ref={ref as any}
|
||||
className="List"
|
||||
style={{
|
||||
height: 500,
|
||||
overflowY: "auto",
|
||||
}}
|
||||
>
|
||||
{data.map((key: any) => (
|
||||
<div className="Row" key={key}>
|
||||
{key}
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</Center>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,51 +1,9 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
Box,
|
||||
Center,
|
||||
Group,
|
||||
LoadingOverlay,
|
||||
Paper,
|
||||
Skeleton,
|
||||
Text,
|
||||
} from "@mantine/core";
|
||||
|
||||
export default function ComponentCobaCoba_LoadingPage() {
|
||||
const listhHuruf = [
|
||||
{
|
||||
huruf: "H",
|
||||
},
|
||||
{
|
||||
huruf: "I",
|
||||
},
|
||||
{
|
||||
huruf: "P",
|
||||
},
|
||||
{
|
||||
huruf: "M",
|
||||
},
|
||||
{
|
||||
huruf: "I",
|
||||
},
|
||||
];
|
||||
const customLOader = (
|
||||
<Center h={"100vh"}>
|
||||
<Group>
|
||||
{listhHuruf.map((e, i) => (
|
||||
<Center key={i} h={"100%"}>
|
||||
<Skeleton height={50} circle radius={"100%"} />
|
||||
<Text sx={{ position: "absolute" }} c={"gray.4"} fw={"bold"}>
|
||||
{e.huruf}
|
||||
</Text>
|
||||
</Center>
|
||||
))}
|
||||
</Group>
|
||||
</Center>
|
||||
);
|
||||
import Coba_TestLoading from "@/app_modules/zCoba";
|
||||
|
||||
export default async function Page() {
|
||||
return (
|
||||
<>
|
||||
<LoadingOverlay visible overlayBlur={2} loader={customLOader} />
|
||||
<Coba_TestLoading />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
68
src/app_modules/admin/colab/component/detail_data.tsx
Normal file
@@ -0,0 +1,68 @@
|
||||
import { MODEL_COLLABORATION } from "@/app_modules/colab/model/interface";
|
||||
import { Stack, Box, Center, Title, Grid, Text } from "@mantine/core";
|
||||
|
||||
export default function ComponentAdminColab_DetailData({
|
||||
data,
|
||||
}: {
|
||||
data: MODEL_COLLABORATION;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<Box>
|
||||
<Center px={"md"} mb={"lg"}>
|
||||
<Title order={4}>{data?.title ? data.title : "Judul Proyek"}</Title>
|
||||
</Center>
|
||||
<Stack spacing={"sm"}>
|
||||
<Grid>
|
||||
<Grid.Col span={2}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Industri
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>
|
||||
<Text fz={"sm"}>:</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text fz={"sm"}>
|
||||
{data?.ProjectCollaborationMaster_Industri.name
|
||||
? data.ProjectCollaborationMaster_Industri.name
|
||||
: "Industri"}
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Grid>
|
||||
<Grid.Col span={2}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Lokasi
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={1}>
|
||||
<Text fz={"sm"}>:</Text>
|
||||
</Grid.Col>
|
||||
<Grid.Col span={"auto"}>
|
||||
<Text fz={"sm"} lineClamp={1}>
|
||||
{data?.lokasi ? data.lokasi : " Lokasi dari proyek"}
|
||||
</Text>
|
||||
</Grid.Col>
|
||||
</Grid>
|
||||
|
||||
<Stack spacing={5}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Tujuan proyek
|
||||
</Text>
|
||||
<Text fz={"sm"}>{data?.purpose ? data?.purpose : "-"}</Text>
|
||||
</Stack>
|
||||
<Stack spacing={5}>
|
||||
<Text fw={"bold"} fz={"sm"}>
|
||||
Keuntungan
|
||||
</Text>
|
||||
<Text fz={"sm"}>{data?.benefit ? data?.benefit : "-"}</Text>
|
||||
</Stack>
|
||||
</Stack>
|
||||
</Box>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
72
src/app_modules/admin/colab/dashboard/index.tsx
Normal file
@@ -0,0 +1,72 @@
|
||||
"use client";
|
||||
|
||||
import { Stack, SimpleGrid, Paper, Group, Title, Text } from "@mantine/core";
|
||||
import { useRouter } from "next/navigation";
|
||||
import ComponentAdminGlobal_HeaderTamplate from "../../component/header_tamplate";
|
||||
|
||||
export default function AdminColab_Dashboard({
|
||||
countPublish,
|
||||
countRoom,
|
||||
countReject,
|
||||
}: {
|
||||
countPublish: number;
|
||||
countRoom: number;
|
||||
countReject: number;
|
||||
}) {
|
||||
const router = useRouter();
|
||||
|
||||
const listStatus = [
|
||||
{
|
||||
id: 1,
|
||||
name: "Publish",
|
||||
jumlah: countPublish,
|
||||
color: "green",
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
name: "Group Chat",
|
||||
jumlah: countRoom,
|
||||
color: "orange",
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
name: "Reject",
|
||||
jumlah: countReject,
|
||||
color: "red",
|
||||
},
|
||||
];
|
||||
return (
|
||||
<>
|
||||
<Stack>
|
||||
<ComponentAdminGlobal_HeaderTamplate name="Project Collaboration" />
|
||||
<SimpleGrid
|
||||
cols={4}
|
||||
spacing="lg"
|
||||
breakpoints={[
|
||||
{ maxWidth: "62rem", cols: 4, spacing: "lg" },
|
||||
{ maxWidth: "48rem", cols: 2, spacing: "sm" },
|
||||
{ maxWidth: "36rem", cols: 1, spacing: "sm" },
|
||||
]}
|
||||
>
|
||||
{listStatus.map((e, i) => (
|
||||
<Paper
|
||||
key={i}
|
||||
bg={"gray.2"}
|
||||
shadow="md"
|
||||
radius="md"
|
||||
p="md"
|
||||
// sx={{ borderColor: e.color, borderStyle: "solid" }}
|
||||
>
|
||||
<Group position="center">
|
||||
<Stack align="center" spacing={0}>
|
||||
<Text>{e.name}</Text>
|
||||
<Title>{e.jumlah ? e.jumlah : 0}</Title>
|
||||
</Stack>
|
||||
</Group>
|
||||
</Paper>
|
||||
))}
|
||||
</SimpleGrid>
|
||||
</Stack>
|
||||
</>
|
||||
);
|
||||
}
|
||||
13
src/app_modules/admin/colab/fun/count/count_group_chat.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export default async function adminColab_countGroupChat() {
|
||||
const count = await prisma.projectCollaboration_RoomChat.count({
|
||||
where: {
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||
13
src/app_modules/admin/colab/fun/count/count_publish.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export default async function adminColab_countIsPublish() {
|
||||
const count = await prisma.projectCollaboration.count({
|
||||
where: {
|
||||
isActive: true,
|
||||
},
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||
13
src/app_modules/admin/colab/fun/count/count_reject.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
"use server";
|
||||
|
||||
import prisma from "@/app/lib/prisma";
|
||||
|
||||
export default async function adminColab_countIsReject() {
|
||||
const count = await prisma.projectCollaboration.count({
|
||||
where: {
|
||||
isReject: true,
|
||||
},
|
||||
});
|
||||
|
||||
return count;
|
||||
}
|
||||