Commit graph

1004 commits

Author SHA1 Message Date
Jan Böhmer
430a564592 Merge branch 'amazon_info_provider' 2026-02-22 23:43:54 +01:00
Jan Böhmer
300382f6e3 Make Canopy provider configurable via UI 2026-02-22 23:38:56 +01:00
Jan Böhmer
0b9b2cbf58 Allow to read amazon labels for part retrieval and creation 2026-02-22 23:16:39 +01:00
Jan Böhmer
cee6c0ef11 Added a "create from label scan button to navbar" 2026-02-22 22:03:46 +01:00
swdee
c29605ef23
Label Scanner Enhancements: LCSC barcode, create part, augmented scanning (#1194)
* added handling of LCSC barcode decoding and part loading on Label Scanner

* when a part is scanned and not found, the scanner did not redraw so scanning subsequent parts was not possible without reloading the browser page.  fixed the barcode scanner initialization and shutdown so it redraws properly after part not found

* added redirection to part page on successful scan of lcsc, digikey, and mouser barcodes.   added create part button if part does not exist in database

* added augmented mode to label scanner to use vendor labels for part lookup to see part storage location quickly

* shrink camera height on mobile so augmented information can been viewed onscreen

* handle momentarily bad reads from qrcode library

* removed augmented checkbox and combined functionality into info mode checkbox.  changed barcode scanner to use XHR callback for barcode decoding to avoid problems with form submission and camera caused by page reloaded when part not found.

* fix scanning of part-db barcodes to redirect to storage location or part lots.   made scan result messages conditional for parts or other non-part barcodes

* fix static analysis errors

* added unit tests for meeting code coverage report

* fix @MayNiklas reported bug:  when manually submitting the form (from a barcode scan or manual input) redirect to Create New part screen for the decoded information instead of showing 'Format Unknown' popup error message

* fix @d-buchmann bug:  clear 'scan-augmented-result' field upon rescan of new barcode

* fix @d-buchmann bug: after scanning in Info mode, if Info mode is turned off when scanning a part that did not exist, it now redirects user to create part page

* fix @d-buchmann bug: make barcode decode table 100% width of page

* fix bug with manual form submission where a part does not exist but decodes properly which causes the camera to not redraw on page reload due to unclean shutdown. this is an existing bug in the scanner interface.

steps to produce the issue:
- have camera active
- put in code in Input
- info mode ticked
- click submit button

on page reload the camera does not reactivate

* fixed translation messages

* Use symfony native functions to generate the routes for part creation

* Use native request functions for request param parsing

* Refactored LCSCBarcocdeScanResult to be an value object like the other Barcode results

* Added test for LCSCBarcodeScanResult

* Fixed exception when submitting form for info mode

* Made BarcodeSourceType a backed enum, so that it can be used in Request::getEnum()

* Moved database queries from BarcodeRedirector to PartRepository

* Fixed modeEnum parsing

* Fixed test errors

* Refactored BarcodeRedirector logic to be more universal

* Fixed BarcodeScanResultHandler test

* Refactored BarcodeScanResultHandler to be able to resolve arbitary entities from scans

* Moved barcode to info provider logic from Controller to BarcodeScanResultHandler service

* Improved augmentented info styling and allow to use it with normal form submit too

* Correctly handle nullable infoURL in ScanController

* Replaced the custom controller for fragment replacements with symfony streams

This does not require a complete new endpoint

* Removed data-lookup-url attribute from scan read box

* Removed unused translations

* Added basic info block when an storage location was found for an barcode

* Fixed phpstan issues

* Fixed tests

* Fixed part image for mobile view

* Added more tests for BarcodeScanResultHandler service

* Fixed tests

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2026-02-22 21:26:44 +01:00
Jan Böhmer
28e6ca52fe
New translations messages.en.xlf (German) (#1249) 2026-02-16 18:30:41 +01:00
Jan Böhmer
7354b37ef6
New Crowdin updates (#1228)
* New translations messages.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations validators.en.xlf (Polish)

* New translations security.en.xlf (Danish)

* New translations security.en.xlf (Ukrainian)

* New translations security.en.xlf (German)

* New translations security.en.xlf (Hungarian)

* New translations security.en.xlf (Dutch)

* New translations security.en.xlf (Chinese Simplified)

* New translations messages.en.xlf (English)

* New translations validators.en.xlf (English)

* New translations security.en.xlf (English)

* New translations frontend.en.xlf (Danish)

* New translations frontend.en.xlf (German)

* New translations frontend.en.xlf (Hungarian)

* New translations frontend.en.xlf (Ukrainian)

* New translations frontend.en.xlf (Chinese Simplified)

* New translations frontend.en.xlf (English)

* New translations messages.en.xlf (German)
2026-02-15 22:24:00 +01:00
Jan Böhmer
d8fdaa9529 Added a modal to stocktake / set part lots amount from info page 2026-02-10 23:17:10 +01:00
Jan Böhmer
2f9601364e Allow to set stocktake date for part lots 2026-02-10 22:23:54 +01:00
Jan Böhmer
e5231e29f2 Allow to set a global default if new orderdetails should contain VAT or not
Some checks are pending
Build assets artifact / Build assets artifact (push) Waiting to run
Docker Image Build / docker (push) Waiting to run
Docker Image Build (FrankenPHP) / docker (push) Waiting to run
Static analysis / Static analysis (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Waiting to run
2026-02-10 17:13:54 +01:00
Jan Böhmer
4740b6d19e Show in part info page whether price is inclusive VAT or not
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2026-02-08 22:09:36 +01:00
Jan Böhmer
3bff5fa8bd Allow to set if prices contain VAT or not in orderdetail 2026-02-08 21:54:34 +01:00
Jan Böhmer
a4c2b8f885 Added the option to only show attachment types for certain element classes 2026-02-08 19:30:06 +01:00
Jan Böhmer
2c56ec746c Improved translation 2026-02-08 16:07:11 +01:00
Jan Böhmer
35e844dd7b Allow to scan gtin barcodes and find parts via it 2026-02-08 16:06:01 +01:00
Jan Böhmer
a962e5e019 Allow to order and filter by GTIN in part tables 2026-02-08 15:51:39 +01:00
Jan Böhmer
fd76ca12fc Allow to import GTIN from info providers 2026-02-08 15:32:35 +01:00
Jan Böhmer
57c8368b5e Allow to edit the GTIN property of a part and validate the GTIN 2026-02-08 14:44:56 +01:00
Jan Böhmer
c2a51e57b7
New Crowdin updates (#1227)
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
* New translations security.en.xlf (French)

* New translations security.en.xlf (Spanish)

* New translations security.en.xlf (Czech)

* New translations security.en.xlf (Italian)

* New translations security.en.xlf (Polish)

* New translations security.en.xlf (Russian)

* New translations frontend.en.xlf (French)

* New translations frontend.en.xlf (Spanish)

* New translations frontend.en.xlf (Czech)

* New translations frontend.en.xlf (Italian)

* New translations frontend.en.xlf (Polish)

* New translations frontend.en.xlf (Russian)
2026-02-07 19:14:35 +01:00
Copilot
f5841cc697
Remove outdated file source and path notes from translation files (#1225)
* Initial plan

* Remove outdated file source and path notes from all translation files

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

* Preserve XML declaration format with double quotes

Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: jbtronics <5410681+jbtronics@users.noreply.github.com>
2026-02-07 18:33:31 +01:00
Jan Böhmer
8104c474b7
New translations messages.en.xlf (English) (#1226) 2026-02-07 18:13:01 +01:00
Jan Böhmer
dcdc990af1 Fixed unnecessary colon in english translation 2026-02-07 17:33:44 +01:00
Jan Böhmer
44204b9dbb
New Crowdin updates (#1212)
* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (English)

* New translations validators.en.xlf (Chinese Simplified)

* New translations frontend.en.xlf (Chinese Simplified)

* New translations frontend.en.xlf (Chinese Simplified)

* New translations security.en.xlf (Ukrainian)

* New translations validators.en.xlf (Ukrainian)

* New translations frontend.en.xlf (Ukrainian)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (Danish)
2026-02-07 17:11:32 +01:00
Jan Böhmer
1601382b41 Added translation for downgrading in progress title 2026-02-03 20:55:31 +01:00
Jan Böhmer
9ca1834d9b Removed unused translations 2026-02-02 23:07:24 +01:00
Jan Böhmer
1a06432cec Removed custom yes and no translations 2026-02-02 22:16:26 +01:00
Jan Böhmer
58d574a33a Only use the simple maintenance page, and made this a bit more generic 2026-02-02 22:10:52 +01:00
Jan Böhmer
1adfec16e2 Added an console command to turn maintenance mode on or off 2026-02-02 21:53:55 +01:00
Jan Böhmer
903716ad62 Added missing translations 2026-02-02 21:39:01 +01:00
Jan Böhmer
427778e4eb Moved "Cant auto update panel higher" to make it more visible 2026-02-02 21:37:04 +01:00
Sebastian Almberg
10c192edd1 Address PR feedback: add yarn build, env vars, and BackupManager
Changes based on maintainer feedback from PR #1217:

1. Add yarn install/build steps to update process
   - Added yarn availability check in validateUpdatePreconditions
   - Added yarn install and yarn build steps after composer install
   - Added yarn rebuild to rollback process
   - Updated total steps count from 12 to 14

2. Add environment variables to disable web features
   - DISABLE_WEB_UPDATES: Completely disable web-based updates
   - DISABLE_BACKUP_RESTORE: Disable backup restore from web UI
   - Added checks in controller and template

3. Extract BackupManager service
   - New service handles backup creation, listing, details, and restoration
   - UpdateExecutor now delegates backup operations to BackupManager
   - Cleaner separation of concerns for future reuse

4. Merge upstream/master and resolve translation conflicts
   - Added Conrad info provider and generic web provider translations
   - Kept Update Manager translations
2026-02-01 19:17:22 +01:00
Sebastian Almberg
6b27f3aa14 Merge upstream/master and resolve translation conflict
Merged new Conrad info provider and generic web provider translations
from upstream while keeping Update Manager translations.
2026-02-01 19:07:15 +01:00
Jan Böhmer
909cab0044 Added an web page to quickly add a new part from a web URL 2026-02-01 18:18:58 +01:00
Jan Böhmer
722eb7ddab Added settings and docs for the generic Web info provider 2026-02-01 17:47:04 +01:00
Jan Böhmer
df3f069a76 Added translations for conrad settings
Some checks failed
Build assets artifact / Build assets artifact (push) Has been cancelled
Docker Image Build / docker (push) Has been cancelled
Docker Image Build (FrankenPHP) / docker (push) Has been cancelled
Static analysis / Static analysis (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, mysql) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, postgres) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.2, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.3, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.4, sqlite) (push) Has been cancelled
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.5, sqlite) (push) Has been cancelled
2026-01-31 22:11:50 +01:00
Sebastian Almberg
1637fd63f4 Add backup restore feature
- Add restoreBackup() method to UpdateExecutor with full restore workflow
- Add getBackupDetails() to retrieve backup metadata and contents info
- Add restore controller routes (backup details API, restore action)
- Add restore button to backups table in UI
- Create backup_restore_controller.js Stimulus controller for confirmation
- Add translation strings for restore feature

The restore process:
1. Acquires lock and enables maintenance mode
2. Extracts backup to temp directory
3. Restores database (MySQL/PostgreSQL SQL or SQLite file)
4. Optionally restores config files and attachments
5. Clears and warms cache
6. Disables maintenance mode

Fix backup restore database import

The restore feature was using a non-existent doctrine:database:import
command. Now properly uses mysql/psql commands directly to import
database dumps.

Changes:
- Add EntityManagerInterface dependency to UpdateExecutor
- Use mysql command with shell input redirection for MySQL restore
- Use psql -f command for PostgreSQL restore
- Properly handle database connection parameters
- Add error handling for failed imports
2026-01-30 23:24:48 +01:00
Sebastian Almberg
97e3b0aa09 Add downgrade warning for versions without Update Manager
When downgrading to versions before v2.6.0, show a warning that the
Update Manager will not be available in older versions and that future
updates will need to be done manually via command line.
2026-01-30 21:56:14 +01:00
Sebastian Almberg
42fe781ef8 Add Update Manager for automated Part-DB updates
This feature adds a comprehensive Update Manager similar to Mainsail's
update system, allowing administrators to update Part-DB directly from
the web interface.

Features:
- Web UI at /admin/update-manager showing current and available versions
- Support for Git-based installations with automatic update execution
- Maintenance mode during updates to prevent user access
- Automatic database backup before updates
- Git rollback points for recovery (tags created before each update)
- Progress tracking with real-time status updates
- Update history and log viewing
- Downgrade support with appropriate UI messaging
- CLI command `php bin/console partdb:update` for server-side updates

New files:
- UpdateManagerController: Handles all web UI routes
- UpdateCommand: CLI command for running updates
- UpdateExecutor: Core update execution logic with safety mechanisms
- UpdateChecker: GitHub API integration for version checking
- InstallationTypeDetector: Detects installation type (Git/Docker/ZIP)
- MaintenanceModeSubscriber: Blocks user access during maintenance
- UpdateExtension: Twig functions for update notifications

UI improvements:
- Update notification in navbar for admins when update available
- Confirmation dialogs for update/downgrade actions
- Downgrade-specific text throughout the interface
- Progress page with auto-refresh
2026-01-30 21:36:33 +01:00
Jan Böhmer
e15d12c0bf Merge remote-tracking branch 'origin/l10n_master' 2026-01-25 21:27:51 +01:00
Jan Böhmer
2b723e05ff New translations frontend.en.xlf (English) 2026-01-25 21:16:04 +01:00
Jan Böhmer
a8d2204c7f New translations validators.en.xlf (German) 2026-01-25 21:15:51 +01:00
Jan Böhmer
29050178bd New translations messages.en.xlf (German) 2026-01-25 21:15:50 +01:00
Jan Böhmer
7b8f3aaf62 New translations messages.en.xlf (English) 2026-01-25 18:23:26 +01:00
Jan Böhmer
d93dfd577e Fail more gracefully when an error occurs in the info providers 2026-01-25 18:22:47 +01:00
Jan Böhmer
4095d0fd49 New translations frontend.en.xlf (Danish) 2026-01-25 10:50:30 +01:00
Jan Böhmer
6d3197497e New translations security.en.xlf (Danish) 2026-01-25 10:50:26 +01:00
Jan Böhmer
f438a8b4cd New translations validators.en.xlf (Danish) 2026-01-25 10:50:25 +01:00
Jan Böhmer
4636aa4e0d New translations frontend.en.xlf (Hungarian) 2026-01-18 22:00:38 +01:00
Jan Böhmer
006cfd7b5d New translations frontend.en.xlf (German) 2026-01-18 22:00:37 +01:00
Jan Böhmer
1923abecdf New translations messages.en.xlf (English) 2026-01-18 19:50:33 +01:00