Skip to content

Commit 14b9536

Browse files
committed
Opprydning siste soek
1 parent af50e33 commit 14b9536

File tree

9 files changed

+9
-40
lines changed

9 files changed

+9
-40
lines changed

apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/datepicker/DateInput.tsx

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,6 @@ export const DateInput = ({
6767
const fieldValue = name ? watch(name) : ''
6868
const [formattedValue, setFormattedValue] = useState(fieldValue ? formatDate(fieldValue) : '')
6969

70-
// if (name === 'foedselsdato.fraOgMed') {
71-
// console.log('fieldValue: ', fieldValue) //TODO - SLETT MEG
72-
// console.log('formattedValue: ', formattedValue) //TODO - SLETT MEG
73-
// }
74-
7570
useEffect(() => {
7671
if (!fieldValue) {
7772
setFormattedValue('')
@@ -99,7 +94,6 @@ export const DateInput = ({
9994
setValue(name, e.target.value, { shouldTouch: true })
10095
props.onChange?.(e)
10196
setFormattedValue(e.target.value)
102-
// setFormattedValue(formatDate(e.target.value))
10397
}
10498

10599
const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {

apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/monthpicker/Monthpicker.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,6 @@ export const Monthpicker = ({
6060
}
6161
}, [eksisterendeVerdi])
6262

63-
// if (name === 'inntekt.periode.fraOgMed') {
64-
// console.log('eksisterendeVerdi: ', eksisterendeVerdi) //TODO - SLETT MEG
65-
// console.log('inputProps: ', inputProps) //TODO - SLETT MEG
66-
// console.log('formattedDate: ', formattedDate) //TODO - SLETT MEG
67-
// console.log('monthpickerProps: ', monthpickerProps) //TODO - SLETT MEG
68-
// }
69-
7063
return (
7164
<InputWrapper size={'small'}>
7265
<Label name={name} label={label}>

apps/dolly-frontend/src/main/js/src/components/ui/form/inputs/textInput/TextInput.tsx

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,6 @@ export const TextInput = ({
156156
'skjemaelement__input--harFeil': shouldShowError,
157157
})
158158

159-
// if (name === 'relasjoner.relasjonMedFoedselsaar.fraOgMed' || name === 'identifikator') {
160-
// console.log(`fieldValue ${name}: `, fieldValue) //TODO - SLETT MEG
161-
// console.log(`value ${name}: `, value) //TODO - SLETT MEG
162-
// console.log(`defaultValue ${name}: `, defaultValue) //TODO - SLETT MEG
163-
// console.log(`watch ${name}: `, watch(name)) //TODO - SLETT MEG
164-
// }
165-
166159
return (
167160
<>
168161
<input

apps/dolly-frontend/src/main/js/src/components/ui/soekForm/SisteSoek.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ export const SisteSoek = ({ type, formValues, handleChange, handleChangeList })
6161
option.path,
6262
option.label,
6363
)
64-
} else if (formValue?.length > 8 && isDate(new Date(formValue))) {
64+
} else if (
65+
formValue?.length > 8 &&
66+
isDate(new Date(formValue)) &&
67+
isValid(new Date(formValue))
68+
) {
6569
handleChange(
6670
!isSameDay(new Date(formValue), new Date(option.value)) ? option.value : null,
6771
option.path,

apps/dolly-frontend/src/main/js/src/pages/dollySoek/DollySoekPage.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ import { codeToNorskLabel } from '@/utils/DataFormatter'
1313
export default () => {
1414
const [lagreSoekRequest, setLagreSoekRequest] = useState({})
1515
const lagreSoekRequestRef = useRef(lagreSoekRequest)
16-
console.log('lagreSoekRequest: ', lagreSoekRequest) //TODO - SLETT MEG
1716

1817
useEffect(() => {
1918
lagreSoekRequestRef.current = lagreSoekRequest
@@ -45,7 +44,7 @@ export default () => {
4544
setFormRequest(request)
4645
}
4746

48-
const { watch, reset, control, getValues } = formMethods
47+
const { watch, reset } = formMethods
4948
const values = watch()
5049

5150
const handleChange = (value: any, path: string, label: string) => {

apps/dolly-frontend/src/main/js/src/pages/dollySoek/soekFormPartials/Fagsystemer.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,7 @@ export const Fagsystemer = ({ handleChangeList }: any) => {
1818
isMulti={true}
1919
size="grow"
2020
onChange={(val: SyntheticEvent) => {
21-
handleChangeList(
22-
// val?.map((item: any) => item.value) || null,
23-
val,
24-
'registreRequest',
25-
'Fagsystem',
26-
)
21+
handleChangeList(val, 'registreRequest', 'Fagsystem')
2722
}}
2823
/>
2924
</div>

apps/dolly-frontend/src/main/js/src/pages/tenorSoek/SoekForm.tsx

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -244,15 +244,7 @@ export const SoekForm = ({ formMethods, handleChange, handleChangeList, emptyCat
244244
/>
245245
</Table.HeaderCell>
246246
</Table.ExpandableRow>
247-
<Table.ExpandableRow
248-
content={
249-
<Arbeidsforhold
250-
handleChange={handleChange}
251-
handleChangeList={handleChangeList}
252-
getValue={watch}
253-
/>
254-
}
255-
>
247+
<Table.ExpandableRow content={<Arbeidsforhold handleChange={handleChange} />}>
256248
<Table.HeaderCell>
257249
<Header
258250
title="Arbeidsforhold"

apps/dolly-frontend/src/main/js/src/pages/tenorSoek/TenorSoekPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ export const tenorSoekStateLocalStorageKey = 'tenorSoekState'
4141
export default () => {
4242
const [lagreSoekRequest, setLagreSoekRequest] = useState({})
4343
const lagreSoekRequestRef = useRef(lagreSoekRequest)
44-
console.log('lagreSoekRequest: ', lagreSoekRequest) //TODO - SLETT MEG
4544

4645
useEffect(() => {
4746
lagreSoekRequestRef.current = lagreSoekRequest

apps/dolly-frontend/src/main/js/src/pages/tenorSoek/soekFormPartials/Arbeidsforhold.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { FormDatepicker } from '@/components/ui/form/inputs/datepicker/Datepicke
77
import { FormCheckbox } from '@/components/ui/form/inputs/checbox/Checkbox'
88
import { formatDate } from '@/utils/DataFormatter'
99

10-
export const Arbeidsforhold = ({ handleChange, handleChangeList, getValue }: any) => {
10+
export const Arbeidsforhold = ({ handleChange }: any) => {
1111
const { domain: arbeidsforholdstypeOptions, loading: loadingArbeidsforholdstype } =
1212
useTenorDomain('Arbeidsforholdstype')
1313

0 commit comments

Comments
 (0)