Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

10483 story #5461

Merged
merged 8 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,39 @@ const filterDocketEntries = (
}
};

export type PublicFormattedDocketEntryInfo = {
index: number;
isStricken?: boolean;
createdAtFormatted?: string;
eventCode: string;
isSealed?: boolean;
sealedToTooltip: string;
numberOfPages?: number;
filedBy?: string;
action?: string;
showServed: boolean;
showNotServed: boolean;
servedAtFormatted: boolean;
servedPartiesCode?: string;
showLinkToDocument: boolean;
descriptionDisplay: string;
docketEntryId: string;
openInSameTab: boolean;
showDocumentDescriptionWithoutLink: boolean;
signatory?: string;
hasDocument: boolean;
};

export type PublicCaseDetailHelperResults = {
formattedDocketEntriesOnDocketRecord: PublicFormattedDocketEntryInfo[];
isCaseSealed: boolean;
showPrintableDocketRecord: string | undefined;
};

export const publicCaseDetailHelper = (
get: Get,
applicationContext: ClientApplicationContext,
) => {
): PublicCaseDetailHelperResults => {
const rawCase = get(state.caseDetail);

const {
Expand Down
5 changes: 4 additions & 1 deletion web-client/src/presenter/state-public.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ const computeds = {
typeof practitionerSearchHelper
>,
publicCaseDetailHeaderHelper,
publicCaseDetailHelper,
publicCaseDetailHelper: publicCaseDetailHelper as unknown as ReturnType<
typeof publicCaseDetailHelper
>,
templateHelper,
todaysOpinionsHelper,
todaysOrdersHelper,
Expand All @@ -46,6 +48,7 @@ export const baseState = {
showUsaBannerDetails: false,
},
currentPage: 'Interstitial',
featureFlags: undefined as unknown as { [key: string]: string },
form: {} as Record<string, any>,
header: {
searchTerm: '',
Expand Down
8 changes: 8 additions & 0 deletions web-client/src/views/DocketRecord/DocketRecord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ export const DocketRecord = connect(
}) {
const selectAllCheckboxRef = useRef<HTMLInputElement>(null);

const noDocumentsMessage = 'There are no documents of that type.';

useEffect(() => {
if (!docketRecordHelper.showBatchDownloadControls) return;
if (!selectAllCheckboxRef.current) return;
Expand Down Expand Up @@ -228,6 +230,10 @@ export const DocketRecord = connect(
)}
</tbody>
</table>
{!formattedDocketEntriesHelper.formattedDocketEntriesOnDocketRecord
.length && (
<p className="margin-bottom-10">{noDocumentsMessage}</p>
)}
</div>
</NonPhone>

Expand Down Expand Up @@ -268,6 +274,8 @@ export const DocketRecord = connect(
)}
</tbody>
</table>
{!formattedDocketEntriesHelper.formattedDocketEntriesOnDocketRecord
.length && <p className="margin-bottom-10">{noDocumentsMessage}</p>}
</Phone>

{showModal == 'DocketRecordOverlay' && <DocketRecordOverlay />}
Expand Down
8 changes: 8 additions & 0 deletions web-client/src/views/Public/PublicDocketRecord.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export const PublicDocketRecord = connect(
publicCaseDetailHelper: state.publicCaseDetailHelper,
},
function ({ publicCaseDetailHelper }) {
const noDocumentsMessage = 'There are no documents of that type.';

return (
<>
<PublicDocketRecordHeader />
Expand Down Expand Up @@ -102,6 +104,10 @@ export const PublicDocketRecord = connect(
)}
</tbody>
</table>
{!publicCaseDetailHelper.formattedDocketEntriesOnDocketRecord
.length && (
<p className="margin-bottom-10">{noDocumentsMessage}</p>
)}
</div>
</NonPhone>

Expand Down Expand Up @@ -142,6 +148,8 @@ export const PublicDocketRecord = connect(
)}
</tbody>
</table>
{!publicCaseDetailHelper.formattedDocketEntriesOnDocketRecord
.length && <p className="margin-bottom-10">{noDocumentsMessage}</p>}
</Phone>
</>
);
Expand Down
24 changes: 16 additions & 8 deletions web-client/src/views/Public/PublicFilingsAndProceedings.tsx
Original file line number Diff line number Diff line change
@@ -1,18 +1,26 @@
import { Button } from '../../ustc-ui/Button/Button';
import { PublicFormattedDocketEntryInfo } from '@web-client/presenter/computeds/Public/publicCaseDetailHelper';
import { connect } from '@web-client/presenter/shared.cerebral';
import { props } from 'cerebral';
import { sequences } from '@web-client/presenter/app.cerebral';
import { state } from '@web-client/presenter/app.cerebral';
import React from 'react';
import classNames from 'classnames';

export const PublicFilingsAndProceedings = connect(
{
caseDetail: state.caseDetail,
entry: props.entry,
openCaseDocumentDownloadUrlSequence:
sequences.openCaseDocumentDownloadUrlSequence,
},
type PublicFilingsAndProceedingsPros = {
entry: PublicFormattedDocketEntryInfo;
};

const PublicFilingsAndProceedingsDeps = {
caseDetail: state.caseDetail,
openCaseDocumentDownloadUrlSequence:
sequences.openCaseDocumentDownloadUrlSequence,
};

export const PublicFilingsAndProceedings = connect<
PublicFilingsAndProceedingsPros,
typeof PublicFilingsAndProceedingsDeps
>(
PublicFilingsAndProceedingsDeps,
function PublicFilingsAndProceedings({
caseDetail,
entry,
Expand Down
Loading