-
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.
fix(#156): Have a user be able to apply in different cycles
- Loading branch information
Showing
43 changed files
with
1,710 additions
and
682 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -5,7 +5,5 @@ coverage | |
dist | ||
buildcoverage | ||
package-lock.json | ||
yarn.lock | ||
.DS_Store | ||
build/ | ||
yarn.lock | ||
build/ |
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
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 |
---|---|---|
|
@@ -10,6 +10,5 @@ | |
</head> | ||
<body> | ||
<div id="root"></div> | ||
|
||
</body> | ||
</html> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 React from 'react'; | ||
|
||
interface FormData { | ||
gender: string; | ||
birth_date: string; | ||
address: string; | ||
phone: string; | ||
study: string; | ||
education_level: string; | ||
currentEducationLevel: string; | ||
nationality: string; | ||
province: string; | ||
district: string; | ||
sector: string; | ||
discipline: string; | ||
isEmployed: string; | ||
haveLaptop: string; | ||
isStudent: string; | ||
applicationPost: string; | ||
andelaPrograms: string; | ||
understandTraining: string; | ||
otherApplication: string; | ||
otherPrograms: string; | ||
} | ||
|
||
interface EducationSectionProps { | ||
formData: FormData; | ||
handleInputChange: (e: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>) => void; | ||
isDarkMode: boolean; | ||
} | ||
|
||
const EducationSection: React.FC<EducationSectionProps> = ({ formData, handleInputChange, isDarkMode }) => { | ||
return ( | ||
<> | ||
<div className='space-y-3'> | ||
<label htmlFor="education_level" className={isDarkMode ? 'text-white' : 'text-gray-800'}>What's your highest level of education?</label> | ||
{['Secondary school', 'Bachelor\'s Degree', 'Master\'s Degree', 'PhD'].map((level) => ( | ||
<div key={level}> | ||
<input | ||
type="radio" | ||
name="education_level" | ||
value={level.toLowerCase()} | ||
checked={formData.education_level === level.toLowerCase()} | ||
onChange={handleInputChange} | ||
/> {level} | ||
</div> | ||
))} | ||
</div> | ||
|
||
<div className='flex flex-col w-52 space-y-3'> | ||
<label htmlFor="Gender" className={isDarkMode ? 'text-white' : 'text-gray-800'}>What's your current education level?</label> | ||
<select | ||
name="currentEducationLevel" | ||
value={formData.currentEducationLevel} | ||
onChange={handleInputChange} | ||
className={`rounded-md py-2 px-2 w-full ${ | ||
isDarkMode ? ' bg-[#56C870] text-black':'bg-blue-500 text-white' | ||
}`} | ||
> | ||
<option value="">Education level</option> | ||
<option value="highschool">Highschool</option> | ||
<option value="university">University</option> | ||
<option value="masters">Masters</option> | ||
<option value="phd">PhD candidate</option> | ||
</select> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default EducationSection; |
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,149 @@ | ||
import React from 'react'; | ||
import InputField from './form/InputField'; | ||
|
||
interface FormData { | ||
gender: string; | ||
birth_date: string; | ||
address: string; | ||
phone: string; | ||
study: string; | ||
education_level: string; | ||
currentEducationLevel: string; | ||
nationality: string; | ||
province: string; | ||
district: string; | ||
sector: string; | ||
discipline: string; | ||
isEmployed: string; | ||
haveLaptop: string; | ||
isStudent: string; | ||
applicationPost: string; | ||
andelaPrograms: string; | ||
understandTraining: string; | ||
otherApplication: string; | ||
otherPrograms: string; | ||
} | ||
|
||
export interface Country { | ||
name: string; | ||
code: string; | ||
phone: string; | ||
suffix: string; | ||
} | ||
|
||
interface LocationSectionProps { | ||
formData: FormData; | ||
handleInputChange: (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void; | ||
selectedCountry: string; | ||
handleCountryChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
filteredCountries: Country[]; | ||
isDarkMode: boolean; | ||
} | ||
|
||
const LocationSection: React.FC<LocationSectionProps> = ({ | ||
formData, | ||
handleInputChange, | ||
selectedCountry, | ||
handleCountryChange, | ||
filteredCountries, | ||
isDarkMode | ||
}) => { | ||
const inputClassName = `w-52 md:w-2/3 rounded-md px-2 py-2 border ${ | ||
isDarkMode | ||
? 'border-white placeholder:text-gray-400 text-white bg-[#1F2A37]' | ||
: 'border-gray-300 placeholder:text-gray-500 text-gray-900 bg-white' | ||
} sm:text-[12px] outline-none`; | ||
|
||
return ( | ||
<> | ||
<InputField | ||
name="nationality" | ||
placeholder="Nationality" | ||
label='Nationality' | ||
list="countries" | ||
value={selectedCountry} | ||
onChange={handleCountryChange} | ||
className={inputClassName} | ||
/> | ||
<datalist id="countries"> | ||
{filteredCountries.map((country) => ( | ||
<option key={country.code} value={country.name} /> | ||
))} | ||
</datalist> | ||
|
||
<InputField | ||
name="province" | ||
placeholder="Province" | ||
label='Province' | ||
type="text" | ||
value={formData.province} | ||
onChange={handleInputChange} | ||
className={inputClassName} | ||
/> | ||
|
||
<InputField | ||
name="district" | ||
placeholder="District" | ||
label='District' | ||
type="text" | ||
value={formData.district} | ||
onChange={handleInputChange} | ||
className={inputClassName} | ||
/> | ||
|
||
<InputField | ||
name="sector" | ||
placeholder="Sector" | ||
label='Sector' | ||
type="text" | ||
value={formData.sector} | ||
onChange={handleInputChange} | ||
className={inputClassName} | ||
/> | ||
|
||
<InputField | ||
name="birth_date" | ||
placeholder="Date of birth" | ||
label='Choose date' | ||
type="date" | ||
value={formData.birth_date} | ||
onChange={handleInputChange} | ||
className={inputClassName} | ||
/> | ||
|
||
<div className='space-y-3'> | ||
<label htmlFor="Gender" className={isDarkMode ? 'text-white' : 'text-gray-800'}>Gender</label> | ||
<div> | ||
<input | ||
type="radio" | ||
name="gender" | ||
value="male" | ||
checked={formData.gender === "male"} | ||
onChange={handleInputChange} | ||
/> Male | ||
</div> | ||
<div> | ||
<input | ||
type="radio" | ||
name="gender" | ||
value="female" | ||
checked={formData.gender === "female"} | ||
onChange={handleInputChange} | ||
/> Female | ||
</div> | ||
</div> | ||
|
||
<div className='flex flex-col w-52 space-y-3'> | ||
<label htmlFor="discipline" className={isDarkMode ? 'text-white' : 'text-gray-800'}>What's your discipline?(if applicable)</label> | ||
<textarea | ||
name="discipline" | ||
value={formData.discipline} | ||
onChange={handleInputChange} | ||
className={`py-5 rounded-md ${isDarkMode ? 'bg-dark-bg text-white border border-white' : 'border border-gray-500 bg-white text-gray-900'}`} | ||
></textarea> | ||
</div> | ||
</> | ||
); | ||
}; | ||
|
||
export default LocationSection; |
Oops, something went wrong.