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
This commit is contained in:
parent
cdbe4543f7
commit
e5ddfc8955
|
@ -0,0 +1,48 @@
|
||||||
|
import {Component, Input, Output, EventEmitter} from '@angular/core';
|
||||||
|
|
||||||
|
import {ClaimResult} from '../claim-utils/claimEntities.class';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'start-over',
|
||||||
|
template: `<button (click)="startOver()" class="uk-button uk-button-danger uk-align-right" >Start Over</button>`,
|
||||||
|
|
||||||
|
})
|
||||||
|
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 );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -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 { }
|
Loading…
Reference in New Issue