From ae759de1642638b1b13bcc6e431327e69e214b4b Mon Sep 17 00:00:00 2001 From: andrzej Date: Wed, 26 Jun 2024 19:55:18 +0200 Subject: [PATCH] implement basic create submission popover functionality --- prisma/dev.db | Bin 69632 -> 69632 bytes src/app/lib/create.ts | 10 ++++++++++ src/app/submission/create.tsx | 33 +++++++++++++++++++++++++++++++++ src/app/submission/page.tsx | 14 ++++++++++++-- src/app/ui/forms/sub.tsx | 9 ++++----- 5 files changed, 59 insertions(+), 7 deletions(-) create mode 100644 src/app/submission/create.tsx diff --git a/prisma/dev.db b/prisma/dev.db index 3c8070ab25e9c624d7478bb61e6fe85680a85b4f..1a131c9c5f518aa70e083aa9071d713a115d51be 100644 GIT binary patch delta 740 zcmZ`!O=uHA7~Sdq%#0>|Nj8oBZ?ZY)B@l9G^&(Wof;qHWZNZC8-J}g@V@w0;sihaa zn6`^V5N!{FP!H7v?L`o&AXKOpK?SP?D}`F6pm@#JyUjsRKK7aL-C24Vcnh?GIZo6{KO~Bu!i?o!BW-#pn_(V+3sAWwmVlfK?+kB+2kJplpP_piSZwKmv+!-79 e{xcUZKl74~T_=Z&u1vh_uO;oov(U%L9Q_NR%&tfP delta 376 zcmXwxJxBs!0EX}D4(#D2h#~;Map`j^_k8lXd zEx4thqgtYdped@Uu^>wji=t?#hC0J|mlvLgCzaz0Mm^#KHK2*y|QuPM2GBQcwDf1#*> & { stories: Story[], pubs: Pub[], responses: Response[] }) { + + return ( + + + + + + + New story + Create an entry for a new story i.e. a thing you intend to submit for publication. + + + + + + + + + ) +} diff --git a/src/app/submission/page.tsx b/src/app/submission/page.tsx index 5d7ccb1..09896d6 100644 --- a/src/app/submission/page.tsx +++ b/src/app/submission/page.tsx @@ -1,7 +1,8 @@ -import { getSubsComplete } from "app/lib/get" +import { getGenres, getPubs, getResponses, getStories, getSubsComplete } from "app/lib/get" import { DataTable } from "app/ui/tables/data-table" import { columns } from "./columns" import { Pub, Response, Story, Sub } from "@prisma/client" +import CreateSubmissionDialog from "./create" export type SubComplete = Sub & { pub: Pub, @@ -10,9 +11,18 @@ export type SubComplete = Sub & { } export default async function Page() { const subs: Array = await getSubsComplete() + const stories = await getStories() + const pubs = await getPubs() + const responses = await getResponses() return (
- + + +
) } diff --git a/src/app/ui/forms/sub.tsx b/src/app/ui/forms/sub.tsx index 52a6496..ac46fec 100644 --- a/src/app/ui/forms/sub.tsx +++ b/src/app/ui/forms/sub.tsx @@ -123,7 +123,7 @@ export default function SubmissionForm({ stories, pubs, responses, createSub }) return (
- + ( Date of submission - + )