29 lines
785 B
TypeScript
29 lines
785 B
TypeScript
|
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
|
||
|
import { DatasetListingModel } from '../../../core/model/dataset/dataset-listing';
|
||
|
|
||
|
@Component({
|
||
|
selector: 'app-explore-dataset-listing-item-component',
|
||
|
templateUrl: './explore-dataset-listing-item.component.html',
|
||
|
styleUrls: ['./explore-dataset-listing-item.component.scss']
|
||
|
})
|
||
|
export class ExploreDatasetListingItemComponent implements OnInit {
|
||
|
|
||
|
@Input() dataset: DatasetListingModel;
|
||
|
@Input() showDivider: boolean = true;
|
||
|
@Output() onClick: EventEmitter<DatasetListingModel> = new EventEmitter();
|
||
|
|
||
|
draft: boolean;
|
||
|
|
||
|
constructor() { }
|
||
|
|
||
|
ngOnInit() {
|
||
|
if (this.dataset.status == 0) { this.draft = true }
|
||
|
else { this.draft = false }
|
||
|
}
|
||
|
|
||
|
itemClicked() {
|
||
|
this.onClick.emit(this.dataset);
|
||
|
}
|
||
|
|
||
|
}
|