Skip to content

Commit

Permalink
Merge pull request #863 from bcgov/feature/ALCS-978
Browse files Browse the repository at this point in the history
Add NOI Stepper and Step 1
  • Loading branch information
dhaselhan authored Aug 11, 2023
2 parents 7b22f0c + a7487e4 commit ecd8d95
Show file tree
Hide file tree
Showing 141 changed files with 7,014 additions and 560 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,18 @@ <h3>3. Primary Contact</h3>
<div class="subheading2 grid-1">
<span
*ngIf="
primaryContact?.type?.code !== APPLICATION_OWNER.CROWN &&
primaryContact?.type?.code !== APPLICATION_OWNER.GOVERNMENT
primaryContact?.type?.code !== OWNER_TYPE.CROWN &&
primaryContact?.type?.code !== OWNER_TYPE.GOVERNMENT
"
>Organization (optional)</span
>
<span *ngIf="primaryContact?.type?.code === APPLICATION_OWNER.CROWN">Ministry/Department Responsible</span>
<span *ngIf="primaryContact?.type?.code === APPLICATION_OWNER.GOVERNMENT">Department</span>
<span *ngIf="primaryContact?.type?.code === OWNER_TYPE.CROWN">Ministry/Department Responsible</span>
<span *ngIf="primaryContact?.type?.code === OWNER_TYPE.GOVERNMENT">Department</span>
</div>
<div class="grid-double">
{{ primaryContact?.organizationName }}
<app-no-data
[showRequired]="showErrors && primaryContact?.type?.code === APPLICATION_OWNER.GOVERNMENT"
[showRequired]="showErrors && primaryContact?.type?.code === OWNER_TYPE.GOVERNMENT"
*ngIf="!primaryContact?.organizationName"
></app-no-data>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { BehaviorSubject, Subject, takeUntil } from 'rxjs';
import {
ApplicationDocumentDto,
DOCUMENT_SOURCE,
DOCUMENT_TYPE,
} from '../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../services/application-document/application-document.service';
import { APPLICATION_OWNER, ApplicationOwnerDetailedDto } from '../../../services/application-owner/application-owner.dto';
import { ApplicationOwnerDetailedDto } from '../../../services/application-owner/application-owner.dto';
import { PARCEL_TYPE } from '../../../services/application-parcel/application-parcel.dto';
import { ApplicationSubmissionDetailedDto } from '../../../services/application-submission/application-submission.dto';
import { LocalGovernmentDto } from '../../../services/code/code.dto';
import { CodeService } from '../../../services/code/code.service';
import { DOCUMENT_SOURCE, DOCUMENT_TYPE } from '../../../shared/dto/document.dto';
import { OWNER_TYPE } from '../../../shared/dto/owner.dto';

