-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdata-quality.component.ts
34 lines (30 loc) · 1.23 KB
/
data-quality.component.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import type { OnInit } from '@angular/core'
import { Component, inject, ViewEncapsulation } from '@angular/core'
import { ActivatedRoute, Router } from '@angular/router'
import { InventoryTabComponent, PageComponent } from '@seed/components'
import { SharedImports } from '@seed/directives'
import type { InventoryType } from 'app/modules/inventory/inventory.types'
@Component({
selector: 'seed-organizations-data-quality',
templateUrl: './data-quality.component.html',
encapsulation: ViewEncapsulation.None,
imports: [InventoryTabComponent, PageComponent, SharedImports],
})
export class DataQualityComponent implements OnInit {
private _route = inject(ActivatedRoute)
private _router = inject(Router)
readonly tabs: InventoryType[] = ['properties', 'taxlots', 'goal']
type = this._route.snapshot.paramMap.get('type') as InventoryType
readonly table_type = 'Data Quality'
readonly urlSegment = 'data-quality'
ngOnInit(): void {
console.log('organizations data quality')
}
async toggleInventoryType(type: InventoryType) {
if (type !== this.type) {
const newRoute = `/organizations/data-quality/${type}`
await this._router.navigateByUrl(newRoute, { skipLocationChange: false })
this.type = type
}
}
}