From 0469b48bcb459e82d9ba4f5f18f604fde4182d81 Mon Sep 17 00:00:00 2001 From: suvodip ghosh Date: Mon, 8 May 2023 16:20:44 +0530 Subject: [PATCH] update-input --- src/pages/add-school-form.jsx | 214 ++++++++++++++++++---------------- src/pages/add-user-form.jsx | 125 ++++++++++++++++---- src/styles/Checkbox.css | 0 src/styles/globals.css | 16 ++- 4 files changed, 232 insertions(+), 123 deletions(-) create mode 100644 src/styles/Checkbox.css diff --git a/src/pages/add-school-form.jsx b/src/pages/add-school-form.jsx index 4196638..61ac629 100644 --- a/src/pages/add-school-form.jsx +++ b/src/pages/add-school-form.jsx @@ -13,7 +13,11 @@ export default function addSchoolForm() { anual: event.target.anual.value, toddlers: event.target.toddlers.value, early_start_programme: event.target.early_start_programme.value, - interakto: event.target.interakto.value, + interakto: event.target.interakto.value, + school_agreement: event.target.school_agreement, + // school_contact_number : event.target.school_contact_number, + // school_email_id : event.target.school_email_id, + } const JSONdata = JSON.stringify(data) const endpoint = 'https://management.beanstalkedu.com/items/school' @@ -26,108 +30,120 @@ export default function addSchoolForm() { } const response = await fetch(endpoint, options) - // const result = await response.json() - // alert(`Is this your full name: ${result.data}`) + const result = await response.json() + alert(`Is this your full name: ${result.data}`) } return (
-
- -
-
-
- school -

School Registration Form

+
+ +
+
+
+ school +

School Registration Form

+
+
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + +
+
+ + {/* */} +
+
-
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - -
-
- - {/* */} -
-
+
-
-
-
+ ) } \ No newline at end of file diff --git a/src/pages/add-user-form.jsx b/src/pages/add-user-form.jsx index c7d6f75..328cc7a 100644 --- a/src/pages/add-user-form.jsx +++ b/src/pages/add-user-form.jsx @@ -1,18 +1,22 @@ // https://management.beanstalkedu.com/items/school // import React from 'react'; import React, { useState, useEffect } from 'react'; -import Image from 'next/image' + import NavBar from '../components/NavBar' +import { type } from 'os'; +import { data } from 'autoprefixer'; // import { Inter } from 'next/font/google' export default function addUserForm (){ - const [school, setData] = useState(""); + const [school, setSchool] = useState(""); - useEffect(() => { - fetch('https://management.beanstalkedu.com/items/school') - .then( (response) => response.json() ) - .then( (data) => setData(data) ) - }, []); - console.log(school) + useEffect(() => { + fetch(`https://management.beanstalkedu.com/items/school`). + then(res => res.json()) + .then(data => { + setSchool(data.data[0]) + }) + }, []) +// console.log(school); const handleFormsubmit = async (event) => { event.preventDefault() const data = { @@ -49,27 +53,27 @@ export default function addUserForm (){
- - {/* {school.map(data=> - + )} */} +
-
+ {/*
+
*/} +
+ +
- - + +
@@ -81,9 +85,84 @@ export default function addUserForm (){
+
+ +
+
+   + +
+
+   + +
+
+   + +
+
+   + +
+ +
+
+ {/*
+ + +
*/}
- +
+
+   + +
+
+   + +
+
+   + +
+
+   + +
+
+   + +
+
+   + +
+
+   + +
+
+   + +
+
+   + +
+ +
+ {/* + */}
diff --git a/src/styles/Checkbox.css b/src/styles/Checkbox.css new file mode 100644 index 0000000..e69de29 diff --git a/src/styles/globals.css b/src/styles/globals.css index fdc226e..b1546ca 100644 --- a/src/styles/globals.css +++ b/src/styles/globals.css @@ -15,7 +15,21 @@ --background-end-rgb: 0, 0, 0; } } - +.check-box { + border:2px solid white; + box-shadow:0 0 0 2px #FE4501; + appearance:none; + width:15px; + height:15px; + background-color:#fff; + transition:all ease-in .2s; + cursor: pointer; +} +.check-box:checked{ + background-color:#FE4501; + transform: scale(1.2); + border-radius: 2px; +} /* body { color: rgb(var(--foreground-rgb)); background: linear-gradient(