Skip to content

Commit

Permalink
Merge pull request #1722 from bcgov/develop
Browse files Browse the repository at this point in the history
Deployment PR - 1210
  • Loading branch information
trslater authored Jun 5, 2024
2 parents 0d67c1c + dae42e1 commit 157615b
Show file tree
Hide file tree
Showing 63 changed files with 721 additions and 598 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,16 @@ import { CardStatusService } from '../../../../services/card/card-status/card-st
import { CardType } from '../../../../shared/card/card.component';
import { BaseCodeDto } from '../../../../shared/dto/base.dto';

const DISABLED_CREATE_CARD_TYPES = [CardType.APP, CardType.NOI, CardType.NOTIFICATION];
const DISABLED_CREATE_CARD_TYPES = [
CardType.APP,
// Has been removed from `CardType`, but still exists in DB
'COV',
CardType.MODI,
CardType.NOI,
CardType.NOI_MODI,
CardType.NOTIFICATION,
CardType.RECON,
];

@Component({
selector: 'app-decision-condition-types-dialog',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
<div>{{ transferee.displayName }}</div>
<div>
{{ transferee.organizationName }}
<app-no-data *ngIf="!transferee.organizationName"></app-no-data>
<div class="no-data" *ngIf="!transferee.organizationName">
<div class="no-data-text">Not Applicable</div>
</div>
</div>
<div>
<span *ngIf="transferee.phoneNumber">{{ transferee.phoneNumber | mask : '(000) 000-0000' }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ export class DecisionInputV2Component implements OnInit, OnDestroy {
minDate = decision.date;
}

if (minDate && decision.date && decision.date > minDate) {
if (minDate && decision.date && decision.date < minDate) {
minDate = decision.date;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ <h2 class="card-title">Confirm Release Decision</h2>
<span *ngIf="wasReleased">No auto-emails will be sent</span>
</div>
</div>
<div style="margin-top: 24px;">
<div style="margin-bottom: 4px;">
<div *ngIf="!wasReleased" style="margin-top: 24px">
<div style="margin-bottom: 4px">
<mat-label>CC additional recipients on decision release email (optional):</mat-label>
</div>
<mat-form-field style="width: 100%" appearance="outline">
Expand Down Expand Up @@ -54,7 +54,7 @@ <h2 class="card-title">Confirm Release Decision</h2>

<mat-dialog-actions align="end">
<div class="button-container">
<button mat-stroked-button color="primary" [mat-dialog-close]="{confirmed: false}">Cancel</button>
<button mat-stroked-button color="primary" [mat-dialog-close]="{ confirmed: false }">Cancel</button>
<button mat-flat-button color="primary" type="button" (click)="onRelease()">Release decision</button>
</div>
</mat-dialog-actions>
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ <h3>Post-Decision</h3>

<h5 id="recons" class="post-decision-header">
Reconsideration Requests
<mat-icon class="icon" matTooltip="Create new Reconsideration Request from application tracking boards"
>info_outline
</mat-icon>
<button mat-flat-button color="primary" (click)="onCreateReconsideration()">+ Reconsideration</button>
</h5>

<section class="no-decisions" *ngIf="!reconsiderations.length">
Expand Down Expand Up @@ -116,7 +114,7 @@ <h5 id="recons" class="post-decision-header">

<h5 id="modifications" class="post-decision-header">
Modification Requests
<mat-icon class="icon" matTooltip="Create new Modification Requests from CEO tracking board">info_outline </mat-icon>
<button mat-flat-button color="primary" (click)="onCreateModification()">+ Modification</button>
</h5>

<section class="no-decisions" *ngIf="!modifications.length">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
@use '../../../../styles/colors';

.post-decision-header {
margin: 24px 0 !important;
margin-top: 24px !important;
display: flex;
align-items: center;

.icon {
margin-left: 8px;
height: 20px;
width: 20px;
font-size: 20px;
}
justify-content: space-between;
flex-wrap: wrap;
gap: 12px;
}

.post-decision {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ import { BaseCodeDto } from '../../../shared/dto/base.dto';
import { formatDateForApi } from '../../../shared/utils/api-date-formatter';
import { EditModificationDialogComponent } from './edit-modification-dialog/edit-modification-dialog.component';
import { EditReconsiderationDialogComponent } from './edit-reconsideration-dialog/edit-reconsideration-dialog.component';
import { CreateAppModificationDialogComponent } from '../../board/dialogs/app-modification/create/create-app-modification-dialog.component';
import { ApplicationLocalGovernmentDto } from '../../../services/application/application-local-government/application-local-government.dto';
import { ApplicationRegionDto } from '../../../services/application/application-code.dto';
import { CreateReconsiderationDialogComponent } from '../../board/dialogs/reconsiderations/create/create-reconsideration-dialog.component';

type LoadingReconsiderations = ApplicationReconsiderationDetailedDto & {
reconsidersDecisionsNumbers: string[];
Expand All @@ -28,6 +32,9 @@ type LoadingModifications = ApplicationModificationDto & {
export class PostDecisionComponent implements OnInit, OnDestroy {
$destroy = new Subject<void>();
fileNumber: string = '';
applicant: string = '';
localGovernment: ApplicationLocalGovernmentDto | undefined = undefined;
region: ApplicationRegionDto | undefined = undefined;
reconsiderations: LoadingReconsiderations[] = [];
modifications: LoadingModifications[] = [];
reconCodes: BaseCodeDto[] = [];
Expand All @@ -38,40 +45,43 @@ export class PostDecisionComponent implements OnInit, OnDestroy {
private applicationReconsiderationService: ApplicationReconsiderationService,
private modificationService: ApplicationModificationService,
private toastService: ToastService,
private confirmationDialogService: ConfirmationDialogService
private confirmationDialogService: ConfirmationDialogService,
) {}

ngOnInit(): void {
this.applicationDetailService.$application
.pipe(
tap(() => {
this.applicationReconsiderationService.fetchCodes();
})
}),
)
.pipe(
combineLatestWith(
this.applicationReconsiderationService.$reconsiderations,
this.applicationReconsiderationService.$codes,
this.modificationService.$modifications
)
this.modificationService.$modifications,
),
)
.pipe(takeUntil(this.$destroy))
.subscribe(([application, reconsiderations, reconCodes, modifications]) => {
if (application) {
this.fileNumber = application.fileNumber;
this.applicant = application.applicant;
this.localGovernment = application.localGovernment;
this.region = application.region;
this.reconsiderations =
reconsiderations?.map((r) => ({
...r,
reconsidersDecisionsNumbers: r.reconsidersDecisions.flatMap(
(d) => `#${d.resolutionNumber}/${d.resolutionYear}`
(d) => `#${d.resolutionNumber}/${d.resolutionYear}`,
),
})) ?? [];
this.reconCodes = reconCodes;
this.modifications =
modifications?.map((m) => ({
...m,
modifiesDecisionsNumbers: m.modifiesDecisions.flatMap(
(d) => `#${d.resolutionNumber}/${d.resolutionYear}`
(d) => `#${d.resolutionNumber}/${d.resolutionYear}`,
),
})) ?? [];
}
Expand Down Expand Up @@ -100,6 +110,50 @@ export class PostDecisionComponent implements OnInit, OnDestroy {
});
}

onCreateReconsideration() {
this.dialog
.open(CreateReconsiderationDialogComponent, {
minWidth: '600px',
maxWidth: '1100px',
maxHeight: '80vh',
width: '90%',
data: {
fileNumber: this.fileNumber,
applicant: this.applicant,
localGovernment: this.localGovernment,
region: this.region,
},
})
.afterClosed()
.subscribe(async (answer) => {
if (answer) {
await this.applicationReconsiderationService.fetchByApplication(this.fileNumber);
}
});
}

onCreateModification() {
this.dialog
.open(CreateAppModificationDialogComponent, {
minWidth: '600px',
maxWidth: '1100px',
maxHeight: '80vh',
width: '90%',
data: {
fileNumber: this.fileNumber,
applicant: this.applicant,
localGovernment: this.localGovernment,
region: this.region,
},
})
.afterClosed()
.subscribe(async (answer) => {
if (answer) {
await this.modificationService.fetchByApplication(this.fileNumber);
}
});
}

onEditModification(modification: ApplicationModificationDto) {
this.dialog
.open(EditModificationDialogComponent, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
@use '../../../../../../styles/colors';

.content {
padding: 0 16px;
}

.two-item-row {
display: grid;
grid-template-columns: 1fr 1fr;
Expand Down Expand Up @@ -66,3 +62,13 @@ mat-dialog-actions {
margin-right: 16px;
}
}

mat-dialog-content {
padding-top: 6px !important; /* Prevent labels being cut off */
padding-bottom: 0 !important;
}

mat-dialog-actions {
padding-inline: 24px;
padding-bottom: 24px;
}
Loading

0 comments on commit 157615b

Please sign in to comment.