-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add ALC Tab and L/FNG Tab * Add DTOs for Parcel and Document to minimize exposed data
- Loading branch information
Daniel Haselhan
committed
Oct 5, 2023
1 parent
905890e
commit 13945d8
Showing
34 changed files
with
533 additions
and
542 deletions.
There are no files selected for viewing
44 changes: 4 additions & 40 deletions
44
portal-frontend/src/app/features/public/application/alc-review/alc-review.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,9 @@ | ||
<div *ngIf="application"> | ||
<div *ngIf="applicationSubmission"> | ||
<div class="header"> | ||
<h3>ALC Review and Decision</h3> | ||
<div> | ||
<button | ||
[routerLink]="'/application/' + application.fileNumber + '/edit'" | ||
*ngIf="application.canEdit" | ||
mat-flat-button | ||
color="primary" | ||
> | ||
Edit Application | ||
</button> | ||
<button *ngIf="application.canReview" (click)="onReview(application.fileNumber)" mat-flat-button color="primary"> | ||
Review Application | ||
</button> | ||
</div> | ||
</div> | ||
<div | ||
*ngIf=" | ||
application.status.code === SUBMISSION_STATUS.IN_PROGRESS || | ||
application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_LG || | ||
application.status.code === SUBMISSION_STATUS.INCOMPLETE || | ||
application.status.code === SUBMISSION_STATUS.WRONG_GOV || | ||
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG | ||
" | ||
class="warning" | ||
> | ||
This section will update after the application is submitted to the ALC. | ||
</div> | ||
<div *ngIf="application.status.code === SUBMISSION_STATUS.REFUSED_TO_FORWARD_LG" class="warning"> | ||
Application not subject to Agricultural Land Commission review. | ||
</div> | ||
<div | ||
*ngIf=" | ||
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_ALC || | ||
application.status.code === SUBMISSION_STATUS.SUBMITTED_TO_ALC_INCOMPLETE || | ||
application.status.code === SUBMISSION_STATUS.RECEIVED_BY_ALC || | ||
application.status.code === SUBMISSION_STATUS.IN_REVIEW_BY_ALC || | ||
application.status.code === SUBMISSION_STATUS.ALC_DECISION | ||
" | ||
> | ||
<app-decisions [fileNumber]="application.fileNumber"></app-decisions> | ||
<app-submission-documents [$applicationDocuments]="$applicationDocuments"></app-submission-documents> | ||
<div> | ||
<app-public-decisions [applicationDecisions]="applicationDecisions"></app-public-decisions> | ||
<app-submission-documents [applicationDocuments]="applicationDocuments"></app-submission-documents> | ||
</div> | ||
</div> |
24 changes: 7 additions & 17 deletions
24
portal-frontend/src/app/features/public/application/alc-review/alc-review.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 10 additions & 38 deletions
48
portal-frontend/src/app/features/public/application/alc-review/alc-review.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,19 @@ | ||
import { Component, Input, OnDestroy, OnInit } from '@angular/core'; | ||
import { Router } from '@angular/router'; | ||
import { BehaviorSubject, Subject, takeUntil } from 'rxjs'; | ||
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto'; | ||
import { ApplicationSubmissionReviewService } from '../../../../services/application-submission-review/application-submission-review.service'; | ||
import { | ||
SUBMISSION_STATUS, | ||
ApplicationSubmissionDetailedDto, | ||
} from '../../../../services/application-submission/application-submission.dto'; | ||
import { Component, Input } from '@angular/core'; | ||
import { ApplicationPortalDecisionDto } from '../../../../services/application-decision/application-decision.dto'; | ||
import { SUBMISSION_STATUS } from '../../../../services/application-submission/application-submission.dto'; | ||
import { PublicApplicationSubmissionDto, PublicDocumentDto } from '../../../../services/public/public.dto'; | ||
|
||
@Component({ | ||
selector: 'app-alc-review', | ||
selector: 'app-public-alc-review', | ||
templateUrl: './alc-review.component.html', | ||
styleUrls: ['./alc-review.component.scss'], | ||
}) | ||
export class AlcReviewComponent implements OnInit, OnDestroy { | ||
private $destroy = new Subject<void>(); | ||
export class PublicAlcReviewComponent { | ||
@Input() applicationSubmission!: PublicApplicationSubmissionDto; | ||
@Input() applicationDocuments!: PublicDocumentDto[]; | ||
@Input() applicationDecisions!: ApplicationPortalDecisionDto[]; | ||
|
||
@Input() $application = new BehaviorSubject<ApplicationSubmissionDetailedDto | undefined>(undefined); | ||
@Input() $applicationDocuments = new BehaviorSubject<ApplicationDocumentDto[]>([]); | ||
|
||
application: ApplicationSubmissionDetailedDto | undefined; | ||
SUBMISSION_STATUS = SUBMISSION_STATUS; | ||
|
||
constructor(private applicationReviewService: ApplicationSubmissionReviewService, private router: Router) {} | ||
|
||
ngOnInit(): void { | ||
this.$application.pipe(takeUntil(this.$destroy)).subscribe((application) => { | ||
this.application = application; | ||
}); | ||
} | ||
|
||
ngOnDestroy(): void { | ||
this.$destroy.next(); | ||
this.$destroy.complete(); | ||
} | ||
|
||
async onReview(fileId: string) { | ||
if (this.application?.status.code === SUBMISSION_STATUS.SUBMITTED_TO_LG) { | ||
const review = await this.applicationReviewService.startReview(fileId); | ||
if (!review) { | ||
return; | ||
} | ||
} | ||
await this.router.navigateByUrl(`application/${fileId}/review`); | ||
} | ||
constructor() {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
...public/application/alc-review/submission-documents/submission-documents.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 12 additions & 13 deletions
25
...ures/public/application/alc-review/submission-documents/submission-documents.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.