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