Skip to content

Commit

Permalink
Merge branch '10049-display-wip-cav-submitted-cases' of https://githu…
Browse files Browse the repository at this point in the history
…b.com/flexion/ef-cms into 10049-judge-activity-report-JudgeActivityReportFilters-refactor
  • Loading branch information
Absolutestunna committed Sep 19, 2023
2 parents 5b1d48f + e08ccf5 commit e5d8b1a
Show file tree
Hide file tree
Showing 123 changed files with 1,237 additions and 1,754 deletions.
6 changes: 4 additions & 2 deletions scripts/data-import/judge/judge_users.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Cantrel,Judge,Cantrel,[email protected],legacyJudge,legacyJudgesC
Carluzzo,Chief Special Trial Judge,Lewis R. Carluzzo,[email protected],judge,carluzzosChambers
Chabot,Judge,Chabot,[email protected],legacyJudge,legacyJudgesChambers
Chiechi,Judge,Chiechi,[email protected],legacyJudge,legacyJudgesChambers
Choi,Special Trial Judge,Eunkyong Choi,[email protected],legacyJudge,legacyJudgesChambers
Clapp,Judge,Clapp,[email protected],legacyJudge,legacyJudgesChambers
Cohen,Judge,Mary Ann Cohen,[email protected],judge,cohensChambers
Colvin,Judge,John O. Colvin,[email protected],judge,colvinsChambers
Expand All @@ -20,6 +21,7 @@ Dinan,Special Trial Judge,Dinan,[email protected],legacyJudge,legac
Drennen,Judge,Drennen,[email protected],legacyJudge,legacyJudgesChambers
Fay,Judge,Fay,[email protected],legacyJudge,legacyJudgesChambers
Featherston,Judge,Featherston,[email protected],legacyJudge,legacyJudgesChambers
Fried,Special Trial Judge,Zachary S. Fried,[email protected],judge,friedsChambers
Foley,Chief Judge,Maurice B. Foley,[email protected],judge,foleysChambers
Gale,Judge,Joseph H. Gale,[email protected],judge,galesChambers
Galloway,Special Trial Judge,Galloway,[email protected],legacyJudge,legacyJudgesChambers
Expand All @@ -40,6 +42,7 @@ Jones,Judge,Courtney D. Jones,[email protected],judge,jonesChambers
Kerrigan,Judge,Kathleen Kerrigan,[email protected],judge,kerrigansChambers
Korner,Judge,Korner,[email protected],legacyJudge,legacyJudgesChambers
Kroupa,Judge,Kroupa,[email protected],legacyJudge,legacyJudgesChambers
Landy,Special Trial Judge,Adam B. Landy,[email protected],judge,landysChambers
Laro,Judge,Laro,[email protected],legacyJudge,legacyJudgesChambers
Lauber,Judge,Albert G. Lauber,[email protected],judge,laubersChambers
Leyden,Special Trial Judge,Diana L. Leyden,[email protected],judge,leydensChambers
Expand All @@ -62,6 +65,7 @@ Raum,Judge,Raum,[email protected],legacyJudge,legacyJudgesChambers
Ruwe,Judge,Robert P. Ruwe,[email protected],judge,ruwesChambers
Scott,Judge,Scott,[email protected],legacyJudge,legacyJudgesChambers
Shields,Judge,Shields,[email protected],legacyJudge,legacyJudgesChambers
Siegel,Special Trial Judge,Jennifer E. Siegel,[email protected],judge,siegelsChambers
Simpson,Judge,Simpson,[email protected],legacyJudge,legacyJudgesChambers
Sterrett,Judge,Sterrett,[email protected],legacyJudge,legacyJudgesChambers
Swift,Judge,Swift,[email protected],legacyJudge,legacyJudgesChambers
Expand All @@ -81,5 +85,3 @@ Wiles,Judge,Wiles,[email protected],legacyJudge,legacyJudgesChamber
Williams,Judge,Williams,[email protected],legacyJudge,legacyJudgesChambers
Wolfe,Special Trial Judge,Wolfe,[email protected],legacyJudge,legacyJudgesChambers
Wright,Judge,Wright,[email protected],legacyJudge,legacyJudgesChambers
Choi,Special Trial Judge,Eunkyong Choi,[email protected],judge,choisChambers
Landy,Special Trial Judge,Adam B. Landy,[email protected],judge,landysChambers
3 changes: 2 additions & 1 deletion shared/admin-tools/user/add-user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ const checkParams = params => {
'reportersOffice',
'ashfordsChambers',
'buchsChambers',
'choisChambers',
'cohensChambers',
'colvinsChambers',
'copelandsChambers',
'foleysChambers',
'friedsChambers',
'galesChambers',
'goekesChambers',
'greavesChambers',
Expand All @@ -103,6 +103,7 @@ const checkParams = params => {
'negasChambers',
'parisChambers',
'pughsChambers',
'siegelsChambers',
'thorntonsChambers',
'torosChambers',
'urdasChambers',
Expand Down
2 changes: 1 addition & 1 deletion shared/src/business/entities/EntityConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export const SERVICE_INDICATOR_TYPES = {

export const STATUS_OF_MATTER_OPTIONS = [
'Awaiting Consideration',
'Awaiting Supplemental Briefs',
'Awaiting Briefs',
'Drafting',
'Reviewing Draft',
'Submitted to Chief Judge',
Expand Down
24 changes: 0 additions & 24 deletions shared/src/business/entities/caseWorksheet/CaseWorksheet.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,6 @@ import { CaseWorksheet } from './CaseWorksheet';

describe('CaseWorksheet', () => {
describe('validation', () => {
it('should be invalid when the primary issue is not a string', () => {
const worksheet = new CaseWorksheet({
primaryIssue: 1234567890,
});

expect(worksheet.getFormattedValidationErrors()!.primaryIssue).toEqual(
'Add primary issue',
);
});

it('should be invalid when the final brief due date is NOT a date string', () => {
const worksheet = new CaseWorksheet({
finalBriefDueDate: 'abcdef',
Expand All @@ -32,18 +22,4 @@ describe('CaseWorksheet', () => {
).toBeDefined();
});
});

describe('deletePrimaryIssue', () => {
it('should delete the primary issue when deletePrimaryIssue method is called', () => {
const worksheet = new CaseWorksheet({
primaryIssue: 'TEST_PRIMARY_ISSUE',
});

expect(worksheet.primaryIssue).toBeDefined();

worksheet.deletePrimaryIssue();

expect(worksheet.primaryIssue).toBeUndefined();
});
});
});
7 changes: 1 addition & 6 deletions shared/src/business/entities/caseWorksheet/CaseWorksheet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class CaseWorksheet extends JoiValidationEntity {
static VALIDATION_RULES = {
docketNumber: JoiValidationConstants.DOCKET_NUMBER.required(),
finalBriefDueDate: JoiValidationConstants.DATE.allow('').optional(),
primaryIssue: JoiValidationConstants.STRING.optional(),
primaryIssue: JoiValidationConstants.STRING.allow('').optional(),
statusOfMatter: JoiValidationConstants.STRING.valid(
...STATUS_OF_MATTER_OPTIONS,
)
Expand All @@ -30,13 +30,8 @@ export class CaseWorksheet extends JoiValidationEntity {

static VALIDATION_ERROR_MESSAGES = {
finalBriefDueDate: 'Enter a valid due date',
primaryIssue: 'Add primary issue',
};

deletePrimaryIssue(): void {
delete this.primaryIssue;
}

getValidationRules() {
return CaseWorksheet.VALIDATION_RULES;
}
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@ describe('updateCaseWorksheetInteractor', () => {

await expect(
updateCaseWorksheetInteractor(applicationContext, {
docketNumber: mockCaseWorksheet.docketNumber,
updatedProps: {},
worksheet: mockCaseWorksheet,
}),
).rejects.toThrow(UnauthorizedError);
});
Expand All @@ -34,8 +33,8 @@ describe('updateCaseWorksheetInteractor', () => {

await expect(
updateCaseWorksheetInteractor(applicationContext, {
docketNumber: mockCaseWorksheet.docketNumber,
updatedProps: {
worksheet: {
...mockCaseWorksheet,
finalBriefDueDate: 'abc', // finalBriefDueDate should be a date formatted as YYYY-MM-DD
},
}),
Expand All @@ -53,8 +52,8 @@ describe('updateCaseWorksheetInteractor', () => {
.getCaseWorksheet.mockResolvedValue(mockCaseWorksheet);

const result = await updateCaseWorksheetInteractor(applicationContext, {
docketNumber: mockCaseWorksheet.docketNumber,
updatedProps: {
worksheet: {
...mockCaseWorksheet,
finalBriefDueDate: mockFinalBriefDueDate,
},
});
Expand Down Expand Up @@ -90,8 +89,8 @@ describe('updateCaseWorksheetInteractor', () => {
.getCaseWorksheet.mockResolvedValue(mockCaseWorksheet);

const result = await updateCaseWorksheetInteractor(applicationContext, {
docketNumber: mockCaseWorksheet.docketNumber,
updatedProps: {
worksheet: {
...mockCaseWorksheet,
finalBriefDueDate: mockFinalBriefDueDate,
},
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,9 @@ import { User } from '@shared/business/entities/User';
export const updateCaseWorksheetInteractor = async (
applicationContext: IApplicationContext,
{
docketNumber,
updatedProps,
worksheet,
}: {
docketNumber: string;
updatedProps: Record<string, string | undefined>;
worksheet: RawCaseWorksheet;
},
): Promise<RawCaseWorksheet> => {
const user = applicationContext.getCurrentUser();
Expand All @@ -41,18 +39,7 @@ export const updateCaseWorksheetInteractor = async (
});
}

const caseWorksheet = await applicationContext
.getPersistenceGateway()
.getCaseWorksheet({
applicationContext,
docketNumber,
});

const caseWorksheetEntity = new CaseWorksheet({
...caseWorksheet,
...updatedProps,
docketNumber,
}).validate();
const caseWorksheetEntity = new CaseWorksheet(worksheet).validate();

const rawCaseWorksheet = caseWorksheetEntity.toRawObject();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,16 @@ describe('createMessageInteractor', () => {
});

it('creates the message', async () => {
const mockAttachments = [
{
documentId: 'b1130321-0a76-43bc-b3eb-64a18f079873',
},
{
documentId: 'b1130321-0a69-43bc-b3eb-64a18f079873',
},
];

const messageData = {
attachments: [
{
documentId: 'b1130321-0a76-43bc-b3eb-64a18f079873',
},
],
docketNumber: '101-20',
isRepliedTo: false,
message: "How's it going?",
Expand Down Expand Up @@ -70,6 +74,7 @@ describe('createMessageInteractor', () => {

await createMessageInteractor(applicationContext, {
...messageData,
attachments: mockAttachments,
});

expect(
Expand All @@ -80,6 +85,7 @@ describe('createMessageInteractor', () => {
.message,
).toMatchObject({
...messageData,
attachments: mockAttachments,
caseStatus: CASE_STATUS_TYPES.generalDocket,
caseTitle: 'Guy Fieri',
docketNumber: '101-20',
Expand Down
Loading

0 comments on commit e5d8b1a

Please sign in to comment.