Task/reuse value component in tag component of Admin Control panel (#6467)

* Reuse value component

* Update changelog
pull/6470/head^2
DmytroSkachko 2 months ago committed by GitHub
parent 86d4d6ed64
commit 3d07f69e17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Reused the value component in the tag management of the admin control panel
- Upgraded `jsonpath` from version `1.1.1` to `1.2.1`
## 2.247.0 - 2026-03-04

@ -199,7 +199,7 @@
<div class="row">
<div class="col">
<h2 class="text-center" i18n>Tags</h2>
<gf-admin-tag />
<gf-admin-tag [locale]="user?.settings?.locale" />
</div>
</div>
</div>

@ -74,9 +74,9 @@ export class GfAdminSettingsComponent implements OnDestroy, OnInit {
public isGhostfolioApiKeyValid: boolean;
public isLoading = false;
public pricingUrl: string;
public user: User;
private unsubscribeSubject = new Subject<void>();
private user: User;
public constructor(
private adminService: AdminService,

@ -45,7 +45,11 @@
<ng-container i18n>Activities</ng-container>
</th>
<td *matCellDef="let element" class="px-1 text-right" mat-cell>
{{ element.activityCount }}
<gf-value
class="d-inline-block justify-content-end"
[locale]="locale"
[value]="element.activityCount"
/>
</td>
</ng-container>

@ -1,13 +1,16 @@
import { UserService } from '@ghostfolio/client/services/user/user.service';
import { CreateTagDto, UpdateTagDto } from '@ghostfolio/common/dtos';
import { ConfirmationDialogType } from '@ghostfolio/common/enums';
import { getLocale } from '@ghostfolio/common/helper';
import { NotificationService } from '@ghostfolio/ui/notifications';
import { DataService } from '@ghostfolio/ui/services';
import { GfValueComponent } from '@ghostfolio/ui/value';
import {
ChangeDetectionStrategy,
ChangeDetectorRef,
Component,
Input,
OnDestroy,
OnInit,
ViewChild
@ -36,6 +39,7 @@ import { CreateOrUpdateTagDialogParams } from './create-or-update-tag-dialog/int
@Component({
changeDetection: ChangeDetectionStrategy.OnPush,
imports: [
GfValueComponent,
IonIcon,
MatButtonModule,
MatMenuModule,
@ -48,6 +52,8 @@ import { CreateOrUpdateTagDialogParams } from './create-or-update-tag-dialog/int
templateUrl: './admin-tag.component.html'
})
export class GfAdminTagComponent implements OnDestroy, OnInit {
@Input() locale = getLocale();
@ViewChild(MatSort) sort: MatSort;
public dataSource = new MatTableDataSource<Tag>();

Loading…
Cancel
Save