Browse Source

fix(client): enforce encapsulation

pull/6893/head
KenTandrian 1 week ago
parent
commit
3e70d7ea91
  1. 15
      apps/client/src/app/components/admin-tag/admin-tag.component.ts

15
apps/client/src/app/components/admin-tag/admin-tag.component.ts

@ -56,9 +56,14 @@ import { CreateOrUpdateTagDialogParams } from './create-or-update-tag-dialog/int
export class GfAdminTagComponent implements OnInit { export class GfAdminTagComponent implements OnInit {
public readonly locale = input(getLocale()); public readonly locale = input(getLocale());
public dataSource = new MatTableDataSource<Tag>(); protected dataSource = new MatTableDataSource<Tag>();
public displayedColumns = ['name', 'userId', 'activities', 'actions']; protected readonly displayedColumns = [
public tags: Tag[]; 'name',
'userId',
'activities',
'actions'
];
protected tags: Tag[];
private readonly deviceType = computed( private readonly deviceType = computed(
() => this.deviceDetectorService.deviceInfo().deviceType () => this.deviceDetectorService.deviceInfo().deviceType
@ -103,7 +108,7 @@ export class GfAdminTagComponent implements OnInit {
this.fetchTags(); this.fetchTags();
} }
public onDeleteTag(aId: string) { protected onDeleteTag(aId: string) {
this.notificationService.confirm({ this.notificationService.confirm({
confirmFn: () => { confirmFn: () => {
this.deleteTag(aId); this.deleteTag(aId);
@ -113,7 +118,7 @@ export class GfAdminTagComponent implements OnInit {
}); });
} }
public onUpdateTag({ id }: Tag) { protected onUpdateTag({ id }: Tag) {
this.router.navigate([], { this.router.navigate([], {
queryParams: { editTagDialog: true, tagId: id } queryParams: { editTagDialog: true, tagId: id }
}); });

Loading…
Cancel
Save