diff --git a/src/Squidex/app-config/karma-test-shim.js b/src/Squidex/app-config/karma-test-shim.js index af16a868c..773d09e87 100644 --- a/src/Squidex/app-config/karma-test-shim.js +++ b/src/Squidex/app-config/karma-test-shim.js @@ -18,7 +18,7 @@ testing.TestBed.initTestEnvironment( browser.platformBrowserDynamicTesting() ); -var testContext = require.context('../app', true, /workflows\.service\.spec\.ts/); +var testContext = require.context('../app', true, /\.spec\.ts/); /** * Get all the files, for each file, call the context function diff --git a/src/Squidex/app/features/settings/declarations.ts b/src/Squidex/app/features/settings/declarations.ts index 17e095257..fdb82e6b5 100644 --- a/src/Squidex/app/features/settings/declarations.ts +++ b/src/Squidex/app/features/settings/declarations.ts @@ -18,7 +18,5 @@ export * from './pages/patterns/patterns-page.component'; export * from './pages/plans/plans-page.component'; export * from './pages/roles/role.component'; export * from './pages/roles/roles-page.component'; -export * from './pages/workflows/workflow-step.component'; -export * from './pages/workflows/workflows-page.component'; export * from './settings-area.component'; \ No newline at end of file diff --git a/src/Squidex/app/features/settings/module.ts b/src/Squidex/app/features/settings/module.ts index 29802f591..633249037 100644 --- a/src/Squidex/app/features/settings/module.ts +++ b/src/Squidex/app/features/settings/module.ts @@ -30,9 +30,7 @@ import { PlansPageComponent, RoleComponent, RolesPageComponent, - SettingsAreaComponent, - WorkflowsPageComponent, - WorkflowStepComponent + SettingsAreaComponent } from './declarations'; const routes: Routes = [ @@ -172,10 +170,6 @@ const routes: Routes = [ } } ] - }, - { - path: 'workflows', - component: WorkflowsPageComponent } ] } @@ -202,9 +196,7 @@ const routes: Routes = [ PlansPageComponent, RoleComponent, RolesPageComponent, - SettingsAreaComponent, - WorkflowsPageComponent, - WorkflowStepComponent + SettingsAreaComponent ] }) export class SqxFeatureSettingsModule { } \ No newline at end of file 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 deleted file mode 100644 index 70f05540d..000000000 --- a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.html +++ /dev/null @@ -1,63 +0,0 @@ -
-
-
- - -
-
- - -
-
- -
-
- -
-
- -
-
-
-
{{transition.to}} -
-
-
- -
-
- -
-
- -
-
- -
-
- - -
{{target.name}} -
-
-
-
- -
-
-
\ No newline at end of file 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 deleted file mode 100644 index a51dd500f..000000000 --- a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.scss +++ /dev/null @@ -1,39 +0,0 @@ -@import '_vars'; -@import '_mixins'; - -.color { - line-height: 2.8rem; -} - -.color-circle { - @include circle(12px); - border: 1px solid $color-border-dark; - background: $color-border; - display: inline-block; -} - -.dashed { - border-style: dashed; -} - -.transition { - & { - padding-left: 1rem; - margin-top: .25rem; - margin-bottom: .5rem; - line-height: 2rem; - } - - &-to { - padding: .5rem .75rem; - background: transparent; - border: 1px solid transparent; - line-height: 1.2rem; - } -} - -.step { - & { - margin-bottom: 1rem; - } -} \ 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 deleted file mode 100644 index afbb45169..000000000 --- a/src/Squidex/app/features/settings/pages/workflows/workflow-step.component.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Squidex Headless CMS - * - * @license - * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */ - -import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; - -import { - WorkflowDto, - WorkflowStep, - WorkflowStepValues, - WorkflowTransition, - WorkflowTransitionView -} from '@app/shared'; - -@Component({ - selector: 'sqx-workflow-step', - styleUrls: ['./workflow-step.component.scss'], - templateUrl: './workflow-step.component.html' -}) -export class WorkflowStepComponent implements OnChanges { - @Input() - public workflow: WorkflowDto; - - @Input() - public step: WorkflowStep; - - @Output() - public transitionAdd = new EventEmitter(); - - @Output() - public transitionRemove = new EventEmitter(); - - @Output() - public update = new EventEmitter(); - - @Output() - public rename = new EventEmitter(); - - @Output() - public remove = new EventEmitter(); - - public onBlur = { updateOn: 'blur' }; - - public openSteps: WorkflowStep[]; - public openStep: WorkflowStep; - - public transitions: WorkflowTransitionView[]; - - public ngOnChanges(changes: SimpleChanges) { - if (changes['workflow'] || changes['step'] || false) { - this.openSteps = this.workflow.getOpenSteps(this.step); - this.openStep = this.openSteps[0]; - - this.transitions = this.workflow.getTransitions(this.step); - } - } - - public changeName(name: string) { - this.rename.emit(name); - } - - public changeColor(color: string) { - this.update.emit({ color }); - } -} - diff --git a/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.html b/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.html deleted file mode 100644 index c5782052b..000000000 --- a/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.html +++ /dev/null @@ -1,37 +0,0 @@ - - - Workflows - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.scss b/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.scss deleted file mode 100644 index fbb752506..000000000 --- a/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.scss +++ /dev/null @@ -1,2 +0,0 @@ -@import '_vars'; -@import '_mixins'; \ No newline at end of file diff --git a/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.ts b/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.ts deleted file mode 100644 index 272a2852b..000000000 --- a/src/Squidex/app/features/settings/pages/workflows/workflows-page.component.ts +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Squidex Headless CMS - * - * @license - * Copyright (c) Squidex UG (haftungsbeschränkt). All rights reserved. - */ - -import { Component, OnInit } from '@angular/core'; - -import { - WorkflowDto, - WorkflowStep, - WorkflowStepValues, - WorkflowTransition -} from '@app/shared'; - -@Component({ - selector: 'sqx-workflows-page', - styleUrls: ['./workflows-page.component.scss'], - templateUrl: './workflows-page.component.html' -}) -export class WorkflowsPageComponent implements OnInit { - public workflow: WorkflowDto; - - public ngOnInit() { - this.workflow = new WorkflowDto().setStep('Published', { color: 'green', isLocked: true }); - } - - public reload() { - return; - } - - public save() { - return; - } - - public addStep() { - this.workflow = this.workflow.setStep(`Step${this.workflow.steps.length + 1}`, {}); - } - - public addTransiton(from: WorkflowStep, to: WorkflowStep) { - this.workflow = this.workflow.setTransition(from.name, to.name, {}); - } - - public removeTransition(from: WorkflowStep, transition: WorkflowTransition) { - this.workflow = this.workflow.removeTransition(from.name, transition.to); - } - - public updateStep(step: WorkflowStep, values: WorkflowStepValues) { - this.workflow = this.workflow.setStep(step.name, values); - } - - public renameStep(step: WorkflowStep, newName: string) { - this.workflow = this.workflow.renameStep(step.name, newName); - } - - public removeStep(step: WorkflowStep) { - this.workflow = this.workflow.removeStep(step.name); - } - - public trackByStep(index: number, step: WorkflowStep) { - return step.name; - } -} - diff --git a/src/Squidex/app/features/settings/settings-area.component.html b/src/Squidex/app/features/settings/settings-area.component.html index cee2481d3..5669f4b3c 100644 --- a/src/Squidex/app/features/settings/settings-area.component.html +++ b/src/Squidex/app/features/settings/settings-area.component.html @@ -43,12 +43,6 @@ -