Commit graph

12 commits

Author SHA1 Message Date
Jan Böhmer
2ba0f2a95d Use turbo-streams for handling updating locale menu in navbar 2026-02-22 21:53:37 +01:00
Jan Böhmer
e2b43ba01f Use native turbo reload mechanism instead of our own global_reload controller 2026-02-22 21:46:55 +01:00
Jan Böhmer
b6d77af91b Removed title_controller as turbo 8 can handle the title changes natively 2026-02-22 21:43:57 +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
ae787530ff Added an settings option to control what languages to show in the dropdown menu 2025-10-17 22:34:27 +02:00
Jan Böhmer
75ce9c4370 Fixed problem with multi escaping in title tag
This should fix issue #505
2024-02-03 00:50:38 +01:00
Jan Böhmer
cf11320789 Keep query parameters when switching language via navbar 2023-11-05 21:32:45 +01:00
Jan Böhmer
f50959837f Fixed issue that change of language via language selector did not changed the navbar and sidebar 2022-10-09 20:11:48 +02:00
Jan Böhmer
4c25e85a48 Automatically update the sidebar trees for all users if the trees are changed somehow. 2022-09-25 02:08:54 +02:00
Jan Böhmer
7990cf56d1 Update the locale changer links every time turbo loads a new frame. 2022-07-24 17:03:57 +02:00
Jan Böhmer
0b31a3b095 Fixed issue that page title were reformatted unintended. 2022-07-24 15:25:06 +02:00
Jan Böhmer
fa5f5bce28 Change the document title according to the title of the main frame. 2022-07-24 15:19:05 +02:00