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

10261 Story: Update to sealed icon hover text #5475

Merged
merged 4 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
@@ -1,3 +1,4 @@
// This applies only to docket entries, not to full cases
export const getSealedDocketEntryTooltip = (applicationContext, entry) => {
const { DOCKET_ENTRY_SEALED_TO_TYPES } = applicationContext.getConstants();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,17 @@ import { state } from '@web-client/presenter/app.cerebral';

import { Get } from 'cerebral';
import { PractitionerCaseDetail } from '@web-client/presenter/state';
import { getSealedDocketEntryTooltip } from '@shared/business/utilities/getSealedDocketEntryTooltip';

const PAGE_SIZE = 100;

const getPagesToDisplay = ({
applicationContext,
cases,
pageNumber,
}: {
pageNumber: number;
cases: PractitionerCaseDetail[];
applicationContext: ClientApplicationContext;
}) => {
return cases
.slice(pageNumber * PAGE_SIZE, (pageNumber + 1) * PAGE_SIZE)
.map(c => {
c.sealedToTooltip = getSealedDocketEntryTooltip(applicationContext, c);
return c;
});
return cases.slice(pageNumber * PAGE_SIZE, (pageNumber + 1) * PAGE_SIZE);
};

export const practitionerInformationHelper = (
Expand Down Expand Up @@ -64,13 +56,11 @@ export const practitionerInformationHelper = (
const showClosedCasesPagination = totalClosedCasesPages > 1;

const openCasesToDisplay = getPagesToDisplay({
applicationContext,
cases: practitionerDetail.openCaseInfo?.allCases || [],
pageNumber: practitionerDetail.openCaseInfo?.currentPage || 0,
});

const closedCasesToDisplay = getPagesToDisplay({
applicationContext,
cases: practitionerDetail.closedCaseInfo?.allCases || [],
pageNumber: practitionerDetail.closedCaseInfo?.currentPage || 0,
});
Expand Down
3 changes: 2 additions & 1 deletion web-client/src/styles/custom.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1794,7 +1794,8 @@ button.change-scanner-button {
margin-right: 4px;
}

.sealed-docket-entry {
.sealed-docket-entry,
.sealed-case-entry {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an iconSealed class, but it doesn't do what I need (it is too opinionated). Rather than using that one or using sealed-docket-entry (which is poorly named in my context), I made a new, more appropriately named class.

color: color($theme-color-secondary-dark);
}

Expand Down
6 changes: 3 additions & 3 deletions web-client/src/views/Practitioners/PractitionerCaseIcons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export function PractitionerCaseIcons({
<div className="multi-filing-type-icon">
{formattedCase.isSealed && (
<Icon
aria-label={formattedCase.sealedToTooltip}
className="sealed-docket-entry"
aria-label="sealed"
className="sealed-case-entry"
icon="lock"
title={formattedCase.sealedToTooltip}
title="sealed"
/>
)}
{formattedCase.inConsolidatedGroup && (
Expand Down
Loading