implemented file upload for attachments
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
cache: 'no-store'
|
||||
|
||||
import { tryFetchPosts } from "@/app/api/post/route";
|
||||
import { Post } from "@/model/Post";
|
||||
@@ -5,8 +6,8 @@ import { constructAPIUrl } from "@/util/Utils";
|
||||
import { ReactNode, useEffect } from "react";
|
||||
import TableGen from "../../../client/TableGen";
|
||||
import PostTable from "@/components/client/admin/PostTable";
|
||||
import { deletePost, getPosts, updatePost } from "@/app/lib/postActions";
|
||||
import { getProjects } from "@/app/lib/projectActions";
|
||||
import { deletePost, getPosts, updatePost } from "@/app/lib/actions/entityManagement/postActions";
|
||||
import { getProjects } from "@/app/lib/actions/entityManagement/projectActions";
|
||||
import { Project } from "@/model/Project";
|
||||
|
||||
type Props = {
|
||||
@@ -33,6 +34,7 @@ export default async function PostView(props:Props){
|
||||
};
|
||||
const posts:Post[] = await Post.findAll().then(posts=>posts.map((e)=>JSON.parse(JSON.stringify(e))));
|
||||
const projects = await Project.findAll().then(projects=>projects.map((e)=>JSON.parse(JSON.stringify(e))));
|
||||
|
||||
return (
|
||||
<div className="w-[100%] min-h-fit bg-gray-100 overflow-scroll">
|
||||
<span className="flex flex-row flex-grow w-[100%] pl-2 pr-2"><h1 className="p-2 inline-block">Post Management</h1><section className="flex-grow"></section><button className='btn btn-success h-12 mt-auto mb-auto self-end'>New</button></span>
|
||||
|
||||
Reference in New Issue
Block a user