Skip to content

Commit

Permalink
Chore: transfer 'overview' change in activity log (#6415)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterSmallenbroek authored Jan 24, 2025
1 parent a129cca commit 8200225
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { DatePipe } from '@angular/common';
import {
ChangeDetectionStrategy,
Component,
computed,
inject,
input,
LOCALE_ID,
} from '@angular/core';

import { injectQuery } from '@tanstack/angular-query-experimental';
Expand All @@ -29,6 +31,7 @@ import { Activity } from '~/domains/registration/registration.model';
import { ActivityLogVoucherDialogComponent } from '~/pages/project-registration-activity-log/components/activity-log-voucher-dialog/activity-log-voucher-dialog.component';
import { ActivityLogTableCellContext } from '~/pages/project-registration-activity-log/project-registration-activity-log.page';
import { RegistrationAttributeService } from '~/services/registration-attribute.service';
import { Locale } from '~/utils/locale';

@Component({
selector: 'app-table-cell-overview',
Expand Down Expand Up @@ -71,6 +74,7 @@ export class TableCellOverviewComponent
{
value = input.required<Activity>();
context = input.required<ActivityLogTableCellContext>();
locale = inject<Locale>(LOCALE_ID);

readonly registrationAttributeService = inject(RegistrationAttributeService);

Expand Down Expand Up @@ -114,7 +118,7 @@ export class TableCellOverviewComponent
case ActivityTypeEnum.StatusChange:
return REGISTRATION_STATUS_LABELS[item.attributes.newValue];
case ActivityTypeEnum.Transaction:
return `${ACTIVITY_LOG_ITEM_TYPE_LABELS[item.type]} #${item.attributes.payment.toString()}`;
return `${ACTIVITY_LOG_ITEM_TYPE_LABELS[item.type]} ${new DatePipe(this.locale).transform(new Date(item.attributes.paymentDate), 'short') ?? ''}`;
}
});

Expand Down

0 comments on commit 8200225

Please sign in to comment.