From 2960c232dc70bcd0de375a3732f98cef41b9e0b4 Mon Sep 17 00:00:00 2001 From: ShaabanEltanany Date: Tue, 10 Dec 2019 11:14:59 +0200 Subject: adding new designer component, sort and configuration dashboard Issue-ID: CCSDK-1982 Issue-ID: CCSDK-1984 Issue-ID: CCSDK-1983 Signed-off-by: ShaabanEltanany Change-Id: I05d12bbf5ebc940bd6983da06af3f85ee18eb723 --- .../designer/functions/functions.component.css | 0 .../designer/functions/functions.component.html | 21 +++++++++++++++++ .../designer/functions/functions.component.spec.ts | 25 +++++++++++++++++++++ .../designer/functions/functions.component.ts | 26 ++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.css create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.html create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.spec.ts create mode 100644 cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.ts (limited to 'cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions') diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.css b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.css new file mode 100644 index 000000000..e69de29bb diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.html b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.html new file mode 100644 index 000000000..b27f91f49 --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.html @@ -0,0 +1,21 @@ +

Functions

+
+ Drag and drop function to Action’s box +
    +
  • +

    {{function.modelName}}

    +
  • + +
+
diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.spec.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.spec.ts new file mode 100644 index 000000000..eec909b01 --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { FunctionsComponent } from './functions.component'; + +describe('FunctionsComponent', () => { + let component: FunctionsComponent; + let fixture: ComponentFixture; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ FunctionsComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(FunctionsComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.ts b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.ts new file mode 100644 index 000000000..2223c9fa6 --- /dev/null +++ b/cds-ui/designer-client/src/app/modules/feature-modules/packages/designer/functions/functions.component.ts @@ -0,0 +1,26 @@ +import {Component, OnInit} from '@angular/core'; +import {DesignerStore} from '../designer.store'; + +@Component({ + selector: 'app-functions', + templateUrl: './functions.component.html', + styleUrls: ['./functions.component.css'] +}) +export class FunctionsComponent implements OnInit { + viewedFunctions: ModelType[] = []; + + constructor(private designerStore: DesignerStore) { + + this.designerStore.state$.subscribe(state => { + console.log(state); + if (state.functions) { + this.viewedFunctions = state.functions; + } + }); + } + + ngOnInit() { + this.designerStore.getFuntions(); + } + +} -- cgit 1.2.3-korg