Skip to content

Commit

Permalink
feat: add tentative accept form
Browse files Browse the repository at this point in the history
  • Loading branch information
rschlaefli committed Dec 20, 2022
1 parent 5ceecf1 commit a48b0a0
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,23 @@ function AcceptProposalForm({ proposalName, proposalId, supervisorEmail }) {
)
}

function TentativeAcceptProposalForm({
proposalName,
proposalId,
supervisorEmail,
}) {
return (
<EasyFormsEmbed
formId={152}
defaultValues={{
text_1: proposalName,
hidden_3: proposalId,
hidden_1: supervisorEmail,
}}
/>
)
}

function RejectProposalForm({ proposalName, proposalId, supervisorEmail }) {
return (
<EasyFormsEmbed
Expand Down Expand Up @@ -523,6 +540,11 @@ function Index() {
<Tabs defaultValue="accept">
<Tabs.TabList className={{ root: 'flex flex-row border' }}>
<Tabs.Tab key="accept" value="accept" label="Accept" />
<Tabs.Tab
key="acceptTentative"
value="acceptTentative"
label="Accept (Tentative)"
/>
<Tabs.Tab key="reject" value="reject" label="Reject" />
<Tabs.Tab key="decline" value="decline" label="Decline" />
</Tabs.TabList>
Expand All @@ -538,6 +560,18 @@ function Index() {
supervisorEmail={session?.user?.email}
/>
</Tabs.TabContent>
<Tabs.TabContent
key="acceptTentative"
value="acceptTentative"
className={{ root: 'border border-t-0 rounded-none' }}
>
<TentativeAcceptProposalForm
key={proposalDetails.id}
proposalName={proposalDetails.title}
proposalId={proposalDetails.id}
supervisorEmail={session?.user?.email}
/>
</Tabs.TabContent>
<Tabs.TabContent
key="decline"
value="decline"
Expand Down

0 comments on commit a48b0a0

Please sign in to comment.