|
|
@ -2,7 +2,6 @@ import { useFormContext, useWatch } from 'react-hook-form';
|
|
|
|
import { Collapsible, RadioList } from '@tih/ui';
|
|
|
|
import { Collapsible, RadioList } from '@tih/ui';
|
|
|
|
|
|
|
|
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
companyOptions,
|
|
|
|
|
|
|
|
educationFieldOptions,
|
|
|
|
educationFieldOptions,
|
|
|
|
educationLevelOptions,
|
|
|
|
educationLevelOptions,
|
|
|
|
emptyOption,
|
|
|
|
emptyOption,
|
|
|
@ -14,6 +13,7 @@ import FormRadioList from '~/components/offers/forms/components/FormRadioList';
|
|
|
|
import FormSelect from '~/components/offers/forms/components/FormSelect';
|
|
|
|
import FormSelect from '~/components/offers/forms/components/FormSelect';
|
|
|
|
import FormTextInput from '~/components/offers/forms/components/FormTextInput';
|
|
|
|
import FormTextInput from '~/components/offers/forms/components/FormTextInput';
|
|
|
|
import { JobType } from '~/components/offers/types';
|
|
|
|
import { JobType } from '~/components/offers/types';
|
|
|
|
|
|
|
|
import CompaniesTypeahead from '~/components/shared/CompaniesTypeahead';
|
|
|
|
|
|
|
|
|
|
|
|
import { CURRENCY_OPTIONS } from '~/utils/offers/currency/CurrencyEnum';
|
|
|
|
import { CURRENCY_OPTIONS } from '~/utils/offers/currency/CurrencyEnum';
|
|
|
|
|
|
|
|
|
|
|
@ -74,7 +74,7 @@ function YoeSection() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function FullTimeJobFields() {
|
|
|
|
function FullTimeJobFields() {
|
|
|
|
const { register } = useFormContext();
|
|
|
|
const { register, setValue } = useFormContext();
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className="mb-5 grid grid-cols-2 space-x-3">
|
|
|
|
<div className="mb-5 grid grid-cols-2 space-x-3">
|
|
|
@ -85,14 +85,14 @@ function FullTimeJobFields() {
|
|
|
|
placeholder={emptyOption}
|
|
|
|
placeholder={emptyOption}
|
|
|
|
{...register(`background.experiences.0.title`)}
|
|
|
|
{...register(`background.experiences.0.title`)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<FormSelect
|
|
|
|
<div>
|
|
|
|
display="block"
|
|
|
|
<CompaniesTypeahead
|
|
|
|
label="Company"
|
|
|
|
onSelect={({ value }) =>
|
|
|
|
options={companyOptions}
|
|
|
|
setValue(`background.experiences.0.companyId`, value)
|
|
|
|
placeholder={emptyOption}
|
|
|
|
}
|
|
|
|
{...register(`background.experiences.0.companyId`)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div className="mb-5 grid grid-cols-1 space-x-3">
|
|
|
|
<div className="mb-5 grid grid-cols-1 space-x-3">
|
|
|
|
<FormTextInput
|
|
|
|
<FormTextInput
|
|
|
|
endAddOn={
|
|
|
|
endAddOn={
|
|
|
@ -151,7 +151,7 @@ function FullTimeJobFields() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function InternshipJobFields() {
|
|
|
|
function InternshipJobFields() {
|
|
|
|
const { register } = useFormContext();
|
|
|
|
const { register, setValue } = useFormContext();
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<>
|
|
|
|
<div className="mb-5 grid grid-cols-2 space-x-3">
|
|
|
|
<div className="mb-5 grid grid-cols-2 space-x-3">
|
|
|
@ -162,14 +162,14 @@ function InternshipJobFields() {
|
|
|
|
placeholder={emptyOption}
|
|
|
|
placeholder={emptyOption}
|
|
|
|
{...register(`background.experiences.0.title`)}
|
|
|
|
{...register(`background.experiences.0.title`)}
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
<FormSelect
|
|
|
|
<div>
|
|
|
|
display="block"
|
|
|
|
<CompaniesTypeahead
|
|
|
|
label="Company"
|
|
|
|
onSelect={({ value }) =>
|
|
|
|
options={companyOptions}
|
|
|
|
setValue(`background.experiences.0.companyId`, value)
|
|
|
|
placeholder={emptyOption}
|
|
|
|
}
|
|
|
|
{...register(`background.experiences.0.company`)}
|
|
|
|
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
<div className="mb-5 grid grid-cols-1 space-x-3">
|
|
|
|
<div className="mb-5 grid grid-cols-1 space-x-3">
|
|
|
|
<FormTextInput
|
|
|
|
<FormTextInput
|
|
|
|
endAddOn={
|
|
|
|
endAddOn={
|
|
|
|