diff --git a/shared/src/business/useCases/addCoversheetInteractor.js b/shared/src/business/useCases/addCoversheetInteractor.js index 88f66b16fd5..2c263a8b345 100644 --- a/shared/src/business/useCases/addCoversheetInteractor.js +++ b/shared/src/business/useCases/addCoversheetInteractor.js @@ -23,7 +23,7 @@ exports.generateCoverSheetData = ({ (documentEntity.servedAt && applicationContext .getUtilities() - .formatDateString(documentEntity.servedAt, 'MMDDYYYY')) || + .formatDateString(documentEntity.servedAt, 'MMDDYY')) || ''; let dateReceivedFormatted; @@ -33,14 +33,14 @@ exports.generateCoverSheetData = ({ (documentEntity.createdAt && applicationContext .getUtilities() - .formatDateString(documentEntity.createdAt, 'MMDDYYYY')) || + .formatDateString(documentEntity.createdAt, 'MMDDYY')) || ''; } else { dateReceivedFormatted = (documentEntity.createdAt && applicationContext .getUtilities() - .formatDateString(documentEntity.createdAt, 'MM/DD/YYYY hh:mm a')) || + .formatDateString(documentEntity.createdAt, 'MM/DD/YY hh:mm a')) || ''; } @@ -48,7 +48,7 @@ exports.generateCoverSheetData = ({ (documentEntity.filingDate && applicationContext .getUtilities() - .formatDateString(documentEntity.filingDate, 'MMDDYYYY')) || + .formatDateString(documentEntity.filingDate, 'MMDDYY')) || ''; const caseCaptionToUse = useInitialData @@ -84,7 +84,7 @@ exports.generateCoverSheetData = ({ dateFiledLodgedLabel: isLodged ? 'Lodged' : 'Filed', dateReceived: dateReceivedFormatted, dateServed: dateServedFormatted, - docketNumber: `Docket Number: ${docketNumberWithSuffix}`, + docketNumber: `Docket No.: ${docketNumberWithSuffix}`, documentTitle, electronicallyFiled: !documentEntity.isPaper, mailingDate: documentEntity.mailingDate || '', diff --git a/shared/src/business/useCases/addCoversheetInteractor.test.js b/shared/src/business/useCases/addCoversheetInteractor.test.js index 749d5ea7571..833de703db2 100644 --- a/shared/src/business/useCases/addCoversheetInteractor.test.js +++ b/shared/src/business/useCases/addCoversheetInteractor.test.js @@ -278,7 +278,7 @@ describe('addCoversheetInteractor', () => { }, }); - expect(result.dateFiledLodged).toEqual('04/19/2019'); + expect(result.dateFiledLodged).toEqual('04/19/19'); }); it('shows does not show the filing date if the document does not have a valid filingDate', async () => { @@ -371,7 +371,7 @@ describe('addCoversheetInteractor', () => { }, }); - expect(result.dateReceived).toEqual('04/19/2019 10:45 am'); + expect(result.dateReceived).toEqual('04/19/19 10:45 am'); }); it('shows does not show the received date if the document does not have a valid createdAt and is electronically filed', async () => { @@ -418,7 +418,7 @@ describe('addCoversheetInteractor', () => { }, }); - expect(result.dateReceived).toEqual('04/19/2019'); + expect(result.dateReceived).toEqual('04/19/19'); }); it('shows does not show the received date if the document does not have a valid createdAt and is filed by paper', async () => { @@ -467,7 +467,7 @@ describe('addCoversheetInteractor', () => { }, }); - expect(result.dateServed).toEqual('04/20/2019'); + expect(result.dateServed).toEqual('04/20/19'); }); it('does not display the service date if servedAt is not present', async () => { @@ -515,7 +515,7 @@ describe('addCoversheetInteractor', () => { }, }); - expect(result.docketNumber).toEqual('Docket Number: 102-19'); + expect(result.docketNumber).toEqual('Docket No.: 102-19'); }); it('returns the docket number with suffix along with a Docket Number label', async () => { @@ -540,7 +540,7 @@ describe('addCoversheetInteractor', () => { }, }); - expect(result.docketNumber).toEqual('Docket Number: 102-19S'); + expect(result.docketNumber).toEqual('Docket No.: 102-19S'); }); it('displays Electronically Filed when the document is filed electronically', async () => { @@ -729,7 +729,7 @@ describe('addCoversheetInteractor', () => { useInitialData: true, }); - expect(result.docketNumber).toEqual('Docket Number: 102-19Z'); + expect(result.docketNumber).toEqual('Docket No.: 102-19Z'); expect(result.caseTitle).toEqual('Janie and Jackie Petitioner, '); }); }); diff --git a/shared/src/business/utilities/documentGenerators.js b/shared/src/business/utilities/documentGenerators.js index 3192981ba97..776dc1b4e24 100644 --- a/shared/src/business/utilities/documentGenerators.js +++ b/shared/src/business/utilities/documentGenerators.js @@ -124,7 +124,7 @@ const docketRecord = async ({ applicationContext, data }) => { const footerHtml = reactTemplateGenerator({ componentName: 'DatePrintedFooter', data: { - datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YYYY'), + datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YY'), }, }); @@ -313,7 +313,7 @@ const pendingReport = async ({ applicationContext, data }) => { const footerHtml = reactTemplateGenerator({ componentName: 'DatePrintedFooter', data: { - datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YYYY'), + datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YY'), }, }); @@ -404,7 +404,6 @@ const standingPretrialNotice = async ({ applicationContext, data }) => { const reactStandingPretrialNoticeTemplate = reactTemplateGenerator({ componentName: 'StandingPretrialNotice', data: { - footerDate, options: { caseCaptionExtension, caseTitle, @@ -431,6 +430,16 @@ const standingPretrialNotice = async ({ applicationContext, data }) => { }, }); + let footerHtml = ''; + if (footerDate) { + footerHtml = reactTemplateGenerator({ + componentName: 'DateServedFooter', + data: { + dateServed: footerDate, + }, + }); + } + const pdf = await applicationContext .getUseCases() .generatePdfFromHtmlInteractor({ @@ -438,6 +447,7 @@ const standingPretrialNotice = async ({ applicationContext, data }) => { contentHtml: pdfContentHtml, displayHeaderFooter: true, docketNumber: docketNumberWithSuffix, + footerHtml, headerHtml, overwriteHeader: true, }); @@ -457,7 +467,6 @@ const standingPretrialOrder = async ({ applicationContext, data }) => { const reactStandingPretrialOrderTemplate = reactTemplateGenerator({ componentName: 'StandingPretrialOrder', data: { - footerDate, options: { caseCaptionExtension, caseTitle, @@ -484,6 +493,16 @@ const standingPretrialOrder = async ({ applicationContext, data }) => { }, }); + let footerHtml = ''; + if (footerDate) { + footerHtml = reactTemplateGenerator({ + componentName: 'DateServedFooter', + data: { + dateServed: footerDate, + }, + }); + } + const pdf = await applicationContext .getUseCases() .generatePdfFromHtmlInteractor({ @@ -491,6 +510,7 @@ const standingPretrialOrder = async ({ applicationContext, data }) => { contentHtml: pdfContentHtml, displayHeaderFooter: true, docketNumber: docketNumberWithSuffix, + footerHtml, headerHtml, overwriteHeader: true, }); @@ -526,7 +546,7 @@ const caseInventoryReport = async ({ applicationContext, data }) => { const footerHtml = reactTemplateGenerator({ componentName: 'DatePrintedFooter', data: { - datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YYYY'), + datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YY'), }, }); @@ -585,7 +605,7 @@ const trialCalendar = async ({ applicationContext, data }) => { const footerHtml = reactTemplateGenerator({ componentName: 'DatePrintedFooter', data: { - datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YYYY'), + datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YY'), }, }); @@ -635,7 +655,7 @@ const trialSessionPlanningReport = async ({ applicationContext, data }) => { const footerHtml = reactTemplateGenerator({ componentName: 'DatePrintedFooter', data: { - datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YYYY'), + datePrinted: applicationContext.getUtilities().formatNow('MM/DD/YY'), }, }); diff --git a/shared/src/business/utilities/documentGenerators.test.js b/shared/src/business/utilities/documentGenerators.test.js index 88c50665024..e3dbd332534 100644 --- a/shared/src/business/utilities/documentGenerators.test.js +++ b/shared/src/business/utilities/documentGenerators.test.js @@ -174,10 +174,10 @@ describe('documentGenerators', () => { caseCaptionExtension: 'Petitioner', caseTitle: 'Test Person', certificateOfService: true, - dateFiledLodged: '01/01/2020', + dateFiledLodged: '01/01/20', dateFiledLodgedLabel: 'Filed', - dateReceived: '01/02/2020', - dateServed: '01/03/2020', + dateReceived: '01/02/20', + dateServed: '01/03/20', docketNumberWithSuffix: '123-45S', documentTitle: 'Petition', electronicallyFiled: true, @@ -362,7 +362,8 @@ describe('documentGenerators', () => { applicationContext, data: { caseCaptionExtension: 'Petitioner(s)', - caseTitle: 'Test Petitioner', + caseTitle: + 'Test Petitioner, Another Petitioner, and Yet Another Petitioner', docketNumberWithSuffix: '123-45S', footerDate: '02/02/20', trialInfo: { @@ -431,8 +432,41 @@ describe('documentGenerators', () => { }); }); + describe('notice', () => { + it('generates a Notice document', async () => { + const pdf = await order({ + applicationContext, + data: { + caseCaptionExtension: 'Petitioner(s)', + caseTitle: 'Test Petitioner', + docketNumberWithSuffix: '123-45S', + orderContent: `
This is some sample notice text.
+ +NOTICE that the joint motion for continuance is granted in that thesecases are stricken for trial from the Court's January 27, 2020, Los Angeles, California, trial session. It is further
+ +NOTICE that the joint motion to remand to respondent's Appeals Office is granted and these cases are + remanded to respondent's Appeals Office for a supplemental collection due process hearing. It is further
`, + orderTitle: 'NOTICE', + signatureText: 'Test Signature', + }, + }); + + // Do not write PDF when running on CircleCI + if (process.env.PDF_OUTPUT) { + writePdfFile('Notice', pdf); + expect(applicationContext.getChromiumBrowser).toHaveBeenCalled(); + } + + expect( + applicationContext.getUseCases().generatePdfFromHtmlInteractor, + ).toHaveBeenCalled(); + expect(applicationContext.getNodeSass).toHaveBeenCalled(); + expect(applicationContext.getPug).toHaveBeenCalled(); + }); + }); + describe('order', () => { - it('generates a Standing Pre-trial Order document', async () => { + it('generates an Order document', async () => { const pdf = await order({ applicationContext, data: { @@ -450,9 +484,37 @@ describe('documentGenerators', () => { located closest to petitioners' residence (or at such other place as may be mutually agreed upon) at a reasonable and mutually agreed upon date and time, but no later than April 1, 2020. It is further +ORDERED that each party shall, on or before April 15, 2020, file with the Court, and serve on the other party, a report regarding the then present status of these cases. It is further
+ +ORDERED that the joint motion to remand to respondent's Appeals Office is granted and these cases are + remanded to respondent's Appeals Office for a supplemental collection due process hearing. It is further
+ +ORDERED that respondent shall offer petitioners an administrative hearing at respondent's Appeals Office + located closest to petitioners' residence (or at such other place as may be mutually agreed upon) at a + reasonable and mutually agreed upon date and time, but no later than April 1, 2020. It is further
+ +ORDERED that each party shall, on or before April 15, 2020, file with the Court, and serve on the other party, a report regarding the then present status of these cases. It is further
+ +ORDERED that the joint motion for continuance is granted in that thesecases are stricken for trial from the Court's January 27, 2020, Los Angeles, California, trial session. It is further
+ +ORDERED that the joint motion to remand to respondent's Appeals Office is granted and these cases are + remanded to respondent's Appeals Office for a supplemental collection due process hearing. It is further
+ +ORDERED that respondent shall offer petitioners an administrative hearing at respondent's Appeals Office + located closest to petitioners' residence (or at such other place as may be mutually agreed upon) at a + reasonable and mutually agreed upon date and time, but no later than April 1, 2020. It is further
+ +ORDERED that each party shall, on or before April 15, 2020, file with the Court, and serve on the other party, a report regarding the then present status of these cases. It is further
+ +ORDERED that the joint motion to remand to respondent's Appeals Office is granted and these cases are + remanded to respondent's Appeals Office for a supplemental collection due process hearing. It is further
+ +ORDERED that respondent shall offer petitioners an administrative hearing at respondent's Appeals Office + located closest to petitioners' residence (or at such other place as may be mutually agreed upon) at a + reasonable and mutually agreed upon date and time, but no later than April 1, 2020. It is further
+ORDERED that each party shall, on or before April 15, 2020, file with the Court, and serve on the other party, a report regarding the then present status of these cases. It is further
`, orderTitle: 'ORDER', - signatureText: 'Test Signature', }, }); diff --git a/shared/src/business/utilities/htmlGenerator/index.scss b/shared/src/business/utilities/htmlGenerator/index.scss index e4af36c3ad4..ba0ce4545e5 100644 --- a/shared/src/business/utilities/htmlGenerator/index.scss +++ b/shared/src/business/utilities/htmlGenerator/index.scss @@ -31,7 +31,7 @@ h3 { margin-bottom: 20px; font-family: 'nimbus_roman', serif; font-family: serif; - font-size: 14px; + font-size: 16px; text-align: center; text-decoration: underline; @@ -135,6 +135,10 @@ th { .court-header { margin-bottom: 30px; font-family: serif; + + h1 { + font-size: 16px; + } } .case-information #caption, @@ -274,17 +278,17 @@ th { } .court-address { - font-size: 12px; + font-size: 14px; text-align: center; } @page { - margin: 2cm 1cm; + margin: 1.5cm 1cm 2cm 1cm; size: 8.5in 11in; } @page :first { - margin-top: 1cm; - margin-bottom: 2cm; + margin-top: 0; + margin-bottom: 2.5cm; } .margin-top-0 { @@ -326,7 +330,6 @@ th { .please-change { margin-bottom: 20px; font-size: 14px; - font-weight: 600; } .extra-margin-top { @@ -357,7 +360,7 @@ th { h3 { margin-top: 0; - font-size: 14px; + font-size: 16px; font-weight: normal; text-decoration: none; } @@ -367,7 +370,7 @@ th { #docket-number, #document-title, #certificate-of-service { - font-family: 'nimbus_sans_l', sans-serif !important; + font-family: 'nimbus_roman', serif; } #certificate-of-service { @@ -416,6 +419,10 @@ th { } } +#order-content { + font-size: 14px; +} + .calendar-icon { width: 12px; height: 12px; @@ -429,7 +436,7 @@ th { .docket { position: absolute; - top: 0; + top: 1cm; left: 0; padding-left: 0.6in; } diff --git a/shared/src/business/utilities/pdfGenerator/components/AddressLabel.jsx b/shared/src/business/utilities/pdfGenerator/components/AddressLabel.jsx index fa5cca7d626..4afc561f4ba 100644 --- a/shared/src/business/utilities/pdfGenerator/components/AddressLabel.jsx +++ b/shared/src/business/utilities/pdfGenerator/components/AddressLabel.jsx @@ -12,6 +12,9 @@ export const AddressLabel = ({ }) => { return (Docket | -Case title | +Docket No. | +Case Title | {showStatusColumn &&Case Status | } {showJudgeColumn &&Judge | }
---|
Docket | +Docket No. | Date Filed | -Case name | -Filings and proceedings | -Case status | +Case Name | +Filings and Proceedings | +Case Status | Judge |
---|
Docket no. | +Docket No. | Case Title | -Petitioner counsel | -Respondent counsel | +Petitioner Counsel | +Respondent Counsel |
---|