diff --git a/apps/portal/src/components/offers/constants.ts b/apps/portal/src/components/offers/constants.ts index ceb3c3e7..48d9bf48 100644 --- a/apps/portal/src/components/offers/constants.ts +++ b/apps/portal/src/components/offers/constants.ts @@ -5,84 +5,10 @@ export const JobTypeLabel = { INTERN: 'Internship', }; -<<<<<<< HEAD export const emptyOption = { label: '', value: '', }; -======= -export const internshipCycleOptions = [ - { - label: 'Summer', - value: 'Summer', - }, - { - label: 'Winter', - value: 'Winter', - }, - { - label: 'Spring', - value: 'Spring', - }, - { - label: 'Fall', - value: 'Fall', - }, - { - label: 'Full year', - value: 'Full year', - }, -]; - -export const yearOptions = [ - { - label: '2021', - value: 2021, - }, - { - label: '2022', - value: 2022, - }, - { - label: '2023', - value: 2023, - }, - { - label: '2024', - value: 2024, - }, -]; - -export const educationLevelOptions = Object.entries( - EducationBackgroundType, -).map(([, value]) => ({ - label: value, - value, -})); - -export const educationFieldOptions = [ - { - label: 'Computer Science', - value: 'Computer Science', - }, - { - label: 'Information Security', - value: 'Information Security', - }, - { - label: 'Information Systems', - value: 'Information Systems', - }, - { - label: 'Business Analytics', - value: 'Business Analytics', - }, - { - label: 'Data Science and Analytics', - value: 'Data Science and Analytics', - }, -]; ->>>>>>> a31230f7 ([offers][feat] Use city typeahead for location field) export enum FieldError { NON_NEGATIVE_NUMBER = 'Please fill in a non-negative number in this field.', @@ -111,4 +37,4 @@ export const profileDetailTabs = [ label: ProfileDetailTab.ANALYSIS, value: ProfileDetailTab.ANALYSIS, }, -]; +]; \ No newline at end of file diff --git a/apps/portal/src/components/offers/offersSubmission/submissionForm/BackgroundForm.tsx b/apps/portal/src/components/offers/offersSubmission/submissionForm/BackgroundForm.tsx index 24d2ec86..e8d6cb50 100644 --- a/apps/portal/src/components/offers/offersSubmission/submissionForm/BackgroundForm.tsx +++ b/apps/portal/src/components/offers/offersSubmission/submissionForm/BackgroundForm.tsx @@ -2,16 +2,7 @@ import { useFormContext, useWatch } from 'react-hook-form'; import { JobType } from '@prisma/client'; import { Collapsible, RadioList } from '@tih/ui'; -<<<<<<< HEAD import { FieldError } from '~/components/offers/constants'; -======= -import { - educationFieldOptions, - educationLevelOptions, - emptyOption, - FieldError, -} from '~/components/offers/constants'; ->>>>>>> a31230f7 ([offers][feat] Use city typeahead for location field) import type { BackgroundPostData } from '~/components/offers/types'; import CitiesTypeahead from '~/components/shared/CitiesTypeahead'; import CompaniesTypeahead from '~/components/shared/CompaniesTypeahead'; @@ -264,7 +255,6 @@ function InternshipJobFields() { }} /> -<<<<<<< HEAD
-======= - -
->>>>>>> a31230f7 ([offers][feat] Use city typeahead for location field) >>>>>> a31230f7 ([offers][feat] Use city typeahead for location field) />
@@ -405,4 +388,4 @@ export default function BackgroundForm() {
); -} +} \ No newline at end of file diff --git a/apps/portal/src/components/offers/offersSubmission/submissionForm/OfferDetailsForm.tsx b/apps/portal/src/components/offers/offersSubmission/submissionForm/OfferDetailsForm.tsx index 22bef95a..5bd4307b 100644 --- a/apps/portal/src/components/offers/offersSubmission/submissionForm/OfferDetailsForm.tsx +++ b/apps/portal/src/components/offers/offersSubmission/submissionForm/OfferDetailsForm.tsx @@ -22,16 +22,7 @@ import { defaultFullTimeOfferValues, defaultInternshipOfferValues, } from '../OffersSubmissionForm'; -<<<<<<< HEAD import { FieldError, JobTypeLabel } from '../../constants'; -======= -import { - emptyOption, - FieldError, - internshipCycleOptions, - yearOptions, -} from '../../constants'; ->>>>>>> a31230f7 ([offers][feat] Use city typeahead for location field) import FormMonthYearPicker from '../../forms/FormMonthYearPicker'; import FormSection from '../../forms/FormSection'; import FormSelect from '../../forms/FormSelect'; @@ -115,7 +106,6 @@ function FullTimeOfferDetailsForm({ })} /> -<<<<<<< HEAD
{ if (option) { setValue(`offers.${index}.companyId`, option.value); - setValue(`offers.${index}.companyName`, option.label); } }} /> @@ -158,93 +147,6 @@ function FullTimeOfferDetailsForm({ monthRequired={true} yearLabel="" {...register(`offers.${index}.monthYearReceived`, { -======= - -
-
- { - if (option) { - setValue(`offers.${index}.companyId`, option.value); - setValue(`offers.${index}.companyName`, option.label); - } - }} - /> - { - if (option) { - setValue(`offers.${index}.cityId`, option.value); - setValue(`offers.${index}.cityName`, option.label); - } else { - setValue(`offers.${index}.cityId`, ''); - setValue(`offers.${index}.cityName`, ''); - } - }} - /> -
-
- -
-
- - } - endAddOnType="element" - errorMessage={ - offerFields?.offersFullTime?.totalCompensation?.value?.message - } - label="Total Compensation (Annual)" - placeholder="0" - required={true} - startAddOn="$" - startAddOnType="label" - type="number" - {...register( - `offers.${index}.offersFullTime.totalCompensation.value`, - { - min: { message: FieldError.NON_NEGATIVE_NUMBER, value: 0 }, ->>>>>>> a31230f7 ([offers][feat] Use city typeahead for location field) required: FieldError.REQUIRED, })} /> @@ -472,7 +374,6 @@ function InternshipOfferDetailsForm({ }} />
-<<<<<<< HEAD
-======= - { - if (option) { - setValue(`offers.${index}.cityId`, option.value); - setValue(`offers.${index}.cityName`, option.label); - } else { - setValue(`offers.${index}.cityId`, ''); - setValue(`offers.${index}.cityName`, ''); - } - }} - /> -
-
- - -
-
- -
-
- - } - endAddOnType="element" - errorMessage={ - offerFields?.offersIntern?.monthlySalary?.value?.message - } - label="Salary (Monthly)" - placeholder="0" - required={true} - startAddOn="$" - startAddOnType="label" - type="number" - {...register(`offers.${index}.offersIntern.monthlySalary.value`, { - min: { message: FieldError.NON_NEGATIVE_NUMBER, value: 0 }, - required: FieldError.REQUIRED, - valueAsNumber: true, - })} - /> -
-
->>>>>>> a31230f7 ([offers][feat] Use city typeahead for location field)
); -} +} \ No newline at end of file