-
- File ID
-
-
- This field is required.
-
-
-
- Type
-
-
- This field is required.
-
-
@@ -69,24 +25,71 @@ Create Planning Review
+
+
+ Submitted to ALC
+
+
+
+
+
+
+ Document Name
+
+
+
+
+
+
+
+
+
+
+ Due Date
+
+
+
+
+
+
+ Description
+
+
diff --git a/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.scss b/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.scss
index 82f3eb6a10..50fe910c77 100644
--- a/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.scss
+++ b/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.scss
@@ -9,3 +9,7 @@
grid-row-gap: 24px;
margin-bottom: 24px;
}
+
+.description {
+ width: 100%;
+}
diff --git a/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.spec.ts b/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.spec.ts
index 038ef87ba2..4aa416f11e 100644
--- a/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.spec.ts
+++ b/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.spec.ts
@@ -52,7 +52,6 @@ describe('CreatePlanningReviewDialogComponent', () => {
fixture.detectChanges();
const compiled = fixture.debugElement.nativeElement;
- expect(compiled.querySelector('#fileNumber')).toBeTruthy();
expect(compiled.querySelector('#type')).toBeTruthy();
});
});
diff --git a/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.ts b/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.ts
index 5e7b0444b4..c23c38c897 100644
--- a/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.ts
+++ b/alcs-frontend/src/app/features/board/dialogs/planning-review/create/create-planning-review-dialog.component.ts
@@ -2,13 +2,17 @@ import { Component, Inject, OnDestroy, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
import { ActivatedRoute, Router } from '@angular/router';
+import { Moment } from 'moment';
import { Subject, takeUntil } from 'rxjs';
import { ApplicationRegionDto } from '../../../../../services/application/application-code.dto';
import { ApplicationLocalGovernmentDto } from '../../../../../services/application/application-local-government/application-local-government.dto';
import { ApplicationLocalGovernmentService } from '../../../../../services/application/application-local-government/application-local-government.service';
import { ApplicationService } from '../../../../../services/application/application.service';
import { CardService } from '../../../../../services/card/card.service';
-import { CreatePlanningReviewDto } from '../../../../../services/planning-review/planning-review.dto';
+import {
+ CreatePlanningReviewDto,
+ PlanningReviewTypeDto,
+} from '../../../../../services/planning-review/planning-review.dto';
import { PlanningReviewService } from '../../../../../services/planning-review/planning-review.service';
@Component({
@@ -20,18 +24,25 @@ export class CreatePlanningReviewDialogComponent implements OnInit, OnDestroy {
$destroy = new Subject
();
regions: ApplicationRegionDto[] = [];
localGovernments: ApplicationLocalGovernmentDto[] = [];
+ types: PlanningReviewTypeDto[] = [];
isLoading = false;
- fileNumberControl = new FormControl('', [Validators.required]);
regionControl = new FormControl(null, [Validators.required]);
localGovernmentControl = new FormControl(null, [Validators.required]);
typeControl = new FormControl(null, [Validators.required]);
+ documentNameControl = new FormControl(null, [Validators.required]);
+ descriptionControl = new FormControl(null, [Validators.required]);
+ submissionDateControl = new FormControl(null, [Validators.required]);
+ dueDateControl = new FormControl(null);
createForm = new FormGroup({
- fileNumber: this.fileNumberControl,
region: this.regionControl,
localGovernment: this.localGovernmentControl,
type: this.typeControl,
+ documentName: this.documentNameControl,
+ description: this.descriptionControl,
+ submissionDate: this.submissionDateControl,
+ dueDate: this.dueDateControl,
});
constructor(
@@ -58,6 +69,8 @@ export class CreatePlanningReviewDialogComponent implements OnInit, OnDestroy {
this.applicationService.$applicationRegions.pipe(takeUntil(this.$destroy)).subscribe((regions) => {
this.regions = regions;
});
+
+ this.loadTypes();
}
async onSubmit() {
@@ -65,11 +78,13 @@ export class CreatePlanningReviewDialogComponent implements OnInit, OnDestroy {
this.isLoading = true;
const formValues = this.createForm.getRawValue();
const planningReview: CreatePlanningReviewDto = {
- fileNumber: formValues.fileNumber!.trim(),
regionCode: formValues.region!,
localGovernmentUuid: formValues.localGovernment!,
- type: formValues.type!,
- boardCode: this.data.currentBoardCode,
+ typeCode: formValues.type!,
+ submissionDate: formValues.submissionDate!.valueOf(),
+ description: formValues.description!,
+ documentName: formValues.documentName!,
+ dueDate: formValues.dueDate?.valueOf(),
};
const res = await this.planningReviewService.create(planningReview);
@@ -95,4 +110,11 @@ export class CreatePlanningReviewDialogComponent implements OnInit, OnDestroy {
this.$destroy.next();
this.$destroy.complete();
}
+
+ private async loadTypes() {
+ const types = await this.planningReviewService.fetchTypes();
+ if (types) {
+ this.types = types;
+ }
+ }
}
diff --git a/alcs-frontend/src/app/features/board/dialogs/planning-review/planning-review-dialog.component.html b/alcs-frontend/src/app/features/board/dialogs/planning-review/planning-review-dialog.component.html
index df9bac4e20..54100e7d26 100644
--- a/alcs-frontend/src/app/features/board/dialogs/planning-review/planning-review-dialog.component.html
+++ b/alcs-frontend/src/app/features/board/dialogs/planning-review/planning-review-dialog.component.html
@@ -1,6 +1,6 @@
-
Non-Application
+
Planning Review
@@ -9,12 +9,29 @@
Non-Application
+
+
+
-
+
{{ planningReview.localGovernment.name }} - {{ planningReview.region.label }} Region
+
+
+
+
+
+
Due Date: {{ planningReferral.dueDate | momentFormat }}
+