view data fixes

This commit is contained in:
2026-01-23 15:30:23 +01:00
parent e22033be38
commit f8099f04bc
213 changed files with 3466 additions and 3003 deletions

View File

@@ -0,0 +1,27 @@
import { ViewModel } from "../contracts/view-models/ViewModel";
import type { InvoiceViewData } from "@/lib/view-data/BillingViewData";
export class InvoiceViewModel extends ViewModel {
private readonly data: InvoiceViewData;
constructor(data: InvoiceViewData) {
super();
this.data = data;
}
get id(): string { return this.data.id; }
get invoiceNumber(): string { return this.data.invoiceNumber; }
get date(): string { return this.data.date; }
get dueDate(): string { return this.data.dueDate; }
get amount(): number { return this.data.amount; }
get vatAmount(): number { return this.data.vatAmount; }
get totalAmount(): number { return this.data.totalAmount; }
get status(): string { return this.data.status; }
get description(): string { return this.data.description; }
get sponsorshipType(): string { return this.data.sponsorshipType; }
get pdfUrl(): string { return this.data.pdfUrl; }
get totalAmountFormatted(): string { return this.data.formattedTotalAmount; }
get vatAmountFormatted(): string { return this.data.formattedVatAmount; }
get dateFormatted(): string { return this.data.formattedDate; }
get isOverdue(): boolean { return this.data.isOverdue; }
}