Removed unncessary data from PDF

This commit is contained in:
SepehrYahyaee
2026-09-12 14:35:01 +03:30
parent 7fd60df1d6
commit bc9c217d8a
2 changed files with 57 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ const SKIP_FLATTEN_KEYS = new Set([
"confirmation",
"inquiries",
"raw",
"source",
]);
type ReportRecord = Record<string, unknown>;
@@ -39,6 +40,7 @@ type ReportParty = ReportRecord & {
function asString(value: unknown): string | undefined {
if (value === undefined || value === null || value === "") return undefined;
if (typeof value === "boolean") return value ? "بله" : "خیر";
if (value instanceof Date) {
const [d, t] = toJalaliDateAndTime(value);
return `${d} ${t}`;