generated from scaffold-eth/scaffold-eth-2
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add company and employee register forms
- Loading branch information
1 parent
592d3ff
commit c2c8605
Showing
3 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
78 changes: 78 additions & 0 deletions
78
packages/nextjs/components/web-3-crew/forms/RegisterCompanyForm.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import { FormEvent } from "react"; | ||
import BackButton from "../buttons/BackButton"; | ||
import { FormSteps } from "~~/pages/dapp"; | ||
|
||
interface props { | ||
updateFormState: (value: FormSteps) => void; | ||
} | ||
|
||
// interface FormData { | ||
// companyName: string; | ||
// companyType: string; | ||
// } | ||
|
||
const RegisterCompanyForm = ({ updateFormState }: props) => { | ||
// const [formData, setFormData] = useState<FormData>({ | ||
// companyName: "", | ||
// companyType: "", | ||
// }); | ||
|
||
function handleSubmit(e: FormEvent<HTMLFormElement>) { | ||
e.preventDefault(); | ||
} | ||
|
||
return ( | ||
<> | ||
<BackButton updateFormState={updateFormState} target="signup" /> | ||
<form onSubmit={handleSubmit} className="flex flex-col items-center justify-center pt-10 w-1/3"> | ||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Company Name</span> | ||
</label> | ||
<input type="text" placeholder="Google" className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Company Type</span> | ||
</label> | ||
<select className="select select-bordered w-full max-w-md rounded-lg"> | ||
{/* <option disabled selected> | ||
Select One | ||
</option> */} | ||
<option value={"corporation"}>Corporation</option> | ||
<option value={"partnership"}>Partnership</option> | ||
<option value={"other"}>Other</option> | ||
</select> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text"># of Employees</span> | ||
</label> | ||
<input type="number" placeholder="100" className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Admin Account</span> | ||
</label> | ||
<input type="text" placeholder="0x..." className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Company Fund Public Address</span> | ||
</label> | ||
<input type="text" placeholder="0x..." className="input input-bordered w-full rounded-md max-w-md" /> | ||
</div> | ||
|
||
<button type="submit" className="btn-block btn-square btn-primary rounded-lg mt-5 max-w-lg"> | ||
Create Company Account | ||
</button> | ||
</form> | ||
</> | ||
); | ||
}; | ||
|
||
export default RegisterCompanyForm; |
71 changes: 71 additions & 0 deletions
71
packages/nextjs/components/web-3-crew/forms/RegisterEmployeeForm.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import { FormEvent } from "react"; | ||
import BackButton from "../buttons/BackButton"; | ||
import { FormSteps } from "~~/pages/dapp"; | ||
|
||
interface props { | ||
updateFormState: (value: FormSteps) => void; | ||
} | ||
|
||
const RegisterEmployeeForm = ({ updateFormState }: props) => { | ||
function handleSubmit(e: FormEvent<HTMLFormElement>) { | ||
e.preventDefault(); | ||
} | ||
return ( | ||
<> | ||
<BackButton updateFormState={updateFormState} target="signup" /> | ||
<form onSubmit={handleSubmit} className="flex flex-col items-center justify-center pt-10 w-1/3"> | ||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">First Name</span> | ||
</label> | ||
<input type="text" placeholder="John" className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Last Name</span> | ||
</label> | ||
<input type="text" placeholder="Doe" className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Wallet Address</span> | ||
</label> | ||
<input type="text" placeholder="0x..." className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Employee ID</span> | ||
</label> | ||
<input type="text" placeholder="5001" className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
<div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Company Contract Address</span> | ||
</label> | ||
<input type="text" placeholder="0x..." className="input input-bordered w-full max-w-md rounded-lg" /> | ||
</div> | ||
|
||
{/* <div className="form-control w-full max-w-md"> | ||
<label className="label"> | ||
<span className="label-text">Frequency of Payment</span> | ||
</label> | ||
<select className="select select-bordered w-full max-w-md rounded-lg"> | ||
<option value={"weekly"}>Weekly</option> | ||
<option value={"bi-monthly"}>Bi-Monthly</option> | ||
<option value={"other"}>Other</option> | ||
</select> | ||
</div> */} | ||
|
||
<button type="submit" className="btn-block btn-square btn-primary rounded-lg mt-5 max-w-lg"> | ||
Create Employee Account | ||
</button> | ||
</form> | ||
</> | ||
); | ||
}; | ||
|
||
export default RegisterEmployeeForm; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters