Commit Graph

345 Commits

Author SHA1 Message Date
sassanix
96f2859975 Fix global warranties view, add Model Number field, and enhance modal tab responsiveness
* **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`.
2025-10-09 15:04:13 -03:00
sassanix
9007c9c23a Merge pull request #153 from Erwan-loot/feature/optimize-dockerfile
Optimize Docker setup
2025-10-09 09:38:39 -03:00
Erwan Hervé
f086c4f016 Refactor Dockerfile to simplify copying Python dependencies from builder stage 2025-10-09 13:45:04 +02:00
Erwan Hervé
20d6a898f1 Update .gitattributes to enforce LF line endings for shell scripts 2025-10-09 13:29:05 +02:00
Erwan Hervé
2beb1ac1d9 Add optimized Dockerfile with multi-stage build and best practices 2025-10-09 08:26:50 +02:00
sassanix
9068588d16 Merge pull request #150 from Erwan-loot/patch-1 2025-10-07 14:40:09 -03:00
Erwan Hervé
31f9f5af58 Add label source 2025-10-07 08:23:26 +02:00
sassanix
6cfcabe4e6 Merge branch 'main' of https://github.com/sassanix/Warracker 0.10.1.14 2025-10-06 20:31:09 -03:00
sassanix
4b377f4259 This update improves filter syncing, OIDC settings, and mobile UX, with fixes for archived items, menus, and the login page.
* Major usability and reliability improvements across frontend and backend
* Filters (Status, Tag, Vendor, Type, Search, Sort) now persist across views and sync via API for cross-device consistency
* Archived warranties correctly appear under “All” without affecting other filters
* Enhanced OIDC system with admin group support, secure secret handling, and improved attribute synchronization
* New responsive mobile hamburger menu and tablet-specific UI enhancements
* Fixed archived item styling, menu initialization, and login page layout issues
* Includes minor UX refinements, PyJWT compatibility updates, and deprecation clean-ups
2025-10-06 20:31:04 -03:00
sassanix
c77704ca85 Merge pull request #143 from sassanix/edge
Merge pull request #142 from sassanix/main
2025-10-01 21:14:18 -03:00
sassanix
d2bb1c6660 Merge pull request #142 from sassanix/main
Merge with main
2025-10-01 21:13:52 -03:00
sassanix
96a0783889 Update README.md
New Screenshots
2025-10-01 21:09:13 -03:00
sassanix
5658cabedd Update README.md 2025-10-01 20:39:46 -03:00
sassanix
2ad7f91e1a Update README.md 2025-10-01 18:42:22 -03:00
sassanix
5b12dc3ed6 Update README.md 2025-10-01 18:39:59 -03:00
sassanix
e03f0f841b Update README.md 2025-10-01 18:38:51 -03:00
sassanix
67114a7cb7 Update README.md 2025-10-01 18:37:42 -03:00
sassanix
2533c2e887 Update README.md 2025-10-01 18:37:04 -03:00
sassanix
1d21cbb2df Update README.md 2025-10-01 18:30:19 -03:00
sassanix
a56229ab99 Update README.md 2025-10-01 18:29:00 -03:00
sassanix
74d49ffeab Update README.md 2025-10-01 18:27:29 -03:00
sassanix
8f4369f389 Update README.md
Adding Turkish language
2025-10-01 18:25:08 -03:00
sassanix
a3f0c7264f Fixed nowrap as it was introduced in latest PR
New warranty add modal, will need to work similar to the edit modal. Removing the added code, to fix the mobile issues.
2025-10-01 17:37:43 -03:00
sassanix
b4f15a8c5e Merge pull request #138 from tecosaur/main
Mixed bag: Update compatability + depreceations + bugfixes + OIDC enhancements
2025-09-30 20:26:53 -03:00
TEC
9295338b88 Prevent warranty tabs from wrapping
Otherwise the icon and text can end up on different lines, in certain
browsers and window sizes.
2025-09-30 21:48:29 +08:00
TEC
4a0f529848 Attempt to generate a secure secret on-the-fly
If it works, great. If not, we just get the original default.
2025-09-30 20:58:34 +08:00
TEC
d1e7080847 Add OIDC admin group to site_settings 2025-09-30 20:58:34 +08:00
TEC
336c1700bf Make entire user item menu clickable not just text 2025-09-30 20:58:34 +08:00
TEC
220c9c89c5 Support reading secrets from files
This makes it easier to integrate Warracker with modern secret
management workflows like Docker secrets and Systemd service
credentials.
2025-09-30 20:58:34 +08:00
TEC
2c7947d533 Make upload folder configurable
Also have a go at creating the directory, if it doesn't exist
on startup.
2025-09-30 20:58:34 +08:00
TEC
6f5081d27b Sync OIDC attribute on login 2025-09-30 20:58:34 +08:00
TEC
48aec134ba Hide/disable user's OIDC-managed settings 2025-09-30 20:58:34 +08:00
TEC
d887aadc3b Allow determining admin status from OIDC groups 2025-09-30 20:58:34 +08:00
TEC
bb886a5ff3 Have OIDC first name fallback to name
If given/family names are unset, it seems reasonable to default to the
first name.
2025-09-30 20:58:34 +08:00
TEC
f29b1b5784 Token userinfo is no substitute for the endpoint
It is not appropriate to (ab)use OIDC authentication claims for user
information, there is a dedicated userinfo endpoint that should always
be used. If the information we want is in the token claims, great, but
the endpoint info should always be available too.
2025-09-30 20:58:34 +08:00
TEC
88b02bbdc2 Fix OIDC reload by moving init_oidc_client
In 60239bd637 the assumption that init_oidc_client could be imported
from oidc_handler was introduced into admin_routes.py.

However, init_oidc_client was defined in __init__.py, leaving us with
the options of:
1. Importing from .
2. Moving the implementation to oidc_handler, and importing in
   __init__.py

I've gone with option 2.
2025-09-30 20:58:34 +08:00
TEC
ee96ba5311 Update deprecated utcnow() usage
DeprecationWarning: datetime.datetime.utcnow() is deprecated and
scheduled for removal in a future version. Use timezone-aware objects to
represent datetimes in UTC: datetime.datetime.now(datetime.UTC).
2025-09-30 20:58:34 +08:00
TEC
dac76148c0 Support PyJWT 2.10
The payload 'sub' must now be a string.
2025-09-30 20:58:34 +08:00
sassanix
69c44a2ab6 Add Turkish translations, archive feature, and major UI/UX enhancements
Introduced Turkish language support and non-destructive warranty archiving. Modernized login page, filters, sorting, and tag management with responsive, theme-aware UI updates. Persisted filter/sort state across sessions, improved mobile layout, and fixed dark mode, i18n, and SSO alignment issues.
0.10.1.13
2025-09-29 14:01:30 -03:00
sassanix
6b035b59a8 Fix Paperless-ngx issues, restores missing assets, and improves stability.
- Fixed: Paperless-ngx document uploads were being incorrectly flagged as duplicates due to invalid API parameter usage (checksum → checksum__iexact).

- Fixed: API token authentication with Paperless-ngx now works properly when Two-Factor Authentication (2FA) is enabled, ensuring secure token-only integration.

- Fixed: Restored missing i18next JavaScript libraries for non-Docker installations, ensuring status page and i18n features function correctly.

- Enhanced: Replaced psycopg2-binary with psycopg2 for production stability and compatibility.

- Enhanced: Adjusted .gitignore to track /lib directory, ensuring essential libraries are available across environments.
0.10.1.12
2025-09-18 10:56:43 -03:00
sassanix
2cd6cd407a Merge pull request #127 from sjafferali/main 2025-09-09 22:40:13 -03:00
Samir Jafferali
1a2b9c154b Fix querying params for checksum 2025-09-08 22:18:45 -07:00
sassanix
b8b1a461bb Merge branch 'main' of https://github.com/sassanix/Warracker 0.10.1.11 2025-09-07 20:31:00 -03:00
sassanix
441358bea3 Enhances Global View with better document access, claim visibility, and critical bug fixes.
Description:

* Enhanced Global View integration with Paperless-ngx for seamless in-app document viewing.
* Added color-coded visual indicators for warranty claim statuses.
* Introduced read-only access to warranty claims in Global View.
* Fixed authorization issues blocking shared document access.
* Resolved claim creation errors with empty optional fields.
* Corrected JavaScript errors in Global View claims modals.
2025-09-07 20:30:55 -03:00
sassanix
fcc45a8eb1 Update README.md 2025-08-30 11:21:31 -03:00
sassanix
ac626ed922 warranty claims tracking update 2025-08-30 11:21:01 -03:00
sassanix
2e4cb7fa84 Warranty Claim Tracking
Added warranty claim tracking in key features
2025-08-30 11:20:01 -03:00
sassanix
d9d52743e2 Added warranty claims tracking, document URL support, and custom database port configuration.
This release introduces three major enhancements:

1. Warranty claims tracking system with full database, API, and frontend integration to manage claims across their lifecycle.

2. Comprehensive URL/link support for documents and invoices, including database schema updates, API handling, responsive frontend integration, and error-resilient JavaScript improvements.

3. Database port configuration support via DB_PORT environment variable, ensuring flexible deployment while maintaining backward compatibility.

Additional improvements include UI/UX enhancements, null safety checks, error resolution in modals, and deployment configuration updates.
0.10.1.10
2025-08-30 11:10:42 -03:00
sassanix
c45de7b1c0 Fix Apprise notification system, scheduler stability, and email configuration
Fixes & Enhancements

* Resolved five critical Apprise notification issues:
  • Ensured configuration reload during scheduled jobs
  • Fixed warranty data fetching for Apprise-only users
  • Refactored notification dispatch logic with dedicated helpers
  • Corrected handler scoping via Flask app context
  • Wrapped scheduler jobs with Flask app context to prevent context errors
  → Verified: Scheduled Apprise notifications now work reliably for "Apprise only" and "Both" channels.

* Added support for SMTP\_FROM\_ADDRESS environment variable, allowing sender address customization independent of SMTP username. (PR #115)

* Fixed duplicate scheduled notifications in multi-worker environments:
  • Strengthened should\_run\_scheduler() logic
  • Now guarantees exactly one scheduler instance across all Gunicorn modes.

* Fixed stale database connection handling in scheduled jobs:
  • Fresh connection acquired each run, properly released via try/finally
  • Eliminates "server closed the connection" errors.

* Definitive scheduler logic fix for all memory modes (ultra-light, optimized, performance):
  • Single-worker runs scheduler if GUNICORN\_WORKER\_ID is unset
  • Multi-worker: only worker 0 runs scheduler.

Impact

* Apprise and Email notifications are now stable, reliable, and production-ready
* No more duplicate or missed notifications across all memory modes
* Improved system efficiency and robustness
2025-08-24 12:47:45 -03:00
sassanix
7ce71a156c Fix Apprise notification system, scheduler stability, and email configuration
Fixes & Enhancements

* Resolved five critical Apprise notification issues:
  • Ensured configuration reload during scheduled jobs
  • Fixed warranty data fetching for Apprise-only users
  • Refactored notification dispatch logic with dedicated helpers
  • Corrected handler scoping via Flask app context
  • Wrapped scheduler jobs with Flask app context to prevent context errors
  → Verified: Scheduled Apprise notifications now work reliably for "Apprise only" and "Both" channels.

* Added support for SMTP\_FROM\_ADDRESS environment variable, allowing sender address customization independent of SMTP username. (PR #115)

* Fixed duplicate scheduled notifications in multi-worker environments:
  • Strengthened should\_run\_scheduler() logic
  • Now guarantees exactly one scheduler instance across all Gunicorn modes.

* Fixed stale database connection handling in scheduled jobs:
  • Fresh connection acquired each run, properly released via try/finally
  • Eliminates "server closed the connection" errors.

* Definitive scheduler logic fix for all memory modes (ultra-light, optimized, performance):
  • Single-worker runs scheduler if GUNICORN\_WORKER\_ID is unset
  • Multi-worker: only worker 0 runs scheduler.

Impact

* Apprise and Email notifications are now stable, reliable, and production-ready
* No more duplicate or missed notifications across all memory modes
* Improved system efficiency and robustness
0.10.1.9
2025-08-24 12:36:11 -03:00