Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 8 additions & 9 deletions admin/src/app/foms/fom-add-edit/fom-add-edit.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ import { AttachmentUploadService } from "@admin-core/utils/attachmentUploadServi
import { DEFAULT_ISO_DATE_FORMAT, MAX_FILEUPLOAD_SIZE } from '@admin-core/utils/constants';
import { DatePipe, NgClass, NgFor, NgIf } from '@angular/common';
import {
AttachmentResponse, DistrictResponse, ForestClientResponse,
ForestClientService,
ProjectCreateRequest,
ProjectPlanCodeEnum,
ProjectResponse,
ProjectService, WorkflowStateEnum
AttachmentResponse, DistrictResponse, ForestClientResponse,
ForestClientService,
ProjectCreateRequest,
ProjectPlanCodeEnum,
ProjectResponse,
ProjectService, WorkflowStateEnum
} from '@api-client';
import { RxFormBuilder, RxFormGroup } from '@rxweb/reactive-form-validators';
import { User } from "@utility/security/user";
Expand Down Expand Up @@ -269,8 +269,7 @@ export class FomAddEditComponent implements OnInit, AfterViewInit, OnDestroy {
projectCreate.commentingClosedDate = cmcDateIsoVal? cmcDateIsoVal: null;
projectCreate.operationStartYear = DateTime.fromJSDate(this.fg.get('opStartDate').value).year;
projectCreate.operationEndYear = DateTime.fromJSDate(this.fg.get('opEndDate').value).year;

// lastValueFrom(
lastValueFrom(
this.projectSvc.projectControllerCreate(projectCreate).pipe(
tap((result) => {
this.onSuccess(result.id);
Expand All @@ -280,7 +279,7 @@ export class FomAddEditComponent implements OnInit, AfterViewInit, OnDestroy {
return of(null);
})
)
// );
);
}

onSuccess(id: number) {
Expand Down
Loading