Skip to content

Commit

Permalink
Merge branch 'main' into 340-tweak-logic-to-get-doc-id
Browse files Browse the repository at this point in the history
  • Loading branch information
mlissner authored Jul 3, 2023
2 parents eec580d + b3b62e5 commit 1d89755
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/appellate/appellate.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ AppellateDelegate.prototype.dispatchPageHandler = function () {
case 'CaseSearch.jsp':
this.handleCaseSearchPage();
break;
case 'DocketReportFilter.jsp':
this.handleDocketReportFilter();
break;
case 'CaseQuery.jsp':
this.handleCaseQueryPage();
break;
Expand Down Expand Up @@ -53,6 +56,27 @@ AppellateDelegate.prototype.handleCaseSearchPage = () => {
}
};

AppellateDelegate.prototype.handleDocketReportFilter = function () {
if (!this.docketNumber) {
return;
}
let docketNumberCore = PACER.makeDocketNumberCore(this.docketNumber);

this.recap.getAvailabilityForDocket(this.court, null, docketNumberCore, (result) => {
if (result.count === 1 && result.results) {
let form = document.getElementsByTagName('form')[0];
let banner = recapBanner(result.results[0]);
let recapAlert = document.createElement('div');
recapAlert.classList.add('recap-banner');
recapAlert.appendChild(recapAlertButton(this.court, this.pacer_case_id, true));
form.after(recapAlert);
form.after(banner);
} else {
PACER.handleDocketAvailabilityMessages(result);
}
});
};

AppellateDelegate.prototype.handleCaseSelectionPage = async function () {
if (document.querySelectorAll('input:not([type=hidden])').length) {
// When the users go back to the Case Selection Page from the Docket Report using the back button
Expand Down

0 comments on commit 1d89755

Please sign in to comment.