revert(orders-pdf): remove the E-mail line from the issued-order footer

Keeps the 'Vystavil: <name>' line (logged-in user) and the removed Schválil
signature row; drops the e-mail line + its param field/translation keys per
request.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
BOHA
2026-06-09 21:56:54 +02:00
parent 5462fcf944
commit 1e4dd1fbcc
2 changed files with 6 additions and 20 deletions

View File

@@ -276,7 +276,7 @@ describe("renderIssuedOrderHtml", () => {
},
];
const issuer = { name: "Jan Novák", email: "jan.novak@firma.cz" };
const issuer = { name: "Jan Novák" };
it("renders the PO number, items, and both party names (PO direction)", () => {
const html = renderIssuedOrderHtml(
@@ -305,23 +305,13 @@ describe("renderIssuedOrderHtml", () => {
expect(html).not.toContain("alert(1)");
});
it("footer shows the logged-in user's name + e-mail, not the Schválil column", () => {
it("footer shows the logged-in user's name, no e-mail, no Schválil column", () => {
const html = renderIssuedOrderHtml(order, items, null, null, "cs", issuer);
// New footer: Vystavil <name> + E-mail <email> from authData.
// Footer: Vystavil <name> from authData. No e-mail line.
expect(html).toContain("Jan Novák");
expect(html).toContain("jan.novak@firma.cz");
expect(html).toContain("E-mail:");
expect(html).not.toContain("E-mail:");
// The old two-column signature footer is gone.
expect(html).not.toContain("footer-row");
expect(html).not.toContain("Schválil:");
});
it("omits the e-mail line when the issuer has no e-mail", () => {
const html = renderIssuedOrderHtml(order, items, null, null, "cs", {
name: "Jan Novák",
email: "",
});
expect(html).toContain("Jan Novák");
expect(html).not.toContain("E-mail:");
});
});