From 191d23559d9253ee20b4637ed06630bf8313fa3b Mon Sep 17 00:00:00 2001 From: Ryan Slatten Date: Tue, 17 Dec 2024 19:26:32 -0700 Subject: [PATCH] fix config change issue --- plugins/arcgis/service/src/ArcGISConfig.ts | 8 ++++---- plugins/arcgis/service/src/index.ts | 2 +- .../main/src/lib/arc-admin/arc-admin.component.ts | 8 ++------ 3 files changed, 7 insertions(+), 11 deletions(-) diff --git a/plugins/arcgis/service/src/ArcGISConfig.ts b/plugins/arcgis/service/src/ArcGISConfig.ts index a0904daee..b0e19631d 100644 --- a/plugins/arcgis/service/src/ArcGISConfig.ts +++ b/plugins/arcgis/service/src/ArcGISConfig.ts @@ -8,10 +8,10 @@ export interface FeatureServiceConfig { */ url: string - /** - * Serialized ArcGISIdentityManager - */ - identityManager: string + /** + * Serialized ArcGISIdentityManager + */ + identityManager: string /** * The feature layers. diff --git a/plugins/arcgis/service/src/index.ts b/plugins/arcgis/service/src/index.ts index b70e32333..948c68b54 100644 --- a/plugins/arcgis/service/src/index.ts +++ b/plugins/arcgis/service/src/index.ts @@ -172,7 +172,7 @@ const arcgisPluginHooks: InitPluginHook = { return { url: updateService.url, layers: updateService.layers, - identityManager: existingService?.identityManager + identityManager: existingService?.identityManager || '' } }) diff --git a/plugins/arcgis/web-app/projects/main/src/lib/arc-admin/arc-admin.component.ts b/plugins/arcgis/web-app/projects/main/src/lib/arc-admin/arc-admin.component.ts index 6d8ff2336..a927819f1 100644 --- a/plugins/arcgis/web-app/projects/main/src/lib/arc-admin/arc-admin.component.ts +++ b/plugins/arcgis/web-app/projects/main/src/lib/arc-admin/arc-admin.component.ts @@ -57,7 +57,7 @@ export class ArcAdminComponent implements OnInit { constructor(private arcService: ArcService, private dialog: MatDialog, private fb: FormBuilder) { this.config = defaultArcGISPluginConfig; - this.editConfig = defaultArcGISPluginConfig; + this.editConfig = this.copyConfig(); this.editFieldMappings = false; this.attributesForm = this.fb.group({ observationIdField: [''], @@ -79,6 +79,7 @@ export class ArcAdminComponent implements OnInit { if (!this.config.baseUrl) { this.config.baseUrl = window.location.origin } + this.editConfig = this.copyConfig(); arcService.fetchPopulatedEvents().subscribe(x => this.handleEventResults(x)); }) } @@ -192,11 +193,6 @@ export class ArcAdminComponent implements OnInit { this.saveConfig(); } - onEditProcessing() { - this.editConfig = this.copyConfig() - this.dialog.open(this.editProcessingTemplate) - } - setField(field: string, value: any) { if (value != undefined && value.length == 0) { value = undefined