fix(labels): the manager's address, not the DX's — and one PDF, just opened

Three corrections from the first real session. Routed via a manager, the box
was prefilled with the DX's own address — the one thing that must not go on
that envelope. It now starts empty and the QRZ fetch fills in the MANAGER's;
switching the routing recomputes the box unless the operator has typed in it,
because a hand-checked address is not the app's to replace.

A fetch that came back with no street was overwriting a reviewed address with a
bare country — the cty.dat fallback dressed as an answer. It now refuses to
touch the box and says nothing was found. And the prefill no longer stacks the
same town three times (address + QTH + country all carrying it).

The output is ONE PDF for the whole session, each page at its own label size,
written to the temp dir and opened straight in the viewer — no save dialog: the
file is a print run, not a document to keep.
This commit is contained in:
2026-08-28 20:07:36 +02:00
parent 5ee0ade54b
commit 1d7633484b
7 changed files with 143 additions and 85 deletions
+2 -2
View File
@@ -730,14 +730,14 @@ export function LabelDeleteStock(arg1:number):Promise<void>;
export function LabelDeleteTemplate(arg1:number):Promise<void>;
export function LabelExportPDF(arg1:string,arg2:number,arg3:number,arg4:Array<string>):Promise<string>;
export function LabelGetTemplate(arg1:number):Promise<string>;
export function LabelListStocks():Promise<Array<labels.Stock>>;
export function LabelListTemplates():Promise<Array<main.LabelTemplateInfo>>;
export function LabelOpenPDF(arg1:Array<main.LabelPDFPage>):Promise<string>;
export function LabelPaperQueue():Promise<Array<qso.QSO>>;
export function LabelSampleQSOs(arg1:number):Promise<Array<main.LabelSampleQSO>>;
+4 -4
View File
@@ -1398,10 +1398,6 @@ export function LabelDeleteTemplate(arg1) {
return window['go']['main']['App']['LabelDeleteTemplate'](arg1);
}
export function LabelExportPDF(arg1, arg2, arg3, arg4) {
return window['go']['main']['App']['LabelExportPDF'](arg1, arg2, arg3, arg4);
}
export function LabelGetTemplate(arg1) {
return window['go']['main']['App']['LabelGetTemplate'](arg1);
}
@@ -1414,6 +1410,10 @@ export function LabelListTemplates() {
return window['go']['main']['App']['LabelListTemplates']();
}
export function LabelOpenPDF(arg1) {
return window['go']['main']['App']['LabelOpenPDF'](arg1);
}
export function LabelPaperQueue() {
return window['go']['main']['App']['LabelPaperQueue']();
}
+16
View File
@@ -2969,6 +2969,22 @@ export namespace main {
this.samples = source["samples"];
}
}
export class LabelPDFPage {
png: string;
w_mm: number;
h_mm: number;
static createFrom(source: any = {}) {
return new LabelPDFPage(source);
}
constructor(source: any = {}) {
if ('string' === typeof source) source = JSON.parse(source);
this.png = source["png"];
this.w_mm = source["w_mm"];
this.h_mm = source["h_mm"];
}
}
export class LabelSampleQSO {
callsign: string;
qso_date: string;