Add company settings lookup

This commit is contained in:
2026-06-07 14:23:04 +02:00
parent 2b5481f7e2
commit 8ac9b1e58a
9 changed files with 49 additions and 4 deletions
+13
View File
@@ -305,6 +305,19 @@ class AgrarmonitorConnector {
};
});
}
async getFirmen() {
const response = await this.http.get('/einstellungen');
await this.saveSession();
const document = this.parseHtmlDocument(response.data);
const rows = Array.from(document.querySelectorAll('table#firmen_table tbody tr'));
return rows.map(row => {
const cells = Array.from(row.querySelectorAll('td'));
return {
id: this.parseNumber(row.getAttribute('data-firma_id') ?? row.id),
bezeichnung: cells[0]?.textContent?.trim() ?? '',
};
});
}
createHttpClient() {
const client = (0, axios_cookiejar_support_1.wrapper)(axios_1.default.create({
baseURL: this.baseUrl,