saving progress, lots of charting decisions made
This commit is contained in:
@@ -6,24 +6,49 @@ import { DataService } from '../services/data.service';
|
||||
import { TableComponent } from '../components/table/table.component';
|
||||
import { Header } from '../components/table/header';
|
||||
import { FilterService } from '../services/filters.service';
|
||||
import { Observable } from 'rxjs';
|
||||
import { Milestone } from '../enums/milestone';
|
||||
import { ScoresComponent } from './scores/scores.component';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { CohortSectionComponent } from './cohort-section/cohort-section.component';
|
||||
import { KeyValue } from '../models/key-value';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
standalone: true,
|
||||
imports: [RouterOutlet, ChartComponent, SelectComponent, TableComponent],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterOutlet,
|
||||
ChartComponent,
|
||||
SelectComponent,
|
||||
TableComponent,
|
||||
ScoresComponent,
|
||||
CohortSectionComponent,
|
||||
],
|
||||
templateUrl: './app.component.html',
|
||||
styleUrl: './app.component.scss',
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
title = 'Georgia Milestones';
|
||||
|
||||
county = '644';
|
||||
school = ['3067', '0605'];
|
||||
grades = [3, 4, 5];
|
||||
cohorts: string[] = [];
|
||||
|
||||
data = inject(DataService);
|
||||
filter = inject(FilterService);
|
||||
|
||||
header = [new Header({ label: 'School', source: 'school' })];
|
||||
rows: Record<string, any>[] = [];
|
||||
header = [
|
||||
{ label: 'School', source: Milestone.School },
|
||||
{ label: 'Grade', source: Milestone.Grade },
|
||||
].map((data) => new Header(data));
|
||||
rows: Observable<Record<string, any>[]> = this.data.Data;
|
||||
|
||||
ngOnInit(): void {
|
||||
this.data.Cohorts.subscribe((kv: KeyValue[]) => {
|
||||
this.cohorts = kv.map((i: KeyValue) => i.key);
|
||||
});
|
||||
// this.filter.filters$.subscribe((filters: KeyValue[]) => {
|
||||
// this.data.Data.pipe(take(1)).subscribe((data: Milestone[]) => {
|
||||
// const result = data.filter((d: Milestone) => {
|
||||
@@ -46,4 +71,8 @@ export class AppComponent implements OnInit {
|
||||
// });
|
||||
// });
|
||||
}
|
||||
|
||||
onReset(event: any): void {
|
||||
this.filter.reset();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user