30 lines
1.1 KiB
TypeScript
30 lines
1.1 KiB
TypeScript
import { CurrencyPipe } from '@angular/common';
|
|
import { Component, inject, computed } from '@angular/core';
|
|
import { MatTableModule } from '@angular/material/table';
|
|
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
|
|
|
|
import { ErrorStateComponent } from '../shared/error-state/error-state.component';
|
|
import { SkeletonLoaderComponent } from '../shared/skeleton-loader/skeleton-loader.component';
|
|
import { BatchIntegrityReportService } from './batch-integrity-report.service';
|
|
|
|
@Component({
|
|
selector: 'app-batch-integrity',
|
|
templateUrl: './batch-integrity-report.component.html',
|
|
styleUrls: ['./batch-integrity-report.component.css'],
|
|
imports: [MatTableModule, RouterModule, CurrencyPipe, SkeletonLoaderComponent, ErrorStateComponent],
|
|
})
|
|
export class BatchIntegrityReportComponent {
|
|
private route = inject(ActivatedRoute);
|
|
private router = inject(Router);
|
|
private ser = inject(BatchIntegrityReportService);
|
|
|
|
displayedColumns = ['batch', 'details'];
|
|
|
|
infoResource = this.ser.batchIntegrity();
|
|
info = computed(() => this.infoResource.value() ?? []);
|
|
|
|
refresh() {
|
|
this.router.navigate([]);
|
|
}
|
|
}
|