add source code

This commit is contained in:
Michał Chudy
2025-11-14 15:51:00 +01:00
parent df0ef23857
commit b9972746aa
223 changed files with 24651 additions and 46774 deletions

View File

@@ -0,0 +1,20 @@
import { Content } from 'pdfmake/interfaces';
import { createLabelText, formatText, getKraj } from '../../../shared/PDF-functions';
import FormatTyp from '../../../shared/enums/common.enum';
import { Adres } from '../../types/fa2.types';
export function generateAdres(adres: Adres): Content[] {
const result: Content[] = [];
if (adres?.AdresL1) {
result.push(formatText(adres.AdresL1._text, FormatTyp.Value));
}
if (adres?.AdresL2) {
result.push(formatText(adres.AdresL2._text, FormatTyp.Value));
}
if (adres?.KodKraju) {
result.push(formatText(getKraj(adres.KodKraju._text ?? ''), FormatTyp.Value));
}
result.push(...createLabelText('GLN: ', adres.GLN));
return result;
}