From 1ac0b57952cae83ee54ea986e916ade0b171a1be Mon Sep 17 00:00:00 2001 From: Felipe Barreta Date: Tue, 8 Oct 2024 11:29:01 -0700 Subject: [PATCH 001/174] ALCS-2254 DTO and map change --- .../alcs/incoming-files/incoming-file.controller.ts | 12 +++++++++--- .../src/alcs/incoming-files/incoming-file.dto.ts | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts b/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts index 1fbd4d026..38c7f3ad1 100644 --- a/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts +++ b/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts @@ -57,7 +57,9 @@ export class IncomingFileController { applicant: incomingFile.applicant, boardCode: incomingFile.code, type: CARD_TYPE.APP, - assignee: this.mapper.map(user, User, UserDto), + assignee: incomingFile.name + ? this.mapper.map(user, User, UserDto) + : null, highPriority: incomingFile.high_priority, activeDays: incomingFile.active_days, }; @@ -77,7 +79,9 @@ export class IncomingFileController { applicant: incomingFile.applicant, boardCode: incomingFile.code, type: CARD_TYPE.APP, - assignee: this.mapper.map(user, User, UserDto), + assignee: incomingFile.name + ? this.mapper.map(user, User, UserDto) + : null, highPriority: incomingFile.high_priority, activeDays: incomingFile.active_days, }; @@ -97,7 +101,9 @@ export class IncomingFileController { applicant: incomingFile.applicant, boardCode: incomingFile.code, type: CARD_TYPE.PLAN, - assignee: this.mapper.map(user, User, UserDto), + assignee: incomingFile.name + ? this.mapper.map(user, User, UserDto) + : null, highPriority: incomingFile.high_priority, activeDays: incomingFile.active_days, }; diff --git a/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts b/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts index 2f232d4e5..177b3a49f 100644 --- a/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts +++ b/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts @@ -5,7 +5,7 @@ export type IncomingFileDto = { applicant: string; boardCode: string; type: string; - assignee: UserDto; + assignee: UserDto | null; highPriority: boolean; activeDays: number; }; From cdb41e49352a35e688fb28dfcc07d3236e177e4b Mon Sep 17 00:00:00 2001 From: Felipe Barreta Date: Wed, 9 Oct 2024 10:38:21 -0700 Subject: [PATCH 002/174] ALCS-2138 Change component properties --- .../inline-textarea-edit.component.scss | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss b/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss index d56cad791..dd73faea4 100644 --- a/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss +++ b/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss @@ -9,19 +9,15 @@ font-size: 16px; width: 100%; min-height: 96px; - margin-left: -8px; - margin-right: -8px; } .content { display: flex; align-items: stretch; justify-content: space-between; - border-radius: 2px; + border-radius: 4px; font-size: 16px; - border: 2px solid transparent; - margin-left: -8px; - margin-right: -8px; + border: 1px solid colors.$grey; min-height: 28px; } From 16a07616a70f45ef082be2b0f49d768380c399ef Mon Sep 17 00:00:00 2001 From: abradat Date: Wed, 9 Oct 2024 11:45:39 -0700 Subject: [PATCH 003/174] Add greyscale on paused files in commissioner view --- .../decision-meeting/decision-meeting.dto.ts | 1 + .../incoming-file/incoming-file.dto.ts | 1 + .../meeting-overview.component.html | 4 ++- .../meeting-overview.component.scss | 5 ++++ .../application-time-tracking.service.ts | 26 +++++++++++++++++++ .../alcs/application/application.service.ts | 6 +++-- .../incoming-file.controller.ts | 11 ++++++++ .../alcs/incoming-files/incoming-file.dto.ts | 1 + .../meetings/decision-meeting.controller.ts | 12 ++++++++- .../src/alcs/meetings/decision-meeting.dto.ts | 1 + 10 files changed, 64 insertions(+), 4 deletions(-) diff --git a/alcs-frontend/src/app/services/decision-meeting/decision-meeting.dto.ts b/alcs-frontend/src/app/services/decision-meeting/decision-meeting.dto.ts index 8ec4c659c..4592da9c3 100644 --- a/alcs-frontend/src/app/services/decision-meeting/decision-meeting.dto.ts +++ b/alcs-frontend/src/app/services/decision-meeting/decision-meeting.dto.ts @@ -8,6 +8,7 @@ export type UpcomingMeetingDto = { boardCode: string; assignee: AssigneeDto; type: CardType; + isPaused: boolean; }; export type UpcomingMeetingBoardMapDto = Record; diff --git a/alcs-frontend/src/app/services/incoming-file/incoming-file.dto.ts b/alcs-frontend/src/app/services/incoming-file/incoming-file.dto.ts index 5c13e0479..b4d91073b 100644 --- a/alcs-frontend/src/app/services/incoming-file/incoming-file.dto.ts +++ b/alcs-frontend/src/app/services/incoming-file/incoming-file.dto.ts @@ -9,6 +9,7 @@ export type IncomingFileDto = { type: CardType; highPriority: boolean; activeDays: number; + isPaused: boolean; }; export type IncomingFileBoardMapDto = Record; diff --git a/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.html b/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.html index 452d483d3..92024663b 100644 --- a/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.html +++ b/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.html @@ -90,6 +90,7 @@
None
class="meeting-card" [ngClass]="{ 'meeting-highlighted': meeting.isHighlighted, + 'file-paused': meeting.isPaused, }" >
@@ -118,7 +119,8 @@
None
(click)="openMeetings(incomingFile.fileNumber, incomingFile.type)" class="meeting-card" [ngClass]="{ - 'meeting-highlighted': incomingFile.isHighlighted + 'meeting-highlighted': incomingFile.isHighlighted, + 'file-paused': incomingFile.isPaused, }" >
diff --git a/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.scss b/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.scss index 8ff4fed64..d304b2c10 100644 --- a/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.scss +++ b/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.scss @@ -316,3 +316,8 @@ mat-panel-description { .incoming-files-panel { margin-top: 16px; } + +.file-paused { + opacity: 0.8; + background-color: colors.$paused-color; +} diff --git a/services/apps/alcs/src/alcs/application/application-time-tracking.service.ts b/services/apps/alcs/src/alcs/application/application-time-tracking.service.ts index 84c5fb2fa..135c628c7 100644 --- a/services/apps/alcs/src/alcs/application/application-time-tracking.service.ts +++ b/services/apps/alcs/src/alcs/application/application-time-tracking.service.ts @@ -48,6 +48,32 @@ export class ApplicationTimeTrackingService { return result; } + async getPausedStatusByUuid(applicationUuids: string[]) { + const pausedCalculations = (await this.applicationPausedRepository.query( + ` + SELECT application_uuid, + count(uuid) + FROM alcs.application_paused + WHERE start_date < NOW() + AND COALESCE(end_date, NOW()) >= NOW() + AND application_uuid = ANY($1) + GROUP BY application_uuid;`, + [`{${applicationUuids.join(', ')}}`], + )) as { + application_uuid: string; + count: number; + }[]; + + const result = new Map(); + for (const appId of applicationUuids) { + const isPaused = pausedCalculations.find( + (row) => row.application_uuid === appId, + ); + result.set(appId, !!isPaused); + } + return result; + } + async getTimes(applicationUuids: string[]) { const activeCounts = (await this.applicationPausedRepository.query( ` diff --git a/services/apps/alcs/src/alcs/application/application.service.ts b/services/apps/alcs/src/alcs/application/application.service.ts index ac8aac6a1..4227c9c3a 100644 --- a/services/apps/alcs/src/alcs/application/application.service.ts +++ b/services/apps/alcs/src/alcs/application/application.service.ts @@ -481,6 +481,7 @@ export class ApplicationService { async getIncomingApplicationFiles(): Promise< { + uuid: string; file_number: string; applicant: string; code: string; @@ -506,7 +507,7 @@ export class ApplicationService { SELECT * FROM alcs.calculate_active_days(ARRAY(SELECT fa."uuid" FROM filtered_applications fa)) ) - SELECT a.file_number, a.applicant, board.code, u.name, u.given_name, u.family_name, c.high_priority, calc.active_days FROM alcs.application a + SELECT a.uuid, a.file_number, a.applicant, board.code, u.name, u.given_name, u.family_name, c.high_priority, calc.active_days FROM alcs.application a INNER JOIN alcs.card c ON c."uuid" = a.card_uuid INNER JOIN calculated calc ON a."uuid" = calc.application_uuid INNER JOIN alcs.board board on c.board_uuid = board.uuid @@ -519,6 +520,7 @@ export class ApplicationService { async getIncomingReconsiderationFiles(): Promise< { + uuid: string; file_number: string; applicant: string; code: string; @@ -545,7 +547,7 @@ export class ApplicationService { SELECT * FROM alcs.calculate_active_days(ARRAY(SELECT fa."application_uuid" FROM filtered_applications fa)) ) - SELECT a.file_number, a.applicant, board.code, u.name, u.given_name, u.family_name, c.high_priority, calc.active_days FROM alcs.application a + SELECT a.uuid, a.file_number, a.applicant, board.code, u.name, u.given_name, u.family_name, c.high_priority, calc.active_days FROM alcs.application a INNER JOIN alcs.application_reconsideration ar on ar.application_uuid = a.uuid INNER JOIN alcs.card c ON c."uuid" = ar.card_uuid INNER JOIN calculated calc ON a."uuid" = calc.application_uuid diff --git a/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts b/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts index 38c7f3ad1..e84086efe 100644 --- a/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts +++ b/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.ts @@ -12,6 +12,7 @@ import { UserDto } from '../../user/user.dto'; import { CARD_TYPE } from '../card/card-type/card-type.entity'; import { User } from '../../user/user.entity'; import { PlanningReviewService } from '../planning-review/planning-review.service'; +import { ApplicationTimeTrackingService } from '../application/application-time-tracking.service'; @ApiOAuth2(config.get('KEYCLOAK.SCOPES')) @Controller('incoming-files') @@ -20,6 +21,7 @@ export class IncomingFileController { constructor( private applicationService: ApplicationService, private planningReviewService: PlanningReviewService, + private applicationTimeTrackingService: ApplicationTimeTrackingService, @InjectMapper() private mapper: Mapper, ) {} @@ -47,6 +49,9 @@ export class IncomingFileController { private async getMappedIncomingApplications() { const incomingApplications = await this.applicationService.getIncomingApplicationFiles(); + const appIds = incomingApplications.map((app) => app.uuid); + const pausedStatuses = + await this.applicationTimeTrackingService.getPausedStatusByUuid(appIds); return incomingApplications.map((incomingFile): IncomingFileDto => { const user = new User(); user.name = incomingFile.name; @@ -62,6 +67,7 @@ export class IncomingFileController { : null, highPriority: incomingFile.high_priority, activeDays: incomingFile.active_days, + isPaused: pausedStatuses.get(incomingFile.uuid)!, }; }); } @@ -69,6 +75,9 @@ export class IncomingFileController { private async getMappedIncomingReconsiderations() { const incomingReconsiderations = await this.applicationService.getIncomingReconsiderationFiles(); + const reconIds = incomingReconsiderations.map((recon) => recon.uuid); + const pausedStatuses = + await this.applicationTimeTrackingService.getPausedStatusByUuid(reconIds); return incomingReconsiderations.map((incomingFile): IncomingFileDto => { const user = new User(); user.name = incomingFile.name; @@ -84,6 +93,7 @@ export class IncomingFileController { : null, highPriority: incomingFile.high_priority, activeDays: incomingFile.active_days, + isPaused: pausedStatuses.get(incomingFile.uuid)!, }; }); } @@ -106,6 +116,7 @@ export class IncomingFileController { : null, highPriority: incomingFile.high_priority, activeDays: incomingFile.active_days, + isPaused: false, }; }); } diff --git a/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts b/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts index 177b3a49f..0ef23822f 100644 --- a/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts +++ b/services/apps/alcs/src/alcs/incoming-files/incoming-file.dto.ts @@ -8,6 +8,7 @@ export type IncomingFileDto = { assignee: UserDto | null; highPriority: boolean; activeDays: number; + isPaused: boolean; }; export type IncomingFileBoardMapDto = Record; diff --git a/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.ts b/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.ts index 32daf27aa..f583bca42 100644 --- a/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.ts +++ b/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.ts @@ -32,6 +32,7 @@ import { UpcomingMeetingBoardMapDto, UpcomingMeetingDto, } from './decision-meeting.dto'; +import { ApplicationTimeTrackingService } from '../application/application-time-tracking.service'; @ApiOAuth2(config.get('KEYCLOAK.SCOPES')) @Controller('decision-meeting') @@ -43,6 +44,7 @@ export class DecisionMeetingController { private reconsiderationService: ApplicationReconsiderationService, private planningReferralService: PlanningReferralService, private planningReviewMeetingService: PlanningReviewMeetingService, + private applicationTimeTrackingService: ApplicationTimeTrackingService, @InjectMapper() private mapper: Mapper, ) {} @@ -137,6 +139,10 @@ export class DecisionMeetingController { const upcomingApplicationMeetings = await this.appDecisionMeetingService.getUpcomingApplicationMeetings(); const allAppIds = upcomingApplicationMeetings.map((a) => a.uuid); + const pausedStatuses = + await this.applicationTimeTrackingService.getPausedStatusByUuid( + allAppIds, + ); const allApps = await this.applicationService.getMany({ uuid: Any(allAppIds), }); @@ -151,6 +157,7 @@ export class DecisionMeetingController { boardCode: app.card!.board.code, type: CARD_TYPE.APP, assignee: this.mapper.map(app.card!.assignee, User, UserDto), + isPaused: pausedStatuses.get(app.uuid)!, }; }); } @@ -160,6 +167,8 @@ export class DecisionMeetingController { await this.appDecisionMeetingService.getUpcomingReconsiderationMeetings(); const reconIds = upcomingReconsiderationMeetings.map((a) => a.uuid); + const pausedStatuses = + await this.applicationTimeTrackingService.getPausedStatusByUuid(reconIds); const reconsiderations = await this.reconsiderationService.getMany(reconIds); return reconsiderations.map((recon): UpcomingMeetingDto => { @@ -173,6 +182,7 @@ export class DecisionMeetingController { boardCode: recon.card!.board.code, type: CARD_TYPE.APP, assignee: this.mapper.map(recon.card!.assignee, User, UserDto), + isPaused: pausedStatuses.get(recon.uuid)!, }; }); } @@ -180,7 +190,6 @@ export class DecisionMeetingController { private async getMappedPlanningReviewMeetings() { const upcomingMeetings = await this.planningReviewMeetingService.getUpcomingMeetings(); - const planningReviewIds = upcomingMeetings.map((a) => a.uuid); const planningReferrals = await this.planningReferralService.getManyByPlanningReview( @@ -208,6 +217,7 @@ export class DecisionMeetingController { User, UserDto, ), + isPaused: false, }, ]; }, diff --git a/services/apps/alcs/src/alcs/meetings/decision-meeting.dto.ts b/services/apps/alcs/src/alcs/meetings/decision-meeting.dto.ts index a38e7b89a..b07cea645 100644 --- a/services/apps/alcs/src/alcs/meetings/decision-meeting.dto.ts +++ b/services/apps/alcs/src/alcs/meetings/decision-meeting.dto.ts @@ -25,6 +25,7 @@ export type UpcomingMeetingDto = { boardCode: string; type: string; assignee: UserDto; + isPaused: boolean; }; export type UpcomingMeetingBoardMapDto = Record; From 08ce80cf3f347ee535e5698133e6e4d7295efc27 Mon Sep 17 00:00:00 2001 From: abradat Date: Wed, 9 Oct 2024 13:34:53 -0700 Subject: [PATCH 004/174] Fix CI tests failing --- .../incoming-file.service.spec.ts | 6 +++ .../meeting-overview.component.spec.ts | 1 + .../incoming-file.controller.spec.ts | 46 +++++++++++++++++++ .../decision-meeting.controller.spec.ts | 17 ++++++- 4 files changed, 69 insertions(+), 1 deletion(-) diff --git a/alcs-frontend/src/app/services/incoming-file/incoming-file.service.spec.ts b/alcs-frontend/src/app/services/incoming-file/incoming-file.service.spec.ts index d1f5fa23a..bd52a167c 100644 --- a/alcs-frontend/src/app/services/incoming-file/incoming-file.service.spec.ts +++ b/alcs-frontend/src/app/services/incoming-file/incoming-file.service.spec.ts @@ -38,6 +38,7 @@ describe('ApplicationIncomingFileService', () => { assignee: null, highPriority: false, activeDays: 10, + isPaused: true, }, { fileNumber: '2', @@ -47,6 +48,7 @@ describe('ApplicationIncomingFileService', () => { assignee: null, highPriority: true, activeDays: 12, + isPaused: true, }, { fileNumber: '3', @@ -56,6 +58,7 @@ describe('ApplicationIncomingFileService', () => { assignee: null, highPriority: true, activeDays: 30, + isPaused: false, }, ], }; @@ -70,6 +73,7 @@ describe('ApplicationIncomingFileService', () => { assignee: null, highPriority: true, activeDays: 30, + isPaused: false, }, { fileNumber: '2', @@ -79,6 +83,7 @@ describe('ApplicationIncomingFileService', () => { assignee: null, highPriority: true, activeDays: 12, + isPaused: true, }, { fileNumber: '1', @@ -88,6 +93,7 @@ describe('ApplicationIncomingFileService', () => { assignee: null, highPriority: false, activeDays: 10, + isPaused: true, }, ], }; diff --git a/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.spec.ts b/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.spec.ts index 08b06c481..3e19b660b 100644 --- a/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.spec.ts +++ b/alcs-frontend/src/app/shared/meeting-overview/meeting-overview.component.spec.ts @@ -88,6 +88,7 @@ describe('MeetingOverviewComponent', () => { fileNumber: '', meetingDate: 0, type: CardType.APP, + isPaused: true, }, ], }); diff --git a/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.spec.ts b/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.spec.ts index 8999609d7..bbd425744 100644 --- a/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.spec.ts +++ b/services/apps/alcs/src/alcs/incoming-files/incoming-file.controller.spec.ts @@ -8,16 +8,19 @@ import { classes } from 'automapper-classes'; import { mockKeyCloakProviders } from '../../../test/mocks/mockTypes'; import { ClsService } from 'nestjs-cls'; import { UserProfile } from '../../common/automapper/user.automapper.profile'; +import { ApplicationTimeTrackingService } from '../application/application-time-tracking.service'; describe('IncomingFileController', () => { let controller: IncomingFileController; let mockApplicationService: DeepMocked; + let mockApplicationTimeTrackingService: DeepMocked; let mockPlanningReviewService: DeepMocked; const CODE_ONE = 'CODE_ONE'; const CODE_TWO = 'CODE_TWO'; const CODE_THREE = 'CODE_THREE'; let mockApplications = [ { + uuid: 'uuid-1', file_number: '1', applicant: 'applicant1', code: CODE_ONE, @@ -28,6 +31,7 @@ describe('IncomingFileController', () => { active_days: 10, }, { + uuid: 'uuid-2', file_number: '2', applicant: 'applicant2', code: CODE_ONE, @@ -40,6 +44,7 @@ describe('IncomingFileController', () => { ]; let mockReconsiderations = [ { + uuid: 'uuid-3', file_number: '3', applicant: 'applicant1', code: CODE_TWO, @@ -50,6 +55,7 @@ describe('IncomingFileController', () => { active_days: 10, }, { + uuid: 'uuid-4', file_number: '4', applicant: 'applicant2', code: CODE_TWO, @@ -62,6 +68,7 @@ describe('IncomingFileController', () => { ]; let mockPlanningReviews = [ { + uuid: 'uuid-5', file_number: '5', applicant: 'applicant1', code: CODE_THREE, @@ -72,6 +79,7 @@ describe('IncomingFileController', () => { active_days: 10, }, { + uuid: 'uuid-6', file_number: '6', applicant: 'applicant2', code: CODE_THREE, @@ -83,9 +91,25 @@ describe('IncomingFileController', () => { }, ]; + let mockedApplicationsPausedStatuses: Map = new Map(); + let mockedReconsPausedStatuses: Map = new Map(); + let mockedPausedStatuses: Map = new Map(); + + mockedApplicationsPausedStatuses.set('uuid-1', true); + mockedApplicationsPausedStatuses.set('uuid-2', true); + + mockedReconsPausedStatuses.set('uuid-3', false); + mockedReconsPausedStatuses.set('uuid-4', false); + + mockedPausedStatuses.set('uuid-1', true); + mockedPausedStatuses.set('uuid-2', true); + mockedPausedStatuses.set('uuid-3', true); + mockedPausedStatuses.set('uuid-4', true); + beforeEach(async () => { mockApplicationService = createMock(); mockPlanningReviewService = createMock(); + mockApplicationTimeTrackingService = createMock(); const module: TestingModule = await Test.createTestingModule({ imports: [ @@ -104,6 +128,10 @@ describe('IncomingFileController', () => { provide: PlanningReviewService, useValue: mockPlanningReviewService, }, + { + provide: ApplicationTimeTrackingService, + useValue: mockApplicationTimeTrackingService, + }, { provide: ClsService, useValue: {}, @@ -130,6 +158,9 @@ describe('IncomingFileController', () => { [], ); + mockApplicationTimeTrackingService.getPausedStatusByUuid.mockResolvedValue( + mockedApplicationsPausedStatuses, + ); const res = await controller.getIncomingFiles(); expect(Object.keys(res).length).toEqual(1); @@ -137,6 +168,7 @@ describe('IncomingFileController', () => { expect(res.CODE_ONE.length).toEqual(2); expect(res.CODE_ONE[0].highPriority).toEqual(true); expect(res.CODE_ONE[1].activeDays).toEqual(20); + expect(res.CODE_ONE[0].isPaused).toEqual(true); }); it('should load and map incoming reconsiderations', async () => { @@ -148,6 +180,9 @@ describe('IncomingFileController', () => { [], ); + mockApplicationTimeTrackingService.getPausedStatusByUuid.mockResolvedValue( + mockedReconsPausedStatuses, + ); const res = await controller.getIncomingFiles(); expect(Object.keys(res).length).toEqual(1); @@ -155,6 +190,7 @@ describe('IncomingFileController', () => { expect(res.CODE_TWO.length).toEqual(2); expect(res.CODE_TWO[0].highPriority).toEqual(true); expect(res.CODE_TWO[1].activeDays).toEqual(20); + expect(res.CODE_TWO[0].isPaused).toEqual(false); }); it('should load and map incoming planning reviews', async () => { @@ -166,6 +202,9 @@ describe('IncomingFileController', () => { mockPlanningReviews, ); + mockApplicationTimeTrackingService.getPausedStatusByUuid.mockResolvedValue( + new Map(), + ); const res = await controller.getIncomingFiles(); expect(Object.keys(res).length).toEqual(1); @@ -173,6 +212,7 @@ describe('IncomingFileController', () => { expect(res.CODE_THREE.length).toEqual(2); expect(res.CODE_THREE[0].highPriority).toEqual(true); expect(res.CODE_THREE[1].activeDays).toEqual(20); + expect(res.CODE_THREE[0].isPaused).toEqual(false); }); it('should load and map applications, reconsiderations, and planning reviews', async () => { @@ -186,6 +226,9 @@ describe('IncomingFileController', () => { mockPlanningReviews, ); + mockApplicationTimeTrackingService.getPausedStatusByUuid.mockResolvedValue( + mockedPausedStatuses, + ); const res = await controller.getIncomingFiles(); expect(Object.keys(res).length).toEqual(3); @@ -193,13 +236,16 @@ describe('IncomingFileController', () => { expect(res.CODE_ONE.length).toEqual(2); expect(res.CODE_ONE[0].highPriority).toEqual(true); expect(res.CODE_ONE[1].activeDays).toEqual(20); + expect(res.CODE_ONE[0].isPaused).toEqual(true); expect(res.CODE_TWO).toBeDefined(); expect(res.CODE_TWO.length).toEqual(2); expect(res.CODE_TWO[0].highPriority).toEqual(true); expect(res.CODE_TWO[1].activeDays).toEqual(20); + expect(res.CODE_TWO[0].isPaused).toEqual(true); expect(res.CODE_THREE).toBeDefined(); expect(res.CODE_THREE.length).toEqual(2); expect(res.CODE_THREE[0].highPriority).toEqual(true); expect(res.CODE_THREE[1].activeDays).toEqual(20); + expect(res.CODE_THREE[1].isPaused).toEqual(false); }); }); diff --git a/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.spec.ts b/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.spec.ts index 6eb1ecce2..b2a5d8a3d 100644 --- a/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.spec.ts +++ b/services/apps/alcs/src/alcs/meetings/decision-meeting.controller.spec.ts @@ -24,6 +24,7 @@ import { CreateApplicationDecisionMeetingDto, DecisionMeetingDto, } from './decision-meeting.dto'; +import { ApplicationTimeTrackingService } from '../application/application-time-tracking.service'; describe('DecisionMeetingController', () => { let controller: DecisionMeetingController; @@ -33,9 +34,13 @@ describe('DecisionMeetingController', () => { let mockEmailService: DeepMocked; let mockPlanningReferralService: DeepMocked; let mockPlanningReviewMeetingService: DeepMocked; + let mockApplicationTimeTrackingService: DeepMocked; let mockApplication; let mockMeeting; + let mockedApplicationsPausedStatuses: Map = new Map(); + let mockedReconsiderationsPausedStatuses: Map = new Map(); + beforeEach(async () => { mockMeetingService = createMock(); mockApplicationService = createMock(); @@ -43,6 +48,7 @@ describe('DecisionMeetingController', () => { mockPlanningReferralService = createMock(); mockEmailService = createMock(); mockPlanningReviewMeetingService = createMock(); + mockApplicationTimeTrackingService = createMock(); const module: TestingModule = await Test.createTestingModule({ imports: [ @@ -78,6 +84,10 @@ describe('DecisionMeetingController', () => { provide: PlanningReviewMeetingService, useValue: mockPlanningReviewMeetingService, }, + { + provide: ApplicationTimeTrackingService, + useValue: mockApplicationTimeTrackingService, + }, { provide: ClsService, useValue: {}, @@ -164,7 +174,9 @@ describe('DecisionMeetingController', () => { it('should load and map application meetings', async () => { mockApplicationService.getMany.mockResolvedValue([mockApplication]); mockReconsiderationService.getMany.mockResolvedValue([]); - + mockApplicationTimeTrackingService.getPausedStatusByUuid.mockResolvedValue( + mockedApplicationsPausedStatuses, + ); mockApplication.card!.board = { code: 'CODE', } as Board; @@ -187,6 +199,9 @@ describe('DecisionMeetingController', () => { mockApplicationService.getMany.mockResolvedValue([]); const reconMock = initApplicationReconsiderationMockEntity(mockApplication); + mockApplicationTimeTrackingService.getPausedStatusByUuid.mockResolvedValue( + mockedApplicationsPausedStatuses, + ); reconMock.card!.board = { code: 'CODE', } as Board; From c988a907c73f3ea1b0bdc81771f4947c1aef5c38 Mon Sep 17 00:00:00 2001 From: Felipe Barreta Date: Wed, 9 Oct 2024 14:45:30 -0700 Subject: [PATCH 005/174] ALCS-2138 Padding and font adjustment --- .../inline-textarea-edit/inline-textarea-edit.component.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss b/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss index dd73faea4..2e72748af 100644 --- a/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss +++ b/alcs-frontend/src/app/shared/inline-editors/inline-textarea-edit/inline-textarea-edit.component.scss @@ -22,7 +22,7 @@ } .text { - padding: 8px; + padding: 16px 16px 18px 8px; } .content:hover { @@ -56,8 +56,8 @@ } .placeholder { - font-style: italic; color: colors.$grey; + padding: 8px; } .editable:hover { From b09ef682f813d8d36d9e9ddf519984796da02a53 Mon Sep 17 00:00:00 2001 From: Tristan Slater <1631008+trslater@users.noreply.github.com> Date: Wed, 9 Oct 2024 15:21:58 -0700 Subject: [PATCH 006/174] Add commissioner goto button for commissioner detail view --- .../header/header.component.html | 12 +++ .../header/header.component.ts | 94 ++++++++++++++++++- 2 files changed, 101 insertions(+), 5 deletions(-) diff --git a/alcs-frontend/src/app/features/planning-review/header/header.component.html b/alcs-frontend/src/app/features/planning-review/header/header.component.html index ad734f244..104bd2e30 100644 --- a/alcs-frontend/src/app/features/planning-review/header/header.component.html +++ b/alcs-frontend/src/app/features/planning-review/header/header.component.html @@ -26,6 +26,18 @@
{{ planningReview.fileNumber }} ({{ planningReview.documentName }})
arrow_right_alt
+ + + At least one structure is required + +
+ +
+ + Selected proposed structure type(s) will determine the proposal questions below + +
+ + + +
+ +
+ Please refer to + Farm Structures in the ALR + on the ALC website for more detail. +
+ + + +
+ warning +
This field is required
+
+
Characters left: {{ 4000 - soilStructureFarmUseReasonText.textLength }}
+
+ +
+ +
Include the area, yields, crop types, and farm equipment size and attachments
+ + + +
+ warning +
This field is required
+
+
Characters left: {{ 4000 - soilAgriParcelActivityText.textLength }}
+
+
+ + +
+ +
+ Please refer to + Housing in the ALR + on the ALC website for more detail. +
+ + + +
+ warning +
This field is required
+
+
Characters left: {{ 4000 - soilStructureResidentialUseReasonText.textLength }}
+
+
+ + +
+ +
+ Please refer to + Housing in the ALR + on the ALC website for more detail. +
+ + + +
+ warning +
This field is required
+
+
Characters left: {{ 4000 - structureResidentialAccessoryUseReasonText.textLength }}
+
+
+ + +
+ + + + +
+ warning +
This field is required
+
+
Characters left: {{ 4000 - soilStructureOtherUseReasonText.textLength }}
+
+
+