diff --git a/alcs-frontend/src/app/features/application/documents/document-upload-dialog/document-upload-dialog.component.ts b/alcs-frontend/src/app/features/application/documents/document-upload-dialog/document-upload-dialog.component.ts index 655cb8ebd4..9bab97854e 100644 --- a/alcs-frontend/src/app/features/application/documents/document-upload-dialog/document-upload-dialog.component.ts +++ b/alcs-frontend/src/app/features/application/documents/document-upload-dialog/document-upload-dialog.component.ts @@ -116,6 +116,7 @@ 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, @@ -123,9 +124,9 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy { 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); diff --git a/alcs-frontend/src/app/features/notice-of-intent/documents/document-upload-dialog/document-upload-dialog.component.ts b/alcs-frontend/src/app/features/notice-of-intent/documents/document-upload-dialog/document-upload-dialog.component.ts index 47f28fa407..4aac473798 100644 --- a/alcs-frontend/src/app/features/notice-of-intent/documents/document-upload-dialog/document-upload-dialog.component.ts +++ b/alcs-frontend/src/app/features/notice-of-intent/documents/document-upload-dialog/document-upload-dialog.component.ts @@ -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 { @@ -117,6 +117,7 @@ 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, @@ -124,9 +125,9 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy { 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); diff --git a/alcs-frontend/src/app/features/notification/documents/document-upload-dialog/document-upload-dialog.component.ts b/alcs-frontend/src/app/features/notification/documents/document-upload-dialog/document-upload-dialog.component.ts index 58a010c3a6..94489d8ebb 100644 --- a/alcs-frontend/src/app/features/notification/documents/document-upload-dialog/document-upload-dialog.component.ts +++ b/alcs-frontend/src/app/features/notification/documents/document-upload-dialog/document-upload-dialog.component.ts @@ -56,7 +56,7 @@ export class DocumentUploadDialogComponent implements OnInit, OnDestroy { public data: { fileId: string; existingDocument?: NotificationDocumentDto }, protected dialog: MatDialogRef, private notificationDocumentService: NotificationDocumentService, - private toastService: ToastService + private toastService: ToastService, ) {} ngOnInit(): void { @@ -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); @@ -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, ); } } diff --git a/services/apps/alcs/src/portal/guards/maintenance.guard.ts b/services/apps/alcs/src/portal/guards/maintenance.guard.ts index 6c28b7b296..2a0ff61f25 100644 --- a/services/apps/alcs/src/portal/guards/maintenance.guard.ts +++ b/services/apps/alcs/src/portal/guards/maintenance.guard.ts @@ -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: {