Skip to content

Commit

Permalink
Merge pull request #1751 from bcgov/main
Browse files Browse the repository at this point in the history
Backport: mostly Jun 5 regression hotfixes
  • Loading branch information
trslater authored Jun 10, 2024
2 parents 454849e + 2b22432 commit 8115f44
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export class CreateNoiModificationDialogComponent implements OnInit, OnDestroy {
regionCode: formValues.region!,
localGovernmentUuid: formValues.localGovernment!,
submittedDate: formValues.submittedDate!.valueOf(),
boardCode: 'ceo',
boardCode: 'noi',
modifiesDecisionUuids: formValues.modifiesDecisions!,
description: formValues.description!,
};
Expand Down
2 changes: 1 addition & 1 deletion docs/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ We receive the parcel data in a GDB from PMBC, this data changes and needs to be
1. Setup Portforwading as necessary to get access to Postgres
1. Truncate the existing parcel_lookup table
1. Run the following command replacing username and password as
necessary: `ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=app user=postgres password=postgres active_schema=alcs" PMBC_export.gdb -nln parcel_lookup`
necessary: `ogr2ogr -f "PostgreSQL" PG:"host=localhost port=5432 dbname=app user=postgres password=postgres active_schema=alcs" PMBC_export.gdb -nln parcel_lookup -gt 10000 --config PG_USE_COPY YES`
1. Be patient, this will import ~2 million rows and will take ~10 minutes

## Running Jobs in Openshift
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,7 @@ export class OwnerDialogComponent {
this.corporateSummary.setValidators([Validators.required]);
} else {
this.organizationName.setValidators([]);
this.corporateSummary.setValidators([]);
this.corporateSummary.reset();
this.files = [];
this.corporateSummary.setValidators([]);
}
this.corporateSummary.updateValueAndValidity();
this.organizationName.updateValueAndValidity();
Expand All @@ -113,6 +111,11 @@ export class OwnerDialogComponent {
}

this.isLoading = true;

if (this.type.value === OWNER_TYPE.INDIVIDUAL) {
this.removeCorporateSummary();
}

let documentUuid;
if (this.pendingFile) {
documentUuid = await this.uploadPendingFile(this.pendingFile);
Expand Down Expand Up @@ -170,9 +173,15 @@ export class OwnerDialogComponent {
if (this.form.valid) {
this.isLoading = true;

if (this.type.value === OWNER_TYPE.INDIVIDUAL) {
this.removeCorporateSummary();
}

let document;
if (this.pendingFile) {
document = await this.uploadPendingFile(this.pendingFile);
} else {
document = this.type.value === OWNER_TYPE.ORGANIZATION ? this.data.existingOwner?.corporateSummary : null;
}

const orgName = this.type.value === OWNER_TYPE.ORGANIZATION ? this.organizationName.getRawValue() : null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@ export class NoticeOfIntentDecisionDto {
@AutoMap(() => String)
decisionMakerName: string | null;

@AutoMap(() => Boolean)
wasReleased: boolean;

@AutoMap(() => Boolean)
isSubjectToConditions: boolean | null;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -285,16 +285,20 @@ export class NoticeOfIntentAdvancedSearchService {
query = query.andWhere(
'noi.date_submitted_to_alc >= :date_submitted_from',
{
date_submitted_from: new Date(searchDto.dateSubmittedFrom),
date_submitted_from: getStartOfDayToPacific(
searchDto.dateSubmittedFrom,
),
},
);
}

if (searchDto.dateSubmittedTo !== undefined) {
query = query.andWhere(
'noi.date_submitted_to_alc <= :date_submitted_to',
'noi.date_submitted_to_alc < :date_submitted_to',
{
date_submitted_to: new Date(searchDto.dateSubmittedTo),
date_submitted_to: getNextDayToPacific(
searchDto.dateSubmittedTo,
),
},
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,12 @@ export class StatusEmailService {
const toEmails: string[] = [];
if (data.primaryContact && data.primaryContact.email) {
toEmails.push(data.primaryContact.email);

if (data.ccGovernment && data.government?.emails) {
ccEmails.push(...data.government.emails);
}
} else {
if (data.ccGovernment && data.government?.emails) {
toEmails.push(...data.government.emails);
}
} else if (data.government?.emails) {
toEmails.push(...data.government.emails);
}
ccEmails.push(...data.ccEmails);

Expand Down

0 comments on commit 8115f44

Please sign in to comment.