1.8 KiB
1.8 KiB
Task H.5.3: PDF Template Version Remap + Static Labels
Outcome
- created active
1.1quotation PDF template versions for bothALLAandONVALLA - retained historical
1.0versions as inactive records - rebuilt active mappings from the current template inventory instead of copying the old version wholesale
- restored runtime values for
tel_label,email_label,att_label,project_label, andsite_label
Field Inventory Result
- deleted from previous version:
exclusion_data,exclusion_label - new active templates keep dynamic topic bases
topicanddata_topic - designer-owned static visuals such as
line,quotation_date_labe, andquotation_code_lableremain classified but unmapped - compatibility tokens
quotation_priceandcurrencyremain mapped because the active price table still embeds those placeholders
Seed / Remap Flow
npm run seed:pdf-template-versionreads the latest JSON fromsrc/pdfme_template/*.json- if the schema already exists in DB, it re-activates and reconciles mappings idempotently
- if the schema is new, it creates the next minor version, activates it, and deactivates the previous active version
- mappings are rebuilt only for fields or tokens still present in that target version
Verification
npx tsc --noEmitpassednpm run seed:pdf-template-versionpassednpm run audit:pdfpassed with overall statusPASS
Remaining Risks
- active templates still rely on compatibility tokens
quotation_priceandcurrencyinside the table content; those should be removed only in a future controlled template revision - the audit fixture now points to active
1.1; production-approved historical quotations still need operator discipline so their stored template version is never rewritten manually