fix: Cabrillo contest
This commit is contained in:
+5
-11
@@ -1981,37 +1981,31 @@ export default function App() {
|
||||
showToast(`Exported ${r.count} selected QSO${r.count > 1 ? 's' : ''} → ${r.path}`);
|
||||
} catch (e: any) { setError(String(e?.message ?? e)); }
|
||||
}
|
||||
// Cabrillo (contest log) export — prompts for the contest name, then writes a
|
||||
// .cbr file. All / filtered / selected variants mirror the ADIF ones.
|
||||
// Cabrillo (contest log) export → a .log file. The contest name comes from the
|
||||
// QSOs' ADIF CONTEST_ID (no prompt). All / filtered / selected mirror the ADIF ones.
|
||||
async function exportCabrillo() {
|
||||
const contest = window.prompt('Contest name for Cabrillo (e.g. CQ-WW-SSB):', '');
|
||||
if (contest === null) return;
|
||||
try {
|
||||
const path = await SaveCabrilloFile();
|
||||
if (!path) return;
|
||||
const r = await ExportCabrillo(path, contest);
|
||||
const r = await ExportCabrillo(path);
|
||||
showToast(`Cabrillo: ${r.count} QSO${r.count > 1 ? 's' : ''} → ${r.path}`);
|
||||
} catch (e: any) { setError(String(e?.message ?? e)); }
|
||||
}
|
||||
async function exportFilteredCabrillo() {
|
||||
const contest = window.prompt('Contest name for Cabrillo (e.g. CQ-WW-SSB):', '');
|
||||
if (contest === null) return;
|
||||
try {
|
||||
const path = await SaveCabrilloFile();
|
||||
if (!path) return;
|
||||
const f = buildActiveFilter();
|
||||
const r = await ExportCabrilloFiltered(path, contest, { ...f, limit: 0, offset: 0 } as any);
|
||||
const r = await ExportCabrilloFiltered(path, { ...f, limit: 0, offset: 0 } as any);
|
||||
showToast(`Cabrillo: ${r.count} QSO${r.count > 1 ? 's' : ''} → ${r.path}`);
|
||||
} catch (e: any) { setError(String(e?.message ?? e)); }
|
||||
}
|
||||
async function exportSelectedCabrillo(ids: number[]) {
|
||||
if (ids.length === 0) return;
|
||||
const contest = window.prompt('Contest name for Cabrillo (e.g. CQ-WW-SSB):', '');
|
||||
if (contest === null) return;
|
||||
try {
|
||||
const path = await SaveCabrilloFile();
|
||||
if (!path) return;
|
||||
const r = await ExportCabrilloSelected(path, contest, ids as any);
|
||||
const r = await ExportCabrilloSelected(path, ids as any);
|
||||
showToast(`Cabrillo: ${r.count} selected QSO${r.count > 1 ? 's' : ''} → ${r.path}`);
|
||||
} catch (e: any) { setError(String(e?.message ?? e)); }
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -131,11 +131,11 @@ export function ExportADIFSelected(arg1:string,arg2:boolean,arg3:Array<number>):
|
||||
|
||||
export function ExportAwards():Promise<string>;
|
||||
|
||||
export function ExportCabrillo(arg1:string,arg2:string):Promise<main.CabrilloResult>;
|
||||
export function ExportCabrillo(arg1:string):Promise<main.CabrilloResult>;
|
||||
|
||||
export function ExportCabrilloFiltered(arg1:string,arg2:string,arg3:qso.QueryFilter):Promise<main.CabrilloResult>;
|
||||
export function ExportCabrilloFiltered(arg1:string,arg2:qso.QueryFilter):Promise<main.CabrilloResult>;
|
||||
|
||||
export function ExportCabrilloSelected(arg1:string,arg2:string,arg3:Array<number>):Promise<main.CabrilloResult>;
|
||||
export function ExportCabrilloSelected(arg1:string,arg2:Array<number>):Promise<main.CabrilloResult>;
|
||||
|
||||
export function FilterFields():Promise<Array<string>>;
|
||||
|
||||
|
||||
@@ -226,16 +226,16 @@ export function ExportAwards() {
|
||||
return window['go']['main']['App']['ExportAwards']();
|
||||
}
|
||||
|
||||
export function ExportCabrillo(arg1, arg2) {
|
||||
return window['go']['main']['App']['ExportCabrillo'](arg1, arg2);
|
||||
export function ExportCabrillo(arg1) {
|
||||
return window['go']['main']['App']['ExportCabrillo'](arg1);
|
||||
}
|
||||
|
||||
export function ExportCabrilloFiltered(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['ExportCabrilloFiltered'](arg1, arg2, arg3);
|
||||
export function ExportCabrilloFiltered(arg1, arg2) {
|
||||
return window['go']['main']['App']['ExportCabrilloFiltered'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function ExportCabrilloSelected(arg1, arg2, arg3) {
|
||||
return window['go']['main']['App']['ExportCabrilloSelected'](arg1, arg2, arg3);
|
||||
export function ExportCabrilloSelected(arg1, arg2) {
|
||||
return window['go']['main']['App']['ExportCabrilloSelected'](arg1, arg2);
|
||||
}
|
||||
|
||||
export function FilterFields() {
|
||||
|
||||
Reference in New Issue
Block a user