From 1609b523b2164b78d8fe59a0514c3e61be097afd Mon Sep 17 00:00:00 2001 From: Madhur Gupta Date: Sat, 15 Oct 2022 09:52:23 +0530 Subject: [PATCH] Add base files --- .env | 3 + .eslintrc.json | 3 + .gitignore | 5 + .prettierignore | 3 + .prettierrc.json | 7 + README.md | 2 +- components/AuthHeader.tsx | 46 + components/CreateFormStatus.tsx | 58 + components/CreateJobStatus.tsx | 78 + components/CustomButton.tsx | 22 + components/CustomInput.tsx | 59 + components/Header.tsx | 76 + components/Layout.tsx | 133 + components/Login.tsx | 78 + components/SignUp.tsx | 97 + components/create-form/create-form-step-1.tsx | 82 + .../create-form/createFormStep2/CustomDoc.tsx | 69 + .../createFormStep2/DocCheckboxes.tsx | 99 + .../create-form/createFormStep2/index.tsx | 88 + components/create-form/formStore.js | 59 + components/dashboard/create-newform.tsx | 28 + components/dashboard/rightBottomModal.tsx | 33 + components/dashboard/top-cards.tsx | 27 + components/table.tsx | 326 + next-env.d.ts | 5 + next.config.js | 6 + package-lock.json | 7126 +++++++++++++++++ package.json | 33 + pages/_app.tsx | 14 + pages/auth.tsx | 38 + pages/create-form.tsx | 147 + pages/dashboard.tsx | 174 + pages/form-responses.tsx | 23 + pages/index.tsx | 18 + public/favicon.ico | Bin 0 -> 25931 bytes public/vercel.svg | 4 + services/AxiosInstance.js | 15 + styles/Components/CustomButton.module.css | 23 + styles/Components/CustomHeader.module.css | 58 + styles/Components/CustomInput.module.css | 29 + styles/Components/Layout.module.css | 43 + .../Components/create-form-status.module.css | 62 + styles/Components/create-newform.module.css | 57 + styles/Components/right-modal-dash.module.css | 43 + styles/Components/top-card.module.css | 14 + styles/Pages/create-form-step1.module.css | 18 + styles/Pages/create-form.module.css | 25 + styles/Pages/dashboard.module.css | 83 + styles/Pages/form-response.module.css | 26 + styles/globals.css | 47 + tsconfig.json | 27 + utils/form-response-column-type.ts | 36 + 52 files changed, 9674 insertions(+), 1 deletion(-) create mode 100644 .env create mode 100644 .eslintrc.json create mode 100644 .gitignore create mode 100644 .prettierignore create mode 100644 .prettierrc.json create mode 100644 components/AuthHeader.tsx create mode 100644 components/CreateFormStatus.tsx create mode 100644 components/CreateJobStatus.tsx create mode 100644 components/CustomButton.tsx create mode 100644 components/CustomInput.tsx create mode 100644 components/Header.tsx create mode 100644 components/Layout.tsx create mode 100644 components/Login.tsx create mode 100644 components/SignUp.tsx create mode 100644 components/create-form/create-form-step-1.tsx create mode 100644 components/create-form/createFormStep2/CustomDoc.tsx create mode 100644 components/create-form/createFormStep2/DocCheckboxes.tsx create mode 100644 components/create-form/createFormStep2/index.tsx create mode 100644 components/create-form/formStore.js create mode 100644 components/dashboard/create-newform.tsx create mode 100644 components/dashboard/rightBottomModal.tsx create mode 100644 components/dashboard/top-cards.tsx create mode 100644 components/table.tsx create mode 100644 next-env.d.ts create mode 100644 next.config.js create mode 100644 package-lock.json create mode 100644 package.json create mode 100644 pages/_app.tsx create mode 100644 pages/auth.tsx create mode 100644 pages/create-form.tsx create mode 100644 pages/dashboard.tsx create mode 100644 pages/form-responses.tsx create mode 100644 pages/index.tsx create mode 100644 public/favicon.ico create mode 100644 public/vercel.svg create mode 100644 services/AxiosInstance.js create mode 100644 styles/Components/CustomButton.module.css create mode 100644 styles/Components/CustomHeader.module.css create mode 100644 styles/Components/CustomInput.module.css create mode 100644 styles/Components/Layout.module.css create mode 100644 styles/Components/create-form-status.module.css create mode 100644 styles/Components/create-newform.module.css create mode 100644 styles/Components/right-modal-dash.module.css create mode 100644 styles/Components/top-card.module.css create mode 100644 styles/Pages/create-form-step1.module.css create mode 100644 styles/Pages/create-form.module.css create mode 100644 styles/Pages/dashboard.module.css create mode 100644 styles/Pages/form-response.module.css create mode 100644 styles/globals.css create mode 100644 tsconfig.json create mode 100644 utils/form-response-column-type.ts diff --git a/.env b/.env new file mode 100644 index 0000000..41e3d61 --- /dev/null +++ b/.env @@ -0,0 +1,3 @@ +CITY_API_KEY="" + +BACKEND_API_TOKEN="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNjc4Nzc5NDEzLCJpYXQiOjE2NjE0OTk0MTMsImp0aSI6IjdiM2E2NzYzNWIxYjRkYWZiMTljYTg1NmI3NGQ0MWI1IiwidXNlcl9pZCI6Mn0.dzHFep_buR6XWpNCkrOkGEuh7Ah1H3M0M1sfL85XogM" \ No newline at end of file diff --git a/.eslintrc.json b/.eslintrc.json new file mode 100644 index 0000000..50e51c5 --- /dev/null +++ b/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": ["next/core-web-vitals", "prettier"] +} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d4ae225 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +node_modules +.next +.swc +out +yarn.lock \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..1b07c39 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +# Ignore artifacts: +build +coverage \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..1d894d4 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,7 @@ +{ + "semi": false, + "trailingComma": "es5", + "singleQuote": true, + "tabWidth": 2, + "useTabs": true +} diff --git a/README.md b/README.md index 2854971..7675401 100644 --- a/README.md +++ b/README.md @@ -1 +1 @@ -# iYojna-admin-frontend \ No newline at end of file +# Shishya Frontend Admin diff --git a/components/AuthHeader.tsx b/components/AuthHeader.tsx new file mode 100644 index 0000000..7328329 --- /dev/null +++ b/components/AuthHeader.tsx @@ -0,0 +1,46 @@ +import { Typography, Layout } from 'antd' + +const { Title, Text } = Typography +const { Header } = Layout + +const AuthHeader = () => { + return ( +
+ + SHISHYA + + + One stop destination for students to track all their documents. + +
+ ) +} + +export default AuthHeader diff --git a/components/CreateFormStatus.tsx b/components/CreateFormStatus.tsx new file mode 100644 index 0000000..20a59f5 --- /dev/null +++ b/components/CreateFormStatus.tsx @@ -0,0 +1,58 @@ +import React from 'react' +import styles from '../styles/Components/create-form-status.module.css' + +type CreateFormStatusType = { + currentStep: number +} + +const CreateFormStatus = ({ currentStep }: CreateFormStatusType) => { + return ( +
+
+
+
+
+
+
+
+
+
+
+
+

+ Form Details +

+
+
+

+ Document Required +

+
+
+
+ ) +} + +export default CreateFormStatus diff --git a/components/CreateJobStatus.tsx b/components/CreateJobStatus.tsx new file mode 100644 index 0000000..397cab2 --- /dev/null +++ b/components/CreateJobStatus.tsx @@ -0,0 +1,78 @@ +import React from 'react' +import styles from '../styles/Components/create-form-status.module.css' + +type CreateJobStatusType = { + currentStep: number +} + +const CreateJobStatus = ({ currentStep }: CreateJobStatusType) => { + return ( +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ Job Details +

+
+
+

+ Eligibility of Students +

+
+
+

+ Document Required +

+
+
+
+ ) +} + +export default CreateJobStatus diff --git a/components/CustomButton.tsx b/components/CustomButton.tsx new file mode 100644 index 0000000..7f7703f --- /dev/null +++ b/components/CustomButton.tsx @@ -0,0 +1,22 @@ +import React from 'react' +import styles from '../styles/Components/CustomButton.module.css' + +interface IProps { + title: string + handleClick: () => void + style?: {} +} + +const CustomButton = ({ title, handleClick, style }: IProps) => { + return ( +
+
{title}
+
+ ) +} + +export default CustomButton diff --git a/components/CustomInput.tsx b/components/CustomInput.tsx new file mode 100644 index 0000000..d8dad85 --- /dev/null +++ b/components/CustomInput.tsx @@ -0,0 +1,59 @@ +import React from 'react' +import { DatePicker, Input, Select } from 'antd' +import styles from '../styles/Components/CustomInput.module.css' + +const { Option } = Select +const { TextArea } = Input + +interface IProps { + placeholder: string | undefined + type: string + data: any + label: string + onChange: any +} + +const CustomInput = ({ placeholder, type, data, label, onChange }: IProps) => { + return ( +
+ +
+ {type === 'text' ? ( + + ) : null} + {type === 'date' ? ( + + ) : null} + {type === 'drop-down' ? ( + + ) : null} + {type === 'textarea' ? ( +