Create Proyek Kolaborasi
# feat - Create proyek - Edit proyek - User lain join proyek - Buat gruo diskusi ## No issue
This commit is contained in:
@@ -1,11 +1,18 @@
|
||||
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 listAnggota = await colab_getListAnggotaByRoomId(roomId);
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutColab_DetailGrupDiskusi>{children}</LayoutColab_DetailGrupDiskusi>
|
||||
|
||||
@@ -1,7 +1,15 @@
|
||||
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";
|
||||
|
||||
export default async function Page() {
|
||||
return<>
|
||||
<Colab_DetailGrupDiskusi/>
|
||||
export default async function Page({ params }: { params: { id: string } }) {
|
||||
let roomId = params.id;
|
||||
const listMsg = await colab_getMessageByRoomId(roomId);
|
||||
const userLoginId = await user_getOneUserId()
|
||||
|
||||
return (
|
||||
<>
|
||||
<Colab_DetailGrupDiskusi roomId={roomId} listMsg={listMsg} userLoginId={userLoginId}/>
|
||||
</>
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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,15 @@ 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()
|
||||
console.log(authorId)
|
||||
console.log(userLoginId)
|
||||
|
||||
return (
|
||||
<>
|
||||
<LayoutColab_MainDetail colabId={colabId}>
|
||||
<LayoutColab_MainDetail colabId={colabId} isAuthor={authorId === userLoginId ? true : false}>
|
||||
{children}
|
||||
</LayoutColab_MainDetail>
|
||||
</>
|
||||
|
||||
@@ -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_getListPartisipanById(colabId);
|
||||
const cekPartisipan = await colab_funCekPartisipasiById(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>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -3,14 +3,13 @@ import colab_getListPartisipanById from "@/app_modules/colab/fun/get/get_list_pa
|
||||
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 colabId = params.id;
|
||||
const dataColab = await colab_getOneCollaborationById(colabId);
|
||||
const listPartisipan = await colab_getListPartisipanById(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,10 +1,10 @@
|
||||
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_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 listProyekSaya = (await colab_getListAllProyekSayaByAuthorId()).data;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Reference in New Issue
Block a user