Commit graph

277 commits

Author SHA1 Message Date
Marc
be35c36c58
Added info provider for Buerklin (#1151)
* Fixed Typos and mistranslations in GDPR mode (DSGVO Modus)
Fixed Typo enviroment

* Create BuerklinProvider based on LCSCProvider

* Update GET URLs for Buerklin

* Add getToken function analog to Octopart

* Remove line break in docs

* Remove trailing / in ENDPOINT_URL
Use Autowire to use values of environment variables
Remove unwanted Code from LCSC-Provider
Map json response to DTO variables

* Fix variable reference errors ($term → $keyword)
Ensure array keys exist before accessing them
Optimize API calls to prevent unnecessary requests
Improve error handling for better debugging
Enhance readability and maintainability of functions

* Bumped version v1.16.2

* Update BuerklinProvider.php

Change Order of Capabilities

* Change order of capabilities in LCSCProvider.php

* Change order of capabilities in PollinProvider.php

* Try to fix getToken BuerklinProvider.php

* Add ip_buerklin_oauth to knpu_oauth2_client.yaml

* Update buerklin authorize URL in knpu_oauth2_client.yaml

* Update knpu_oauth2_client.yaml

* Adapt Buerklin InfoProvider to new Settings mechanism

* According to Buerklin API spec it's really 'token' as urlAuthorize endpoint

* Rückgabewert ist schon ein Array deshalb kein toArray

* Fix API-Access, add image, price and parameter retrieval (Datasheets not yet implemented because it is not available in the API response)

* Add Caching of requests, use default query params (language and currency) using a function, Fix Footprint assignment, translate German code comments

* Remove DATASHEET from ProviderCapabilities because the Bürklin API doesn't include Datasheet URLs at the moment, more reverse engineering needed

* Update BuerklinSettings with existing translatable strings

* Improve Buerklin Settings Page

* Added Translation strings for Buerklin Info Provider

* Improve Buerklin Provider help message

* Adapt Buerklin-provider to new settings system

* Adapt Buerklin-provider to new settings system: add missing instance of BuerklinSettings

* Improve Compliance Parameters parsing

* Remove language-dependent RoHs Date code and use shortened ISO format, Add Customs Code without parseValueField

* Fix no results for keyword search

* Implement BatchInfoProviderInterface for Buerklin Provider

* Rename searchBatch to searchByKeywordsBatch to correctly implement BatchInfoProviderInterface

* Fix Bulk Info Provider Import for Buerklin

* Tranlate comments to English to prepare for Pull-Request

* Add phpUnit unit tests for BuerklinProvider

* Try fixing PHPStan issues

* Remove OAuthTokenManager from BuerklinProviderTest

Removed OAuthTokenManager mock from BuerklinProviderTest setup.

* Fix Settings must not be instantiated directly

* Fix UnitTest for value_typ

* edd5fb3319 (r2622249199)
Revert "Change order of capabilities in LCSCProvider.php"

This reverts commit dfd6f33e52.

* edd5fb3319 (r2622249861)
Revert "Change order of capabilities in PollinProvider.php"

This reverts commit fc2e7265be.

* Use language setting for ProductShortURL

* Update default language for Buerklin provider to English in documentation

* Add suggested improvements from SonarQube

* Removed unused use directives

* Revert SonarQube proposed change. Having more than one return is acceptable nowadays

* Improve getProviderInfo: disable oauth_app_name, add settings_class, improve disabled_help

* Implement retrieveROPCToken as proposed in https://github.com/Part-DB/Part-DB-server/pull/1151#discussion_r2622976206

* Add missing ) to retrieveROPCToken

* add use OAuthTokenManager and create instance in constructor

* Revert the following commits that tried to implement getToken using OAuthTokenManager

Revert "add use OAuthTokenManager and create instance in constructor"This reverts commit 2a1e7c9b0974ebd7e082d5a2fa62753d6254a767.Revert "Add missing ) to retrieveROPCToken"This reverts commit 8df5cfc49e.
Revert "Implement retrieveROPCToken as proposed in https://github.com/Part-DB/Part-DB-server/pull/1151#discussion_r2622976206"
This reverts commit 66cc732082.

* Remove OAuthTokenManager leftovers

* Disable buerklin provider if settings fields are empty

* Improved docs

* Added TODO comment

---------

