From b77ee47306af833dd1d3b6e4ffefec6c75730595 Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Tue, 3 Mar 2026 21:17:33 +0100 Subject: [PATCH] flow item modified to match the style of tasks-list --- .../flows-list/flow-item/flow-item.html | 111 +++++------------- .../shared/flows-list/flow-item/flow-item.ts | 22 +--- .../tasks-executions-list.html | 14 +-- 3 files changed, 35 insertions(+), 112 deletions(-) diff --git a/src/app/shared/flows-list/flow-item/flow-item.html b/src/app/shared/flows-list/flow-item/flow-item.html index e5f1bfb..a979ba9 100644 --- a/src/app/shared/flows-list/flow-item/flow-item.html +++ b/src/app/shared/flows-list/flow-item/flow-item.html @@ -1,93 +1,40 @@ -
- -
-
- - - - {{ flow().name }} +
+
+
{{ flow().name }}
+
{{ flow().author }}
- - + + {{ flow().visibility }} +
- -
- -
- - -
- - Author: - - - {{ flow().author }} - -
- - -
- - Created: - - - {{ flow().createdAt | date:'dd/MM/yyyy' }} - -
- - +
+ {{ flow().createdAt | date:'dd/MM/yyyy' }} +
+ +
-
- - -
- - - - - -
diff --git a/src/app/shared/flows-list/flow-item/flow-item.ts b/src/app/shared/flows-list/flow-item/flow-item.ts index 60c901a..46878ba 100644 --- a/src/app/shared/flows-list/flow-item/flow-item.ts +++ b/src/app/shared/flows-list/flow-item/flow-item.ts @@ -1,5 +1,5 @@ import { CommonModule } from '@angular/common'; -import { Component, computed, effect, inject, input, model, signal } from '@angular/core'; +import { Component, computed, inject, input, model } from '@angular/core'; import { Flow } from '@models/flow'; import { ConfirmDialogService } from '@services/dialogs/confirm-dialog'; import { FlowsService } from '@services/flows/flows'; @@ -24,18 +24,6 @@ export class FlowItem { openedFlowId = computed(() => this.editorState.currentFlow()?.id); - expanded = signal(false); - - constructor() { - effect(() => { - if (this.expanded()) { - if (this.detailOpenedId() !== this.flow().id) { - this.expanded.set(false); - } - } - }); - } - async open() { console.log('Opening flow:', this.flow()); if (this.editorState.isDirty() && this.openedFlowId() !== this.flow().id) { @@ -77,12 +65,4 @@ export class FlowItem { }); } - toggleDetails() { - this.expanded.update(v => !v); - if (this.expanded()) { - this.detailOpenedId.set(this.flow().id); - } else { - this.detailOpenedId.set(null); - } - } } diff --git a/src/app/shared/tasks-executions-list/tasks-executions-list.html b/src/app/shared/tasks-executions-list/tasks-executions-list.html index fabd5e7..9db1b20 100644 --- a/src/app/shared/tasks-executions-list/tasks-executions-list.html +++ b/src/app/shared/tasks-executions-list/tasks-executions-list.html @@ -1,10 +1,6 @@