Skip to content

Commit

Permalink
Merge pull request #2 from Shivd131/master
Browse files Browse the repository at this point in the history
add submissions waale pages
  • Loading branch information
Abh1noob committed Mar 7, 2024
2 parents ddd9fd2 + d11416c commit 1c7b42e
Show file tree
Hide file tree
Showing 9 changed files with 584 additions and 0 deletions.
158 changes: 158 additions & 0 deletions devsoc24-portal-fe/src/app/edit-idea/edit-idea-form.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
import { Formik, Form, Field, ErrorMessage } from 'formik';
import { Label } from "@/components/ui/label"
import { Input } from '@/components/ui/input';
import { Textarea } from "@/components/ui/textarea"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
import { Button } from "@/components/ui/button"

interface FormValues {
projectName: string;
projectTrack: string;
description: string;
figmaLink: string;
githubLink: string;
otherLinks: string;
}

import send from "@/assets/images/Send.svg"
import Image from 'next/image';
const tracks = ['Track 1', 'Track 2', 'Track 3'];


export default function EditIdeaForm() {
const initialValues: FormValues = {
projectName: '',
projectTrack: '',
description: '',
figmaLink: '',
githubLink: '',
otherLinks: ''
};
const onSubmit = (values: FormValues, { setSubmitting }: { setSubmitting: (isSubmitting: boolean) => void }) => {
setSubmitting(false);
};

return (

<Formik initialValues={initialValues} onSubmit={onSubmit}>
{({ isSubmitting }) => (
<Form className=''>
<div className='flex justify-start gap-16 max-[931px]:gap-6 max-[931px]:flex-col'>
<div className='w-96 max-[445px]:w-[87vw] flex flex-col gap-6'>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="project-name" className='text-[#0019FF]'>Project Name<span className='text-[#FF0000]'>*</span></Label>
<Input
type="text"
id="project-name"
placeholder="Shuttle tracker"
className=''
style={{ backgroundColor: 'white', height: '60px' }}

/>
</div>
<ErrorMessage name="projectName" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="project-track" className='text-[#0019FF] '>Project Track<span className='text-[#FF0000]'>*</span></Label>

<Select>
<SelectTrigger style={{ backgroundColor: 'white', height: '60px' }}
id="project-track" className="">
<SelectValue placeholder="Open Innovation" />
</SelectTrigger>
<SelectContent>
{tracks.map((track) => (
<SelectItem key={track} value={track}>
{track}
</SelectItem>
))}
</SelectContent>
</Select>
</div>

<ErrorMessage name="projectTrack" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="description" className='text-[#0019FF]'>Description of Project<span className='text-[#FF0000]'>*</span></Label>

<Textarea
id='description'
placeholder="Don't forget to include your inspiration, learnings, project construction method, and difficulties you encountered in your writing. "
className="col-span-12 md:col-span-6 mb-6 md:mb-0 min-h-40 max-h-72 text-black"

/>
</div>

<p className='text-right pr-2'>500 max words</p>
<ErrorMessage name="description" component="div" />
</div>
</div>
<div className='w-96 max-[445px]:w-[87vw] flex flex-col gap-6'>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="figmaLink" className='text-[#0019FF]'>Figma Link</Label>
<Input
type="text"
id="figmaLink"
placeholder="Figma link"
className=''
style={{ backgroundColor: 'white', height: '60px' }}

/>
</div>

<ErrorMessage name="figmaLink" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="githubLink" className='text-[#0019FF]'>GitHub Link</Label>
<Input
type="text"
id="githubLink"
placeholder="Github link"
className='h-10'
style={{ backgroundColor: 'white', height: '60px' }}

/>
</div>

<ErrorMessage name="githubLink" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="otherLinks" className='text-[#0019FF]'>Other Links</Label>

<Textarea
id='otherLinks'
placeholder='Other links'
className="col-span-12 md:col-span-6 mb-6 md:mb-0 min-h-10"
style={{ color: 'background', height: '60px' }}
/>
</div>

<p>Canva PPTs, Videos, Drive or Supporting Material can be shared</p>
<ErrorMessage name="otherLinks" component="div" />
</div>
</div>

</div>



<Button className='bg-[#0019FF] my-5' type="submit" disabled={isSubmitting }>
<Image src={send as HTMLImageElement} alt='b'/><span className='pl-2'></span> Confirm Edit
</Button>
</Form>
)}
</Formik>
)
}
27 changes: 27 additions & 0 deletions devsoc24-portal-fe/src/app/edit-idea/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"use client"

import Image from "next/image";
import Logo from "@/components/logo";
import Dashtitle from "@/assets/images/titleDashboard.svg";
import active from "@/assets/images/active.svg"
import EditIdeaForm from "./edit-idea-form";

export default function Page() {
return (
<main className="flex min-[931px]:min-h-screen flex-col min-[931px]:h-[100vh] h-[200%] items-start bg-[#F4F5FA] overflow-x-hidden">
<div className="flex h-[10%] w-full items-center gap-x-8 bg-background px-3 py-2">
<Logo className="h-9/10 w-auto" />
<Image src={Dashtitle as HTMLImageElement} alt="title" />
</div>
<div className="flex h-[100vh] w-[4.7rem] max-[445px]:w-[3.7rem] items-start justify-center gap-x-8 bg-background px-6 py-2 pt-12">
<Image src={active as HTMLImageElement} alt="title" className="scale-150 max-[445px]:scale-[3.5]" />
</div>
<div className="mt-[11vh] ml-[4.7rem] max-[445px]:ml-[3.7rem] absolute pt-5 pl-5 bg-[#F4F5FA] w-[91.9vw] flex flex-col max-[931px]:justify-center ">
<p className="text-black text-4xl font-medium mb-4">Edit Your Idea For Devsoc24</p>
<EditIdeaForm />
</div>


</main>
)
}
27 changes: 27 additions & 0 deletions devsoc24-portal-fe/src/app/submit-idea/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"use client"

