Skip to content

Commit

Permalink
feat: ensuring input for profile modal and adding stlying (#506)
Browse files Browse the repository at this point in the history
* Feature/career base (#492)

* feat: init feature career

* chore: adding assets and types

* feat: changes in header imports

* feat: cleaning syllabus icons

* feat: adding routing

* feat: adding routing to hash router

* feat: career page header with job list and job detail page base (#488)

* Added Icon Folder

* Header Initilize

* feat: solving header issue

* fix: fixing header styling

* Add Job List and Job Card Element

* Job List and Job Card

* Job List and Job Card

* Page Detail

* Job Detail Page

* Job Page Detail

* feat: adding job description page

* chore: small updates

---------

Co-authored-by: KTheAsianimeBoi <minhkhoahc2002@gmail.com>

* feat: finishing job details page (#489)

* feat: career page user profile with api (#490)

* feat: init user profile component

* feat: created post login user profile component

* feat: creating user profile input form

* feat: creating dropdown list for profile creation modal

* feat: struggling to deal with multiple dropdowns

* feat: applying standard styling to jobdetail

* feat: responsive styling

* feat: successful implementation for user profile

* feat: checked functionality next homework is apply button and time formatting

* chore: adding styling to job card

* feat: job apply functionality is set (#491)

* fix: fixing job content sections list

* feat: adding company job post button

---------

Co-authored-by: KTheAsianimeBoi <minhkhoahc2002@gmail.com>

* fix: fixing index html for career

* fix: hotfix on vite configuration (#493)

* feat: fixing button styling due to unknown errors in dev env

* chore: changing minor styling issues

* feat: career post application and agreement modal (#494)

* feat: adding some padding and post api

* feat: agreement modal and post functionality

* feat: text size to section title of job content (#495)

* chore(deps): update dependency postcss to v8.4.31 [security] (#480)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: finishing up careers page (#496)

* feat: finishing up careers

* chore: cleaning console logs

* chore: cleaning comments

* chore(deps): update dependency postcss to v8.4.31 [security] (#498)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>

* feat: adding mobile responsiveness to profile registeration

* feat: commercial disclosure page (#503)

* feat: creating commercial disclosure

* chore: changing some wording

* feat: ensuring school input and styling for profile modal (#505)

---------

Co-authored-by: KTheAsianimeBoi <minhkhoahc2002@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored Nov 21, 2023
1 parent 9a371f6 commit 24206c4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 25 deletions.
2 changes: 1 addition & 1 deletion apps/career/src/components/common/SchoolFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ interface SchoolFilterFormProps {
isOpen: boolean
setOpen: (open: boolean) => void
profileData: UserProfile
setProfileData: (profileData: UserProfile) => void
setProfileData?: (profileData: UserProfile) => void
}

type TabMenuProps = {
Expand Down
62 changes: 38 additions & 24 deletions apps/career/src/components/joblist/ProfileModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,34 +145,42 @@ const ProfileModal: React.FC<ProfileModalProps> = ({
}
}

const isFormValid = () => {
const { school, name, email, year, class_of } = profile
return school && name && email && year && class_of
}

return (
<div className="fixed inset-0 z-[1000] h-full w-full overflow-y-auto bg-gray-600 bg-opacity-50">
<div className="flex h-full items-center justify-center">
<div className="standard-style mx-auto max-w-xl space-y-6 rounded-lg p-6 sm:max-w-3xl">
<h2 className="text-center text-2xl font-bold">Register Profile</h2>
<div className="flex w-full items-center justify-center p-2">
<button
className="standard-style-hover inline-flex gap-x-1.5 rounded-md bg-white px-3 py-2 text-2xl font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"
onClick={() => setExpandSchool(!expandSchool)}
>
{expandSchool ? (
<SchoolFilterForm
isOpen={expandSchool}
setOpen={setExpandSchool}
profileData={profile}
setProfileData={setProfile}
/>
) : null}
{profile.school ? (
<img
src={getSchoolIconPath(profile.school, "en")}
width={40}
height={40}
/>
) : (
<p>Choose your school</p>
)}
</button>
<div className="flex w-full items-center justify-between p-2">
<h1 className="mr-2 text-2xl font-bold capitalize">school</h1>
<div className="flex flex-grow justify-center">
<button
className="standard-style-hover inline-flex gap-x-1.5 rounded-md bg-white px-3 py-2 text-2xl font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"
onClick={() => setExpandSchool(!expandSchool)}
>
{expandSchool ? (
<SchoolFilterForm
isOpen={expandSchool}
setOpen={setExpandSchool}
profileData={profile}
setProfileData={setProfile}
/>
) : null}
{profile.school ? (
<img
src={getSchoolIconPath(profile.school, "en")}
width={40}
height={40}
/>
) : (
<p>Choose your school</p>
)}
</button>
</div>
</div>
<div className="flex flex-row items-center justify-center text-center">
<h1 className="mr-2 text-2xl font-bold capitalize">name</h1>
Expand Down Expand Up @@ -304,11 +312,17 @@ const ProfileModal: React.FC<ProfileModalProps> = ({
<div className="text-center">
<button
onClick={handleSubmit}
className="rounded bg-blue-500 px-4 py-2 text-white hover:bg-blue-700"
className={`rounded bg-blue-500 px-4 py-2 text-white ${
!isFormValid()
? "cursor-not-allowed opacity-50"
: "hover:bg-blue-700"
}`}
disabled={!isFormValid()}
>
Submit
</button>
</div>

<div className="text-center">
<button
onClick={closeModal}
Expand Down

0 comments on commit 24206c4

Please sign in to comment.