Co-authored-by: root <root@part-db.fritz.box>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2026-01-04 21:05:47 +01:00
Jan Böhmer
e0feda4e46 Fixed 2DA login
Fixes issue #1141
2025-12-07 22:47:27 +01:00
Jan Böhmer
3dc66542b2 Updated monolog recipe 2025-11-30 14:51:56 +01:00
web-devinition.de
54f318ecac
Implemented the ability to set user-defined synonyms/labels for internal element types
* Implementiere bevorzugte Sprachauswahl und Datenquellen-Synonyme

Die Spracheinstellungen/System-Settings wurden um die Möglichkeit ergänzt, bevorzugte Sprachen für die Dropdown-Menüs festzulegen. Zudem wurde ein Datenquellen-Synonymsystem implementiert, um benutzerfreundlichere Bezeichnungen anzuzeigen und zu personalisieren.

* Anpassung aus Analyse

* Entferne alten JSON-basierten Datenquellen-Synonym-Handler

Die Verwaltung der Datenquellen-Synonyme wurde überarbeitet, um ein flexibleres und strukturiertes Konzept zu ermöglichen. Der bestehende JSON-basierte Ansatz wurde durch eine neue Service-basierte Architektur ersetzt, die eine bessere Handhabung und Erweiterbarkeit erlaubt.

* Ermögliche Rückgabe aller möglichen Sprachoptionen in Verbindung mit den vom Nutzer freigeschalteten.

* Removed unnecessary service definition

The tag is applied via autoconfiguration

* Use default translations for the NotBlank constraint

* Started refactoring ElementTypeNameGenerator

* Made ElementTypeNameGenerator class readonly

* Modified form to work properly with new datastructure

* Made the form more beautiful and space saving

* Made synonym form even more space saving

* Allow to define overrides for any element label there is

* Use defined synonyms in ElementTypeNameGenerator

* Use ElementTypeNameGenerator where possible

* Register synonyms for element types as global translation parameters

* Revert changes done to permission layout

* Use new synonym system for admin page titles

* Removed now unnecessary services

* Reworked settings name and translation

* Renamed all files to Synonyms

* Removed unnecessary translations

* Removed unnecessary translations

* Fixed duplicate check

* Renamed synoynms translations

* Use our synonyms for permission translations

* Fixed phpstan issue

* Added tests

---------

