From f4070cc9db9ea71ded7e6e0a5eba6c56949d88b0 Mon Sep 17 00:00:00 2001 From: Sebastian Stehle Date: Thu, 27 Jun 2019 19:25:36 +0200 Subject: [PATCH] Workflow-state. --- .../pages/workflows/workflow-step.component.html | 15 ++++++++++----- .../pages/workflows/workflow-step.component.scss | 9 ++++++--- .../pages/workflows/workflow-step.component.ts | 3 +++ .../workflows/workflow-transition.component.html | 4 +++- .../workflows/workflow-transition.component.scss | 7 +++++++ .../pages/workflows/workflows-page.component.html | 11 +++++++---- .../pages/workflows/workflows-page.component.ts | 2 ++ .../settings/settings-area.component.html | 2 +- .../app/framework/utils/immutable-array.ts | 2 +- .../app/shared/services/workflows.service.ts | 2 +- .../app/shared/state/workflows.state.spec.ts | 2 +- 11 files changed, 42 insertions(+), 17 deletions(-) diff --git a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.html b/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.html index d38d5a80f..b6351a824 100644 --- a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.html +++ b/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.html @@ -1,7 +1,10 @@
-
@@ -10,14 +13,14 @@ [ngModelOptions]="onBlur" [ngModel]="step.color" (ngModelChange)="changeColor($event)" - [disabled]="step.isLocked"> + [disabled]="step.isLocked || disabled">
+ [disabled]="step.isLocked || transitionAdd">
@@ -26,7 +29,7 @@ (Cannot be removed)
-
@@ -35,12 +38,13 @@
-
+
@@ -60,6 +64,7 @@
diff --git a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.scss b/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.scss index 4386ddcb1..f186e2097 100644 --- a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.scss +++ b/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.scss @@ -40,16 +40,16 @@ .step { & { - margin-bottom: 1rem; + margin-bottom: 1.5rem; } &-inner { - padding-left: 2rem; + padding-left: 2.4rem; } &-header { &:hover { - .btn-initial { + .enabled { visibility: visible; } } @@ -68,6 +68,9 @@ &:disabled { @include opacity(1); + } + + &.active { visibility: visible; } } \ No newline at end of file diff --git a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.ts b/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.ts index ab96941ef..13b7b45e1 100644 --- a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.ts +++ b/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.ts @@ -32,6 +32,9 @@ export class WorkflowStepComponent implements OnChanges { @Input() public roles: RoleDto[]; + @Input() + public disabled: boolean; + @Output() public makeInitial = new EventEmitter(); diff --git a/src/Squidex/app/features/settings/pages/workflows/workflow-transition.component.html b/src/Squidex/app/features/settings/pages/workflows/workflow-transition.component.html index bdcd98e5a..7eb5a295f 100644 --- a/src/Squidex/app/features/settings/pages/workflows/workflow-transition.component.html +++ b/src/Squidex/app/features/settings/pages/workflows/workflow-transition.component.html @@ -12,6 +12,7 @@