From e5ddfc895515f6a2a0039bc2b5df235330d24c40 Mon Sep 17 00:00:00 2001 From: "argiro.kokogiannaki" Date: Mon, 3 Apr 2017 09:22:44 +0000 Subject: [PATCH] missing compoonents from previous commit git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@46564 d315682c-612b-4755-9ff5-7f18f6832af3 --- .../claims/claim-utils/startOver.component.ts | 48 +++++++++++++++++++ .../claims/claim-utils/startOver.module.ts | 15 ++++++ 2 files changed, 63 insertions(+) create mode 100644 portal-2/src/app/claims/claim-utils/startOver.component.ts create mode 100644 portal-2/src/app/claims/claim-utils/startOver.module.ts diff --git a/portal-2/src/app/claims/claim-utils/startOver.component.ts b/portal-2/src/app/claims/claim-utils/startOver.component.ts new file mode 100644 index 00000000..2fc9117d --- /dev/null +++ b/portal-2/src/app/claims/claim-utils/startOver.component.ts @@ -0,0 +1,48 @@ +import {Component, Input, Output, EventEmitter} from '@angular/core'; + +import {ClaimResult} from '../claim-utils/claimEntities.class'; + +@Component({ + selector: 'start-over', + template: ``, + +}) +export class StartOverComponent { + constructor () { + + + } + ngOnInit() { + +} + + + // @Input() public inlineEntity = null; + @Input() public type:string; + @Input() public linkTo:string; + @Input() public results; + @Input() public projects; + @Input() public contexts; + + + startOver(){ + console.log("projects:"+this.projects.length +" contexts:"+this.contexts.length + " results:"+this.results.length ); + if(this.type != null && this.linkTo != null){ + console.log("inline"); + if(this.linkTo == "project"){ + this.projects.splice(0, this.projects.length); + }else if(this.linkTo == "context"){ + this.contexts.splice(0, this.contexts.length); + }else if(this.linkTo == "result"){ + this.results.splice(0, this.results.length); + } + }else{ + console.log("generic"); + this.results.splice(0, this.results.length); + this.projects.splice(0, this.projects.length); + this.contexts.splice(0, this.contexts.length); + } + console.log("projects:"+this.projects.length +" contexts:"+this.contexts.length + " results:"+this.results.length ); + } + +} diff --git a/portal-2/src/app/claims/claim-utils/startOver.module.ts b/portal-2/src/app/claims/claim-utils/startOver.module.ts new file mode 100644 index 00000000..314e85ca --- /dev/null +++ b/portal-2/src/app/claims/claim-utils/startOver.module.ts @@ -0,0 +1,15 @@ +import { NgModule } from '@angular/core'; +import { SharedModule } from '../../shared/shared.module'; +import { CommonModule } from '@angular/common'; +import {StartOverComponent} from './startOver.component'; + + @NgModule({ + imports: [ + SharedModule, CommonModule + ], + declarations: [ + StartOverComponent + ], + exports: [StartOverComponent ] +}) +export class StartOverModule { }