Fix send modals: from email and preview rendering

fetchBasicMailConfig() was calling the wrong endpoint (company-config
instead of default config). Also, the response has no .data wrapper so
from_mail was never extracted. Fixed in all three send modals.

Estimate and payment preview blob construction now falls back to the
raw response when .data is undefined, matching the invoice modal.
This commit is contained in:
Darko Gjorgjijoski
2026-04-06 22:56:41 +02:00
parent 45f347ebef
commit 6106ac8208
4 changed files with 15 additions and 13 deletions

View File

@@ -47,7 +47,7 @@ export const useCompanyStore = defineStore('company', () => {
async function fetchBasicMailConfig(): Promise<Record<string, unknown>> {
try {
return await companyService.getMailConfig()
return await companyService.getMailDefaultConfig()
} catch (err: unknown) {
handleApiError(err)
throw err