Co-authored-by: Marcel Diegelmann <marcel.diegelmann@gmail.com>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-11-12 21:35:02 +01:00
Jan Böhmer
6ed4ad4c8c Use native lazy objects for doctrine when on PHP8.4 2025-09-22 23:52:31 +02:00
Jan Böhmer
bb49c67108 Removed Microsoft X-XSS-Protection header, as it is not recommended on modern browsers anymore and is considered deprecated 2025-09-19 09:18:49 +02:00
Jan Böhmer
c7ec8adc31 Disable settings caching in debug mode
Otherwise we run into errors, if a settings get changed
2025-09-07 19:44:32 +02:00
Jan Böhmer
2b28aa8ba9 Enable CSP also in debug mode, as otherwise it complains about missing nonce function 2025-09-06 23:29:19 +02:00
Jan Böhmer
379155e839 Allow for more currency exchange rate pairs, without need for fixer.io 2025-09-05 22:15:04 +02:00
Jan Böhmer
0717239296 Use central banks of czechia, turkey and romania as a free provider for their currencies exchange rates
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.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.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
2025-09-05 19:56:01 +02:00
Jan Böhmer
d3e3c4e3f8 Fixed currency admin page and modernized underlying swap packages
Fixes issue #1009
2025-09-05 19:35:58 +02:00
Jan Böhmer
431cf23600 Do not pollute docker logs with deprecation notices in error case 2025-08-31 15:11:31 +02:00
Jan Böhmer
e369ce6db9 Disable searching option on datatables which we do not need and which causes an CSP violation 2025-08-31 01:34:31 +02:00
Jan Böhmer
275b695d6b Use ajax_replace option for symfony debug toolbar instead of custom event subscriber 2025-08-24 12:24:08 +02:00
Jan Böhmer
781ea45633 Removed ArrayType which is not necessary anymore with the new webauthn lib 2025-08-14 18:47:17 +02:00
Jan Böhmer
0eee161630 Use new webauthn library for 2FA 2025-08-14 18:46:10 +02:00
Jan Böhmer
247fed7d74 Fixed login CSFR token error
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.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.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
2025-08-04 23:50:25 +02:00
Jan Böhmer
c834058678 Updated to API Platform 4 2025-08-04 23:32:42 +02:00
Jan Böhmer
50f4c01e99 Updated ux-turbo recipe 2025-07-13 16:46:41 +02:00
Jan Böhmer
d3c3fedac2 Updated routing recipe 2025-07-13 16:40:56 +02:00
Jan Böhmer
6137065b4e Updated framework-bundle recipe 2025-07-13 16:40:14 +02:00
Jan Böhmer
daec5aa4b1 Updated web-profiler-bundle recipe 2025-07-13 16:31:25 +02:00
Jan Böhmer
2819b457fa Updated validator recipe 2025-07-13 16:30:11 +02:00
Jan Böhmer
1933234ed4 Updated symfony form recipe 2025-07-13 16:29:27 +02:00
Jan Böhmer
53889c7813 Updated recipe for property_info 2025-07-13 12:13:10 +02:00
Jan Böhmer
9a3794bc83 Updated uid recipe 2025-07-13 12:12:25 +02:00
Jan Böhmer
41108bd969 Updated doctrine-bundle recipe 2025-07-07 23:31:07 +02:00
Jan Böhmer
b9c3358f7f Use a doctrine entity for storing the settings 2025-07-06 22:15:48 +02:00
Jan Böhmer
dc81a5b361 Moved SHOW_PART_IMAGE_OVERLAY to settings-bundle 2025-07-06 21:53:06 +02:00
Jan Böhmer
a4f2a7a7df Moved fixer API config to settings bundle 2025-07-06 21:42:58 +02:00
Jan Böhmer
c0c847c5be Moved octopart / nexar integration configuration to the new settings system 2025-07-06 20:18:14 +02:00
Jan Böhmer
1dbcff66d1 Moved digikey IPS configuration to new settings system 2025-07-06 19:32:55 +02:00
Jan Böhmer
9812671a89 Merge master into settings-bundle 2025-07-06 19:05:22 +02:00
d-buchmann
00a74ed96a
Add env option to disable part image overlay (#960)
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.1, mysql) (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.1, postgres) (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.1, sqlite) (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
* Add env option to disable part image overlay

Fixes #369 while preserving the state as-is

* Added documentation and use 1 instead of true for new env

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-07-02 22:31:13 +02:00
Jan Böhmer
442457f11b Merge branch 'master' into settings-bundle 2025-06-15 18:39:49 +02:00
Jan Böhmer
42cb590c75 Fixed deprecations with api platform 2025-02-22 19:35:49 +01:00
Jan Böhmer
3247a97217 Removed "All" page length option for log tables, as this easily causes an out of memory situation on the server
You can easily have thousands of log entries, making it impossible to view them all at once.

This fixes #835
2025-02-01 23:44:07 +01:00
Jan Böhmer
97aed847b6 Updated dependencies 2025-01-18 22:21:58 +01:00
Jan Böhmer
8750573724 Merge branch 'master' into settings-bundle 2025-01-17 22:06:18 +01:00
Jan Böhmer
8826ba6729 Fixed CSP rules to allow the WASM loading for the barcode scanner 2025-01-04 18:23:57 +01:00
Jan Böhmer
e223078af9 Added a custom function to make PostgresSQL searches case insensitive
This is required only for postgres as every other database is case invariant by default. But to achieve a portable way, we implement it via a custom DQL function.

This fixes issue #784
2024-12-02 00:17:54 +01:00
Jan Böhmer
7530e62dfa Do not format error messages as JSON, this makes log files easier to read and reduces line length which can makes problems on FPM
See issue #781
2024-12-01 22:33:32 +01:00
Sam Edwards
65b2f045ac
Responsive tweaks (#755)
* Change datatables markup to be responsive with BS5

* Responsive tweaks to single part info
2024-11-03 23:14:52 +01:00
Jan Böhmer
283a445198 Use jbtronics/translation-editor bundle instead of php-translation/symfony-bundle for profiler translation editing
This new bundle has less dependencies and less overhead
2024-09-08 20:03:33 +02:00
Jan Böhmer
0dbf417866 Moved part table default column definiton to settings UI 2024-08-21 22:02:56 +02:00
Jan Böhmer
79da0518c2 Allow to configure sidebar menu via the new settings system 2024-08-07 00:41:06 +02:00
Jan Böhmer
2ab2b7f77d Moved default language, default timezone and base currency settings to new settings system 2024-08-03 23:14:29 +02:00
Jan Böhmer
f88584e1ca Allow to configure the global theme using the WebUI 2024-06-24 21:40:37 +02:00
Jan Böhmer
3e657a7cac Merge branch 'master' into settings-bundle 2024-06-24 21:15:14 +02:00
Jan Böhmer
235d572f8c Use DatetimeImmutable instead of DateTime wherever possible 2024-06-22 17:36:54 +02:00