🛡️ Warracker is an open source, self-hostable warranty tracker to monitor expirations, store receipts, files. You own the data, your rules!
Add Warranty form: product photo first (#146)
sassanix90520d690e2e
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex fdf3c3b..74a9bd2 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -2,6 +2,8 @@## 1.0.5 - Unreleased+- **Product photo comes first in the Add Warranty form (#146):** the photo upload lived on the Documents tab, at the end of the flow, so users photographing a receipt had to read its purchase date and serial number in a separate program while filling the form. The photo upload (with its preview) now opens the Product tab: upload the receipt or product photo first, then read the details straight off the preview as you type.+- **Claims can no longer be added to a voided warranty:** a voided warranty's coverage is dead, but the app still let new claims be filed against it. Claim creation now returns a clear error (code `warranty_voided`), the claims view hides the Add Claim button for voided warranties and explains why, and claims recorded before the void stay fully editable — un-voiding restores claim creation.- **Other documents accept more than archives (#222):** the Other Document file picker in the add form and both edit modals only offered ZIP/RAR files, even though the server has always accepted PDFs and images there too — so a warranty terms PDF could not be attached through the UI. The picker now offers every type the server accepts (PDF, PNG, JPG, WebP, GIF, ZIP, RAR), and the field label no longer calls out only archives (all 20 locales).diff --git a/frontend/index.html b/frontend/index.htmlindex 0897727..991b9d2 100644--- a/frontend/index.html+++ b/frontend/index.html@@ -400,6 +400,19 @@<form id="warrantyForm" novalidate><!-- Product Information Tab --><div class="tab-content active" id="product-info">+ <div class="form-group">+ <label data-i18n="warranties.product_photo_optional">Product Photo (Optional)</label>+ <div class="file-input-wrapper">+ <label for="productPhoto" class="file-input-label">+ <i class="fas fa-camera"></i> <span data-i18n="warranties.choose_photo">Choose Photo</span>+ </label>+ <input type="file" id="productPhoto" name="product_photo" class="file-input" accept=".png,.jpg,.jpeg,.webp">+ </div>+ <div id="productPhotoFileName" class="file-name"></div>+ <div id="productPhotoPreview" class="photo-preview" style="display: none;">+ <img id="productPhotoImg" src="" alt="Product Photo Preview" style="max-width: 200px; max-height: 200px; border-radius: 8px; margin-top: 10px;">+ </div>+<div class="form-group"><label for="productName" data-i18n="warranties.product_name">Product Name</label><input type="text" id="productName" name="product_name" class="form-control" required>@@ -531,19 +544,6 @@<strong>Paperless-ngx Integration Enabled!</strong> You can now choose to store documents in your Paperless-ngx instance instead of locally.</div>- <div class="form-group">- <label data-i18n="warranties.product_photo_optional">Product Photo (Optional)</label>- <div class="file-input-wrapper">- <label for="productPhoto" class="file-input-label">- <i class="fas fa-camera"></i> <span data-i18n="warranties.choose_photo">Choose Photo</span>- </label>- <input type="file" id="productPhoto" name="product_photo" class="file-input" accept=".png,.jpg,.jpeg,.webp">- </div>- <div id="productPhotoFileName" class="file-name"></div>- <div id="productPhotoPreview" class="photo-preview" style="display: none;">- <img id="productPhotoImg" src="" alt="Product Photo Preview" style="max-width: 200px; max-height: 200px; border-radius: 8px; margin-top: 10px;">- </div>-</div><div class="form-group">