import Image from "next/image";
import Logo from "@/components/logo";
import Dashtitle from "@/assets/images/titleDashboard.svg";
import active from "@/assets/images/active.svg"
import SubmitIdeaForm from "./submit-idea-form";

export default function Page() {
return (
<main className="flex min-[931px]:min-h-screen flex-col min-[931px]:h-[100vh] h-[200%] items-start bg-[#F4F5FA] overflow-x-hidden">
<div className="flex h-[10%] w-full items-center gap-x-8 bg-background px-3 py-2">
<Logo className="h-9/10 w-auto" />
<Image src={Dashtitle as HTMLImageElement} alt="title" />
</div>
<div className="flex h-[100vh] w-[4.7rem] max-[445px]:w-[3.7rem] items-start justify-center gap-x-8 bg-background px-6 py-2 pt-12">
<Image src={active as HTMLImageElement} alt="title" className="scale-150 max-[445px]:scale-[3.5]" />
</div>
<div className="mt-[11vh] ml-[4.7rem] max-[445px]:ml-[3.7rem] absolute pt-5 pl-5 bg-[#F4F5FA] w-[91.9vw] flex flex-col max-[931px]:justify-center ">
<p className="text-black text-4xl font-medium mb-4">Submit An Idea For Devsoc24</p>
<SubmitIdeaForm />
</div>


</main>
)
}
158 changes: 158 additions & 0 deletions devsoc24-portal-fe/src/app/submit-idea/submit-idea-form.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
import { Formik, Form, Field, ErrorMessage } from 'formik';
import { Label } from "@/components/ui/label"
import { Input } from '@/components/ui/input';
import { Textarea } from "@/components/ui/textarea"
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select"
import { Button } from "@/components/ui/button"

interface FormValues {
projectName: string;
projectTrack: string;
description: string;
figmaLink: string;
githubLink: string;
otherLinks: string;
}

import send from "@/assets/images/Send.svg"
import Image from 'next/image';
const tracks = ['Track 1', 'Track 2', 'Track 3'];


export default function SubmitIdeaForm() {
const initialValues: FormValues = {
projectName: '',
projectTrack: '',
description: '',
figmaLink: '',
githubLink: '',
otherLinks: ''
};
const onSubmit = (values: FormValues, { setSubmitting }: { setSubmitting: (isSubmitting: boolean) => void }) => {
setSubmitting(false);
};

return (

<Formik initialValues={initialValues} onSubmit={onSubmit}>
{({ isSubmitting }) => (
<Form className=''>
<div className='flex justify-start gap-16 max-[931px]:gap-6 max-[931px]:flex-col'>
<div className='w-96 max-[445px]:w-[87vw] flex flex-col gap-6'>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="project-name" className='text-[#0019FF]'>Project Name<span className='text-[#FF0000]'>*</span></Label>
<Input
type="text"
id="project-name"
placeholder="Shuttle tracker"
className=''
style={{ backgroundColor: 'white', height: '60px' }}

/>
</div>
<ErrorMessage name="projectName" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="project-track" className='text-[#0019FF] '>Project Track<span className='text-[#FF0000]'>*</span></Label>

<Select>
<SelectTrigger style={{ backgroundColor: 'white', height: '60px' }}
id="project-track" className="">
<SelectValue placeholder="Open Innovation" />
</SelectTrigger>
<SelectContent>
{tracks.map((track) => (
<SelectItem key={track} value={track}>
{track}
</SelectItem>
))}
</SelectContent>
</Select>
</div>

<ErrorMessage name="projectTrack" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="description" className='text-[#0019FF]'>Description of Project<span className='text-[#FF0000]'>*</span></Label>

<Textarea
id='description'
placeholder="Don't forget to include your inspiration, learnings, project construction method, and difficulties you encountered in your writing. "
className="col-span-12 md:col-span-6 mb-6 md:mb-0 min-h-40 max-h-72 text-black"

/>
</div>

<p className='text-right pr-2'>500 max words</p>
<ErrorMessage name="description" component="div" />
</div>
</div>
<div className='w-96 max-[445px]:w-[87vw] flex flex-col gap-6'>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="figmaLink" className='text-[#0019FF]'>Figma Link</Label>
<Input
type="text"
id="figmaLink"
placeholder="Figma link"
className=''
style={{ backgroundColor: 'white', height: '60px' }}

/>
</div>

<ErrorMessage name="figmaLink" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="githubLink" className='text-[#0019FF]'>GitHub Link</Label>
<Input
type="text"
id="githubLink"
placeholder="Github link"
className='h-10'
style={{ backgroundColor: 'white', height: '60px' }}

/>
</div>

<ErrorMessage name="githubLink" component="div" />
</div>
<div>
<div className="grid w-full max-w-sm items-center gap-4">
<Label htmlFor="otherLinks" className='text-[#0019FF]'>Other Links</Label>

<Textarea
id='otherLinks'
placeholder='Other links'
className="col-span-12 md:col-span-6 mb-6 md:mb-0 min-h-10"
style={{ color: 'background', height: '60px' }}
/>
</div>

<p>Canva PPTs, Videos, Drive or Supporting Material can be shared</p>
<ErrorMessage name="otherLinks" component="div" />
</div>
</div>

</div>



<Button className='bg-[#0019FF] my-5' type="submit" disabled={isSubmitting }>
<Image src={send as HTMLImageElement} alt='b'/><span className='pl-2'>Submit Idea</span>
</Button>
</Form>
)}
</Formik>
)
}
Loading

0 comments on commit 1c7b42e

Please sign in to comment.