@Component({
selector: 'app-application-details',
Expand All @@ -37,7 +35,7 @@ export class ApplicationDetailsComponent implements OnInit, OnDestroy {
otherFiles: ApplicationDocumentDto[] = [];
needsAuthorizationLetter = true;
appDocuments: ApplicationDocumentDto[] = [];
APPLICATION_OWNER = APPLICATION_OWNER;
OWNER_TYPE = OWNER_TYPE;

private localGovernments: LocalGovernmentDto[] = [];
private otherFileTypes = [DOCUMENT_TYPE.PHOTOGRAPH, DOCUMENT_TYPE.PROFESSIONAL_REPORT, DOCUMENT_TYPE.OTHER];
Expand All @@ -57,11 +55,10 @@ export class ApplicationDetailsComponent implements OnInit, OnDestroy {
this.populateLocalGovernment(app.localGovernmentUuid);

this.needsAuthorizationLetter =
!(this.primaryContact?.type.code === APPLICATION_OWNER.GOVERNMENT) &&
!(this.primaryContact?.type.code === OWNER_TYPE.GOVERNMENT) &&
!(
app.owners.length === 1 &&
(app.owners[0].type.code === APPLICATION_OWNER.INDIVIDUAL ||
app.owners[0].type.code === APPLICATION_OWNER.GOVERNMENT)
(app.owners[0].type.code === OWNER_TYPE.INDIVIDUAL || app.owners[0].type.code === OWNER_TYPE.GOVERNMENT)
);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-excl-details',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ import { Router } from '@angular/router';
import { Subject, takeUntil } from 'rxjs';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { AuthenticationService } from '../../../../services/authentication/authentication.service';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-incl-details',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-naru-details[applicationSubmission]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-pfrs-details[applicationSubmission]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-pofo-details[applicationSubmission]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-roso-details[applicationSubmission]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { PARCEL_TYPE } from '../../../../services/application-parcel/application-parcel.dto';
import { ApplicationParcelService } from '../../../../services/application-parcel/application-parcel.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-subd-details[applicationSubmission]',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, Input } from '@angular/core';
import { Router } from '@angular/router';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { DOCUMENT_TYPE } from '../../../../shared/dto/document.dto';

@Component({
selector: 'app-tur-details[applicationSubmission]',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,10 @@ import { LandUseComponent } from './land-use/land-use.component';
import { OtherAttachmentsComponent } from './other-attachments/other-attachments.component';
import { OtherParcelConfirmationDialogComponent } from './other-parcels/other-parcel-confirmation-dialog/other-parcel-confirmation-dialog.component';
import { OtherParcelsComponent } from './other-parcels/other-parcels.component';
import { ApplicationCrownOwnerDialogComponent } from './parcel-details/application-crown-owner-dialog/application-crown-owner-dialog.component';
import { ApplicationOwnerDialogComponent } from './parcel-details/application-owner-dialog/application-owner-dialog.component';
import { ApplicationOwnersDialogComponent } from './parcel-details/application-owners-dialog/application-owners-dialog.component';
import { DeleteParcelDialogComponent } from './parcel-details/delete-parcel/delete-parcel-dialog.component';
import { ParcelDetailsComponent } from './parcel-details/parcel-details.component';
import { ParcelEntryConfirmationDialogComponent } from './parcel-details/parcel-entry/parcel-entry-confirmation-dialog/parcel-entry-confirmation-dialog.component';
import { ParcelEntryComponent } from './parcel-details/parcel-entry/parcel-entry.component';
import { ParcelOwnersComponent } from './parcel-details/parcel-owners/parcel-owners.component';
import { PrimaryContactComponent } from './primary-contact/primary-contact.component';
import { ExclProposalComponent } from './proposal/excl-proposal/excl-proposal.component';
import { InclProposalComponent } from './proposal/incl-proposal/incl-proposal.component';
Expand All @@ -48,10 +44,6 @@ import { SelectGovernmentComponent } from './select-government/select-government
EditSubmissionComponent,
DeleteParcelDialogComponent,
SelectGovernmentComponent,
ParcelOwnersComponent,
ApplicationOwnersDialogComponent,
ApplicationOwnerDialogComponent,
ApplicationCrownOwnerDialogComponent,
LandUseComponent,
OtherParcelsComponent,
OtherAttachmentsComponent,
Expand Down Expand Up @@ -92,10 +84,6 @@ import { SelectGovernmentComponent } from './select-government/select-government
EditSubmissionComponent,
DeleteParcelDialogComponent,
SelectGovernmentComponent,
ParcelOwnersComponent,
ApplicationOwnersDialogComponent,
ApplicationOwnerDialogComponent,
ApplicationCrownOwnerDialogComponent,
LandUseComponent,
OtherParcelsComponent,
OtherAttachmentsComponent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Component, Input } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { BehaviorSubject } from 'rxjs';
import { ApplicationDocumentDto, DOCUMENT_TYPE } from '../../../services/application-document/application-document.dto';
import { ApplicationDocumentDto } from '../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../services/application-document/application-document.service';
import { DOCUMENT_TYPE } from '../../../shared/dto/document.dto';
import { FileHandle } from '../../../shared/file-drag-drop/drag-drop.directive';
import { RemoveFileConfirmationDialogComponent } from '../alcs-edit-submission/remove-file-confirmation-dialog/remove-file-confirmation-dialog.component';
import { StepComponent } from './step.partial';
Expand All @@ -18,6 +19,7 @@ export abstract class FilesStepComponent extends StepComponent {
DOCUMENT_TYPE = DOCUMENT_TYPE;

protected fileId = '';

protected abstract save(): Promise<void>;

protected constructor(protected applicationDocumentService: ApplicationDocumentService, protected dialog: MatDialog) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,12 @@ import { Router } from '@angular/router';
import { takeUntil } from 'rxjs';
import {
ApplicationDocumentDto,
ApplicationDocumentTypeDto,
ApplicationDocumentUpdateDto,
DOCUMENT_SOURCE,
DOCUMENT_TYPE,
} from '../../../../services/application-document/application-document.dto';
import { ApplicationDocumentService } from '../../../../services/application-document/application-document.service';
import { ApplicationSubmissionService } from '../../../../services/application-submission/application-submission.service';
import { CodeService } from '../../../../services/code/code.service';
import { DOCUMENT_SOURCE, DOCUMENT_TYPE, DocumentTypeDto } from '../../../../shared/dto/document.dto';
import { EditApplicationSteps } from '../edit-submission.component';
import { FilesStepComponent } from '../files-step.partial';

Expand All @@ -27,13 +25,13 @@ export class OtherAttachmentsComponent extends FilesStepComponent implements OnI
currentStep = EditApplicationSteps.Attachments;

displayedColumns = ['type', 'description', 'fileName', 'actions'];
selectableTypes: ApplicationDocumentTypeDto[] = [];
selectableTypes: DocumentTypeDto[] = [];
otherFiles: ApplicationDocumentDto[] = [];

private isDirty = false;

form = new FormGroup({} as any);
private documentCodes: ApplicationDocumentTypeDto[] = [];
private documentCodes: DocumentTypeDto[] = [];

constructor(
private router: Router,
Expand Down Expand Up @@ -117,7 +115,7 @@ export class OtherAttachmentsComponent extends FilesStepComponent implements OnI

private async loadDocumentCodes() {
const codes = await this.codeService.loadCodes();
this.documentCodes = codes.applicationDocumentTypes;
this.documentCodes = codes.documentTypes;
this.selectableTypes = this.documentCodes.filter((code) => USER_CONTROLLED_TYPES.includes(code.code));
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { FormControl, FormGroup, Validators } from '@angular/forms';
import { MatButtonToggleChange } from '@angular/material/button-toggle';
import { MatDialog } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { BehaviorSubject, takeUntil } from 'rxjs';
import {
APPLICATION_OWNER,
ApplicationOwnerDetailedDto,
ApplicationOwnerDto,
} from '../../../../services/application-owner/application-owner.dto';
Expand All @@ -18,6 +16,7 @@ import { ApplicationParcelService } from '../../../../services/application-parce
import { ApplicationSubmissionDetailedDto } from '../../../../services/application-submission/application-submission.dto';
import { ApplicationSubmissionService } from '../../../../services/application-submission/application-submission.service';
import { ToastService } from '../../../../services/toast/toast.service';
import { OWNER_TYPE } from '../../../../shared/dto/owner.dto';
import { formatBooleanToString } from '../../../../shared/utils/boolean-helper';
import { getLetterCombinations } from '../../../../shared/utils/number-to-letter-helper';
import { parseStringToBoolean } from '../../../../shared/utils/string-helper';
Expand Down Expand Up @@ -71,7 +70,7 @@ export class OtherParcelsComponent extends StepComponent implements OnInit, OnDe
this.fileId = application.fileNumber;
this.submissionUuid = application.uuid;
const nonAgentOwners = application.owners.filter(
(owner) => ![APPLICATION_OWNER.AGENT, APPLICATION_OWNER.GOVERNMENT].includes(owner.type.code)
(owner) => ![OWNER_TYPE.AGENT, OWNER_TYPE.GOVERNMENT].includes(owner.type.code)
);
this.owners = nonAgentOwners.map((o) => ({
...o,
Expand Down

This file was deleted.

Loading

0 comments on commit ecd8d95

Please sign in to comment.