Fix company logo missing from PDFs and add AI photo save logging
When a tenant uploads a logo it is stored in Azure Blob Storage and LogoData (the legacy DB byte[]) is cleared. All PDF controllers were still reading the now-null LogoData, so logos never appeared on any PDF after upload. Fixed by injecting ICompanyLogoService into all six affected controllers (Quotes, Invoices, Deposits, GiftCertificates, PurchaseOrders, CatalogItems) and loading the blob-stored logo first before falling back to the legacy DB field. Also added structured logging to the AI photo promotion path in QuotesController Create/Edit POST so upload failures are visible in production logs instead of silently swallowed. Added onclick safety net to the Create and Edit quote submit buttons so dynamically-injected hidden fields (AiPhotoTempIds) are written before iOS Safari collects the form data on submit. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -398,7 +398,7 @@
|
||||
<a asp-action="Index" asp-controller="Quotes" class="btn btn-outline-secondary btn-lg">
|
||||
<i class="bi bi-x-circle me-1"></i>Cancel
|
||||
</a>
|
||||
<button type="submit" class="btn btn-primary btn-lg" id="submitBtn">
|
||||
<button type="submit" class="btn btn-primary btn-lg" id="submitBtn" onclick="if(typeof writeHiddenFields==='function')writeHiddenFields()">
|
||||
<i class="bi bi-check-circle me-1"></i>Create Quote
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user