This commit completes the "Improving Structure & Maintainability" phase by fundamentally refactoring the frontend architecture.
- Introduced a central state store (store.js) to act as a single source of truth, eliminating global variables and making data flow predictable through an event-based system.
- Replaced innerHTML with component-based rendering for all major UI elements, including warranty cards, tags, and all modals (Edit, Delete, Claims, Notes, Paperless). This improves security, performance, and maintainability.
- Created reusable UI component modules (warrantyCard.js, editModal.js, claims.js, etc.) and used an HTML <template> for the main warranty card to separate markup from logic.
* Added support for `ExpirationDate` in CSV import when duration fields are blank and `IsLifetime` is false. Updated documentation accordingly.
* Enhanced CSV import to allow partial commits with per-row errors and detailed feedback; returns 200 for partial success.
* Implemented automatic duplicate name suffixing (`Name (1)`, `Name (2)`, etc.) to prevent import failures on same-name entries.
- Container startup loop caused by insufficient PostgreSQL privileges in the startup permissions script.
- Wrapped the `ALTER ROLE ... CREATEROLE` in a safe DO block with exception handling so missing privilege is logged as a NOTICE and startup continues.
- No feature changes; service now starts normally without elevated DB privileges.
- _Files: `backend/fix_permissions.sql`_
* Added Model Number field to warranties (backend + frontend integration)
* Expanded localization: added Polish and Hebrew (with RTL), completed warranty claim translations for all locales
* Enhanced search: Model Number now searchable on Home and Status pages
* Improved Status page with Archived warranties filtering and display
* Fixed Global view logic for archived warranties and Model Number visibility
* Corrected missing Model Number translations across all languages
* Improved Add Warranty modal responsiveness on small screens
* Fixed document URL visibility bug and Chrome horizontal scrollbar issue
* Updated major dependencies (Python 3.14, gevent 25.9.1, Flask 3.1.2, etc.)
* Added Reddit community link and localization on About page
* PWA and cache updates for faster rollout and consistent asset refresh
- Added new `audit_log` table with supporting migration (048)
- Implemented centralized `create_audit_log` helper to record key admin actions
- Logged events include:
- Site setting changes (sensitive data masked)
- User updates and deletions
- Added API endpoint `GET /api/admin/audit-trail` for viewing recent audit entries
- Created new frontend section in Settings for viewing the Audit Trail
- Displays timestamp, user, action, and details with safe HTML escaping
- Updated backend structure for better modularity and security
Files:
`backend/migrations/048_create_audit_log_table.sql`,
`backend/audit_logger.py`,
`backend/admin_routes.py`,
`frontend/settings-new.html`,
`frontend/settings-new.js`
* Updated backend global and archived warranty queries to include the `model_number` field so that it is available in API responses.
* Ensured the Global view now correctly displays the Model Number on warranty cards in both active and archived lists.
* Updated relevant backend routes for global queries.
* Files modified: `backend/warranties_routes.py`
* **Fixed:**
* Global view on Index page now correctly shows warranties from all users, including archived ones.
* Added `GET /api/warranties/global/archived` and unified global queries with correlated subqueries to avoid missing or collapsed rows.
* Updated frontend logic to merge archived warranties from the new endpoint when Global scope and Status = “All.”
* Bumped `script.js` and service worker cache to ensure clients receive updated logic.
* Updated files: `backend/warranties_routes.py`, `frontend/script.js`, `frontend/sw.js`, `frontend/index.html`, `frontend/status.html`.
* **Added:**
* Introduced **Model Number** field to warranties.
* Backend: Added `model_number` column, integrated into GET/POST/PUT routes.
* Frontend: Added Model Number input in New/Edit modals and display on warranty cards.
* Updated files: `backend/migrations/047_add_model_number_to_warranties.sql`, `backend/warranties_routes.py`, `frontend/index.html`, `frontend/status.html`, `frontend/script.js`, `locales/en/translation.json`.
* **Enhanced:**
* Improved **Add Warranty modal** tab alignment for responsive layouts (≤740px).
* Adjusted tab label size and spacing to prevent wrapping while keeping icons and labels visible.
* Ensured consistent five-step progress indicator across all breakpoints.
* Updated file: `frontend/style.css`.