Skip to content

Instantly share code, notes, and snippets.

@clintonyeb
Created May 19, 2020 02:39
Show Gist options
  • Save clintonyeb/eb66cf505c486eb46ac5f43b1c112f8e to your computer and use it in GitHub Desktop.
Save clintonyeb/eb66cf505c486eb46ac5f43b1c112f8e to your computer and use it in GitHub Desktop.
import { Component, OnInit, Input } from '@angular/core';
import { Record } from '../models/Record';
import { Observable } from 'rxjs';
@Component({
selector: 'tbody[app-record]',
templateUrl: './record.component.html',
styleUrls: ['./record.component.scss'],
})
export class RecordComponent implements OnInit {
@Input() records: Array<Record>;
constructor() {}
getStatusColor(record: Record) {
if (record['Status'] === 'Cancelled') {
return 'is-danger';
} else if (record['Status'] === 'Filled') {
return 'is-warning';
} else {
return 'is-white';
}
}
ngOnInit(): void {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment