Skip to content

Commit

Permalink
Merge pull request #1552 from bcgov/hotfix-prep
Browse files Browse the repository at this point in the history
Hotfix Deploy for ALCS-1805 & ALCS-1816
  • Loading branch information
dhaselhan authored Mar 27, 2024
2 parents d74de90 + c49ab99 commit 04aedc2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,16 +116,17 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
visibilityFlags.push('P');
}

const file = this.pendingFile;
const dto: UpdateDocumentDto = {
fileName: this.name.value!,
source: this.source.value as DOCUMENT_SOURCE,
typeCode: this.type.value as DOCUMENT_TYPE,
visibilityFlags,
parcelUuid: this.parcelId.value ?? undefined,
ownerUuid: this.ownerId.value ?? undefined,
file,
};

const file = this.pendingFile;
this.isSaving = true;
if (this.data.existingDocument) {
await this.applicationDocumentService.update(this.data.existingDocument.uuid, dto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
private noiDocumentService: NoiDocumentService,
private noiSubmissionService: NoticeOfIntentSubmissionService,
private noiParcelService: NoticeOfIntentParcelService,
private toastService: ToastService
private toastService: ToastService,
) {}

ngOnInit(): void {
Expand Down Expand Up @@ -117,16 +117,17 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
visibilityFlags.push('P');
}

const file = this.pendingFile;
const dto: UpdateNoticeOfIntentDocumentDto = {
fileName: this.name.value!,
source: this.source.value as DOCUMENT_SOURCE,
typeCode: this.type.value as DOCUMENT_TYPE,
visibilityFlags,
parcelUuid: this.parcelId.value ?? undefined,
ownerUuid: this.ownerId.value ?? undefined,
file,
};

const file = this.pendingFile;
this.isSaving = true;
if (this.data.existingDocument) {
await this.noiDocumentService.update(this.data.existingDocument.uuid, dto);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
public data: { fileId: string; existingDocument?: NotificationDocumentDto },
protected dialog: MatDialogRef<any>,
private notificationDocumentService: NotificationDocumentService,
private toastService: ToastService
private toastService: ToastService,
) {}

ngOnInit(): void {
Expand Down Expand Up @@ -94,14 +94,15 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
visibilityFlags.push('P');
}

const file = this.pendingFile;
const dto: UpdateNoticeOfIntentDocumentDto = {
fileName: this.name.value!,
source: this.source.value as DOCUMENT_SOURCE,
typeCode: this.type.value as DOCUMENT_TYPE,
visibilityFlags,
file,
};

const file = this.pendingFile;
this.isSaving = true;
if (this.data.existingDocument) {
await this.notificationDocumentService.update(this.data.existingDocument.uuid, dto);
Expand Down Expand Up @@ -171,7 +172,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy {
if (this.data.existingDocument) {
await this.notificationDocumentService.download(
this.data.existingDocument.uuid,
this.data.existingDocument.fileName
this.data.existingDocument.fileName,
);
}
}
Expand Down
4 changes: 3 additions & 1 deletion services/apps/alcs/src/portal/guards/maintenance.guard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@ export class MaintenanceGuard implements CanActivate {

if (
req.routeOptions.url.startsWith('/portal') ||
req.routeOptions.url.startsWith('/public')
req.routeOptions.url.startsWith('/public') ||
req.routeOptions.url.startsWith('/api/portal') ||
req.routeOptions.url.startsWith('/api/public')
) {
const maintenanceMode = await this.configurationRepository.findOne({
where: {
Expand Down

0 comments on commit 04aedc2

Please sign in to comment.