+5
-4
@@ -94,7 +94,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
|
||||
private memberApi: MemberApiService,
|
||||
private signalr: OfferingEntrySignalrService,
|
||||
private mealAttendanceApi: MealAttendanceApiService,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
this.categoryApi.getAll(false).subscribe(c => {
|
||||
@@ -339,7 +339,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
|
||||
clearAnonymous(): void {
|
||||
this.entry.isAnonymous = false;
|
||||
}
|
||||
|
||||
lastAddedLine: OfferingBufferLine | null = null;
|
||||
addLine(): void {
|
||||
if (this.entry.amount <= 0) return;
|
||||
if (this.entry.paymentMethod === 'Check' && !this.entry.checkNumber) return;
|
||||
@@ -351,6 +351,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
|
||||
};
|
||||
if (this.editingIndex !== null) { this.buffer[this.editingIndex] = line; this.editingIndex = null; }
|
||||
else { this.buffer = [...this.buffer, line]; }
|
||||
this.lastAddedLine = line;
|
||||
this.resetEntry();
|
||||
}
|
||||
|
||||
@@ -405,7 +406,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
|
||||
switchMap(id => this.pendingProofFiles.length === 0
|
||||
? of(void 0)
|
||||
: from(buildProofPdf(this.pendingProofFiles)).pipe(
|
||||
switchMap(({ blob }) => this.api.uploadProof(id, blob)))),
|
||||
switchMap(({ blob }) => this.api.uploadProof(id, blob)))),
|
||||
).subscribe({
|
||||
next: () => {
|
||||
this.submitting = false;
|
||||
@@ -503,7 +504,7 @@ export class OfferingSessionPageComponent implements OnInit, OnDestroy {
|
||||
|
||||
private blankEntry(): OfferingBufferLine {
|
||||
return {
|
||||
memberId: null, givingCategoryId: 0, amount: 0, paymentMethod: 'Cash',
|
||||
memberId: null, givingCategoryId: this.lastAddedLine?.givingCategoryId, amount: 0, paymentMethod: this.lastAddedLine?.paymentMethod ?? 'Cash',
|
||||
checkNumber: null, zelleReferenceCode: null, payPalTransactionId: null,
|
||||
isAnonymous: false, notes: null, memberName: null, categoryName: '',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user