feat(i18n): bilingual Type/Method dropdowns + line echo on offering session

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Chris Chen
2026-05-29 22:07:57 -07:00
parent 4e15e9f630
commit 126e640731
2 changed files with 6 additions and 4 deletions
@@ -36,11 +36,12 @@
</label> </label>
<label class="flex flex-col gap-1">Type <label class="flex flex-col gap-1">Type
<kendo-dropdownlist [data]="categories" textField="name_en" valueField="id" [valuePrimitive]="true" <kendo-dropdownlist [data]="categories" textField="label" valueField="id" [valuePrimitive]="true"
[(ngModel)]="entry.givingCategoryId"></kendo-dropdownlist> [(ngModel)]="entry.givingCategoryId"></kendo-dropdownlist>
</label> </label>
<label class="flex flex-col gap-1">Method <label class="flex flex-col gap-1">Method
<kendo-dropdownlist [data]="paymentMethods" [(ngModel)]="entry.paymentMethod"></kendo-dropdownlist> <kendo-dropdownlist [data]="paymentMethods" textField="label" valueField="value" [valuePrimitive]="true"
[(ngModel)]="entry.paymentMethod"></kendo-dropdownlist>
</label> </label>
<label *ngIf="entry.paymentMethod === 'Check'" class="flex flex-col gap-1">Check # <label *ngIf="entry.paymentMethod === 'Check'" class="flex flex-col gap-1">Check #
@@ -16,6 +16,7 @@ import {
GivingCategoryDto, PaymentMethod, OfferingBufferLine, CreateOfferingSessionRequest, GivingCategoryDto, PaymentMethod, OfferingBufferLine, CreateOfferingSessionRequest,
OfferingSessionListItemDto, OfferingSessionDto, OfferingSessionListItemDto, OfferingSessionDto,
} from '../../models/giving.model'; } from '../../models/giving.model';
import { PAYMENT_METHOD_OPTIONS } from '../../../../shared/i18n/option-lists';
interface MemberOption { id: number; displayName: string; } interface MemberOption { id: number; displayName: string; }
@@ -33,7 +34,7 @@ export class OfferingSessionPageComponent implements OnInit {
sessionDate: Date = new Date(); sessionDate: Date = new Date();
dateConflict = false; dateConflict = false;
categories: GivingCategoryDto[] = []; categories: GivingCategoryDto[] = [];
readonly paymentMethods: PaymentMethod[] = ['Cash', 'Check', 'Zelle', 'PayPal', 'Other']; readonly paymentMethods = PAYMENT_METHOD_OPTIONS;
memberResults: MemberOption[] = []; memberResults: MemberOption[] = [];
selectedMemberId: number | null = null; selectedMemberId: number | null = null;
@@ -152,7 +153,7 @@ export class OfferingSessionPageComponent implements OnInit {
const line: OfferingBufferLine = { const line: OfferingBufferLine = {
...this.entry, ...this.entry,
memberName: this.entry.isAnonymous ? null : this.selectedMemberName, memberName: this.entry.isAnonymous ? null : this.selectedMemberName,
categoryName: cat?.name_en ?? '', categoryName: cat?.label ?? '',
}; };
if (this.editingIndex !== null) { this.buffer[this.editingIndex] = line; this.editingIndex = null; } if (this.editingIndex !== null) { this.buffer[this.editingIndex] = line; this.editingIndex = null; }
else { this.buffer = [...this.buffer, line]; } else { this.buffer = [...this.buffer, line]; }