Skip to content

Commit d6723e6

Browse files
committed
dev(ui): VehicleStatusTagComponent to be standalone
Signed-off-by: Kwong Tung Nan <tungnan5636@gmail.com>
1 parent 017c4d2 commit d6723e6

File tree

9 files changed

+27
-38
lines changed

9 files changed

+27
-38
lines changed

src/app/@ui/action-list/action-list.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import {
1313
SpottingTypeTagModule,
1414
} from "../spotting-type-tag/spotting-type-tag.module";
1515
import {
16-
VehicleStatusTagModule,
17-
} from "../vehicle-status-tag/vehicle-status-tag.module";
16+
VehicleStatusTagComponent,
17+
} from "../vehicle-status-tag/vehicle-status-tag.component";
1818

1919
@Component({
2020
selector: "ui-action-list",
@@ -26,7 +26,7 @@ import {
2626
NzListModule,
2727
NzSpaceModule,
2828
SpottingTypeTagModule,
29-
VehicleStatusTagModule,
29+
VehicleStatusTagComponent,
3030
],
3131
})
3232
export class ActionListComponent {

src/app/@ui/vehicle-status-tag/vehicle-status-tag.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

2+
import { TagsModule } from "ng-devui";
23
import {
34
VehicleStatus,
5+
VehicleStatusPipe,
46
} from "src/app/pipes/vehicle-status/vehicle-status.pipe";
57
import {
68
VehicleStatus as SpottingVehicleStatus,
@@ -12,6 +14,10 @@ import { Component, Input, OnInit } from "@angular/core";
1214
selector: "vehicle-status-tag",
1315
templateUrl: "./vehicle-status-tag.component.html",
1416
styleUrls: ["./vehicle-status-tag.component.scss"],
17+
standalone: true,
18+
imports: [
19+
VehicleStatusPipe, TagsModule
20+
]
1521
})
1622
export class VehicleStatusTagComponent implements OnInit {
1723
@Input() vehicleStatus!: VehicleStatus | SpottingVehicleStatus;

src/app/@ui/vehicle-status-tag/vehicle-status-tag.module.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/app/@ui/vehicle-table-cell-display/vehicle-table-cell-display.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import { CommonModule } from "@angular/common";
88
import { Component, Input, OnInit } from "@angular/core";
99

1010
import {
11-
VehicleStatusTagModule,
12-
} from "../vehicle-status-tag/vehicle-status-tag.module";
11+
VehicleStatusTagComponent,
12+
} from "../vehicle-status-tag/vehicle-status-tag.component";
1313

1414
interface VehicleData {
1515
id: string;
@@ -31,7 +31,7 @@ interface VehicleData {
3131
templateUrl: "./vehicle-table-cell-display.component.html",
3232
styleUrls: ["./vehicle-table-cell-display.component.scss"],
3333
standalone: true,
34-
imports: [CommonModule, TooltipModule, VehicleStatusTagModule],
34+
imports: [CommonModule, TooltipModule, VehicleStatusTagComponent],
3535
})
3636
export class VehicleTableCellDisplayComponent implements OnInit {
3737
@Input() vehicleData!: VehicleData;

src/app/console/events-table/events-table.component.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ import {
2222
ImagePreviewButtonComponent,
2323
} from "src/app/@ui/spotting/image-preview-button/image-preview-button.component";
2424
import {
25-
VehicleStatusTagModule,
26-
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.module";
25+
VehicleStatusTagComponent,
26+
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.component";
2727
import {
2828
VehicleTableCellDisplayComponent,
2929
} from "src/app/@ui/vehicle-table-cell-display/vehicle-table-cell-display.component";
@@ -74,9 +74,8 @@ interface TableSourceType extends ConsoleEventsGqlResponseTableDataElement {
7474
SpottingTypeCellDisplayComponent,
7575
ToggleModule,
7676
TooltipModule,
77-
VehicleStatusTagModule,
77+
VehicleStatusTagComponent,
7878
VehicleTableCellDisplayComponent,
79-
8079
]
8180
})
8281
export class ConsoleEventsTableComponent implements OnInit, OnDestroy {

src/app/profile/spottings/spottings.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ import {
1515
ImagePreviewButtonComponent,
1616
} from "src/app/@ui/spotting/image-preview-button/image-preview-button.component";
1717
import {
18-
VehicleStatusTagModule,
19-
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.module";
18+
VehicleStatusTagComponent,
19+
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.component";
2020
import {
2121
VehicleTableCellDisplayComponent,
2222
} from "src/app/@ui/vehicle-table-cell-display/vehicle-table-cell-display.component";
@@ -49,7 +49,7 @@ import {
4949
LoadingModule,
5050
NzToolTipModule,
5151
SpottingTypeCellDisplayComponent,
52-
VehicleStatusTagModule,
52+
VehicleStatusTagComponent,
5353
VehicleTableCellDisplayComponent,
5454
],
5555
})

src/app/spotting/spotting-form/spotting-form.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ import {
1717
ActionListComponent,
1818
} from "src/app/@ui/action-list/action-list.component";
1919
import {
20-
VehicleStatusTagModule,
21-
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.module";
20+
VehicleStatusTagComponent,
21+
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.component";
2222
import { GetLinesAndVehiclesResponse } from "src/app/models/query/get-vehicles";
2323
import {
2424
CoordinatesHumanizerPipe,
@@ -117,7 +117,7 @@ export interface SpottingFormReturnType {
117117
NzSpaceModule,
118118
NzSpinModule,
119119
ReactiveFormsModule,
120-
VehicleStatusTagModule,
120+
VehicleStatusTagComponent,
121121
],
122122
})
123123
export class SpottingFormComponent implements OnInit, OnDestroy {

src/app/spotting/vehicle-type-container/spotting-table/inline-history/inline-history.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import {
1414
ImagePreviewButtonComponent,
1515
} from "src/app/@ui/spotting/image-preview-button/image-preview-button.component";
1616
import {
17-
VehicleStatusTagModule,
18-
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.module";
17+
VehicleStatusTagComponent,
18+
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.component";
1919
import {
2020
GetVehiclesLastSpottingResponse,
2121
LastSpottingsTableElement,
@@ -39,7 +39,7 @@ import { Component, Input, OnDestroy, OnInit } from "@angular/core";
3939
LoadingModule,
4040
NzToolTipModule,
4141
SpottingTypeCellDisplayComponent,
42-
VehicleStatusTagModule,
42+
VehicleStatusTagComponent,
4343
],
4444
})
4545
export class InlineHistoryComponent implements OnInit, OnDestroy {

src/app/spotting/vehicle-type-container/spotting-table/spotting-table.component.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { PanelModule, TooltipModule } from "ng-devui";
22
import { DataTableModule, TableWidthConfig } from "ng-devui/data-table";
33
import { TagsModule } from "ng-devui/tags";
44
import {
5-
VehicleStatusTagModule,
6-
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.module";
5+
VehicleStatusTagComponent,
6+
} from "src/app/@ui/vehicle-status-tag/vehicle-status-tag.component";
77
import {
88
WheelStatusTagComponent,
99
} from "src/app/@ui/wheel-status-tag/wheel-status-tag.component";
@@ -38,7 +38,7 @@ import {
3838
PanelModule,
3939
TagsModule,
4040
TooltipModule,
41-
VehicleStatusTagModule,
41+
VehicleStatusTagComponent,
4242
WheelStatusTagComponent,
4343
],
4444
})

0 commit comments

Comments
 (0)