Skip to content

Commit

Permalink
10409: fix type errors;
Browse files Browse the repository at this point in the history
  • Loading branch information
nechama-krigsman committed Sep 24, 2024
1 parent 5cfb8f5 commit 72c10fd
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { applicationContext } from '../../test/createTestApplicationContext';
import {
compareCasesByDocketNumber,
compareCasesByDocketNumberFactory,
Expand Down Expand Up @@ -58,7 +57,6 @@ describe('getFormattedTrialSessionDetails.compareCasesByDocketNumberFactory', ()
it('101-19 should come before 102-19', () => {
const result = compareCasesByDocketNumberFactory({
allCases: [],
applicationContext,
})(
{
docketNumber: '101-19',
Expand All @@ -79,7 +77,6 @@ describe('getFormattedTrialSessionDetails.compareCasesByDocketNumberFactory', ()
it('190-07 should come before 102-19', () => {
const result = compareCasesByDocketNumberFactory({
allCases: [],
applicationContext,
})(
{
docketNumber: '190-07',
Expand All @@ -94,7 +91,6 @@ describe('getFormattedTrialSessionDetails.compareCasesByDocketNumberFactory', ()
it('102-19 should equal 102-19', () => {
const result = compareCasesByDocketNumberFactory({
allCases: [],
applicationContext,
})(
{
docketNumber: '102-19',
Expand All @@ -115,7 +111,6 @@ describe('getFormattedTrialSessionDetails.compareCasesByDocketNumberFactory', ()
it('103-19 should come after 102-19', () => {
const result = compareCasesByDocketNumberFactory({
allCases: [],
applicationContext,
})(
{
docketNumber: '103-19',
Expand Down Expand Up @@ -163,7 +158,6 @@ describe('getFormattedTrialSessionDetails.compareCasesByDocketNumberFactory', ()
leadDocketNumber: '101-20',
},
],
applicationContext,
}),
);

Expand Down Expand Up @@ -207,7 +201,6 @@ describe('getFormattedTrialSessionDetails.compareCasesByDocketNumberFactory', ()
cases.sort(
compareCasesByDocketNumberFactory({
allCases: [],
applicationContext,
}),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ describe('getFormattedTrialSessionDetails', () => {
};

const result = setPretrialMemorandumFiler({
applicationContext,
caseItem: mockCase,
});

Expand All @@ -55,7 +54,6 @@ describe('getFormattedTrialSessionDetails', () => {
};

const result = setPretrialMemorandumFiler({
applicationContext,
caseItem: mockCase,
});

Expand All @@ -75,7 +73,6 @@ describe('getFormattedTrialSessionDetails', () => {
};

const result = setPretrialMemorandumFiler({
applicationContext,
caseItem: mockCase,
});

Expand All @@ -100,7 +97,6 @@ describe('getFormattedTrialSessionDetails', () => {
};

const result = setPretrialMemorandumFiler({
applicationContext,
caseItem: mockCase,
});

Expand All @@ -126,7 +122,6 @@ describe('getFormattedTrialSessionDetails', () => {
};

const result = setPretrialMemorandumFiler({
applicationContext,
caseItem: mockCase,
});

Expand All @@ -139,7 +134,6 @@ describe('getFormattedTrialSessionDetails', () => {
.getCaseByDocketNumber.mockReturnValue(MOCK_CASE);

const result = setPretrialMemorandumFiler({
applicationContext,
caseItem: MOCK_CASE,
});

Expand All @@ -158,7 +152,6 @@ describe('getFormattedTrialSessionDetails', () => {
};

const result = setPretrialMemorandumFiler({
applicationContext,
caseItem: MOCK_CASE,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ describe('getFormattedTrialSessionDetails', () => {
beforeEach(() => {
TRIAL_SESSION = {
...MOCK_TRIAL_REGULAR,
calendaredCases: [],
caseOrder: [],
city: 'Hartford',
courtReporter: 'Test Court Reporter',
eligibleCases: [],
estimatedEndDate: '2040-11-25T15:00:00.000Z',
irsCalendarAdministrator: 'Test Calendar Admin',
postalCode: '12345',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const docketClerkViewsTrialSessionsTab = (
state: cerebralTest.getState(),
});

const legacyJudge = helper.trialSessionJudges.find(
judge => judge.role === 'legacyJudge',
const legacyJudge = helper.trialSessionJudgeOptions.find(
option => option.value.name === 'Fieri',
);

if (
Expand Down
19 changes: 14 additions & 5 deletions web-client/src/ustc-ui/DateInput/DateRangePickerComponent.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { FormGroup } from '../FormGroup/FormGroup';
import React, { useEffect, useRef } from 'react';
import React, { ChangeEvent, useEffect, useRef } from 'react';
import classNames from 'classnames';
import datePicker from '../../../../node_modules/@uswds/uswds/packages/usa-date-picker/src';
import dateRangePicker from '../../../../node_modules/@uswds/uswds/packages/usa-date-range-picker/src';
Expand Down Expand Up @@ -125,8 +125,13 @@ export const DateRangePickerComponent = ({
);
if (dateEndInput) {
if (onChangeEnd) {
dateEndInput.addEventListener('change', onChangeEnd);
dateEndInput.addEventListener('input', onChangeEnd);
dateEndInput.addEventListener('change', event => {
onChangeEnd(event as unknown as ChangeEvent<HTMLInputElement>);
});

dateEndInput.addEventListener('input', event => {
onChangeEnd(event as unknown as ChangeEvent<HTMLInputElement>);
});
}
if (onBlurEnd) {
dateEndInput.addEventListener('blur', onBlurEnd);
Expand All @@ -137,8 +142,12 @@ export const DateRangePickerComponent = ({
);
if (dateStartInput) {
if (onChangeStart) {
dateStartInput.addEventListener('change', onChangeStart);
dateStartInput.addEventListener('input', onChangeStart);
dateStartInput.addEventListener('change', event => {
onChangeStart(event as unknown as ChangeEvent<HTMLInputElement>);
});
dateStartInput.addEventListener('input', event => {
onChangeStart(event as unknown as ChangeEvent<HTMLInputElement>);
});
}
if (onBlurStart) {
dateStartInput.addEventListener('blur', onBlurStart);
Expand Down

0 comments on commit 72c10fd

Please sign in to comment.