@@ -12,7 +12,6 @@ import * as OrderCloudSDK from 'ordercloud-javascript-sdk';
1212import { PageContentDoc } from '../../models/page-content-doc.interface' ;
1313import { JDocument , HeadStartSDK } from '@ordercloud/headstart-sdk' ;
1414import { NgbModalRef , NgbModal } from '@ng-bootstrap/ng-bootstrap' ;
15- import { v4 as guid } from 'uuid' ;
1615import { PAGE_SCHEMA } from '../../constants/page-schema.constants' ;
1716import { RequiredDeep } from '@ordercloud/headstart-sdk/dist/models/RequiredDeep' ;
1817
@@ -46,9 +45,7 @@ export class PageEditorComponent implements OnInit, OnChanges {
4645 confirmModal : NgbModalRef ;
4746 isLoadingSave : boolean ;
4847
49- constructor (
50- private modalService : NgbModal
51- ) { }
48+ constructor ( private modalService : NgbModal ) { }
5249
5350 ngOnInit ( ) : void {
5451 this . page = Object . assign (
@@ -99,7 +96,9 @@ export class PageEditorComponent implements OnInit, OnChanges {
9996
10097 async onSubmit ( ) : Promise < void > {
10198 this . isLoadingSave = true ;
102- const updated = await this . saveChanges ( ) . finally ( ( ) => this . isLoadingSave = false ) ;
99+ const updated = await this . saveChanges ( ) . finally (
100+ ( ) => ( this . isLoadingSave = false )
101+ ) ;
103102 this . pageSaved . emit ( updated ) ;
104103 }
105104
@@ -119,7 +118,6 @@ export class PageEditorComponent implements OnInit, OnChanges {
119118 } ) ;
120119 }
121120 return HeadStartSDK . Documents . Create ( PAGE_SCHEMA . ID , {
122- ID : guid ( ) ,
123121 Doc : {
124122 ...this . page ,
125123 Author : fullName ,
0 commit comments