From e0f686b08bd7b2aeb90d061681db12bfdd907a68 Mon Sep 17 00:00:00 2001 From: Joel Wetzell Date: Wed, 19 Aug 2026 10:00:40 -0500 Subject: [PATCH] add autogenerated ID to route and processors --- src/app/components/route-list/route-list.html | 2 +- src/app/components/route/route.html | 4 ++-- src/app/models/config.ts | 2 ++ src/app/services/schema.ts | 6 +++++- 4 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/app/components/route-list/route-list.html b/src/app/components/route-list/route-list.html index 192215e..a8b9105 100644 --- a/src/app/components/route-list/route-list.html +++ b/src/app/components/route-list/route-list.html @@ -17,7 +17,7 @@ (cdkDropListDropped)="drop($event)" [cdkDropListData]="routes()" > - @for (route of routes(); track $index + (route.input || ''); let i = $index) { + @for (route of routes(); track route.id; let i = $index) {
- @for (processor of processors(); track $index + processor.type; let i = $index) { + @for (processor of processors(); track processor.id; let i = $index) {
- @for (processor of processors(); track $index + processor.type; let i = $index) { + @for (processor of processors(); track processor.id; let i = $index) {
; }; diff --git a/src/app/services/schema.ts b/src/app/services/schema.ts index 2527677..5a36203 100644 --- a/src/app/services/schema.ts +++ b/src/app/services/schema.ts @@ -139,12 +139,16 @@ export class SchemaService { } getSkeletonForRoute(): RouteConfig { - const template: RouteConfig = {}; + const template: RouteConfig = { + id: crypto.randomUUID(), + processors: [], + }; return template; } getSkeletonForProcessor(processorType: string): ProcessorConfig { const template: ProcessorConfig = { + id: crypto.randomUUID(), type: processorType, }; const itemInfo = this.processorTypes.find((itemInfo) => itemInfo.type === processorType);