From f5ac5c1ba7586dc693da711bd32baa352d26437d Mon Sep 17 00:00:00 2001 From: kbrownomni Date: Thu, 14 Nov 2024 13:30:36 -0600 Subject: [PATCH] Arc event material updates (#229) * updated the event layout * added layers to mock, display layers in events on one line seperated by commas * added open in new and edit icons, adjusted scss --------- Co-authored-by: Katherine Brown --- .../lib/arc-event/arc-event.component.html | 81 ++++++++-------- .../lib/arc-event/arc-event.component.scss | 71 +------------- .../showcase/src/app/arc.service.mock.ts | 95 ++++++++++++++----- 3 files changed, 120 insertions(+), 127 deletions(-) diff --git a/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.html b/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.html index 61ae84c21..0e09f4862 100644 --- a/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.html +++ b/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.html @@ -1,45 +1,50 @@ -
- - - - Events - +
+ + Events Change the ArcGIS layers each MAGE event sends its observations to. - -
-
-
- There are no events synchronizing to ArcGIS layers. -
-
-
- -
- -
- -
-
-
-
- This event is not synchronizing to any ArcGIS layers. -
+
+
+ There are no events synchronizing to ArcGIS layers. +
-
-
- {{layerDisplay(featureLayer)}} -
-
- -
-
-
-
- + + + +
+
+ {{ event.name }} +
+
+
+ + {{ layerDisplay(featureLayer) }}, + +
+
+ + +
This event is not synchronizing to any ArcGIS layers.
+
+
+
+ + open_in_new + + +
+
+ +
+
+ + + + +

ArcGIS layers that MAGE event named {{currentEditingEvent.name}} is synchronizing

diff --git a/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.scss b/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.scss index 3f476dc3e..af96399be 100644 --- a/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.scss +++ b/plugins/arcgis/web-app/projects/main/src/lib/arc-event/arc-event.component.scss @@ -1,69 +1,8 @@ -.arc-layer-form { - display: flex; - flex-direction: column; - min-width: 950px; +.arcEvent__info { + flex-grow: 1; } -section { - >* { - margin-inline-start: 1em; - } - - header { - margin-inline-start: 0; - - h1, - h2, - h3, - h4, - h5, - h6 { - margin-block-end: 0; - } - - .subheading { - margin-block-start: 0; - opacity: 0.5; - } - - margin-block-end: 2em; - } - - margin-block-start: 2em; - margin-block-end: 2em; -} - -.arcEvent { - margin-block-start: 1em; - display: grid; - grid-template-columns: 4fr 1fr; - max-width: max-content; - margin-bottom: 20px; -} - -.arcEvent__value { - grid-column-start: 1; -} - -.arcEvent__edit { - grid-column-start: 2; - text-align: end; -} - -.featureLayers { - display: grid; - opacity: 0.5; - font-size: 0.9em; -} - -.edit-icon { - vertical-align: middle; -} - -.edit-button { - opacity: 0.5; - font-size: inherit; - height: inherit; - line-height: inherit; - width: inherit; +.mat-divider { + margin-top: 12px; + margin-bottom: 12px; } \ No newline at end of file diff --git a/plugins/arcgis/web-app/projects/showcase/src/app/arc.service.mock.ts b/plugins/arcgis/web-app/projects/showcase/src/app/arc.service.mock.ts index 1fee9ae29..735b26dce 100644 --- a/plugins/arcgis/web-app/projects/showcase/src/app/arc.service.mock.ts +++ b/plugins/arcgis/web-app/projects/showcase/src/app/arc.service.mock.ts @@ -4,25 +4,64 @@ import { ArcServiceInterface, FeatureLayer } from "../../../main/src/lib/arc.ser import { ArcGISPluginConfig, defaultArcGISPluginConfig } from '../../../main/src/lib/ArcGISPluginConfig'; import { MageEvent } from "../../../main/src/lib/arc.service"; -export const mockArcGISEventResult = Object.freeze({ +export const mockArcGISEventResult1 = Object.freeze({ id: 0, - name: 'test event result name', + name: 'test event result name 1', forms: [{ id: 1, - name: 'test form result name', + name: 'test form result name 1', fields: [{ - title: 'test field' + title: 'test field 1' }] }] -}) +}); + +export const mockArcGISEventResult2 = Object.freeze({ + id: 1, + name: 'test event result name 2', + forms: [{ + id: 2, + name: 'test form result name 2', + fields: [{ + title: 'test field 2' + }] + }] +}); + +export const mockArcGISEventResult3 = Object.freeze({ + id: 2, + name: 'test event result name 3', + forms: [{ + id: 3, + name: 'test form result name 3', + fields: [{ + title: 'test field 3' + }] + }] +}); @Injectable({ providedIn: 'root' }) + export class MockArcService implements ArcServiceInterface { fetchFeatureServiceLayers(featureServiceUrl: string): Observable { - throw new Error("Method not implemented."); + return of([ + { + id: 1, + name: 'Layer 1', + geometryType: 'esriGeometryPoint', + events: ['test event result name 1', 'test event result name 2'] + }, + { + id: 2, + name: 'Layer 2', + geometryType: 'esriGeometryPolygon', + events: ['test event result name 2'] + } + ]); } + fetchArcConfig(): Observable { return of({ enabled: true, @@ -31,7 +70,21 @@ export class MockArcService implements ArcServiceInterface { startupIntervalSeconds: 1, updateIntervalSeconds: 1, batchSize: 100, - featureServices: [], + featureServices: [ + { + url: 'https://mock.service.com/FeatureServer/0', + layers: [ + { + layer: 'Layer 1', + events: ['test event result name 1', 'test event result name 2'] + }, + { + layer: 'Layer 2', + events: ['test event result name 2'] + } + ] + } + ], attachmentModifiedTolerance: 5000, textFieldLength: 100, textAreaFieldLength: 256, @@ -72,35 +125,31 @@ export class MockArcService implements ArcServiceInterface { fetchArcLayers(featureUrl: string) { return of({ layers: [ - { - id: 0, - name: 'mage_sync', - geometryType: 'esriGeometryPoint' - }, - ] - } - ) + { + id: 0, + name: 'mage_sync', + geometryType: 'esriGeometryPoint' + }, + ] + } + ) } fetchEvents() { - return of([mockArcGISEventResult]) + return of([mockArcGISEventResult1, mockArcGISEventResult2, mockArcGISEventResult3]); } fetchPopulatedEvents() { - return of([mockArcGISEventResult]) + return of([mockArcGISEventResult1, mockArcGISEventResult2, mockArcGISEventResult3]); } putArcConfig(config: ArcGISPluginConfig) {} removeUserTrack(userTrackId: string): Observable { - return of( - defaultArcGISPluginConfig - ) + return of(defaultArcGISPluginConfig); } removeOperation(operationId: string): Observable { - return of( - defaultArcGISPluginConfig - ) + return of(defaultArcGISPluginConfig); } } \ No newline at end of file