Compare commits

..

1826 commits

Author SHA1 Message Date
d-buchmann
c44535990b
Fix typo and copy-paste error (#942)
Some checks failed
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.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
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
2025-05-23 18:09:56 +02:00
Jan Böhmer
b8d5b83eee Bumped version 1.17.1
Some checks failed
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
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
2025-05-18 22:54:26 +02:00
Jan Böhmer
00da2dedc3 Ignore phpstan issue 2025-05-18 22:54:03 +02:00
Jan Böhmer
4ce1de079e Updated dependencies 2025-05-18 22:41:05 +02:00
Jan Böhmer
6b9c125de4 Added console command to sanitize SVG files 2025-05-18 22:38:43 +02:00
Jan Böhmer
2c4f44e808 Sanatize SVG files when uploading 2025-05-18 21:00:19 +02:00
Jan Böhmer
2b694731ad Added content-security policy for SVG files in webserver config 2025-05-18 20:38:53 +02:00
Michael
7e34535e62
Added Datamatrix and C93 label twigs (#931)
Some checks failed
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
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
* Added Datamatrix and C93 label twigs

* Added new barcode placeholders to ckeditor plugin

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-05-11 00:46:38 +02:00
Jan Böhmer
0bb831fe88 Updated dependencies 2025-05-11 00:33:29 +02:00
Jan Böhmer
42a32ce142 Merge remote-tracking branch 'origin/l10n_master' 2025-05-11 00:32:34 +02:00
Jan Böhmer
23f58b7bf4 New translations security.en.xlf (French) 2025-05-02 08:23:16 +02:00
Jan Böhmer
4e9101fded New translations messages.en.xlf (Italian) 2025-03-30 19:01:21 +02:00
Jan Böhmer
9c700c77a8 New translations messages.en.xlf (English) 2025-03-30 17:21:15 +02:00
Jan Böhmer
cb1f674332 Removed now obsolete notice about requiring digikey v3 api in docs.
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.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
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (push) Has been cancelled
2025-03-30 16:24:33 +02:00
Jan Böhmer
6823d94ffb New translations messages.en.xlf (English) 2025-03-30 16:21:19 +02:00
Jan Böhmer
60ab992360 Bumped to version 1.17.0 2025-03-30 16:06:47 +02:00
Jan Böhmer
f9e769a6e3 Fixed phpstan issue 2025-03-30 15:01:28 +02:00
Jan Böhmer
f802c6c176 Exclude automigration-backup folder from clean attachments folder 2025-03-30 14:50:52 +02:00
Jan Böhmer
dedadf0c10 Merge remote-tracking branch 'origin/master' 2025-03-30 14:47:53 +02:00
Jan Böhmer
c8375def1a Added an database automigration feature to the docker image 2025-03-30 14:47:48 +02:00
Jan Böhmer
62ebcde2de
New Crowdin updates (#899)
* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)
2025-03-30 14:23:21 +02:00
Jan Böhmer
594a5779dc Specify that we mean a column in drop statement. This is more correct
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.1, mysql) (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.1, postgres) (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.1, sqlite) (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
This should help with more strict sql servers like in issue #900
2025-03-29 20:57:58 +01:00
Jan Böhmer
c0ef64fb64 Use updated version of translation-editor-bundle 2025-03-29 16:24:32 +01:00
Jan Böhmer
48c70c3bb4 Added way to batch edit the location of parts with a single stock 2025-03-29 16:21:10 +01:00
Jan Böhmer
68124a340b Updated dependencies
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.4, sqlite) (push) Waiting to run
PHPUnit Tests / PHPUnit and coverage Test (PHP 8.1, mysql) (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.1, postgres) (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.1, sqlite) (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
2025-03-29 13:45:53 +01:00
Jan Böhmer
0b5003fcf6 We are in development of 1.17 2025-03-29 13:41:30 +01:00
Jan Böhmer
956ece60af Added documentation for attachments download command 2025-03-29 13:35:29 +01:00
Jan Böhmer
53da45d7d7 Added command to download all external-only attachments to the local file system 2025-03-29 13:33:35 +01:00
Jan Böhmer
57f0432a87 Fixed typo in attachmentrepository 2025-03-29 12:52:43 +01:00
Jan Böhmer
fb535ec6f7 Added tests for latex formatted units 2025-03-29 12:37:17 +01:00
Jan Böhmer
4e1b1a4ffa Render units of parameters in upstanding latex
Fixes issue #856
2025-03-29 12:33:18 +01:00
Jan Böhmer
5b111d80f1 Invalidate kicad category cache, when parts get changed, as this might affect the visibility of categories too
Related to #885
2025-03-29 12:01:26 +01:00
Jan Böhmer
03e1105a8e Fixed phpstan issues
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
2025-03-27 23:11:49 +01:00
Jan Böhmer
059a9683db Fixed problem that global_theme setting was not respected
This fixes issue #880
2025-03-27 21:47:52 +01:00
Jan Böhmer
1daf6f01f4 Fixed error 500 if internal attachment path was not resolvable to an URL
This fixes issue #898
2025-03-27 21:40:51 +01:00
Daniel Carrasco
d3b225771c
Modified the DigiKey Provider to works with the V4 API (#875)
* Modified the DigiKey Provider to works with the V4 API

* Correclty apply the MarketPlaceFilter option to digikey v4 API

* Show the packe type (Tape&Reel, Box, etc.) as footprint in digikey provider search

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-03-27 21:26:18 +01:00
Jan Böhmer
7275db27e7 Manually filter mouser search results to fix the edgecase, that the API returned multiple results for an exact part number
This fixes issue #888 and issue #616
2025-03-27 21:06:50 +01:00
Jan Böhmer
49ee9131d0 Use composer/ca-bundle instead of system CA for element14 provider
This is a workaround for debian systems, where the required root CA is missing as trusted CA in the system CAs. This fixes issue #891 and #866
2025-03-27 20:59:22 +01:00
Jan Böhmer
e75e0c4c0b Add a link to the category part info as category description in KiCAD.
This also fixes issue #878
2025-03-27 20:34:32 +01:00
Jan Böhmer
e94d4a7752 Merge remote-tracking branch 'origin/l10n_master'
Some checks failed
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
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
2025-03-23 19:52:02 +01:00
Jan Böhmer
95206f427d We are in development of 1.16.2-dev now 2025-03-23 19:51:58 +01:00
Jan Böhmer
2d7f88522a Improved attachment download compatibility
Added more headers to make it appear more like a browser request, and try to use TLS1.3, if we get a 403 (which is useful for digikey).

Commit cherry picked from @Treeed
2025-03-23 19:51:21 +01:00
Jan Böhmer
f5c17bc7c8 Fixed Pollin provider exception, if product top features panel does not exist 2025-03-23 19:43:28 +01:00
Jan Böhmer
63e222ed40 Upgraded dependencies 2025-03-23 19:41:40 +01:00
Jan Böhmer
6963ee3b8d New translations messages.en.xlf (Spanish) 2025-03-11 14:02:14 +01:00
Jan Böhmer
bb5e42bf63 New translations security.en.xlf (Spanish) 2025-03-11 14:02:10 +01:00
Jan Böhmer
c48f778648
Update console_commands.md 2025-03-07 11:30:50 +01:00
Jan Böhmer
616aad6403
Added hint to docker install docs, that you need to run sudo with -E command
That should prevent isssues like in #882 and #871
2025-03-07 11:29:58 +01:00
Jan Böhmer
bcc7547d6f
New Crowdin updates (#874)
* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (English)
2025-03-02 21:14:42 +01:00
Jan Böhmer
5a1a6e9217
Bumped version 1.16.1 2025-02-26 12:28:07 +01:00
Jan Böhmer
eae1fcecab
New translations security.en.xlf (Chinese Simplified) (#870) 2025-02-26 12:27:11 +01:00
Marc
b53989bb9d
Update LCSCProvider.php: fix error in query string (#873)
Fix typo in query string 'prodctCode' -> 'productCode' introduced in Commit 80527e3
2025-02-25 13:32:36 +01:00
Jan Böhmer
467d50bd31 Use slightly different migration method for attachment system migration
This maybe help with issue #871
2025-02-25 00:32:04 +01:00
Jan Böhmer
1935258978 Fixed phpstan issue 2025-02-23 22:55:59 +01:00
Jan Böhmer
2b5030c69f Bumped version to 1.16.0 2025-02-23 22:40:02 +01:00
Jan Böhmer
6537502696
New Crowdin updates (#867)
* New translations messages.en.xlf (English)

* New translations messages.en.xlf (German)
2025-02-23 17:30:33 +01:00
Jan Böhmer
0ba352ab0b Updated composer dependencies 2025-02-23 17:28:39 +01:00
Jan Böhmer
5d3f861728 Use newer version of farnell/element14 api to get the correct links to product pages. Also we can now retrieve a more detailed description, which will be put into the notes field 2025-02-22 23:29:57 +01:00
Jan Böhmer
319b69f6c7 Added an workaround for issue #862 2025-02-22 22:59:55 +01:00
Jan Böhmer
c4ba28e3a0 Heavily refactored the property metadata attribute logic
The new method is much more universal and fixes issue #862
2025-02-22 22:19:38 +01:00
Jan Böhmer
b38ef8ecea Revert "Fixed type error introduced with api-platform upgrade"
This reverts commit a54c2db9b9.
2025-02-22 21:12:58 +01:00
Jan Böhmer
cb0817666d Revert "Use the modular api-platform packages instead of the monolitic api-platform/core package"
This reverts commit 17caf476bf.
2025-02-22 21:12:54 +01:00
Jan Böhmer
a54c2db9b9 Fixed type error introduced with api-platform upgrade 2025-02-22 19:59:12 +01:00
Jan Böhmer
17caf476bf Use the modular api-platform packages instead of the monolitic api-platform/core package 2025-02-22 19:48:36 +01:00
Jan Böhmer
42cb590c75 Fixed deprecations with api platform 2025-02-22 19:35:49 +01:00
Jan Böhmer
6fd05e1456 Fixed migration 2025-02-22 19:23:28 +01:00
Jan Böhmer
bec45d60e5 Fixed migration for postgresql 2025-02-22 18:03:03 +01:00
Jan Böhmer
019e67a676 Migrate legacy attachment discriminator class values to modern format, so that we can make the discriminator map unique and fix a deprecation with doctrine 2025-02-22 17:58:20 +01:00
Jan Böhmer
f146d88aa5 Added additional filters to attachment datatable 2025-02-22 17:48:26 +01:00
Jan Böhmer
48be9a8098 Made attachment datatable sortable by internal filename and external url 2025-02-22 17:41:41 +01:00
Treeed
29f92d9bd3
Split attachment paths (#848)
* fixed attachment statistics for sqlite

* Split attachment path into internal and external path, so the external source URL can be retained after a file is downloaded

* Make internal and external path for attachments nullable, to make clear that they have no internal or external path

* Added migrations for nullable columns for postgres and mysql

* Added migration for nullable internal and external pathes for sqlite

* Added translations

* Fixed upload error

* Restrict length of filename badge in attachment edit view

* Improved margins with badges in attachment edit

* Added a link to view external version from attachment edit

* Let media_url  stay in API attachments responses for backward compatibility

---------

Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-02-22 17:29:14 +01:00
Jan Böhmer
ebb977e99f Updated dependencies 2025-02-20 22:10:57 +01:00
Jan Böhmer
94bcd3d2d3 Fixed static analysis issue 2025-02-20 20:35:00 +01:00
Jan Böhmer
a9bd4c5606 Use better parameter value parsing for pollin and reichelt parameters 2025-02-20 19:45:05 +01:00
Jan Böhmer
8d9dde0032 Show the desired part, when searching for the pollin part number 2025-02-20 19:39:35 +01:00
Jan Böhmer
b2d4333fff Merge branch 'pollin_provider' 2025-02-20 19:36:36 +01:00
Jan Böhmer
afd5e2b95b Added documentation for pollin info provider 2025-02-20 19:36:31 +01:00
Jan Böhmer
085adf8d71 Throw an exception message, when trying to use an info provider which is not active 2025-02-20 19:35:16 +01:00
Jan Böhmer
9b35b60d61 Use correct price for one unit if there are multiple prices availble
We can still not parse the bulk prices correctly completly
2025-02-20 19:32:31 +01:00
Jan Böhmer
742e57cc5c Added basic provider for pollin 2025-02-20 19:20:14 +01:00
Jan Böhmer
a5961668fe Disable info provider result caching when in debug mode 2025-02-20 16:59:16 +01:00
Jan Böhmer
e7394c165a Undo change to cache expiration 2025-02-20 16:57:16 +01:00
Jan Böhmer
7be966122f Added missing info hint how to enable reichelt provider 2025-02-20 16:56:21 +01:00
Jan Böhmer
d176b68fd2 Merge branch 'reichelt_provider' 2025-02-20 16:46:58 +01:00
Jan Böhmer
1e80be1376 Added documentation for reichelt info provider 2025-02-20 16:46:47 +01:00
Jan Böhmer
3585b08d4b Pass reichelt env through docker container 2025-02-20 16:38:07 +01:00
Jan Böhmer
c51e0eb68f Allow to get prices in non-EUR currencies from reichelt 2025-02-20 16:37:13 +01:00
Jan Böhmer
d05c0579a2 Fixed problem that first batch price was not included 2025-02-20 16:33:37 +01:00
Jan Böhmer
5e40519bc5 Allow to select if VAT should be included or not 2025-02-20 16:29:37 +01:00
Jan Böhmer
d13752114c Allow to configure the reichelt info provider via env vars 2025-02-20 16:06:10 +01:00
Jan Böhmer
90e1b809fe Allow to change language and country 2025-02-20 15:59:35 +01:00
Jan Böhmer
32b4e6812d Undo change to cache expiration 2025-02-20 15:40:26 +01:00
Jan Böhmer
a798aa9c24 Allow to extract MPN from reichelt provider 2025-02-20 15:39:35 +01:00
Jan Böhmer
f1c28b9f46 Allow to parse batch prices 2025-02-20 15:14:59 +01:00
Jan Böhmer
39bc400376 Added basic price info retrieval from reichelt 2025-02-20 00:32:03 +01:00
Jan Böhmer
e287918121 Extract category from reichelt provider 2025-02-20 00:24:46 +01:00
Jan Böhmer
e0bf8e5fbc Allow reichelt provider to parse parameters 2025-02-20 00:18:05 +01:00
Jan Böhmer
376c7e7a6f Allow to parse ranges for ParameterDTO which just contain two dots 2025-02-20 00:17:53 +01:00
Jan Böhmer
5612a790fb Added basic way to retrieve simple part infos and datasheet 2025-02-19 23:55:58 +01:00
Jan Böhmer
80527e35c3 Added basic reichelt search capabilities 2025-02-19 00:44:49 +01:00
Jan Böhmer
f592ab6395 Updated KiCAD library lists to latest KICAD lib 2025-02-16 21:48:30 +01:00
Jan Böhmer
d7c741c652 Disable create option for input selects if an entity with this name already exists 2025-02-16 21:14:57 +01:00
Jan Böhmer
9502f30e1b Add cllear button to entity select type 2025-02-16 20:36:46 +01:00
Jan Böhmer
7286c4bbef Fixed bug in autoselect_typed plugin 2025-02-16 20:24:13 +01:00
Jan Böhmer
a976f97dbb Apply click_to_edit plugin where reasonable 2025-02-16 20:24:01 +01:00
Jan Böhmer
2c9b8c7dea Merge remote-tracking branch 'origin/l10n_master' 2025-02-16 19:48:57 +01:00
Jan Böhmer
787decf4e2 Updated dependencies 2025-02-16 19:48:51 +01:00
Treeed
2fc70b8bdd
Highlightable attachment paths (#849)
* made autocomplete controller allow selecting text and autocommit typed text on blur

* moved click_to_edit and autoselect_typed into separate plugins

---------

Co-authored-by: jona <a@b.c>
2025-02-16 19:46:29 +01:00
Jan Böhmer
64491a9772 New translations security.en.xlf (Dutch) 2025-02-10 17:11:09 +01:00
Jan Böhmer
b724b05de6 Fixed "implicitly marking parameter as nullable" deprecations in PHP 8.4 fixed 2025-02-08 00:19:20 +01:00
Marc
d94c4af1be
Document that only Digikey API v3 is supported (#858) 2025-02-04 21:41:03 +01:00
Nico Felbinger
8f0f5a5eb4
Fix postgresl unix socket example (#852)
* Fix postgresl unix socket example

* Fix user defaulting to root
2025-02-02 21:09:10 +01:00
Treeed
edf50a71d1
fixed attachment statistics for sqlite (#847)
Co-authored-by: jona <a@b.c>
2025-02-02 21:05:47 +01:00
Jan Böhmer
d0937218b9 Bumped version to 1.15.2 2025-02-01 23:47:14 +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
edd254ee06 Merge remote-tracking branch 'origin/l10n_master' 2025-02-01 23:14:50 +01:00
Jan Böhmer
42ecb83155 Rename duplicate parameters and attachments when importing from an info provider
This fixes issue #840
2025-02-01 23:14:42 +01:00
Jan Böhmer
56f801c058 New translations messages.en.xlf (English) 2025-02-01 21:30:23 +01:00
Marc
2d3d05e956
Added character symbols for degree and registered in keybindings.md (#845) 2025-02-01 21:02:02 +01:00
Marc
4321e51bf5
Update messages.de.xlf (#841)
Removed "es" in german translation of string tfa_trustedDevices.explanation
2025-02-01 20:58:55 +01:00
Jan Böhmer
be04730906
New Crowdin updates (#837)
* New translations security.en.xlf (Russian)

* New translations validators.en.xlf (Russian)

* New translations messages.en.xlf (Russian)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Italian)
2025-02-01 20:58:35 +01:00
Jan Böhmer
aa06e1df04 Fixed exception when trying to export an empty entity list
Fixes issue #836
2025-02-01 20:57:27 +01:00
Jan Böhmer
fd7a0156bc Disable GET_GROSS_PRICES option for TME info provider when using private key. Otherwise we receive an error.
This fixes issue #838
2025-02-01 20:20:33 +01:00
Jan Böhmer
1e19ff24ba Updated dependencies 2025-02-01 20:01:33 +01:00
Jan Böhmer
0f4238291f Bumped version to 1.15.1 2025-01-07 21:56:13 +01:00
Jan Böhmer
03a2a10efd Updated dependencies 2025-01-07 16:51:34 +01:00
Jan Böhmer
04310aa2f8 Removed WebpackAutoPathSubscriber, as it seems it not necessary anymore with encore 5 2025-01-07 16:39:51 +01:00
Jan Böhmer
e8ca11a5cf Do not use a slash prefix for .setPublicPath() in webpack config. Webpack encore 5 seemed to have changed something, so that it does not get overriden anymore
We just get a warning, which we can ignore.
2025-01-07 16:14:21 +01:00
Jan Böhmer
24137b30a5 Added tests for RedirectController that simulates the situation of a reverse proxy and subdirectory 2025-01-07 15:52:28 +01:00
Jan Böhmer
4421917333 Revert "Removed baarcode scanner inbox, as we now have enough performance to apply the decoder to the full image"
This reverts commit de0832bece.
2025-01-06 00:49:16 +01:00
Jan Böhmer
25c8660c2e Bumped version to 1.15.0 2025-01-06 00:31:19 +01:00
Jan Böhmer
190e87390d
New Crowdin updates (#804)
* New translations security.en.xlf (Italian)

* New translations messages.en.xlf (German)

* New translations security.en.xlf (German)
2025-01-06 00:29:40 +01:00
Jan Böhmer
c9aefdd862 Start with an empty selection of category when a new part is created, so that the user has to manually select it 2025-01-06 00:29:26 +01:00
Jan Böhmer
3ad088663f Fixed phpstan issue 2025-01-06 00:21:04 +01:00
Jan Böhmer
a29e87e5ac Fixed phpunit tests 2025-01-06 00:19:31 +01:00
Jan Böhmer
de0832bece Removed baarcode scanner inbox, as we now have enough performance to apply the decoder to the full image 2025-01-06 00:08:42 +01:00
Jan Böhmer
614697ba84 Use zxing-wasm polyfill even if native barcode detector API is available as the polyfill is sometimes better than the native on
See discussion #808 for more infos
2025-01-05 23:43:17 +01:00
Jan Böhmer
6bdf3d891a Include the JSON encoded response, when throwing an unknown response format in mouser provider
Should help to debug issue #820
2025-01-05 22:15:12 +01:00
Jan Böhmer
f75704f77c Allow users to save a new label profiles directly from the label generator dialog
This fixes issue #806
2025-01-05 22:00:07 +01:00
Jan Böhmer
9d09543eb9 Added a button to quickly go to all label profiles editor
Related to issue #806
2025-01-05 17:50:15 +01:00
Jan Böhmer
a6116398a8 Only run PartDenormalizer when importing files, otherwise it causes problems with API platform
This fixes issue #800
2025-01-05 17:37:02 +01:00
Jan Böhmer
39763b84d5 Updated dependencies 2025-01-05 15:37:21 +01:00
Jan Böhmer
8502df08fa Added test for autodetection of EIGP114 barcodes 2025-01-04 18:43:50 +01:00
Jan Böhmer
bf2a776403 Do the EIGP114 detection after userdefined barcode detection, so that users can override it on their partLots 2025-01-04 18:41:27 +01:00
Jan Böhmer
052190c69b Do not trim user_barcode for partLots 2025-01-04 18:40: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
39b5240934 We are in development of version 1.15.0 2025-01-04 18:14:15 +01:00
Jan Böhmer
ddc1c286d9 Merge branch 'detector-api-polyfill' 2025-01-04 18:10:36 +01:00
Jan Böhmer
22fba37d28 Pause the camera and scanner, when navigating away from the scanner page, so that the camera feed is closed 2025-01-04 18:10:26 +01:00
Jan Böhmer
0c627a5636 Use forked version of html5-qrcode to avoid including zxing-js which will never be used then 2025-01-04 18:09:56 +01:00
Jan Böhmer
53dcd24216 Improved scanning FPS to 10 2025-01-04 16:57:41 +01:00
Jan Böhmer
4b09a321ad Polyfill BarcodeDetector API for improved performance of Html5QRcodeScanner 2025-01-04 16:49:17 +01:00
Treeed
9e85b70c17
Added capability to scan Digikey barcodes and open the local part part page based on the result (#811)
* added capability to scan digikey barcodes and open the local part page based on the digikey part number or manufacturer part number

* had replaced one too many doublequotes

* Generalized interpretation of format06 barcodes, added ids for mouser

* Renamed vendor_barcode to user_barcode in entities

* Added a own class to parse EIGP114 barcodes

* Added tests to EIGP114Barcode parser

* Refactored code

* Changed BarcodeRedirector to support the new Barcode EIGP114BarcodeScanResult class

* Added possibility to just show all information contained in a barcode

* Dont require trailer for EIGP114 barcodes, as digikey does not seem to put them onto their  barcodes

* Fixed inspection issues

---------

Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2025-01-04 01:20:51 +01:00
Jan Böhmer
9c99217dee Fixed test errors 2025-01-03 20:21:17 +01:00
Jan Böhmer
afc1dbdd4b Updated recipe for symfony flex 2025-01-03 17:45:13 +01:00
Jan Böhmer
20f58fc07d Updated symfony cli recipe
This adds an error message if no composer dependencies are installed
2025-01-03 17:42:49 +01:00
Jan Böhmer
e6b78dd213 Updated dependencies 2025-01-03 17:41:37 +01:00
Jan Böhmer
63893ffabe Allow to automatically map categories from info providers to local categories using the "alternative names" system
This partially addresses issues discussed in discussion #808
2024-12-31 18:31:20 +01:00
Jan Böhmer
c9e519d0b5 Show a warning flash, when creating a part from an info provider that has no category autoprovided
This partially fixes the problems described in discussion #808
2024-12-31 18:25:28 +01:00
Jan Böhmer
273bde90f2 Use the providerID as keyword when searching infos for a part with already existing providerreference and preselect the info provider if possible 2024-12-31 18:13:15 +01:00
Treeed
92e4976396
Show when parts from info provider already exist (#810)
* added button to show existing part with same manufacturer and mpn in provider list

* added button to edit existing part in provider list

* added docstring and comments

* replaced unnecessary double quotes

* Introduced a new twig variable localPart to split up the result

* Highlight a row, if the part is already existing

* Made buttons translatable

* Improved styling of the buttons and added a badge to show a hint

* Extracted database queries for part matching into its own service and optimized the query reducing the required queries by factor 2

* Allow to find existing parts via the stored providerReference

This should allow the database to more quickly find entries

* Allow to use part name and manufacturer alternative names for mapping

* Added a button to update a local part from the info provider and moved some buttons into dropdown menu

---------

Co-authored-by: jona <a@b.c>
Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-12-31 18:03:36 +01:00
Jan Böhmer
e9efbff912 Upgraded typescript version 2024-12-29 20:15:05 +01:00
Jan Böhmer
41089c08f8 Upgraded exports-loader and webpack-cli 2024-12-29 20:08:59 +01:00
Jan Böhmer
9e23e606f8 Updated marked and compression-webpack plugin 2024-12-29 19:59:31 +01:00
Jan Böhmer
b3f0fd368a Updated webpack encore to 5.0.0 2024-12-29 19:50:02 +01:00
Jan Böhmer
12bd5472e2 Fixed sizing of text in label editor input 2024-12-29 19:47:19 +01:00
Jan Böhmer
ef64779759 Updated CKeditor5 to v41 2024-12-29 19:31:04 +01:00
Jan Böhmer
b3d8076ddf Fixed fixture loading process 2024-12-29 19:06:58 +01:00
Jan Böhmer
f775203608 Use new syntax for getReference() in data fixtures 2024-12-29 13:46:22 +01:00
Jan Böhmer
a6083688e4 Upgraded frontend dependencies 2024-12-29 13:43:32 +01:00
Jan Böhmer
50689cd4e6 Updated datatables-bundle 2024-12-29 13:41:30 +01:00
Jan Böhmer
255fcbac1c Removed direct dependency to phpstan-phpdoc-parser, so that it can get removed when updating the webauthn bundle 2024-12-29 13:38:35 +01:00
Jan Böhmer
7f8ffa56e5 Removed (hopefully) unused and unnecessary dependencies 2024-12-29 13:34:10 +01:00
Jan Böhmer
9a2a5f30a3 Updated doctrine fixtures bundle 2024-12-29 13:20:12 +01:00
Jan Böhmer
a9f444cbb4 Added return types to ExponentialNumberTypes for futureproofing the implementation 2024-12-29 13:14:26 +01:00
Jan Böhmer
164efb0551 Fixed phpstan error with NodesListBuilder 2024-12-29 13:14:00 +01:00
Jan Böhmer
a37b8cbb15 Fixed introduced bug in node flattening 2024-12-28 23:19:55 +01:00
Jan Böhmer
946032a101 Fixed phpstan analysis issues and bad code that showed up with phpstan 2.0 2024-12-28 23:08:08 +01:00
Jan Böhmer
a273acbecd Updated PHPstan configuration 2024-12-28 15:12:18 +01:00
Jan Böhmer
0ceee1582e Updated phpstan to 2.0 2024-12-28 14:56:44 +01:00
Jan Böhmer
04a0369d56 Added proxmox LXC installation method to docs 2024-12-25 19:21:30 +01:00
Jan Böhmer
31a288b44d Added recommendation on installation methods 2024-12-25 19:13:28 +01:00
Jan Böhmer
502dc3aa1c Added kubernetes as available installation method. 2024-12-25 19:12:09 +01:00
Jan Böhmer
6874d7ca55 Upgraded dependencies 2024-12-23 20:34:42 +01:00
Jan Böhmer
da8f669aed Test for PHP 8.4 2024-12-23 20:26:31 +01:00
Vedran Vekic
0f92a69b03
Rewrite LCSC datasheet URL (#795) 2024-12-10 14:32:23 +01:00
Bryce Nagaj
8faa3251c4
Update verbiage (#788) 2024-12-10 14:30:47 +01:00
Marc
56fc14003c
Update information_provider_system.md (#791)
Fixed minor typo in Octopart variable: PROVIDER_OCOTPART_COUNTRY
2024-12-10 14:30:16 +01:00
Jan Böhmer
b3499e4ea5
Fixed (wrongly) failing test on IPAnonymizer 2024-12-02 11:01:39 +01:00
Jan Böhmer
07b1ff9bf5 Bumped version to 1.14.5 2024-12-02 01:00:35 +01:00
Jan Böhmer
5bbf24c92e
New translations security.en.xlf (English) (#786) 2024-12-02 00:22:45 +01:00
Jan Böhmer
eea8b3e679 Merge remote-tracking branch 'origin/master' 2024-12-02 00:22:20 +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
dependabot[bot]
b554d0d851
Bump codecov/codecov-action from 4 to 5 (#774)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-12-01 23:16:37 +01:00
Jan Böhmer
b1ba26e0b9 Allow usernames to contain @-signs as long as it is not at the begininng
This allows to use email addresses as usernames and fixes issue #772
2024-12-01 23:05:27 +01:00
Jan Böhmer
ca8ad760d7 Allow SAML users to access the API
This fixes issue #765.
2024-12-01 22:54:22 +01:00
Jan Böhmer
80129c0a88 Use PHP 8.3 as docker image, and allow for longer error log lines
This fixes issue #781
2024-12-01 22:34:05 +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
Jan Böhmer
baf8977578 Correctly handle IP addresses containing RFC 4007 scoping 2024-12-01 19:19:04 +01:00
Jan Böhmer
c7bf843312 Updated dependencies 2024-12-01 18:48:22 +01:00
Jan Böhmer
ce6fee1682 Merge remote-tracking branch 'origin/dependabot/composer/symfony/http-client-6.4.15' 2024-11-18 15:43:25 +01:00
Jan Böhmer
2653fad488 Merge remote-tracking branch 'origin/dependabot/composer/symfony/security-http-6.4.15' 2024-11-18 15:43:16 +01:00
Jan Böhmer
dd54c46a29 Merge remote-tracking branch 'origin/l10n_master' 2024-11-18 15:43:10 +01:00
dependabot[bot]
724a0e21d3
Bump symfony/security-http from 6.4.14 to 6.4.15
Bumps [symfony/security-http](https://github.com/symfony/security-http) from 6.4.14 to 6.4.15.
- [Release notes](https://github.com/symfony/security-http/releases)
- [Changelog](https://github.com/symfony/security-http/blob/7.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/security-http/compare/v6.4.14...v6.4.15)

---
updated-dependencies:
- dependency-name: symfony/security-http
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 18:39:42 +00:00
dependabot[bot]
578277d11f
Bump symfony/http-client from 6.4.14 to 6.4.15
Bumps [symfony/http-client](https://github.com/symfony/http-client) from 6.4.14 to 6.4.15.
- [Release notes](https://github.com/symfony/http-client/releases)
- [Changelog](https://github.com/symfony/http-client/blob/7.1/CHANGELOG.md)
- [Commits](https://github.com/symfony/http-client/compare/v6.4.14...v6.4.15)

---
updated-dependencies:
- dependency-name: symfony/http-client
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-13 16:49:40 +00:00
Jan Böhmer
22258e3183 New translations validators.en.xlf (Croatian) 2024-11-10 14:30:20 +01:00
Jan Böhmer
0234463b68 Bumped version to 1.14.4 2024-11-08 23:32:34 +01:00
Jan Böhmer
ef412eef92 Fixed tests 2024-11-08 23:32:14 +01:00
Marc
76ebd22eab
Fixed Typos and mistranslations in GDPR mode (DSGVO Modus) (#757)
Fixed Typo enviroment

Co-authored-by: Marc Kreidler <kreidler@nedo.com>
2024-11-08 23:22:18 +01:00
Jan Böhmer
5b0ca8e346 Updated dependencies 2024-11-08 23:15:40 +01:00
Jan Böhmer
0b6b10c27b Bumped version to 1.14.3 2024-11-05 00:11:39 +01:00
Jan Böhmer
6225d2c9b3 Implemented an easy to use APIFilter for tags
This makes the process of filters more easily and intuitive. This fixes issue #750
2024-11-05 00:07:25 +01:00
Jan Böhmer
01fc6524a4 Added a aggregate function for storelocation sorting to avoid exceptions on Postgres
Actually this was not good on other DB types too, but they just ignored the problems.

This fixes issue #734
2024-11-04 23:46:45 +01:00
Jan Böhmer
2575e6a160 Improved size and position of back to top button to avoid overlapping with buttons, etc.
This should fix issue #737
2024-11-03 23:58:06 +01:00
Jan Böhmer
484ba5ebd7 If user password set command is run in non-interactive mode, show a warning message if no password is inputted
Related to issue #748
2024-11-03 23:39:04 +01:00
Jan Böhmer
b42d98e9f8 Increase font-weight of the <dl> element in part info page to match its look to the <h5> element 2024-11-03 23:21:58 +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
5e76451d46 Try to guess the character encodings and convert it to UTF-8 on importing
This should fix issue #749
2024-11-03 22:27:24 +01:00
Jan Böhmer
a873ad3316 Replace all unicode characters with ASCII chars in FilenameSanatizer to make filenames more sanatized 2024-11-03 22:06:42 +01:00
Jan Böhmer
b1e03f49ee Pass the docker envs for oemsecrets to Part-DB
This fixes issue #742
2024-11-03 21:46:53 +01:00
Jan Böhmer
011e23f8e6 Added polish to language selector 2024-11-03 20:04:43 +01:00
Jan Böhmer
646cd8cf22 Merge remote-tracking branch 'origin/l10n_master' 2024-11-03 20:03:28 +01:00
Jan Böhmer
52ac8a70d5 Updated dependencies 2024-11-03 20:03:24 +01:00
Jan Böhmer
e020334b73 New translations messages.en.xlf (Polish) 2024-10-19 22:40:21 +02:00
Jan Böhmer
7698e83f0b New translations messages.en.xlf (Polish) 2024-10-19 21:40:19 +02:00
Jan Böhmer
dd56f5e0c8 New translations messages.en.xlf (Polish) 2024-10-19 19:30:24 +02:00
Jan Böhmer
92c32eef74
New Crowdin updates (#738)
* New translations validators.en.xlf (Polish)

* New translations messages.en.xlf (Polish)
2024-10-19 19:24:55 +02:00
Jan Böhmer
08770c7dc5 Bumped version to 1.14.2 2024-10-17 00:20:48 +02:00
Priit Laes
808a94e4df
Document APP_SECRET and PostgreSQL specific bits in configuration variables (#727)
* docs: Mention APP_SECRET

* docs: Add PostgreSQL specific bits to DATABASE_URL description
2024-10-16 23:59:53 +02:00
Jan Böhmer
490086d531 Use the same translation for the panel with enabled search options, like in the checkbox options in navbar 2024-10-16 23:59:23 +02:00
Jan Böhmer
2ef3fbb81b Merge remote-tracking branch 'origin/l10n_master' 2024-10-16 23:57:07 +02:00
Jan Böhmer
7d834ac8d7 Include the query part of the request, when generating the url for the datatables via a custom twig function.
This fixes issue #735, as without this the query gets not passed to the datatable
2024-10-16 23:57:02 +02:00
Jan Böhmer
15ad0ec9c0 Updated dependencies 2024-10-16 23:40:48 +02:00
Jan Böhmer
f0b78e8b2c New translations validators.en.xlf (Italian) 2024-10-16 13:50:37 +02:00
Jan Böhmer
e616faa76f New translations messages.en.xlf (Italian) 2024-10-16 13:50:36 +02:00
Jan Böhmer
8159f4d8ee Bumped version to 1.14.1 2024-10-13 23:43:55 +02:00
Jan Böhmer
021c576468 Exclude the translation dumper fix files, to avoid phpstan issues, which we cannot control 2024-10-13 23:23:48 +02:00
Jan Böhmer
1b2339a82c Merge remote-tracking branch 'origin/l10n_master' 2024-10-13 23:22:24 +02:00
Jan Böhmer
2b6bb3f773 New translations messages.en.xlf (German) 2024-10-13 23:20:14 +02:00
Jan Böhmer
abc5c61a06 Fixed problem, that search field and search options did not close when clicking outside
This fixes issue #701. For the search field this was caused by algolia/autocomplete lib, which do not support multiple autocomplete fields on a single page. If initailly loaded on the homepage, which features a second autocomplete, this one "steals" the input listening, and the one in the navbar do not close anymore when clicking outside.
Custom code which triggers the closing of the autocomplete manually when clicking outside, was added as a workaround.
2024-10-13 23:19:03 +02:00
Jan Böhmer
7145bce605 Construct the correct current path, when serving from a subdirectory
This fixes issue #274
2024-10-13 22:49:42 +02:00
Jan Böhmer
bb92e5e9ee New translations validators.en.xlf (German) 2024-10-13 21:40:20 +02:00
Jan Böhmer
0c47aa226c Fixed imports of parameters on parts
It was missing the required serialization group. This fixes issue #718
2024-10-13 21:35:31 +02:00
Jan Böhmer
76e945bbbd Fixed issue that the document could not be scrolled anymore, when redirected from a modal
This fixes issue #696
2024-10-13 21:23:57 +02:00
Jan Böhmer
4a6ec2581d Removed wrongly used controller for merge modal 2024-10-13 20:59:28 +02:00
Jan Böhmer
3d75bf5f9f Added translation for the confirmation code field in the authenticator app 2FA setup section 2024-10-13 20:46:12 +02:00
Jan Böhmer
c27648b89b New translations validators.en.xlf (English) 2024-10-13 20:40:16 +02:00
Jan Böhmer
ccf67c0662 Added translation if authentication confirmation code is wrong 2024-10-13 20:35:56 +02:00
Jan Böhmer
ca116cae91 Keeep the segment annotations in the translation files, when editing them from inside the application 2024-10-13 20:30:56 +02:00
Jan Böhmer
a29d933f99 Fixed 2FA TOTP for non-admins, while also retaining validation of auth code
This fixes issue #717
2024-10-13 20:29:22 +02:00
Jan Böhmer
49acf3e0cf Fixed problem preventing non-admins to add TOTP 2FA to their account
This was caused by the no-lockout constraint, which was accidentially triggered here
2024-10-13 20:13:03 +02:00
Jan Böhmer
234b5abb96 Merge remote-tracking branch 'origin/master' 2024-10-13 19:56:29 +02:00
Jan Böhmer
839bcf91d6 Updated dependencies. 2024-10-13 19:56:21 +02:00
Jan Böhmer
58ed57fab7
New translations messages.en.xlf (English) (#703) 2024-09-12 21:52:34 +02:00
Jan Böhmer
fa42997733 Bumped version to 1.14.0 2024-09-09 21:42:29 +02:00
Jan Böhmer
ac416141d0 Merge remote-tracking branch 'origin/master' 2024-09-09 21:42:15 +02:00
Jan Böhmer
c629a85b14 Updated dependencies 2024-09-09 21:42:03 +02:00
Jan Böhmer
7ccfea208f
New Crowdin updates (#695)
* New translations messages.en.xlf (English)

* New translations validators.en.xlf (German)

* New translations messages.en.xlf (German)

* New translations messages.en.xlf (Italian)
2024-09-09 21:38:07 +02:00
Jan Böhmer
f3c802bcff Made parameter type fields wider to fit more digits 2024-09-09 21:36:05 +02:00
Jan Böhmer
574583bd6a Do not round values of parameters, we can now use the full double precision
This fixes issue #681
2024-09-09 21:33:28 +02:00
Jan Böhmer
84c54d0b25 Removed NumberType fixes, as these is now part of the upstream symfony 2024-09-09 21:13:44 +02:00
Jan Böhmer
86d3f87694 [Digikey provider] Do not try to interpret certain parameters (like packages) as numbers
This fixes issue #682
2024-09-09 20:44:09 +02:00
André Lademann
ddd7252051
Increase image size in list view #688 (#689) 2024-09-09 20:29:25 +02:00
Jan Böhmer
b4e8136618 Fixed problem with undeleting elements containing an embedded and propertly restore the infos of the embed
This fixes issue #685
2024-09-09 20:26:26 +02:00
Jan Böhmer
c2638991f2 Added documentation for OEMSecrets info provider 2024-09-09 17:02:45 +02:00
Jan Böhmer
8554be9abd Show number of results for info provider search and show a notice, if no results were found 2024-09-09 16:41:19 +02:00
Jan Böhmer
87a518703f Escape spaces in unnwrapped urls to avoid invalid URLs 2024-09-09 16:23:12 +02:00
Jan Böhmer
dd03ca943d Fixed phpstan issues 2024-09-09 14:52:18 +02:00
Jan Böhmer
6997861811 [OEMSecrets provider] Extract real URLs and remove tracking parts 2024-09-09 14:52:09 +02:00
Pasquale D'Orsi
1cc1530b20
OEMSecrets provider interface v.1.0 (#679)
* OEMSecrets provider interface v.1.0

New class for interacting with the OEMSecrets (https://www.oemsecrets.com) API version 3.0.1.

* Refactored info provider to be stateless and independent from session, optimized Part-DB API usage, and fixed PHPStan issues.

Refactored info provider to be stateless and independent from session, now use Psr\Cache, fixed issues identified by PHPStan, additional minor enhancements and bug fixes.

* Prefix cache keys with oemsecrets_ to avoid key collissions

* Use uniqid with more entropy to reduce probability of collisions

* Made $resultData local as it is only used inside searchByKeyword

* Use the parameter name $id from interface declaration for getDetails to avoid problems with named arguments

* Use unicode modifier for preg_match to avoid problems when parameters contain non-unicode strings

* Various small code quality improvements

* Try to retrieve the part from the API in getDetails, if the DTO was not cached before

* Improved code formatting

* Channged OEMSecret default country to DE to be consistent with other default values

* Do not call gc_collect_cycles in the loop to process the results, but only after all processBatch calls

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-09-09 00:59:44 +02:00
Jan Böhmer
98597fb3aa Use new repository pathes (Part-DB-server) instead of the Part-DB-symfony ones 2024-09-08 20:05:06 +02: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
7db44f0ec5 Upgraded dependencies 2024-09-08 19:54:31 +02:00
Jan Böhmer
abb5395cae Use "log-bin-trust-function-creators" option for mysql in recommended docker-compose file
This avoids errors, while creating the MySQL functions for the natural sort: "1419 You do not have the SUPER privilege an
  d binary logging is enabled"
2024-09-08 19:46:55 +02:00
Jan Böhmer
8c8b44baef Use debian bookworm, PHP 8.2 and node 20 for the docker image by default 2024-09-08 19:40:43 +02:00
Jan Böhmer
7366a33fe5 Apply the PHP_VERSION arg also to the partdb-entrypoint during build, to make it really version independent 2024-09-08 19:40:19 +02:00
Jan Böhmer
ad02d7e525
New Crowdin updates (#692)
* New translations messages.en.xlf (English)

* New translations validators.en.xlf (English)

* New translations security.en.xlf (English)

* New translations validators.en.xlf (Italian)
2024-09-08 19:14:02 +02:00
David Girón
b5a0189f29
feat(docker): Refactor Dockerfile (#683)
* reorder nodejs/yarn install, separate packages per line

* reduce run actions and reorganize commands

* simplify file creation, copy in one layer only

* fix lint LegacyKeyValueFormat

* arg php_version to run different version

* reorder copy from generated config

* update dockerfile-frankenphp
2024-09-08 19:13:13 +02:00
Jan Böhmer
756152dd68 Bumped to version 1.13.3 2024-08-24 15:58:46 +02:00
Jan Böhmer
173a8ee680 Improved assymmetric padding in datatables footer 2024-08-24 15:55:45 +02:00
Jan Böhmer
b99777cde1 Return a 404 message, instead of creating an 500 Runtime exception, when a file associated with an attachment is not existing.
This fails more gracefully, and do not pollute log files.
2024-08-24 15:49:45 +02:00
Jan Böhmer
8193e7a68e Allow to show attachment IDs in attachment table 2024-08-24 15:48:50 +02:00
Jan Böhmer
f18c024daa Remove -> prefix if no element is selected yet 2024-08-24 15:35:30 +02:00
Jan Böhmer
f6577a8f33 Allow to create sub elements for existing elements, by typing "->"
This fixes issue #666 and #560
2024-08-24 15:31:44 +02:00
Jan Böhmer
7fc3153dde Fixed filter logic for exclusion of entities. Before parts with null values as property value were wrongly not shown
This fixes  issue #658
2024-08-23 22:58:04 +02:00
Jan Böhmer
5231dbd6e7 Remove project path in twig label error messages to prevent information leakage 2024-08-23 22:28:29 +02:00
Jan Böhmer
77671550a7 Fail gracefully, when an exception occurs during rendering of the example labels for label profiles
This fixes issue #671
2024-08-23 22:15:29 +02:00
Jan Böhmer
e231404128 Load HTMLExtension in SandboxedTwig, so that the data_uri filter can be used in twig labels
This fixes issue #665
2024-08-23 22:06:37 +02:00
Jan Böhmer
6650e2da3d Updated dependencies 2024-08-23 21:57:37 +02:00
frank-f
fd521acaa4
Update LCSCProvider field for real datasheet URL (#670) 2024-08-21 17:35:55 +02:00
Jan Böhmer
a169623866 Bump version to 1.13.2 2024-07-28 23:20:47 +02:00
Jan Böhmer
21c3c45150 Introduced a custom ExponentialNumberType for parameter values
This type shows small values in exponential notation instead of rounding it to zero.
2024-07-28 23:18:36 +02:00
Jan Böhmer
1aee0a91c0 Workaround symfonys issue with NumberType and negative exponential e-notation number
This fixes issue #649
2024-07-28 22:52:44 +02:00
Jan Böhmer
27a28d4adc Fixed the NatSortKey function where regex characters were improperly escaped in the old migration
This caused a "range out of order in character class" error and propably affected the functionality of the sort function
2024-07-28 17:08:55 +02:00
Jan Böhmer
d6ff22fc44 Show in server info page which natural sorting method is used
This should ease debugging
2024-07-28 14:13:34 +02:00
Jan Böhmer
5ede61118c Use paragonie/sodium_compat v1 as v2 do not support 32-bit PHP anymore 2024-07-28 13:31:27 +02:00
Jan Böhmer
228549ff51 Include pgsql extensions and client in docker images 2024-07-28 13:12:42 +02:00
Jan Böhmer
1ec5cbc301 Merge remote-tracking branch 'origin/l10n_master' 2024-07-28 13:02:58 +02:00
Jan Böhmer
3011cb8fae Updated dependencies 2024-07-28 13:02:39 +02:00
Jan Böhmer
ff78c3c9a7 New translations security.en.xlf (Vietnamese) 2024-07-10 03:32:31 +02:00
Jan Böhmer
d5980b7620 New translations messages.en.xlf (Spanish) 2024-07-05 11:30:31 +02:00
Jan Böhmer
a8e1171108 Bumped to version 1.13.1 2024-06-23 21:14:00 +02:00
Jan Böhmer
19e5d302f4 Fixed detection on mariadb natsort capabilities on distributions which use the 5.5.5- prefix for MariaDB version 2024-06-23 21:13:37 +02:00
Jan Böhmer
22e2480feb Bumped version to 1.13.0 2024-06-23 19:06:29 +02:00
Jan Böhmer
88ef1788ac Add small time differences to the datafixtures log entries, to get a defined order 2024-06-23 18:03:54 +02:00
Jan Böhmer
a54ce939ca Merge branch 'timetravel-tests' 2024-06-23 17:45:17 +02:00
Jan Böhmer
528d0c7a26 Added tests for TimeTravel service and fixed applyEntry function for embeddded fields 2024-06-23 17:43:10 +02:00
Jan Böhmer
c68a647e75 Added missing tests for LogEntryRepository 2024-06-23 16:07:42 +02:00
Jan Böhmer
e0e4b74b6f Fixed getElementExistedAtTimestamp function() 2024-06-23 15:46:10 +02:00
Jan Böhmer
204178740c Started adding basic tests for LogEntryRepository 2024-06-23 15:41:57 +02:00
Jan Böhmer
8fdf37261d Fixed phpstan issues 2024-06-23 00:42:49 +02:00
Jan Böhmer
06c8e584a4 Allow to import attachments and parameters via entity import
This fixes issue #363
2024-06-23 00:41:25 +02:00
Jan Böhmer
bbf7222a6a Improved EntityExporter to handle recursive exports 2024-06-23 00:11:38 +02:00
Jan Böhmer
f6e955b487 Hide mouser parts with an invalid product ID to avoid the issue described in #616 2024-06-22 23:37:50 +02:00
Jan Böhmer
32a72bfd23 Defocus show/hide sidbar button after clicking to close tooltip
Fixes issue #628
2024-06-22 23:08:51 +02:00
Jan Böhmer
25e0c22de9 Merge branch 'added-scan-button-to-navbar' 2024-06-22 23:04:06 +02:00
Jan Böhmer
2dd1843aac Merge branch 'master' into added-scan-button-to-navbar 2024-06-22 23:03:10 +02:00
Jan Böhmer
f3bf4ca838 New translations validators.en.xlf (English) 2024-06-22 23:02:49 +02:00
Jan Böhmer
b88e5e27d8 Fixed tests 2024-06-22 23:01:40 +02:00
Jan Böhmer
6f91ff1f28 Fixed --overwrite option of the backup command not working
This fixes issue #635
2024-06-22 22:59:16 +02:00
Jan Böhmer
b7b941e3a1 Fixed error handling of structural data import
This was the reason for the exception in #632
2024-06-22 22:55:15 +02:00
Jan Böhmer
64414fe105 Added missing validator.invalid_range translation 2024-06-22 20:00:16 +02:00
Jan Böhmer
701713e298 Fixed symfony UX translations when using a locale with subregion (e.g. en_US)
Fixes issue described in #563
2024-06-22 19:57:49 +02:00
Jan Böhmer
445229976f Allow locales like de_DE in removeLocaleFromPath function
Related to issue #563
2024-06-22 19:48:11 +02:00
Jan Böhmer
eb02404d49 Fixed typing of TextConstraint 2024-06-22 19:06:07 +02:00
Jan Böhmer
c780c0bd92 Fixed "__partLot already defined" error when using a between filter for amountSum on postgres 2024-06-22 19:03:30 +02:00
Jan Böhmer
8f631cae63 Split up NumberConstraint and DateTimeConstraint for better type enforcement 2024-06-22 18:53:26 +02:00
Jan Böhmer
07afff8db5 Updated yarn dependencies 2024-06-22 18:02:42 +02:00
Jan Böhmer
a4f440656a Fixed timetravel feature on postgresql 2024-06-22 17:55:54 +02:00
Jan Böhmer
235d572f8c Use DatetimeImmutable instead of DateTime wherever possible 2024-06-22 17:36:54 +02:00
Jan Böhmer
eebc373734 Merge branch 'rector' 2024-06-22 16:54:09 +02:00
Jan Böhmer
002d29a53e Fixed PHPstan issues 2024-06-22 16:53:59 +02:00
Jan Böhmer
5074e2beac Fixed phpunit tests 2024-06-22 00:44:59 +02:00
Jan Böhmer
d898ca736c Applied rector to remaining test files 2024-06-22 00:37:47 +02:00
Jan Böhmer
af325612aa Dont replace our test 'GET' strings with a class constant 2024-06-22 00:36:30 +02:00
Jan Böhmer
590c2c3b0a Excluded a few more rector rules 2024-06-22 00:34:49 +02:00
Jan Böhmer
20f32c7f12 Applied rector suggestions 2024-06-22 00:31:43 +02:00
Jan Böhmer
4106bcef5f Do not rename tableAction controller 2024-06-22 00:06:48 +02:00
Jan Böhmer
0e3b8a2a28 Do not replace our !== null checks with instanceof 2024-06-22 00:03:52 +02:00
Jan Böhmer
272608b4ec Ignore symfony generated files for rector 2024-06-22 00:00:59 +02:00
Jan Böhmer
7a389469b9 Updated rector 2024-06-21 23:51:44 +02:00
Jan Böhmer
9650969c94 Merge branch 'master' of https://github.com/Part-DB/Part-DB-symfony 2024-06-21 23:41:57 +02:00
Jan Böhmer
6821e668e4 Do not inject ObjectNormalizer into StructuralElementDenormalizer directly 2024-06-21 23:41:52 +02:00
Jan Böhmer
43a68b96ae Moved deprecated doctrine subscribers to doctrine event listeners 2024-06-21 23:41:22 +02:00
Jan Böhmer
1f6e3db09e Document natural sorting and the DATABASE_EMULATE_NATURAL_SORT option 2024-06-21 12:31:25 +02:00
Jan Böhmer
2fabcabcc0 Added documentation about the different DATABASE_URL formats for the database types 2024-06-21 11:58:09 +02:00
Jan Böhmer
22855b077d Improved "Choosing database" documentation page 2024-06-21 11:44:24 +02:00
Jan Böhmer
2cad7a67ea Updated requirements in README file and mention PostgreSQL support in features 2024-06-21 10:39:44 +02:00
Jan Böhmer
8ce93a028a Removed deprecated interface from SkippableItemNormalizer 2024-06-19 23:58:15 +02:00
Jan Böhmer
028307b63c Added some return typehints to functions who missed them 2024-06-19 23:56:08 +02:00
Jan Böhmer
7bd6cd7cec Merge remote-tracking branch 'origin/master' 2024-06-19 23:47:46 +02:00
Jan Böhmer
8c45a40f9e Explicitly configure some deprecated configuration options 2024-06-19 23:47:38 +02:00
dependabot[bot]
70c62dab77
Bump docker/build-push-action from 5 to 6 (#631)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-19 23:33:43 +02:00
Jan Böhmer
b4d8d31c2d partUnit column in part datatable now shows the correct data
This fixes issue #630
2024-06-19 23:28:53 +02:00
Jan Böhmer
bc15135f6b We are in development of 1.13 now 2024-06-18 23:44:28 +02:00
Jan Böhmer
16baccc2cb Upgraded rector to latest version 2024-06-18 23:33:53 +02:00
Jan Böhmer
bb2559edc1 Fixed PHPstan issue 2024-06-18 23:31:24 +02:00
Jan Böhmer
f6f736a91f Added amphp/http-client to support HTTP/2 connections, even if libcurl is not enabled 2024-06-18 23:25:40 +02:00
Jan Böhmer
9f477676e2 Removed psalm, as we only use phpstan 2024-06-18 23:24:54 +02:00
Jan Böhmer
6cba6ba52e Updated dependencies 2024-06-18 23:21:45 +02:00
Jan Böhmer
d29dbc9385 Merge branch 'postgres' 2024-06-18 23:17:27 +02:00
Jan Böhmer
cb01302ada Test the backup tool in github actions
This ensures that the tool works for all database types
2024-06-18 23:04:44 +02:00
Jan Böhmer
e3dfbf0e95 Support postgres in the backup command 2024-06-18 23:02:33 +02:00
Jan Böhmer
3f471d0c73 Natsort MPN column in part datatables 2024-06-18 22:34:29 +02:00
Jan Böhmer
4a706ab707 Do not natsort description fields as these can become very long 2024-06-18 22:34:13 +02:00
Jan Böhmer
4946a9ab0d Fixed SQL declaration of NatSortKey function
We do not need the delimiter declarations
2024-06-18 22:32:07 +02:00
Jan Böhmer
123372d93f Allow to emulate natural sort on mysql platforms 2024-06-18 21:42:00 +02:00
Jan Böhmer
272fe0516b Allow to emulate natural sorting on SQLite databases 2024-06-18 00:09:44 +02:00
Jan Böhmer
289c9126d0 Use Natural_SORT_KEY for natural sorting on MariaDB database which support that
This resolves issue #243 and #402
2024-06-17 23:29:38 +02:00
Jan Böhmer
0a482da93e Use postgres native array_position function instead of our FIELD function and pass it as array literal instead of variadic function
Otherwise we will run into errors, that we can not give more than 100 arguments to a function
2024-06-17 23:13:04 +02:00
Jan Böhmer
8bb8118d9f Use natural sorting for trees and others repository functions 2024-06-17 22:33:40 +02:00
Jan Böhmer
9db822eabd Use natural sorting for string datatables columns when using postgres
The natural sorting solution is quite portable, so this should be possible for other database types too later
2024-06-17 21:38:16 +02:00
Jan Böhmer
8a42dfa154 Use the FIELD function on postgres for order by field value 2024-06-17 21:20:23 +02:00
Jan Böhmer
d7a7e22e5a Fixed lessThanDesired Constraint for postgresql 2024-06-17 21:16:46 +02:00
Jan Böhmer
4f75e2641b Define a custom FIELD function to sort tables by list of ids without the emulation via string operations 2024-06-16 23:46:40 +02:00
Jan Böhmer
d3dcefb645 Fixed total amount and less than desired filter on postgresql 2024-06-16 23:26:57 +02:00
Jan Böhmer
6d1553e8d8 Fixed problem with datatable column sorting on postgresql 2024-06-16 22:52:15 +02:00
Jan Böhmer
740985d68f New translations security.en.xlf (Croatian) 2024-06-14 23:40:19 +02:00
Jan Böhmer
7ad2fab53d Fixed exception related that Datetimeimmutables were used were doctrine expected mutable ones
this prevented the saving of parts from info providers
2024-06-13 23:41:35 +02:00
Jan Böhmer
6e9b337b49 Fixed regex function for postgres 2024-06-13 23:18:25 +02:00
Jan Böhmer
c58ff5861d Replaced the non standard IFNULL function which postgres does not know with the COALSCE function 2024-06-13 23:01:53 +02:00
Jan Böhmer
33a5e70b70 Fixed phpunit tests for postgres 2024-06-13 22:19:17 +02:00
Jan Böhmer
07f1ce5822 Configure the postgres server to accept local connections without password 2024-06-13 00:00:51 +02:00
Jan Böhmer
d41996b365 Added SSH connection into test container for debugging 2024-06-12 23:33:05 +02:00
Jan Böhmer
d3c9b7eae1 Configure postgres to accept all connections without password for testing 2024-06-12 23:30:42 +02:00
Jan Böhmer
373a1ab0f4 Change the password of the postgres user 2024-06-12 23:24:37 +02:00
Jan Böhmer
58dd56a89f Supply a password for the postgres database connection 2024-06-12 23:16:24 +02:00
Jan Böhmer
d7eadd9294 Use the builtin postgres user already defined in the github image
It hopefully requires no password
2024-06-12 23:13:20 +02:00
Jan Böhmer
853e29dd83 Removed sqlite database creation
This is not possible anymore for the sqlite driver and is unnesecarry as it is automatically created on migration
2024-06-10 23:47:28 +02:00
Jan Böhmer
0c1c46c045 Fixed MySQL version number
The 8.0 was to short to be detected as newer than 8.0.0. We need to specify the bugfix release to get proper results
2024-06-10 23:46:33 +02:00
Jan Böhmer
be97ea08a2 Specify a version number on the MySQL database URL, so that doctrine does not need to start a connection while cache clearing 2024-06-10 23:35:13 +02:00
Jan Böhmer
1c8b81ca2c Run a SSH session in the github actions container for better debugging 2024-06-10 23:05:16 +02:00
Jan Böhmer
8266f230d7 For debugging disable fast failing of phpunit tests 2024-06-10 22:58:54 +02:00
Jan Böhmer
0b53542716 Added postgres to github tests actions 2024-06-10 22:52:11 +02:00
Jan Böhmer
eab1c7096c Use the postgres migration code generated by the new doctrine orm versions
This now uses IDENTITY columns for ID columns, which makes their behavior more similar to the behavior of MySQL and SQLite
2024-06-10 22:38:46 +02:00
Jan Böhmer
8ee3aaf4f4 Added Sqlite migrations required by new doctrine/orm version and fixed migration duplication for sqlite 2024-06-10 21:54:15 +02:00
Jan Böhmer
427b8659c9 Added MySQL migrations required by the doctrine upgrades
The new ORM versions, do not have anymore column comments, so these got removed
2024-06-10 21:43:25 +02:00
Jan Böhmer
3c3af824cf Merge branch 'doctrine-upgrade' into postgres 2024-06-10 21:26:00 +02:00
Jan Böhmer
d40ce470d3 Fixed some invalid class constant use in ResetAutoIncrementORMPurger 2024-06-10 21:25:51 +02:00
Jan Böhmer
07c7f07c35 Removed usage of partial flush which is not supported with the recent doctrine ORM version 2024-06-10 21:25:23 +02:00
Jan Böhmer
fe732ecf45 Fixed minor inspection issue 2024-06-10 21:16:46 +02:00
Jan Böhmer
971bb92a8c Fixed error caused by ArrayType fields which is required by the webauthn bundle but was removed in doctrine/orm 4.0
We simple forward port the ArrayType class from orm 3.8 to fix this error
2024-06-10 21:11:11 +02:00
Jan Böhmer
777f6ba738 Fixed error caused by immutable datetime passed to mutable datetime doctrine type 2024-06-10 20:47:06 +02:00
Jan Böhmer
4d927c5870 Use a better exception format for UTCDateTimeType 2024-06-10 20:17:57 +02:00
Jan Böhmer
1830e9da3d Fixed errors caused by change on how setParameters on query builder works
We replaced them by individual setParameter calls as this seems to be the easiest way to fix this
2024-06-10 00:08:53 +02:00
Jan Böhmer
5eb29746af Revert "Fixed errors that query builder setParameters now expects an ArrayCollection instead of an array"
This reverts commit 78671b0bfe.
2024-06-10 00:04:22 +02:00
Jan Böhmer
afb816cc41 Use the getReference function in TimeTravel service instead of the removed getPartialReference()
This is probably the better choice anyway
2024-06-09 23:58:03 +02:00
Jan Böhmer
bd640c19a4 Fixed type of token object is now a property instead of array value in Field2 2024-06-09 23:55:12 +02:00
Jan Böhmer
0d445b6a21 Fixed some minor inspection issues caused by the doctrine upgrades 2024-06-09 23:51:41 +02:00
Jan Böhmer
78671b0bfe Fixed errors that query builder setParameters now expects an ArrayCollection instead of an array 2024-06-09 23:51:11 +02:00
Jan Böhmer
60325e797d Fixed the use of the removed ClassMetadataInfo constants 2024-06-09 23:45:22 +02:00
Jan Böhmer
7d9be5ae76 Fixed wrong casing of SQLitePlatform 2024-06-09 23:36:00 +02:00
Jan Böhmer
777bfed813 Fixed doctrine middlewares
We now look directly onto the driver arguments instead of retrieving a database platform, for which we would need the database version.

As we modify driver specific options there, this might be the better choice anyway
2024-06-09 23:28:46 +02:00
Jan Böhmer
43ca543651 Fixed wrong signature of UTCDateTimeType 2024-06-09 23:15:14 +02:00
Jan Böhmer
205d5f8f58 Updated doctrine dbal and orm to next major version 2024-06-09 23:11:08 +02:00
RaptorDE
ee37852a72
added scan button navbar in mobile view 2024-06-09 13:02:49 +02:00
Jan Böhmer
dc14b58d73 Fixed DBInfoHelper compatibility with postgres 2024-06-09 00:46:23 +02:00
Jan Böhmer
a88a2e04cf Added the required initial users and groups for the database migration 2024-06-09 00:11:58 +02:00
Jan Böhmer
c620beb965 Merge branch 'master' into postgres 2024-06-08 19:49:07 +02:00
Jan Böhmer
92cb9f70a1 Bumped version to 1.12.1 2024-06-08 19:23:22 +02:00
Jan Böhmer
b2059b6910 Use outline-secondary style for the sidebar toggle button
This makes the button a bit more subtle and fixes issue #620 that the button were not visible in darkmode
2024-06-07 23:28:59 +02:00
Jan Böhmer
0b21effb13
New Crowdin updates (#606)
* New translations security.en.xlf (Dutch)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (English)
2024-06-07 22:49:18 +02:00
Jan Böhmer
02acafc348 Added postgres to the AbstractMultiPlatformMigration class 2024-06-06 23:11:11 +02:00
Jan Böhmer
d202ecf06f Added support of the custom TinyInt type for postgres 2024-06-06 22:38:33 +02:00
Jan Böhmer
5402d7bedb Increased phpunit memory limit to 1G
This hopefully fixed the failing github action
2024-06-06 20:04:50 +02:00
Jan Böhmer
39247f1ece Updated dompdf to 3.0 2024-06-06 19:44:26 +02:00
Jan Böhmer
55b824d777 Updated dependencies 2024-06-06 19:40:49 +02:00
SapuSeven
4eb223c401
Update LCSC API URL (#612) 2024-05-12 18:21:23 +02:00
Jan Böhmer
4a99a5e68f Bumped version to 1.12.0 2024-04-29 00:11:47 +02:00
Jan Böhmer
a96c10a13e Made KiCAD bom import independent from the language of the header rows
This fixes issue #604
2024-04-29 00:09:10 +02:00
Jan Böhmer
b3b2782f45 Fixed wrong url to KiCad API in user settings if using a prefixed reverse proxy
This fixes issue #587
2024-04-28 23:54:52 +02:00
Jan Böhmer
1bf9f25ded Fixed problem with kicad footprint autcomplete when using a reverse proxy in a prefixed path
This fixes issue #587
2024-04-28 23:27:15 +02:00
Jan Böhmer
75df0198fc Fixed tests 2024-04-28 23:12:10 +02:00
Jan Böhmer
b70d74ae4b Perform the duplicate check of parameter names already on initial creation
This fixes issue #568
2024-04-28 19:38:39 +02:00
Jan Böhmer
dfe4568991 Use a better translation for the "Is not" filter when children should also be excluded 2024-04-28 18:19:47 +02:00
Jan Böhmer
3fff354833 Fixed type conversion error in ProjectBuildType
This seemed only to occur, if the form field was disabled. This fixes issue #601
2024-04-28 18:09:17 +02:00
Jan Böhmer
db72dac243 Save the date when a webauthn key was used last time for 2 factor authentication and show it in user settings 2024-04-28 17:50:19 +02:00
Jan Böhmer
b886c0aeae Removed a now unecessary workaround in the WebatuthnKey entity 2024-04-28 00:43:36 +02:00
Jan Böhmer
91b7f2752f Added the database fields required by the new webauthn bundle versions 2024-04-28 00:31:38 +02:00
Jan Böhmer
f4a67c0224 Merge remote-tracking branch 'origin/l10n_master' 2024-04-27 23:57:44 +02:00
Jan Böhmer
c6ac0302ed Updated dependencies 2024-04-27 23:57:31 +02:00
Jan Böhmer
39f1960135 New translations messages.en.xlf (Chinese Simplified) 2024-04-27 21:30:19 +02:00
Jan Böhmer
ffb659b228 New translations validators.en.xlf (Chinese Simplified) 2024-04-27 20:30:18 +02:00
Jan Böhmer
e93148304e New translations messages.en.xlf (English) 2024-04-26 17:22:47 +02:00
Jan Böhmer
34940dd950
New translations messages.en.xlf (Russian) (#602) 2024-04-22 16:06:13 +02:00
Morgan Diepart
eda0e2fe26
Update Measurement Unit concept (#596) 2024-04-16 12:15:45 +02:00
Jan Böhmer
4aecfaf4e0 Fixed typo in DATABASE_URL env in debian installation guide
Fixes issue #592
2024-04-15 23:42:44 +02:00
Jan Böhmer
767de1dd65 Updated dependencies 2024-04-15 23:42:08 +02:00
frank-f
7a6b045030
Improve parameter parsing (#583)
* DigiKey: Skip empty values

* Move improved range detection from LCSCProvider to ParameterDTO class
Improve numeric value detection by moving extra info to value_text

* ParameterDTO: Add micro unit prefix

* Bring $value_text2 to a defined state

* ParameterDTO: Don't overwrite $unit if it's not empty

* ParameterDTO: Don't overwrite $unit if it's not empty

* Correct some inaccuacies in comments

* Added tests and fixed certain edge cases in parsing parameters

* Added more tests for parameter parsing

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-04-15 22:33:27 +02:00
Jan Böhmer
fdf64f9e9a
New Crowdin updates (#570)
* New translations security.en.xlf (Polish)

* New translations validators.en.xlf (Polish)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Russian)

* New translations validators.en.xlf (Russian)

* New translations messages.en.xlf (Italian)
2024-04-15 21:33:58 +02:00
Henning Kleen
835b954140
fix import of parts containing shopping information (#594) 2024-04-15 21:32:04 +02:00
frank-f
9770ffa46b
LCSC: Follow first 'pdfUrl' link to get real datasheet URL (#582)
* Follow first 'pdfUrl' link to get real datasheet URL

* Fix @param

* Fix @param

* Remove User-Agent header
It's not needed - LCSC was just having some server troubles over the weekend

* Added comment explaining the json_decode in getRealDatasheetUrl

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2024-04-03 12:38:20 +02:00
Jan Böhmer
da75cca97c Fixed missing/wrong group attributes on Parameters
This fixes issue #584
2024-04-02 22:41:30 +02:00
Jan Böhmer
d767e7472d Updated dependencies 2024-04-02 22:19:58 +02:00
Jan Böhmer
9b8d4c518a Updated dependencies 2024-03-23 20:45:09 +01:00
Jan Böhmer
96f5b2beab Bumped version to 1.11.3 2024-03-16 18:55:21 +01:00
Jan Böhmer
b9dc349d9a Merge remote-tracking branch 'origin/l10n_master' 2024-03-16 18:50:49 +01:00
Jan Böhmer
07d6e5c1d6 Updated dependencies 2024-03-16 18:45:06 +01:00
Jan Böhmer
488c8c5526 KiCAD API: Inherit the reference prefix from category if it was defined 2024-03-16 18:31:35 +01:00
Jan Böhmer
fb0abf3c1a New translations messages.en.xlf (English) 2024-03-16 01:20:29 +01:00
Jan Böhmer
a954712197
New Crowdin updates (#567)
* New translations messages.en.xlf (Czech)

* New translations validators.en.xlf (Czech)
2024-03-14 15:08:17 +01:00
au-ee
7c258d231b
install sudo to be able to do db migrations from the container's console (#566) 2024-03-12 11:03:33 +01:00
Jan Böhmer
c4bc1a4c51 Merge branch 'pr-564' 2024-03-11 22:24:26 +01:00
Jan Böhmer
0d9c86fcd3 Added brackets around if body 2024-03-11 22:24:21 +01:00
Frank Fenor
5454bb5b07
Avoid throwing an exception if Content-Disposition header doesn't exist or contains illegal things 2024-03-11 19:16:01 +01:00
Jan Böhmer
04d5cd741b Merge remote-tracking branch 'origin/frankenphp' 2024-03-11 11:04:45 +01:00
Jan Böhmer
3191028f74 Added an github action to build the frankenPHP docker image 2024-03-10 23:44:34 +01:00
Jan Böhmer
49f82127aa Do not copy the content of public/media to docker image 2024-03-10 20:49:33 +01:00
Jan Böhmer
28d86c8885 Show info about kernel runtime parameters on server info page 2024-03-10 20:32:43 +01:00
Jan Böhmer
1548b9f8c8 FrankenPHP dockerfile is now working 2024-03-10 20:22:47 +01:00
Jan Böhmer
7271c8c6f1 Restructured frankenphp structure 2024-03-10 19:50:21 +01:00
Jan Böhmer
aa0ec15e67 Allow to override the root user CLI check with COMPOSER_ALLOW_SUPERUSER 2024-03-10 19:30:14 +01:00
Jan Böhmer
7f78822a12 Added frankenphp runtime for symfony 2024-03-10 18:49:54 +01:00
Jan Böhmer
f8e92f98d0 Updated the dockerignore from the values of frankenphp 2024-03-10 18:09:56 +01:00
Jan Böhmer
8d816ab1ee Updated recipes to update docker related files 2024-03-10 18:08:22 +01:00
Jan Böhmer
19967bd42e Added files from frankenphp symfony skeleton 2024-03-10 18:05:21 +01:00
Jan Böhmer
d3a819613f Bumped version to 1.11.2 2024-03-10 01:40:04 +01:00
Jan Böhmer
e33f6a20bb Merge remote-tracking branch 'origin/l10n_master' 2024-03-10 01:39:21 +01:00
Jan Böhmer
02b736c92f New translations messages.en.xlf (German) 2024-03-10 01:31:46 +01:00
Jan Böhmer
e339c79c5a New translations messages.en.xlf (English) 2024-03-10 01:20:25 +01:00
Jan Böhmer
945fb9384e Remove preview image attachment during if the attachment got deleted during cloning
This fixes issue #559
2024-03-10 01:19:52 +01:00
Jan Böhmer
a792a140f7 Show a success flash message, after mass creation submit 2024-03-10 00:55:22 +01:00
Jan Böhmer
ed4728fdb1 Correcty handle already existing elements in mass creation
This fixes issue #543
2024-03-10 00:51:37 +01:00
Jan Böhmer
92a8107b9d Bumped to 1.11.2-dev 2024-03-10 00:20:05 +01:00
Jan Böhmer
1af8558cf4 Use position: fixed for footer in error pages to get better positioning in the popup details fram 2024-03-10 00:19:47 +01:00
Jan Böhmer
b781150ee9 Show the error page in a pop up in prod environment too 2024-03-10 00:12:54 +01:00
Jan Böhmer
59c4248efe Strip HTML tags from more LCSC fields
This should hopefully fix issue #553
2024-03-09 23:09:49 +01:00
Jan Böhmer
a5b101a0ea Fixed error, when retrieving prices in USD from LCSC
This fixes issue #552. It seems that LCSC changed their currency symbol for US-Dollar
2024-03-09 22:54:12 +01:00
Jan Böhmer
03854aa207 Updated dependencies 2024-03-09 21:42:43 +01:00
Jan Böhmer
c989be2719 Retrieve the part mass from mouser API if available 2024-03-09 21:34:05 +01:00
Jan Böhmer
d22e3ddcd7 New translations validators.en.xlf (German) 2024-03-09 21:20:19 +01:00
Jan Böhmer
040168b3d4 New translations validators.en.xlf (Italian) 2024-03-09 08:20:18 +01:00
Jan Böhmer
ac5c5555d5 New translations validators.en.xlf (English) 2024-03-09 00:30:36 +01:00
Jan Böhmer
1e6065f732 Show 64-bit recommendation in check requirements CLI and server info page 2024-03-09 00:23:18 +01:00
Jan Böhmer
cb7be460d7 Add 64-bit recommendation to installation docs 2024-03-09 00:13:40 +01:00
Jan Böhmer
206bcebdb7 Forbid users to select dates after 2038 on 32-bit systems to prevent errors caused by Year2038 bug
See discussion #548 and #549
2024-03-09 00:11:00 +01:00
Jan Böhmer
18c697f472 Document the available Part-DB specific filters and functions in twig mode 2024-03-07 13:23:58 +01:00
Jan Böhmer
4adb9a5266 Document available fields in twig mode
Related to #546
2024-03-07 13:11:17 +01:00
Jan Böhmer
a72a7ed1fc Explain the advantages of the twig mode 2024-03-07 12:46:30 +01:00
Jan Böhmer
838997b959 Updated the list of allowed object methods in twig label mode 2024-03-06 21:39:49 +01:00
Jan Böhmer
5736816b2b Document on how to use the placeholder function and placeholder twig filter in label twig mode
Related with #546
2024-03-06 21:22:47 +01:00
Jan Böhmer
38b5a84c4f Added some more useful variables to the twig label generator 2024-03-06 21:11:31 +01:00
Jan Böhmer
dff1ef04bf Added placeholders filter to utilize the placeholders in twig mode
Fixes #546
2024-03-06 21:00:49 +01:00
Jan Böhmer
757201cafa Allow access of twig sandbox to a few more extensions and functions 2024-03-06 20:21:07 +01:00
Jan Böhmer
1da3225e1d Renamed SandboxedTwigProvider to SandboxedTwig Factory 2024-03-06 20:08:35 +01:00
Jan Böhmer
a2cd5652d2 Updated the list of tags, filters and functions which are allowed inside the sandboxed twig 2024-03-06 20:03:12 +01:00
Jan Böhmer
dc7c13479c Add proper length constraint validations to all string mapped ORM fields, so they show a nice validation error, instead of a 500 error
Fixes issue #544
2024-03-06 19:46:11 +01:00
Jan Böhmer
113e5b3bcd Escape not only the pathes of FileDTO objects returned by info providers but the preview image url too.
This fixes the second issue in #521
2024-03-05 22:52:27 +01:00
Jan Böhmer
925f5c0ce0 Fixed phpstan bug 2024-03-04 22:42:24 +01:00
Jan Böhmer
0c53f5e186 Bumped to version 1.11.1 2024-03-04 22:38:43 +01:00
Jan Böhmer
2bcbe1d0be Made mouser price info parsing more flexible
Austrian mouser returned some other formatted string, which caused problems on the old method. This fixes issue #540
2024-03-04 22:38:15 +01:00
Jan Böhmer
0e68f0783f Assume that a mouser part is active, if mouser has parts instock even if it is marked as "new part"
Related to #540
2024-03-04 22:18:35 +01:00
Jan Böhmer
91e8711fdf Fixed problems with dynamically adding structural entities, when the arrows had spaces around them
Related to #538
2024-03-04 22:10:28 +01:00
Jan Böhmer
cf39e1f259 Do not split up pasted input on structrual entity selectors. This caused a part of the string to get split/lost
Fixes issue #538
2024-03-04 21:51:26 +01:00
Jan Böhmer
0cd631774b Fixed compatibility error with webauthn library which prevented 2FA via webauthn 2024-03-04 21:20:57 +01:00
Jan Böhmer
df53cf2540 Pass LCSC related env from the docker container to Part-DB
This fixes issue #539
2024-03-04 20:44:49 +01:00
Jan Böhmer
b734fc09f3 Release of version 1.11.0 2024-03-03 23:16:52 +01:00
Jan Böhmer
1fe5c56d02 Merge remote-tracking branch 'origin/l10n_master' 2024-03-03 23:08:10 +01:00
Jan Böhmer
af98842090 Added tests for the remaining API endpoints 2024-03-03 23:07:55 +01:00
Jan Böhmer
3d67ad870a Added tests for all API endpoints of Structural elements 2024-03-03 21:52:26 +01:00
Jan Böhmer
7b5ae70de3 Added tests for the Attachments API endpoint 2024-03-03 21:02:15 +01:00
Jan Böhmer
18c80f6b64 Use the route attribute from the correct namespace 2024-03-03 20:37:33 +01:00
Jan Böhmer
d49bb1f4b5 Removed unused import statements 2024-03-03 20:34:36 +01:00
Jan Böhmer
87533b6031 Fixed further inspection issues 2024-03-03 20:33:24 +01:00
Jan Böhmer
33e36f3d2b Fixed issue with EntityImported that was caused by the changes to PartNormalizer
We now have a possibility to skip API Platforms serializer subsystem
2024-03-03 20:24:24 +01:00
Jan Böhmer
42e604245c Fixed some inspection issues 2024-03-03 19:57:31 +01:00
Jan Böhmer
33475dca66 Updated dependencies 2024-03-03 19:51:47 +01:00
Jan Böhmer
7a90d3f281 Rewrote PartNormalizer so that it does not use ObjectNormalizer directly 2024-03-03 19:28:44 +01:00
Jan Böhmer
e53da5ad06 Added documentation on how to upload files and download URLs through the API on attachments 2024-03-03 19:04:25 +01:00
Jan Böhmer
f5bbb8bdd6 Merge branch 'upload_overhaul' 2024-03-03 18:55:58 +01:00
Jan Böhmer
d5b07bbaa3 Added additional type hints 2024-03-03 18:55:50 +01:00
Jan Böhmer
3585b8a56a Adapter attachment upload forms to the new system 2024-03-03 18:52:06 +01:00
Jan Böhmer
0c33059c4e Allow to upload files to attachments by passing a base64 encoded file 2024-03-03 18:40:35 +01:00
Jan Böhmer
0824e11570 Fixed infinite loop during deserialization on attachment PATCH operations 2024-03-03 17:58:25 +01:00
Jan Böhmer
0c4f5bcb3a New translations messages.en.xlf (German) 2024-03-03 16:50:19 +01:00
Jan Böhmer
aad8dcbadf New translations messages.en.xlf (Italian) 2024-03-03 11:03:22 +01:00
Jan Böhmer
193d5c8663 New translations messages.en.xlf (Czech) 2024-03-03 10:03:25 +01:00
Jan Böhmer
3734541743 Describe the new way to create attachments and parameters via API 2024-03-03 00:49:44 +01:00
Jan Böhmer
f3bea68011 Automatically detect the discriminator type of attachments and parameters based on the chosen element IRI
Related to issue #502
2024-03-02 23:15:00 +01:00
Jan Böhmer
e843286ea7 Allow to create parameters via the API 2024-03-02 21:49:16 +01:00
Jan Böhmer
e3d2012809 Use a own discriminator map for the Attachment API Platform discriminator 2024-03-02 21:45:16 +01:00
Jan Böhmer
ce768764cc Allow to create Attachments for all entity types using the API
This fixes issue #502
2024-03-02 21:39:30 +01:00
Jan Böhmer
16b3d58242 Implemented basic discriminator map for Attachment API access. Now we can properly create part attachments using a POST operation 2024-03-02 21:21:16 +01:00
Jan Böhmer
fad8f26eaa Added additional projects related filters to part table views 2024-03-02 19:18:55 +01:00
Jan Böhmer
04d1e84596 Added a filter to filter for parts which are used in a specific project
Related to issue #516
2024-03-02 19:00:30 +01:00
Jan Böhmer
934acca934 Added an column to part table view to show which projects a part uses.
Fixes issue #516
2024-03-02 18:48:31 +01:00
Jan Böhmer
639c98237a New translations messages.en.xlf (English) 2024-03-02 18:40:50 +01:00
Jan Böhmer
a6db67ab33 Fixed margins of the upload files button 2024-03-02 18:33:20 +01:00
Jan Böhmer
b92553f480 Added button to create attachments by uploading multiple files
This fixes issue #481
2024-03-02 18:26:50 +01:00
Jan Böhmer
f5d53dc305 Make the checkboxes of datatables look like regular bootstrap checkboxes 2024-03-02 01:28:15 +01:00
Jan Böhmer
b7ce91e2d8 Use the new system of datatables-select 2.0 where checkboxes are true checkbox fields 2024-03-02 01:04:28 +01:00
Jan Böhmer
4295141fb6 Updated dependencies 2024-03-01 21:42:42 +01:00
Jan Böhmer
973709c2f4 Updated dependencies 2024-02-29 23:46:39 +01:00
Jan Böhmer
a72a61091a Only add the amountSum select for part tables if it is really required 2024-02-29 23:35:05 +01:00
Jan Böhmer
c635637c00 Fixed problem that tables could not be sorted by manufacturers, categories, etc. 2024-02-29 23:13:17 +01:00
Jan Böhmer
77a5cadf51 Merge branch 'quicksearch' 2024-02-29 23:04:42 +01:00
Jan Böhmer
e0ef376cf0 Fixed various problems with the quicksearch 2024-02-29 23:00:21 +01:00
Jan Böhmer
04aeab7ea6 Renamed the quicksearch controller 2024-02-29 22:50:26 +01:00
Jan Böhmer
0dea26f67d Do not allow search if query is empty 2024-02-29 22:48:07 +01:00
Jan Böhmer
1815162907 Added a search bar to homepage 2024-02-29 22:46:19 +01:00
Jan Böhmer
e00988047c Added highlighting to search results 2024-02-29 22:20:30 +01:00
Jan Böhmer
faadd8e9a4 Improved layout for autocomplete dropdown 2024-02-29 21:53:28 +01:00
Jan Böhmer
409dcce3c7 Use correct translations for livesearch field in navbar 2024-02-29 20:39:27 +01:00
Jan Böhmer
746ba398a9 Fixed missing dropdown after some link navigations 2024-02-28 22:08:32 +01:00
Jan Böhmer
faa3bea3ab Allow to navigate to dropdown entries by keyboard 2024-02-28 22:06:54 +01:00
Jan Böhmer
f70f6c39ce Fixed error that algolia autocomplete input appeared multiple times after a link was clicked 2024-02-28 22:00:12 +01:00
Jan Böhmer
25a8642749 Make algolia autocomplete headers blue in bootstrap theme 2024-02-28 21:41:45 +01:00
Jan Böhmer
41e45599d4 Use a modified theme for algolia/autocomplete, which plays better with bootstrap 2024-02-28 21:38:11 +01:00
Jan Böhmer
293afc3998
New Crowdin updates (#532)
* New translations messages.en.xlf (Chinese Simplified)

* New translations messages.en.xlf (Chinese Simplified)
2024-02-28 13:00:59 +01:00
Jan Böhmer
c662dcfcd9 Started to make the autocomplete theme more bootstrap like 2024-02-27 23:39:49 +01:00
Jan Böhmer
e16aa31ddf Fixed z-index of autocomplete dropdown 2024-02-27 23:05:24 +01:00
Jan Böhmer
c87f809d12 Added header to part livesearch dropdown part results 2024-02-27 23:02:05 +01:00
Jan Böhmer
a3dcd1a0a8 Added recent searches to search 2024-02-27 00:39:38 +01:00
Jan Böhmer
4398b8698c Set proper darkmode attribute for algolia autocomplete 2024-02-27 00:33:48 +01:00
Jan Böhmer
18eb0467ee Integrated algolia autocomplete search into navbar 2024-02-27 00:28:17 +01:00
Jan Böhmer
60942c8254 Added very basic livesearch feauture using algolia autocomplete 2024-02-27 00:08:21 +01:00
Jan Böhmer
c7fac06b65 Updated dependencies 2024-02-25 19:44:34 +01:00
Jan Böhmer
2e5b2c8b7d Removed amountSum subquery from the detail query, as its result is not used anywhere 2024-02-25 01:46:35 +01:00
Jan Böhmer
fbd095ab50 Only add the joins to the parts table filter query if they are really required
This should improve the performance of the queries slightly
2024-02-25 01:40:25 +01:00
Jan Böhmer
b176cb1ae1 Use a much faster query to retrieve the total number of rows in datatables
This should increase performance on part tables
2024-02-25 00:58:26 +01:00
Jan Böhmer
2b65926865 Cache the sidebar trees to save some database calls 2024-02-25 00:48:15 +01:00
Jan Böhmer
a5d184baef Use rawurlencode instead of urlencode to sanatize URL-unsafe characters returned by the info providers. 2024-02-24 23:58:27 +01:00
Jan Böhmer
12e9497ccf Sanatize remaining invalid URL characters somehow returned by InfoProviders
This fixes issue #521
2024-02-24 23:55:31 +01:00
Jan Böhmer
4b7d200aa2 Retrieve category info from LCSC 2024-02-24 23:32:50 +01:00
Jan Böhmer
e937432d1e Fixed phpstan issue 2024-02-24 23:23:46 +01:00
Jan Böhmer
e1f1d10833 Added test for change on ParamterDTO done by PR #530 2024-02-24 22:51:02 +01:00
Jan Böhmer
05ec7ab665 Merge branch 'master' of https://github.com/Part-DB/Part-DB-symfony 2024-02-24 22:49:05 +01:00
Jan Böhmer
dbd841a723 Updated dependencies 2024-02-24 22:48:52 +01:00
frank-f
e8bc93f67a
Fix RegEx to handle negative values and Ohms without prefix (#530)
* Fix RegEx to include negative values

* Update RegEx to handle Ω without prefix

* Update RegEx to include %

* Handle plus/minus values as range

* Fix copy&paste error

* Change minimum value to negative

* Escape decimal point and add slash to valid unit characters to be able to pick up for example "ppm/°C"

* Skip empty values
2024-02-24 22:48:38 +01:00
Jan Böhmer
0d6ab793ce Fixed typos in README.md 2024-02-23 14:59:28 +01:00
Jan Böhmer
eab4d6f600 Added documentation about LCSC provider 2024-02-23 14:55:56 +01:00
Jan Böhmer
861c0174df Fixed more typos and grammar issues in docs 2024-02-23 14:26:17 +01:00
Jan Böhmer
5d68922f2e Fixed some typos and grammar issues in documentation 2024-02-23 13:56:23 +01:00
Cody Jacob
20ee16e3c0
Update eda_integration.md (#528)
spelling mistakes.
--grammerly was used
2024-02-23 13:13:15 +01:00
Jan Böhmer
20be83c345 Allow to configure the currency to get prices in for the LCSCProvider 2024-02-22 23:57:57 +01:00
Jan Böhmer
015b69e601 Merge branch 'lcsc-master' 2024-02-22 23:33:46 +01:00
Jan Böhmer
95ef97fcc2 Added possibility to enable/disable the LCSC provider 2024-02-22 23:32:12 +01:00
Jan Böhmer
d600cb4b9a Improved parsing of parameters. Values with unit and ranges get now properly parsed into the Part-DB structures 2024-02-22 23:22:52 +01:00
Jan Böhmer
0bbfaf9893 Improved typing and formatting of LCSC provider slightly 2024-02-22 22:41:09 +01:00
Nexrem
e3e562a154 Add LCSC Info Provider using their public API 2024-02-22 15:32:33 +01:00
Jan Böhmer
49034fabf2 Added phpstan template annotations to Voters to fix phpstan issues 2024-02-19 00:01:16 +01:00
Jan Böhmer
e9d03a0c95 Fixed "Loading..." message on datatables with no content 2024-02-18 20:31:31 +01:00
Jan Böhmer
d7e68605c9 Fixed row coloring issue with the new datatables 2024-02-18 20:10:52 +01:00
Jan Böhmer
51900b4b62 Fixed visual bugs introduced by the datatables upgrade 2024-02-18 19:58:13 +01:00
Jan Böhmer
67a1d06f37 Updated datatables version 2024-02-18 19:32:54 +01:00
Jan Böhmer
395af17d96 Updated dependencies 2024-02-18 19:25:52 +01:00
Jan Böhmer
88f4feaa81 Revert "Updated dependencies"
This reverts commit 4d4570701b.
2024-02-15 11:41:21 +01:00
Jan Böhmer
b6b2e44231 Dont prefetch settings page in navbar with turbos instaclick behavior as this page might not be accessible without additional authentication 2024-02-14 22:48:36 +01:00
Jan Böhmer
4d4570701b Updated dependencies 2024-02-14 22:46:01 +01:00
Jan Böhmer
178a825e93
New Crowdin updates (#517)
* New translations messages.en.xlf (Russian)

* New translations validators.en.xlf (Russian)

* New translations security.en.xlf (Russian)
2024-02-12 18:37:42 +01:00
Jan Böhmer
f67ce2b0a3 Updated unifont to latest version 2024-02-08 22:48:50 +01:00
Jan Böhmer
10918ccb0d Merge branch 'turbo-upgrade' 2024-02-08 22:20:50 +01:00
Jan Böhmer
698fadc00c Upgraded markedjs package 2024-02-08 22:20:44 +01:00
Jan Böhmer
b16760988d Updated CKEDITOR to version 41 2024-02-08 22:17:00 +01:00
Jan Böhmer
7e3e1e2705 Use new turbo morph features 2024-02-08 22:05:57 +01:00
Jan Böhmer
e5e039a1ca Use hotwired/turbo 8 2024-02-08 22:01:05 +01:00
Jan Böhmer
43d8c3c208 Bumped version to 1.10.7 2024-02-06 22:50:08 +01:00
Jan Böhmer
3cc1fb40f0 Fixed problem that no datastructures with an parent element could be created/edited via API
This fixes issue #512.
The error was introduced when trying to allow the modification of attachments/parameters throught the parent element. We need a seperate write scope to the element, or we end up with an infinite loop.
2024-02-06 22:42:25 +01:00
Jan Böhmer
fea8109789 Fixed permission denied error, when accessing a user info page 2024-02-06 22:21:43 +01:00
Jan Böhmer
ff2aafabbd Fixed permission denied error on log details page for BOMEntries 2024-02-06 22:18:09 +01:00
Jan Böhmer
e27b15691a Fixed permission denied error, when trying to access the log details page of a LabelProfile 2024-02-06 22:09:02 +01:00
Jan Böhmer
47ddcca065 Fixed exception on label profile admin, if the label profile had an preview attachment 2024-02-06 21:59:53 +01:00
Jan Böhmer
0a7a7c979c Fixed problem with navbar height if search button has two words text 2024-02-06 21:53:13 +01:00
Jan Böhmer
b37ae97673 Added chinese to navbar language picker 2024-02-06 21:50:07 +01:00
Jan Böhmer
fa9e571b41 Merge branch 'dependabot/github_actions/codecov/codecov-action-4' 2024-02-06 21:47:30 +01:00
Jan Böhmer
f0fd3d8c1d Updated dependencies 2024-02-06 21:47:18 +01:00
dependabot[bot]
a1bdfab80f
Bump codecov/codecov-action from 3 to 4 (#509)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-06 21:44:36 +01:00
Jan Böhmer
0d5b7a0711
New translations messages.en.xlf (Chinese Simplified) (#511) 2024-02-06 21:42:33 +01:00
Jan Böhmer
852107f7f6
New Crowdin updates (#510)
* New translations messages.en.xlf (Chinese Simplified)

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

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

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

* New translations security.en.xlf (Chinese Simplified)
2024-02-06 09:41:15 +01:00
dependabot[bot]
77b017381a
Bump codecov/codecov-action from 3 to 4
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-02-05 17:15:54 +00: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
a8d12c9c4c Updated dependencies 2024-02-03 00:40:37 +01:00
Jan Böhmer
3294ba5964 Mention czech and danish translation in README 2024-02-02 23:44:06 +01:00
Jan Böhmer
2bd3a6a745 Updated bs-treeview to 1.0.6 where the issue that child nodes of already expanded nodes dont get expanded on an select all
This fixes issue #506
2024-02-02 23:42:36 +01:00
Jan Böhmer
0d3c670f9d Release version 1.10.6 2024-01-29 21:30:18 +01:00
Jan Böhmer
998b3ed075 Fixed typo in german translation 2024-01-29 21:29:14 +01:00
Jan Böhmer
a390b1e2a0 Upgraded dependencies 2024-01-29 21:28:21 +01:00
Jan Böhmer
fb493cc837 Fixed export of entities, if their name contained slash or other reserved charcters 2024-01-29 21:25:30 +01:00
Jan Böhmer
2f17d5f3f5 Fixed problem that trying to request nl language version of a page caused an exception
If the translation files dont contain any content, they are seen as invalid and cause this error. Therefore delete it.
2024-01-29 21:12:01 +01:00
Jan Böhmer
3a2f3ce1cc Fix problem with cache key generation if the username contained an @ sign or any other special character
This fixes issue #504
2024-01-29 21:08:25 +01:00
Jan Böhmer
1b5eea4750 Register the unselect handler on turbo:load instead of visit, to avoid problems that the newly clicked treeview node gets unselected too. 2024-01-28 21:57:42 +01:00
Jan Böhmer
cb9e90ddc9 Load the link again when clicking a already selected treeview node, instead of just unselecting it 2024-01-28 21:48:32 +01:00
Jan Böhmer
03c7a71311 Release version 1.10.5 2024-01-28 21:20:05 +01:00
Jan Böhmer
e5b9ce9c25 Describe the creation of parameters/attachments workaround in API docs
Related to issue #502
2024-01-28 20:59:13 +01:00
Jan Böhmer
c8cde94ee3 Fixed problem that attachment API responses, did not contain an @id and @context attribute 2024-01-28 20:26:03 +01:00
Jan Böhmer
aad62f2599 Disable POST operations for Attachment and AbstractParameter groups for now, as they can not work properly
As they work on abstract classes, they can not be initialized directly currently and you need to create them via a PATCH operation on their owning elements.
2024-01-28 19:53:33 +01:00
Jan Böhmer
7ae0fad356 Allow to create attachments and parameters via PATCH operations on their owning elemens as direct POST operations are not possible yet
This partly fixes issue #502
2024-01-28 19:50:59 +01:00
Jan Böhmer
3548f12deb Added info on how to execute commands inside docker container to docs 2024-01-28 18:30:16 +01:00
Jan Böhmer
a161e3a520 Load the link again when clicking a already selected treeview node, instead of just unselecting it
This fixes the somehow unintuitive behavior described in issue #458
2024-01-27 22:22:07 +01:00
Jan Böhmer
8018e8687b Unselect a treeview node, if the referenced page changes
Related to issue #458
2024-01-27 21:12:21 +01:00
Jan Böhmer
e6ae73db00 Merge remote-tracking branch 'origin/l10n_master' 2024-01-27 20:33:31 +01:00
Jan Böhmer
d720cde693 Upgraded dependencies 2024-01-27 20:33:27 +01:00
Jan Böhmer
d111905ba0 Added hint to docs, that the mouser API dont provide all infos availble
See issue #503
2024-01-27 20:31:12 +01:00
Jan Böhmer
4b41e932d2 New translations messages.en.xlf (Czech) 2024-01-26 09:44:31 +01:00
Jan Böhmer
ee3ad403fb Fixed exception if no content type or accept header are given 2024-01-26 00:36:14 +01:00
Jan Böhmer
2a7c131786 New translations messages.en.xlf (German) 2024-01-26 00:28:58 +01:00
Jan Böhmer
2861f4fdb8 New translations messages.en.xlf (English) 2024-01-26 00:16:07 +01:00
Jan Böhmer
6f24e7f077 Fixed phpunit tests caused by typo in Autowire attribute
This caused the whole thing to behave very very weirdly
2024-01-26 00:12:37 +01:00
Jan Böhmer
08e7e3f2bf Fixed phpstan issue 2024-01-25 23:41:43 +01:00
Jan Böhmer
f0519ae0b3 Return a 401 message with an JSON encoded body, if no authentication header is passed for an API request.
Also for browser requests, a flash message is shown in that case, prompting the user to authenticate.

This follows a suggestion from issue #494
2024-01-25 23:35:42 +01:00
Jan Böhmer
631c364179 Added option to redirect https requests to http via Part-DB
This is especially useful for the heroku demo instance, where the webserver can not do the automatic redirect
2024-01-25 22:58:52 +01:00
Jan Böhmer
e8d670971e Merge remote-tracking branch 'origin/dependabot/github_actions/actions/cache-4' 2024-01-25 22:19:32 +01:00
Jan Böhmer
fa43ae91cb Merge remote-tracking branch 'origin/l10n_master' 2024-01-25 22:19:26 +01:00
Jan Böhmer
e8eb102feb Updated dependencies 2024-01-25 22:19:06 +01:00
Jan Böhmer
e4634ecc2c Fixed wrong header in API authentication docs
This fix issue #494
2024-01-25 13:22:01 +01:00
Jan Böhmer
0307a50890 New translations messages.en.xlf (Czech) 2024-01-24 20:01:38 +01:00
Jan Böhmer
af1852bb3f
We are in development of 1.10.5 now 2024-01-24 11:57:17 +01:00
Jan Böhmer
046803b9c4
Added danish to prefered languages 2024-01-24 11:56:56 +01:00
Jan Böhmer
daabb9f55e
New Crowdin updates (#491)
* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations security.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)
2024-01-24 11:53:55 +01:00
dependabot[bot]
b177db82f5
Bump actions/cache from 3 to 4
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-01-22 17:15:29 +00:00
Jan Böhmer
6b2ebd2434
New Crowdin updates (#485)
* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)
2024-01-22 11:52:37 +01:00
Jan Böhmer
ef6dd0febc Bumped version to 1.10.4 2024-01-16 23:06:20 +01:00
Jan Böhmer
2cb8cf72ba Merge remote-tracking branch 'origin/l10n_master' 2024-01-16 23:05:53 +01:00
Jan Böhmer
7430ecd7a6 Invalidate part related cache tags properly, if a part is created, changed or removed
This fixes the issue with KiCAD integration described in issue #483
2024-01-16 22:49:01 +01:00
Jan Böhmer
dcf85f9d5e Add hint about bad unicode treatment in sqlite to dabase choosing guide
Related to issue #465
2024-01-16 22:10:29 +01:00
Jan Böhmer
427a31f1b6 New translations messages.en.xlf (Czech) 2024-01-15 23:30:23 +01:00
Jan Böhmer
be4268c6cd New translations messages.en.xlf (Czech) 2024-01-15 22:32:00 +01:00
Jan Böhmer
a1660cd888 Bumped version to 1.10.3 2024-01-15 20:46:07 +01:00
Jan Böhmer
4645227a40 Upgraded dependencies 2024-01-15 20:44:51 +01:00
Jan Böhmer
1da2b9eecb Fixed javascript error caused by CKEDITOR
This was not really a problem, just annoying. But now it is fixed.
Fixes issue #457
2024-01-15 20:39:27 +01:00
Jan Böhmer
f83d4103a6 Use a own marked instance for the MarkdownController instead of the global one
This prevents from configuring plugins multiple times which can lead to a heap overflow.
This fixes issue #478
2024-01-15 20:19:10 +01:00
Jan Böhmer
9e28d39095 Upgraded markedjs 2024-01-15 20:05:16 +01:00
Jan Böhmer
6d838c41ce Merge remote-tracking branch 'origin/l10n_master' 2024-01-15 20:00:29 +01:00
Jan Böhmer
af0931a86e New translations messages.en.xlf (Czech) 2024-01-15 11:40:38 +01:00
Jan Böhmer
a4117d024e New translations messages.en.xlf (Czech) 2024-01-15 10:41:53 +01:00
Jan Böhmer
6b122d6040 New translations messages.en.xlf (Czech) 2024-01-15 09:41:58 +01:00
Jan Böhmer
6e66a2bf7a New translations messages.en.xlf (Danish) 2024-01-14 22:41:43 +01:00
Jan Böhmer
37edb73b3e New translations messages.en.xlf (Danish) 2024-01-14 21:41:53 +01:00
Jan Böhmer
a3b5243ffc Install mysqldump in docker, so the builtin backup solution can be used
Fixes issue #479
2024-01-14 21:31:37 +01:00
Jan Böhmer
b12a2c6aab Added czech to language picker in navbar 2024-01-14 20:55:51 +01:00
Jan Böhmer
1379f896c9 Merge remote-tracking branch 'origin/l10n_master' 2024-01-14 20:54:52 +01:00
Jan Böhmer
0a31714717 Upgraded dependencies 2024-01-14 20:54:35 +01:00
Jan Böhmer
5f8d822e8a New translations messages.en.xlf (Czech) 2024-01-14 20:40:18 +01:00
Jan Böhmer
ff6624b7b3 New translations messages.en.xlf (Czech) 2024-01-14 17:30:21 +01:00
Jan Böhmer
645837dd67 New translations validators.en.xlf (Czech) 2024-01-14 16:30:19 +01:00
Jan Böhmer
eac8f4cd37 New translations messages.en.xlf (Czech) 2024-01-14 16:30:18 +01:00
Jan Böhmer
7e4e9138d3 New translations messages.en.xlf (Czech) 2024-01-14 15:30:21 +01:00
Jan Böhmer
ede7fa3149 New translations messages.en.xlf (Czech) 2024-01-14 12:30:17 +01:00
Jan Böhmer
aa1405a64b New translations messages.en.xlf (Czech) 2024-01-14 11:31:54 +01:00
Jan Böhmer
507c2640a9 New translations messages.en.xlf (Danish) 2024-01-14 01:40:19 +01:00
Jan Böhmer
f6e403d552 New translations messages.en.xlf (Danish) 2024-01-14 00:40:19 +01:00
Jan Böhmer
c1fe3b9d97 New translations messages.en.xlf (Danish) 2024-01-13 20:10:21 +01:00
Jan Böhmer
c85882a0b1 New translations messages.en.xlf (Danish) 2024-01-13 19:10:17 +01:00
Jan Böhmer
21203fc527 New translations messages.en.xlf (Danish) 2024-01-13 18:10:18 +01:00
Jan Böhmer
69cfe51db0 New translations messages.en.xlf (Danish) 2024-01-13 17:10:17 +01:00
Jan Böhmer
9a2133d176 New translations messages.en.xlf (Danish) 2024-01-13 14:21:52 +01:00
Jan Böhmer
f2861fbcf0 New translations messages.en.xlf (Danish) 2024-01-13 13:21:59 +01:00
Jan Böhmer
83d7de0a22
New Crowdin updates (#475)
* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)
2024-01-12 10:59:08 +01:00
Jan Böhmer
d80e9bab12
New Crowdin updates (#474)
* New translations messages.en.xlf (Danish)

* New translations validators.en.xlf (Danish)

* New translations security.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations validators.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Czech)

* New translations validators.en.xlf (Czech)

* New translations security.en.xlf (Czech)

* New translations messages.en.xlf (Danish)

* New translations messages.en.xlf (Czech)

* New translations validators.en.xlf (Czech)

* New translations security.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Czech)

* New translations messages.en.xlf (Dutch)

* New translations messages.en.xlf (Dutch)
2024-01-12 10:01:44 +01:00
Jan Böhmer
d9f58b935a Fixed some issues when importing parameters from partkeepr
Before values were not properly imported, if there was not a normalized version yet and units were not correctly imported
2024-01-11 00:02:32 +01:00
Jan Böhmer
301ecf6c95 Do not import prices with zero price as pricedetails during partkeepr import
These are useless placeholders by partkeepr
2024-01-10 23:40:06 +01:00
Jan Böhmer
be1e17b3be Merge remote-tracking branch 'origin/l10n_master' 2024-01-10 23:19:29 +01:00
Jan Böhmer
86f19d6b25 Updated dependencies 2024-01-10 23:19:16 +01:00
Jan Böhmer
e2146332dc Fixed problems with invalid dates during PartKeepr import with MySQL
See issue #473
2024-01-10 23:18:02 +01:00
Jan Böhmer
e283e2db57 New translations messages.en.xlf (Danish) 2024-01-10 22:50:23 +01:00
Jan Böhmer
22377daa8d New translations messages.en.xlf (Danish) 2024-01-10 21:50:24 +01:00
Jan Böhmer
498e0ae2c7 New translations messages.en.xlf (Russian) 2024-01-10 19:10:49 +01:00
Jan Böhmer
12ea949739 New translations messages.en.xlf (Russian) 2024-01-10 18:10:29 +01:00
Jan Böhmer
436e73a2e9 New translations messages.en.xlf (Russian) 2024-01-10 15:05:35 +01:00
Jan Böhmer
1b65dcfcf1 New translations messages.en.xlf (Russian) 2024-01-10 14:01:39 +01:00
Jan Böhmer
8095f1b995 New translations security.en.xlf (Danish) 2024-01-10 00:12:25 +01:00
Jan Böhmer
a20a3e65fa New translations validators.en.xlf (Danish) 2024-01-10 00:12:25 +01:00
Jan Böhmer
e8a047a28f New translations messages.en.xlf (Danish) 2024-01-10 00:12:24 +01:00
Jan Böhmer
d9ba631173 New translations messages.en.xlf (Russian) 2024-01-09 20:44:32 +01:00
Jan Böhmer
8dc0e014ba New translations messages.en.xlf (Russian) 2024-01-09 19:41:53 +01:00
Jan Böhmer
530476f917 New translations messages.en.xlf (Russian) 2024-01-08 13:30:36 +01:00
Jan Böhmer
8634ff26a7 New translations messages.en.xlf (Russian) 2024-01-08 12:31:58 +01:00
Jan Böhmer
c8f3acaa9d New translations messages.en.xlf (Russian) 2024-01-07 23:00:19 +01:00
Jan Böhmer
74ec7d4c9c New translations messages.en.xlf (Russian) 2024-01-07 22:00:21 +01:00
Jan Böhmer
72c21313dc New translations messages.en.xlf (Russian) 2024-01-07 21:00:18 +01:00
Jan Böhmer
b7660bc778 New translations messages.en.xlf (Russian) 2024-01-07 13:30:27 +01:00
Jan Böhmer
22b197012b New translations messages.en.xlf (Russian) 2024-01-07 12:30:17 +01:00
Jan Böhmer
78bd858ebb Bumped version to 1.10.2 2024-01-06 15:57:59 +01:00
Jan Böhmer
19819454fa Dont split up links when extracting parameters from notes and description
This partly fixes issue #469
2024-01-06 15:14:07 +01:00
Jan Böhmer
26a4b57cfb Fixed tests related to PartNormalizer 2024-01-06 15:01:50 +01:00
Jan Böhmer
f3729ef9db Merge remote-tracking branch 'origin/l10n_master' 2024-01-06 01:07:20 +01:00
Jan Böhmer
ab09d319e9 Fixed wrong path for assets managed by webpack and loaded via twig asset() function.
This had also the effect that 2FA via webauthn were not working, as the request the invalid path resetted the webauthn request saved in session.
2024-01-06 01:06:56 +01:00
Jan Böhmer
df23ba07ba Fixed excpetion that no IRI could be generated if a new Part was created via POST operation via API
This was because the objectSerializer in PartNormalizer messed up the JSONLD IRI generation of the paramaters property. It tried to generate this IRI via the Part ressource class, which is not possible
2024-01-05 23:38:49 +01:00
Jan Böhmer
d20b668e87 Decorate error handler of API platform to show a better error message, if a user tries to cascade persist a new entity through an API operation 2024-01-05 23:10:46 +01:00
Jan Böhmer
f0646597fe Updated dependencies 2024-01-05 22:33:00 +01:00
Jan Böhmer
6d783fd581 New translations messages.en.xlf (Dutch) 2024-01-04 10:00:32 +01:00
Jan Böhmer
14fbf18733 New translations messages.en.xlf (Dutch) 2024-01-04 09:00:23 +01:00
Jan Böhmer
e35c7c496f New translations security.en.xlf (Dutch) 2024-01-03 16:00:42 +01:00
Jan Böhmer
a218b8fdd6 New translations validators.en.xlf (Dutch) 2024-01-03 16:00:41 +01:00
Jan Böhmer
1491672cf8 New translations messages.en.xlf (Dutch) 2024-01-03 16:00:40 +01:00
Jan Böhmer
f9894ffff7 New translations messages.en.xlf (Italian) 2023-12-30 19:00:21 +01:00
Jan Böhmer
7b565817d6 Disable update checking for tests 2023-12-24 15:50:42 +01:00
Jan Böhmer
a03b2ecf73 Use sqlite database for testing by default 2023-12-24 15:27:05 +01:00
Jan Böhmer
dd2f74e19e Merge branch 'master' of github.com:Part-DB/Part-DB-server 2023-12-24 15:21:04 +01:00
Jan Böhmer
c1dcaf926a Updated dependencies 2023-12-24 15:20:52 +01:00
dependabot[bot]
c116db9593
Bump actions/upload-artifact from 3 to 4 (#461)
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-12-24 15:03:39 +01:00
Jan Böhmer
1b92b9f171 Bump to 1.10.1 release 2023-12-12 22:42:53 +01:00
Jan Böhmer
17e79207f0 Suppress static analysis issue 2023-12-12 22:42:34 +01:00
Jan Böhmer
4d187741e0 Added the right copyright header to the foundation emails CSS asset 2023-12-12 22:39:44 +01:00
Jan Böhmer
85c3031fcd Upgraded dependencies 2023-12-12 22:30:45 +01:00
Jan Böhmer
a3e012d754 Added an event listener for console commands which shows a warning if the console is called as root or as wrong user
The idea is to prevent permission issues, by accidential calling the console wrong.
2023-12-12 22:23:19 +01:00
Jan Böhmer
60f8e754c2 Use the DEFAULT_URI setting for SAML base url instead of auto determining it.
This should fix issue #436
2023-12-10 22:52:59 +01:00
Jan Böhmer
3e13a0d9d9 Disable update checking in tests to prevent false-negatives in github actions caused by github api blocking 2023-12-10 22:52:01 +01:00
Jan Böhmer
cd91dc8b5a Fixed wrong path for event log datatables, when accessing via a prefixed reverse proxy 2023-12-10 21:40:49 +01:00
Jan Böhmer
bcaf96ed59 Use a svg file as default user avatar instead of SVG. Also changed path generation logic
This should also fix the path issue described in issue #446
2023-12-10 21:25:40 +01:00
Jan Böhmer
e2437d4c33 Updated dependencies 2023-12-10 00:40:39 +01:00
Jan Böhmer
3798217abc Use PDO constant instead of magic number in SetSQLModeMiddleware 2023-12-10 00:37:58 +01:00
Jan Böhmer
57423436ce Added options to use MySQL connection via SSL 2023-12-10 00:36:29 +01:00
Jan Böhmer
e824f6376a Mention update capability of part info providers in docs 2023-12-07 16:27:25 +01:00
Jan Böhmer
1f4bedc9b0
New Crowdin updates (#451)
* New translations messages.en.xlf (English)

* New translations validators.en.xlf (English)

* New translations security.en.xlf (English)

* New translations messages.en.xlf (German)
2023-12-07 13:32:29 +01:00
Jan Böhmer
aa66285909
Bumped to version 1.10.0 2023-12-07 13:19:07 +01:00
Jan Böhmer
c6229568c5 Added an workaround to github CI issue. setup php action has php-psr ext enabled somehow, which causes trouble. 2023-12-07 00:42:44 +01:00
Jan Böhmer
6110f5be40 Added an workaround to github CI issue. setup php action has php-psr ext enabled somehow, which causes trouble. 2023-12-07 00:41:07 +01:00
Jan Böhmer
ea9cc6723f Show a meaningful flash warning if trying to add/withdraw an amount of 0 instead of throwing an exception
Fixes issue #448
2023-12-07 00:36:16 +01:00
Jan Böhmer
b5721dcfd0 Revert "Migrated deprecated doctrine event subsrcibers"
For some very very weird reasoning this cause issues with the ObjectNormalizer, which does not get an an serializer injected anymore.
When the EventLoggerSubscriber is a doctrine subscriber it seems that the serializer service is initialized (as its requested in constructor but not used) and later injected into the object normalizer.
When its an listener, this does not work anymore.
2023-12-07 00:17:27 +01:00
Jan Böhmer
d7383539ba Merge remote-tracking branch 'origin/l10n_master' 2023-12-06 14:00:29 +01:00
Jan Böhmer
11cdc282d2 Mention KiCad integration in README 2023-12-06 14:00:15 +01:00
Jan Böhmer
b23f59271b New translations messages.en.xlf (German) 2023-12-06 13:11:47 +01:00
Jan Böhmer
999fe48a31 Removed SnakeCasePropertyAccessor as this fix is now part of the symfony property-info component 2023-12-06 00:05:37 +01:00
Jan Böhmer
963079afbf Fixed static analysis issue 2023-12-06 00:00:32 +01:00
Jan Böhmer
a6d508205b Fixed SQLite regex test 2023-12-06 00:00:20 +01:00
Jan Böhmer
fdf52a59fe Fixed error in sqlite regex implementation in certain edge cases 2023-12-05 23:51:54 +01:00
Jan Böhmer
dd0f8ec97c Implement the SQLite extension for doctrine via a middleware instead of an deprecated event listener 2023-12-05 23:50:07 +01:00
Jan Böhmer
641b47b189 Updated omines/datatables-bundle 2023-12-05 23:36:26 +01:00
Jan Böhmer
e1120dbfa7 Upgraded own bundle dependencies to fix some deprecations 2023-12-05 23:30:59 +01:00
Jan Böhmer
f9d47e0865 Migrated deprecated doctrine event subscribers to doctrine event listeners 2023-12-05 22:08:07 +01:00
Jan Böhmer
d991643b0e Removed deprecated google 2FA option 2023-12-05 22:07:48 +01:00
Jan Böhmer
8b8079a6f1 Fixed deprecations 2023-12-05 21:55:20 +01:00
Jan Böhmer
5faeb5dd56 Fixed problem with loading Fixtures on MySQL in combination with savepoints
We must now load the fixtures using custom command partdb:fixtures:load
2023-12-05 21:33:29 +01:00
Jan Böhmer
5b3156ccf4 Merge branch 'symfony6.4-upgrade' 2023-12-04 00:04:57 +01:00
Jan Böhmer
dc355773c9 Updated tecnickcom/tc-lib-barcode 2023-12-04 00:01:47 +01:00
Jan Böhmer
1daf556206 Updated brick/math 2023-12-04 00:00:00 +01:00
Jan Böhmer
1911c62edd Upgraded DAMA doctrine test bundle 2023-12-03 23:58:19 +01:00
Jan Böhmer
2fe2740b62 Updated dompdf 2023-12-03 23:40:16 +01:00
Jan Böhmer
4d7d624033 Updated web-auth/webauthn-symfony-bundle recipe 2023-12-03 23:32:34 +01:00
Jan Böhmer
0abe3f0e61 Updated webpack-encore-bundle recipe 2023-12-03 23:31:34 +01:00
Jan Böhmer
77a6204798 Updated symfony/translation bundle 2023-12-03 23:28:26 +01:00
Jan Böhmer
64af418be2 Updated security-bundle recipe 2023-12-03 23:27:18 +01:00
Jan Böhmer
15411d6c81 Updated phpunit-bridge recipe 2023-12-03 23:24:33 +01:00
Jan Böhmer
fd645a0bce Updated symfony-framework-bundle recipe
This removes the annotation reader services, which are not needed anymore
2023-12-03 23:04:35 +01:00
Jan Böhmer
f888028823 Updated phpstan recipe 2023-12-03 22:46:20 +01:00
Jan Böhmer
abc554c7b8 Updated doctrine recipe 2023-12-03 22:44:55 +01:00
Jan Böhmer
07cc8a9534 Updated API platform recipe 2023-12-03 22:43:42 +01:00
Jan Böhmer
60ecbc7c32 Upgraded all symfony components to 6.4 2023-12-03 22:18:44 +01:00
Jan Böhmer
b7af538cbf Updated symbols list, to include symbols containing special chars 2023-12-03 22:12:25 +01:00
Jan Böhmer
49c8b8003b New translations messages.en.xlf (Italian) 2023-12-03 21:43:16 +01:00
Jan Böhmer
65d04d4afb New translations messages.en.xlf (English) 2023-12-03 20:43:38 +01:00
Jan Böhmer
a449e82a22 New translations messages.en.xlf (Italian) 2023-12-03 20:43:30 +01:00
Jan Böhmer
34fd611946 Merge branch 'kicad-api' 2023-12-03 20:30:58 +01:00
Jan Böhmer
62cbc168fb Updated documentation about new visibility changes. 2023-12-03 20:30:49 +01:00
Jan Böhmer
74d1904df1 Only show parts and their categories in KiCad if they have useful info defined on them 2023-12-03 20:22:47 +01:00
Jan Böhmer
7d69d6ba30 Changed logic of invisible to a (forced) visibility field 2023-12-03 15:29:17 +01:00
Jan Böhmer
bc37d11f13 Fixed static analysis issue 2023-12-03 15:11:06 +01:00
Jan Böhmer
1825080d9e Added documentation about the EDA_KICAD_CATEGORY_DEPTH env 2023-12-03 15:07:41 +01:00
Jan Böhmer
6926f6b233 Allow to show all parts of all categories in a single KiCad category by setting EDA_KICAD_CATEGORY_DEPTH to -1 2023-12-03 15:03:00 +01:00
Jan Böhmer
459ae163da Restrict the depth of the category tree shown inside KiCAD to improve performance
The depth can be controlled via the EDA_KICAD_CATEGORY_DEPTH env
2023-12-03 14:42:33 +01:00
Jan Böhmer
fc7b1e6d31 Merge branch 'master' into kicad-api 2023-12-03 14:15:44 +01:00
Jan Böhmer
3198e5d750 New translations messages.en.xlf (Italian) 2023-12-03 09:40:17 +01:00
Jan Böhmer
f31cac580a New translations messages.en.xlf (Italian) 2023-12-03 08:40:16 +01:00
Jan Böhmer
753a12765b New translations messages.en.xlf (English) 2023-12-03 01:31:09 +01:00
Jan Böhmer
cbffc485f3 Updated dependencies 2023-12-03 01:20:39 +01:00
Jan Böhmer
c15ddcdf9f We are in development of Part-DB 1.10.0 now 2023-12-03 01:18:07 +01:00
Jan Böhmer
264ed3aaab Merge branch 'kicad-api' 2023-12-03 01:17:39 +01:00
Jan Böhmer
61a5ebde6b Show the correct KICad API endpoint on the user settings page. 2023-12-03 01:16:16 +01:00
Jan Böhmer
f4b4f14a67 Added ability to modify the EDA data via the Part-DB API 2023-12-03 00:57:11 +01:00
Jan Böhmer
9994dbd9db Added tests to test the KICad API endpoints 2023-12-03 00:43:34 +01:00
Jan Böhmer
d976865e7a Fixed static analysis issues 2023-12-03 00:05:41 +01:00
Jan Böhmer
0445b87567 Added EDA column migration for SQLite 2023-12-03 00:00:46 +01:00
Jan Böhmer
64c86fa11d Show EDA metadata in extended info table of part info page 2023-12-02 23:55:42 +01:00
Jan Böhmer
548339911f Added info about autocomplete to documentation 2023-12-02 19:57:55 +01:00
Jan Böhmer
e914a32894 Updated KiCad library autocomplete lists 2023-12-02 19:54:55 +01:00
Jan Böhmer
f28e369c01 Added an autocomplete feature for Kicad symbols and footprints 2023-12-02 19:40:26 +01:00
Jan Böhmer
30b2c8b841 Added forms to change EDA infos of footprints and categories 2023-12-01 22:47:05 +01:00
Jan Böhmer
b5c7a789a2 Made EDA form for parts prettier 2023-12-01 22:36:14 +01:00
Jan Böhmer
168b4f6c15 Started to write documentation on KiCAD integration 2023-12-01 14:09:19 +01:00
Jan Böhmer
bf5ed030fe Use the EDAInfo data to send info to KiCAD 2023-11-30 19:34:50 +01:00
Jan Böhmer
b76b2740a7 Use Embeddables for EDACategoryInfo instead of a json column 2023-11-30 19:13:32 +01:00
Jan Böhmer
d5f002ac20 Added basic ability to store EDA Data in a Part
But that might change, as it is currently not ideal
2023-11-30 12:54:30 +01:00
Jan Böhmer
2ec1a10623 Add various info from the Part-DB database to the KICAD parts 2023-11-29 21:28:06 +01:00
Jan Böhmer
ee69f9e576 Cache the results for the parts of a category for KiCAD 2023-11-29 20:57:11 +01:00
Jan Böhmer
b7af08503c Refactored cache tags and invalidation 2023-11-29 20:49:16 +01:00
Jan Böhmer
08a1ce5f64 Moved some logic from KICAD controller into its own service 2023-11-29 20:17:17 +01:00
Jan Böhmer
22f8448c65 Added an very basic API implementation for KICAD 2023-11-28 14:24:22 +01:00
Jan Böhmer
6b0f0d31b9 Allow to authenticate using Authorization: Token header, which the KiCAD API uses 2023-11-28 14:24:22 +01:00
Jan Böhmer
feca20ef77 Added a hint about quotes and TRUSTED_PROXIES setting in docker-compose example 2023-11-28 13:44:17 +01:00
Jan Böhmer
9e04a3405f New translations messages.en.xlf (English) 2023-11-28 00:22:20 +01:00
Jan Böhmer
46adb6d8b8 Release v1.9.1 2023-11-27 23:26:27 +01:00
Jan Böhmer
66e184c6b1 Merge remote-tracking branch 'origin/l10n_master' 2023-11-27 23:25:52 +01:00
Jan Böhmer
5b812104af New translations messages.en.xlf (German) 2023-11-27 23:23:32 +01:00
Jan Böhmer
0346b339c4 Updated dependencies 2023-11-27 23:22:08 +01:00
Jan Böhmer
c6bff42cf7 New translations messages.en.xlf (English) 2023-11-27 23:22:04 +01:00
Jan Böhmer
03712fcf96 Show an error flash, if the info providers cannnot communicate with the servers instead of throwing an exception 2023-11-27 23:17:20 +01:00
Jan Böhmer
dbff543fa8 Remove an attachment as preview image of an element, if it is not an image anymore through a change 2023-11-27 22:59:02 +01:00
Jan Böhmer
08bd4d54e3 Fix exception if uploading a new file for an already existing attachment 2023-11-27 22:48:18 +01:00
Jan Böhmer
eb30fb6e83 Fixed thumbnail for SVG files where the original name had no svg extension 2023-11-27 18:27:36 +01:00
Jan Böhmer
05e9b63f89 Fixed exception, when downloading an attachment file, which does not have a usable extension 2023-11-27 18:13:55 +01:00
Jan Böhmer
da0845c11c Added Timestampable interface to entities that missed it, to fix timetravel in certain cases 2023-11-27 17:53:35 +01:00
Jan Böhmer
584062c29a Move alternative names field of attachmenttype admin page to right position
Formerly it was not inside the common tab but below all tabs
2023-11-27 17:40:39 +01:00
Jan Böhmer
752cfb3698 Try to automatically determine an attachment name from a given URL similar to the name of an uploaded file 2023-11-27 17:39:24 +01:00
Jan Böhmer
18db20e511 Added the option env option to configure that all new attachment files should be downloaded by default 2023-11-26 23:44:02 +01:00
Jan Böhmer
0f0adfcf36 Filter out duplicate file DTO returned by the info providers 2023-11-26 22:24:22 +01:00
Jan Böhmer
7e99746b1e New translations security.en.xlf (English) 2023-11-25 21:10:30 +01:00
Jan Böhmer
30afcc02b9 New translations validators.en.xlf (English) 2023-11-25 21:10:29 +01:00
Jan Böhmer
8ff2fef855 New translations messages.en.xlf (English) 2023-11-25 21:10:28 +01:00
Jan Böhmer
76295b73c8 Bumped to release 1.9.0 2023-11-25 20:07:51 +01:00
Jan Böhmer
8c00769757 Merge remote-tracking branch 'origin/l10n_master' 2023-11-25 20:07:17 +01:00
Jan Böhmer
773d0e9d20 New translations messages.en.xlf (English) 2023-11-25 20:05:34 +01:00
Jan Böhmer
d14f596479 New translations messages.en.xlf (German) 2023-11-25 20:05:23 +01:00
Jan Böhmer
700ed42ce5 Removed unused translation 2023-11-25 20:00:08 +01:00
Jan Böhmer
dc2369c71e Remove additional colon in translation 2023-11-25 19:42:32 +01:00
Jan Böhmer
5fc760f6ad Run phpunit tests against PHP 8.3 2023-11-25 19:42:05 +01:00
Jan Böhmer
ffb5d3e790 Added an checkbox in the withdrawal/move dialog, that if checked automatically deletes a part lot if it becomes empty during the operation
Fixes issue #327
2023-11-25 19:38:21 +01:00
Jan Böhmer
512947e0d0 New translations messages.en.xlf (English) 2023-11-25 19:20:46 +01:00
Jan Böhmer
9e69a09a19 Fixed translation of stock change type in log table 2023-11-25 19:16:54 +01:00
Jan Böhmer
b447a69dae Allow to specify an informational field during a part stock operation, where the user can specify, when this operation was really performed
Fixes issue #416
2023-11-25 19:10:18 +01:00
Jan Böhmer
d52e6b5881 New translations messages.en.xlf (German) 2023-11-25 14:00:18 +01:00
Jan Böhmer
6cff19358a Dont show the permission reset warning during database migration anymore
This only affects database which were older than the new permission system  and hopefully everybody should have updated by now. The message could irritate new users, so it was removed
2023-11-25 13:21:39 +01:00
Jan Böhmer
a6d476f953 New translations messages.en.xlf (German) 2023-11-25 13:00:19 +01:00
Jan Böhmer
aba73174ab Fixed wrong link in docs. 2023-11-25 01:48:32 +01:00
Jan Böhmer
83d43d931c Added a SAML_BEHIND_PROXY env, which must be set if Part-DB is behind a reverse proxy when using SAML
The php-saml library use its own logic to determine the current path, and we need to set the use_proxy_vars so that  it respects the proxy FORWARDED headers.

This should fix issue #436
2023-11-25 01:45:08 +01:00
Jan Böhmer
64cebaba77 New translations messages.en.xlf (English) 2023-11-25 01:20:54 +01:00
Jan Böhmer
07535c26a6 Fixed static analysis issue 2023-11-25 01:19:48 +01:00
Jan Böhmer
aab1dcf8e6 Fixed APIPlatform test issues which were introduced with the upgrade to api platform core v3.2.6 2023-11-25 01:17:35 +01:00
Jan Böhmer
4b88de9316 Show a notice above the permission editor, that permissions can depend on each other
Related to issue #435
2023-11-25 00:42:17 +01:00
Jan Böhmer
84c111ac7c Show a warning flash message, if permissions were corrected and missing permissions were set
Related to issue #435
2023-11-25 00:36:31 +01:00
Jan Böhmer
2feeb1c868 New translations messages.en.xlf (English) 2023-11-25 00:01:18 +01:00
Jan Böhmer
17000da97e Updated dependencies 2023-11-24 23:55:21 +01:00
Jan Böhmer
5b09cbf1ac Merge branch 'merge_system' 2023-11-24 23:51:35 +01:00
Jan Böhmer
07088c94e7 Implemented logic for not (yet) used EntityMerger service 2023-11-24 23:48:39 +01:00
Jan Böhmer
1da5e7ccd7 Properly merge the PartAssociations pointing towards the parts 2023-11-24 23:36:09 +01:00
Jan Böhmer
b9956e38b8 Dont concat if one of the strings is empty during part merge 2023-11-24 23:16:26 +01:00
Jan Böhmer
36879dd7da Test merge and update from info provider controller endpoints 2023-11-24 23:13:15 +01:00
Jan Böhmer
099ea63740 Show a notice flash to remember user to review changes 2023-11-24 19:45:15 +01:00
Jan Böhmer
615defa84a Give the update part from info provider menu a own design 2023-11-24 19:35:44 +01:00
Jan Böhmer
3eeeb01ad1 Added possibility to search the info providers to update an existing part 2023-11-24 19:28:30 +01:00
Jan Böhmer
73f6d79925 Added an modal form on the part info page, to merge a part into another one 2023-11-22 22:50:25 +01:00
Jan Böhmer
b0f5d9b55f Added an form for merging two parts together 2023-11-22 20:11:38 +01:00
Jan Böhmer
50069c7611 Fixed tests 2023-11-22 17:14:24 +01:00
Jan Böhmer
c86694ab8f Merge the remaining fields of a Part 2023-11-21 19:41:18 +01:00
Jan Böhmer
478d5e2a3a Merge tags and bool fields of parts 2023-11-21 00:18:10 +01:00
Jan Böhmer
e7b766906d Try to avoid duplications during merging of parts and merge more fields. 2023-11-21 00:02:17 +01:00
Jan Böhmer
c5435df6f9 Add a blue dot to the collection type delete buttons in forms to indicate that this element was not yet saved to DB yet 2023-11-20 23:40:14 +01:00
Jan Böhmer
e8f4cd9fec Merge remote-tracking branch 'origin/l10n_master' 2023-11-20 00:08:20 +01:00
Jan Böhmer
378d695a24 New translations validators.en.xlf (German) 2023-11-20 00:06:55 +01:00
Jan Böhmer
a4b16f7f09 New translations messages.en.xlf (German) 2023-11-20 00:06:54 +01:00
Jan Böhmer
1fe3a614c9 New translations validators.en.xlf (German) 2023-11-20 00:01:40 +01:00
Jan Böhmer
773e393f55 New translations messages.en.xlf (German) 2023-11-20 00:01:39 +01:00
Jan Böhmer
87626589a3 Added very basic controller to merge info provider data into the part 2023-11-19 23:47:46 +01:00
Jan Böhmer
01784a9d1f Started implementing building blocks for the merge system 2023-11-19 23:17:48 +01:00
Jan Böhmer
f99323f9b3 New translations messages.en.xlf (English) 2023-11-19 22:22:04 +01:00
Jan Böhmer
83ad99215f Added optional "stocked amount" and storage locations columns for the BOM list
This fixes issue #429
2023-11-19 22:13:25 +01:00
Jan Böhmer
958d59a0ff Save search setting checkboxes state to localStorage to persist it
Related to issue #424
2023-11-19 21:49:16 +01:00
Jan Böhmer
de8a68c70d Expliticly declare a conversion from the custom TinyInt doctrine type to int
This hopefully fixes issue #434
2023-11-19 21:03:43 +01:00
Jan Böhmer
5f87d5b1ac Updated dependencies 2023-11-19 21:02:43 +01:00
Jan Böhmer
c2ea880dad New translations validators.en.xlf (Italian) 2023-11-18 09:40:18 +01:00
Jan Böhmer
7eba4254e6 New translations messages.en.xlf (Italian) 2023-11-18 09:40:17 +01:00
Jan Böhmer
76bb3eae9d New translations messages.en.xlf (Italian) 2023-11-18 08:40:18 +01:00
Jan Böhmer
3da656c08b Fixed (false positive) test in APIDocsAvailabilityTest
API Platform seems to have slightly changed the serialization process of errors and the requested HTML format was not available for error serialization
2023-11-17 23:59:32 +01:00
Jan Böhmer
b6dc3eb1a2 New translations validators.en.xlf (English) 2023-11-17 23:51:17 +01:00
Jan Böhmer
fefa65941b New translations messages.en.xlf (English) 2023-11-17 23:51:16 +01:00
Jan Böhmer
74d75c6e1f Upgraded dependencies 2023-11-17 23:44:28 +01:00
Jan Böhmer
01ed3eeecd Merge branch 'part_associations' 2023-11-17 23:37:26 +01:00
Jan Böhmer
9a3b9b84bc Fixed deprecation 2023-11-17 23:32:41 +01:00
Jan Böhmer
90a1ffa2ac Fixed issues with wrong Groups attribute definition 2023-11-17 23:30:36 +01:00
Jan Böhmer
5442aa5e07 Added test for vendor barcode scanner 2023-11-17 23:29:06 +01:00
Jan Böhmer
0ab604d468 Added migrations for sqlite 2023-11-17 23:26:45 +01:00
Jan Böhmer
0b178b46f2 Allow to scan barcodes, whose content where defined in the vendor_barcode field 2023-11-17 23:23:54 +01:00
Jan Böhmer
d12bde2b1e Reveal the invalid field in a collapse if a validation error occurs 2023-11-17 23:15:18 +01:00
Jan Böhmer
96a771e7ac Allow to edit the vendor_barcode field of a PartLot 2023-11-17 23:05:47 +01:00
Jan Böhmer
3e6b80d1cf Added possibility to access PartAssociations via API 2023-11-17 22:12:19 +01:00
Jan Böhmer
4d7d196a3c Added some documentation and tests to PartAssociations 2023-11-17 18:36:49 +01:00
Jan Böhmer
4e1f6277c6 Added a translation for the part association in LogFilterType 2023-11-17 18:28:24 +01:00
Jan Böhmer
626c4dd5d6 Use a custom delete confirmation message for part associations 2023-11-16 22:38:01 +01:00
Jan Böhmer
c8bd800b9f Hide the custom type input field if not needed to improve the UX 2023-11-16 22:33:31 +01:00
d-buchmann
0fa03d8bb0
Associate project BOM entries with correct project when cloning (#433) 2023-11-16 12:56:42 +01:00
Jan Böhmer
22606f01d2 New translations messages.en.xlf (Chinese Simplified) 2023-11-16 10:10:33 +01:00
Jan Böhmer
3c2e535117 New translations messages.en.xlf (Chinese Simplified) 2023-11-16 09:10:25 +01:00
Jan Böhmer
7f612bc371 Added ability to view part relations on a part info page 2023-11-15 00:44:45 +01:00
Jan Böhmer
cc2332a83a Added some constraints to ensure validity of the PartAssociation entities 2023-11-14 23:50:09 +01:00
Jan Böhmer
c7892cb9e2 Added a seperate field for specifying the other relation 2023-11-14 23:35:18 +01:00
Jan Böhmer
5bd2d9b344 Restrict size of part images, if the part selector element is very wide
This improves UX
2023-11-13 23:05:25 +01:00
Jan Böhmer
81f8b365e9 Improved the association edit panel 2023-11-13 23:01:59 +01:00
Jan Böhmer
8ab9cf1417 Added very basic possibility to add an association 2023-11-13 00:11:58 +01:00
Jan Böhmer
b7cfdebad5 Added data field for vendor PartLot barcodes 2023-11-12 22:06:05 +01:00
Jan Böhmer
0447a7e6b3 Added basic data structures for part associations 2023-11-12 21:53:45 +01:00
Jan Böhmer
6d67ee8106 New translations security.en.xlf (English) 2023-11-12 00:40:45 +01:00
Jan Böhmer
2d7058329c New translations validators.en.xlf (English) 2023-11-12 00:40:44 +01:00
Jan Böhmer
9e58baa574 New translations messages.en.xlf (English) 2023-11-12 00:40:43 +01:00
Jan Böhmer
6d8cb9cc08 New translations messages.en.xlf (French) 2023-11-12 00:40:28 +01:00
Jan Böhmer
5cfccab671 Allow to scan IPN barcodes using the built in barcode scanner
This improves issue #373
2023-11-12 00:36:13 +01:00
Jan Böhmer
3953e36921 Include the ipv6 localhost in default TRUSTED_PROXIES
Related to issue #428
2023-11-11 23:22:30 +01:00
Jan Böhmer
7163df6d46 Fixed paths generated using app.request.requestUri when in a reverse proxy with a subpath
Related to issue #428
2023-11-11 23:14:22 +01:00
Jan Böhmer
5f86253b94 Add documentation on how to put Part-DB into a subpath of a reverse proxy
This fixes issue #428
2023-11-11 23:03:29 +01:00
Jan Böhmer
93d0f97cfd Updated dependencies 2023-11-11 18:35:49 +01:00
Jan Böhmer
9732b71f85 Fixed other placeholders besides the IPN Barcodes 2023-11-05 21:42:39 +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
5e326bca12 Added label placeholders to add a barcode version of the IPN to a label
This fixes issue #373
2023-11-05 21:24:21 +01:00
Jan Böhmer
3c52e57a44 Updated dependencies 2023-11-04 20:44:32 +01:00
Jan Böhmer
2002b9d5d3 Merge remote-tracking branch 'origin/master' 2023-11-03 23:07:58 +01:00
Jan Böhmer
323c70393d Use demo.part-db.de in links to demo as this now has TLS encryption too. 2023-11-03 23:07:51 +01:00
Jan Böhmer
eabd03dc53 Fixed variable access curly brackets deprecations in migrations 2023-11-03 23:04:55 +01:00
Jan Böhmer
3ac82cf76a The frontend dependencies can now detect their path automatically.
Therefore it does not need to be configured in the webpack.config.js before compilation. This should help to make things like issue #426 easier to resolve.
2023-11-03 23:01:23 +01:00
Pyromane
1409d19922
Update installation_docker.md (#425)
For the database additionally "restart: unless-stopped" is specified, so that this is also available after a restart of the host.
2023-10-31 13:32:43 +01:00
Jan Böhmer
bdcd51d533 Refactored barcode scan functions
This is preparatory work for issue #373
2023-10-26 22:23:43 +02:00
Jan Böhmer
563edb1731 Added ipn to possible columns in project BOM view
This fixes issue #418
2023-10-26 17:55:03 +02:00
dependabot[bot]
cd7013f776
Bump actions/setup-node from 3 to 4 (#420)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-26 17:44:42 +02:00
Jan Böhmer
783a00ca2f Added test for price related quantity in DTOToEntityConverter 2023-10-26 17:41:26 +02:00
Jan Böhmer
e233940f1f Merge remote-tracking branch 'd-buchmann/d-buchmann-patch-1' 2023-10-26 17:38:10 +02:00
Jan Böhmer
717a9fb0a3 Fixed API Platform deprecations 2023-10-25 20:40:41 +02:00
Jan Böhmer
d0a5b4dcd7 Bumped version to 1.8.2 2023-10-25 17:30:06 +02:00
Jan Böhmer
294f7cf005 Fixed some deprecations related to missing return types 2023-10-25 17:27:37 +02:00
Jan Böhmer
eb24aa2e68 Updated dependencies 2023-10-25 17:14:02 +02:00
Jan Böhmer
a1c680d14d Increase xdebug.max_nesting_level to 1000 if required in bin/console script
Fix issue #411
2023-10-25 17:05:24 +02:00
buchmann
5144b75ed7 Fix image type alt name if newly generated 2023-10-25 15:56:40 +02:00
buchmann
aeed7c0802 fix line breaks 2023-10-25 14:29:18 +02:00
buchmann
2b470e6cdd Merge commit 'f8ccd5bc22' into d-buchmann-patch-1 2023-10-25 14:10:46 +02:00
d-buchmann
e6870c61ee
Update DTOtoEntityConverter.php 2023-10-25 14:01:46 +02:00
d-buchmann
f8ccd5bc22
Add price_related_quantity to PriceDTO.php 2023-10-25 13:58:59 +02:00
Jan Böhmer
7239aef47f Ensure that the user property is really null in getLastUser function, if the target user was deleted
This fixes issue #414
2023-10-24 23:55:14 +02:00
Jan Böhmer
91cab91c81 Fixed missing ) in log detail page 2023-10-24 23:27:24 +02:00
Jan Böhmer
ce318bab9a
Update codecov.yml 2023-10-24 18:27:30 +02:00
Jan Böhmer
b500fa82bb Allow to dynamically create currencies in pricedetails
This fixes issue #413
2023-10-24 14:08:50 +02:00
Jan Böhmer
388d26fa05 Forbid a user to delete himself on the admin page 2023-10-24 13:32:44 +02:00
Jan Böhmer
9fd3012c27 Fixed exception if user avatar file somehow got deleted.
Now we just show the default avatar instead of the non-existing attachment file
2023-10-24 13:25:33 +02:00
Jan Böhmer
3f36972764 Throw no warning, when unsetting a not existing permission value 2023-10-23 22:15:04 +02:00
Pyromane
9cd5d14708
Update upgrade_legacy.md (#417)
PHP minimum requirement adjusted
2023-10-21 18:47:36 +02:00
Jan Böhmer
cc82547699 Bumped to 1.8.1 2023-10-15 16:48:00 +02:00
Jan Böhmer
a9be442dd1 Fixed PartVoter when a class string is passed 2023-10-15 16:47:39 +02:00
Jan Böhmer
ffbcf25246 Bumped to version 1.8.0 2023-10-15 15:50:19 +02:00
Jan Böhmer
e9665d7a7a Merge remote-tracking branch 'origin/l10n_master' 2023-10-15 15:50:01 +02:00
Jan Böhmer
0a06467f79 Fixed visual issues in README.md and wrong coverage badge 2023-10-15 15:49:09 +02:00
Jan Böhmer
31510f6762 New translations validators.en.xlf (Russian) 2023-10-15 15:40:33 +02:00
Jan Böhmer
b298ee0003 New translations messages.en.xlf (Russian) 2023-10-15 15:40:32 +02:00
Jan Böhmer
97b539e1c6 New translations validators.en.xlf (Japanese) 2023-10-15 15:40:30 +02:00
Jan Böhmer
6546fba218 New translations messages.en.xlf (Japanese) 2023-10-15 15:40:29 +02:00
Jan Böhmer
b97132dbb5 New translations validators.en.xlf (German) 2023-10-15 15:40:22 +02:00
Jan Böhmer
aeeb4b87ec New translations messages.en.xlf (German) 2023-10-15 15:40:21 +02:00
Jan Böhmer
9a4877cdb0 New translations validators.en.xlf (French) 2023-10-15 15:40:19 +02:00
Jan Böhmer
919beda7f5 Hopefully fixed coverage upload to codecov 2023-10-15 14:33:24 +02:00
Jan Böhmer
306ecff9c7 Fixed issues with xdebug.max_nesting_level in github actions 2023-10-15 14:24:48 +02:00
Tac Tacelosky
0c689d492b
remove repeated lines (#405) 2023-10-15 14:07:26 +02:00
Jan Böhmer
c3de0ccacc Merge remote-tracking branch 'origin/l10n_master' 2023-10-15 14:03:02 +02:00
Jan Böhmer
0d5bc2b29f Removed additional } in 2FA messages 2023-10-15 14:01:18 +02:00
Jan Böhmer
d675f072d6 Updated dependencies 2023-10-15 14:01:01 +02:00
Jan Böhmer
6f30db4877 New translations messages.en.xlf (English) 2023-10-15 13:40:19 +02:00
Jan Böhmer
cdcfcc7717 Merge remote-tracking branch 'origin/l10n_master' 2023-10-15 13:29:10 +02:00
Jan Böhmer
71765558fc Mention API feature in README and docs index.md 2023-10-15 13:28:40 +02:00
Jan Böhmer
5d3b1a7bcd Fiixed typos in README.md 2023-10-15 13:27:20 +02:00
Jan Böhmer
a2a477e4e5 Fixed some issues in docs 2023-10-15 13:24:56 +02:00
Jan Böhmer
f32c0f52b6 Fixed formatting and typos in documentation 2023-10-15 13:21:14 +02:00
Jan Böhmer
47fc7db953 Correctly link to JSON Merge Patch in API docu instead of JSON Patch 2023-10-15 12:38:32 +02:00
Jan Böhmer
cc267c0edf New translations messages.en.xlf (English) 2023-10-15 02:30:19 +02:00
Jan Böhmer
f5a3ab1f9b New translations messages.en.xlf (German) 2023-10-15 02:30:18 +02:00
Jan Böhmer
f6c97b58aa New translations messages.en.xlf (English) 2023-10-15 01:30:44 +02:00
Jan Böhmer
7a2928e202 Show a proper error message to user when he is not allowed to create a new element using a StructuralEntityType
This fixes issue #391
2023-10-15 01:29:19 +02:00
Jan Böhmer
f53c98312e Escape space in attachment URLs with %20
Fixes issue #401
2023-10-15 00:50:43 +02:00
Jan Böhmer
180505cba4 Improved API documentation on what will happen, if no Accept: header is set
Related with issue #399
2023-10-14 21:01:54 +02:00
Jan Böhmer
6d6a69e1dd Removed unnecessary curly brackets in string interpolation, which are deprecated in PHP 8.2 2023-10-14 20:31:04 +02:00
dependabot[bot]
5f61e096f9
Bump docker/login-action from 2 to 3 (#382)
Bumps [docker/login-action](https://github.com/docker/login-action) from 2 to 3.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-10-08 22:08:03 +02:00
Jan Böhmer
1becde537b Fixed test issues 2023-10-08 21:54:51 +02:00
Jan Böhmer
3c5a96ba5c Merge branch 'part-table-columns-config' 2023-10-08 21:50:43 +02:00
Jan Böhmer
470df57f58 Removed useless permissions checks, as the permissions are now always granted automatically, if the user has read access to parts 2023-10-08 21:36:05 +02:00
Jan Böhmer
185c88fa3e Removed now useless visibility options from PartsDataTable
The visibility is now configured by the env variable, so this is useless.
2023-10-08 21:32:57 +02:00
Jan Böhmer
79262972aa Renamed config env to TABLE_PARTS_DEFAULT_COLUMNS and updated documentation 2023-10-08 21:28:37 +02:00
Jan Böhmer
1369091b90 Moved column sorting and visibility logic to its own (non-shared) helper service 2023-10-08 21:07:22 +02:00
Jan Böhmer
b0322b4c03 Added a "new part" button to the navbar
This fixes issue #394
2023-10-08 01:25:29 +02:00
Jan Böhmer
c402ec40a5 Fixed initial rendering of default currency item in freshly initialized currency selectors 2023-10-08 01:04:04 +02:00
Jan Böhmer
1964084155 Merge branch 'mouser_pdo59'
This resolve issue #329
2023-10-08 00:41:47 +02:00
Jan Böhmer
4b5f9648b1 Allow to passthrought the mouser provider env using docker 2023-10-08 00:40:03 +02:00
Jan Böhmer
9d9287cefb Added documentation for MouserAPI 2023-10-08 00:39:08 +02:00
Jan Böhmer
18ae32f15a Renamed some env to match their purpose better 2023-10-08 00:33:48 +02:00
Jan Böhmer
7cd2662c77 Moved API key to query options of HTTPClient in MouserProvider 2023-10-08 00:18:25 +02:00
Jan Böhmer
4f0730b6f9 Properly formatted MouserProvider and fixed some type issues 2023-10-08 00:15:57 +02:00
Jan Böhmer
d7bc74fb2b Slightly restructured mouserprovider to remove redundant code 2023-10-08 00:00:10 +02:00
Jan Böhmer
a0b31cfd7e Made mouser provider key lowercase to be consistent with other providers 2023-10-07 23:49:04 +02:00
Jan Böhmer
33033bc5b1 Added the MouserProvider by @pdo59 2023-10-07 23:46:31 +02:00
Jan Böhmer
d6daac0762 New translations security.en.xlf (English) 2023-10-06 14:50:47 +02:00
Jan Böhmer
6a5a632a0e New translations validators.en.xlf (English) 2023-10-06 14:50:46 +02:00
Jan Böhmer
c64633299a New translations messages.en.xlf (English) 2023-10-06 14:50:45 +02:00
Jan Böhmer
f4e173d3fb New translations validators.en.xlf (Russian) 2023-10-06 14:50:41 +02:00
Jan Böhmer
5ff8d1c1cb New translations messages.en.xlf (Russian) 2023-10-06 14:50:39 +02:00
Jan Böhmer
aad40aefbc New translations validators.en.xlf (Japanese) 2023-10-06 14:50:37 +02:00
Jan Böhmer
ff77dac5fb New translations messages.en.xlf (Japanese) 2023-10-06 14:50:36 +02:00
Jan Böhmer
ced53c2690 New translations validators.en.xlf (German) 2023-10-06 14:50:30 +02:00
Jan Böhmer
6f66d50ff6 New translations messages.en.xlf (German) 2023-10-06 14:50:29 +02:00
Jan Böhmer
06f88341ba New translations validators.en.xlf (French) 2023-10-06 14:50:26 +02:00
Jan Böhmer
2a9a86aaaf New translations messages.en.xlf (French) 2023-10-06 14:50:25 +02:00
Jan Böhmer
2409c7f62b Exclude TwoStepORMAdapter from phpstan to fix github actions issue 2023-10-06 14:42:32 +02:00
Jan Böhmer
1b276c5eae Fixed typo in name of TwoStepORMAdapter 2023-10-06 13:08:46 +02:00
Jan Böhmer
608bd247af Updated symfony/phpunit-bridge recipe 2023-10-06 13:06:40 +02:00
Jan Böhmer
e9cdd20dcc Updated phpstan/phpstan recipe 2023-10-06 13:05:06 +02:00
Jan Böhmer
37dccd4249 Updated doctrine/doctrine-bundle recipe 2023-10-06 13:02:14 +02:00
Jan Böhmer
485d162d82 Updated dama/doctrine-test-bundle recipe 2023-10-06 13:01:17 +02:00
Jan Böhmer
aaf230fc58 Updated api platform recipe 2023-10-06 13:00:13 +02:00
Jan Böhmer
f9cafae789 Upgraded marked.js dependency 2023-10-06 12:47:00 +02:00
Jan Böhmer
c758027d4c Upgraded to CKEditor5 v40 2023-10-06 12:41:43 +02:00
Jan Böhmer
c178d45f73 Upgraded dependencies after merge 2023-10-06 12:35:17 +02:00
Jan Böhmer
8c9abce633 Merge branch 'api' 2023-10-06 12:29:53 +02:00
misaz
0753b7137f fixed tab/spaces in PartsDataTable 2023-10-04 21:30:04 +02:00
misaz
9d54001f89 added support for configuring columns in part table which are enabled by default as well as their order. 2023-10-04 21:14:57 +02:00
Jan Böhmer
00bb005e4e Bumped to version 1.7.3 2023-10-04 01:26:07 +02:00
Jan Böhmer
60b8650a1a Updated dependencies
The webauthn 2fa integration got an update, this should fix issue #389
2023-10-04 01:25:22 +02:00
Jan Böhmer
ec4eccdf08 Removed unnecessary commented code 2023-10-04 00:50:28 +02:00
Jan Böhmer
64c38042a0 Added missing lastModified and creationDate fields to API response 2023-10-04 00:08:10 +02:00
Jan Böhmer
e09f60e71f Allow to filter attachments API response by attachment types 2023-10-03 23:58:41 +02:00
Jan Böhmer
0e75d76720 Added API endpoints for projects 2023-10-03 23:53:10 +02:00
Jan Böhmer
852624ae7e Added filter to filter parts by storage location 2023-10-03 21:59:33 +02:00
Jan Böhmer
00708608cd Added entity filter to filter part response by categories, etc. 2023-10-03 21:37:58 +02:00
Jan Böhmer
e339b7d9f0 Fixed issue with FixInheritanceMappingMetadataFactory 2023-10-03 20:47:37 +02:00
Jan Böhmer
2f958dafae Fixed PHPstan issues 2023-10-03 16:41:03 +02:00
Jan Böhmer
3df47ed748 Added filters to various endpoints to allow searching for parts 2023-10-03 16:29:04 +02:00
Jan Böhmer
c7a02ae870 Added tests for token API authentication 2023-10-02 23:36:14 +02:00
Jan Böhmer
42356cc2a3 Show the last 5 characters of the token secrets on the user settings page to make identification of a token easier 2023-10-02 00:45:21 +02:00
Jan Böhmer
b796ae36db Restrict access to users API endpoint 2023-10-02 00:35:11 +02:00
Jan Böhmer
7bd44484be Added documentation for virtual fields of Attachment and Part entity 2023-10-02 00:22:15 +02:00
Jan Böhmer
607bb45f5f Added an possibilty to document "virtual" properties to api documentation, which are added dynamically during the normalization priocess 2023-10-02 00:21:59 +02:00
Jan Böhmer
90518056cd Fixed JSONLD schema generation of API documentation 2023-10-01 22:45:39 +02:00
Jan Böhmer
1e52ec42ca Added tests for availability of the API documentation 2023-10-01 21:56:05 +02:00
Jan Böhmer
1e04ee14de Added phpstan as local dev dependency 2023-10-01 21:46:33 +02:00
Jan Böhmer
469f9e8933 Do not redirect missing API prefixed routes to a localized version 2023-10-01 16:07:42 +02:00
Jan Böhmer
c49aff5cfc Removed GraphQL endpoint 2023-10-01 15:57:18 +02:00
Jan Böhmer
39009a71d5 Bumped version to 1.7.2 2023-09-24 19:54:35 +02:00
Jan Böhmer
0430178fe2 Fixed issue when the data is null. 2023-09-24 15:42:44 +02:00
Jan Böhmer
cf9df883c9 Updated dependencies 2023-09-24 15:36:07 +02:00
Jan Böhmer
198befe2bc Allow to dynamically create elements with purely numeric names in a selector type
Before this was not possible, as this was messed up with the DB ids. Now we prefix the new created values with a special prefix, to mark them as new.

This fixes issue #381
2023-09-24 15:28:35 +02:00
Jan Böhmer
7195bd6cd6 Increased user avatar max file size from 2M to 5M 2023-09-24 14:46:51 +02:00
Jan Böhmer
a5fa2da80c Show the languages from the language selector as preffered in language select on user settings page 2023-09-24 14:45:12 +02:00
Jan Böhmer
593d37f37c Added italien to language selector navbar menu 2023-09-24 14:42:21 +02:00
Jan Böhmer
2ddd6753ca Merge remote-tracking branch 'origin/l10n_master' 2023-09-24 14:40:31 +02:00
Jan Böhmer
9537c4f210 New translations messages.en.xlf (Italian) 2023-09-24 12:50:18 +02:00
Jan Böhmer
e0ce6ba165 New translations messages.en.xlf (Italian) 2023-09-24 11:50:16 +02:00
Jan Böhmer
ee50ce26f8 Merge remote-tracking branch 'origin/master' 2023-09-23 23:08:55 +02:00
Jan Böhmer
94a6de4a90 Fixed wrong literal in italian translation, which caused an exception. 2023-09-23 23:08:46 +02:00
Jan Böhmer
d5902314c3
New Crowdin updates (#378)
* New translations messages.en.xlf (French)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations validators.en.xlf (Italian)

* New translations security.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)
2023-09-23 23:06:06 +02:00
Jan Böhmer
ccb94c8a13 Fixed problem that all properties in snake_case style were considered readOnly by API Platform 2023-09-19 23:52:11 +02:00
Jan Böhmer
f285061a76 Allow to view and edit parameters of elements 2023-09-19 11:44:22 +02:00
Jan Böhmer
78a6262665 Fixed PHPstan issues 2023-09-19 00:00:25 +02:00
Jan Böhmer
8a13799829 (Hopefully) fix static analysis github action 2023-09-18 23:57:28 +02:00
Jan Böhmer
34059ad99d Added API endpoints for attachment types 2023-09-18 23:46:42 +02:00
Jan Böhmer
87e881f8e0 Show attachments and preview image in API response 2023-09-18 23:38:06 +02:00
Jan Böhmer
1823bc6528 Added url to media file and thumbnail to attachments 2023-09-18 22:16:09 +02:00
Jan Böhmer
077beb37b1 Added endpoints for attachments 2023-09-18 21:57:17 +02:00
Jan Böhmer
8182e83846 Added some helper functions to make it easier to parse Pricedetails 2023-09-18 21:37:21 +02:00
Jan Böhmer
59f62d4a4c Show lots, order and pricedetails in part response 2023-09-18 21:31:55 +02:00
Jan Böhmer
60125534ec
New Crowdin updates (#370)
* New translations validators.en.xlf (French)

* New translations messages.en.xlf (German)

* New translations validators.en.xlf (German)

* New translations messages.en.xlf (Italian)

* New translations validators.en.xlf (Italian)

* New translations security.en.xlf (Italian)

* New translations messages.en.xlf (Japanese)

* New translations validators.en.xlf (Japanese)

* New translations messages.en.xlf (Russian)

* New translations validators.en.xlf (Russian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (English)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)

* New translations messages.en.xlf (Italian)
2023-09-18 19:41:01 +02:00
dependabot[bot]
48385cadc9
Bump docker/build-push-action from 4 to 5 (#375)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 4 to 5.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 19:40:49 +02:00
dependabot[bot]
ba6abe6ca7
Bump docker/setup-buildx-action from 2 to 3 (#374)
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 19:40:43 +02:00
dependabot[bot]
79ad243bf4
Bump actions/checkout from 3 to 4 (#361)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 19:40:33 +02:00
dependabot[bot]
5ab21e019d
Bump docker/metadata-action from 4 to 5 (#376)
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 4 to 5.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Upgrade guide](https://github.com/docker/metadata-action/blob/master/UPGRADE.md)
- [Commits](https://github.com/docker/metadata-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 19:40:23 +02:00
dependabot[bot]
d8469efba2
Bump docker/setup-qemu-action from 2 to 3 (#377)
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 2 to 3.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-18 19:40:13 +02:00
Jan Böhmer
43c15de55c Added SQLite migrations for API tokens 2023-09-18 16:36:08 +02:00
Jan Böhmer
d2144a1fed Added possibility to add a change comment to changes via the API 2023-09-18 13:24:33 +02:00
Jan Böhmer
915444b5da Added documentation about pagination and property filter to API docs. 2023-09-18 13:02:45 +02:00
Jan Böhmer
6387c24c89 Added some documentation to the API 2023-09-18 12:48:16 +02:00
Jan Böhmer
f01ec9dbe4 Improved documentation of entity fields 2023-09-17 12:50:32 +02:00
Jan Böhmer
219fbe5fca Added API endpoints for orderdetails and pricedetails 2023-09-17 11:24:33 +02:00
Jan Böhmer
64db3ed965 Update dependencies 2023-09-17 11:24:12 +02:00
Jan Böhmer
deec059a38 Merge branch 'master' into api 2023-09-17 10:32:25 +02:00
Jan Böhmer
316b09ddf3 Bumped version to 1.7.1 2023-09-09 23:20:09 +02:00
Jan Böhmer
866ef73774 Upgraded dependencies 2023-09-09 23:19:44 +02:00
Jan Böhmer
138d5c6e0f Merge remote-tracking branch 'origin/l10n_master' 2023-09-09 23:05:29 +02:00
Jan Böhmer
4bed50d894 Allow database migration from legacy versions even if the perms_label column is missing in the groups table
This fixes issue #366 and #67
2023-09-09 23:04:50 +02:00
Jan Böhmer
4e57750214 Added endpoint for storage locations 2023-09-04 23:05:30 +02:00
Jan Böhmer
3738cb6025 Fixed error in paramater discriminator map 2023-09-04 23:01:54 +02:00
Jan Böhmer
0af5a58dbe Renamed Storelocation entity to StorageLocation 2023-09-04 22:57:40 +02:00
Jan Böhmer
09acca950d Added simple endpoint for basic part infos and partlots 2023-09-03 23:58:09 +02:00
Jan Böhmer
e04b635c98 Added API endpoints for more data structures 2023-09-03 17:15:18 +02:00
Jan Böhmer
9bd1b86f6e Updated dependencies 2023-09-03 13:47:11 +02:00
Jan Böhmer
17b49e7ae5 Added security to manufacturer and suppliers API endpoint 2023-08-28 23:46:55 +02:00
Jan Böhmer
7b6ba37667 Allow to cache support status of voters
This should increase the performance a bit
2023-08-28 23:06:37 +02:00
Jan Böhmer
879b702fc1 Fixed PHPunit tests 2023-08-28 22:47:15 +02:00
Jan Böhmer
f265b9d19d Fixed PHPstan issues 2023-08-28 22:39:29 +02:00
Jan Böhmer
6be55d1837 Use the new VoterHelper in voters 2023-08-28 22:00:25 +02:00
Jan Böhmer
fc6643bd6f Added system to restrict permissions based on API token level 2023-08-28 21:20:59 +02:00
Jan Böhmer
55943f5d8f
Fixed wrong env documentation for TME and digikey provider
This fixes issue #359
2023-08-28 12:08:47 +02:00
Jan Böhmer
56d120cd08 Fixed styling of no API tokens yet message 2023-08-26 23:21:28 +02:00
Jan Böhmer
3e693642b6 Allow to delete API tokens 2023-08-26 23:19:35 +02:00
Jan Böhmer
8fe3f4cf5c Added permissions to control access to API and manage API tokens 2023-08-26 22:57:50 +02:00
Jan Böhmer
be14fe548c Updated composer dependencies. 2023-08-26 22:16:49 +02:00
Jan Böhmer
85f3ba6aaa Merge branch 'master' into api 2023-08-26 22:15:12 +02:00
Jan Böhmer
133652c296 Fixed PHPstan issues 2023-08-23 22:05:16 +02:00
Jan Böhmer
b9331ac1ef Prevent indexing through search engines, if we are not in demo mode 2023-08-23 22:01:39 +02:00
Jan Böhmer
08f7b2cc87 New translations security.en.xlf (English) 2023-08-23 21:51:37 +02:00
Jan Böhmer
1a2bdaf8e5 New translations validators.en.xlf (English) 2023-08-23 21:51:36 +02:00
Jan Böhmer
d81dec78ae New translations messages.en.xlf (English) 2023-08-23 21:51:35 +02:00
Jan Böhmer
f78bd03521 New translations messages.en.xlf (German) 2023-08-23 21:51:29 +02:00
Jan Böhmer
6aa16272d8 Merge remote-tracking branch 'origin/l10n_master' 2023-08-23 21:24:45 +02:00
Jan Böhmer
e80f7c08ab Bumped version to 1.7.0 2023-08-23 21:24:09 +02:00
Jan Böhmer
675f05f0fb Updated dependencies 2023-08-23 21:23:34 +02:00
Jan Böhmer
b1f23e1684 Added some documentation about the update notification 2023-08-23 21:06:10 +02:00
Jan Böhmer
d612164885 Added that clearing the octopart oauth token is required after changing octopart clientID
See discussion in issue #329. Maybe we will implement a better (more automatic) way to solve this.
2023-08-23 21:00:04 +02:00
Jan Böhmer
b257e1d5f7 New translations messages.en.xlf (German) 2023-08-23 20:51:29 +02:00
Théophile Bornon
f26776ecd5
Fix wrong environment variable name (#355)
For Octopart, the secret must be set inside the PROVIDER_OCTOPART_SECRET instead of PROVIDER_OCTOPART_CLIENT_SECRET
2023-08-23 20:46:26 +02:00
Jan Böhmer
bf4a23652c New translations messages.en.xlf (Chinese Simplified) 2023-08-22 08:00:22 +02:00
Jan Böhmer
e7681aedb1 New translations messages.en.xlf (English) 2023-08-21 23:20:48 +02:00
Jan Böhmer
098fcb29fb Upgraded dependencies 2023-08-21 23:17:42 +02:00
Jan Böhmer
eb46ea19e3 Make update checking mechanism more resilient against connection errors 2023-08-21 23:11:12 +02:00
Jan Böhmer
99ee05a90f Allow to configure update checking utility via env 2023-08-21 22:57:45 +02:00
Jan Böhmer
fd31f983af Fixed positioning of the part row selection checkboxes 2023-08-21 22:52:11 +02:00
Jan Böhmer
80bae4167f Added button to inverse part selection in tables
Fix issue #346
2023-08-21 22:49:02 +02:00
Andy
eaee4af715
Update installation_guide-debian.md (#352)
Fixed a typo: (link to configuration.md)
2023-08-21 17:06:12 +02:00
Jan Böhmer
7d4723c3e4 New translations messages.en.xlf (English) 2023-08-20 23:30:41 +02:00
Jan Böhmer
33a0981981 Added possibility to ignore the checks of withdraw amount when building projects
This fixes #349
2023-08-20 23:23:18 +02:00
Jan Böhmer
b62dc1241d Fix parameter mapping on part creation dialog to fix add builds part
This fixes issue #348
2023-08-20 20:30:38 +02:00
Jan Böhmer
e2270aec38 Upgraded further JS packages 2023-08-20 13:03:09 +02:00
Jan Böhmer
73346fcdaf Upgraded dependencies 2023-08-20 12:51:50 +02:00
Jan Böhmer
7b112512a9 Prevent that an administrator can lockout himself accidentally out of the user interface by using one of the permission presets 2023-08-20 12:42:56 +02:00
Jan Böhmer
0e5613b57b Forbid access to homepage if a user has no allow permission
This allows to block access to everything (even the homepage) for anonymous access. This fixes issue #290
2023-08-20 12:33:08 +02:00
Jan Böhmer
e66ff40733 Use the column order stored in localStorage during the initial datatables ajax call.
This way we still have the right ordering when changing pages. This fixes issue #345
2023-08-20 00:41:44 +02:00
Jan Böhmer
73d61f7440 Fixed PartKeepr import for storagelocation attachments
This should fix issue #334
2023-08-19 23:52:22 +02:00
Jan Böhmer
35a0e8464a Added possibility to list all available API keys at the user settings page 2023-08-19 23:19:21 +02:00
Jan Böhmer
040e86ea6d Added API endpoint to get info about the API token currently used to authenticate the user 2023-08-17 00:36:25 +02:00
Jan Böhmer
8dad143f8d Added own APIToken authenticator, so we can wrap the used API token inside the symfony security token 2023-08-17 00:17:02 +02:00
Jan Böhmer
bcd41c4d9b Added possibility to authenticate with the given API token 2023-08-16 00:13:01 +02:00
Jan Böhmer
3bc6e61869 Added very basic system to add API tokens to an user 2023-08-15 23:36:56 +02:00
Jan Böhmer
3486957447 Added endpoint for suppliers 2023-08-06 20:57:32 +02:00
Jan Böhmer
6b5c51bdc5 Improved schema infos of Manufacturer endpoints 2023-08-06 20:50:19 +02:00
Jan Böhmer
676c8eeefb Added basic API to access and edit manufacturer entities 2023-08-06 20:18:57 +02:00
Jan Böhmer
f5a15b23d6 Improved PartDB Info endpoint 2023-08-06 18:33:21 +02:00
Jan Böhmer
6d3b0261b3 Added first API endpoint 2023-08-06 00:42:34 +02:00
Jan Böhmer
dedb3071d6 New translations messages.en.xlf (English) 2023-08-05 00:10:52 +02:00
Jan Böhmer
a43ee52086 Fixed static analysis issues 2023-08-05 00:07:42 +02:00
Jan Böhmer
97ccb0cb21 Allow to globally disable update checking/connection with Github 2023-08-04 23:55:41 +02:00
Jan Böhmer
1fb334b0ca Show a notification on homepage and server info page if there is a new version available. 2023-08-04 23:49:26 +02:00
Jan Böhmer
fa4af99525 RELEASE v1.6.1 2023-08-01 16:21:25 +02:00
Jan Böhmer
b3153dac68 Fixed static analysis issue and added test for UserRepository 2023-08-01 16:20:31 +02:00
Jan Böhmer
c981476706 Use proper way of overriding doctrine attributes
In older versions doctrine allowed overriding attributes, by simply redifining them in subclasses. In 2.16 this throws an exception. We now use the proper way using the AttributeOverrides attribute
2023-08-01 15:55:21 +02:00
Jan Böhmer
1a3e5ec705 Updated dependencies
The commit order changes were merged into doctrines main branch, so we can now use the official release instead of the development branch again.
2023-08-01 15:34:37 +02:00
Jan Böhmer
aaff0835a3 Renmed SAMLP_SP_PRIVATE_KEY to SAML_SP_PRIVATE_KEY
Now it matches the documented value and follows the naming schema. The old env name is still valid, to maintain backwards compatibility.

Fixes issue #339
2023-08-01 15:31:40 +02:00
Jan Böhmer
9bf814d4cd Fixed error when StructuralEntityChoice type was used for non structural entities. 2023-08-01 15:14:32 +02:00
Jan Böhmer
b5c0f37f88 Fixed exception on visiting certain group edit pages.
This fixes issue #340
2023-08-01 15:06:57 +02:00
Jan Böhmer
05d73d2f68 RELEASE v1.6.0 2023-08-01 00:22:29 +02:00
Jan Böhmer
ff284d056c Updated dependencies. 2023-08-01 00:22:03 +02:00
Jan Böhmer
2393c759f3 Merge branch 'octopart-ip' 2023-07-31 22:43:19 +02:00
Jan Böhmer
0a983513ea Added documentation for the octopart provider. 2023-07-31 22:43:14 +02:00
Jan Böhmer
c737348cea Dont skip the Sqlite migration. Do nothing instead
Before this migration was never finished and always re executed on subsequent migration attempts.
2023-07-31 22:30:02 +02:00
Jan Böhmer
e8e2258357 Added migration for SQLite 2023-07-31 22:28:19 +02:00
Jan Böhmer
d847b74522 Reenable caching for part provider system. 2023-07-31 22:21:20 +02:00
Jan Böhmer
5750e7dbdf Fixed exception if octopart did not returned an category for a part 2023-07-31 22:21:08 +02:00
Jan Böhmer
ffe76f9d2e Use full path for categories returned by Octopart 2023-07-31 22:17:24 +02:00
Jan Böhmer
5b1ad541a8 Added an caching layer to octopart provider to reduce API queries. 2023-07-31 22:11:46 +02:00
Jan Böhmer
4824a82c3f Fixed error, when octopart search got no results 2023-07-31 01:00:34 +02:00
Jan Böhmer
f7cea1100c Allow to configure various options of the octopart provider 2023-07-31 00:57:33 +02:00
Jan Böhmer
827dd01e28 Get shopping informations from octopart 2023-07-31 00:13:59 +02:00
Jan Böhmer
d969f49ecc Get specifications, mass, footprint and manufacturer status from Octopart 2023-07-31 00:01:19 +02:00
Jan Böhmer
0f336b6f89 Allow for longer manufacturer and supplier URLs 2023-07-31 00:00:57 +02:00
Jan Böhmer
43cc37d10f Added very basic octopart info provider 2023-07-30 23:04:18 +02:00
Jan Böhmer
6a00b8e168 Added possibility to manage client_credentials OAuth tokens 2023-07-30 15:24:46 +02:00
Jan Böhmer
1b3fc2c23c Fixed PHPUnit exception 2023-07-29 19:03:46 +02:00
Jan Böhmer
8e96971b9c Merge remote-tracking branch 'origin/l10n_master' 2023-07-29 18:55:48 +02:00
Jan Böhmer
8e39e330fe Updated dependencies. 2023-07-29 18:55:24 +02:00
Jan Böhmer
15ba6572df Try to detect if an external attachment is an image or not.
Before we assumed that it is a picture in all cases.
2023-07-29 18:50:18 +02:00
Jan Böhmer
1c222ff293 Improved attachment name generation from DTO url
We dont include the query paramaters in the name anymore
2023-07-29 18:38:18 +02:00
Jan Böhmer
2fb1ec7f8a New translations messages.en.xlf (German) 2023-07-29 18:10:26 +02:00
Jan Böhmer
70f1db9619 New translations messages.en.xlf (German) 2023-07-29 17:10:30 +02:00
Jan Böhmer
11be65678e Fixed order by FIELD emulation on sqlite via INSTR
We need to search for the comma token separators at both ends of the search term, otherwise the ordering will be wrong.
2023-07-29 17:06:35 +02:00
Jan Böhmer
80ed064cd6 Emulate the field function in SQLIte by using an string search, instead of our PHP function callback 2023-07-29 16:50:47 +02:00
Jan Böhmer
62b1e33616 Fixed field ordering on SQLite 2023-07-29 16:42:27 +02:00
Jan Böhmer
52f2ef6d30 New translations messages.en.xlf (German) 2023-07-28 23:30:26 +02:00
Jan Böhmer
8ace78a873 New translations messages.en.xlf (German) 2023-07-28 11:50:42 +02:00
Jan Böhmer
5c30210534 Fixed some stuff on the emulated Field2 function and added tests 2023-07-27 00:38:17 +02:00
Jan Böhmer
1d03b6c38d Added tests for sqlite emulated functions 2023-07-26 23:39:53 +02:00
Jan Böhmer
d3ead8742e Implement a special field2 function, to migitiate the argument count limit in sqlite
This fixes issue #332 on SQLite DBs
2023-07-26 23:23:25 +02:00
Jan Böhmer
ed6b0057b7 Make the manufacturer field optional on part manufacturer data during Partkeepr import
This should fix issue #333
2023-07-26 22:55:18 +02:00
Jan Böhmer
90fbcb88d8 Updated dependencies 2023-07-23 23:22:00 +02:00
Jan Böhmer
be2ed52d93 Fixed phpstan issues 2023-07-23 23:04:45 +02:00
Jan Böhmer
f1af19a52a Fixed wrong background color for structural links 2023-07-23 23:02:04 +02:00
Jan Böhmer
4c4501073c Use a two step approach to retrieve part tables
This allows us to combine the fast filtering with the fetch joins, which should speed up the datatables a lot.
2023-07-23 21:48:38 +02:00
Jan Böhmer
b8b9a416ac Fixed wrong type of the supplier filter 2023-07-23 21:33:50 +02:00
Jan Böhmer
fc7e436ca9 Improved image and attachment viewing on part info page 2023-07-23 01:32:28 +02:00
Jan Böhmer
1de1eebc59 Fixed PHPstan issues 2023-07-23 01:20:38 +02:00
Jan Böhmer
a4d411656b Added a field extension for SQLite and let the database sort the elements by the given ID order directly 2023-07-23 01:19:48 +02:00
Jan Böhmer
1ec4266f96 Fixed sorting for element choice type and added tests 2023-07-23 01:01:29 +02:00
Jan Böhmer
61f02d693f Added info about alternative names to info provider documentation 2023-07-23 00:29:16 +02:00
Jan Böhmer
cd80552ce7 Fixed PHPstan issues 2023-07-23 00:14:29 +02:00
Jan Böhmer
d59b8817c3 Do not use fetch join, as even with the N+1 problem the queries are faster than with the very complex and slow expressions needed for the fetch Join pagination 2023-07-22 23:51:06 +02:00
Jan Böhmer
8ce5f4a796 Do not cache entities directly in NodesListBuilder but cache only the IDs instead
Otherwise the doctrine proxies break, and we get issues with loading the preview_images in structural Elements.
2023-07-20 23:20:46 +02:00
Jan Böhmer
2e8cb35acc Use ManyToOne instead of OneToOne for master_picture_attachment like before 2023-07-20 21:54:13 +02:00
Jan Böhmer
c0f626e9bd Fixed phpstan issue 2023-07-19 23:01:29 +02:00
Jan Böhmer
2ddfe48aba Do the doctrine definitions of the master preview attachment in the sub classes
This makes lazy fetching works and saves some db queries.
2023-07-19 22:49:40 +02:00
Jan Böhmer
2c6de84c9a Only check every 10 minutes if the user needs to setup a 2FA method enforced by its group
That saves us 3 database queries on many requests.
2023-07-19 00:56:28 +02:00
Jan Böhmer
87cf4c2d08 Do a extra lazy fetch on webauthn and u2f keys property of a user
In the most cases we just need the count of them and not the exact details. This just gives as a bit better performance on most requests
2023-07-19 00:20:38 +02:00
Jan Böhmer
3a8c835880 Lazily sort info providers list, to prevent unneccesarry work on most container calls 2023-07-19 00:11:19 +02:00
Jan Böhmer
e2dbd3d873 Fixed bug, that prevented all related history entries for an element
As the query param had the same name for each iteration, it got overwritten every time
2023-07-19 00:01:42 +02:00
Jan Böhmer
55aabddd41 Allow to sort by user in log data table 2023-07-18 23:45:52 +02:00
Jan Böhmer
eb07820523 Fixed issue that prevented undo changes from being logged 2023-07-18 23:42:01 +02:00
Jan Böhmer
8116217019 Fixed exception when undo/revert to a change which contained a change to a enum property 2023-07-18 23:34:45 +02:00
Jan Böhmer
6fb1845ff7 Use fixed version of jbtronics/2fa-webauthn-bundle 2023-07-17 23:46:12 +02:00
Jan Böhmer
75325f0ed8 Added some trademark disclaimer to Part-DB documentation 2023-07-17 23:28:24 +02:00
Jan Böhmer
0577f9e166 Added some documentation about caching 2023-07-17 23:25:22 +02:00
Jan Böhmer
52c6884e28 Allow slashes in digikey product ids 2023-07-17 23:21:30 +02:00
Jan Böhmer
2be76a488f Added documentation for part provider system 2023-07-17 23:14:35 +02:00
Jan Böhmer
686535fe42 New translations messages.en.xlf (English) 2023-07-17 00:53:09 +02:00
Jan Böhmer
5c17aee1e4 Properly escape group table name
Otherwise MySQL 8 will not be able to use this schema
2023-07-17 00:49:25 +02:00
Jan Böhmer
9b35ac3a99 Updated yarn dependencies. 2023-07-17 00:45:46 +02:00
Jan Böhmer
59b78e850f Merge branch 'part_info_provider_integration' 2023-07-17 00:43:51 +02:00
Jan Böhmer
3a8c5a788f Fixed phpstan issues 2023-07-17 00:43:35 +02:00
Jan Böhmer
afcbbe0f43 Fixed phpunit tests 2023-07-17 00:34:00 +02:00
Jan Böhmer
d10d29e590 Do not enable the create part from provider permission automatically
This allows users to create new datastructures, which is maybe not wanted. Besides it has to be configured first.
2023-07-17 00:20:38 +02:00
Jan Böhmer
7b61cb3163 Added more env variables to configure providers 2023-07-17 00:19:02 +02:00
Jan Böhmer
4c1c6701b3 Test availability of the info provider pages 2023-07-16 23:56:30 +02:00
Jan Böhmer
f423fdf7f8 Fixed bug in DB schema, which prevented the creation of parts without info provider reference 2023-07-16 23:48:55 +02:00
Jan Böhmer
a5995a2ce8 Centralized logic for part creation form 2023-07-16 23:46:20 +02:00
Jan Böhmer
c810b6772c Show the value returned by the provider on part creation page.
This makes it easier to check or assign a element manually
2023-07-16 23:19:02 +02:00
Jan Böhmer
b74ab18a6d Added possibility to define alternative names on data structures
This can be used to find elements, based on the data returned by info providers
2023-07-16 22:59:46 +02:00
Jan Böhmer
edc54aaf91 Added migrations for sqlite and new additional_names field 2023-07-16 20:47:25 +02:00
Jan Böhmer
b3b205cd6e Added permissions to control access to info providers and oauth tokens 2023-07-16 20:33:24 +02:00
Jan Böhmer
2fe4def775 New translations messages.en.xlf (Chinese Simplified) 2023-07-16 20:30:24 +02:00
Jan Böhmer
7bbf612394 Fixed title of info providers list 2023-07-16 20:09:20 +02:00
Jan Böhmer
97ab1f0492 Improved search page 2023-07-16 20:05:11 +02:00
Jan Böhmer
81bfcdd158 New translations messages.en.xlf (Chinese Simplified) 2023-07-16 19:30:23 +02:00
Jan Böhmer
6862d318f0 Cache the DTO objects returned by the info providers
This saves API requests
2023-07-16 19:05:26 +02:00
Jan Böhmer
412fa3f0bf Get datasheets and category from digikey 2023-07-16 18:35:44 +02:00
Jan Böhmer
01d9109c45 Improved digikey provider 2023-07-16 17:10:48 +02:00
Jan Böhmer
dd914d1d64 New translations messages.en.xlf (Chinese Simplified) 2023-07-16 16:56:03 +02:00
Jan Böhmer
5cf3624a3a New translations messages.en.xlf (Chinese Simplified) 2023-07-16 13:20:24 +02:00
Jan Böhmer
c7ff8c2dd1 New translations messages.en.xlf (Chinese Simplified) 2023-07-16 12:20:29 +02:00
Jan Böhmer
83c202d675 New translations messages.en.xlf (Chinese Simplified) 2023-07-16 11:20:25 +02:00
Jan Böhmer
f7648e3311 Added an button to connect the oauth providers from WebUI 2023-07-16 03:18:33 +02:00
Jan Böhmer
c203de082e Added proper OAuth authentication for digikey and other providers 2023-07-16 03:07:53 +02:00
Jan Böhmer
a95ba1acc4 Add a reference to the used info provider to a part 2023-07-16 01:24:49 +02:00
Jan Böhmer
db325525e4 New translations messages.en.xlf (Chinese Simplified) 2023-07-15 22:30:25 +02:00
Jan Böhmer
db97114fb4 Use preview image and other additional images provided by the info provider 2023-07-15 21:41:35 +02:00
Jan Böhmer
b18a300f10 New translations validators.en.xlf (Chinese Simplified) 2023-07-15 21:30:27 +02:00
Jan Böhmer
61ffb857ee New translations messages.en.xlf (Chinese Simplified) 2023-07-15 21:30:26 +02:00
Jan Böhmer
701212239d Use an experimental doctrine/orm version to fix some issues persisting attachments while simutanously creating a new attachment type
The circular reference between attachmentTypeAttachment and attachmentType seems to confuse doctrine. This is fixed in the experimental version
2023-07-15 21:17:10 +02:00
Jan Böhmer
422fa01c6f Use the initial element for database if the value was not changed. 2023-07-15 21:00:45 +02:00
Jan Böhmer
62820b4dd9 New translations validators.en.xlf (Chinese Simplified) 2023-07-15 20:30:54 +02:00
Jan Böhmer
8ea92ef330 Added tests for DTOConverter 2023-07-15 18:18:35 +02:00
Jan Böhmer
de82249d8d Provide footprint information on TMEProvider 2023-07-15 01:52:46 +02:00
Jan Böhmer
94a26ae75a Allow to extract ranges from paramaters 2023-07-15 01:41:29 +02:00
Jan Böhmer
f9fdae9de9 Added an TME data provider 2023-07-15 01:01:20 +02:00
Jan Böhmer
0cb46039dd Allow to retrieve price and shopping informations from info providers 2023-07-14 00:09:22 +02:00
Jan Böhmer
c4439cc9db Mark newly created entities better in structural entity selector 2023-07-12 23:58:40 +02:00
Jan Böhmer
6cd9640b30 Allow to automatically find or create entities from database based on info providers 2023-07-12 23:43:16 +02:00
Jan Böhmer
f9bce3dfdb Merge branch 'master' into part_info_provider_integration 2023-07-11 22:04:06 +02:00
Jan Böhmer
8eb0c997ed Updated dependencies 2023-07-11 22:01:32 +02:00
Jan Böhmer
a8f96e06bd Automatically whitelist the SAML IIDP domain for external redirect
This fixes issue #318
2023-07-11 21:50:55 +02:00
Jan Böhmer
9a2945927f New translations security.en.xlf (Chinese Simplified) 2023-07-10 23:36:28 +02:00
Jan Böhmer
89f9249ec6 New translations messages.en.xlf (Chinese Simplified) 2023-07-10 23:36:27 +02:00
Jan Böhmer
24f572253f New translations messages.en.xlf (Chinese Simplified) 2023-07-10 22:36:25 +02:00
Jan Böhmer
4fc9c19893 Removed useless tabs in code blocks in installation guide 2023-07-10 13:26:07 +02:00
Jan Böhmer
f6fcd730a8 Added how you checkout a stable release in the installation guide
Related to discussion #317
2023-07-10 13:20:44 +02:00
Jan Böhmer
716a56979d Added basic possibilty to create parts based on infoProviders 2023-07-09 23:31:40 +02:00
Jan Böhmer
538476be99 Added a info provider for element14/Farnell 2023-07-09 18:51:54 +02:00
Jan Böhmer
93a170a893 Added basic search system in info providers 2023-07-09 17:55:41 +02:00
Jan Böhmer
e0301f096f Added an very basic system to configure info providers 2023-07-09 14:27:41 +02:00
Jan Böhmer
9e3cb4d694 Use enum for manufacturing status 2023-07-08 23:49:47 +02:00
Jan Böhmer
49b76c3e43 New translations messages.en.xlf (English) 2023-07-08 23:16:14 +02:00
Jan Böhmer
9962784991 New translations messages.en.xlf (Chinese Simplified) 2023-07-08 23:16:12 +02:00
Jan Böhmer
6336b38cfc Bumped version to 1.6.0-dev 2023-07-08 23:07:33 +02:00
Jan Böhmer
2362835275 Merge branch 'user_impersonator' 2023-07-08 23:07:12 +02:00
Jan Böhmer
8a4ede9d43 Write to event log, when a user gets impersonated 2023-07-08 23:07:06 +02:00
Jan Böhmer
cc1595e048 Added button to user admin to impersonate a certain user 2023-07-08 22:43:41 +02:00
Jan Böhmer
ca16763423 Bumped version to 1.5.1 2023-07-08 21:11:55 +02:00
Jan Böhmer
b6dd5bb881 Fixed ordering columns of tables when columns were reordered 2023-07-08 20:16:52 +02:00
Jan Böhmer
f8e299ec56 Added new env option to show all parts on a page by default
Related to discussion #312
2023-07-08 19:33:23 +02:00
Jan Böhmer
91e9c6e048 Use bootstrap popover for title attribute in datatables 2023-07-08 19:08:00 +02:00
Jan Böhmer
b941b97eee Show full paths of elements on hover in part tables
Related to discussion #312
2023-07-08 19:02:43 +02:00
Jan Böhmer
d38ac652fc Do not cut QR code on small label pages
Fixes issue #314
2023-07-08 18:46:29 +02:00
Jan Böhmer
bdcf3b71ce Fixed exception when parameter constraint unit field is empty 2023-07-08 18:39:44 +02:00
Jan Böhmer
ddbf8b7725 Fixed phpstan issue 2023-07-04 00:35:57 +02:00
Jan Böhmer
a6fd4547a7 Bumped version to 1.5.1 2023-07-04 00:31:37 +02:00
Jan Böhmer
d20153c569 Added basic logic for impersonation 2023-07-04 00:31:13 +02:00
Jan Böhmer
15e072a2ff Fixed exception when the calculated minimum_order_price is null
This fixes issue #311
2023-07-03 23:41:39 +02:00
Jan Böhmer
f98e20aa84 Fixed errors importing partkeepr databases 2023-07-03 23:33:45 +02:00
Jan Böhmer
e7a1b33ae6 Allow to set the exchange rate of a currency to null (not existing) after it was set once 2023-07-03 22:15:58 +02:00
Jan Böhmer
2d5f23271f Force that an currency has an iso currency code
Otherwise it will crash a lot of formatter code (and a currency which is not existing is not really useful)
2023-07-03 22:11:12 +02:00
Jan Böhmer
059110ae7a Improved styling of a info level flash toast in darkmode 2023-07-03 22:01:39 +02:00
Jan Böhmer
ac84c175af Bumped version to 1.5.0 2023-07-03 00:59:12 +02:00
Jan Böhmer
3b6014c229 Updated dependencies 2023-07-03 00:58:43 +02:00
Jan Böhmer
9cb265c6f5 Improved margin between darkmode label and darkmode selector 2023-07-03 00:55:11 +02:00
Jan Böhmer
a47f0ccc12 Fixed phpstan issue 2023-07-03 00:38:14 +02:00
Jan Böhmer
e032f6b33d Use root node of sidebar trees as link to link to all parts list 2023-07-03 00:34:37 +02:00
Jan Böhmer
98e179ba06 Validate bom when adding additional bom entries via addPart controller to prevent invalid BOMs
This fixes issue #302
2023-07-03 00:28:37 +02:00
Jan Böhmer
2ebb4fef4c Added some tests to constraint validators 2023-07-02 23:59:06 +02:00
Jan Böhmer
e72b120c12 Use new UniqueObjectCollection constraint to ensure that BOM entries does not contain duplicate items 2023-07-02 20:49:10 +02:00
Jan Böhmer
7b87b00b44 Properly reset the page length when reloading a datatable
Fixes issue #309
2023-07-02 19:44:26 +02:00
Jan Böhmer
2b793bf242 Fixed tests 2023-07-02 17:46:09 +02:00
Jan Böhmer
49ae906029 Allow to directly specify the scanned string via an input query parameter 2023-07-02 14:16:32 +02:00
Jan Böhmer
4f82a0f026 Fixed qr code scan URL paths 2023-07-02 14:03:29 +02:00
Jan Böhmer
ae8edffdc8 Put the dompdf fonts and temp files in a folder inside var/dompdf, which should always be writable by the server process 2023-07-02 13:57:15 +02:00
Jan Böhmer
2b67c1c631 Use development version of dompdf, so we can use character level fallback fonts for dompdf
This is useful, so mixed character text is always shown and you not need to explicitly select unifont as font
2023-07-02 03:36:42 +02:00
Jan Böhmer
d395cf66a0 Fixed problem with label additional styles for labels 2023-07-02 03:28:17 +02:00
Jan Böhmer
956ed9e8ae Added GNU unifont as fallback font for labels with CJK characters 2023-07-02 03:26:56 +02:00
Jan Böhmer
63726b09d6 New translations security.en.xlf (English) 2023-06-30 00:26:50 +02:00
Jan Böhmer
f78d42cc30 New translations validators.en.xlf (English) 2023-06-30 00:26:49 +02:00
Jan Böhmer
5d1c807a86 New translations messages.en.xlf (English) 2023-06-30 00:26:48 +02:00
Jan Böhmer
fad077aad9 New translations security.en.xlf (Chinese Simplified) 2023-06-30 00:26:47 +02:00
Jan Böhmer
24f47bee73 New translations validators.en.xlf (Chinese Simplified) 2023-06-30 00:26:46 +02:00
Jan Böhmer
d93b7b2cb2 New translations messages.en.xlf (Chinese Simplified) 2023-06-30 00:26:45 +02:00
Jan Böhmer
ab03111a84 New translations security.en.xlf (German) 2023-06-30 00:26:38 +02:00
Jan Böhmer
1ba03b69f6 New translations validators.en.xlf (German) 2023-06-30 00:26:37 +02:00
Jan Böhmer
9957f64628 New translations messages.en.xlf (German) 2023-06-30 00:26:36 +02:00
Jan Böhmer
6505af2a8b Disable translation file linting as it causes problems with empty translation files 2023-06-29 23:37:42 +02:00
Jan Böhmer
54c74bac6e Show in README that we now require PHP 8.1 2023-06-29 23:35:06 +02:00
Jan Böhmer
5cf4c879dd Merge remote-tracking branch 'origin/l10n_master' 2023-06-29 23:32:12 +02:00
Jan Böhmer
aa00db48ce Updated dependencies 2023-06-29 23:31:17 +02:00
Jan Böhmer
4a158db632 New translations messages.en.xlf (German) 2023-06-29 23:26:32 +02:00
Jan Böhmer
f57a0ecba2 Use correct permission name 'show_private' instead of 'show_secure' in templates
This fixes issue #307
2023-06-28 16:30:16 +02:00
Jan Böhmer
3614c82632 Use light background for image on part page 2023-06-28 16:21:03 +02:00
Jan Böhmer
9207d41f17 New translations messages.en.xlf (English) 2023-06-28 16:17:50 +02:00
Jan Böhmer
c5abd0ff3f New translations security.en.xlf (Chinese Traditional) 2023-06-28 16:17:49 +02:00
Jan Böhmer
2c2bde1e05 New translations validators.en.xlf (Chinese Traditional) 2023-06-28 16:17:48 +02:00
Jan Böhmer
dcff8c0d9a New translations messages.en.xlf (Chinese Traditional) 2023-06-28 16:17:47 +02:00
Jan Böhmer
44555e5289 New translations security.en.xlf (Chinese Simplified) 2023-06-28 16:17:45 +02:00
Jan Böhmer
9c4eff68a3 New translations validators.en.xlf (Chinese Simplified) 2023-06-28 16:17:44 +02:00
Jan Böhmer
8f9122c706 New translations messages.en.xlf (Chinese Simplified) 2023-06-28 16:17:43 +02:00
Jan Böhmer
3eb1b476dd New translations messages.en.xlf (Russian) 2023-06-28 16:17:40 +02:00
Jan Böhmer
0de9f48be4 New translations messages.en.xlf (Japanese) 2023-06-28 16:17:37 +02:00
Jan Böhmer
162b482a8b New translations messages.en.xlf (Greek) 2023-06-28 16:17:34 +02:00
Jan Böhmer
2a46358ccf New translations messages.en.xlf (German) 2023-06-28 16:17:31 +02:00
Jan Böhmer
8146d6c293 New translations messages.en.xlf (French) 2023-06-28 16:17:29 +02:00
Jan Böhmer
5ab067cf86 Use password strenght estimator when setting new password after password reset. 2023-06-28 16:12:38 +02:00
Jan Böhmer
720859197c Removed unused controller, which was used for U2F registration before 2023-06-28 16:10:18 +02:00
Jan Böhmer
ce064a0b37 Use symfony/ux-translator to translate password_strength_estimator badges 2023-06-28 16:00:11 +02:00
Jan Böhmer
bfd82fb415 Use zxcvbn-core for password strength estimator and lazy load the controller
As we can now configure the used wordbooks, we can reduce the size of the file extremly
2023-06-28 14:44:29 +02:00
Jan Böhmer
655f656781 New translations messages.en.xlf (English) 2023-06-27 01:20:33 +02:00
Jan Böhmer
3f32841f49 New translations security.en.xlf (Chinese Traditional) 2023-06-27 01:20:32 +02:00
Jan Böhmer
4d7c021925 New translations validators.en.xlf (Chinese Traditional) 2023-06-27 01:20:31 +02:00
Jan Böhmer
ac923fe669 New translations messages.en.xlf (Chinese Traditional) 2023-06-27 01:20:30 +02:00
Jan Böhmer
d35b62995e New translations security.en.xlf (Chinese Simplified) 2023-06-27 01:20:29 +02:00
Jan Böhmer
ae7d2745db New translations validators.en.xlf (Chinese Simplified) 2023-06-27 01:20:28 +02:00
Jan Böhmer
5ff47e63bc New translations messages.en.xlf (Chinese Simplified) 2023-06-27 01:20:27 +02:00
Jan Böhmer
389341f613 New translations validators.en.xlf (Russian) 2023-06-27 01:20:25 +02:00
Jan Böhmer
00b51ad40d New translations messages.en.xlf (Russian) 2023-06-27 01:20:24 +02:00
Jan Böhmer
34c39597f5 New translations validators.en.xlf (Japanese) 2023-06-27 01:20:22 +02:00
Jan Böhmer
4516e75b6f New translations messages.en.xlf (Japanese) 2023-06-27 01:20:21 +02:00
Jan Böhmer
040518cca8 New translations validators.en.xlf (German) 2023-06-27 01:20:17 +02:00
Jan Böhmer
5d336e5fb9 New translations messages.en.xlf (German) 2023-06-27 01:20:16 +02:00
Jan Böhmer
e7d0103869 New translations validators.en.xlf (French) 2023-06-27 01:20:14 +02:00
Jan Böhmer
55cb10910f New translations messages.en.xlf (French) 2023-06-27 01:20:13 +02:00
Jan Böhmer
ecded8af93 Added password meter based on zxcvbn
Maybe we will use a different package later, as this one is very big...
2023-06-27 01:07:26 +02:00
Jan Böhmer
20826daa18 Show a notice flash if the content of labels is empty
This implements the suggestion of issue #297
2023-06-27 00:18:47 +02:00
Jan Böhmer
742f1f4622 Moved add bom entries button to top of BOM table 2023-06-27 00:11:16 +02:00
Jan Böhmer
49cf20545f Fixed exception occuring when deleting an element 2023-06-27 00:10:55 +02:00
Jan Böhmer
289e6f3d1c Added translations for darkmode buttons 2023-06-27 00:02:56 +02:00
Jan Böhmer
b246d17a33 Fixed darkmode in tomselect group headers. 2023-06-26 23:59:44 +02:00
Jan Böhmer
c6b6616ee3 Added internal part number (IPN) as label placeholders
This fixes issue #306
2023-06-26 23:56:23 +02:00
Jan Böhmer
d6500c45aa Use the domain name in server_name field of Google Authenticator QR code
We achieve that by decorating the GoogleAuthenticator service
2023-06-26 23:47:54 +02:00
Jan Böhmer
6fd79688b0 Merge branch 'darkmode-migration' 2023-06-26 23:02:12 +02:00
Jan Böhmer
c6478857bc Improved dark mode 2023-06-26 23:01:32 +02:00
Jan Böhmer
8a711ffecb Added darkmode styles for CKEDITOR 2023-06-26 22:57:36 +02:00
Jan Böhmer
139ea879df Fixed deprecation notices on marked js 2023-06-26 21:48:39 +02:00
Jan Böhmer
6a0968cc02 Updated dependencies. 2023-06-26 21:37:17 +02:00
Jan Böhmer
5a1fa409d8 Do not try to reset autoincrement of sqlite test DB as this somehow cause trouble with loading fixtures... 2023-06-20 02:02:23 +02:00
Jan Böhmer
225da163bb Fixed exception on user settings submission 2023-06-20 01:43:02 +02:00
Jan Böhmer
801ed0fbaf Made tom select dark mode compatible 2023-06-20 01:30:08 +02:00
Jan Böhmer
ea44fe0f16 Fixed indention of structual element 2023-06-20 01:11:41 +02:00
Jan Böhmer
6081fe3295 Fixed darkmode for some elements 2023-06-20 01:01:40 +02:00
Jan Böhmer
6df65a0b9d Implemented a new darkmode selector using bootstrap 5.3 color mode 2023-06-19 01:08:11 +02:00
Jan Böhmer
0aec9419ec Configure fixtures load decorator only for test env, as the base command is not available in production environments (missing dev dependencies) 2023-06-18 23:49:45 +02:00
Jan Böhmer
bb510a9240 Fixed test failure, caused by validation on user element 2023-06-18 22:11:58 +02:00
Jan Böhmer
cce3e1cfb8 Specify order in which the data fixtures should be loaded 2023-06-18 22:06:42 +02:00
Jan Böhmer
4977f6c270 Reset autoincrements on SQLite with our ResetAutoIncrementPurger too and make it default for fixtures load 2023-06-18 22:06:06 +02:00
Jan Böhmer
fe1715259a Updated dependencies 2023-06-18 21:38:02 +02:00
Jan Böhmer
f4c0d84380 Bumped version to 1.5.0-dev 2023-06-18 21:33:42 +02:00
Jan Böhmer
8a20584e27 Use enum for undo mode 2023-06-18 21:26:28 +02:00
Jan Böhmer
218b0adb8f Only enable Choice and InstanceOfConstraints if a value is provided 2023-06-18 21:20:07 +02:00
Jan Böhmer
7d99607919 Use an enum for the part stock change type 2023-06-18 20:42:05 +02:00
Jan Böhmer
9adfcc7aec Use an enum for target_type in log entries 2023-06-18 18:31:39 +02:00
Jan Böhmer
2da7463edf Use a enum for level in LogEntries 2023-06-18 17:25:55 +02:00
Jan Böhmer
4a644d8712 Replaced filter classes getters with public readonly properties to improve DX 2023-06-18 16:41:00 +02:00
Jan Böhmer
afa17ca429 Explicitly convert the database size to an int to prevent type error 2023-06-18 16:12:39 +02:00
Jan Böhmer
50708c6942 Use level 5 of phpstan analysis for CI static analysis 2023-06-18 16:02:50 +02:00
Jan Böhmer
cbdf0a9392 Fixed some errors introduced by earlier typings 2023-06-18 16:01:28 +02:00
Jan Böhmer
b7c8ca2a48 Improved typing and phpdoc type annotations 2023-06-18 15:37:42 +02:00
Jan Böhmer
3817ba774d Ignore the remaining issues 2023-06-18 00:28:21 +02:00
Jan Böhmer
e8771ea118 Fixed some more phpstan issues 2023-06-18 00:00:58 +02:00
Jan Böhmer
2f46fbfc7a Added stricter phpstan checks 2023-06-14 23:14:49 +02:00
Jan Böhmer
78b0e1bf7e Fixed errors when setting setParent on a proxied AbstractStructuralDBElement 2023-06-13 21:00:25 +02:00
Jan Böhmer
19530a9102 Fixed some PHPStan level 5 issues 2023-06-13 20:24:54 +02:00
Jan Böhmer
74051c5649 Exclude tests from phpstan analysis 2023-06-13 19:06:50 +02:00
Jan Böhmer
f3f391ab43 Updated phpstan config 2023-06-13 19:01:19 +02:00
Jan Böhmer
fc75621f1a Fixed DataFixtures 2023-06-13 18:54:18 +02:00
Jan Böhmer
fc3290271c Started to increase the phpstan level 2023-06-13 10:36:34 +02:00
Jan Böhmer
71cd4057a7 Use enums for LabelOptions 2023-06-12 23:39:30 +02:00
Jan Böhmer
485b35fbd4 Fixed static analysis issues 2023-06-11 23:16:07 +02:00
Jan Böhmer
172884ace8 Updated webprofiler bundle 2023-06-11 20:00:25 +02:00
Jan Böhmer
b788c3745c Updated recipe of twig-bundle 2023-06-11 19:59:44 +02:00
Jan Böhmer
7658cfcdbd Updated symfony/stimulus-bridge recipe 2023-06-11 19:58:31 +02:00
Jan Böhmer
52c8ea13af Updated doctrine/annotations recipe 2023-06-11 19:54:50 +02:00
Jan Böhmer
8f424f3273 Removed sensio/framework-extra-bundle as it was abandoned and is not needed anymore 2023-06-11 19:52:43 +02:00
Jan Böhmer
3d7cf8f7f3 Removed remaining annotations 2023-06-11 19:42:02 +02:00
Jan Böhmer
930adaf439 Moved custom validators from annotations to attributes 2023-06-11 19:32:15 +02:00
Jan Böhmer
e5a14557a2 Fixed strict typing errors 2023-06-11 19:05:27 +02:00
Jan Böhmer
6a2ff9d153 Added declare strict types to all files 2023-06-11 18:59:07 +02:00
Jan Böhmer
bea90a7d94 Updated dependencies 2023-06-11 18:27:49 +02:00
Jan Böhmer
e57d6e508a Fixed some serializer deprecations 2023-06-11 18:12:22 +02:00
Jan Böhmer
219b57a362 Fixed some deprecations 2023-06-11 17:38:08 +02:00
Jan Böhmer
df8f54f5a4 Fixed tests for stricter typing 2023-06-11 15:32:29 +02:00
Jan Böhmer
fcbb1849ec Applied rectors phpunit 9 migrations to tests 2023-06-11 15:15:55 +02:00
Jan Böhmer
684334ba22 Improved code style of tests 2023-06-11 15:02:59 +02:00
Jan Böhmer
5629215ce4 Use imports instead of FQNs 2023-06-11 15:00:28 +02:00
Jan Böhmer
f63b6d7207 Fixed service wiring configuration 2023-06-11 14:50:47 +02:00
Jan Böhmer
98dc553938 Applied rector to test files 2023-06-11 14:18:53 +02:00
Jan Böhmer
7ee01d9a05 Applied rector with PHP8.1 migration rules 2023-06-11 14:17:19 +02:00
Jan Böhmer
dc6a67c2f0 Made the ALLOWED_ELEMENT_CLASS protected so we can apply rector
Its bad style to override a public const in a child class
2023-06-11 14:02:59 +02:00
Jan Böhmer
affed459df Updated recipe of doctrine/doctrine-bundle 2023-06-11 13:49:21 +02:00
Jan Böhmer
8d4b8b02b8 Upgraded to symfony 6.3 2023-06-11 13:46:24 +02:00
Jan Böhmer
8c430a3af0 Fixed tests 2023-06-11 13:42:45 +02:00
Jan Böhmer
b7573a40d7 Fixed webauthn two factor authentication 2023-06-11 13:14:45 +02:00
Jan Böhmer
624696711d Merge branch 'master' into php81-migration 2023-06-11 12:20:02 +02:00
Jan Böhmer
56828e9e00 Bumped version to 1.4.2 2023-06-11 00:41:19 +02:00
Jan Böhmer
d2358c9550 Updated dependencies 2023-06-11 00:41:00 +02:00
Jan Böhmer
ab11747fab Fixed issue, that users table were delete while PartKeepr import on certain databases
This fixes issue #299
2023-06-11 00:31:05 +02:00
Jan Böhmer
44cb0fa434 Added a more verbose error message in the case of a pretty generic Database DriverException 2023-06-11 00:20:27 +02:00
Jan Böhmer
13814695ac Add hint to docker logs to error page 2023-06-11 00:12:24 +02:00
Jan Böhmer
377e2eb613 Properly redirect the stdout of php-fpm to the docker logs
This fixes issue #298
2023-06-11 00:09:00 +02:00
Jan Böhmer
bf4725a768 New translations security.en.xlf (Chinese Traditional) 2023-06-09 11:46:55 +02:00
Jan Böhmer
ed65abf786 New translations validators.en.xlf (Chinese Traditional) 2023-06-09 11:46:54 +02:00
Jan Böhmer
8d29fe8679 New translations messages.en.xlf (Chinese Traditional) 2023-06-09 11:46:53 +02:00
Jan Böhmer
f4f77c62c8 New translations security.en.xlf (Chinese Simplified) 2023-06-09 11:46:52 +02:00
Jan Böhmer
2cc08cdea1 New translations validators.en.xlf (Chinese Simplified) 2023-06-09 11:46:52 +02:00
Jan Böhmer
03dc6d63ed New translations messages.en.xlf (Chinese Simplified) 2023-06-09 11:46:51 +02:00
Jan Böhmer
bcb3ccec9a Added translation for security key registration error message 2023-06-07 00:52:13 +02:00
Jan Böhmer
4bec8efea1 Make LogoutLoggerEventSubscriber an event listener 2023-06-07 00:46:03 +02:00
Jan Böhmer
58b2c2bd69 Merge branch 'master' into php81-migration 2023-06-06 23:46:37 +02:00
Jan Böhmer
636776c531 Bumped version to 1.4.1 2023-06-06 23:22:39 +02:00
Jan Böhmer
ca4a33d408 Merge remote-tracking branch 'origin/l10n_master' 2023-06-06 23:21:44 +02:00
Jan Böhmer
9db158f4d4 Updated dependencies 2023-06-06 23:20:51 +02:00
Jan Böhmer
ea8b179df1 Added timetravel URL for PartAttachment elements 2023-06-06 23:16:51 +02:00
Jan Böhmer
efc152e3c8 Do not throw an exception during rendering of log detail page, if element has no time travel URL 2023-06-06 23:15:14 +02:00
Jan Böhmer
e68827bf3b Show a validation error message, when try to submit a form where a input is still set to a disabled value.
Normally this would just send a null to the server, which often cause excptions. We now catch that earlier, and say the user that he have to select another option, when he tries to submit
2023-06-06 23:05:44 +02:00
Jan Böhmer
58bf69882f Updated dependencies. 2023-06-05 22:15:07 +02:00
Jan Böhmer
915f313efd New translations security.en.xlf (English) 2023-05-28 18:05:45 +02:00
Jan Böhmer
52d29099a2 New translations messages.en.xlf (English) 2023-05-28 18:05:44 +02:00
japm48
c06fc926a1
Update translation (#295)
* Update security.en.xlf

* Update messages.en.xlf
2023-05-28 18:02:02 +02:00
Jan Böhmer
79ab1a2277 Fixed various issues inside the tests 2023-05-28 02:16:40 +02:00
Jan Böhmer
7c03630e24 Added DB migration to fix compatibility with latest webauthn bundle 2023-05-28 02:06:48 +02:00
Jan Böhmer
34a65419c7 Use attributes as route provider (instead of annotations) 2023-05-28 01:57:49 +02:00
Jan Böhmer
7191ece7a5 Configure doctrine to use attributes instead of annotations 2023-05-28 01:55:30 +02:00
Jan Böhmer
0837f84a43 Migrated doctrine annotations to attributes 2023-05-28 01:51:13 +02:00
Jan Böhmer
0bc4699cdc Started to move doctrine annotations to attributes (rector automated) 2023-05-28 01:33:45 +02:00
Jan Böhmer
bb1285c35c Remove defaultDescription from commands, as this is now part of the annotation 2023-05-28 01:32:04 +02:00
Jan Böhmer
21fc554589 Fixed error with LogoutLoggerEventSubscriber 2023-05-28 01:25:00 +02:00
Jan Böhmer
a43af180a7 Applied rector rules up to symfony 6.2 2023-05-28 01:21:05 +02:00
Jan Böhmer
88ea920dfb Add rector for automated refactoring 2023-05-28 01:16:12 +02:00
Jan Böhmer
132aac3951 Removed config/bootstrap.php which was left over from symfony 4.4 and which caused problems with phpunit 2023-05-28 01:01:19 +02:00
japm48
7640ed08bc
docker: add missing PassEnv directives (#294) 2023-05-27 23:59:21 +02:00
Jan Böhmer
1dbf36b86b Use str_contains and similar instead of strpos 2023-05-27 23:58:28 +02:00
Jan Böhmer
508de10191 Modernized phpunit.xml.dist 2023-05-27 21:20:21 +02:00
Jan Böhmer
ccfe259c69 Updated recipe of symfony/webpack-encore 2023-05-27 21:05:03 +02:00
Jan Böhmer
0573f80525 Updated symfony/security recipe 2023-05-27 21:04:28 +02:00
Jan Böhmer
8fb4e6c4ee Updated recipe of symfony/recipe 2023-05-27 21:02:59 +02:00
Jan Böhmer
05b2515b3b Updated recipe of symfony/framework-bundle 2023-05-27 21:02:02 +02:00
Jan Böhmer
0ecb339fdf Updated recipe of scheb/2fa bundle 2023-05-27 20:53:34 +02:00
Jan Böhmer
92ddebc289 Updated recipe of php-http/discovery 2023-05-27 20:52:04 +02:00
Jan Böhmer
1a3f0675bf Updated doctrine bundle recipe 2023-05-27 20:51:05 +02:00
Jan Böhmer
c24019fd57 Fixed error preventing the service container from compiling 2023-05-27 20:46:02 +02:00
Jan Böhmer
55641a234c Require PHP 8.1 in composer.json 2023-05-27 20:40:30 +02:00
Jan Böhmer
9f52d364c9 Use newer nbgrp/onelogin-saml-bundle bundle for handling SAML 2023-05-27 20:38:32 +02:00
Jan Böhmer
edce70bc12 Updated symfony to 6.2, updated scheb/2fa bundle and removed obsolete hslavich/oneloginsaml-bundle 2023-05-27 20:35:36 +02:00
Jan Böhmer
b8a7f81f55 Bumped dependencies (dont work yet) 2023-05-27 20:25:51 +02:00
Jan Böhmer
ef9b2aefe5 Set platform in composer.json to PHP 8.1.0 and updated dependencies 2023-05-27 20:10:18 +02:00
Jan Böhmer
cd1413a74e CheckRequirementsCommand now recommends PHP 8.2 2023-05-27 20:07:03 +02:00
Jan Böhmer
4e9d93957e Removed tests for PHP 7.4 and PHP 8.0 2023-05-27 20:06:44 +02:00
Jan Böhmer
9c4e9066f9 Bump to version 1.4.0 2023-05-27 19:29:47 +02:00
Jan Böhmer
b4d1af2bce Merge remote-tracking branch 'origin/l10n_master' 2023-05-27 19:29:28 +02:00
Jan Böhmer
5ec676c40c Fixed static analysis issue 2023-05-27 19:29:00 +02:00
Jan Böhmer
5096aea5bb New translations security.en.xlf (English) 2023-05-27 19:26:51 +02:00
Jan Böhmer
feedd190dc New translations validators.en.xlf (English) 2023-05-27 19:26:51 +02:00
Jan Böhmer
3423fffaca New translations messages.en.xlf (English) 2023-05-27 19:26:50 +02:00
Jan Böhmer
1624fd2e28 New translations security.en.xlf (German) 2023-05-27 19:26:42 +02:00
Jan Böhmer
10b3094d5e New translations validators.en.xlf (German) 2023-05-27 19:26:42 +02:00
Jan Böhmer
580e638f67 New translations messages.en.xlf (German) 2023-05-27 19:26:41 +02:00
Jan Böhmer
e44428f87c Updated dependencies. 2023-05-27 19:24:14 +02:00
Jan Böhmer
379f7ef865 Implemented proper voters for attachments and parameters, so we can decide access for log details 2023-05-27 19:17:27 +02:00
Jan Böhmer
427f6e4d55 Merge remote-tracking branch 'origin/l10n_master' 2023-05-23 23:12:56 +02:00
Jan Böhmer
07a1e9fc3c New translations messages.en.xlf (English) 2023-05-23 23:09:42 +02:00
Jan Böhmer
78d64e8f1b New translations messages.en.xlf (German) 2023-05-23 23:09:32 +02:00
Jan Böhmer
559a9a9f3e New translations messages.en.xlf (German) 2023-05-23 22:45:26 +02:00
Jan Böhmer
ac6dd23fd6 Respect different currencies for pricedetails when importing from PartKeepr 2023-05-22 23:34:58 +02:00
Jan Böhmer
1e515df0b5 Fixed previous commit: Use the same behavior to determine the extension of file attachments like PartKeepr does, to ensure that all attachments are shown as available
This fixes issue #291
2023-05-22 23:06:41 +02:00
Jan Böhmer
35490762a6 Use the same behavior to determine the extension of file attachments like PartKeepr does, to ensure that all attachments are shown as available
This fixes issue #291
2023-05-22 22:55:18 +02:00
Jan Böhmer
c25e23d3d9 New translations messages.en.xlf (English) 2023-05-18 23:36:43 +02:00
Jan Böhmer
8bb8257e62 Added a log entry detail page for collection element deleted log entries. 2023-05-18 23:05:40 +02:00
Jan Böhmer
5f096927bd New translations messages.en.xlf (English) 2023-05-16 00:17:44 +02:00
Jan Böhmer
434826c125 Use default CodeQL workflow which is configured via repo settings and not via a action file 2023-05-16 00:16:50 +02:00
Jan Böhmer
89595cd5dc We are in development of version 1.4.0 now 2023-05-16 00:08:57 +02:00
Jan Böhmer
d991e15a94 Merge branch 'log_detail_page' 2023-05-16 00:08:12 +02:00
Jan Böhmer
6a1aefa5a5 Allow access to log detail page (only) if a user has permission to show_history of an entity 2023-05-16 00:05:54 +02:00
Jan Böhmer
272684e7eb Visualize generic object/JSON data of element history data as pretty tree structure on log detail page 2023-05-15 23:55:36 +02:00
Jan Böhmer
9be3eba694 Added button to delete a log entry via the log detail page. 2023-05-15 23:02:30 +02:00
Jan Böhmer
5a3fc0fb43 Show and link which log entry was undone/reverted on log detail page 2023-05-15 22:42:08 +02:00
Jan Böhmer
47ef8e9568 Updated dependencies 2023-05-15 00:36:36 +02:00
Jan Böhmer
e4285bbc78 delete_btn_controller: Keep the value and name of the original clicked button
This fixes an error message when undoing or reverting a log entry
2023-05-15 00:34:06 +02:00
Jan Böhmer
49b6a42791 Added buttons for revert and undo to the log detail page 2023-05-15 00:16:49 +02:00
Jan Böhmer
b62fd602f2 Show the diff of element edited log entries on detail pages 2023-05-14 23:08:14 +02:00
Jan Böhmer
923e40ed8f Add the data after the change to a element edited log entry, so you can easily view the changes in log detail pages 2023-05-14 21:41:00 +02:00
Jan Böhmer
3c724a227a Merge branch 'master' into log_detail_page 2023-05-14 16:43:52 +02:00
Jan Böhmer
90d26eb16a New translations messages.en.xlf (English) 2023-05-09 01:18:42 +02:00
Jan Böhmer
b629744e1a We are in development of v1.3.4 now 2023-05-09 00:27:18 +02:00
Jan Böhmer
b0ab43c39a Show a proper error message table when encountering an invalid regex statement on SQLite
This is related to #289
2023-05-09 00:26:40 +02:00
Jan Böhmer
2c33b381c1 Allow to unselect name, category, description fields etc in search functionm
Before this commit it was ignored, if the checkboxes for these fields were unchecked.
2023-05-08 23:53:59 +02:00
Jan Böhmer
c50a80e8df Show an error message in table instead of a 500 error when MySQL encounters an invalid Regex expression
This fixes issue #289
2023-05-08 23:42:25 +02:00
Jan Böhmer
bafbd63610 Bumped version to 1.3.3 2023-05-08 00:10:21 +02:00
Jan Böhmer
557347d42d Fixed legacy database migration for newer MySQL version 2023-05-07 21:43:01 +02:00
Jan Böhmer
c828aa3bc0 Use correct table name for test_legacy_import workflow 2023-05-07 02:58:59 +02:00
Jan Böhmer
376d29e829 Use correct table name for test_legacy_import workflow 2023-05-07 02:52:31 +02:00
Jan Böhmer
97ee4f36e3 Fixed typo in legacy import test script 2023-05-07 02:44:07 +02:00
Jan Böhmer
d766f255ef Let job fail, when an error occurs during the legacy test script 2023-05-07 02:38:54 +02:00
Jan Böhmer
19ae9e7456 Fixed issue preventing migration from legacy Part-DB version
This bug was introduced during the fix for issue #260 (commit 2717d7d). With this commit issue #287 should be fixed
2023-05-07 02:29:32 +02:00
Jan Böhmer
61ea312403 Added continous testing for legacy Part-DB import 2023-05-07 02:27:16 +02:00
Jan Böhmer
13193c9368 Fixed issue that searching in part notes were not possible
This fixes issue #288
2023-05-07 01:05:12 +02:00
Jan Böhmer
31e0ce4c64 Updated various yarn dependencies.
We can not upgrade marked to 5.0.0 yet, as it requires node18. We will require this version when we upgrade to PHP 8.1
2023-05-07 00:48:47 +02:00
Jan Böhmer
43238aff0a Updated CKEDITOR to 37.1.0 2023-05-07 00:11:13 +02:00
Jan Böhmer
d598bfc35b Updated dependencies. 2023-05-06 22:25:56 +02:00
Jan Böhmer
1c836918ca Fixed various Partkeepr import issues
On Linux mysql table names can contain uppercase characters, and we expect always lowercase character, so we now normalize the tablenames to lowercase.

Also fixed some type errors on part parameters and improved performace for orderdetails import.

This fixes issue #286
2023-05-02 00:40:00 +02:00
Jan Böhmer
4a6a3b9269 Moved doctrine/data-fixtures to prod requirement
We use it for database purging in partkeepr import command. This fixes issue #285
2023-05-01 23:09:59 +02:00
Jan Böhmer
1534f780aa Show a table with the old data in log entry details page 2023-05-01 01:38:14 +02:00
Jan Böhmer
4c6ceab8e8 Merge branch 'master' into log_detail_page 2023-04-29 22:46:38 +02:00
Jan Böhmer
021e28aca8
Bumped to version 1.3.2 2023-04-29 22:43:03 +02:00
Jan Böhmer
334d81db08 Mark that amount is unknown in part tables and info page
Fixes issue #282
2023-04-29 22:33:46 +02:00
Jan Böhmer
6ffd45a82a We are in development of 1.3.2 now 2023-04-29 22:07:14 +02:00
Jan Böhmer
2fe3902d8d Updated dependencies. 2023-04-29 22:06:13 +02:00
Jan Böhmer
4dceda8251
Bumped version to 1.3.1 2023-04-24 12:01:12 +02:00
Jan Böhmer
09cf33f530 Use another method to submit forms after the delete confirm dialog
The old method caused some weird behavior on Firefox. This fixes issue #273
2023-04-24 01:39:42 +02:00
Jan Böhmer
3e851a65e9 Updated dependencies. 2023-04-24 00:00:31 +02:00
Jan Böhmer
e8ec536a5a Allow to order by storelocation column
Related to discussion #269
2023-04-23 23:38:59 +02:00
Jan Böhmer
967be4451a Reworked keybinding for special character input
Related to issue #275
2023-04-23 23:21:52 +02:00
Jan Böhmer
bc65a18f3c Added greek characters to special characters plugin in CKEDITOR
Fixes #275
2023-04-23 21:20:53 +02:00
Jan Böhmer
1eb9c38aee Fixed problem that MPN was not used as search field
Fixes issue #277 and #276
2023-04-22 23:26:48 +02:00
Jan Böhmer
ccaad1c305 Updated composer dependencies. 2023-04-22 22:34:14 +02:00
Jan Böhmer
963a22783f Use proper implementation of recursion depth limit, that really use the number of recusive calls, not the number of child elements
This fixes issue #267
2023-04-17 23:59:59 +02:00
Jan Böhmer
303a3690e8 Normalize class_names for attachments migrated from legacy Part-DB database
This fixes issue #272
2023-04-17 23:52:08 +02:00
Jan Böhmer
29fa0818f6 We are in development of v1.3.1 2023-04-17 00:56:07 +02:00
Jan Böhmer
1a21a3ed42 Do not use igbinary for cache, as it is causing excpetions with the doctrine proxies 2023-04-17 00:55:41 +02:00
Jan Böhmer
7baad04e39 Updated dependencies 2023-04-16 23:58:03 +02:00
Jan Böhmer
273293479d Hopefully fix phpunit issue on github actions 2023-04-16 01:46:44 +02:00
Jan Böhmer
37fb895d67 Only try to retrieve the targetLot from DB if the parameter is existing
This fixes an excpetion occuring during withdrawal of parts, when moving is disabled for the lot.
2023-04-16 01:22:58 +02:00
Jan Böhmer
0dcdd252f5 Fixed static analysis issues 2023-04-16 00:55:25 +02:00
Jan Böhmer
d04d743520 Fixed typos 2023-04-15 23:14:53 +02:00
Jan Böhmer
63df16a369 Removed unused imports 2023-04-15 22:27:19 +02:00
Jan Böhmer
13209c3236 Improved typing of properties 2023-04-15 22:25:03 +02:00
Jan Böhmer
29d1d49aca Fixed some more inspection issues 2023-04-15 22:05:29 +02:00
Jan Böhmer
de96aae9a5 Fixed inspection issues 2023-04-15 21:49:19 +02:00
Jan Böhmer
5f29ee9052 Fixed some deprecation messages 2023-04-15 21:18:11 +02:00
Jan Böhmer
b3ecee749e Removed deprecated SessionInterface service 2023-04-15 21:07:04 +02:00
Jan Böhmer
1cee1abe00 Fixed some return type deprecation messages 2023-04-15 19:33:39 +02:00
Jan Böhmer
558440168d Fixed LiipImagine deprecation 2023-04-15 19:11:06 +02:00
Jan Böhmer
d0cb7ab486 Fixed deprecated use of FlashBag Service 2023-04-15 19:05:45 +02:00
Jan Böhmer
c317bc020a Theme config migration should now work properly when migrating from legacy DB 2023-04-15 00:51:32 +02:00
Jan Böhmer
4065fb77da Properly escape group table name in legacy DB migration for compatibility with MySQL 8
Fixes issue #271
2023-04-15 00:49:02 +02:00
Jan Böhmer
8351f38ee7 Keep query parameters when adding locale part in RedirectController
This fixes issue #268
2023-04-15 00:38:11 +02:00
Jan Böhmer
f3fc01b740 New translations security.en.xlf (English) 2023-04-11 13:48:44 +02:00
Jan Böhmer
a201be5a01 New translations validators.en.xlf (English) 2023-04-11 13:48:43 +02:00
Jan Böhmer
ebf2035351 New translations messages.en.xlf (English) 2023-04-11 13:48:42 +02:00
Jan Böhmer
6e6e203f8a
Update VERSION 2023-04-11 12:26:36 +02:00
Jan Böhmer
2192149b5a Merge remote-tracking branch 'origin/l10n_master' 2023-04-11 12:14:10 +02:00
Pyromane
a4e19196a7
Update troubleshooting.md (#264)
* Update troubleshooting.md

Enhanced how to list users and reset a user's password.

* Update troubleshooting.md

---------

Co-authored-by: Jan Böhmer <mail@jan-boehmer.de>
2023-04-11 12:11:08 +02:00
Jan Böhmer
0c744c5444 New translations validators.en.xlf (German) 2023-04-11 12:05:25 +02:00
Jan Böhmer
69fc28d5d6 Added better formatted extra section for certain log types 2023-04-10 23:13:09 +02:00
Jan Böhmer
4107535b19 Added basic log entry info page 2023-04-10 00:30:23 +02:00
Jan Böhmer
e0e5fb3d5a Do not double escape tag link. Tag links with space in it now work properly 2023-04-09 01:38:12 +02:00
Jan Böhmer
1125096e5a Fixed RoundingNecessaryException in certain cases 2023-04-09 01:30:29 +02:00
Jan Böhmer
fc1d2269d0 Fixed error with default values on older MySQL version
We have removed the default values for the columns completly, as it were only needed on SQLite when adding the column to existing row.
As this was done in an earlier migration, we can now safely remove it.

The MySQL now correctly detects no more changes. SQLite however still generates some wrong migration changes.
2023-04-09 01:17:48 +02:00
Jan Böhmer
cc033d5be7 Properly escape users and groups table name for newer MySQL version 2023-04-09 00:08:08 +02:00
Jan Böhmer
7eee3de965 Added fixing migrations for sqlite 2023-04-09 00:07:23 +02:00
Jan Böhmer
0c6245fe8e Removed unused migration 2023-04-09 00:04:56 +02:00
Jan Böhmer
342ed382e3 Properly mark the tinyint column with a comment, so that migrations can properly detect that no changes are needed 2023-04-09 00:04:13 +02:00
Jan Böhmer
aaf6c37871 Fixed some minor issues in database schema of MySQL 2023-04-08 23:49:47 +02:00
Jan Böhmer
65e1346a11 Improved output of some messages during migration 2023-04-08 23:39:45 +02:00
Jan Böhmer
7f9307feec Perform an explicit type conversion in doesFKExists function 2023-04-08 23:32:38 +02:00
Jan Böhmer
036eaf3bae Removed warnings about changed permissions, as the old changes are reset later, and we now do the permission migration in Part-DB directly 2023-04-08 23:29:23 +02:00
Jan Böhmer
2717d7d311 Only drop the foreign keys during migration from legacy Part-DB DBs if they really exist
This should fix issue #260
2023-04-08 23:27:10 +02:00
Jan Böhmer
577b841ee0 Fixed TypeError on certain old ElementCreatedLogEntries
Fixes issue #261
2023-04-08 22:57:07 +02:00
Jan Böhmer
857eb0517c New translations messages.en.xlf (English) 2023-04-08 21:25:56 +02:00
Jan Böhmer
ec50197b40 Fixed PHPUnit tests 2023-04-08 21:21:53 +02:00
Jan Böhmer
4ace7dd370 Merge remote-tracking branch 'origin/master' 2023-04-08 21:02:51 +02:00
Jan Böhmer
0eea7f8d4d Fixed static analyis issue 2023-04-08 21:00:41 +02:00
Jan Böhmer
80c7680d17 Do not use a horizontal layout in the comment dropdown for edit_part_info 2023-04-08 20:57:01 +02:00
Jan Böhmer
3edc0a7f53 Added documentation for ENFORCE_CHANGE_COMMENTS_FOR
Related to issue #220
2023-04-08 20:52:46 +02:00
Jan Böhmer
29af14f588 Added an option to enforce log comments for certain actions
This implements issue #220
2023-04-08 20:43:19 +02:00
Jan Böhmer
5f2408b791 Reveal invalid fields in dropdowns while browser validation
Preparation work for issue #220
2023-04-08 20:06:08 +02:00
Jan Böhmer
5b5e8a4fd5 Allow users (and admins) to decide whether their email should be shown on their public profile 2023-04-08 19:53:05 +02:00
Jan Böhmer
71b0c2d83e Properly quote users table for compatibility with newer MySQL databases 2023-04-08 19:51:29 +02:00
Jan Böhmer
363b7bc314 Do not show a unecessary label in front of the boolean constraint types checkboxes 2023-04-08 01:24:17 +02:00
Jan Böhmer
448032c5b7 New translations validators.en.xlf (English) 2023-04-08 01:16:15 +02:00
Jan Böhmer
2af1234cfd New translations messages.en.xlf (English) 2023-04-08 01:16:14 +02:00
Jan Böhmer
d258235430 Improved naming and documentation of CLIUser functions on AbstractLogEntry 2023-04-08 01:13:13 +02:00
Jan Böhmer
c060d6ebb1 Updated dependencies 2023-04-08 01:09:45 +02:00
Jan Böhmer
72dab2bc4e Added tests for CLI user functions on AbstractLogEntry 2023-04-08 01:07:59 +02:00
Jan Böhmer
b0d2a22f62 Make user info page public for all logged in user 2023-04-08 01:04:10 +02:00
Jan Böhmer
bcda71cb25 Ensure that the a lot / storage location owner is not the anonymous user 2023-04-08 00:50:42 +02:00
Jan Böhmer
d32e902d17 Allow to filter by the lot owner 2023-04-08 00:44:34 +02:00
Jan Böhmer
f91b719542 Added a filter constraint for parts where instock is "less than desired"
Fixes issue #257
2023-04-08 00:35:31 +02:00
Jan Böhmer
8bccab258a Prevent appearance of a popup for a short time after deletion of an element on firefox
Related to issue #258
2023-04-07 23:12:08 +02:00
Jan Böhmer
6443d8e2bf Log the name of the CLI user, when actions were done from the CLI. 2023-04-07 22:44:59 +02:00
Jan Böhmer
286759f232 New translations validators.en.xlf (German) 2023-04-05 17:36:10 +02:00
Jan Böhmer
0dba32fdf2 New translations messages.en.xlf (German) 2023-04-05 17:36:09 +02:00
Jan Böhmer
54c6757bc7 Added some documentation about the stock owner system. 2023-04-05 16:35:29 +02:00
Jan Böhmer
c91a6640ff Fixed static analysis issues 2023-04-03 23:34:15 +02:00
Jan Böhmer
80ef617949 New translations messages.en.xlf (English) 2023-04-03 23:26:13 +02:00
Jan Böhmer
72dd3f92f9 Show expired amountSum in instock row on info page, similar to the part tables 2023-04-03 23:21:18 +02:00
Jan Böhmer
5330476dbe Highlight amount sum in part tables and part info page, when amount is less than minAmount 2023-04-03 23:15:29 +02:00
Jan Böhmer
69fdc85c99 Use new user select type for log filter 2023-04-03 22:54:07 +02:00
Jan Böhmer
f7293508ff Added example content for owner placeholders in labels 2023-04-03 22:48:52 +02:00
Jan Böhmer
4aedce9668 Allow to use storelocation owner field in labels
Related to issue #221
2023-04-03 22:41:18 +02:00
Jan Böhmer
9244fe5944 Fixed internal server error, when using owner placeholder on stored label profile 2023-04-03 22:23:53 +02:00
Jan Böhmer
35710b17d1 New translations validators.en.xlf (English) 2023-04-03 01:37:05 +02:00
Jan Böhmer
fb78ce5679 New translations messages.en.xlf (English) 2023-04-03 01:37:04 +02:00
Jan Böhmer
749e7dbdf9 Rempve default value definitions, which cause problems on MySQL 8 2023-04-03 01:03:16 +02:00
Jan Böhmer
ccae58cb2f Merge branch 'part_owners' 2023-04-03 00:54:29 +02:00
Jan Böhmer
64199b91d5 Synchronized MySQL schema with entity definitions 2023-04-03 00:53:58 +02:00
Jan Böhmer
c8218f6891 Added an explicit type for an old migration, so that (new) sqlite databases do not have a phase where a field has no type 2023-04-03 00:49:24 +02:00
Jan Böhmer
8e2f297839 Added migrations for sqlite 2023-04-03 00:47:51 +02:00
Jan Böhmer
0feb9661df Allow to use owner placeholders in labels 2023-04-03 00:03:56 +02:00
Jan Böhmer
1acceae81e Enforece that part lot owner matches storage location owner, if option is selected 2023-04-02 23:58:15 +02:00
Jan Böhmer
a7ff690891 Restrict part lot withdraw/add/move operations to the owner of a part lot 2023-04-02 23:35:18 +02:00
Jan Böhmer
447b54fa4b Allow to set and view the owner of a part lot 2023-04-02 23:17:24 +02:00
Jan Böhmer
5f5541ca12 Added UserSelectType and allow to set owner of a storage location 2023-04-02 21:50:22 +02:00
Jan Böhmer
f101e1b184 Only show SAML user badge in user admin, if the user is really a SAML user 2023-04-02 20:30:30 +02:00
Jan Böhmer
065417038c Added possibility to edit and view the aboutMe information of users 2023-04-02 20:26:42 +02:00
Jan Böhmer
047c82791b Added basic fields and migration for MySQL 2023-04-02 19:10:36 +02:00
Jan Böhmer
f1672c7076 New translations messages.en.xlf (German) 2023-04-02 17:16:02 +02:00
Jan Böhmer
e7e57fa412 Added test for StructuralElementDenormalizer 2023-04-02 17:09:38 +02:00
Jan Böhmer
5536fcce00 New translations messages.en.xlf (English) 2023-04-02 01:26:34 +02:00
Jan Böhmer
8a3ce36c65 Fixed static analysis issue 2023-04-02 01:17:19 +02:00
Jan Böhmer
325812fe95 Improved title of measurement unit admin admin form 2023-04-02 01:11:58 +02:00
Jan Böhmer
421a5d27dd Show part name as manufacturer URL link, when no MPN was set. 2023-04-02 01:03:33 +02:00
Jan Böhmer
27b43041f9 Allow to import orderdetails and partLots of parts 2023-04-02 01:00:40 +02:00
Jan Böhmer
a7ea12d07d Fixed import errors and reuse existing datastructrues from DB while importing complex data
Also now imports should not create duplicate instances of the same data elements. This fixes issue #101.
2023-04-02 00:55:20 +02:00
Jan Böhmer
927f570283 Fixed error popup window, when a server error occurs 2023-04-01 19:43:59 +02:00
Jan Böhmer
66c1eff79f Generate WebP thumbnails even for builtin footprints 2023-04-01 18:43:57 +02:00
Jan Böhmer
4cb1313a77 Use WebP for thumbnails, this reduces the thumbnail size drastically (~ 50%) 2023-04-01 00:16:38 +02:00
Jan Böhmer
52bdde40a1 Use network path instead of absolute URL for attachment thumbnails.
This should fix issue #237
2023-03-31 23:30:37 +02:00
Jan Böhmer
8295ed716b Updated dependencies. 2023-03-31 22:49:31 +02:00
Jan Böhmer
d84ee57354 We are in development of v1.3.0 2023-03-26 13:04:49 +02:00
Jan Böhmer
0ae57b8b7b Merge branch 'partkeepr_import' 2023-03-26 13:04:14 +02:00
Jan Böhmer
a4e68ea2d6 Added documentation about PartKeepr migration process 2023-03-26 00:32:03 +01:00
Jan Böhmer
a48b4ccaa8 Added an check that the user really knows that the command will delete all data. 2023-03-25 23:09:12 +01:00
Jan Böhmer
bcaf8e9912 Allow to import PartKeepr attachments 2023-03-25 22:59:31 +01:00
Jan Böhmer
ae438f1650 Ensure that the PartKeepr Version is correct. 2023-03-25 21:24:58 +01:00
Jan Böhmer
563d6bccd3 Added possibility to import users and projects 2023-03-25 21:09:02 +01:00
Jan Böhmer
7220d752ac Added possibilities to import part distributor infos 2023-03-25 16:26:39 +01:00
Jan Böhmer
46beb21ba7 Improved structure of the PartKeepr import 2023-03-25 00:25:18 +01:00
Jan Böhmer
c972f0ac59 Added possibility to import Part manufacturer and parameter information 2023-03-25 00:12:36 +01:00
Jan Böhmer
21c74fbcc8 Added basic import for parts 2023-03-24 23:43:05 +01:00
Jan Böhmer
1ca839ab26 Added import for storelocations 2023-03-24 22:51:41 +01:00
Jan Böhmer
34aefd32e8 Added possibility to import categories and footprints 2023-03-24 22:41:33 +01:00
Jan Böhmer
fce32e70b9 Started to work on an import possibility for Partkeepr databases 2023-03-23 01:16:12 +01:00
suuppl
0550c045c7
add missing '-' to code block (#254) 2023-03-20 16:28:29 +01:00
Jan Böhmer
69b1c062f5 New translations security.en.xlf (English) 2023-03-18 22:47:02 +01:00
Jan Böhmer
4713b2f079 New translations validators.en.xlf (English) 2023-03-18 22:47:01 +01:00
Jan Böhmer
6fe907a13d New translations messages.en.xlf (English) 2023-03-18 22:47:00 +01:00
Jan Böhmer
45ce4ac1ba New translations validators.en.xlf (German) 2023-03-18 22:46:53 +01:00
Jan Böhmer
9313f870bc Bumped version to 1.2.0 2023-03-18 22:29:59 +01:00
dependabot[bot]
9e72e88930
Bump symfonycorp/security-checker-action from 4 to 5 (#246)
Bumps [symfonycorp/security-checker-action](https://github.com/symfonycorp/security-checker-action) from 4 to 5.
- [Release notes](https://github.com/symfonycorp/security-checker-action/releases)
- [Commits](https://github.com/symfonycorp/security-checker-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: symfonycorp/security-checker-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-18 22:27:01 +01:00
Jan Böhmer
dcb64bf0a6 Merge remote-tracking branch 'origin/master' 2023-03-18 22:26:40 +01:00
Jan Böhmer
5d07070558 Do not build docker images for pull requests 2023-03-18 22:26:36 +01:00
dependabot[bot]
8c6ba9175b
Bump actions/checkout from 2 to 3 (#247)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-18 22:25:31 +01:00
dependabot[bot]
ccaa2c48e2
Bump github/codeql-action from 1 to 2 (#248)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 1 to 2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v1...v2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-18 22:25:07 +01:00
Jan Böhmer
5d38bf2e66
Use Github dependabot to check for outdated github actions 2023-03-18 22:20:04 +01:00
Jan Böhmer
15331da389 Removed actions updater workflow, as it is not compatiblee with our auto generated jekyll page build action 2023-03-18 22:17:28 +01:00
Jan Böhmer
477171abac Fixed actions updater workflow 2023-03-18 22:11:50 +01:00
Jan Böhmer
dc85e4f4a4 Run actions updater on every push 2023-03-18 22:05:30 +01:00
Jan Böhmer
ac402a6697 Updated some github actions workflows and added an workflow to automatically update actions 2023-03-18 22:03:34 +01:00
Jan Böhmer
f86d35f8d1 Dont disable the table multi action submit button, when user can not change parts as we use it for exporting and label generation too 2023-03-18 21:52:29 +01:00
Jan Böhmer
7d6c04e3cf Improved documentation 2023-03-18 21:41:00 +01:00
Jan Böhmer
5c059ce9fe Merge remote-tracking branch 'origin/l10n_master' 2023-03-18 20:36:09 +01:00
Jan Böhmer
575bffe0bf New translations messages.en.xlf (German) 2023-03-18 20:27:32 +01:00
Jan Böhmer
d0b70253fa New translations messages.en.xlf (German) 2023-03-18 20:06:47 +01:00
Jan Böhmer
5f04b2649f Updated dependencies. 2023-03-18 19:54:27 +01:00
Jan Böhmer
f0099859bb New translations messages.en.xlf (English) 2023-03-17 00:46:48 +01:00
Jan Böhmer
906b654afa Bumped version to 1.2.0-dev 2023-03-17 00:11:53 +01:00
Jan Böhmer
14740fad58 Merge branch 'part_import' 2023-03-17 00:11:16 +01:00
Jan Böhmer
e97a149474 Fixed static analysis issues 2023-03-17 00:11:01 +01:00
Jan Böhmer
c1d1270d59 Added documentation for BOM import 2023-03-17 00:08:49 +01:00
Jan Böhmer
e550918d7c Added links to bom import to project edit and info page 2023-03-16 23:56:46 +01:00
Jan Böhmer
f3449babc1 Added bom import to ApplicationAvailabilityFunctionalTest 2023-03-16 23:39:28 +01:00
Jan Böhmer
e444388517 Added tests for PCBnew BOM type 2023-03-16 23:32:12 +01:00
Jan Böhmer
bd2559c37b Added the basic possibility to import KiCAD BOMs into projects 2023-03-16 00:05:46 +01:00
Jan Böhmer
7abf44e893 Merge branch 'master' into part_import 2023-03-15 23:01:04 +01:00
Jan Böhmer
0b94a31d15 New translations messages.en.xlf (English) 2023-03-15 22:38:00 +01:00
Jan Böhmer
989e09b610 New translations messages.en.xlf (Russian) 2023-03-15 22:37:57 +01:00
Jan Böhmer
7e69e80290 New translations messages.en.xlf (Japanese) 2023-03-15 22:37:54 +01:00
Jan Böhmer
a3177dcfaf New translations messages.en.xlf (German) 2023-03-15 22:37:50 +01:00
Jan Böhmer
10e54d7a2d New translations messages.en.xlf (French) 2023-03-15 22:37:47 +01:00
Jan Böhmer
ed514a01bb Fixed exception when attachment file is not openable 2023-03-15 22:15:30 +01:00
Jan Böhmer
47fce4e914 Updated composer dependencies 2023-03-15 21:59:33 +01:00
Jan Böhmer
54276e19e9 Merge branch 'part_import' 2023-03-15 21:52:08 +01:00
Jan Böhmer
193650efd4 Added option to mark all imported parts as "needs review" 2023-03-15 21:46:14 +01:00
Jan Böhmer
b7aae7d87b Improved documentation and added example CSV file 2023-03-15 21:33:18 +01:00
Jan Böhmer
2c799d894b Fixed static analysis issues 2023-03-15 21:05:30 +01:00
Jan Böhmer
5745fc1046 Make import/export documentation a child of usage section 2023-03-14 00:20:44 +01:00
Jan Böhmer
80085abe16 Show better error messages for entity import at admin pages 2023-03-14 00:19:10 +01:00
Jan Böhmer
fe5dd065ed Added tests for EntityImporter service 2023-03-14 00:17:13 +01:00
Jan Böhmer
945fd988b3 Added tests for serializer normalizers 2023-03-14 00:02:40 +01:00
Jan Böhmer
3bbff0aecf Fixed errors that prevented import of users 2023-03-13 22:43:26 +01:00
Jan Böhmer
9188331c1e Fixed error popup behavior, when turbo could not find a matching turbo-fram in the response. 2023-03-13 22:39:07 +01:00
Jan Böhmer
be5663c468 Allow import/export of users 2023-03-13 22:16:02 +01:00
Jan Böhmer
9ac8098f15 Deny access to part import tool without permission and added to tools menu 2023-03-13 22:02:55 +01:00
Jan Böhmer
bd5ee837f4 Added permissions for importing data 2023-03-13 21:51:56 +01:00
Jan Böhmer
4be6cb2459 Added documentation on import/export function 2023-03-13 17:42:48 +01:00
Jan Böhmer
c466cb68b9 Allow to import supplier, supplier part number and price via CSV 2023-03-13 01:04:49 +01:00
Jan Böhmer
820be46ed3 Make more fiields importable 2023-03-13 00:52:22 +01:00
Jan Böhmer
4437f206af Allow alternative names for import for parts 2023-03-13 00:44:05 +01:00
Jan Böhmer
a1f4b35749 Explicitly mark our normalizers as cachabel or not 2023-03-13 00:35:31 +01:00
Jan Böhmer
b38f49a90e Added possibility to import storelocation and instock amount 2023-03-13 00:22:46 +01:00
Jan Böhmer
5d318b2693 Removed left over dump tag 2023-03-12 22:10:55 +01:00
Jan Böhmer
c7b9f9e50a Fixed PHPunit tests 2023-03-12 22:07:48 +01:00
Jan Böhmer
256d628543 Allow to control the path delimiter and create unknown datastructures
Also the labeling of form fields was improved
2023-03-12 22:03:02 +01:00
Jan Böhmer
508641d1e8 Added possibility to autoselect the import format 2023-03-12 21:43:40 +01:00
Jan Böhmer
61e2dde400 Allow to import category, footprint and manufacturer by giving a string in the CSV file 2023-03-12 21:10:48 +01:00
Jan Böhmer
85ae862381 Allow to set basic data via import 2023-03-12 20:01:29 +01:00
Jan Böhmer
7a9b7c87a4 Added a very basic import dialog for Parts 2023-03-12 19:53:55 +01:00
Jan Böhmer
8f033910ce Refactored EntityImporter service 2023-03-12 19:16:49 +01:00
Jan Böhmer
38b5e95842 Improved serialization result for parts 2023-03-12 01:41:44 +01:00
Jan Böhmer
2c67586873 Improved serialized fields 2023-03-12 01:12:35 +01:00
Jan Böhmer
b99e6c9a21 Updated serializer discriminator map 2023-03-12 00:35:48 +01:00
Jan Böhmer
49944cda87 Added possibility to export Parts from part tables 2023-03-12 00:27:04 +01:00
Jan Böhmer
3b36b2a4dc Improved exporter service 2023-03-11 22:40:53 +01:00
Jan Böhmer
1dfcffe70d We are in development of 1.1.2 now 2023-03-11 19:50:05 +01:00
Jan Böhmer
a9b3dcd2c2 Do the color inversion for the IC logos when darkmode is enabled, the logos are then shown as white on black background.
This fixes issue #242
2023-03-11 19:48:42 +01:00
Jan Böhmer
31f9145d3f Fixed jump to letter buttons on IC logos page 2023-03-11 19:43:43 +01:00
Jan Böhmer
ba04b94964
Bumped to version 1.1.0 2023-03-10 11:01:52 +01:00
Jan Böhmer
4ecf99c17e
Don't fail when datatables state was not saved before
This should fix issue #241
2023-03-10 01:40:54 +01:00
Jan Böhmer
80389ff236
Bumped to version 1.1.0 2023-03-07 15:44:30 +01:00
Jan Böhmer
9e80b23726 New translations security.en.xlf (English) 2023-03-06 01:31:11 +01:00
Jan Böhmer
494a1c49f9 New translations security.en.xlf (German) 2023-03-06 01:31:08 +01:00
Jan Böhmer
4a77064826 New translations validators.en.xlf (English) 2023-03-06 01:31:07 +01:00
Jan Böhmer
ce90f10243 New translations validators.en.xlf (German) 2023-03-06 01:31:04 +01:00
Jan Böhmer
426aa4e41d New translations messages.en.xlf (English) 2023-03-06 01:31:02 +01:00
Jan Böhmer
bdc953cab0 New translations messages.en.xlf (German) 2023-03-06 01:30:58 +01:00
Jan Böhmer
15725a9f38
New Crowdin updates (#235)
* New translations messages.en.xlf (German)

* New translations messages.en.xlf (English)

* New translations validators.en.xlf (German)

* New translations validators.en.xlf (English)

* New translations security.en.xlf (English)

* New translations messages.en.xlf (German)

* New translations validators.en.xlf (German)

* New translations security.en.xlf (German)
2023-03-06 00:27:00 +01:00
Jan Böhmer
cc7d290feb Updated dependencies. 2023-03-06 00:14:53 +01:00
Jan Böhmer
40a2a46a5e Fixed phpunit tests 2023-03-06 00:12:46 +01:00
Jan Böhmer
2e160b0b0b Fixed static analysis issue 2023-03-06 00:05:51 +01:00
Jan Böhmer
5aaba102a7 Improved rendering of attachment icons 2023-03-06 00:01:54 +01:00
Jan Böhmer
52e459ec60 Use the name of an uploaded file for an attachment when no explicit name was set. 2023-03-05 23:47:45 +01:00
Jan Böhmer
4a30819ea5 Show error messages for attachments file field 2023-03-05 23:26:06 +01:00
Jan Böhmer
27969a1f65 Replaced leftover bootstrap_4 form theme usages with BS5 2023-03-05 23:12:44 +01:00
Jan Böhmer
c68b13b075 Removed accidentially added import 2023-03-05 23:06:25 +01:00
Jan Böhmer
1446aab451 Correctly map the errors of newly created elements in CollectionTypes
Before there were just shown on the parent, now they get mapped to the right field
2023-03-05 23:05:58 +01:00
Jan Böhmer
86f77fde1a Improved sorting possibilities for Project info BOM view 2023-03-05 01:20:32 +01:00
Jan Böhmer
02134dc959 Do not persist the selected datatable page number, as we always want to start at the first page after a page reload. 2023-03-05 01:11:57 +01:00
Jan Böhmer
c27b02512f Fixed problem with part tables that the wrong number of parts (and therefore pages) were displayed.
This hopefully does not break anything else.
2023-03-05 00:57:01 +01:00
Jan Böhmer
222e76ce47 Added option to search in internal part number (enabled by default)
This should fix issue #232
2023-03-04 23:37:38 +01:00
Jan Böhmer
0efb32c891 Updated composer dependencies. 2023-03-04 22:33:45 +01:00
Jan Böhmer
e808964913 Default docker container uses php-fpm and preloading now
This gives us a approx. 12% performance boost
2023-03-04 20:25:48 +01:00
Jan Böhmer
9ed1e896cb Pass environment variables used to configure SAML to dockers PHP 2023-03-04 17:30:27 +01:00
Jan Böhmer
49e521404a Show if SAML is enabled in the server info tool 2023-03-04 17:27:09 +01:00
Jan Böhmer
2ae34b856a Added hint about advanced saml config options to documentation 2023-03-04 17:21:22 +01:00
Jan Böhmer
6230ad971b Merge branch 'keycloak' 2023-03-04 17:15:50 +01:00
Jan Böhmer
20caad24ed Improved documentation 2023-03-04 17:15:17 +01:00
Jan Böhmer
eabdd3b11f Improved documentation for SAML SSO 2023-03-04 16:56:41 +01:00
Jan Böhmer
8fad743e85 Allow to select the priority of SAML role mapping based on the order in the configuration option 2023-03-04 16:52:17 +01:00
Jan Böhmer
f9fd015ecb Show configured and effective maximum file size in server info page. 2023-03-03 23:42:02 +01:00
Jan Böhmer
bbe4de996a Added documentation about the SAML_UPDATE_GROUP_ON_LOGIN env 2023-03-01 15:24:47 +01:00
Jan Böhmer
7030e752fc Added documentation about permission mapping. 2023-03-01 14:56:05 +01:00
Jan Böhmer
d845f8b7e3 Added documentation about the convert-to-saml-user command 2023-03-01 14:36:46 +01:00
Jan Böhmer
8a18951562 Fixed static analysis issue. 2023-02-28 17:03:57 +01:00
Jan Böhmer
cb9433902c Added SAML configuration options to docs 2023-02-28 16:34:51 +01:00
Jan Böhmer
472e1ce0a3 Added documentation on how to setup SAML. 2023-02-28 00:28:31 +01:00
Jan Böhmer
5e85c52a57 Allow to automatically assign SAML users to a group based on SAML attributes 2023-02-27 23:47:42 +01:00
Jan Böhmer
6a06a24296 Improved translations 2023-02-27 22:29:19 +01:00
Jan Böhmer
99f04d71af Revert "Moved all user info updating logic into SAMLUserFactory"
This reverts commit 960ee342e4.
2023-02-27 22:28:23 +01:00
Jan Böhmer
960ee342e4 Moved all user info updating logic into SAMLUserFactory 2023-02-24 00:12:44 +01:00
Jan Böhmer
f5a5114999 Fixed PHPunit tests 2023-02-23 23:43:01 +01:00
Jan Böhmer
e6d9237bda Allow to specify a user by username or email with set-password commannd 2023-02-23 23:39:29 +01:00
Jan Böhmer
c831d57614 Added an console command to convert local to SAML users and vice versa 2023-02-23 23:36:40 +01:00
Jan Böhmer
c5904303e3 Allow to configure SAML via env variables 2023-02-22 00:50:51 +01:00
Jan Böhmer
586a57c2c9 Allow X500 attributes for user info and added some tests 2023-02-21 23:41:02 +01:00
Jan Böhmer
91fb861fd3 Use login form page to show error messages on Part-DB side 2023-02-21 23:11:16 +01:00
Jan Böhmer
b13655e951 Prevent login of local users via SSO with the same username 2023-02-21 22:36:43 +01:00
Jan Böhmer
e064ee4263 Prevent change of password of SAML users via CLI 2023-02-21 21:58:27 +01:00
Jan Böhmer
60f926924b Add a specific role to SAML user 2023-02-21 00:42:03 +01:00
Jan Böhmer
97c3b9002a Mark SAML users as so in database and disable local password changing then. 2023-02-21 00:29:50 +01:00
Jan Böhmer
78ec0f1ea3 Create a new DB user when somebody logs in using SAML 2023-02-20 23:04:20 +01:00
Jan Böhmer
c0b74d83a5 Started to work on interfacing with keycloak 2023-02-20 22:10:24 +01:00
1051 changed files with 204928 additions and 28639 deletions

View file

@ -0,0 +1,55 @@
{
{$CADDY_GLOBAL_OPTIONS}
frankenphp {
{$FRANKENPHP_CONFIG}
}
# https://caddyserver.com/docs/caddyfile/directives#sorting-algorithm
order mercure after encode
order vulcain after reverse_proxy
order php_server before file_server
}
{$CADDY_EXTRA_CONFIG}
{$SERVER_NAME:localhost} {
log {
# Redact the authorization query parameter that can be set by Mercure
format filter {
wrap console
fields {
uri query {
replace authorization REDACTED
}
}
}
}
root * /app/public
encode zstd br gzip
mercure {
# Transport to use (default to Bolt)
transport_url {$MERCURE_TRANSPORT_URL:bolt:///data/mercure.db}
# Publisher JWT key
publisher_jwt {env.MERCURE_PUBLISHER_JWT_KEY} {env.MERCURE_PUBLISHER_JWT_ALG}
# Subscriber JWT key
subscriber_jwt {env.MERCURE_SUBSCRIBER_JWT_KEY} {env.MERCURE_SUBSCRIBER_JWT_ALG}
# Allow anonymous subscribers (double-check that it's what you want)
anonymous
# Enable the subscription API (double-check that it's what you want)
subscriptions
# Extra directives
{$MERCURE_EXTRA_DIRECTIVES}
}
vulcain
{$CADDY_SERVER_EXTRA_DIRECTIVES}
# Disable Topics tracking if not enabled explicitly: https://github.com/jkarlin/topics
header ?Permissions-Policy "browsing-topics=()"
php_server
}

View file

@ -0,0 +1,5 @@
; See https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host
; See https://github.com/docker/for-linux/issues/264
; The `client_host` below may optionally be replaced with `discover_client_host=yes`
; Add `start_with_request=yes` to start debug session on each request
xdebug.client_host = host.docker.internal

View file

@ -0,0 +1,18 @@
expose_php = 0
date.timezone = UTC
apc.enable_cli = 1
session.use_strict_mode = 1
zend.detect_unicode = 0
; https://symfony.com/doc/current/performance.html
realpath_cache_size = 4096K
realpath_cache_ttl = 600
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.memory_consumption = 256
opcache.enable_file_override = 1
memory_limit = 256M
upload_max_filesize=256M
post_max_size=300M

View file

@ -0,0 +1,2 @@
opcache.preload_user = root
opcache.preload = /app/config/preload.php

View file

@ -0,0 +1,60 @@
#!/bin/sh
set -e
if [ "$1" = 'frankenphp' ] || [ "$1" = 'php' ] || [ "$1" = 'bin/console' ]; then
# Install the project the first time PHP is started
# After the installation, the following block can be deleted
if [ ! -f composer.json ]; then
rm -Rf tmp/
composer create-project "symfony/skeleton $SYMFONY_VERSION" tmp --stability="$STABILITY" --prefer-dist --no-progress --no-interaction --no-install
cd tmp
cp -Rp . ..
cd -
rm -Rf tmp/
composer require "php:>=$PHP_VERSION" runtime/frankenphp-symfony
composer config --json extra.symfony.docker 'true'
if grep -q ^DATABASE_URL= .env; then
echo "To finish the installation please press Ctrl+C to stop Docker Compose and run: docker compose up --build -d --wait"
sleep infinity
fi
fi
if [ -z "$(ls -A 'vendor/' 2>/dev/null)" ]; then
composer install --prefer-dist --no-progress --no-interaction
fi
if grep -q ^DATABASE_URL= .env; then
echo "Waiting for database to be ready..."
ATTEMPTS_LEFT_TO_REACH_DATABASE=60
until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(php bin/console dbal:run-sql -q "SELECT 1" 2>&1); do
if [ $? -eq 255 ]; then
# If the Doctrine command exits with 255, an unrecoverable error occurred
ATTEMPTS_LEFT_TO_REACH_DATABASE=0
break
fi
sleep 1
ATTEMPTS_LEFT_TO_REACH_DATABASE=$((ATTEMPTS_LEFT_TO_REACH_DATABASE - 1))
echo "Still waiting for database to be ready... Or maybe the database is not reachable. $ATTEMPTS_LEFT_TO_REACH_DATABASE attempts left."
done
if [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ]; then
echo "The database is not up or not reachable:"
echo "$DATABASE_ERROR"
exit 1
else
echo "The database is now ready and reachable"
fi
if [ "$( find ./migrations -iname '*.php' -print -quit )" ]; then
php bin/console doctrine:migrations:migrate --no-interaction
fi
fi
setfacl -R -m u:www-data:rwX -m u:"$(whoami)":rwX var
setfacl -dR -m u:www-data:rwX -m u:"$(whoami)":rwX var
fi
exec docker-php-entrypoint "$@"

View file

@ -0,0 +1,4 @@
worker {
file ./public/index.php
env APP_RUNTIME Runtime\FrankenPhpSymfony\Runtime
}

View file

@ -39,6 +39,51 @@ if [ -d /var/www/html/var/db ]; then
fi fi
fi fi
# Start PHP-FPM (the PHP_VERSION is replaced by the configured version in the Dockerfile)
service phpPHP_VERSION-fpm start
# Run migrations if automigration is enabled via env variable DB_AUTOMIGRATE
if [ "$DB_AUTOMIGRATE" = "true" ]; then
echo "Waiting for database to be ready..."
ATTEMPTS_LEFT_TO_REACH_DATABASE=60
until [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ] || DATABASE_ERROR=$(sudo -E -u www-data php bin/console dbal:run-sql -q "SELECT 1" 2>&1); do
if [ $? -eq 255 ]; then
# If the Doctrine command exits with 255, an unrecoverable error occurred
ATTEMPTS_LEFT_TO_REACH_DATABASE=0
break
fi
sleep 1
ATTEMPTS_LEFT_TO_REACH_DATABASE=$((ATTEMPTS_LEFT_TO_REACH_DATABASE - 1))
echo "Still waiting for database to be ready... Or maybe the database is not reachable. $ATTEMPTS_LEFT_TO_REACH_DATABASE attempts left."
done
if [ $ATTEMPTS_LEFT_TO_REACH_DATABASE -eq 0 ]; then
echo "The database is not up or not reachable:"
echo "$DATABASE_ERROR"
exit 1
else
echo "The database is now ready and reachable"
fi
# Check if there are any available migrations to do, by executing doctrine:migrations:up-to-date
# and checking if the exit code is 0 (up to date) or 1 (not up to date)
if sudo -E -u www-data php bin/console doctrine:migrations:up-to-date --no-interaction; then
echo "Database is up to date, no migrations necessary."
else
echo "Migrations available..."
echo "Do backup of database..."
sudo -E -u www-data mkdir -p /var/www/html/uploads/.automigration-backup/
# Backup the database
sudo -E -u www-data php bin/console partdb:backup -n --database /var/www/html/uploads/.automigration-backup/backup-$(date +%Y-%m-%d_%H-%M-%S).zip
# Check if there are any migration files
sudo -E -u www-data php bin/console doctrine:migrations:migrate --no-interaction
fi
fi
# first arg is `-f` or `--some-option` (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/docker-php-entrypoint) # first arg is `-f` or `--some-option` (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/docker-php-entrypoint)
if [ "${1#-}" != "$1" ]; then if [ "${1#-}" != "$1" ]; then
set -- apache2-foreground "$@" set -- apache2-foreground "$@"

View file

@ -25,14 +25,28 @@
CustomLog ${APACHE_LOG_DIR}/access.log combined CustomLog ${APACHE_LOG_DIR}/access.log combined
# Pass the configuration from the docker env to the PHP environment (here you should list all .env options) # Pass the configuration from the docker env to the PHP environment (here you should list all .env options)
PassEnv APP_ENV APP_DEBUG APP_SECRET PassEnv APP_ENV APP_DEBUG APP_SECRET REDIRECT_TO_HTTPS DISABLE_YEAR2038_BUG_CHECK
PassEnv DATABASE_URL PassEnv TRUSTED_PROXIES TRUSTED_HOSTS LOCK_DSN
PassEnv DEFAULT_LANG DEFAULT_TIMEZONE BASE_CURRENCY INSTANCE_NAME ALLOW_ATTACHMENT_DOWNLOADS USE_GRAVATAR MAX_ATTACHMENT_FILE_SIZE PassEnv DATABASE_URL ENFORCE_CHANGE_COMMENTS_FOR DATABASE_MYSQL_USE_SSL_CA DATABASE_MYSQL_SSL_VERIFY_CERT
PassEnv DEFAULT_LANG DEFAULT_TIMEZONE BASE_CURRENCY INSTANCE_NAME ALLOW_ATTACHMENT_DOWNLOADS USE_GRAVATAR MAX_ATTACHMENT_FILE_SIZE DEFAULT_URI CHECK_FOR_UPDATES ATTACHMENT_DOWNLOAD_BY_DEFAULT
PassEnv MAILER_DSN ALLOW_EMAIL_PW_RESET EMAIL_SENDER_EMAIL EMAIL_SENDER_NAME PassEnv MAILER_DSN ALLOW_EMAIL_PW_RESET EMAIL_SENDER_EMAIL EMAIL_SENDER_NAME
PassEnv HISTORY_SAVE_CHANGED_FIELDS HISTORY_SAVE_CHANGED_DATA HISTORY_SAVE_REMOVED_DATA PassEnv HISTORY_SAVE_CHANGED_FIELDS HISTORY_SAVE_CHANGED_DATA HISTORY_SAVE_REMOVED_DATA HISTORY_SAVE_NEW_DATA
PassEnv ERROR_PAGE_ADMIN_EMAIL ERROR_PAGE_SHOW_HELP PassEnv ERROR_PAGE_ADMIN_EMAIL ERROR_PAGE_SHOW_HELP
PassEnv DEMO_MODE NO_URL_REWRITE_AVAILABLE FIXER_API_KEY BANNER PassEnv DEMO_MODE NO_URL_REWRITE_AVAILABLE FIXER_API_KEY BANNER
# In old version the SAML sp private key env, was wrongly named SAMLP_SP_PRIVATE_KEY, keep it for backward compatibility
PassEnv SAML_ENABLED SAML_BEHIND_PROXY SAML_ROLE_MAPPING SAML_UPDATE_GROUP_ON_LOGIN SAML_IDP_ENTITY_ID SAML_IDP_SINGLE_SIGN_ON_SERVICE SAML_IDP_SINGLE_LOGOUT_SERVICE SAML_IDP_X509_CERT SAML_SP_ENTITY_ID SAML_SP_X509_CERT SAML_SP_PRIVATE_KEY SAMLP_SP_PRIVATE_KEY
PassEnv TABLE_DEFAULT_PAGE_SIZE TABLE_PARTS_DEFAULT_COLUMNS
PassEnv PROVIDER_DIGIKEY_CLIENT_ID PROVIDER_DIGIKEY_SECRET PROVIDER_DIGIKEY_CURRENCY PROVIDER_DIGIKEY_LANGUAGE PROVIDER_DIGIKEY_COUNTRY
PassEnv PROVIDER_ELEMENT14_KEY PROVIDER_ELEMENT14_STORE_ID
PassEnv PROVIDER_TME_KEY PROVIDER_TME_SECRET PROVIDER_TME_CURRENCY PROVIDER_TME_LANGUAGE PROVIDER_TME_COUNTRY PROVIDER_TME_GET_GROSS_PRICES
PassEnv PROVIDER_OCTOPART_CLIENT_ID PROVIDER_OCTOPART_SECRET PROVIDER_OCTOPART_CURRENCY PROVIDER_OCTOPART_COUNTRY PROVIDER_OCTOPART_SEARCH_LIMIT PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS
PassEnv PROVIDER_MOUSER_KEY PROVIDER_MOUSER_SEARCH_OPTION PROVIDER_MOUSER_SEARCH_LIMIT PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE
PassEnv PROVIDER_LCSC_ENABLED PROVIDER_LCSC_CURRENCY
PassEnv PROVIDER_OEMSECRETS_KEY PROVIDER_OEMSECRETS_COUNTRY_CODE PROVIDER_OEMSECRETS_CURRENCY PROVIDER_OEMSECRETS_ZERO_PRICE PROVIDER_OEMSECRETS_SET_PARAM PROVIDER_OEMSECRETS_SORT_CRITERIA
PassEnv PROVIDER_REICHELT_ENABLED PROVIDER_REICHELT_CURRENCY PROVIDER_REICHELT_COUNTRY PROVIDER_REICHELT_LANGUAGE PROVIDER_REICHELT_INCLUDE_VAT
PassEnv PROVIDER_POLLIN_ENABLED
PassEnv EDA_KICAD_CATEGORY_DEPTH
# For most configuration files from conf-available/, which are # For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to # enabled or disabled at a global level, it is possible to

View file

@ -5,6 +5,8 @@ tests/
docs/ docs/
.git .git
/public/media/*
###> symfony/framework-bundle ### ###> symfony/framework-bundle ###
/.env.local /.env.local
/.env.local.php /.env.local.php
@ -42,3 +44,39 @@ yarn-error.log
/phpunit.xml /phpunit.xml
.phpunit.result.cache .phpunit.result.cache
###< phpunit/phpunit ### ###< phpunit/phpunit ###
### From frankenphp
**/*.log
**/*.php~
**/*.dist.php
**/*.dist
**/*.cache
**/._*
**/.dockerignore
**/.DS_Store
**/.git/
**/.gitattributes
**/.gitignore
**/.gitmodules
**/compose.*.yaml
**/compose.*.yml
**/compose.yaml
**/compose.yml
**/docker-compose.*.yaml
**/docker-compose.*.yml
**/docker-compose.yaml
**/docker-compose.yml
**/Dockerfile
**/Thumbs.db
.github/
public/bundles/
var/
vendor/
.editorconfig
.env.*.local
.env.local
.env.local.php
.env.test

224
.env
View file

@ -14,6 +14,19 @@ DATABASE_URL="sqlite:///%kernel.project_dir%/var/app.db"
# Uncomment this line (and comment the line above to use a MySQL database # Uncomment this line (and comment the line above to use a MySQL database
#DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db?serverVersion=5.7 #DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db?serverVersion=5.7
# Set this value to 1, if you want to use SSL to connect to the MySQL server. It will be tried to use the CA certificate
# otherwise a CA bundle shipped with PHP will be used.
# Leave it at 0, if you do not want to use SSL or if your server does not support it
DATABASE_MYSQL_USE_SSL_CA=0
# Set this value to 0, if you don't want to verify the CA certificate of the MySQL server
# Only do this, if you know what you are doing!
DATABASE_MYSQL_SSL_VERIFY_CERT=1
# Emulate natural sorting of strings even on databases that do not support it (like SQLite, MySQL or MariaDB < 10.7)
# This can be slow on big databases and might have some problems and quirks, so use it with caution
DATABASE_EMULATE_NATURAL_SORT=0
################################################################################### ###################################################################################
# General settings # General settings
################################################################################### ###################################################################################
@ -29,12 +42,26 @@ INSTANCE_NAME="Part-DB"
# Allow users to download attachments to the server by providing an URL # Allow users to download attachments to the server by providing an URL
# This could be a potential security issue, as the user can retrieve any file the server has access to (via internet) # This could be a potential security issue, as the user can retrieve any file the server has access to (via internet)
ALLOW_ATTACHMENT_DOWNLOADS=0 ALLOW_ATTACHMENT_DOWNLOADS=0
# Set this to 1, if the "download external files" checkbox should be checked by default for new attachments
ATTACHMENT_DOWNLOAD_BY_DEFAULT=0
# Use gravatars for user avatars, when user has no own avatar defined # Use gravatars for user avatars, when user has no own avatar defined
USE_GRAVATAR=0 USE_GRAVATAR=0
# The maximum allowed size for attachment files in bytes (you can use M for megabytes and G for gigabytes) # The maximum allowed size for attachment files in bytes (you can use M for megabytes and G for gigabytes)
# Please note that the php.ini setting upload_max_filesize also limits the maximum size of uploaded files # Please note that the php.ini setting upload_max_filesize also limits the maximum size of uploaded files
MAX_ATTACHMENT_FILE_SIZE="100M" MAX_ATTACHMENT_FILE_SIZE="100M"
# The public reachable URL of this Part-DB installation. This is used for generating links in SAML and email templates
# This must end with a slash!
DEFAULT_URI="https://partdb.changeme.invalid/"
# With this option you can configure, where users are enforced to give a change reason, which will be logged
# This is a comma separated list of values, see documentation for available values
# Leave this empty, to make all change reasons optional
ENFORCE_CHANGE_COMMENTS_FOR=""
# Disable that if you do not want that Part-DB connects to GitHub to check for available updates, or if your server can not connect to the internet
CHECK_FOR_UPDATES=1
################################################################################### ###################################################################################
# Email settings # Email settings
################################################################################### ###################################################################################
@ -62,6 +89,9 @@ HISTORY_SAVE_CHANGED_FIELDS=1
HISTORY_SAVE_CHANGED_DATA=1 HISTORY_SAVE_CHANGED_DATA=1
# Save the data of an element that gets removed into log entry. This allows to undelete an element # Save the data of an element that gets removed into log entry. This allows to undelete an element
HISTORY_SAVE_REMOVED_DATA=1 HISTORY_SAVE_REMOVED_DATA=1
# Save the new data of an element that gets changed or added. This allows an easy comparison of the old and new data on the detail page
# This option only becomes active when HISTORY_SAVE_CHANGED_DATA is set to 1
HISTORY_SAVE_NEW_DATA=1
################################################################################### ###################################################################################
# Error pages settings # Error pages settings
@ -72,6 +102,189 @@ ERROR_PAGE_ADMIN_EMAIL=''
# If this is set to true, solutions to common problems are shown on error pages. Disable this, if you do not want your users to see them... # If this is set to true, solutions to common problems are shown on error pages. Disable this, if you do not want your users to see them...
ERROR_PAGE_SHOW_HELP=1 ERROR_PAGE_SHOW_HELP=1
##################################################################################
# Part table settings
##################################################################################
# The default page size for the part table (set to -1 to show all parts on one page)
TABLE_DEFAULT_PAGE_SIZE=50
# Configure which columns will be visible by default in the parts table (and in which order).
# This is a comma separated list of column names. See documentation for available values.
TABLE_PARTS_DEFAULT_COLUMNS=name,description,category,footprint,manufacturer,storage_location,amount
##################################################################################
# Info provider settings
##################################################################################
# Digikey Provider:
# You can get your client id and secret from https://developer.digikey.com/
PROVIDER_DIGIKEY_CLIENT_ID=
PROVIDER_DIGIKEY_SECRET=
# The currency to get prices in
PROVIDER_DIGIKEY_CURRENCY=EUR
# The language to get results in (en, de, fr, it, es, zh, ja, ko)
PROVIDER_DIGIKEY_LANGUAGE=en
# The country to get results for
PROVIDER_DIGIKEY_COUNTRY=DE
# Farnell Provider:
# You can get your API key from https://partner.element14.com/
PROVIDER_ELEMENT14_KEY=
# Configure the store domain you want to use. This decides the language and currency of results. You can get a list of available stores from https://partner.element14.com/docs/Product_Search_API_REST__Description
PROVIDER_ELEMENT14_STORE_ID=de.farnell.com
# TME Provider:
# You can get your API key from https://developers.tme.eu/en/
PROVIDER_TME_KEY=
PROVIDER_TME_SECRET=
# The currency to get prices in
PROVIDER_TME_CURRENCY=EUR
# The language to get results in (en, de, pl)
PROVIDER_TME_LANGUAGE=en
# The country to get results for
PROVIDER_TME_COUNTRY=DE
# [DEPRECATED] Set this to 1 to get gross prices (including VAT) instead of net prices
# With private API keys, this option cannot be used anymore is ignored by Part-DB. The VAT inclusion depends on your TME account settings.
PROVIDER_TME_GET_GROSS_PRICES=1
# Octopart / Nexar Provider:
# You can get your API key from https://nexar.com/api
PROVIDER_OCTOPART_CLIENT_ID=
PROVIDER_OCTOPART_SECRET=
# The currency and country to get prices for (you have to set both to get meaningful results)
# 3 letter ISO currency code (e.g. EUR, USD, GBP)
PROVIDER_OCTOPART_CURRENCY=EUR
# 2 letter ISO country code (e.g. DE, US, GB)
PROVIDER_OCTOPART_COUNTRY=DE
# The number of results to get from Octopart while searching (please note that this counts towards your API limits)
PROVIDER_OCTOPART_SEARCH_LIMIT=10
# Set to false to include non authorized offers in the results
PROVIDER_OCTOPART_ONLY_AUTHORIZED_SELLERS=1
# Mouser Provider API V2:
# You can get your API key from https://www.mouser.it/api-hub/
PROVIDER_MOUSER_KEY=
# Filter search results by RoHS compliance and stock availability:
# Available options: None | Rohs | InStock | RohsAndInStock
PROVIDER_MOUSER_SEARCH_OPTION='None'
# The number of results to get from Mouser while searching (please note that this value is max 50)
PROVIDER_MOUSER_SEARCH_LIMIT=50
# It is recommended to leave this set to 'true'. The option is not really good doumented by Mouser:
# Used when searching for keywords in the language specified when you signed up for Search API.
PROVIDER_MOUSER_SEARCH_WITH_SIGNUP_LANGUAGE='true'
# LCSC Provider:
# LCSC does not provide an offical API, so this used the API LCSC uses to render their webshop.
# LCSC did not intended the use of this API and it could break any time, so use it at your own risk.
# We dont require an API key for LCSC, just set this to 1 to enable LCSC support
PROVIDER_LCSC_ENABLED=0
# The currency to get prices in (e.g. EUR, USD, etc.)
PROVIDER_LCSC_CURRENCY=EUR
# Oemsecrets Provider API 3.0.1:
# You can get your API key from https://www.oemsecrets.com/api
PROVIDER_OEMSECRETS_KEY=
# The country you want the output for
PROVIDER_OEMSECRETS_COUNTRY_CODE=DE
# Available country code are:
# AD, AE, AQ, AR, AT, AU, BE, BO, BR, BV, BY, CA, CH, CL, CN, CO, CZ, DE, DK, EC, EE, EH,
# ES, FI, FK, FO, FR, GB, GE, GF, GG, GI, GL, GR, GS, GY, HK, HM, HR, HU, IE, IM, IN, IS,
# IT, JM, JP, KP, KR, KZ, LI, LK, LT, LU, MC, MD, ME, MK, MT, NL, NO, NZ, PE, PH, PL, PT,
# PY, RO, RS, RU, SB, SD, SE, SG, SI, SJ, SK, SM, SO, SR, SY, SZ, TC, TF, TG, TH, TJ, TK,
# TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VE, VG, VI, VN, VU, WF, YE,
# ZA, ZM, ZW
#
# The currency you want the prices to be displayed in
PROVIDER_OEMSECRETS_CURRENCY=EUR
# Available currency are:AUD, CAD, CHF, CNY, DKK, EUR, GBP, HKD, ILS, INR, JPY, KRW, NOK,
# NZD, RUB, SEK, SGD, TWD, USD
#
# If PROVIDER_OEMSECRETS_ZERO_PRICE is set to 0, distributors with zero prices
# will be discarded from the creation of a new part (set to 1 otherwise)
PROVIDER_OEMSECRETS_ZERO_PRICE=0
#
# When PROVIDER_OEMSECRETS_SET_PARAM is set to 1 the parameters for the part are generated
# from the description transforming unstructured descriptions into structured parameters;
# each parameter in description should have the form: "...;name1:value1;name2:value2"
PROVIDER_OEMSECRETS_SET_PARAM=1
#
# This environment variable determines the sorting criteria for product results.
# The sorting process first arranges items based on the provided keyword.
# Then, if set to 'C', it further sorts by completeness (prioritizing items with the most
# detailed information). If set to 'M', it further sorts by manufacturer name.
#If unset or set to any other value, no sorting is performed.
PROVIDER_OEMSECRETS_SORT_CRITERIA=C
# Reichelt provider:
# Reichelt.com offers no official API, so this info provider webscrapes the website to extract info
# It could break at any time, use it at your own risk
# We dont require an API key for Reichelt, just set this to 1 to enable Reichelt support
PROVIDER_REICHELT_ENABLED=0
# The country to get prices for
PROVIDER_REICHELT_COUNTRY=DE
# The language to get results in (en, de, fr, nl, pl, it, es)
PROVIDER_REICHELT_LANGUAGE=en
# Include VAT in prices (set to 1 to include VAT, 0 to exclude VAT)
PROVIDER_REICHELT_INCLUDE_VAT=1
# The currency to get prices in (only for countries with countries other than EUR)
PROVIDER_REICHELT_CURRENCY=EUR
# Pollin provider:
# Pollin.de offers no official API, so this info provider webscrapes the website to extract info
# It could break at any time, use it at your own risk
# We dont require an API key for Pollin, just set this to 1 to enable Pollin support
PROVIDER_POLLIN_ENABLED=0
##################################################################################
# EDA integration related settings
##################################################################################
# This value determines the depth of the category tree, that is visible inside KiCad
# 0 means that only the top level categories are visible. Set to a value > 0 to show more levels.
# Set to -1, to show all parts of Part-DB inside a single category in KiCad
EDA_KICAD_CATEGORY_DEPTH=0
###################################################################################
# SAML Single sign on-settings
###################################################################################
# Set this to 1 to enable SAML single sign on
# Be also sure to set the correct values for DEFAULT_URI
SAML_ENABLED=0
# Set to 1, if your Part-DB installation is behind a reverse proxy and you want to use SAML
SAML_BEHIND_PROXY=0
# A JSON encoded array of role mappings in the form { "saml_role": PARTDB_GROUP_ID, "*": PARTDB_GROUP_ID }
# The first match is used, so the order is important! Put the group mapping with the most privileges first.
# Please not to only use single quotes to enclose the JSON string
SAML_ROLE_MAPPING='{}'
# A mapping could look like the following
#SAML_ROLE_MAPPING='{ "*": 2, "admin": 1, "editor": 3}'
# When this is set to 1, the group of SAML users will be updated everytime they login based on their SAML roles
SAML_UPDATE_GROUP_ON_LOGIN=1
# The entity ID of your SAML IDP (e.g. the realm name of your Keycloak server)
SAML_IDP_ENTITY_ID="https://idp.changeme.invalid/realms/master"
# The URL of your SAML IDP SingleSignOnService (e.g. the endpoint of your Keycloak server)
SAML_IDP_SINGLE_SIGN_ON_SERVICE="https://idp.changeme.invalid/realms/master/protocol/saml"
# The URL of your SAML IDP SingleLogoutService (e.g. the endpoint of your Keycloak server)
SAML_IDP_SINGLE_LOGOUT_SERVICE="https://idp.changeme.invalid/realms/master/protocol/saml"
# The public certificate of the SAML IDP (e.g. the certificate of your Keycloak server)
SAML_IDP_X509_CERT="MIIC..."
# The entity of your SAML SP, must match the SP entityID configured in your SAML IDP (e.g. Keycloak).
# This should be a the domain name of your Part-DB installation, followed by "/sp"
SAML_SP_ENTITY_ID="https://partdb.changeme.invalid/sp"
# The public certificate of the SAML SP
SAML_SP_X509_CERT="MIIC..."
# The private key of the SAML SP
SAML_SP_PRIVATE_KEY="MIIE..."
###################################################################################### ######################################################################################
# Other settings # Other settings
###################################################################################### ######################################################################################
@ -82,6 +295,9 @@ DEMO_MODE=0
# In that case all URL contains the index.php front controller in URL # In that case all URL contains the index.php front controller in URL
NO_URL_REWRITE_AVAILABLE=0 NO_URL_REWRITE_AVAILABLE=0
# Set to 1, if Part-DB should redirect all HTTP requests to HTTPS. You dont need to configure this, if your webserver already does this.
REDIRECT_TO_HTTPS=0
# If you want to use fixer.io for currency conversion, you have to set this to your API key # If you want to use fixer.io for currency conversion, you have to set this to your API key
FIXER_API_KEY=CHANGEME FIXER_API_KEY=CHANGEME
@ -92,9 +308,11 @@ BANNER=""
APP_ENV=prod APP_ENV=prod
APP_SECRET=a03498528f5a5fc089273ec9ae5b2849 APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
# Set this to zero, if you want to disable the year 2038 bug check on 32-bit systems (it will cause errors with current 32-bit PHP versions)
DISABLE_YEAR2038_BUG_CHECK=0
# Set the trusted IPs here, when using an reverse proxy # Set the trusted IPs here, when using an reverse proxy
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 #TRUSTED_PROXIES=127.0.0.0/8,::1,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(localhost|example\.com)$' #TRUSTED_HOSTS='^(localhost|example\.com)$'
@ -103,3 +321,7 @@ APP_SECRET=a03498528f5a5fc089273ec9ae5b2849
# postgresql+advisory://db_user:db_password@localhost/db_name # postgresql+advisory://db_user:db_password@localhost/db_name
LOCK_DSN=flock LOCK_DSN=flock
###< symfony/lock ### ###< symfony/lock ###
###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ###

0
.env.dev Normal file
View file

View file

@ -5,5 +5,9 @@ SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="sqlite:///%kernel.project_dir%/var/app_test.db"
# Doctrine automatically adds an _test suffix to database name in test env # Doctrine automatically adds an _test suffix to database name in test env
DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db #DATABASE_URL=mysql://root:@127.0.0.1:3306/part-db
# Disable update checks, as tests would fail, when github is not reachable
CHECK_FOR_UPDATES=0

2
.gitattributes vendored Normal file
View file

@ -0,0 +1,2 @@
# For sh files, always use LF line endings
*.sh text eol=lf

View file

@ -0,0 +1,752 @@
-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 07. Mai 2023 um 01:58
-- Server-Version: 10.6.5-MariaDB-log
-- PHP-Version: 8.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Datenbank: `partdb_demo`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `attachements`
--
CREATE TABLE `attachements` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`class_name` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL,
`element_id` int(11) NOT NULL,
`type_id` int(11) NOT NULL,
`filename` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`show_in_table` tinyint(1) NOT NULL DEFAULT 0,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `attachements`
--
INSERT INTO `attachements` (`id`, `name`, `class_name`, `element_id`, `type_id`, `filename`, `show_in_table`, `last_modified`) VALUES
(1, 'BC547', 'Part', 2, 2, '%BASE%/data/media/bc547.pdf', 1, '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `attachement_types`
--
CREATE TABLE `attachement_types` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `attachement_types`
--
INSERT INTO `attachement_types` (`id`, `name`, `parent_id`, `comment`, `datetime_added`, `last_modified`) VALUES
(1, 'Bilder', NULL, NULL, '2017-10-21 17:58:48', '0000-00-00 00:00:00'),
(2, 'Datenblätter', NULL, NULL, '2017-10-21 17:58:48', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `categories`
--
CREATE TABLE `categories` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`disable_footprints` tinyint(1) NOT NULL DEFAULT 0,
`disable_manufacturers` tinyint(1) NOT NULL DEFAULT 0,
`disable_autodatasheets` tinyint(1) NOT NULL DEFAULT 0,
`disable_properties` tinyint(1) NOT NULL DEFAULT 0,
`partname_regex` text COLLATE utf8mb3_unicode_ci NOT NULL,
`partname_hint` text COLLATE utf8mb3_unicode_ci NOT NULL,
`default_description` text COLLATE utf8mb3_unicode_ci NOT NULL,
`default_comment` text COLLATE utf8mb3_unicode_ci NOT NULL,
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `categories`
--
INSERT INTO `categories` (`id`, `name`, `parent_id`, `disable_footprints`, `disable_manufacturers`, `disable_autodatasheets`, `disable_properties`, `partname_regex`, `partname_hint`, `default_description`, `default_comment`, `comment`, `datetime_added`, `last_modified`) VALUES
(1, 'aktive Bauteile', NULL, 0, 0, 0, 0, '', '', '', '', NULL, '2017-10-21 17:58:49', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `devices`
--
CREATE TABLE `devices` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`order_quantity` int(11) NOT NULL DEFAULT 0,
`order_only_missing_parts` tinyint(1) NOT NULL DEFAULT 0,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `devices`
--
INSERT INTO `devices` (`id`, `name`, `parent_id`, `order_quantity`, `order_only_missing_parts`, `datetime_added`, `last_modified`, `comment`) VALUES
(1, 'Test', NULL, 0, 0, '2015-04-16 15:08:56', '0000-00-00 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `device_parts`
--
CREATE TABLE `device_parts` (
`id` int(11) NOT NULL,
`id_part` int(11) NOT NULL DEFAULT 0,
`id_device` int(11) NOT NULL DEFAULT 0,
`quantity` int(11) NOT NULL DEFAULT 0,
`mountnames` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `device_parts`
--
INSERT INTO `device_parts` (`id`, `id_part`, `id_device`, `quantity`, `mountnames`) VALUES
(1, 2, 1, 1, '');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `footprints`
--
CREATE TABLE `footprints` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`filename` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`filename_3d` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `footprints`
--
INSERT INTO `footprints` (`id`, `name`, `filename`, `filename_3d`, `parent_id`, `comment`, `datetime_added`, `last_modified`) VALUES
(1, 'LEDs', '%BASE%/img/footprints/Optik/LEDs/Bedrahtet/LED-GELB_3MM.png', '', NULL, NULL, '2017-10-21 17:58:49', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `groups`
--
CREATE TABLE `groups` (
`id` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`comment` mediumtext DEFAULT NULL,
`perms_system` int(11) NOT NULL,
`perms_groups` int(11) NOT NULL,
`perms_users` int(11) NOT NULL,
`perms_self` int(11) NOT NULL,
`perms_system_config` int(11) NOT NULL,
`perms_system_database` int(11) NOT NULL,
`perms_parts` bigint(11) NOT NULL,
`perms_parts_name` smallint(6) NOT NULL,
`perms_parts_description` smallint(6) NOT NULL,
`perms_parts_instock` smallint(6) NOT NULL,
`perms_parts_mininstock` smallint(6) NOT NULL,
`perms_parts_footprint` smallint(6) NOT NULL,
`perms_parts_storelocation` smallint(6) NOT NULL,
`perms_parts_manufacturer` smallint(6) NOT NULL,
`perms_parts_comment` smallint(6) NOT NULL,
`perms_parts_order` smallint(6) NOT NULL,
`perms_parts_orderdetails` smallint(6) NOT NULL,
`perms_parts_prices` smallint(6) NOT NULL,
`perms_parts_attachements` smallint(6) NOT NULL,
`perms_devices` int(11) NOT NULL,
`perms_devices_parts` int(11) NOT NULL,
`perms_storelocations` int(11) NOT NULL,
`perms_footprints` int(11) NOT NULL,
`perms_categories` int(11) NOT NULL,
`perms_suppliers` int(11) NOT NULL,
`perms_manufacturers` int(11) NOT NULL,
`perms_attachement_types` int(11) NOT NULL,
`perms_tools` int(11) NOT NULL,
`perms_labels` smallint(6) NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Daten für Tabelle `groups`
--
INSERT INTO `groups` (`id`, `name`, `parent_id`, `comment`, `perms_system`, `perms_groups`, `perms_users`, `perms_self`, `perms_system_config`, `perms_system_database`, `perms_parts`, `perms_parts_name`, `perms_parts_description`, `perms_parts_instock`, `perms_parts_mininstock`, `perms_parts_footprint`, `perms_parts_storelocation`, `perms_parts_manufacturer`, `perms_parts_comment`, `perms_parts_order`, `perms_parts_orderdetails`, `perms_parts_prices`, `perms_parts_attachements`, `perms_devices`, `perms_devices_parts`, `perms_storelocations`, `perms_footprints`, `perms_categories`, `perms_suppliers`, `perms_manufacturers`, `perms_attachement_types`, `perms_tools`, `perms_labels`, `datetime_added`, `last_modified`) VALUES
(1, 'admins', NULL, 'Users of this group can do everything: Read, Write and Administrative actions.', 21, 1365, 87381, 85, 85, 21, 1431655765, 5, 5, 5, 5, 5, 5, 5, 5, 5, 325, 325, 325, 5461, 325, 5461, 5461, 5461, 5461, 5461, 1365, 1365, 85, '2017-10-21 17:58:46', '2018-10-08 17:27:41'),
(2, 'readonly', NULL, 'Users of this group can only read informations, use tools, and don\'t have access to administrative tools.', 2, 2730, 43690, 25, 170, 42, 2778027689, 9, 9, 9, 9, 9, 9, 9, 9, 9, 649, 649, 649, 1705, 649, 1705, 1705, 1705, 1705, 1705, 681, 1366, 165, '2017-10-21 17:58:46', '2018-10-08 17:28:35'),
(3, 'users', NULL, 'Users of this group, can edit part informations, create new ones, etc. but are not allowed to use administrative tools. (But can read current configuration, and see Server status)', 42, 2730, 43689, 89, 105, 41, 1431655765, 5, 5, 5, 5, 5, 5, 5, 5, 5, 325, 325, 325, 5461, 325, 5461, 5461, 5461, 5461, 5461, 1365, 1365, 85, '2017-10-21 17:58:46', '2018-10-08 17:28:17');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `internal`
--
CREATE TABLE `internal` (
`keyName` char(30) CHARACTER SET ascii NOT NULL,
`keyValue` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `internal`
--
INSERT INTO `internal` (`keyName`, `keyValue`) VALUES
('dbVersion', '26');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `log`
--
CREATE TABLE `log` (
`id` int(11) NOT NULL,
`datetime` timestamp NOT NULL DEFAULT current_timestamp(),
`id_user` int(11) NOT NULL,
`level` tinyint(4) NOT NULL,
`type` smallint(6) NOT NULL,
`target_id` int(11) NOT NULL,
`target_type` smallint(6) NOT NULL,
`extra` mediumtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `manufacturers`
--
CREATE TABLE `manufacturers` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`address` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`phone_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`fax_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`email_address` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`website` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`auto_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `manufacturers`
--
INSERT INTO `manufacturers` (`id`, `name`, `parent_id`, `address`, `phone_number`, `fax_number`, `email_address`, `website`, `auto_product_url`, `datetime_added`, `comment`, `last_modified`) VALUES
(1, 'Atmel', NULL, '', '', '', '', '', '', '2015-03-01 11:27:10', NULL, '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `orderdetails`
--
CREATE TABLE `orderdetails` (
`id` int(11) NOT NULL,
`part_id` int(11) NOT NULL,
`id_supplier` int(11) NOT NULL DEFAULT 0,
`supplierpartnr` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`obsolete` tinyint(1) DEFAULT 0,
`supplier_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `parts`
--
CREATE TABLE `parts` (
`id` int(11) NOT NULL,
`id_category` int(11) NOT NULL DEFAULT 0,
`name` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`description` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`instock` int(11) NOT NULL DEFAULT 0,
`mininstock` int(11) NOT NULL DEFAULT 0,
`comment` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`visible` tinyint(1) NOT NULL,
`id_footprint` int(11) DEFAULT NULL,
`id_storelocation` int(11) DEFAULT NULL,
`order_orderdetails_id` int(11) DEFAULT NULL,
`order_quantity` int(11) NOT NULL DEFAULT 1,
`manual_order` tinyint(1) NOT NULL DEFAULT 0,
`id_manufacturer` int(11) DEFAULT NULL,
`id_master_picture_attachement` int(11) DEFAULT NULL,
`manufacturer_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`favorite` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `parts`
--
INSERT INTO `parts` (`id`, `id_category`, `name`, `description`, `instock`, `mininstock`, `comment`, `visible`, `id_footprint`, `id_storelocation`, `order_orderdetails_id`, `order_quantity`, `manual_order`, `id_manufacturer`, `id_master_picture_attachement`, `manufacturer_product_url`, `datetime_added`, `last_modified`, `favorite`) VALUES
(2, 1, 'BC547C', 'NPN 45V 0,1A 0,5W', 59, 0, '', 0, 1, 1, NULL, 1, 0, NULL, NULL, '', '2015-03-01 10:40:31', '2016-12-26 10:48:49', 0);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `pricedetails`
--
CREATE TABLE `pricedetails` (
`id` int(11) NOT NULL,
`orderdetails_id` int(11) NOT NULL,
`price` decimal(11,5) DEFAULT NULL,
`price_related_quantity` int(11) NOT NULL DEFAULT 1,
`min_discount_quantity` int(11) NOT NULL DEFAULT 1,
`manual_input` tinyint(1) NOT NULL DEFAULT 1,
`last_modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `storelocations`
--
CREATE TABLE `storelocations` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`is_full` tinyint(1) NOT NULL DEFAULT 0,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `storelocations`
--
INSERT INTO `storelocations` (`id`, `name`, `parent_id`, `is_full`, `datetime_added`, `comment`, `last_modified`) VALUES
(1, 'Halbleiter I', NULL, 0, '2015-03-01 11:26:37', NULL, '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `suppliers`
--
CREATE TABLE `suppliers` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`address` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`phone_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`fax_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`email_address` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`website` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`auto_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `suppliers`
--
INSERT INTO `suppliers` (`id`, `name`, `parent_id`, `address`, `phone_number`, `fax_number`, `email_address`, `website`, `auto_product_url`, `datetime_added`, `comment`, `last_modified`) VALUES
(1, 'Test', NULL, '', '', '', '', '', 'Test', '2015-03-01 10:37:23', NULL, '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`password` varchar(255) DEFAULT NULL,
`first_name` tinytext DEFAULT NULL,
`last_name` tinytext DEFAULT NULL,
`department` tinytext DEFAULT NULL,
`email` tinytext DEFAULT NULL,
`need_pw_change` tinyint(1) NOT NULL DEFAULT 0,
`group_id` int(11) DEFAULT NULL,
`config_language` tinytext DEFAULT NULL,
`config_timezone` tinytext DEFAULT NULL,
`config_theme` tinytext DEFAULT NULL,
`config_currency` tinytext DEFAULT NULL,
`config_image_path` text NOT NULL,
`config_instock_comment_w` text NOT NULL,
`config_instock_comment_a` text NOT NULL,
`perms_system` int(11) NOT NULL,
`perms_groups` int(11) NOT NULL,
`perms_users` int(11) NOT NULL,
`perms_self` int(11) NOT NULL,
`perms_system_config` int(11) NOT NULL,
`perms_system_database` int(11) NOT NULL,
`perms_parts` bigint(11) NOT NULL,
`perms_parts_name` smallint(6) NOT NULL,
`perms_parts_description` smallint(6) NOT NULL,
`perms_parts_instock` smallint(6) NOT NULL,
`perms_parts_mininstock` smallint(6) NOT NULL,
`perms_parts_footprint` smallint(6) NOT NULL,
`perms_parts_storelocation` smallint(6) NOT NULL,
`perms_parts_manufacturer` smallint(6) NOT NULL,
`perms_parts_comment` smallint(6) NOT NULL,
`perms_parts_order` smallint(6) NOT NULL,
`perms_parts_orderdetails` smallint(6) NOT NULL,
`perms_parts_prices` smallint(6) NOT NULL,
`perms_parts_attachements` smallint(6) NOT NULL,
`perms_devices` int(11) NOT NULL,
`perms_devices_parts` int(11) NOT NULL,
`perms_storelocations` int(11) NOT NULL,
`perms_footprints` int(11) NOT NULL,
`perms_categories` int(11) NOT NULL,
`perms_suppliers` int(11) NOT NULL,
`perms_manufacturers` int(11) NOT NULL,
`perms_attachement_types` int(11) NOT NULL,
`perms_tools` int(11) NOT NULL,
`perms_labels` smallint(6) NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Daten für Tabelle `users`
--
INSERT INTO `users` (`id`, `name`, `password`, `first_name`, `last_name`, `department`, `email`, `need_pw_change`, `group_id`, `config_language`, `config_timezone`, `config_theme`, `config_currency`, `config_image_path`, `config_instock_comment_w`, `config_instock_comment_a`, `perms_system`, `perms_groups`, `perms_users`, `perms_self`, `perms_system_config`, `perms_system_database`, `perms_parts`, `perms_parts_name`, `perms_parts_description`, `perms_parts_instock`, `perms_parts_mininstock`, `perms_parts_footprint`, `perms_parts_storelocation`, `perms_parts_manufacturer`, `perms_parts_comment`, `perms_parts_order`, `perms_parts_orderdetails`, `perms_parts_prices`, `perms_parts_attachements`, `perms_devices`, `perms_devices_parts`, `perms_storelocations`, `perms_footprints`, `perms_categories`, `perms_suppliers`, `perms_manufacturers`, `perms_attachement_types`, `perms_tools`, `perms_labels`, `datetime_added`, `last_modified`) VALUES
(1, 'anonymous', '', '', '', '', '', 0, 2, '', '', '', NULL, '', '', '', 21848, 20480, 0, 0, 0, 0, 0, 21840, 21840, 21840, 21840, 21840, 21840, 21840, 21840, 21840, 21520, 21520, 21520, 20480, 21520, 20480, 20480, 20480, 20480, 20480, 21504, 20480, 0, '2017-10-21 17:58:46', '2018-02-18 12:46:58'),
(2, 'admin', '$2a$12$j0RKrKlx60bzX1DWMyXwjeaW.pe3bFjAK8ByIGnvjrRnET2JtsFoe', 'Admin', 'Ad', NULL, 'admin@ras.pi', 0, 1, '', '', '', NULL, '', '', '', 21845, 21845, 21845, 21, 85, 21, 349525, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 0, '2017-10-21 17:58:46', '2017-12-23 11:04:48');
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `attachements`
--
ALTER TABLE `attachements`
ADD PRIMARY KEY (`id`),
ADD KEY `attachements_class_name_k` (`class_name`),
ADD KEY `attachements_element_id_k` (`element_id`),
ADD KEY `attachements_type_id_fk` (`type_id`);
--
-- Indizes für die Tabelle `attachement_types`
--
ALTER TABLE `attachement_types`
ADD PRIMARY KEY (`id`),
ADD KEY `attachement_types_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`),
ADD KEY `categories_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `devices`
--
ALTER TABLE `devices`
ADD PRIMARY KEY (`id`),
ADD KEY `devices_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `device_parts`
--
ALTER TABLE `device_parts`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `device_parts_combination_uk` (`id_part`,`id_device`),
ADD KEY `device_parts_id_part_k` (`id_part`),
ADD KEY `device_parts_id_device_k` (`id_device`);
--
-- Indizes für die Tabelle `footprints`
--
ALTER TABLE `footprints`
ADD PRIMARY KEY (`id`),
ADD KEY `footprints_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `groups`
--
ALTER TABLE `groups`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`);
--
-- Indizes für die Tabelle `internal`
--
ALTER TABLE `internal`
ADD UNIQUE KEY `keyName` (`keyName`);
--
-- Indizes für die Tabelle `log`
--
ALTER TABLE `log`
ADD PRIMARY KEY (`id`),
ADD KEY `id_user` (`id_user`);
--
-- Indizes für die Tabelle `manufacturers`
--
ALTER TABLE `manufacturers`
ADD PRIMARY KEY (`id`),
ADD KEY `manufacturers_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `orderdetails`
--
ALTER TABLE `orderdetails`
ADD PRIMARY KEY (`id`),
ADD KEY `orderdetails_part_id_k` (`part_id`),
ADD KEY `orderdetails_id_supplier_k` (`id_supplier`);
--
-- Indizes für die Tabelle `parts`
--
ALTER TABLE `parts`
ADD PRIMARY KEY (`id`),
ADD KEY `parts_id_category_k` (`id_category`),
ADD KEY `parts_id_footprint_k` (`id_footprint`),
ADD KEY `parts_id_storelocation_k` (`id_storelocation`),
ADD KEY `parts_order_orderdetails_id_k` (`order_orderdetails_id`),
ADD KEY `parts_id_manufacturer_k` (`id_manufacturer`),
ADD KEY `favorite` (`favorite`);
--
-- Indizes für die Tabelle `pricedetails`
--
ALTER TABLE `pricedetails`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `pricedetails_combination_uk` (`orderdetails_id`,`min_discount_quantity`),
ADD KEY `pricedetails_orderdetails_id_k` (`orderdetails_id`);
--
-- Indizes für die Tabelle `storelocations`
--
ALTER TABLE `storelocations`
ADD PRIMARY KEY (`id`),
ADD KEY `storelocations_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `suppliers`
--
ALTER TABLE `suppliers`
ADD PRIMARY KEY (`id`),
ADD KEY `suppliers_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `attachements`
--
ALTER TABLE `attachements`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=201;
--
-- AUTO_INCREMENT für Tabelle `attachement_types`
--
ALTER TABLE `attachement_types`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT für Tabelle `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=123;
--
-- AUTO_INCREMENT für Tabelle `devices`
--
ALTER TABLE `devices`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT für Tabelle `device_parts`
--
ALTER TABLE `device_parts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT für Tabelle `footprints`
--
ALTER TABLE `footprints`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82;
--
-- AUTO_INCREMENT für Tabelle `groups`
--
ALTER TABLE `groups`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT für Tabelle `log`
--
ALTER TABLE `log`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=218;
--
-- AUTO_INCREMENT für Tabelle `manufacturers`
--
ALTER TABLE `manufacturers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT für Tabelle `orderdetails`
--
ALTER TABLE `orderdetails`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=650;
--
-- AUTO_INCREMENT für Tabelle `parts`
--
ALTER TABLE `parts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1171;
--
-- AUTO_INCREMENT für Tabelle `pricedetails`
--
ALTER TABLE `pricedetails`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=437;
--
-- AUTO_INCREMENT für Tabelle `storelocations`
--
ALTER TABLE `storelocations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=340;
--
-- AUTO_INCREMENT für Tabelle `suppliers`
--
ALTER TABLE `suppliers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT für Tabelle `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `attachements`
--
ALTER TABLE `attachements`
ADD CONSTRAINT `attachements_type_id_fk` FOREIGN KEY (`type_id`) REFERENCES `attachement_types` (`id`);
--
-- Constraints der Tabelle `attachement_types`
--
ALTER TABLE `attachement_types`
ADD CONSTRAINT `attachement_types_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `attachement_types` (`id`);
--
-- Constraints der Tabelle `categories`
--
ALTER TABLE `categories`
ADD CONSTRAINT `categories_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`id`);
--
-- Constraints der Tabelle `devices`
--
ALTER TABLE `devices`
ADD CONSTRAINT `devices_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `devices` (`id`);
--
-- Constraints der Tabelle `footprints`
--
ALTER TABLE `footprints`
ADD CONSTRAINT `footprints_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `footprints` (`id`);
--
-- Constraints der Tabelle `manufacturers`
--
ALTER TABLE `manufacturers`
ADD CONSTRAINT `manufacturers_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `manufacturers` (`id`);
--
-- Constraints der Tabelle `parts`
--
ALTER TABLE `parts`
ADD CONSTRAINT `parts_id_footprint_fk` FOREIGN KEY (`id_footprint`) REFERENCES `footprints` (`id`),
ADD CONSTRAINT `parts_id_manufacturer_fk` FOREIGN KEY (`id_manufacturer`) REFERENCES `manufacturers` (`id`),
ADD CONSTRAINT `parts_id_storelocation_fk` FOREIGN KEY (`id_storelocation`) REFERENCES `storelocations` (`id`),
ADD CONSTRAINT `parts_order_orderdetails_id_fk` FOREIGN KEY (`order_orderdetails_id`) REFERENCES `orderdetails` (`id`);
--
-- Constraints der Tabelle `storelocations`
--
ALTER TABLE `storelocations`
ADD CONSTRAINT `storelocations_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `storelocations` (`id`);
--
-- Constraints der Tabelle `suppliers`
--
ALTER TABLE `suppliers`
ADD CONSTRAINT `suppliers_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `suppliers` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View file

@ -0,0 +1,736 @@
-- phpMyAdmin SQL Dump
-- version 5.1.3
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Erstellungszeit: 07. Mai 2023 um 01:48
-- Server-Version: 10.6.5-MariaDB-log
-- PHP-Version: 8.1.2
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Datenbank: `partdb-legacy`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `attachements`
--
CREATE TABLE `attachements` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`class_name` varchar(255) COLLATE utf8mb3_unicode_ci NOT NULL,
`element_id` int(11) NOT NULL,
`type_id` int(11) NOT NULL,
`filename` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`show_in_table` tinyint(1) NOT NULL DEFAULT 0,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `attachement_types`
--
CREATE TABLE `attachement_types` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `attachement_types`
--
INSERT INTO `attachement_types` (`id`, `name`, `parent_id`, `comment`, `datetime_added`, `last_modified`) VALUES
(1, 'Bilder', NULL, NULL, '2023-01-07 18:31:48', '0000-00-00 00:00:00'),
(2, 'Datenblätter', NULL, NULL, '2023-01-07 18:31:48', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `categories`
--
CREATE TABLE `categories` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`disable_footprints` tinyint(1) NOT NULL DEFAULT 0,
`disable_manufacturers` tinyint(1) NOT NULL DEFAULT 0,
`disable_autodatasheets` tinyint(1) NOT NULL DEFAULT 0,
`disable_properties` tinyint(1) NOT NULL DEFAULT 0,
`partname_regex` text COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
`partname_hint` text COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
`default_description` text COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
`default_comment` text COLLATE utf8mb3_unicode_ci NOT NULL DEFAULT '',
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `categories`
--
INSERT INTO `categories` (`id`, `name`, `parent_id`, `disable_footprints`, `disable_manufacturers`, `disable_autodatasheets`, `disable_properties`, `partname_regex`, `partname_hint`, `default_description`, `default_comment`, `comment`, `datetime_added`, `last_modified`) VALUES
(1, 'Test', NULL, 0, 0, 0, 0, '', '', '', '', '', '2023-01-07 18:32:29', '2023-01-07 18:32:29');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `devices`
--
CREATE TABLE `devices` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`order_quantity` int(11) NOT NULL DEFAULT 0,
`order_only_missing_parts` tinyint(1) NOT NULL DEFAULT 0,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `device_parts`
--
CREATE TABLE `device_parts` (
`id` int(11) NOT NULL,
`id_part` int(11) NOT NULL DEFAULT 0,
`id_device` int(11) NOT NULL DEFAULT 0,
`quantity` int(11) NOT NULL DEFAULT 0,
`mountnames` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `footprints`
--
CREATE TABLE `footprints` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`filename` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`filename_3d` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `groups`
--
CREATE TABLE `groups` (
`id` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`comment` mediumtext DEFAULT NULL,
`perms_system` int(11) NOT NULL,
`perms_groups` int(11) NOT NULL,
`perms_users` int(11) NOT NULL,
`perms_self` int(11) NOT NULL,
`perms_system_config` int(11) NOT NULL,
`perms_system_database` int(11) NOT NULL,
`perms_parts` bigint(11) NOT NULL,
`perms_parts_name` smallint(6) NOT NULL,
`perms_parts_description` smallint(6) NOT NULL,
`perms_parts_instock` smallint(6) NOT NULL,
`perms_parts_mininstock` smallint(6) NOT NULL,
`perms_parts_footprint` smallint(6) NOT NULL,
`perms_parts_storelocation` smallint(6) NOT NULL,
`perms_parts_manufacturer` smallint(6) NOT NULL,
`perms_parts_comment` smallint(6) NOT NULL,
`perms_parts_order` smallint(6) NOT NULL,
`perms_parts_orderdetails` smallint(6) NOT NULL,
`perms_parts_prices` smallint(6) NOT NULL,
`perms_parts_attachements` smallint(6) NOT NULL,
`perms_devices` int(11) NOT NULL,
`perms_devices_parts` int(11) NOT NULL,
`perms_storelocations` int(11) NOT NULL,
`perms_footprints` int(11) NOT NULL,
`perms_categories` int(11) NOT NULL,
`perms_suppliers` int(11) NOT NULL,
`perms_manufacturers` int(11) NOT NULL,
`perms_attachement_types` int(11) NOT NULL,
`perms_tools` int(11) NOT NULL,
`perms_labels` smallint(6) NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Daten für Tabelle `groups`
--
INSERT INTO `groups` (`id`, `name`, `parent_id`, `comment`, `perms_system`, `perms_groups`, `perms_users`, `perms_self`, `perms_system_config`, `perms_system_database`, `perms_parts`, `perms_parts_name`, `perms_parts_description`, `perms_parts_instock`, `perms_parts_mininstock`, `perms_parts_footprint`, `perms_parts_storelocation`, `perms_parts_manufacturer`, `perms_parts_comment`, `perms_parts_order`, `perms_parts_orderdetails`, `perms_parts_prices`, `perms_parts_attachements`, `perms_devices`, `perms_devices_parts`, `perms_storelocations`, `perms_footprints`, `perms_categories`, `perms_suppliers`, `perms_manufacturers`, `perms_attachement_types`, `perms_tools`, `perms_labels`, `datetime_added`, `last_modified`) VALUES
(1, 'admins', NULL, 'Users of this group can do everything: Read, Write and Administrative actions.', 21, 1365, 87381, 85, 85, 21, 1431655765, 5, 5, 5, 5, 5, 5, 5, 5, 5, 325, 325, 325, 5461, 325, 5461, 5461, 5461, 5461, 5461, 1365, 1365, 85, '2023-01-07 18:31:48', '0000-00-00 00:00:00'),
(2, 'readonly', NULL, 'Users of this group can only read informations, use tools, and don\'t have access to administrative tools.', 42, 2730, 174762, 154, 170, 42, -1516939607, 9, 9, 9, 9, 9, 9, 9, 9, 9, 649, 649, 649, 1705, 649, 1705, 1705, 1705, 1705, 1705, 681, 1366, 165, '2023-01-07 18:31:48', '0000-00-00 00:00:00'),
(3, 'users', NULL, 'Users of this group, can edit part informations, create new ones, etc. but are not allowed to use administrative tools. (But can read current configuration, and see Server status)', 42, 2730, 109226, 89, 105, 41, 1431655765, 5, 5, 5, 5, 5, 5, 5, 5, 5, 325, 325, 325, 5461, 325, 5461, 5461, 5461, 5461, 5461, 1365, 1365, 85, '2023-01-07 18:31:48', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `internal`
--
CREATE TABLE `internal` (
`keyName` char(30) CHARACTER SET ascii NOT NULL,
`keyValue` varchar(255) COLLATE utf8mb3_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `internal`
--
INSERT INTO `internal` (`keyName`, `keyValue`) VALUES
('dbVersion', '26');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `log`
--
CREATE TABLE `log` (
`id` int(11) NOT NULL,
`datetime` timestamp NOT NULL DEFAULT current_timestamp(),
`id_user` int(11) NOT NULL,
`level` tinyint(4) NOT NULL,
`type` smallint(6) NOT NULL,
`target_id` int(11) NOT NULL,
`target_type` smallint(6) NOT NULL,
`extra` mediumtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Daten für Tabelle `log`
--
INSERT INTO `log` (`id`, `datetime`, `id_user`, `level`, `type`, `target_id`, `target_type`, `extra`) VALUES
(1, '2023-01-07 18:31:48', 1, 4, 10, 0, 0, '{\"o\":0,\"n\":26,\"s\":true}'),
(2, '2023-01-07 18:32:13', 2, 6, 1, 2, 1, '{\"i\":\"::\"}'),
(3, '2023-01-07 18:32:29', 2, 6, 6, 1, 4, '[]'),
(4, '2023-01-07 18:32:53', 2, 6, 6, 1, 12, '[]'),
(5, '2023-01-07 18:33:26', 2, 6, 6, 1, 10, '{\"i\":0}');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `manufacturers`
--
CREATE TABLE `manufacturers` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`address` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`phone_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`fax_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`email_address` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`website` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`auto_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `orderdetails`
--
CREATE TABLE `orderdetails` (
`id` int(11) NOT NULL,
`part_id` int(11) NOT NULL,
`id_supplier` int(11) NOT NULL DEFAULT 0,
`supplierpartnr` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`obsolete` tinyint(1) DEFAULT 0,
`supplier_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `orderdetails`
--
INSERT INTO `orderdetails` (`id`, `part_id`, `id_supplier`, `supplierpartnr`, `obsolete`, `supplier_product_url`, `datetime_added`) VALUES
(1, 1, 1, 'BC547', 0, '', '2023-01-07 18:45:59'),
(2, 1, 1, 'Test', 0, '', '2023-01-07 18:46:09');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `parts`
--
CREATE TABLE `parts` (
`id` int(11) NOT NULL,
`id_category` int(11) NOT NULL DEFAULT 0,
`name` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`description` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`instock` int(11) NOT NULL DEFAULT 0,
`mininstock` int(11) NOT NULL DEFAULT 0,
`comment` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`visible` tinyint(1) NOT NULL,
`id_footprint` int(11) DEFAULT NULL,
`id_storelocation` int(11) DEFAULT NULL,
`order_orderdetails_id` int(11) DEFAULT NULL,
`order_quantity` int(11) NOT NULL DEFAULT 1,
`manual_order` tinyint(1) NOT NULL DEFAULT 0,
`id_manufacturer` int(11) DEFAULT NULL,
`id_master_picture_attachement` int(11) DEFAULT NULL,
`manufacturer_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
`favorite` tinyint(1) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `parts`
--
INSERT INTO `parts` (`id`, `id_category`, `name`, `description`, `instock`, `mininstock`, `comment`, `visible`, `id_footprint`, `id_storelocation`, `order_orderdetails_id`, `order_quantity`, `manual_order`, `id_manufacturer`, `id_master_picture_attachement`, `manufacturer_product_url`, `datetime_added`, `last_modified`, `favorite`) VALUES
(1, 1, 'BC547', '', 0, 0, '', 0, NULL, NULL, NULL, 1, 0, NULL, NULL, '', '2023-01-07 18:33:26', '2023-01-07 18:33:26', 0);
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `pricedetails`
--
CREATE TABLE `pricedetails` (
`id` int(11) NOT NULL,
`orderdetails_id` int(11) NOT NULL,
`price` decimal(11,5) DEFAULT NULL,
`price_related_quantity` int(11) NOT NULL DEFAULT 1,
`min_discount_quantity` int(11) NOT NULL DEFAULT 1,
`manual_input` tinyint(1) NOT NULL DEFAULT 1,
`last_modified` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `pricedetails`
--
INSERT INTO `pricedetails` (`id`, `orderdetails_id`, `price`, `price_related_quantity`, `min_discount_quantity`, `manual_input`, `last_modified`) VALUES
(1, 2, '3.55000', 1, 1, 1, '2023-01-07 18:46:19');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `storelocations`
--
CREATE TABLE `storelocations` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`is_full` tinyint(1) NOT NULL DEFAULT 0,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `suppliers`
--
CREATE TABLE `suppliers` (
`id` int(11) NOT NULL,
`name` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`parent_id` int(11) DEFAULT NULL,
`address` mediumtext COLLATE utf8mb3_unicode_ci NOT NULL,
`phone_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`fax_number` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`email_address` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`website` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`auto_product_url` tinytext COLLATE utf8mb3_unicode_ci NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`comment` text COLLATE utf8mb3_unicode_ci DEFAULT NULL,
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci;
--
-- Daten für Tabelle `suppliers`
--
INSERT INTO `suppliers` (`id`, `name`, `parent_id`, `address`, `phone_number`, `fax_number`, `email_address`, `website`, `auto_product_url`, `datetime_added`, `comment`, `last_modified`) VALUES
(1, 'Reichelt', NULL, '', '', '', '', '', '', '2023-01-07 18:32:53', '', '2023-01-07 18:32:53');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`name` varchar(32) NOT NULL,
`password` varchar(255) DEFAULT NULL,
`first_name` tinytext DEFAULT NULL,
`last_name` tinytext DEFAULT NULL,
`department` tinytext DEFAULT NULL,
`email` tinytext DEFAULT NULL,
`need_pw_change` tinyint(1) NOT NULL DEFAULT 0,
`group_id` int(11) DEFAULT NULL,
`config_language` tinytext DEFAULT NULL,
`config_timezone` tinytext DEFAULT NULL,
`config_theme` tinytext DEFAULT NULL,
`config_currency` tinytext DEFAULT NULL,
`config_image_path` text NOT NULL,
`config_instock_comment_w` text NOT NULL,
`config_instock_comment_a` text NOT NULL,
`perms_system` int(11) NOT NULL,
`perms_groups` int(11) NOT NULL,
`perms_users` int(11) NOT NULL,
`perms_self` int(11) NOT NULL,
`perms_system_config` int(11) NOT NULL,
`perms_system_database` int(11) NOT NULL,
`perms_parts` bigint(11) NOT NULL,
`perms_parts_name` smallint(6) NOT NULL,
`perms_parts_description` smallint(6) NOT NULL,
`perms_parts_instock` smallint(6) NOT NULL,
`perms_parts_mininstock` smallint(6) NOT NULL,
`perms_parts_footprint` smallint(6) NOT NULL,
`perms_parts_storelocation` smallint(6) NOT NULL,
`perms_parts_manufacturer` smallint(6) NOT NULL,
`perms_parts_comment` smallint(6) NOT NULL,
`perms_parts_order` smallint(6) NOT NULL,
`perms_parts_orderdetails` smallint(6) NOT NULL,
`perms_parts_prices` smallint(6) NOT NULL,
`perms_parts_attachements` smallint(6) NOT NULL,
`perms_devices` int(11) NOT NULL,
`perms_devices_parts` int(11) NOT NULL,
`perms_storelocations` int(11) NOT NULL,
`perms_footprints` int(11) NOT NULL,
`perms_categories` int(11) NOT NULL,
`perms_suppliers` int(11) NOT NULL,
`perms_manufacturers` int(11) NOT NULL,
`perms_attachement_types` int(11) NOT NULL,
`perms_tools` int(11) NOT NULL,
`perms_labels` smallint(6) NOT NULL,
`datetime_added` timestamp NOT NULL DEFAULT current_timestamp(),
`last_modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
--
-- Daten für Tabelle `users`
--
INSERT INTO `users` (`id`, `name`, `password`, `first_name`, `last_name`, `department`, `email`, `need_pw_change`, `group_id`, `config_language`, `config_timezone`, `config_theme`, `config_currency`, `config_image_path`, `config_instock_comment_w`, `config_instock_comment_a`, `perms_system`, `perms_groups`, `perms_users`, `perms_self`, `perms_system_config`, `perms_system_database`, `perms_parts`, `perms_parts_name`, `perms_parts_description`, `perms_parts_instock`, `perms_parts_mininstock`, `perms_parts_footprint`, `perms_parts_storelocation`, `perms_parts_manufacturer`, `perms_parts_comment`, `perms_parts_order`, `perms_parts_orderdetails`, `perms_parts_prices`, `perms_parts_attachements`, `perms_devices`, `perms_devices_parts`, `perms_storelocations`, `perms_footprints`, `perms_categories`, `perms_suppliers`, `perms_manufacturers`, `perms_attachement_types`, `perms_tools`, `perms_labels`, `datetime_added`, `last_modified`) VALUES
(1, 'anonymous', '', '', '', '', '', 0, 2, NULL, NULL, NULL, NULL, '', '', '', 21844, 20480, 0, 0, 0, 0, 0, 21840, 21840, 21840, 21840, 21840, 21840, 21840, 21840, 21840, 21520, 21520, 21520, 20480, 21520, 20480, 20480, 20480, 20480, 20480, 21504, 20480, 0, '2023-01-07 18:31:48', '0000-00-00 00:00:00'),
(2, 'admin', '$2a$12$j0RKrKlx60bzX1DWMyXwjeaW.pe3bFjAK8ByIGnvjrRnET2JtsFoe$2a$12$j0RKrKlx60bzX1DWMyXwjeaW.pe3bFjAK8ByIGnvjrRnET2JtsFoe', '', '', '', '', 1, 1, NULL, NULL, NULL, NULL, '', '', '', 21845, 21845, 21845, 21, 85, 21, 349525, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 21845, 0, '2023-01-07 18:31:48', '0000-00-00 00:00:00');
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `attachements`
--
ALTER TABLE `attachements`
ADD PRIMARY KEY (`id`),
ADD KEY `attachements_class_name_k` (`class_name`),
ADD KEY `attachements_element_id_k` (`element_id`),
ADD KEY `attachements_type_id_fk` (`type_id`);
--
-- Indizes für die Tabelle `attachement_types`
--
ALTER TABLE `attachement_types`
ADD PRIMARY KEY (`id`),
ADD KEY `attachement_types_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `categories`
--
ALTER TABLE `categories`
ADD PRIMARY KEY (`id`),
ADD KEY `categories_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `devices`
--
ALTER TABLE `devices`
ADD PRIMARY KEY (`id`),
ADD KEY `devices_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `device_parts`
--
ALTER TABLE `device_parts`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `device_parts_combination_uk` (`id_part`,`id_device`),
ADD KEY `device_parts_id_part_k` (`id_part`),
ADD KEY `device_parts_id_device_k` (`id_device`);
--
-- Indizes für die Tabelle `footprints`
--
ALTER TABLE `footprints`
ADD PRIMARY KEY (`id`),
ADD KEY `footprints_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `groups`
--
ALTER TABLE `groups`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`);
--
-- Indizes für die Tabelle `internal`
--
ALTER TABLE `internal`
ADD UNIQUE KEY `keyName` (`keyName`);
--
-- Indizes für die Tabelle `log`
--
ALTER TABLE `log`
ADD PRIMARY KEY (`id`),
ADD KEY `id_user` (`id_user`);
--
-- Indizes für die Tabelle `manufacturers`
--
ALTER TABLE `manufacturers`
ADD PRIMARY KEY (`id`),
ADD KEY `manufacturers_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `orderdetails`
--
ALTER TABLE `orderdetails`
ADD PRIMARY KEY (`id`),
ADD KEY `orderdetails_part_id_k` (`part_id`),
ADD KEY `orderdetails_id_supplier_k` (`id_supplier`);
--
-- Indizes für die Tabelle `parts`
--
ALTER TABLE `parts`
ADD PRIMARY KEY (`id`),
ADD KEY `parts_id_category_k` (`id_category`),
ADD KEY `parts_id_footprint_k` (`id_footprint`),
ADD KEY `parts_id_storelocation_k` (`id_storelocation`),
ADD KEY `parts_order_orderdetails_id_k` (`order_orderdetails_id`),
ADD KEY `parts_id_manufacturer_k` (`id_manufacturer`),
ADD KEY `favorite` (`favorite`);
--
-- Indizes für die Tabelle `pricedetails`
--
ALTER TABLE `pricedetails`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `pricedetails_combination_uk` (`orderdetails_id`,`min_discount_quantity`),
ADD KEY `pricedetails_orderdetails_id_k` (`orderdetails_id`);
--
-- Indizes für die Tabelle `storelocations`
--
ALTER TABLE `storelocations`
ADD PRIMARY KEY (`id`),
ADD KEY `storelocations_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `suppliers`
--
ALTER TABLE `suppliers`
ADD PRIMARY KEY (`id`),
ADD KEY `suppliers_parent_id_k` (`parent_id`);
--
-- Indizes für die Tabelle `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `name` (`name`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `attachements`
--
ALTER TABLE `attachements`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `attachement_types`
--
ALTER TABLE `attachement_types`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT für Tabelle `categories`
--
ALTER TABLE `categories`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT für Tabelle `devices`
--
ALTER TABLE `devices`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `device_parts`
--
ALTER TABLE `device_parts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `footprints`
--
ALTER TABLE `footprints`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `groups`
--
ALTER TABLE `groups`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT für Tabelle `log`
--
ALTER TABLE `log`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT für Tabelle `manufacturers`
--
ALTER TABLE `manufacturers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `orderdetails`
--
ALTER TABLE `orderdetails`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT für Tabelle `parts`
--
ALTER TABLE `parts`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT für Tabelle `pricedetails`
--
ALTER TABLE `pricedetails`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT für Tabelle `storelocations`
--
ALTER TABLE `storelocations`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `suppliers`
--
ALTER TABLE `suppliers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT für Tabelle `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `attachements`
--
ALTER TABLE `attachements`
ADD CONSTRAINT `attachements_type_id_fk` FOREIGN KEY (`type_id`) REFERENCES `attachement_types` (`id`);
--
-- Constraints der Tabelle `attachement_types`
--
ALTER TABLE `attachement_types`
ADD CONSTRAINT `attachement_types_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `attachement_types` (`id`);
--
-- Constraints der Tabelle `categories`
--
ALTER TABLE `categories`
ADD CONSTRAINT `categories_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `categories` (`id`);
--
-- Constraints der Tabelle `devices`
--
ALTER TABLE `devices`
ADD CONSTRAINT `devices_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `devices` (`id`);
--
-- Constraints der Tabelle `footprints`
--
ALTER TABLE `footprints`
ADD CONSTRAINT `footprints_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `footprints` (`id`);
--
-- Constraints der Tabelle `manufacturers`
--
ALTER TABLE `manufacturers`
ADD CONSTRAINT `manufacturers_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `manufacturers` (`id`);
--
-- Constraints der Tabelle `parts`
--
ALTER TABLE `parts`
ADD CONSTRAINT `parts_id_footprint_fk` FOREIGN KEY (`id_footprint`) REFERENCES `footprints` (`id`),
ADD CONSTRAINT `parts_id_manufacturer_fk` FOREIGN KEY (`id_manufacturer`) REFERENCES `manufacturers` (`id`),
ADD CONSTRAINT `parts_id_storelocation_fk` FOREIGN KEY (`id_storelocation`) REFERENCES `storelocations` (`id`),
ADD CONSTRAINT `parts_order_orderdetails_id_fk` FOREIGN KEY (`order_orderdetails_id`) REFERENCES `orderdetails` (`id`);
--
-- Constraints der Tabelle `storelocations`
--
ALTER TABLE `storelocations`
ADD CONSTRAINT `storelocations_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `storelocations` (`id`);
--
-- Constraints der Tabelle `suppliers`
--
ALTER TABLE `suppliers`
ADD CONSTRAINT `suppliers_parent_id_fk` FOREIGN KEY (`parent_id`) REFERENCES `suppliers` (`id`);
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

View file

@ -0,0 +1,54 @@
#
# This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
#
# Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
#!/bin/bash
# This script is used to test the legacy import of Part-DB
SQL_FILES_TO_TEST=("db_minimal.sql" "db_jbtronics.sql")
DB_NAME="legacy_db_test"
DB_USER="root"
DB_PASSWORD="root"
# Iterate over all given SQL files and import them into the mysql database with the given name, drop the database if it already exists before
for SQL_FILE in "${SQL_FILES_TO_TEST[@]}"
do
echo "Testing for $SQL_FILE"
mysql -u $DB_USER --password=$DB_PASSWORD -e "DROP DATABASE IF EXISTS $DB_NAME; CREATE DATABASE $DB_NAME;"
# If the last command failed, exit the script
if [ $? -ne 0 ]; then
echo "Failed to create database $DB_NAME"
exit 1
fi
# Import the SQL file into the database. The file pathes are relative to the current script location
mysql -u $DB_USER --password=$DB_PASSWORD $DB_NAME < .github/assets/legacy_import/$SQL_FILE
# If the last command failed, exit the script
if [ $? -ne 0 ]; then
echo "Failed to import $SQL_FILE into database $DB_NAME"
exit 1
fi
# Run doctrine migrations, this will migrate the database to the current version. This process should not fail
php bin/console doctrine:migrations:migrate -n
# If the last command failed, exit the script
if [ $? -ne 0 ]; then
echo "Failed to migrate database $DB_NAME"
exit 1
fi
done

11
.github/dependabot.yml vendored Normal file
View file

@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View file

@ -19,14 +19,22 @@ jobs:
APP_ENV: prod APP_ENV: prod
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
ini-values: xdebug.max_nesting_level=1000
extensions: mbstring, intl, gd, xsl, gmp, bcmath, :php-psr
- name: Get Composer Cache Directory - name: Get Composer Cache Directory
id: composer-cache id: composer-cache
run: | run: |
echo "::set-output name=dir::$(composer config cache-files-dir)" echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3 - uses: actions/cache@v4
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@ -40,7 +48,7 @@ jobs:
id: yarn-cache-dir-path id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)" run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3 - uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with: with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@ -49,7 +57,7 @@ jobs:
${{ runner.os }}-yarn- ${{ runner.os }}-yarn-
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: '18' node-version: '18'
@ -69,13 +77,13 @@ jobs:
run: zip -r /tmp/partdb_assets.zip public/build/ vendor/ run: zip -r /tmp/partdb_assets.zip public/build/ vendor/
- name: Upload assets artifact - name: Upload assets artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: Only dependencies and built assets name: Only dependencies and built assets
path: /tmp/partdb_assets.zip path: /tmp/partdb_assets.zip
- name: Upload full artifact - name: Upload full artifact
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: Full Part-DB including dependencies and built assets name: Full Part-DB including dependencies and built assets
path: /tmp/partdb_with_assets.zip path: /tmp/partdb_with_assets.zip

View file

@ -1,54 +0,0 @@
name: "CodeQL"
on:
push:
branches: [master, ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 14 * * 3'
jobs:
analyse:
name: Analyse
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# If this run was triggered by a pull request event, then checkout
# the head of the pull request instead of the merge commit.
- run: git checkout HEAD^2
if: ${{ github.event_name == 'pull_request' }}
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
# Override language selection by uncommenting this and choosing your languages
# with:
# languages: go, javascript, csharp, python, cpp, java
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

View file

@ -10,9 +10,6 @@ on:
tags: tags:
- 'v*.*.*' - 'v*.*.*'
- 'v*.*.*-**' - 'v*.*.*-**'
pull_request:
branches:
- 'master'
jobs: jobs:
docker: docker:
@ -20,11 +17,11 @@ jobs:
steps: steps:
- -
name: Checkout name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- -
name: Docker meta name: Docker meta
id: docker_meta id: docker_meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v5
with: with:
# list of Docker images to use as base name for tags # list of Docker images to use as base name for tags
images: | images: |
@ -52,23 +49,23 @@ jobs:
- -
name: Set up QEMU name: Set up QEMU
uses: docker/setup-qemu-action@v2 uses: docker/setup-qemu-action@v3
with: with:
platforms: 'arm64,arm' platforms: 'arm64,arm'
- -
name: Set up Docker Buildx name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v3
- -
name: Login to DockerHub name: Login to DockerHub
if: github.event_name != 'pull_request' if: github.event_name != 'pull_request'
uses: docker/login-action@v2 uses: docker/login-action@v3
with: with:
username: ${{ secrets.DOCKERHUB_USERNAME }} username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- -
name: Build and push name: Build and push
uses: docker/build-push-action@v4 uses: docker/build-push-action@v6
with: with:
context: . context: .
platforms: linux/amd64,linux/arm64,linux/arm/v7 platforms: linux/amd64,linux/arm64,linux/arm/v7

77
.github/workflows/docker_frankenphp.yml vendored Normal file
View file

@ -0,0 +1,77 @@
name: Docker Image Build (FrankenPHP)
on:
#schedule:
# - cron: '0 10 * * *' # everyday at 10am
push:
branches:
- '**'
- '!l10n_**'
tags:
- 'v*.*.*'
- 'v*.*.*-**'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
# list of Docker images to use as base name for tags
images: |
partdborg/part-db
# Mark the image build from master as latest (as we dont have really releases yet)
tags: |
type=edge,branch=master
type=ref,event=branch,
type=ref,event=tag,
type=schedule
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
type=ref,event=branch
type=ref,event=pr
labels: |
org.opencontainers.image.source=${{ github.event.repository.clone_url }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.title=Part-DB
org.opencontainers.image.description=Part-DB is a web application for managing electronic components and your inventory.
org.opencontainers.image.url=https://github.com/Part-DB/Part-DB-server
org.opencontainers.image.source=https://github.com/Part-DB/Part-DB-server
org.opencontainers.image.authors=Jan Böhmer
org.opencontainers.licenses=AGPL-3.0-or-later
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: 'arm64,arm'
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: Dockerfile-frankenphp
platforms: linux/amd64,linux/arm64,linux/arm/v7
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max

View file

@ -16,14 +16,22 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
coverage: none
ini-values: xdebug.max_nesting_level=1000
extensions: mbstring, intl, gd, xsl, gmp, bcmath, :php-psr
- name: Get Composer Cache Directory - name: Get Composer Cache Directory
id: composer-cache id: composer-cache
run: | run: |
echo "::set-output name=dir::$(composer config cache-files-dir)" echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v3 - uses: actions/cache@v4
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@ -38,18 +46,20 @@ jobs:
- name: Lint twig templates - name: Lint twig templates
run: ./bin/console lint:twig templates --env=prod run: ./bin/console lint:twig templates --env=prod
- name: Lint translations # This causes problems with emtpy language files
run: ./bin/console lint:xliff translations #- name: Lint translations
# run: ./bin/console lint:xliff translations
- name: Check dependencies for security - name: Check dependencies for security
uses: symfonycorp/security-checker-action@v3 uses: symfonycorp/security-checker-action@v5
- name: Check doctrine mapping - name: Check doctrine mapping
run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction run: ./bin/console doctrine:schema:validate --skip-sync -vvv --no-interaction
# Use the -d option to raise the max nesting level
- name: Generate dev container - name: Generate dev container
run: ./bin/console cache:clear --env dev run: php -d xdebug.max_nesting_level=1000 ./bin/console cache:clear --env dev
- name: Run PHPstan - name: Run PHPstan
run: composer phpstan run: composer phpstan

View file

@ -13,13 +13,13 @@ on:
jobs: jobs:
phpunit: phpunit:
name: PHPUnit and coverage Test (PHP ${{ matrix.php-versions }}, ${{ matrix.db-type }}) name: PHPUnit and coverage Test (PHP ${{ matrix.php-versions }}, ${{ matrix.db-type }})
# Ubuntu 20.04 ships MySQL 8.0 which causes problems with login, so we just use ubuntu 18.04 for now...
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
strategy: strategy:
fail-fast: false
matrix: matrix:
php-versions: [ '7.4', '8.0', '8.1', '8.2' ] php-versions: [ '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql', 'sqlite' ] db-type: [ 'mysql', 'sqlite', 'postgres' ]
env: env:
# Note that we set DATABASE URL later based on our db-type matrix value # Note that we set DATABASE URL later based on our db-type matrix value
@ -27,30 +27,45 @@ jobs:
SYMFONY_DEPRECATIONS_HELPER: disabled SYMFONY_DEPRECATIONS_HELPER: disabled
PHP_VERSION: ${{ matrix.php-versions }} PHP_VERSION: ${{ matrix.php-versions }}
DB_TYPE: ${{ matrix.db-type }} DB_TYPE: ${{ matrix.db-type }}
CHECK_FOR_UPDATES: false # Disable update checks for tests
steps: steps:
- name: Set Database env for MySQL - name: Set Database env for MySQL
run: echo "DATABASE_URL=mysql://root:root@127.0.0.1:3306/test" >> $GITHUB_ENV run: echo "DATABASE_URL=mysql://root:root@127.0.0.1:3306/partdb?serverVersion=8.0.35" >> $GITHUB_ENV
if: matrix.db-type == 'mysql' if: matrix.db-type == 'mysql'
- name: Set Database env for SQLite - name: Set Database env for SQLite
run: echo "DATABASE_URL="sqlite:///%kernel.project_dir%/var/app_test.db"" >> $GITHUB_ENV run: echo "DATABASE_URL="sqlite:///%kernel.project_dir%/var/app_test.db"" >> $GITHUB_ENV
if: matrix.db-type == 'sqlite' if: matrix.db-type == 'sqlite'
- name: Set Database env for PostgreSQL
run: echo "DATABASE_URL=postgresql://postgres:postgres @127.0.0.1:5432/partdb?serverVersion=14&charset=utf8" >> $GITHUB_ENV
if: matrix.db-type == 'postgres'
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v4
- name: Setup PHP - name: Setup PHP
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: ${{ matrix.php-versions }} php-version: ${{ matrix.php-versions }}
coverage: pcov coverage: pcov
extensions: mbstring, intl, gd, xsl, gmp, bcmath ini-values: xdebug.max_nesting_level=1000
extensions: mbstring, intl, gd, xsl, gmp, bcmath, :php-psr
- name: Start MySQL - name: Start MySQL
run: sudo systemctl start mysql.service run: sudo systemctl start mysql.service
if: matrix.db-type == 'mysql'
#- name: Setup MySQL # Replace the scram-sha-256 with trust for host connections, to avoid password authentication
- name: Start PostgreSQL
run: |
sudo sed -i 's/^\(host.*all.*all.*\)scram-sha-256/\1trust/' /etc/postgresql/14/main/pg_hba.conf
sudo systemctl start postgresql.service
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
if: matrix.db-type == 'postgres'
#- name: Setup MySQL
# uses: mirromutth/mysql-action@v1.1 # uses: mirromutth/mysql-action@v1.1
# with: # with:
# mysql version: 5.7 # mysql version: 5.7
@ -63,7 +78,7 @@ jobs:
id: composer-cache id: composer-cache
run: | run: |
echo "::set-output name=dir::$(composer config cache-files-dir)" echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v1 - uses: actions/cache@v4
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@ -74,7 +89,7 @@ jobs:
id: yarn-cache-dir-path id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)" run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3 - uses: actions/cache@v4
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with: with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
@ -86,7 +101,7 @@ jobs:
run: composer install --prefer-dist --no-progress run: composer install --prefer-dist --no-progress
- name: Setup node - name: Setup node
uses: actions/setup-node@v3 uses: actions/setup-node@v4
with: with:
node-version: '18' node-version: '18'
@ -98,26 +113,24 @@ jobs:
- name: Create DB - name: Create DB
run: php bin/console --env test doctrine:database:create --if-not-exists -n run: php bin/console --env test doctrine:database:create --if-not-exists -n
if: matrix.db-type == 'mysql' if: matrix.db-type == 'mysql' || matrix.db-type == 'postgres'
# Checkinf for existance is not supported for sqlite, so do it without it
- name: Create DB
run: php bin/console --env test doctrine:database:create -n
if: matrix.db-type == 'sqlite'
- name: Do migrations - name: Do migrations
run: php bin/console --env test doctrine:migrations:migrate -n run: php bin/console --env test doctrine:migrations:migrate -n
# Use our own custom fixtures loading command to circumvent some problems with reset the autoincrement values
- name: Load fixtures - name: Load fixtures
run: php bin/console --env test doctrine:fixtures:load -n --purger reset_autoincrement_purger run: php bin/console --env test partdb:fixtures:load -n
- name: Run PHPunit and generate coverage - name: Run PHPunit and generate coverage
run: ./bin/phpunit --coverage-clover=coverage.xml run: ./bin/phpunit --coverage-clover=coverage.xml
- name: Upload coverage - name: Upload coverage
uses: codecov/codecov-action@v3 uses: codecov/codecov-action@v5
with: with:
env_vars: PHP_VERSION,DB_TYPE env_vars: PHP_VERSION,DB_TYPE
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Test app:clean-attachments - name: Test app:clean-attachments
run: php bin/console partdb:attachments:clean-unused -n run: php bin/console partdb:attachments:clean-unused -n
@ -130,4 +143,12 @@ jobs:
- name: Test check-requirements command - name: Test check-requirements command
run: php bin/console partdb:check-requirements -n run: php bin/console partdb:check-requirements -n
- name: Test partdb:backup command
run: php bin/console partdb:backup -n --full /tmp/test_backup.zip
- name: Test legacy Part-DB import
run: bash .github/assets/legacy_import/test_legacy_import.sh
if: matrix.db-type == 'mysql' && matrix.php-versions == '8.2'
env:
DATABASE_URL: mysql://root:root@localhost:3306/legacy_db

4
.gitignore vendored
View file

@ -43,3 +43,7 @@ yarn-error.log
/phpunit.xml /phpunit.xml
.phpunit.result.cache .phpunit.result.cache
###< phpunit/phpunit ### ###< phpunit/phpunit ###
###> phpstan/phpstan ###
phpstan.neon
###< phpstan/phpstan ###

View file

@ -1,22 +1,64 @@
FROM debian:bullseye-slim ARG BASE_IMAGE=debian:bookworm-slim
ARG PHP_VERSION=8.3
FROM ${BASE_IMAGE} AS base
ARG PHP_VERSION
# Install needed dependencies for PHP build # Install needed dependencies for PHP build
#RUN apt-get update && apt-get install -y pkg-config curl libcurl4-openssl-dev libicu-dev \ #RUN apt-get update && apt-get install -y pkg-config curl libcurl4-openssl-dev libicu-dev \
# libpng-dev libjpeg-dev libfreetype6-dev gnupg zip libzip-dev libjpeg62-turbo-dev libonig-dev libxslt-dev libwebp-dev vim \ # libpng-dev libjpeg-dev libfreetype6-dev gnupg zip libzip-dev libjpeg62-turbo-dev libonig-dev libxslt-dev libwebp-dev vim \
# && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/* # && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
RUN apt-get update && apt-get -y install apt-transport-https lsb-release ca-certificates curl zip \ RUN apt-get update && apt-get -y install \
apt-transport-https \
lsb-release \
ca-certificates \
curl \
zip \
mariadb-client \
postgresql-client \
&& curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg \ && curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg \
&& sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \ && sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' \
&& apt-get update && apt-get upgrade -y \ && apt-get update && apt-get upgrade -y \
&& apt-get install -y apache2 php8.1 libapache2-mod-php8.1 php8.1-opcache php8.1-curl php8.1-gd php8.1-mbstring php8.1-xml php8.1-bcmath php8.1-intl php8.1-zip php8.1-xsl php8.1-sqlite3 php8.1-mysql gpg \ && apt-get install -y \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*; apache2 \
php${PHP_VERSION} \
ENV APACHE_CONFDIR /etc/apache2 php${PHP_VERSION}-fpm \
ENV APACHE_ENVVARS $APACHE_CONFDIR/envvars php${PHP_VERSION}-opcache \
php${PHP_VERSION}-curl \
php${PHP_VERSION}-gd \
php${PHP_VERSION}-mbstring \
php${PHP_VERSION}-xml \
php${PHP_VERSION}-bcmath \
php${PHP_VERSION}-intl \
php${PHP_VERSION}-zip \
php${PHP_VERSION}-xsl \
php${PHP_VERSION}-sqlite3 \
php${PHP_VERSION}-mysql \
php${PHP_VERSION}-pgsql \
gpg \
sudo \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/* \
# Create workdir and set permissions if directory does not exists # Create workdir and set permissions if directory does not exists
RUN mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html && mkdir -p /var/www/html \
&& chown -R www-data:www-data /var/www/html \
# delete the "index.html" that installing Apache drops in here
&& rm -rvf /var/www/html/*
# Install node and yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get update && apt-get install -y \
nodejs \
yarn \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
# Install composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
ENV APACHE_CONFDIR=/etc/apache2
ENV APACHE_ENVVARS=$APACHE_CONFDIR/envvars
# Configure apache 2 (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/Dockerfile) # Configure apache 2 (taken from https://github.com/docker-library/php/blob/master/8.2/bullseye/apache/Dockerfile)
# generically convert lines like # generically convert lines like
@ -27,8 +69,6 @@ RUN mkdir -p /var/www/html && chown -R www-data:www-data /var/www/html
# so that they can be overridden at runtime ("-e APACHE_RUN_USER=...") # so that they can be overridden at runtime ("-e APACHE_RUN_USER=...")
RUN sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"; \ RUN sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"; \
set -eux; . "$APACHE_ENVVARS"; \ set -eux; . "$APACHE_ENVVARS"; \
# delete the "index.html" that installing Apache drops in here
rm -rvf /var/www/html/*; \
\ \
# logs should go to stdout / stderr # logs should go to stdout / stderr
ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log"; \ ln -sfT /dev/stderr "$APACHE_LOG_DIR/error.log"; \
@ -36,66 +76,87 @@ RUN sed -ri 's/^export ([^=]+)=(.*)$/: ${\1:=\2}\nexport \1/' "$APACHE_ENVVARS"
ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"; \ ln -sfT /dev/stdout "$APACHE_LOG_DIR/other_vhosts_access.log"; \
chown -R --no-dereference "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$APACHE_LOG_DIR"; chown -R --no-dereference "$APACHE_RUN_USER:$APACHE_RUN_GROUP" "$APACHE_LOG_DIR";
# Enable mpm_prefork # ---
RUN a2dismod mpm_event && a2enmod mpm_prefork
FROM scratch AS apache-config
ARG PHP_VERSION
# Configure php-fpm to log to stdout of the container (stdout of PID 1)
# We have to use /proc/1/fd/1 because /dev/stdout or /proc/self/fd/1 does not point to the container stdout (because we use apache as entrypoint)
# We also disable the clear_env option to allow the use of environment variables in php-fpm
COPY <<EOF /etc/php/${PHP_VERSION}/fpm/pool.d/zz-docker.conf
[global]
error_log = /proc/1/fd/1
[www]
access.log = /proc/1/fd/1
catch_workers_output = yes
decorate_workers_output = no
clear_env = no
EOF
# PHP files should be handled by PHP, and should be preferred over any other file type # PHP files should be handled by PHP, and should be preferred over any other file type
RUN { \ COPY <<EOF /etc/apache2/conf-available/docker-php.conf
echo '<FilesMatch \.php$>'; \ <FilesMatch \\.php$>
echo '\tSetHandler application/x-httpd-php'; \ SetHandler application/x-httpd-php
echo '</FilesMatch>'; \ </FilesMatch>
echo; \
echo 'DirectoryIndex disabled'; \ DirectoryIndex disabled
echo 'DirectoryIndex index.php index.html'; \ DirectoryIndex index.php index.html
echo; \
echo '<Directory /var/www/>'; \ <Directory /var/www/>
echo '\tOptions -Indexes'; \ Options -Indexes
echo '\tAllowOverride All'; \ AllowOverride All
echo '</Directory>'; \ </Directory>
} | tee "$APACHE_CONFDIR/conf-available/docker-php.conf" \ EOF
&& a2enconf docker-php
# Enable opcache and configure it recommended for symfony (see https://symfony.com/doc/current/performance.html) # Enable opcache and configure it recommended for symfony (see https://symfony.com/doc/current/performance.html)
RUN \ COPY <<EOF /etc/php/${PHP_VERSION}/fpm/conf.d/symfony-recommended.ini
{ \ opcache.memory_consumption=256
echo 'opcache.memory_consumption=256'; \ opcache.max_accelerated_files=20000
echo 'opcache.max_accelerated_files=20000'; \ opcache.validate_timestamp=0
echo 'opcache.validate_timestamp=0'; \ # Configure Realpath cache for performance
# Configure Realpath cache for performance realpath_cache_size=4096K
echo 'realpath_cache_size=4096K'; \ realpath_cache_ttl=600
echo 'realpath_cache_ttl=600'; \ EOF
} > /etc/php/8.1/apache2/conf.d/symfony-recommended.ini
# Increase upload limit # Increase upload limit and enable preloading
RUN \ COPY <<EOF /etc/php/${PHP_VERSION}/fpm/conf.d/partdb.ini
{ \ upload_max_filesize=256M
echo 'upload_max_filesize=256M'; \ post_max_size=300M
echo 'post_max_size=300M'; \ opcache.preload_user=www-data
} > /etc/php/8.1/apache2/conf.d/partdb.ini opcache.preload=/var/www/html/config/preload.php
log_limit=8096
EOF
# Install node and yarn COPY ./.docker/symfony.conf /etc/apache2/sites-available/symfony.conf
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
RUN echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - && apt-get update && apt-get install -y nodejs yarn && apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
# Install composer # ---
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
FROM base
ARG PHP_VERSION
# Set working dir # Set working dir
WORKDIR /var/www/html WORKDIR /var/www/html
COPY --from=apache-config / /
COPY --chown=www-data:www-data . . COPY --chown=www-data:www-data . .
# Setup apache2 # Setup apache2
RUN a2dissite 000-default.conf RUN a2dissite 000-default.conf && \
COPY ./.docker/symfony.conf /etc/apache2/sites-available/symfony.conf a2ensite symfony.conf && \
RUN a2ensite symfony.conf # Enable php-fpm
RUN a2enmod rewrite a2enmod proxy_fcgi setenvif && \
a2enconf php${PHP_VERSION}-fpm && \
a2enconf docker-php && \
a2enmod rewrite
# Install composer and yarn dependencies for Part-DB # Install composer and yarn dependencies for Part-DB
USER www-data USER www-data
RUN composer install -a --no-dev && composer clear-cache RUN composer install -a --no-dev && \
RUN yarn install --network-timeout 600000 && yarn build && yarn cache clean && rm -rf node_modules/ composer clear-cache
RUN yarn install --network-timeout 600000 && \
yarn build && \
yarn cache clean && \
rm -rf node_modules/
# Use docker env to output logs to stdout # Use docker env to output logs to stdout
ENV APP_ENV=docker ENV APP_ENV=docker
@ -103,10 +164,12 @@ ENV DATABASE_URL="sqlite:///%kernel.project_dir%/uploads/app.db"
USER root USER root
# Copy entrypoint to /usr/local/bin and make it executable # Replace the php version placeholder in the entry point, with our php version
RUN cp ./.docker/partdb-entrypoint.sh /usr/local/bin/partdb-entrypoint.sh && chmod +x /usr/local/bin/partdb-entrypoint.sh RUN sed -i "s/PHP_VERSION/${PHP_VERSION}/g" ./.docker/partdb-entrypoint.sh
# Copy apache2-foreground to /usr/local/bin and make it executable
RUN cp ./.docker/apache2-foreground /usr/local/bin/apache2-foreground && chmod +x /usr/local/bin/apache2-foreground # Copy entrypoint and apache2-foreground to /usr/local/bin and make it executable
RUN install ./.docker/partdb-entrypoint.sh /usr/local/bin && \
install ./.docker/apache2-foreground /usr/local/bin
ENTRYPOINT ["partdb-entrypoint.sh"] ENTRYPOINT ["partdb-entrypoint.sh"]
CMD ["apache2-foreground"] CMD ["apache2-foreground"]
@ -114,4 +177,4 @@ CMD ["apache2-foreground"]
STOPSIGNAL SIGWINCH STOPSIGNAL SIGWINCH
EXPOSE 80 EXPOSE 80
VOLUME ["/var/www/html/uploads", "/var/www/html/public/media"] VOLUME ["/var/www/html/uploads", "/var/www/html/public/media"]

101
Dockerfile-frankenphp Normal file
View file

@ -0,0 +1,101 @@
FROM dunglas/frankenphp:1-php8.3 AS frankenphp_upstream
RUN apt-get update && apt-get -y install \
curl \
ca-certificates \
mariadb-client \
postgresql-client \
file \
acl \
git \
gettext \
gnupg \
zip \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*;
# Install node and yarn
RUN curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - && \
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list && \
curl -sL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get update && apt-get install -y \
nodejs yarn \
&& apt-get -y autoremove && apt-get clean autoclean && rm -rf /var/lib/apt/lists/*
# Install PHP
RUN set -eux; \
install-php-extensions \
@composer \
apcu \
intl \
opcache \
zip \
pdo_mysql \
pdo_sqlite \
pdo_pgsql \
gd \
bcmath \
xsl \
;
# Copy config files for php and caddy
COPY --link .docker/frankenphp/conf.d/app.ini $PHP_INI_DIR/conf.d/
COPY --chmod=755 .docker/frankenphp/docker-entrypoint.sh /usr/local/bin/docker-entrypoint
COPY --link .docker/frankenphp/Caddyfile /etc/caddy/Caddyfile
COPY --link .docker/frankenphp/conf.d/app.prod.ini $PHP_INI_DIR/conf.d/
COPY --link .docker/frankenphp/worker.Caddyfile /etc/caddy/worker.Caddyfile
ENV FRANKENPHP_CONFIG="import worker.Caddyfile"
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
# Install composer
ENV COMPOSER_ALLOW_SUPERUSER=1
#COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Create workdir and set permissions if directory does not exists
WORKDIR /app
# prevent the reinstallation of vendors at every changes in the source code
COPY --link composer.* symfony.* ./
RUN set -eux; \
composer install --no-cache --prefer-dist --no-dev --no-autoloader --no-scripts --no-progress
# copy sources
COPY --link . ./
# Install composer and yarn dependencies for Part-DB
RUN set -eux; \
mkdir -p var/cache var/log; \
composer dump-autoload --classmap-authoritative --no-dev; \
composer dump-env prod; \
composer run-script --no-dev post-install-cmd; \
chmod +x bin/console; sync;
RUN yarn install --network-timeout 600000 && \
yarn build && \
yarn cache clean && \
rm -rf node_modules/
# Use docker env to output logs to stdout
ENV APP_ENV=docker
ENV DATABASE_URL="sqlite:///%kernel.project_dir%/uploads/app.db"
USER root
ENTRYPOINT ["docker-entrypoint"]
CMD ["frankenphp", "run", "--config", "/etc/caddy/Caddyfile"]
# https://httpd.apache.org/docs/2.4/stopping.html#gracefulstop
STOPSIGNAL SIGWINCH
VOLUME ["/var/www/html/uploads", "/var/www/html/public/media"]
HEALTHCHECK --start-period=60s CMD curl -f http://localhost:2019/metrics || exit 1
# See https://caddyserver.com/docs/conventions#file-locations for details
ENV XDG_CONFIG_HOME /config
ENV XDG_DATA_HOME /data
EXPOSE 80
EXPOSE 443
EXPOSE 443/udp
EXPOSE 2019

150
README.md
View file

@ -1,126 +1,164 @@
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Part-DB/Part-DB-symfony/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Part-DB/Part-DB-symfony/?branch=master) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Part-DB/Part-DB-symfony/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Part-DB/Part-DB-symfony/?branch=master)
![PHPUnit Tests](https://github.com/Part-DB/Part-DB-symfony/workflows/PHPUnit%20Tests/badge.svg) ![PHPUnit Tests](https://github.com/Part-DB/Part-DB-symfony/workflows/PHPUnit%20Tests/badge.svg)
![Static analysis](https://github.com/Part-DB/Part-DB-symfony/workflows/Static%20analysis/badge.svg) ![Static analysis](https://github.com/Part-DB/Part-DB-symfony/workflows/Static%20analysis/badge.svg)
[![codecov](https://codecov.io/gh/Part-DB/Part-DB-symfony/branch/master/graph/badge.svg)](https://codecov.io/gh/Part-DB/Part-DB-server) [![codecov](https://codecov.io/gh/Part-DB/Part-DB-server/branch/master/graph/badge.svg)](https://codecov.io/gh/Part-DB/Part-DB-server)
![GitHub License](https://img.shields.io/github/license/Part-DB/Part-DB-symfony) ![GitHub License](https://img.shields.io/github/license/Part-DB/Part-DB-symfony)
![PHP Version](https://img.shields.io/badge/PHP-%3E%3D%207.4-green) ![PHP Version](https://img.shields.io/badge/PHP-%3E%3D%208.1-green)
![Docker Pulls](https://img.shields.io/docker/pulls/jbtronics/part-db1) ![Docker Pulls](https://img.shields.io/docker/pulls/jbtronics/part-db1)
![Docker Build Status](https://github.com/Part-DB/Part-DB-symfony/workflows/Docker%20Image%20Build/badge.svg) ![Docker Build Status](https://github.com/Part-DB/Part-DB-symfony/workflows/Docker%20Image%20Build/badge.svg)
[![Crowdin](https://badges.crowdin.net/e/8325196085d4bee8c04b75f7c915452a/localized.svg)](https://part-db.crowdin.com/part-db) [![Crowdin](https://badges.crowdin.net/e/8325196085d4bee8c04b75f7c915452a/localized.svg)](https://part-db.crowdin.com/part-db)
**[Documentation](https://docs.part-db.de/)** | **[Demo](https://part-db.herokuapp.com)** | **[Docker Image](https://hub.docker.com/r/jbtronics/part-db1)** **[Documentation](https://docs.part-db.de/)** | **[Demo](https://demo.part-db.de/)** | **[Docker Image](https://hub.docker.com/r/jbtronics/part-db1)**
# Part-DB # Part-DB
Part-DB is an Open-Source inventory managment system for your electronic components.
Part-DB is an Open-Source inventory management system for your electronic components.
It is installed on a web server and so can be accessed with any browser without the need to install additional software. It is installed on a web server and so can be accessed with any browser without the need to install additional software.
The version in this Repository is a complete rewrite of the legacy [Part-DB](https://github.com/Part-DB/Part-DB) (Version < 1.0) based on a modern framework. The version in this repository is a complete rewrite of the legacy [Part-DB](https://github.com/Part-DB/Part-DB)
Currently, it is still missing some (minor) features from the old version (see [UPGRADE.md](https://docs.part-db.de/upgrade_legacy.html)) for more details, but also many huge improvements and advantages compared to the old version. (Version < 1.0) based on a modern framework and is the recommended version to use.
If you start completely new with Part-DB it is recommended that you use the version from this repository, as it is actively developed.
If you find a bug, please open an [Issue on Github](https://github.com/Part-DB/Part-DB-server/issues) so it can be fixed for everybody. If you find a bug, please open an [Issue on GitHub,](https://github.com/Part-DB/Part-DB-server/issues) so it can be fixed
for everybody.
## Demo ## Demo
If you want to test Part-DB without installing it, you can use [this](https://part-db.herokuapp.com) Heroku instance.
(Or this link for the [German Version](https://part-db.herokuapp.com/de/)). If you want to test Part-DB without installing it, you can use [this](https://demo.part-db.de/) Heroku instance.
(Or this link for the [German Version](https://demo.part-db.de/de/)).
You can log in with username: *user* and password: *user*. You can log in with username: *user* and password: *user*.
Every change to the master branch gets automatically deployed, so it represents the current development progress and is Every change to the master branch gets automatically deployed, so it represents the current development progress and is
maybe not completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading the page may not completely stable. Please mind, that the free Heroku instance is used, so it can take some time when loading
the page
for the first time. for the first time.
<img src="https://github.com/Part-DB/Part-DB-server/raw/master/docs/assets/readme/part_info.png"> <img src="https://github.com/Part-DB/Part-DB-server/raw/master/docs/assets/readme/part_info.png">
<img src="https://github.com/Part-DB/Part-DB-server/raw/master/docs/assets/readme/parts_list.png"> <img src="https://github.com/Part-DB/Part-DB-server/raw/master/docs/assets/readme/parts_list.png">
## Features ## Features
* Inventory management of your electronic parts. Each part can be assigned to a category, footprint, manufacturer
and multiple store locations and price information. Parts can be grouped using tags. You can associate various files like datasheets or pictures with the parts. * Inventory management of your electronic parts. Each part can be assigned to a category, footprint, manufacturer,
* Multi-Language support (currently German, English, Russian, Japanese and French (experimental)) and multiple store locations and price information. Parts can be grouped using tags. You can associate various files
like datasheets or pictures with the parts.
* Multi-language support (currently German, English, Russian, Japanese, French, Czech, Danish, and Chinese)
* Barcodes/Labels generator for parts and storage locations, scan barcodes via webcam using the builtin barcode scanner * Barcodes/Labels generator for parts and storage locations, scan barcodes via webcam using the builtin barcode scanner
* User system with groups and detailed (fine granular) permissions. * User system with groups and detailed (fine granular) permissions.
Two-factor authentication is supported (Google Authenticator and Webauthn/U2F keys) and can be enforced for groups. Password reset via email can be setuped. Two-factor authentication is supported (Google Authenticator and Webauthn/U2F keys) and can be enforced for groups.
* Import/Export system (partial working) Password reset via email can be set up.
* Project management: Create projects and assign parts to the bill of material (BOM), to show how often you could build this project and directly withdraw all components needed from DB * Optional support for single sign-on (SSO) via SAML (using an intermediate service
* Event log: Track what changes happens to your inventory, track which user does what. Revert your parts to older versions. like [Keycloak](https://www.keycloak.org/) you can connect Part-DB to an existing LDAP or Active Directory server)
* Responsive design: You can use Part-DB on your PC, your tablet and your smartphone using the same interface. * Import/Export system for parts and data structure. BOM import for projects from KiCAD is supported.
* MySQL and SQLite supported as database backends * Project management: Create projects and assign parts to the bill of material (BOM), to show how often you could build
this project and directly withdraw all components needed from DB
* Event log: Track what changes happen to your inventory, track which user does what. Revert your parts to older
versions.
* Responsive design: You can use Part-DB on your PC, your tablet, and your smartphone using the same interface.
* MySQL, SQLite and PostgreSQL are supported as database backends
* Support for rich text descriptions and comments in parts * Support for rich text descriptions and comments in parts
* Support for multiple currencies and automatic update of exchange rates supported * Support for multiple currencies and automatic update of exchange rates supported
* Powerful search and filter function, including parametric search (search for parts according to some specifications) * Powerful search and filter function, including parametric search (search for parts according to some specifications)
* Automatic thumbnail generation for pictures * Automatic thumbnail generation for pictures
* Use cloud providers (like Octopart, Digikey, Farnell, LCSC or TME) to automatically get part information, datasheets, and
prices for parts
* API to access Part-DB from other applications/scripts
* [Integration with KiCad](https://docs.part-db.de/usage/eda_integration.html): Use Part-DB as the central datasource for your
KiCad and see available parts from Part-DB directly inside KiCad.
With these features, Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory,
With these features Part-DB is useful to hobbyists, who want to keep track of their private electronic parts inventory, or maker spaces, where many users should have (controlled) access to the shared inventory.
or makerspaces, where many users have should have (controlled) access to the shared inventory.
Part-DB is also used by small companies and universities for managing their inventory. Part-DB is also used by small companies and universities for managing their inventory.
## Requirements ## Requirements
* A **web server** (like Apache2 or nginx) that is capable of running [Symfony 5](https://symfony.com/doc/current/reference/requirements.html),
this includes a minimum PHP version of **PHP 7.4** * A **web server** (like Apache2 or nginx) that is capable of
* A **MySQL** (at least 5.7) /**MariaDB** (at least 10.2.2) database server if you do not want to use SQLite. running [Symfony 6](https://symfony.com/doc/current/reference/requirements.html),
* Shell access to your server is highly suggested! this includes a minimum PHP version of **PHP 8.1**
* For building the client side assets **yarn** and **nodejs** is needed. * A **MySQL** (at least 5.7) /**MariaDB** (at least 10.4) database server, or **PostgreSQL** 10+ if you do not want to use SQLite.
* Shell access to your server is highly recommended!
* For building the client-side assets **yarn** and **nodejs** (>= 18.0) is needed.
## Installation ## Installation
If you want to upgrade your legacy (< 1.0.0) version of Part-DB to this version, please read [this](https://docs.part-db.de/upgrade_legacy.html) first.
*Hint:* A docker image is available under [jbtronics/part-db1](https://hub.docker.com/r/jbtronics/part-db1). How to set up Part-DB via docker is described [here](https://docs.part-db.de/installation/installation_docker.html). If you want to upgrade your legacy (< 1.0.0) version of Part-DB to this version, please
read [this](https://docs.part-db.de/upgrade_legacy.html) first.
**Below you find some very rough outline of the installation process, see [here](https://docs.part-db.de/installation/) for a detailed guide how to install Part-DB.** *Hint:* A docker image is available under [jbtronics/part-db1](https://hub.docker.com/r/jbtronics/part-db1). How to set
up Part-DB via docker is described [here](https://docs.part-db.de/installation/installation_docker.html).
**Below you find a very rough outline of the installation process, see [here](https://docs.part-db.de/installation/)
for a detailed guide on how to install Part-DB.**
1. Copy or clone this repository into a folder on your server. 1. Copy or clone this repository into a folder on your server.
2. Configure your webserver to serve from the `public/` folder. See [here](https://symfony.com/doc/current/setup/web_server_configuration.html) 2. Configure your webserver to serve from the `public/` folder.
for additional information. See [here](https://symfony.com/doc/current/setup/web_server_configuration.html)
for additional information.
3. Copy the global config file `cp .env .env.local` and edit `.env.local`: 3. Copy the global config file `cp .env .env.local` and edit `.env.local`:
* Change the line `APP_ENV=dev` to `APP_ENV=prod` * Change the line `APP_ENV=dev` to `APP_ENV=prod`
* If you do not want to use SQLite, change the value of `DATABASE_URL=` to your needs (see [here](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url)) for the format. * If you do not want to use SQLite, change the value of `DATABASE_URL=` to your needs (
In bigger instances with concurrent accesses, MySQL is more performant. This can not be changed easily later, so choose wisely. see [here](http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url))
for the format.
In bigger instances with concurrent accesses, MySQL is more performant. This can not be changed easily later, so
choose wisely.
4. Install composer dependencies and generate autoload files: `composer install -o --no-dev` 4. Install composer dependencies and generate autoload files: `composer install -o --no-dev`
5. If you have put Part-DB into a sub-directory on your server (like `part-db/`), you have to edit the file 5. Install client side dependencies and build it: `yarn install` and `yarn build`
`webpack.config.js` and uncomment the lines (remove the `//` before the lines) `.setPublicPath('/part-db/build')` (line 43) and 6. _Optional_ (speeds up first load): Warmup cache: `php bin/console cache:warmup`
`.setManifestKeyPrefix('build/')` (line 44). You have to replace `/part-db` with your own path on line 44. 7. Upgrade database to new scheme (or create it, when it was empty): `php bin/console doctrine:migrations:migrate` and
6. Install client side dependencies and build it: `yarn install` and `yarn build` follow the instructions given. During the process the password for the admin is user is shown. Copy it. **Caution**:
7. _Optional_ (speeds up first load): Warmup cache: `php bin/console cache:warmup` These steps tamper with your database and could potentially destroy it. So make sure to make a backup of your
8. Upgrade database to new scheme (or create it, when it was empty): `php bin/console doctrine:migrations:migrate` and follow the instructions given. During the process the password for the admin is user is shown. Copy it. **Caution**: This steps tamper with your database and could potentially destroy it. So make sure to make a backup of your database. database.
9. You can configure Part-DB via `config/parameters.yaml`. You should check if settings match your expectations, after you installed/upgraded Part-DB. Check if `partdb.default_currency` matches your mainly used currency (this can not be changed after creating price informations). 8. You can configure Part-DB via `config/parameters.yaml`. You should check if settings match your expectations after
Run `php bin/console cache:clear` when you changed something. you installed/upgraded Part-DB. Check if `partdb.default_currency` matches your mainly used currency (this can not be
10. Access Part-DB in your browser (under the URL you put it) and login with user *admin*. Password is the one outputted during DB setup. changed after creating price information).
If you can not remember the password, set a new one with `php bin/console app:set-password admin`. You can create new users with the admin user and start using Part-DB. Run `php bin/console cache:clear` when you change something.
9. Access Part-DB in your browser (under the URL you put it) and log in with user *admin*. Password is the one outputted
during DB setup.
If you can not remember the password, set a new one with `php bin/console app:set-password admin`. You can create
new users with the admin user and start using Part-DB.
When you want to upgrade to a newer version, then just copy the new files into the folder When you want to upgrade to a newer version, then just copy the new files into the folder
and repeat the steps 4. to 7. and repeat the steps 4. to 7.
Normally a random password is generated when the admin user is created during inital database creation, Normally a random password is generated when the admin user is created during initial database creation,
however you can set the inital admin password, by setting the `INITIAL_ADMIN_PW` env var. however, you can set the initial admin password, by setting the `INITIAL_ADMIN_PW` env var.
You can configure Part-DB to your needs by changing environment variables in the `.env.local` file. You can configure Part-DB to your needs by changing environment variables in the `.env.local` file.
See [here](https://docs.part-db.de/configuration.html) for more information. See [here](https://docs.part-db.de/configuration.html) for more information.
### Reverse proxy ### Reverse proxy
If you are using a reverse proxy, you have to ensure that the proxies sets the `X-Forwarded-*` headers correctly, or you will get HTTP/HTTPS mixup and wrong hostnames.
If the reverse proxy is on a different server (or it cannot access Part-DB via localhost) you have to set the `TRUSTED_PROXIES` env variable to match your reverse proxies IP-address (or IP block). You can do this in your `.env.local` or (when using docker) in your `docker-compose.yml` file. If you are using a reverse proxy, you have to ensure that the proxies set the `X-Forwarded-*` headers correctly, or you
will get HTTP/HTTPS mixup and wrong hostnames.
If the reverse proxy is on a different server (or it cannot access Part-DB via localhost) you have to set
the `TRUSTED_PROXIES` env variable to match your reverse proxy's IP address (or IP block). You can do this in
your `.env.local` or (when using docker) in your `docker-compose.yml` file.
## Donate for development ## Donate for development
If you want to donate to the Part-DB developer, see the sponsor button in the top bar (next to the repo name). If you want to donate to the Part-DB developer, see the sponsor button in the top bar (next to the repo name).
There you will find various methods to support development on a monthly or a one time base. There you will find various methods to support development on a monthly or a one-time base.
## Built with ## Built with
* [Symfony 5](https://symfony.com/): The main framework used for the serverside PHP * [Symfony 5](https://symfony.com/): The main framework used for the serverside PHP
* [Bootstrap 5](https://getbootstrap.com/) and [Bootswatch](https://bootswatch.com/): Used as website theme * [Bootstrap 5](https://getbootstrap.com/) and [Bootswatch](https://bootswatch.com/): Used as website theme
* [Fontawesome](https://fontawesome.com/): Used as icon set * [Fontawesome](https://fontawesome.com/): Used as icon set
* [Hotwire Stimulus](https://stimulus.hotwired.dev/) and [Hotwire Turbo](https://turbo.hotwired.dev/): Frontend Javascript * [Hotwire Stimulus](https://stimulus.hotwired.dev/) and [Hotwire Turbo](https://turbo.hotwired.dev/): Frontend
Javascript
## Authors ## Authors
* **Jan Böhmer** - *Inital work* - [Github](https://github.com/jbtronics/)
See also the list of [contributors](https://github.com/Part-DB/Part-DB-server/graphs/contributors) who participated in this project. * **Jan Böhmer** - *Initial work* - [GitHub](https://github.com/jbtronics/)
See also the list of [contributors](https://github.com/Part-DB/Part-DB-server/graphs/contributors) who participated in
this project.
Based on the original Part-DB by Christoph Lechner and K. Jacobs Based on the original Part-DB by Christoph Lechner and K. Jacobs
## License ## License
Part-DB is licensed under the GNU Affero General Public License v3.0 (or at your opinion any later). Part-DB is licensed under the GNU Affero General Public License v3.0 (or at your opinion any later).
This mostly means that you can use Part-DB for whatever you want (even use it commercially) This mostly means that you can use Part-DB for whatever you want (even use it commercially)
as long as you publish the source code for every change you make under the AGPL, too. as long as you publish the source code for every change you make under the AGPL, too.

View file

@ -1 +1 @@
1.0.3 1.17.1

3
assets/bootstrap.js vendored
View file

@ -4,8 +4,7 @@ import { startStimulusApp } from '@symfony/stimulus-bridge';
export const app = startStimulusApp(require.context( export const app = startStimulusApp(require.context(
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers', '@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
true, true,
/\.(j|t)sx?$/ /\.[jt]sx?$/
)); ));
// register any custom, 3rd party controllers here // register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController); // app.register('some_controller_name', SomeImportedController);

View file

@ -181,7 +181,8 @@ Editor.defaultConfig = {
'DejaVu Serif, serif', 'DejaVu Serif, serif',
'Helvetica, Arial, sans-serif', 'Helvetica, Arial, sans-serif',
'Times New Roman, Times, serif', 'Times New Roman, Times, serif',
'Courier New, Courier, monospace' 'Courier New, Courier, monospace',
'Unifont, monospace',
], ],
supportAllValues: true supportAllValues: true
}, },

View file

@ -76,6 +76,7 @@ const PLACEHOLDERS = [
['[[FOOTPRINT_FULL]]', 'Footprint (Full path)'], ['[[FOOTPRINT_FULL]]', 'Footprint (Full path)'],
['[[MASS]]', 'Mass'], ['[[MASS]]', 'Mass'],
['[[MPN]]', 'Manufacturer Product Number (MPN)'], ['[[MPN]]', 'Manufacturer Product Number (MPN)'],
['[[IPN]]', 'Internal Part Number (IPN)'],
['[[TAGS]]', 'Tags'], ['[[TAGS]]', 'Tags'],
['[[M_STATUS]]', 'Manufacturing status'], ['[[M_STATUS]]', 'Manufacturing status'],
['[[DESCRIPTION]]', 'Description'], ['[[DESCRIPTION]]', 'Description'],
@ -84,6 +85,9 @@ const PLACEHOLDERS = [
['[[COMMENT_T]]', 'Comment (plain text)'], ['[[COMMENT_T]]', 'Comment (plain text)'],
['[[LAST_MODIFIED]]', 'Last modified datetime'], ['[[LAST_MODIFIED]]', 'Last modified datetime'],
['[[CREATION_DATE]]', 'Creation datetime'], ['[[CREATION_DATE]]', 'Creation datetime'],
['[[IPN_BARCODE_QR]]', 'IPN as QR code'],
['[[IPN_BARCODE_C128]]', 'IPN as Code 128 barcode'],
['[[IPN_BARCODE_C39]]', 'IPN as Code 39 barcode'],
] ]
}, },
{ {
@ -96,6 +100,8 @@ const PLACEHOLDERS = [
['[[AMOUNT]]', 'Lot amount'], ['[[AMOUNT]]', 'Lot amount'],
['[[LOCATION]]', 'Storage location'], ['[[LOCATION]]', 'Storage location'],
['[[LOCATION_FULL]]', 'Storage location (Full path)'], ['[[LOCATION_FULL]]', 'Storage location (Full path)'],
['[[OWNER]]', 'Full name of the lot owner'],
['[[OWNER_USERNAME]]', 'Username of the lot owner'],
] ]
}, },
{ {
@ -110,6 +116,8 @@ const PLACEHOLDERS = [
['[[COMMENT_T]]', 'Comment (plain text)'], ['[[COMMENT_T]]', 'Comment (plain text)'],
['[[LAST_MODIFIED]]', 'Last modified datetime'], ['[[LAST_MODIFIED]]', 'Last modified datetime'],
['[[CREATION_DATE]]', 'Creation datetime'], ['[[CREATION_DATE]]', 'Creation datetime'],
['[[OWNER]]', 'Full name of the location owner'],
['[[OWNER_USERNAME]]', 'Username of the location owner'],
] ]
}, },
{ {
@ -120,6 +128,8 @@ const PLACEHOLDERS = [
['[[BARCODE_QR]]', 'QR code linking to this element'], ['[[BARCODE_QR]]', 'QR code linking to this element'],
['[[BARCODE_C128]]', 'Code 128 barcode linking to this element'], ['[[BARCODE_C128]]', 'Code 128 barcode linking to this element'],
['[[BARCODE_C39]]', 'Code 39 barcode linking to this element'], ['[[BARCODE_C39]]', 'Code 39 barcode linking to this element'],
['[[BARCODE_C93]]', 'Code 93 barcode linking to this element'],
['[[BARCODE_DATAMATRIX]]', 'Datamatrix code linking to this element'],
] ]
}, },
{ {

View file

@ -39,6 +39,7 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'Footprint (Full path)': 'Footprint (Vollständiger Pfad)', 'Footprint (Full path)': 'Footprint (Vollständiger Pfad)',
'Mass': 'Gewicht', 'Mass': 'Gewicht',
'Manufacturer Product Number (MPN)': 'Hersteller Produktnummer (MPN)', 'Manufacturer Product Number (MPN)': 'Hersteller Produktnummer (MPN)',
'Internal Part Number (IPN)': 'Internal Part Number (IPN)',
'Tags': 'Tags', 'Tags': 'Tags',
'Manufacturing status': 'Herstellungsstatus', 'Manufacturing status': 'Herstellungsstatus',
'Description': 'Beschreibung', 'Description': 'Beschreibung',
@ -47,6 +48,9 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'Comment (plain text)': 'Kommentar (Nur-Text)', 'Comment (plain text)': 'Kommentar (Nur-Text)',
'Last modified datetime': 'Zuletzt geändert', 'Last modified datetime': 'Zuletzt geändert',
'Creation datetime': 'Erstellt', 'Creation datetime': 'Erstellt',
'IPN as QR code': 'IPN als QR Code',
'IPN as Code 128 barcode': 'IPN als Code 128 Barcode',
'IPN as Code 39 barcode': 'IPN als Code 39 Barcode',
'Lot ID': 'Lot ID', 'Lot ID': 'Lot ID',
'Lot name': 'Lot Name', 'Lot name': 'Lot Name',
@ -55,6 +59,8 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'Lot amount': 'Lot Menge', 'Lot amount': 'Lot Menge',
'Storage location': 'Lagerort', 'Storage location': 'Lagerort',
'Storage location (Full path)': 'Lagerort (Vollständiger Pfad)', 'Storage location (Full path)': 'Lagerort (Vollständiger Pfad)',
'Full name of the lot owner': 'Name des Besitzers des Lots',
'Username of the lot owner': 'Benutzername des Besitzers des Lots',
'Barcodes': 'Barcodes', 'Barcodes': 'Barcodes',
@ -63,12 +69,16 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
'QR code linking to this element': 'QR Code verknüpft mit diesem Element', 'QR code linking to this element': 'QR Code verknüpft mit diesem Element',
'Code 128 barcode linking to this element': 'Code 128 Barcode verknüpft mit diesem Element', 'Code 128 barcode linking to this element': 'Code 128 Barcode verknüpft mit diesem Element',
'Code 39 barcode linking to this element': 'Code 39 Barcode verknüpft mit diesem Element', 'Code 39 barcode linking to this element': 'Code 39 Barcode verknüpft mit diesem Element',
'Code 93 barcode linking to this element': 'Code 93 Barcode verknüpft mit diesem Element',
'Datamatrix code linking to this element': 'Datamatrix Code verknüpft mit diesem Element',
'Location ID': 'Lagerort ID', 'Location ID': 'Lagerort ID',
'Name': 'Name', 'Name': 'Name',
'Full path': 'Vollständiger Pfad', 'Full path': 'Vollständiger Pfad',
'Parent name': 'Name des Übergeordneten Elements', 'Parent name': 'Name des Übergeordneten Elements',
'Parent full path': 'Ganzer Pfad des Übergeordneten Elements', 'Parent full path': 'Ganzer Pfad des Übergeordneten Elements',
'Full name of the location owner': 'Name des Besitzers des Lagerorts',
'Username of the location owner': 'Benutzername des Besitzers des Lagerorts',
'Username': 'Benutzername', 'Username': 'Benutzername',
'Username (including name)': 'Benutzername (inklusive Name)', 'Username (including name)': 'Benutzername (inklusive Name)',

View file

@ -30,9 +30,73 @@ export default class SpecialCharactersEmoji extends Plugin {
const editor = this.editor; const editor = this.editor;
const specialCharsPlugin = editor.plugins.get('SpecialCharacters'); const specialCharsPlugin = editor.plugins.get('SpecialCharacters');
//Add greek characters to special characters
specialCharsPlugin.addItems('Greek', this.getGreek());
//Add Emojis to special characters
specialCharsPlugin.addItems('Emoji', this.getEmojis()); specialCharsPlugin.addItems('Emoji', this.getEmojis());
} }
getGreek() {
return [
{ title: 'Alpha', character: 'Α' },
{ title: 'Beta', character: 'Β' },
{ title: 'Gamma', character: 'Γ' },
{ title: 'Delta', character: 'Δ' },
{ title: 'Epsilon', character: 'Ε' },
{ title: 'Zeta', character: 'Ζ' },
{ title: 'Eta', character: 'Η' },
{ title: 'Theta', character: 'Θ' },
{ title: 'Iota', character: 'Ι' },
{ title: 'Kappa', character: 'Κ' },
{ title: 'Lambda', character: 'Λ' },
{ title: 'Mu', character: 'Μ' },
{ title: 'Nu', character: 'Ν' },
{ title: 'Xi', character: 'Ξ' },
{ title: 'Omicron', character: 'Ο' },
{ title: 'Pi', character: 'Π' },
{ title: 'Rho', character: 'Ρ' },
{ title: 'Sigma', character: 'Σ' },
{ title: 'Tau', character: 'Τ' },
{ title: 'Upsilon', character: 'Υ' },
{ title: 'Phi', character: 'Φ' },
{ title: 'Chi', character: 'Χ' },
{ title: 'Psi', character: 'Ψ' },
{ title: 'Omega', character: 'Ω' },
{ title: 'alpha', character: 'α' },
{ title: 'beta', character: 'β' },
{ title: 'gamma', character: 'γ' },
{ title: 'delta', character: 'δ' },
{ title: 'epsilon', character: 'ε' },
{ title: 'zeta', character: 'ζ' },
{ title: 'eta', character: 'η' },
{ title: 'theta', character: 'θ' },
{ title: 'alternate theta', character: 'ϑ' },
{ title: 'iota', character: 'ι' },
{ title: 'kappa', character: 'κ' },
{ title: 'lambda', character: 'λ' },
{ title: 'mu', character: 'μ' },
{ title: 'nu', character: 'ν' },
{ title: 'xi', character: 'ξ' },
{ title: 'omicron', character: 'ο' },
{ title: 'pi', character: 'π' },
{ title: 'rho', character: 'ρ' },
{ title: 'sigma', character: 'σ' },
{ title: 'tau', character: 'τ' },
{ title: 'upsilon', character: 'υ' },
{ title: 'phi', character: 'φ' },
{ title: 'chi', character: 'χ' },
{ title: 'psi', character: 'ψ' },
{ title: 'omega', character: 'ω' },
{ title: 'digamma', character: 'Ϝ' },
{ title: 'stigma', character: 'Ϛ' },
{ title: 'heta', character: 'Ͱ' },
{ title: 'sampi', character: 'Ϡ' },
{ title: 'koppa', character: 'Ϟ' },
{ title: 'san', character: 'Ϻ' },
];
}
getEmojis() { getEmojis() {
//Map our emoji data to the format the plugin expects //Map our emoji data to the format the plugin expects
return emoji.map(emoji => { return emoji.map(emoji => {

View file

@ -18,43 +18,118 @@
*/ */
import {Controller} from "@hotwired/stimulus"; import {Controller} from "@hotwired/stimulus";
import Darkmode from "darkmode-js/src";
import "darkmode-js"
export default class extends Controller { export default class extends Controller {
_darkmode;
connect() { connect() {
if (typeof window.getComputedStyle(document.body).mixBlendMode == 'undefined') { this.setMode(this.getMode());
console.warn("The browser does not support mix blend mode. Darkmode will not work."); document.querySelectorAll('input[name="darkmode"]').forEach((radio) => {
radio.addEventListener('change', this._radioChanged.bind(this));
});
}
/**
* Event listener for the change of radio buttons
* @private
*/
_radioChanged(event) {
const new_mode = this.getSelectedMode();
this.setMode(new_mode);
}
/**
* Get the current mode from the local storage
* @return {'dark', 'light', 'auto'}
*/
getMode() {
return localStorage.getItem('darkmode') ?? 'auto';
}
/**
* Set the mode in the local storage and apply it and change the state of the radio buttons
* @param mode
*/
setMode(mode) {
if (mode !== 'dark' && mode !== 'light' && mode !== 'auto') {
console.warn('Invalid darkmode mode: ' + mode);
mode = 'auto';
}
localStorage.setItem('darkmode', mode);
this.setButtonMode(mode);
if (mode === 'auto') {
this._setDarkmodeAuto();
} else if (mode === 'dark') {
this._enableDarkmode();
} else if (mode === 'light') {
this._disableDarkmode();
}
}
/**
* Get the selected mode via the radio buttons
* @return {'dark', 'light', 'auto'}
*/
getSelectedMode() {
return document.querySelector('input[name="darkmode"]:checked').value;
}
/**
* Set the state of the radio buttons
* @param mode
*/
setButtonMode(mode) {
document.querySelector('input[name="darkmode"][value="' + mode + '"]').checked = true;
}
/**
* Enable darkmode by adding the data-bs-theme="dark" to the html tag
* @private
*/
_enableDarkmode() {
//Add data-bs-theme="dark" to the html tag
document.documentElement.setAttribute('data-bs-theme', 'dark');
}
/**
* Disable darkmode by adding the data-bs-theme="light" to the html tag
* @private
*/
_disableDarkmode() {
//Set data-bs-theme to light
document.documentElement.setAttribute('data-bs-theme', 'light');
}
/**
* Set the darkmode to auto and enable/disable it depending on the system settings, also add
* an event listener to change the darkmode if the system settings change
* @private
*/
_setDarkmodeAuto() {
if (this.getMode() !== 'auto') {
return; return;
} }
try { if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
const darkmode = new Darkmode(); this._enableDarkmode();
this._darkmode = darkmode; } else {
this._disableDarkmode();
//Unhide darkmode button
this._showWidget();
//Set the switch according to our current darkmode state
const toggler = document.getElementById("toggleDarkmode");
toggler.checked = darkmode.isActivated();
}
catch (e)
{
console.error(e);
} }
window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', event => {
console.log('Prefered color scheme changed to ' + event.matches ? 'dark' : 'light');
this._setDarkmodeAuto();
});
} }
_showWidget() { /**
this.element.classList.remove('hidden'); * Check if darkmode is activated
} * @return {boolean}
*/
toggleDarkmode() { isDarkmodeActivated() {
this._darkmode.toggle(); return document.documentElement.getAttribute('data-bs-theme') === 'dark';
} }
} }

View file

@ -88,5 +88,8 @@ export default class extends Controller {
} else { } else {
this.hideSidebar(); this.hideSidebar();
} }
//Hide the tootip on the button
this._toggle_button.blur();
} }
} }

View file

@ -20,16 +20,26 @@
'use strict'; 'use strict';
import { Controller } from '@hotwired/stimulus'; import { Controller } from '@hotwired/stimulus';
import { marked } from "marked"; import { Marked } from "marked";
import { mangle } from "marked-mangle";
import { gfmHeadingId } from "marked-gfm-heading-id";
import DOMPurify from 'dompurify'; import DOMPurify from 'dompurify';
import "../../css/app/markdown.css"; import "../../css/app/markdown.css";
export default class extends Controller { export default class MarkdownController extends Controller {
static _marked = new Marked([
{
gfm: true,
},
gfmHeadingId(),
mangle(),
])
;
connect() connect()
{ {
this.configureMarked();
this.render(); this.render();
//Dispatch an event that we are now finished //Dispatch an event that we are now finished
@ -43,7 +53,7 @@ export default class extends Controller {
let raw = this.element.dataset['markdown']; let raw = this.element.dataset['markdown'];
//Apply purified parsed markdown //Apply purified parsed markdown
this.element.innerHTML = DOMPurify.sanitize(marked(this.unescapeHTML(raw))); this.element.innerHTML = DOMPurify.sanitize(MarkdownController._marked.parse(this.unescapeHTML(raw)));
for(let a of this.element.querySelectorAll('a')) { for(let a of this.element.querySelectorAll('a')) {
//Mark all links as external //Mark all links as external
@ -79,10 +89,23 @@ export default class extends Controller {
/** /**
* Configure the marked parser * Configure the marked parser
*/ */
configureMarked() /*static newMarked()
{ {
const marked = new Marked([
{
gfm: true,
},
gfmHeadingId(),
mangle(),
])
;
marked.use(mangle());
marked.use(gfmHeadingId({
}));
marked.setOptions({ marked.setOptions({
gfm: true, gfm: true,
}); });
} }*/
} }

View file

@ -23,6 +23,12 @@ import "tom-select/dist/css/tom-select.bootstrap5.css";
import '../../css/components/tom-select_extensions.css'; import '../../css/components/tom-select_extensions.css';
import TomSelect from "tom-select"; import TomSelect from "tom-select";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
export default class extends Controller { export default class extends Controller {
_tomSelect; _tomSelect;
@ -46,6 +52,12 @@ export default class extends Controller {
} }
return '<div>' + escape(data.label) + '</div>'; return '<div>' + escape(data.label) + '</div>';
} }
},
plugins: {
'autoselect_typed': {},
'click_to_edit': {},
'clear_button': {},
"restore_on_backspace": {}
} }
}; };

View file

@ -53,6 +53,7 @@ export default class extends Controller {
const config = { const config = {
language: language, language: language,
licenseKey: "GPL",
} }
const watchdog = new EditorWatchdog(); const watchdog = new EditorWatchdog();
@ -70,7 +71,9 @@ export default class extends Controller {
editor_div.classList.add(...new_classes.split(",")); editor_div.classList.add(...new_classes.split(","));
} }
console.log(editor); //This return is important! Otherwise we get mysterious errors in the console
//See: https://github.com/ckeditor/ckeditor5/issues/5897#issuecomment-628471302
return editor;
}) })
.catch(error => { .catch(error => {
console.error(error); console.error(error);

View file

@ -61,7 +61,7 @@ export default class extends Controller {
if(!prototype) { if(!prototype) {
console.warn("Prototype is not set, we cannot create a new element. This is most likely due to missing permissions."); console.warn("Prototype is not set, we cannot create a new element. This is most likely due to missing permissions.");
bootbox.alert("You do not have the permsissions to create a new element. (No protoype element is set)"); bootbox.alert("You do not have the permissions to create a new element. (No protoype element is set)");
return; return;
} }
@ -75,13 +75,49 @@ export default class extends Controller {
//Insert new html after the last child element //Insert new html after the last child element
//If the table has a tbody, insert it there //If the table has a tbody, insert it there
//Afterwards return the newly created row
if(targetTable.tBodies[0]) { if(targetTable.tBodies[0]) {
targetTable.tBodies[0].insertAdjacentHTML('beforeend', newElementStr); targetTable.tBodies[0].insertAdjacentHTML('beforeend', newElementStr);
return targetTable.tBodies[0].lastElementChild;
} else { //Otherwise just insert it } else { //Otherwise just insert it
targetTable.insertAdjacentHTML('beforeend', newElementStr); targetTable.insertAdjacentHTML('beforeend', newElementStr);
return targetTable.lastElementChild;
} }
} }
/**
* This action opens a file dialog to select multiple files and then creates a new element for each file, where
* the file is assigned to the input field.
* This should only be used for attachments collection types
* @param event
*/
uploadMultipleFiles(event) {
//Open a file dialog to select multiple files
const input = document.createElement('input');
input.type = 'file';
input.multiple = true;
input.click();
input.addEventListener('change', (event) => {
//Create a element for each file
for (let i = 0; i < input.files.length; i++) {
const file = input.files[i];
const newElement = this.createElement(event);
const rowInput = newElement.querySelector("input[type='file']");
//We can not directly assign the file to the input, so we have to create a new DataTransfer object
const dataTransfer = new DataTransfer();
dataTransfer.items.add(file);
rowInput.files = dataTransfer.files;
}
});
}
/** /**
* Similar to createEvent Pricedetails need some special handling to fill min amount * Similar to createEvent Pricedetails need some special handling to fill min amount
* @param event * @param event

View file

@ -24,18 +24,25 @@ import 'datatables.net-bs5/css/dataTables.bootstrap5.css'
import 'datatables.net-buttons-bs5/css/buttons.bootstrap5.css' import 'datatables.net-buttons-bs5/css/buttons.bootstrap5.css'
import 'datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.css' import 'datatables.net-fixedheader-bs5/css/fixedHeader.bootstrap5.css'
import 'datatables.net-responsive-bs5/css/responsive.bootstrap5.css'; import 'datatables.net-responsive-bs5/css/responsive.bootstrap5.css';
import 'datatables.net-select-bs5/css/select.bootstrap5.css';
//Use our own styles for the select extension which fit the bootstrap theme better
//import 'datatables.net-select-bs5/css/select.bootstrap5.css';
import '../../../css/components/datatables_select_bs5.css';
//JS //JS
import 'datatables.net-bs5'; import 'datatables.net-bs5';
import 'datatables.net-buttons-bs5'; import 'datatables.net-buttons-bs5';
import 'datatables.net-buttons/js/buttons.colVis.js'; import 'datatables.net-buttons/js/buttons.colVis.js';
import 'datatables.net-fixedheader-bs5'; import 'datatables.net-fixedheader-bs5';
import 'datatables.net-select-bs5';
import 'datatables.net-colreorder-bs5'; import 'datatables.net-colreorder-bs5';
import 'datatables.net-responsive-bs5'; import 'datatables.net-responsive-bs5';
import '../../../js/lib/datatables'; import '../../../js/lib/datatables';
//import 'datatables.net-select-bs5';
//Use the local version containing the fix for the select extension
import '../../../js/lib/dataTables.select.mjs';
const EVENT_DT_LOADED = 'dt:loaded'; const EVENT_DT_LOADED = 'dt:loaded';
export default class extends Controller { export default class extends Controller {
@ -65,8 +72,22 @@ export default class extends Controller {
localStorage.setItem( this.getStateSaveKey(), JSON.stringify(data) ); localStorage.setItem( this.getStateSaveKey(), JSON.stringify(data) );
} }
stateLoadCallback(settings) { stateLoadCallback() {
return JSON.parse( localStorage.getItem(this.getStateSaveKey()) ); const json = localStorage.getItem(this.getStateSaveKey());
if(json === null || json === undefined) {
return null;
}
const data = JSON.parse(json);
if (data) {
//Do not save the start value (current page), as we want to always start at the first page on a page reload
delete data.start;
//Reset the data length to the default value by deleting the length property
delete data.length;
}
return data;
} }
connect() { connect() {
@ -81,6 +102,19 @@ export default class extends Controller {
//Add url info, as the one available in the history is not enough, as Turbo may have not changed it yet //Add url info, as the one available in the history is not enough, as Turbo may have not changed it yet
settings.url = this.element.dataset.dtUrl; settings.url = this.element.dataset.dtUrl;
//Add initial_order info to the settings, so that the order on the initial page load is the one saved in the state
const saved_state = this.stateLoadCallback();
if (saved_state !== null) {
const raw_order = saved_state.order;
settings.initial_order = raw_order.map((order) => {
return {
column: order[0],
dir: order[1]
}
});
}
let options = { let options = {
colReorder: true, colReorder: true,
responsive: true, responsive: true,
@ -90,7 +124,7 @@ export default class extends Controller {
}, },
buttons: [{ buttons: [{
"extend": 'colvis', "extend": 'colvis',
'className': 'mr-2 btn-light', 'className': 'mr-2 btn-outline-secondary',
'columns': ':not(.no-colvis)', 'columns': ':not(.no-colvis)',
"text": "<i class='fa fa-cog'></i>" "text": "<i class='fa fa-cog'></i>"
}], }],
@ -105,7 +139,7 @@ export default class extends Controller {
if(this.isSelectable()) { if(this.isSelectable()) {
options.select = { options.select = {
style: 'multi+shift', style: 'multi+shift',
selector: 'td.select-checkbox' selector: 'td.dt-select',
}; };
} }
@ -116,6 +150,28 @@ export default class extends Controller {
console.error("Error initializing datatables: " + err); console.error("Error initializing datatables: " + err);
}); });
//Fix height of the length selector
promise.then((dt) => {
//Draw the rows to make sure the correct status text is displayed ("No matching records found" instead of "Loading...")
if (dt.data().length === 0) {
dt.rows().draw()
}
//Find all length selectors (select with name dt_length), which are inside a label
const lengthSelectors = document.querySelectorAll('label select[name="dt_length"]');
//And remove the surrounding label, while keeping the select with all event handlers
lengthSelectors.forEach((selector) => {
selector.parentElement.replaceWith(selector);
});
//Find all column visibility buttons (button with buttons-colvis class) and remove the btn-secondary class
const colVisButtons = document.querySelectorAll('button.buttons-colvis');
colVisButtons.forEach((button) => {
button.classList.remove('btn-secondary');
});
});
//Dispatch an event to let others know that the datatables has been loaded //Dispatch an event to let others know that the datatables has been loaded
promise.then((dt) => { promise.then((dt) => {
const event = new CustomEvent(EVENT_DT_LOADED, {bubbles: true}); const event = new CustomEvent(EVENT_DT_LOADED, {bubbles: true});
@ -137,27 +193,6 @@ export default class extends Controller {
dt.fixedHeader.headerOffset($("#navbar").outerHeight()); dt.fixedHeader.headerOffset($("#navbar").outerHeight());
}); });
//Register event handler to selectAllRows checkbox if available
if (this.isSelectable()) {
promise.then((dt) => {
const selectAllCheckbox = this.element.querySelector('thead th.select-checkbox');
selectAllCheckbox.addEventListener('click', () => {
if(selectAllCheckbox.parentElement.classList.contains('selected')) {
dt.rows().deselect();
selectAllCheckbox.parentElement.classList.remove('selected');
} else {
dt.rows().select();
selectAllCheckbox.parentElement.classList.add('selected');
}
});
//When any row is deselected, also deselect the selectAll checkbox
dt.on('deselect.dt', () => {
selectAllCheckbox.parentElement.classList.remove('selected');
});
});
}
//Allow to further configure the datatable //Allow to further configure the datatable
promise.then(this._afterLoaded.bind(this)); promise.then(this._afterLoaded.bind(this));
@ -196,4 +231,16 @@ export default class extends Controller {
return this.element.dataset.select ?? false; return this.element.dataset.select ?? false;
} }
} invertSelection() {
//Do nothing if the datatable is not selectable
if(!this.isSelectable()) {
return;
}
//Invert the selected rows on the datatable
const selected_rows = this._dt.rows({selected: true});
this._dt.rows().select();
selected_rows.deselect();
}
}

View file

@ -107,6 +107,13 @@ export default class extends DatatablesController {
//Hide the select element (the tomselect button is the sibling of the select element) //Hide the select element (the tomselect button is the sibling of the select element)
select_target.nextElementSibling.classList.add('d-none'); select_target.nextElementSibling.classList.add('d-none');
} }
//If the selected option has a data-turbo attribute, set it to the form
if (selected_option.dataset.turbo) {
this.element.dataset.turbo = selected_option.dataset.turbo;
} else {
this.element.dataset.turbo = true;
}
} }
confirmDeletionAtSubmit(event) { confirmDeletionAtSubmit(event) {

View file

@ -29,62 +29,47 @@ export default class extends Controller
this._confirmed = false; this._confirmed = false;
} }
click(event) {
//If a user has not already confirmed the deletion, just let turbo do its work
if(this._confirmed) {
this._confirmed = false;
return;
}
event.preventDefault();
const message = this.element.dataset.deleteMessage;
const title = this.element.dataset.deleteTitle;
const that = this;
const confirm = bootbox.confirm({
message: message, title: title, callback: function (result) {
//If the dialog was confirmed, then submit the form.
if (result) {
that._confirmed = true;
event.target.click();
} else {
that._confirmed = false;
}
}
});
}
submit(event) { submit(event) {
//If a user has not already confirmed the deletion, just let turbo do its work //If a user has not already confirmed the deletion, just let turbo do its work
if(this._confirmed) { if (this._confirmed) {
this._confirmed = false; this._confirmed = false;
return; return;
} }
//Prevent turbo from doing its work //Prevent turbo from doing its work
event.preventDefault(); event.preventDefault();
event.stopPropagation();
const message = this.element.dataset.deleteMessage; const message = this.element.dataset.deleteMessage;
const title = this.element.dataset.deleteTitle; const title = this.element.dataset.deleteTitle;
const form = this.element; //Use event target, to find the form, where the submit button was clicked
const form = event.target;
const submitter = event.submitter;
const that = this; const that = this;
//Create a clone of the event with the same submitter, so we can redispatch it if needed
//We need to do this that way, as we need the submitter info, just calling form.submit() would not work
this._our_event = new SubmitEvent('submit', {
submitter: event.submitter,
bubbles: true, //This line is important, otherwise Turbo will not receive the event
});
const confirm = bootbox.confirm({ const confirm = bootbox.confirm({
message: message, title: title, callback: function (result) { message: message, title: title, callback: function (result) {
//If the dialog was confirmed, then submit the form. //If the dialog was confirmed, then submit the form.
if (result) { if (result) {
//Set a flag to prevent the dialog from popping up again and allowing turbo to submit the form
that._confirmed = true; that._confirmed = true;
form.dispatchEvent(that._our_event);
//Create a submit button in the form and click it to submit the form
//Before a submit event was dispatched, but this caused weird issues on Firefox causing the delete request being posted twice (and the second time was returning 404). See https://github.com/Part-DB/Part-DB-server/issues/273
const submit_btn = document.createElement('button');
submit_btn.type = 'submit';
submit_btn.style.display = 'none';
//If the clicked button has a value, set it on the submit button
if (submitter.value) {
submit_btn.value = submitter.value;
}
if (submitter.name) {
submit_btn.name = submitter.name;
}
form.appendChild(submit_btn);
submit_btn.click();
} else { } else {
that._confirmed = false; that._confirmed = false;
} }

View file

@ -0,0 +1,40 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
import JSONFormatter from 'json-formatter-js';
/**
* This controller implements an element that renders a JSON object as a collapsible tree.
* The JSON object is passed as a data attribute.
* You have to apply the controller to a div element or similar block element which can contain other elements.
*/
export default class extends Controller {
connect() {
const depth_to_open = this.element.dataset.depthToOpen ?? 0;
const json_string = this.element.dataset.json;
const json_object = JSON.parse(json_string);
const formatter = new JSONFormatter(json_object, depth_to_open);
this.element.appendChild(formatter.render());
}
}

View file

@ -0,0 +1,72 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2022 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
import * as bootbox from "bootbox";
import "../../css/components/bootbox_extensions.css";
export default class extends Controller
{
static values = {
message: String,
title: String
}
connect()
{
this._confirmed = false;
this.element.addEventListener('click', this._onClick.bind(this));
}
_onClick(event)
{
//If a user has not already confirmed the deletion, just let turbo do its work
if (this._confirmed) {
this._confirmed = false;
return;
}
event.preventDefault();
event.stopPropagation();
const that = this;
bootbox.confirm({
title: this.titleValue,
message: this.messageValue,
callback: (result) => {
if (result) {
//Set a flag to prevent the dialog from popping up again and allowing turbo to submit the form
that._confirmed = true;
//Click the link
that.element.click();
} else {
that._confirmed = false;
}
}
});
}
}

View file

@ -0,0 +1,67 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
export default class extends Controller
{
static values = {
id: String
}
connect() {
this.loadState()
this.element.addEventListener('change', () => {
this.saveState()
});
}
loadState() {
let storageKey = this.getStorageKey();
let value = localStorage.getItem(storageKey);
if (value === null) {
return;
}
if (value === 'true') {
this.element.checked = true
}
if (value === 'false') {
this.element.checked = false
}
}
saveState() {
let storageKey = this.getStorageKey();
if (this.element.checked) {
localStorage.setItem(storageKey, 'true');
} else {
localStorage.setItem(storageKey, 'false');
}
}
getStorageKey() {
if (this.hasIdValue) {
return 'persistent_checkbox_' + this.idValue
}
return 'persistent_checkbox_' + this.element.id;
}
}

View file

@ -0,0 +1,200 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2024 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Controller } from "@hotwired/stimulus";
import { autocomplete } from '@algolia/autocomplete-js';
//import "@algolia/autocomplete-theme-classic/dist/theme.css";
import "../../css/components/autocomplete_bootstrap_theme.css";
import { createLocalStorageRecentSearchesPlugin } from '@algolia/autocomplete-plugin-recent-searches';
import {marked} from "marked";
import {
trans,
SEARCH_PLACEHOLDER,
SEARCH_SUBMIT,
STATISTICS_PARTS
} from '../../translator';
/**
* This controller is responsible for the search fields in the navbar and the homepage.
* It uses the Algolia Autocomplete library to provide a fast and responsive search.
*/
export default class extends Controller {
static targets = ["input"];
_autocomplete;
// Highlight the search query in the results
_highlight = (text, query) => {
if (!text) return text;
if (!query) return text;
const HIGHLIGHT_PRE_TAG = '__aa-highlight__'
const HIGHLIGHT_POST_TAG = '__/aa-highlight__'
const escaped = query.replace(/[-/\\^$*+?.()|[\]{}]/g, '\\$&');
const regex = new RegExp(escaped, 'gi');
return text.replace(regex, (match) => `${HIGHLIGHT_PRE_TAG}${match}${HIGHLIGHT_POST_TAG}`);
}
initialize() {
// The endpoint for searching parts
const base_url = this.element.dataset.autocomplete;
// The URL template for the part detail pages
const part_detail_uri_template = this.element.dataset.detailUrl;
//The URL of the placeholder picture
const placeholder_image = this.element.dataset.placeholderImage;
//If the element is in navbar mode, or not
const navbar_mode = this.element.dataset.navbarMode === "true";
const that = this;
const recentSearchesPlugin = createLocalStorageRecentSearchesPlugin({
key: 'RECENT_SEARCH',
limit: 5,
});
this._autocomplete = autocomplete({
container: this.element,
//Place the panel in the navbar, if the element is in navbar mode
panelContainer: navbar_mode ? document.getElementById("navbar-search-form") : document.body,
panelPlacement: this.element.dataset.panelPlacement,
plugins: [recentSearchesPlugin],
openOnFocus: true,
placeholder: trans(SEARCH_PLACEHOLDER),
translations: {
submitButtonTitle: trans(SEARCH_SUBMIT)
},
// Use a navigator compatible with turbo:
navigator: {
navigate({ itemUrl }) {
window.Turbo.visit(itemUrl, { action: "advance" });
},
navigateNewTab({ itemUrl }) {
const windowReference = window.open(itemUrl, '_blank', 'noopener');
if (windowReference) {
windowReference.focus();
}
},
navigateNewWindow({ itemUrl }) {
window.open(itemUrl, '_blank', 'noopener');
},
},
// If the form is submitted, forward the term to the form
onSubmit({state, event, ...setters}) {
//Put the current text into each target input field
const input = that.inputTarget;
if (!input) {
return;
}
//Do not submit the form, if the input is empty
if (state.query === "") {
return;
}
input.value = state.query;
input.form.requestSubmit();
},
getSources({ query }) {
return [
// The parts source
{
sourceId: 'parts',
getItems() {
const url = base_url.replace('__QUERY__', encodeURIComponent(query));
const data = fetch(url)
.then((response) => response.json())
;
//Iterate over all fields besides the id and highlight them
const fields = ["name", "description", "category", "footprint"];
data.then((items) => {
items.forEach((item) => {
for (const field of fields) {
item[field] = that._highlight(item[field], query);
}
});
});
return data;
},
getItemUrl({ item }) {
return part_detail_uri_template.replace('__ID__', item.id);
},
templates: {
header({ html }) {
return html`<span class="aa-SourceHeaderTitle">${trans(STATISTICS_PARTS)}</span>
<div class="aa-SourceHeaderLine" />`;
},
item({item, components, html}) {
const details_url = part_detail_uri_template.replace('__ID__', item.id);
return html`
<a class="aa-ItemLink" href="${details_url}">
<div class="aa-ItemContent">
<div class="aa-ItemIcon aa-ItemIcon--picture aa-ItemIcon--alignTop">
<img src="${item.image !== "" ? item.image : placeholder_image}" alt="${item.name}" width="30" height="30"/>
</div>
<div class="aa-ItemContentBody">
<div class="aa-ItemContentTitle">
<b>
${components.Highlight({hit: item, attribute: 'name'})}
</b>
</div>
<div class="aa-ItemContentDescription">
${components.Highlight({hit: item, attribute: 'description'})}
${item.category ? html`<p class="m-0"><span class="fa-solid fa-tags fa-fw"></span>${components.Highlight({hit: item, attribute: 'category'})}</p>` : ""}
${item.footprint ? html`<p class="m-0"><span class="fa-solid fa-microchip fa-fw"></span>${components.Highlight({hit: item, attribute: 'footprint'})}</p>` : ""}
</div>
</div>
</div>
</a>
`;
},
},
},
];
},
});
//Try to find the input field and register a defocus handler. This is necessarry, as by default the autocomplete
//lib has problems when multiple inputs are present on the page. (see https://github.com/algolia/autocomplete/issues/1216)
const inputs = this.element.getElementsByClassName('aa-Input');
for (const input of inputs) {
input.addEventListener('blur', () => {
this._autocomplete.setIsOpen(false);
});
}
}
}

View file

@ -27,7 +27,7 @@ export default class extends Controller {
} }
let tmp = '<div class="row m-0">' + let tmp = '<div class="row m-0">' +
"<div class='col-2 p-0 d-flex align-items-center'>" + "<div class='col-2 p-0 d-flex align-items-center' style='max-width: 80px;'>" +
(data.image ? "<img class='typeahead-image' src='" + data.image + "'/>" : "") + (data.image ? "<img class='typeahead-image' src='" + data.image + "'/>" : "") +
"</div>" + "</div>" +
"<div class='col-10'>" + "<div class='col-10'>" +

View file

@ -0,0 +1,123 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
import { zxcvbn, zxcvbnOptions } from '@zxcvbn-ts/core';
import * as zxcvbnCommonPackage from '@zxcvbn-ts/language-common';
import * as zxcvbnEnPackage from '@zxcvbn-ts/language-en';
import * as zxcvbnDePackage from '@zxcvbn-ts/language-de';
import * as zxcvbnFrPackage from '@zxcvbn-ts/language-fr';
import * as zxcvbnJaPackage from '@zxcvbn-ts/language-ja';
import {trans, USER_PASSWORD_STRENGTH_VERY_WEAK, USER_PASSWORD_STRENGTH_WEAK, USER_PASSWORD_STRENGTH_MEDIUM,
USER_PASSWORD_STRENGTH_STRONG, USER_PASSWORD_STRENGTH_VERY_STRONG} from '../../translator.js';
/* stimulusFetch: 'lazy' */
export default class extends Controller {
_passwordInput;
static targets = ["badge", "warning"]
_getTranslations() {
//Get the current locale
const locale = document.documentElement.lang;
if (locale.includes('de')) {
return zxcvbnDePackage.translations;
} else if (locale.includes('fr')) {
return zxcvbnFrPackage.translations;
} else if (locale.includes('ja')) {
return zxcvbnJaPackage.translations;
}
//Fallback to english
return zxcvbnEnPackage.translations;
}
connect() {
//Find the password input field
this._passwordInput = this.element.querySelector('input[type="password"]');
//Configure zxcvbn
const options = {
graphs: zxcvbnCommonPackage.adjacencyGraphs,
dictionary: {
...zxcvbnCommonPackage.dictionary,
// We could use the english dictionary here too, but it is very big. So we just use the common words
//...zxcvbnEnPackage.dictionary,
},
translations: this._getTranslations(),
};
zxcvbnOptions.setOptions(options);
//Add event listener to the password input field
this._passwordInput.addEventListener('input', this._onPasswordInput.bind(this));
}
_onPasswordInput() {
//Retrieve the password
const password = this._passwordInput.value;
//Estimate the password strength
const result = zxcvbn(password);
//Update the badge
this.badgeTarget.parentElement.classList.remove("d-none");
this._setBadgeToLevel(result.score);
this.warningTarget.innerHTML = result.feedback.warning;
}
_setBadgeToLevel(level) {
let text, classes;
switch (level) {
case 0:
text = trans(USER_PASSWORD_STRENGTH_VERY_WEAK);
classes = "bg-danger badge-danger";
break;
case 1:
text = trans(USER_PASSWORD_STRENGTH_WEAK);
classes = "bg-warning badge-warning";
break;
case 2:
text = trans(USER_PASSWORD_STRENGTH_MEDIUM)
classes = "bg-info badge-info";
break;
case 3:
text = trans(USER_PASSWORD_STRENGTH_STRONG);
classes = "bg-primary badge-primary";
break;
case 4:
text = trans(USER_PASSWORD_STRENGTH_VERY_STRONG);
classes = "bg-success badge-success";
break;
default:
text = "???";
classes = "bg-secondary badge-secondary";
}
this.badgeTarget.innerHTML = text;
//Remove all classes
this.badgeTarget.className = '';
//Re-add the classes
this.badgeTarget.classList.add("badge");
this.badgeTarget.classList.add(...classes.split(" "));
}
}

View file

@ -0,0 +1,106 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
import "tom-select/dist/css/tom-select.bootstrap5.css";
import '../../css/components/tom-select_extensions.css';
import TomSelect from "tom-select";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
/**
* This is the frontend controller for StaticFileAutocompleteType form element.
* Basically it loads a text file from the given url (via data-url) and uses it as a source for the autocomplete.
* The file is just a list of strings, one per line, which will be used as the autocomplete options.
* Lines starting with # will be ignored.
*/
export default class extends Controller {
_tomSelect;
connect() {
let settings = {
persistent: false,
create: true,
maxItems: 1,
maxOptions: 100,
createOnBlur: true,
selectOnTab: true,
valueField: 'text',
searchField: 'text',
orderField: 'text',
//This a an ugly solution to disable the delimiter parsing of the TomSelect plugin
delimiter: 'VERY_L0NG_D€LIMITER_WHICH_WILL_NEVER_BE_ENCOUNTERED_IN_A_STRING',
plugins: {
'autoselect_typed': {},
'click_to_edit': {},
'clear_button': {},
'restore_on_backspace': {}
}
};
if (this.element.dataset.url) {
const url = this.element.dataset.url;
settings.load = (query, callback) => {
const self = this;
if (self.loading > 1) {
callback();
return;
}
fetch(url)
.then(response => response.text())
.then(text => {
// Convert the text file to array
let lines = text.split("\n");
//Remove all lines beginning with #
lines = lines.filter(x => !x.startsWith("#"));
//Convert the array to an object, where each line is in the text field
lines = lines.map(x => {
return {text: x};
});
//Unset the load function to prevent endless recursion
self._tomSelect.settings.load = null;
callback(lines);
}).catch(() => {
callback();
});
};
}
this._tomSelect = new TomSelect(this.element, settings);
}
disconnect() {
super.disconnect();
//Destroy the TomSelect instance
this._tomSelect.destroy();
}
}

View file

@ -22,6 +22,10 @@ import '../../css/components/tom-select_extensions.css';
import TomSelect from "tom-select"; import TomSelect from "tom-select";
import {Controller} from "@hotwired/stimulus"; import {Controller} from "@hotwired/stimulus";
import {trans, ENTITY_SELECT_GROUP_NEW_NOT_ADDED_TO_DB} from '../../translator.js'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
export default class extends Controller { export default class extends Controller {
_tomSelect; _tomSelect;
@ -36,12 +40,20 @@ export default class extends Controller {
const allowAdd = this.element.getAttribute("data-allow-add") === "true"; const allowAdd = this.element.getAttribute("data-allow-add") === "true";
const addHint = this.element.getAttribute("data-add-hint") ?? ""; const addHint = this.element.getAttribute("data-add-hint") ?? "";
let settings = { let settings = {
allowEmptyOption: true, allowEmptyOption: true,
selectOnTab: true, selectOnTab: true,
maxOptions: null, maxOptions: null,
create: allowAdd, create: allowAdd ? this.createItem.bind(this) : false,
createFilter: /\D/, //Must contain a non-digit character, otherwise they would be recognized as DB ID createFilter: this.createFilter.bind(this),
// This three options allow us to paste element names with commas: (see issue #538)
maxItems: 1,
delimiter: "$$VERY_LONG_DELIMITER_THAT_SHOULD_NEVER_APPEAR$$",
splitOn: null,
searchField: [ searchField: [
{field: "text", weight : 2}, {field: "text", weight : 2},
@ -52,15 +64,108 @@ export default class extends Controller {
render: { render: {
item: this.renderItem.bind(this), item: this.renderItem.bind(this),
option: this.renderOption.bind(this), option: this.renderOption.bind(this),
option_create: function(data, escape) { option_create: (data, escape) => {
//If the input starts with "->", we prepend the current selected value, for easier extension of existing values
//This here handles the display part, while the createItem function handles the actual creation
if (data.input.startsWith("->")) {
//Get current selected value
const current = this._tomSelect.getItem(this._tomSelect.getValue()).textContent.replaceAll("→", "->").trim();
//Prepend it to the input
if (current) {
data.input = current + " " + data.input;
} else {
//If there is no current value, we remove the "->"
data.input = data.input.substring(2);
}
}
return '<div class="create"><i class="fa-solid fa-plus fa-fw"></i>&nbsp;<strong>' + escape(data.input) + '</strong>&hellip;&nbsp;' + return '<div class="create"><i class="fa-solid fa-plus fa-fw"></i>&nbsp;<strong>' + escape(data.input) + '</strong>&hellip;&nbsp;' +
'<small class="text-muted float-end">(' + addHint +')</small>' + '<small class="text-muted float-end">(' + addHint +')</small>' +
'</div>'; '</div>';
}, },
},
//Add callbacks to update validity
onInitialize: this.updateValidity.bind(this),
onChange: this.updateValidity.bind(this),
plugins: {
"autoselect_typed": {},
} }
}; };
//Add clear button plugin, if an empty option is present
if (this.element.querySelector("option[value='']") !== null) {
settings.plugins["clear_button"] = {};
}
this._tomSelect = new TomSelect(this.element, settings); this._tomSelect = new TomSelect(this.element, settings);
//Do not do a sync here as this breaks the initial rendering of the empty option
//this._tomSelect.sync();
}
createItem(input, callback) {
//If the input starts with "->", we prepend the current selected value, for easier extension of existing values
if (input.startsWith("->")) {
//Get current selected value
let current = this._tomSelect.getItem(this._tomSelect.getValue()).textContent.replaceAll("→", "->").trim();
//Replace no break spaces with normal spaces
current = current.replaceAll("\u00A0", " ");
//Prepend it to the input
if (current) {
input = current + " " + input;
} else {
//If there is no current value, we remove the "->"
input = input.substring(2);
}
}
callback({
//$%$ is a special value prefix, that is used to identify items, that are not yet in the DB
value: '$%$' + input,
text: input,
not_in_db_yet: true,
});
}
createFilter(input) {
//Normalize the input (replace spacing around arrows)
if (input.includes("->")) {
const inputs = input.split("->");
inputs.forEach((value, index) => {
inputs[index] = value.trim();
});
input = inputs.join("->");
} else {
input = input.trim();
}
const options = this._tomSelect.options;
//Iterate over all options and check if the input is already present
for (let index in options) {
const option = options[index];
if (option.path === input) {
return false;
}
}
return true;
}
updateValidity() {
//Mark this input as invalid, if the selected option is disabled
const input = this.element;
const selectedOption = input.options[input.selectedIndex];
if (selectedOption && selectedOption.disabled) {
input.setCustomValidity("This option was disabled. Please select another option.");
} else {
input.setCustomValidity("");
}
} }
getTomSelect() { getTomSelect() {
@ -78,14 +183,27 @@ export default class extends Controller {
} }
if (data.short) { if (data.short) {
return '<div><b>' + escape(data.short) + '</b></div>'; let short = escape(data.short)
//Make text italic, if the item is not yet in the DB
if (data.not_in_db_yet) {
short = '<i>' + short + '</i>';
}
return '<div><b>' + short + '</b></div>';
} }
let name = ""; let name = "";
if (data.parent) { if (data.parent) {
name += escape(data.parent) + "&nbsp;→&nbsp;"; name += escape(data.parent) + "&nbsp;→&nbsp;";
} }
name += "<b>" + escape(data.text) + "</b>";
if (data.not_in_db_yet) {
//Not yet added items are shown italic and with a badge
name += "<i><b>" + escape(data.text) + "</b></i>" + "<span class='ms-3 badge bg-info badge-info'>" + trans(ENTITY_SELECT_GROUP_NEW_NOT_ADDED_TO_DB) + "</span>";
} else {
name += "<b>" + escape(data.text) + "</b>";
}
return '<div>' + (data.image ? "<img class='structural-entity-select-image' style='margin-right: 5px;' ' src='" + data.image + "'/>" : "") + name + '</div>'; return '<div>' + (data.image ? "<img class='structural-entity-select-image' style='margin-right: 5px;' ' src='" + data.image + "'/>" : "") + name + '</div>';
} }

View file

@ -23,14 +23,21 @@ import "tom-select/dist/css/tom-select.bootstrap5.css";
import '../../css/components/tom-select_extensions.css'; import '../../css/components/tom-select_extensions.css';
import TomSelect from "tom-select"; import TomSelect from "tom-select";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
export default class extends Controller { export default class extends Controller {
_tomSelect; _tomSelect;
connect() { connect() {
let settings = { let settings = {
plugins: { plugins: {
remove_button:{ remove_button:{},
} 'autoselect_typed': {},
'click_to_edit': {},
}, },
persistent: false, persistent: false,
selectOnTab: true, selectOnTab: true,

View file

@ -81,31 +81,71 @@ export default class extends Controller {
this._tree.remove(); this._tree.remove();
} }
const BS53Theme = {
getOptions() {
return {
onhoverColor: 'var(--bs-secondary-bg)',
};
}
}
this._tree = new BSTreeView(this.treeTarget, { this._tree = new BSTreeView(this.treeTarget, {
levels: 1, levels: 1,
showTags: this._showTags, showTags: this._showTags,
data: data, data: data,
showIcon: true, showIcon: true,
preventUnselect: true,
allowReselect: true,
onNodeSelected: (event) => { onNodeSelected: (event) => {
const node = event.detail.node; const node = event.detail.node;
if (node.href) { if (node.href) {
window.Turbo.visit(node.href, {action: "advance"}); window.Turbo.visit(node.href, {action: "advance"});
this._registerURLWatcher(node);
} }
}, },
//onNodeContextmenu: contextmenu_handler, }, [BS5Theme, BS53Theme, FAIconTheme]);
}, [BS5Theme, FAIconTheme]);
this.treeTarget.addEventListener(EVENT_INITIALIZED, (event) => { this.treeTarget.addEventListener(EVENT_INITIALIZED, (event) => {
/** @type {BSTreeView} */ /** @type {BSTreeView} */
const treeView = event.detail.treeView; const treeView = event.detail.treeView;
treeView.revealNode(treeView.getSelected()); treeView.revealNode(treeView.getSelected());
//Add the url watcher to all selected nodes
for (const node of treeView.getSelected()) {
this._registerURLWatcher(node);
}
//Add contextmenu event listener to the tree, which allows us to open the links in a new tab with a right click //Add contextmenu event listener to the tree, which allows us to open the links in a new tab with a right click
treeView.getTreeElement().addEventListener("contextmenu", this._onContextMenu.bind(this)); treeView.getTreeElement().addEventListener("contextmenu", this._onContextMenu.bind(this));
}); });
} }
_registerURLWatcher(node)
{
//Register a watcher for a location change, which will unselect the node, if the location changes
const desired_url = node.href;
//Ensure that the node is unselected, if the location changes
const unselectNode = () => {
//Parse url so we can properly compare them
const desired = new URL(node.href, window.location.origin);
//We only compare the pathname, because the hash and parameters should not matter
if(window.location.pathname !== desired.pathname) {
//The ignore parameter is important here, otherwise the node will not be unselected
node.setSelected(false, {silent: true, ignorePreventUnselect: true});
//Unregister the watcher
document.removeEventListener('turbo:load', unselectNode);
}
};
//Register the watcher via hotwire turbo
//We must just load to have the new url in window.location
document.addEventListener('turbo:load', unselectNode);
}
_onContextMenu(event) _onContextMenu(event)
{ {
//Find the node that was clicked and open link in new tab //Find the node that was clicked and open link in new tab

View file

@ -0,0 +1,44 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
export default class extends Controller {
static targets = [ "display", "select" ]
connect()
{
this.update();
this.selectTarget.addEventListener('change', this.update.bind(this));
}
update()
{
//If the select value is 0, then we show the input field
if( this.selectTarget.value === '0')
{
this.displayTarget.classList.remove('d-none');
}
else
{
this.displayTarget.classList.add('d-none');
}
}
}

View file

@ -20,7 +20,7 @@
import {Controller} from "@hotwired/stimulus"; import {Controller} from "@hotwired/stimulus";
//import * as ZXing from "@zxing/library"; //import * as ZXing from "@zxing/library";
import {Html5QrcodeScanner, Html5Qrcode} from "html5-qrcode"; import {Html5QrcodeScanner, Html5Qrcode} from "@part-db/html5-qrcode";
/* stimulusFetch: 'lazy' */ /* stimulusFetch: 'lazy' */
export default class extends Controller { export default class extends Controller {
@ -50,7 +50,7 @@ export default class extends Controller {
}); });
this._scanner = new Html5QrcodeScanner(this.element.id, { this._scanner = new Html5QrcodeScanner(this.element.id, {
fps: 2, fps: 10,
qrbox: qrboxFunction, qrbox: qrboxFunction,
experimentalFeatures: { experimentalFeatures: {
//This option improves reading quality on android chrome //This option improves reading quality on android chrome
@ -61,6 +61,11 @@ export default class extends Controller {
this._scanner.render(this.onScanSuccess.bind(this)); this._scanner.render(this.onScanSuccess.bind(this));
} }
disconnect() {
this._scanner.pause();
this._scanner.clear();
}
onScanSuccess(decodedText, decodedResult) { onScanSuccess(decodedText, decodedResult) {
//Put our decoded Text into the input box //Put our decoded Text into the input box
document.getElementById('scan_dialog_input').value = decodedText; document.getElementById('scan_dialog_input').value = decodedText;

View file

@ -0,0 +1,65 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2022 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
/**
* This controller is used on a checkbox, which toggles the max value of all number input fields
*/
export default class extends Controller {
_checkbox;
getCheckbox() {
if (this._checkbox) {
return this._checkbox;
}
//Find the checkbox inside the controller element
this._checkbox = this.element.querySelector('input[type="checkbox"]');
return this._checkbox;
}
connect() {
//Add event listener to the checkbox
this.getCheckbox().addEventListener('change', this.toggleInputLimits.bind(this));
}
toggleInputLimits() {
//Find all input fields with the data-toggle-input-limits-target="max"
const inputFields = document.querySelectorAll("input[type='number']");
inputFields.forEach((inputField) => {
//Ensure that the input field has either a max or a data-max attribute
if (!inputField.hasAttribute('max') && !inputField.hasAttribute('data-max')) {
return;
}
//If the checkbox is checked, rename the max attribute to data-max
if (this.getCheckbox().checked) {
inputField.setAttribute('data-max', inputField.getAttribute('max'));
inputField.removeAttribute('max');
} else {
//If the checkbox is not checked, rename the data-max attribute back to max
inputField.setAttribute('max', inputField.getAttribute('data-max'));
inputField.removeAttribute('data-max');
}
});
}
}

View file

@ -25,9 +25,20 @@ import "katex/dist/katex.css";
export default class extends Controller { export default class extends Controller {
static targets = ["input", "preview"]; static targets = ["input", "preview"];
static values = {
unit: {type: Boolean, default: false} //Render as upstanding (non-italic) text, useful for units
}
updatePreview() updatePreview()
{ {
katex.render(this.inputTarget.value, this.previewTarget, { let value = "";
if (this.unitValue) {
value = "\\mathrm{" + this.inputTarget.value + "}";
} else {
value = this.inputTarget.value;
}
katex.render(value, this.previewTarget, {
throwOnError: false, throwOnError: false,
}); });
} }

View file

@ -22,6 +22,13 @@ import TomSelect from "tom-select";
import katex from "katex"; import katex from "katex";
import "katex/dist/katex.css"; import "katex/dist/katex.css";
import TomSelect_click_to_edit from '../../tomselect/click_to_edit/click_to_edit'
import TomSelect_autoselect_typed from '../../tomselect/autoselect_typed/autoselect_typed'
TomSelect.define('click_to_edit', TomSelect_click_to_edit)
TomSelect.define('autoselect_typed', TomSelect_autoselect_typed)
/* stimulusFetch: 'lazy' */ /* stimulusFetch: 'lazy' */
export default class extends Controller export default class extends Controller
{ {
@ -53,7 +60,10 @@ export default class extends Controller
connect() { connect() {
const settings = { const settings = {
plugins: { plugins: {
clear_button:{} 'autoselect_typed': {},
'click_to_edit': {},
'clear_button': {},
'restore_on_backspace': {}
}, },
persistent: false, persistent: false,
maxItems: 1, maxItems: 1,

View file

@ -0,0 +1,68 @@
/*
* This file is part of Part-DB (https://github.com/Part-DB/Part-DB-symfony).
*
* Copyright (C) 2019 - 2023 Jan Böhmer (https://github.com/jbtronics)
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published
* by the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import {Controller} from "@hotwired/stimulus";
export default class extends Controller
{
static targets = ['link', 'mode', 'otherSelect'];
static values = {
targetId: Number,
};
connect() {
}
update() {
const link = this.linkTarget;
const other_select = this.otherSelectTarget;
//Extract the mode using the mode radio buttons (we filter the array to get the checked one)
const mode = (this.modeTargets.filter((e)=>e.checked))[0].value;
if (other_select.value === '') {
link.classList.add('disabled');
return;
}
//Extract href template from data attribute on link target
let href = link.getAttribute('data-href-template');
let target, other;
if (mode === '1') {
target = this.targetIdValue;
other = other_select.value;
} else if (mode === '2') {
target = other_select.value;
other = this.targetIdValue;
} else {
throw 'Invalid mode';
}
//Replace placeholder with actual target id
href = href.replace('__target__', target);
//Replace placeholder with selected value of the select (the event sender)
href = href.replace('__other__', other);
//Assign new href to link
link.setAttribute('href', href);
//Make link clickable
link.classList.remove('disabled');
}
}

View file

@ -99,10 +99,25 @@ label:not(.form-check-label, .custom-control-label) {
form .col-form-label.required:after, form label.required:after { form .col-form-label.required:after, form label.required:after {
bottom: 4px; bottom: 4px;
color: var(--bs-dark); color: var(--bs-secondary-color);
content: "\2022"; content: "\2022";
filter: opacity(75%); filter: opacity(75%);
position: relative; position: relative;
right: -2px; right: -2px;
z-index: 700; z-index: 700;
}
/****************************************
* HTML diff styling
****************************************/
/* Insertations are marked with green background and bold */
ins {
background-color: #95f095;
font-weight: bold;
}
del {
background-color: #f09595;
font-weight: bold;
} }

View file

@ -67,7 +67,6 @@ ul.structural_link {
padding-bottom: 7px; padding-bottom: 7px;
padding-left: 0; padding-left: 0;
list-style: none; list-style: none;
background-color: inherit;
} }
/* Display list items side by side */ /* Display list items side by side */
@ -79,7 +78,7 @@ ul.structural_link li {
/* Add a slash symbol (/) before/behind each list item */ /* Add a slash symbol (/) before/behind each list item */
ul.structural_link li+li:before { ul.structural_link li+li:before {
padding: 2px; padding: 2px;
color: grey; color: var(--bs-tertiary-color);
/*content: "/\00a0";*/ /*content: "/\00a0";*/
font-family: "Font Awesome 5 Free"; font-family: "Font Awesome 5 Free";
font-weight: 900; font-weight: 900;
@ -89,13 +88,13 @@ ul.structural_link li+li:before {
/* Add a color to all links inside the list */ /* Add a color to all links inside the list */
ul.structural_link li a { ul.structural_link li a {
color: #0275d8; color: var(--bs-link-color);
text-decoration: none; text-decoration: none;
} }
/* Add a color on mouse-over */ /* Add a color on mouse-over */
ul.structural_link li a:hover { ul.structural_link li a:hover {
color: #01447e; color: var(--bs-link-hover-color);
text-decoration: underline; text-decoration: underline;
} }
@ -112,4 +111,11 @@ ul.structural_link li a:hover {
.permission-checkbox:checked { .permission-checkbox:checked {
background-color: var(--bs-success); background-color: var(--bs-success);
border-color: var(--bs-success); border-color: var(--bs-success);
}
/***********************************************
* Katex rendering with same height as text
***********************************************/
.katex-same-height-as-text .katex {
font-size: 1.0em;
} }

View file

@ -51,7 +51,6 @@
.part-table-image { .part-table-image {
max-height: 40px; max-height: 40px;
object-fit: contain; object-fit: contain;
width: 100%;
} }
.part-info-image { .part-info-image {
@ -61,4 +60,4 @@
.object-fit-cover { .object-fit-cover {
object-fit: cover; object-fit: cover;
} }

View file

@ -78,8 +78,6 @@ body {
overflow: -moz-scrollbars-none; overflow: -moz-scrollbars-none;
/* Use standard version for hiding the scrollbar */ /* Use standard version for hiding the scrollbar */
scrollbar-width: none; scrollbar-width: none;
background-color: var(--light);
} }
#sidebar-container { #sidebar-container {
@ -110,8 +108,8 @@ body {
.back-to-top { .back-to-top {
cursor: pointer; cursor: pointer;
position: fixed; position: fixed;
bottom: 20px; bottom: 60px;
right: 20px; right: 40px;
display:none; display:none;
z-index: 1030; z-index: 1030;
} }

View file

@ -63,10 +63,6 @@ table.dataTable > tbody > tr.selected > td > a {
margin-block-end: 0; margin-block-end: 0;
} }
.card-footer-table {
padding-top: 0;
}
table.dataTable { table.dataTable {
margin-top: 0 !important; margin-top: 0 !important;
} }
@ -84,14 +80,24 @@ th.select-checkbox {
* Datatables definitions/overrides * Datatables definitions/overrides
********************************************************************/ ********************************************************************/
.dataTables_length { .dt-length {
display: inline-flex; display: inline-flex;
} }
/** Fix datatables select-checkbox position */ /** Fix datatables select-checkbox position */
table.dataTable tr.selected td.select-checkbox:after table.dataTable tr.selected td.select-checkbox:after
{ {
margin-top: -28px !important; margin-top: -20px !important;
}
/** Show pagination right aligned */
.dt-paging .pagination {
justify-content: flex-end;
}
/** Fix table row coloring */
table.table.dataTable > :not(caption) > * > * {
background-color: var(--bs-table-bg);
} }
@ -103,43 +109,4 @@ Classes for Datatables export
#export-messageTop, #export-messageTop,
.export-helper{ .export-helper{
display: none; display: none;
} }
/******************************************************
* Styling for the select all checkbox in the parts table
* Should match the styling of the select checkbox
******************************************************/
table.dataTable > thead > tr > th.select-checkbox {
position: relative;
}
table.dataTable > thead > tr > th.select-checkbox:before,
table.dataTable > thead > tr > th.select-checkbox:after {
display: block;
position: absolute;
top: 1.2em;
left: 50%;
width: 12px;
height: 12px;
box-sizing: border-box;
}
table.dataTable > thead > tr > th.select-checkbox:before {
content: " ";
margin-top: -5px;
margin-left: -6px;
border: 1px solid black;
border-radius: 3px;
}
table.dataTable > thead > tr.selected > th.select-checkbox:after {
content: "✓";
font-size: 20px;
margin-top: -23px;
margin-left: -6px;
text-align: center;
/*text-shadow: 1px 1px #B0BED9, -1px -1px #B0BED9, 1px -1px #B0BED9, -1px 1px #B0BED9; */
}
table.dataTable.compact > thead > tr > th.select-checkbox:before {
margin-top: -12px;
}
table.dataTable.compact > thead > tr.selected > th.select-checkbox:after {
margin-top: -16px;
}

File diff suppressed because it is too large Load diff

View file

@ -24,9 +24,8 @@
/** Should be the same settings, as in label_style.css */ /** Should be the same settings, as in label_style.css */
.ck-html-label .ck-content { .ck-html-label .ck-content {
font-family: "DejaVu Sans Mono", monospace; font-family: "DejaVu Sans Mono", monospace;
font-size: 12px; font-size: 12pt;
line-height: 1.0; line-height: 1.0;
font-size-adjust: 1.5;
} }
.ck-html-label .ck-content p { .ck-html-label .ck-content p {
@ -36,3 +35,42 @@
.ck-html-label .ck-content hr { .ck-html-label .ck-content hr {
margin: 2px; margin: 2px;
} }
/***********************************************
* Hide CKEditor powered by message
***********************************************/
.ck-powered-by {
display: none;
}
/***********************************************
* Use Bootstrap color vars for CKEditor
***********************************************/
:root {
--ck-color-base-foreground: var(--bs-secondary-bg);
--ck-color-base-background: var(--bs-body-bg);
--ck-color-base-border: var(--bs-border-color);
--ck-color-base-action: var(--bs-success);
--ck-color-base-focus: var(--bs-primary-border-subtle);
--ck-color-base-text: var(--bs-body-color);
--ck-color-base-active: var(--bs-primary-bg-subtle);
--ck-color-base-active-focus: var(--bs-primary);
--ck-color-base-error: var(--bs-danger);
/* Improve contrast between text and toolbar */
--ck-color-toolbar-background: var(--bs-tertiary-bg);
/* Buttons */
--ck-color-button-default-hover-background: var(--bs-secondary-bg);
--ck-color-button-default-active-background: var(--bs-secondary-bg);
--ck-color-button-on-background: var(--bs-body-bg);
--ck-color-button-on-hover-background: var(--bs-secondary-bg);
--ck-color-button-on-active-background: var(--bs-secondary-bg);
--ck-color-button-on-disabled-background: var(--bs-secondary-bg);
--ck-color-button-on-color: var(--bs-primary)
}

View file

@ -0,0 +1,69 @@
/******************************************************************************************
* This styles the checkboxes of the select extension exactly like the ones in bootstrap 5
******************************************************************************************/
table.dataTable > tbody > tr > .selected {
background-color: var(--bs-primary-bg-subtle) !important;
color: white;
}
table.dataTable > tbody > tr > .dt-select {
text-align: center;
vertical-align: middle;
}
table.dataTable > thead > tr > .dt-select {
text-align: center;
}
table.dataTable input.dt-select-checkbox {
--bs-form-check-bg: var(--bs-body-bg);
flex-shrink: 0;
width: 1em;
height: 1em;
margin-top: 0.25em;
vertical-align: top;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: var(--bs-form-check-bg);
background-image: var(--bs-form-check-bg-image);
background-repeat: no-repeat;
background-position: center;
background-size: contain;
border: var(--bs-border-width) solid var(--bs-border-color);
-webkit-print-color-adjust: exact;
color-adjust: exact;
print-color-adjust: exact;
border-radius: 0.25em;
}
table.dataTable input.dt-select-checkbox:checked {
background-color: rgb(var(--bs-secondary-rgb));
border-color: rgb(var(--bs-secondary-rgb));
--bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e");
}
table.dataTable input.dt-select-checkbox:indeterminate {
background-color: rgb(var(--bs-secondary-rgb));
border-color: rgb(var(--bs-secondary-rgb));
--bs-form-check-bg-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='M6 10h8'/%3e%3c/svg%3e");
}
div.dt-container span.select-info,
div.dt-container span.select-item {
margin-left: 0.5em;
}
@media screen and (max-width: 640px) {
div.dt-container span.select-info,
div.dt-container span.select-item {
margin-left: 0;
display: block;
}
}
table.dataTable.table-sm tbody td.select-checkbox::before {
margin-top: -9px;
}

View file

@ -18,6 +18,29 @@
*/ */
.tagsinput.ts-wrapper.multi .ts-control > div { .tagsinput.ts-wrapper.multi .ts-control > div {
background: var(--bs-secondary); background: var(--bs-secondary-bg);
color: var(--bs-white); color: var(--bs-body-color);
} }
/*********
* BS 5.3 compatible dark mode
***************/
.ts-dropdown .active {
background-color: var(--bs-secondary-bg) !important;
color: var(--bs-body-color) !important;
}
.ts-dropdown, .ts-control, .ts-control input {
color: var(--bs-body-color) !important;
}
.ts-dropdown, .ts-dropdown.form-control, .ts-dropdown.form-select {
background: var(--bs-body-bg);
}
.ts-dropdown .optgroup-header {
color: var(--bs-tertiary-color);
background: var(--bs-body-bg);
cursor: default;
}

File diff suppressed because it is too large Load diff

3
assets/fonts/dompdf/.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
# Ignore font files
*.otf
*.ttf

View file

@ -0,0 +1 @@
Put your font ttf files in this folder to make them available to the label generator.

View file

@ -22,7 +22,6 @@
import '../css/app/layout.css'; import '../css/app/layout.css';
import '../css/app/helpers.css'; import '../css/app/helpers.css';
import '../css/app/darkmode.css';
import '../css/app/tables.css'; import '../css/app/tables.css';
import '../css/app/bs-overrides.css'; import '../css/app/bs-overrides.css';
import '../css/app/treeview.css'; import '../css/app/treeview.css';
@ -45,4 +44,18 @@ import "./register_events";
import "./tristate_checkboxes"; import "./tristate_checkboxes";
//Define jquery globally //Define jquery globally
window.$ = window.jQuery = require("jquery") window.$ = window.jQuery = require("jquery");
//Use the local WASM file for the ZXing library
import {
setZXingModuleOverrides,
} from "barcode-detector/pure";
import wasmFile from "../../node_modules/zxing-wasm/dist/reader/zxing_reader.wasm";
setZXingModuleOverrides({
locateFile: (path, prefix) => {
if (path.endsWith(".wasm")) {
return wasmFile;
}
return prefix + path;
},
});

View file

@ -27,14 +27,67 @@ class ErrorHandlerHelper {
constructor() { constructor() {
console.log('Error Handler registered'); console.log('Error Handler registered');
const content = document.getElementById('content'); //const content = document.getElementById('content');
content.addEventListener('turbo:before-fetch-response', (event) => this.handleError(event)); //It seems that the content element is unreliable for these events, so we use the document instead
const content = document;
//content.addEventListener('turbo:before-fetch-response', (event) => this.handleError(event));
content.addEventListener('turbo:fetch-request-error', (event) => this.handleError(event));
content.addEventListener('turbo:frame-missing', (event) => this.handleError(event));
$(document).ajaxError(this.handleJqueryErrror.bind(this)); $(document).ajaxError(this.handleJqueryErrror.bind(this));
} }
_showAlert(statusText, statusCode, location, responseHTML) _showAlert(statusText, statusCode, location, responseHTML)
{ {
const httpStatusToText = {
'200': 'OK',
'201': 'Created',
'202': 'Accepted',
'203': 'Non-Authoritative Information',
'204': 'No Content',
'205': 'Reset Content',
'206': 'Partial Content',
'300': 'Multiple Choices',
'301': 'Moved Permanently',
'302': 'Found',
'303': 'See Other',
'304': 'Not Modified',
'305': 'Use Proxy',
'306': 'Unused',
'307': 'Temporary Redirect',
'400': 'Bad Request',
'401': 'Unauthorized',
'402': 'Payment Required',
'403': 'Forbidden',
'404': 'Not Found',
'405': 'Method Not Allowed',
'406': 'Not Acceptable',
'407': 'Proxy Authentication Required',
'408': 'Request Timeout',
'409': 'Conflict',
'410': 'Gone',
'411': 'Length Required',
'412': 'Precondition Required',
'413': 'Request Entry Too Large',
'414': 'Request-URI Too Long',
'415': 'Unsupported Media Type',
'416': 'Requested Range Not Satisfiable',
'417': 'Expectation Failed',
'418': 'I\'m a teapot',
'429': 'Too Many Requests',
'500': 'Internal Server Error',
'501': 'Not Implemented',
'502': 'Bad Gateway',
'503': 'Service Unavailable',
'504': 'Gateway Timeout',
'505': 'HTTP Version Not Supported',
};
//If the statusText is empty, we use the status code as text
if (!statusText) {
statusText = httpStatusToText[statusCode];
}
//Create error text //Create error text
const title = statusText + ' (Status ' + statusCode + ')'; const title = statusText + ' (Status ' + statusCode + ')';
@ -87,8 +140,10 @@ class ErrorHandlerHelper {
} }
handleError(event) { handleError(event) {
const fetchResponse = event.detail.fetchResponse; //Prevent default error handling
const response = fetchResponse.response; event.preventDefault();
const response = event.detail.response;
//Ignore aborted requests. //Ignore aborted requests.
if (response.statusText === 'abort' || response.status == 0) { if (response.statusText === 'abort' || response.status == 0) {
@ -100,11 +155,17 @@ class ErrorHandlerHelper {
return; return;
} }
if(fetchResponse.failed) { //Skip 404 errors, on admin pages (as this causes a popup on deletion in firefox)
if (response.status == 404 && event.target.id === 'admin-content-frame') {
return;
}
if(!response.ok) {
response.text().then(responseHTML => { response.text().then(responseHTML => {
this._showAlert(response.statusText, response.status, fetchResponse.location.toString(), responseHTML); this._showAlert(response.statusText, response.status, response.url, responseHTML);
}).catch(err => { }).catch(err => {
this._showAlert(response.statusText, response.status, fetchResponse.location.toString(), '<pre>' + err + '</pre>'); this._showAlert(response.statusText, response.status, response.url, '<pre>' + err + '</pre>');
}); });
} }
} }

File diff suppressed because it is too large Load diff

View file

@ -47,7 +47,8 @@
method: config.method, method: config.method,
data: { data: {
_dt: config.name, _dt: config.name,
_init: true _init: true,
order: config.initial_order ?? undefined,
} }
}).done(function(data) { }).done(function(data) {
var baseState; var baseState;
@ -72,6 +73,17 @@
} }
} else { } else {
request._dt = config.name; request._dt = config.name;
//Try to resolve the original column index when the column was reordered (using the ColReorder plugin)
//Only do this when _ColReorder_iOrigCol is available
if (settings.aoColumns && settings.aoColumns.length && settings.aoColumns[0]._ColReorder_iOrigCol !== undefined) {
if (request.order && request.order.length) {
request.order.forEach(function (order) {
order.column = settings.aoColumns[order.column]._ColReorder_iOrigCol;
});
}
}
$.ajax(typeof config.url === 'function' ? config.url(dt) : config.url, { $.ajax(typeof config.url === 'function' ? config.url(dt) : config.url, {
method: config.method, method: config.method,
data: request data: request
@ -86,6 +98,15 @@
dtOpts = config.options(dtOpts); dtOpts = config.options(dtOpts);
} }
//Choose the column where the className contains "select-column" and apply the select extension to its render field
//Added for Part-DB
for (let column of dtOpts.columns) {
if (column.className && column.className.includes('dt-select')) {
column.render = $.fn.dataTable.render.select();
}
}
root.html(data.template); root.html(data.template);
dt = $('table', root).DataTable(dtOpts); dt = $('table', root).DataTable(dtOpts);
if (config.state !== 'none') { if (config.state !== 'none') {

View file

@ -20,6 +20,8 @@
'use strict'; 'use strict';
import {Dropdown} from "bootstrap"; import {Dropdown} from "bootstrap";
import ClipboardJS from "clipboard";
import {Modal} from "bootstrap";
class RegisterEventHelper { class RegisterEventHelper {
constructor() { constructor() {
@ -27,7 +29,14 @@ class RegisterEventHelper {
this.configureDropdowns(); this.configureDropdowns();
this.registerSpecialCharInput(); this.registerSpecialCharInput();
//Initialize ClipboardJS
this.registerLoadHandler(() => {
new ClipboardJS('.btn');
});
this.registerModalDropRemovalOnFormSubmit(); this.registerModalDropRemovalOnFormSubmit();
} }
registerModalDropRemovalOnFormSubmit() { registerModalDropRemovalOnFormSubmit() {
@ -37,6 +46,15 @@ class RegisterEventHelper {
if (back_drop) { if (back_drop) {
back_drop.remove(); back_drop.remove();
} }
//Remove scroll-lock if it is still active
if (document.body.classList.contains('modal-open')) {
document.body.classList.remove('modal-open');
//Remove the padding-right and overflow:hidden from the body
document.body.style.paddingRight = '';
document.body.style.overflow = '';
}
}); });
} }
@ -59,76 +77,239 @@ class RegisterEventHelper {
} }
registerTooltips() { registerTooltips() {
this.registerLoadHandler(() => { const handler = () => {
$(".tooltip").remove(); $(".tooltip").remove();
//Exclude dropdown buttons from tooltips, otherwise we run into endless errors from bootstrap (bootstrap.esm.js:614 Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown.) //Exclude dropdown buttons from tooltips, otherwise we run into endless errors from bootstrap (bootstrap.esm.js:614 Bootstrap doesn't allow more than one instance per element. Bound instance: bs.dropdown.)
$('a[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i.fas[title]') $('a[title], label[title], button[title]:not([data-bs-toggle="dropdown"]), p[title], span[title], h6[title], h3[title], i[title], small[title]')
//@ts-ignore //@ts-ignore
.tooltip("hide").tooltip({container: "body", placement: "auto", boundary: 'window'}); .tooltip("hide").tooltip({container: "body", placement: "auto", boundary: 'window'});
}); };
this.registerLoadHandler(handler);
document.addEventListener('dt:loaded', handler);
} }
registerSpecialCharInput() { registerSpecialCharInput() {
this.registerLoadHandler(() => { this.registerLoadHandler(() => {
//@ts-ignore //@ts-ignore
$("input[type=text], input[type=search]").unbind("keydown").keydown(function (event) { $("input[type=text], input[type=search]").unbind("keydown").keydown(function (event) {
let greek = event.altKey; let use_special_char = event.altKey;
let greek_char = ""; let greek_char = "";
if (greek){ if (use_special_char){
//Use the key property to determine the greek letter (as it is independent of the keyboard layout)
switch(event.key) { switch(event.key) {
case "w": //Omega //Greek letters
greek_char = '\u2126'; case "a": //Alpha (lowercase)
break;
case "u":
case "m": //Micro
greek_char = "\u00B5";
break;
case "p": //Phi
greek_char = "\u03C6";
break;
case "a": //Alpha
greek_char = "\u03B1"; greek_char = "\u03B1";
break; break;
case "b": //Beta case "A": //Alpha (uppercase)
greek_char = "\u0391";
break;
case "b": //Beta (lowercase)
greek_char = "\u03B2"; greek_char = "\u03B2";
break; break;
case "c": //Gamma case "B": //Beta (uppercase)
greek_char = "\u0392";
break;
case "g": //Gamma (lowercase)
greek_char = "\u03B3"; greek_char = "\u03B3";
break; break;
case "d": //Delta case "G": //Gamma (uppercase)
greek_char = "\u0393";
break;
case "d": //Delta (lowercase)
greek_char = "\u03B4"; greek_char = "\u03B4";
break; break;
case "l": //Pound case "D": //Delta (uppercase)
greek_char = "\u00A3"; greek_char = "\u0394";
break; break;
case "y": //Yen case "e": //Epsilon (lowercase)
greek_char = "\u00A5"; greek_char = "\u03B5";
break; break;
case "o": //Yen case "E": //Epsilon (uppercase)
greek_char = "\u00A4"; greek_char = "\u0395";
break; break;
case "1": //Sum symbol case "z": //Zeta (lowercase)
greek_char = "\u2211"; greek_char = "\u03B6";
break; break;
case "2": //Integral case "Z": //Zeta (uppercase)
greek_char = "\u222B"; greek_char = "\u0396";
break; break;
case "3": //Less-than or equal case "h": //Eta (lowercase)
greek_char = "\u2264"; greek_char = "\u03B7";
break; break;
case "4": //Greater than or equal case "H": //Eta (uppercase)
greek_char = "\u2265"; greek_char = "\u0397";
break; break;
case "5": //PI case "q": //Theta (lowercase)
greek_char = "\u03c0"; greek_char = "\u03B8";
break; break;
case "q": //Copyright case "Q": //Theta (uppercase)
greek_char = "\u00A9"; greek_char = "\u0398";
break; break;
case "e": //Euro case "i": //Iota (lowercase)
greek_char = "\u20AC"; greek_char = "\u03B9";
break; break;
case "I": //Iota (uppercase)
greek_char = "\u0399";
break;
case "k": //Kappa (lowercase)
greek_char = "\u03BA";
break;
case "K": //Kappa (uppercase)
greek_char = "\u039A";
break;
case "l": //Lambda (lowercase)
greek_char = "\u03BB";
break;
case "L": //Lambda (uppercase)
greek_char = "\u039B";
break;
case "m": //Mu (lowercase)
greek_char = "\u03BC";
break;
case "M": //Mu (uppercase)
greek_char = "\u039C";
break;
case "n": //Nu (lowercase)
greek_char = "\u03BD";
break;
case "N": //Nu (uppercase)
greek_char = "\u039D";
break;
case "x": //Xi (lowercase)
greek_char = "\u03BE";
break;
case "X": //Xi (uppercase)
greek_char = "\u039E";
break;
case "o": //Omicron (lowercase)
greek_char = "\u03BF";
break;
case "O": //Omicron (uppercase)
greek_char = "\u039F";
break;
case "p": //Pi (lowercase)
greek_char = "\u03C0";
break;
case "P": //Pi (uppercase)
greek_char = "\u03A0";
break;
case "r": //Rho (lowercase)
greek_char = "\u03C1";
break;
case "R": //Rho (uppercase)
greek_char = "\u03A1";
break;
case "s": //Sigma (lowercase)
greek_char = "\u03C3";
break;
case "S": //Sigma (uppercase)
greek_char = "\u03A3";
break;
case "t": //Tau (lowercase)
greek_char = "\u03C4";
break;
case "T": //Tau (uppercase)
greek_char = "\u03A4";
break;
case "u": //Upsilon (lowercase)
greek_char = "\u03C5";
break;
case "U": //Upsilon (uppercase)
greek_char = "\u03A5";
break;
case "f": //Phi (lowercase)
greek_char = "\u03C6";
break;
case "F": //Phi (uppercase)
greek_char = "\u03A6";
break;
case "c": //Chi (lowercase)
greek_char = "\u03C7";
break;
case "C": //Chi (uppercase)
greek_char = "\u03A7";
break;
case "y": //Psi (lowercase)
greek_char = "\u03C8";
break;
case "Y": //Psi (uppercase)
greek_char = "\u03A8";
break;
case "w": //Omega (lowercase)
greek_char = "\u03C9";
break;
case "W": //Omega (uppercase)
greek_char = "\u03A9";
break;
}
//Use keycodes for special characters as the shift char on the number keys are layout dependent
switch (event.keyCode) {
case 49: //1 key
//Product symbol on shift, sum on no shift
greek_char = event.shiftKey ? "\u220F" : "\u2211";
break;
case 50: //2 key
//Integral on no shift, partial derivative on shift
greek_char = event.shiftKey ? "\u2202" : "\u222B";
break;
case 51: //3 key
//Less than or equal on no shift, greater than or equal on shift
greek_char = event.shiftKey ? "\u2265" : "\u2264";
break;
case 52: //4 key
//Empty set on shift, infinity on no shift
greek_char = event.shiftKey ? "\u2205" : "\u221E";
break;
case 53: //5 key
//Not equal on shift, approx equal on no shift
greek_char = event.shiftKey ? "\u2260" : "\u2248";
break;
case 54: //6 key
//Element of on no shift, not element of on shift
greek_char = event.shiftKey ? "\u2209" : "\u2208";
break;
case 55: //7 key
//And on shift, or on no shift
greek_char = event.shiftKey ? "\u2227" : "\u2228";
break;
case 56: //8 key
//Proportional to on shift, angle on no shift
greek_char = event.shiftKey ? "\u221D" : "\u2220";
break;
case 57: //9 key
//Cube root on shift, square root on no shift
greek_char = event.shiftKey ? "\u221B" : "\u221A";
break;
case 48: //0 key
//Minus-Plus on shift, plus-minus on no shift
greek_char = event.shiftKey ? "\u2213" : "\u00B1";
break;
//Special characters
case 219: //hyphen (or ß on german layout)
//Copyright on no shift, TM on shift
greek_char = event.shiftKey ? "\u2122" : "\u00A9";
break;
case 191: //forward slash (or # on german layout)
//Generic currency on no shift, paragraph on shift
greek_char = event.shiftKey ? "\u00B6" : "\u00A4";
break;
//Currency symbols
case 192: //: or (ö on german layout)
//Euro on no shift, pound on shift
greek_char = event.shiftKey ? "\u00A3" : "\u20AC";
break;
case 221: //; or (ä on german layout)
//Yen on no shift, dollar on shift
greek_char = event.shiftKey ? "\u0024" : "\u00A5";
break;
} }
if(greek_char=="") return; if(greek_char=="") return;

View file

@ -19,7 +19,7 @@
"use strict"; "use strict";
import {Tab} from "bootstrap"; import {Tab, Dropdown, Collapse} from "bootstrap";
import tab from "bootstrap/js/src/tab"; import tab from "bootstrap/js/src/tab";
/** /**
@ -54,6 +54,7 @@ class TabRememberHelper {
const first_element = merged[0] ?? null; const first_element = merged[0] ?? null;
if(first_element) { if(first_element) {
this.revealElementOnTab(first_element); this.revealElementOnTab(first_element);
this.revealElementInCollapse(first_element);
} }
} }
@ -62,7 +63,27 @@ class TabRememberHelper {
* @param event * @param event
*/ */
onInvalid(event) { onInvalid(event) {
this.revealElementInCollapse(event.target);
this.revealElementOnTab(event.target); this.revealElementOnTab(event.target);
this.revealElementInDropdown(event.target);
}
revealElementInCollapse(element) {
let collapse = element.closest('.collapse');
if(collapse) {
let bs_collapse = Collapse.getOrCreateInstance(collapse);
bs_collapse.show();
}
}
revealElementInDropdown(element) {
let dropdown = element.closest('.dropdown-menu');
if(dropdown) {
let bs_dropdown = Dropdown.getOrCreateInstance(dropdown);
bs_dropdown.show();
}
} }
revealElementOnTab(element) { revealElementOnTab(element) {

View file

@ -21,8 +21,13 @@
class WebauthnTFA { class WebauthnTFA {
// Decodes a Base64Url string _b64UrlSafeEncode = (str) => {
_base64UrlDecode = (input) => { const b64 = btoa(str);
return b64.replace(/\+/g, '-').replace(/\//g, '_').replace(/=/g, '');
}
// Decodes a Base64Url string
_b64UrlSafeDecode = (input) => {
input = input input = input
.replace(/-/g, '+') .replace(/-/g, '+')
.replace(/_/g, '/'); .replace(/_/g, '/');
@ -39,13 +44,16 @@ class WebauthnTFA {
}; };
// Converts an array of bytes into a Base64Url string // Converts an array of bytes into a Base64Url string
_arrayToBase64String = (a) => btoa(String.fromCharCode(...a)); _arrayToBase64String = (a) => {
const str = String.fromCharCode(...a);
return this._b64UrlSafeEncode(str);
}
// Prepares the public key options object returned by the Webauthn Framework // Prepares the public key options object returned by the Webauthn Framework
_preparePublicKeyOptions = publicKey => { _preparePublicKeyOptions = publicKey => {
//Convert challenge from Base64Url string to Uint8Array //Convert challenge from Base64Url string to Uint8Array
publicKey.challenge = Uint8Array.from( publicKey.challenge = Uint8Array.from(
this._base64UrlDecode(publicKey.challenge), this._b64UrlSafeDecode(publicKey.challenge),
c => c.charCodeAt(0) c => c.charCodeAt(0)
); );
@ -67,7 +75,7 @@ class WebauthnTFA {
return { return {
...data, ...data,
id: Uint8Array.from( id: Uint8Array.from(
this._base64UrlDecode(data.id), this._b64UrlSafeDecode(data.id),
c => c.charCodeAt(0) c => c.charCodeAt(0)
), ),
}; };
@ -81,7 +89,7 @@ class WebauthnTFA {
return { return {
...data, ...data,
id: Uint8Array.from( id: Uint8Array.from(
this._base64UrlDecode(data.id), this._b64UrlSafeDecode(data.id),
c => c.charCodeAt(0) c => c.charCodeAt(0)
), ),
}; };

View file

@ -0,0 +1,63 @@
/**
* Autoselect Typed plugin for Tomselect
*
* This plugin allows automatically selecting an option matching the typed text when the Tomselect element goes out of
* focus (is blurred) and/or when the delimiter is typed.
*
* #select_on_blur option
* Tomselect natively supports the "createOnBlur" option. This option picks up any remaining text in the input field
* and uses it to create a new option and selects that option. It does behave a bit strangely though, in that it will
* not select an already existing option when the input is blurred, so if you typed something that matches an option in
* the list and then click outside the box (without pressing enter) the entered text is just removed (unless you have
* allow duplicates on in which case it will create a new option).
* This plugin fixes that, such that Tomselect will first try to select an option matching the remaining uncommitted
* text and only when no matching option is found tries to create a new one (if createOnBlur and create is on)
*
* #select_on_delimiter option
* Normally when typing the delimiter (space by default) Tomselect will try to create a new option (and select it) (if
* create is on), but if the typed text matches an option (and allow duplicates is off) it refuses to react at all until
* you press enter. With this option, the delimiter will also allow selecting an option, not just creating it.
*/
function select_current_input(self){
if(self.isLocked){
return
}
const val = self.inputValue()
//Do nothing if the input is empty
if (!val) {
return
}
if (self.options[val]) {
self.addItem(val)
self.setTextboxValue()
}
}
export default function(plugin_options_) {
const plugin_options = Object.assign({
//Autoselect the typed text when the input element goes out of focus
select_on_blur: true,
//Autoselect the typed text when the delimiter is typed
select_on_delimiter: true,
}, plugin_options_);
const self = this
if(plugin_options.select_on_blur) {
this.hook("before", "onBlur", function () {
select_current_input(self)
})
}
if(plugin_options.select_on_delimiter) {
this.hook("before", "onKeyPress", function (e) {
const character = String.fromCharCode(e.keyCode || e.which);
if (self.settings.mode === 'multi' && character === self.settings.delimiter) {
select_current_input(self)
}
})
}
}

View file

@ -0,0 +1,93 @@
/**
* click_to_edit plugin for Tomselect
*
* This plugin allows editing (and selecting text in) any selected item by clicking it.
*
* Usually, when the user typed some text and created an item in Tomselect that item cannot be edited anymore. To make
* a change, the item has to be deleted and retyped completely. There is also generally no way to copy text out of a
* tomselect item. The "restore_on_backspace" plugin improves that somewhat, by allowing the user to edit an item after
* pressing backspace. However, it is somewhat confusing to first have to focus the field an then hit backspace in order
* to copy a piece of text. It may also not be immediately obvious for editing.
* This plugin transforms an item into editable text when it is clicked, e.g. when the user tries to place the caret
* within an item or when they try to drag across the text to highlight it.
* It also plays nice with the remove_button plugin which still removes (deselects) an option entirely.
*
* It is recommended to also enable the autoselect_typed plugin when using this plugin. Without it, the text in the
* input field (i.e. the item that was just clicked) is lost when the user clicks outside the field. Also, when the user
* clicks an option (making it text) and then tries to enter another one by entering the delimiter (e.g. space) nothing
* happens until enter is pressed or the text is changed from what it was.
*/
/**
* Return a dom element from either a dom query string, jQuery object, a dom element or html string
* https://stackoverflow.com/questions/494143/creating-a-new-dom-element-from-an-html-string-using-built-in-dom-methods-or-pro/35385518#35385518
*
* param query should be {}
*/
const getDom = query => {
if (query.jquery) {
return query[0];
}
if (query instanceof HTMLElement) {
return query;
}
if (isHtmlString(query)) {
var tpl = document.createElement('template');
tpl.innerHTML = query.trim(); // Never return a text node of whitespace as the result
return tpl.content.firstChild;
}
return document.querySelector(query);
};
const isHtmlString = arg => {
if (typeof arg === 'string' && arg.indexOf('<') > -1) {
return true;
}
return false;
};
function plugin(plugin_options_) {
const self = this
const plugin_options = Object.assign({
//If there is unsubmitted text in the input field, should that text be automatically used to select a matching
//element? If this is off, clicking on item1 and then clicking on item2 will result in item1 being deselected
auto_select_before_edit: true,
//If there is unsubmitted text in the input field, should that text be automatically used to create a matching
//element if no matching element was found or auto_select_before_edit is off?
auto_create_before_edit: true,
//customize this function to change which text the item is replaced with when clicking on it
text: option => {
return option[self.settings.labelField];
}
}, plugin_options_);
self.hook('after', 'setupTemplates', () => {
const orig_render_item = self.settings.render.item;
self.settings.render.item = (data, escape) => {
const item = getDom(orig_render_item.call(self, data, escape));
item.addEventListener('click', evt => {
if (self.isLocked) {
return;
}
const val = self.inputValue();
if (self.options[val]) {
self.addItem(val)
} else if (self.settings.create) {
self.createItem();
}
const option = self.options[item.dataset.value]
self.setTextboxValue(plugin_options.text.call(self, option));
self.focus();
self.removeItem(item);
}
);
return item;
}
});
}
export { plugin as default };

16
assets/translator.js Normal file
View file

@ -0,0 +1,16 @@
import { localeFallbacks } from '../var/translations/configuration';
import { trans, getLocale, setLocale, setLocaleFallbacks } from '@symfony/ux-translator';
/*
* This file is part of the Symfony UX Translator package.
*
* If folder "../var/translations" does not exist, or some translations are missing,
* you must warmup your Symfony cache to refresh JavaScript translations.
*
* If you use TypeScript, you can rename this file to "translator.ts" to take advantage of types checking.
*/
setLocaleFallbacks(localeFallbacks);
export { trans };
export * from '../var/translations';

View file

@ -4,6 +4,17 @@
use App\Kernel; use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
if (!is_dir(dirname(__DIR__).'/vendor')) {
throw new LogicException('Dependencies are missing. Try running "composer install".');
}
//Increase xdebug.max_nesting_level to 1000 if required (see issue #411)
//Check if xdebug extension is active, and xdebug.max_nesting_level is set to 256 or lower
if (extension_loaded('xdebug') && ((int) ini_get('xdebug.max_nesting_level')) <= 256) {
//Increase xdebug.max_nesting_level to 1000
ini_set('xdebug.max_nesting_level', '1000');
}
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
} }

View file

@ -6,9 +6,13 @@ if (!ini_get('date.timezone')) {
} }
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); if (PHP_VERSION_ID >= 80000) {
require PHPUNIT_COMPOSER_INSTALL; require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
PHPUnit\TextUI\Command::main(); } else {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
}
} else { } else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) { if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n"; echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";

View file

@ -5,4 +5,5 @@ coverage:
status: status:
project: project:
default: default:
threshold: 5% threshold: 10%
target: 40%

View file

@ -1,101 +1,118 @@
{ {
"name": "part-db/part-db-server",
"type": "project", "type": "project",
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"require": { "require": {
"php": "^7.4 || ^8.0", "php": "^8.1",
"ext-ctype": "*", "ext-ctype": "*",
"ext-dom": "*",
"ext-gd": "*", "ext-gd": "*",
"ext-iconv": "*", "ext-iconv": "*",
"ext-intl": "*", "ext-intl": "*",
"ext-json": "*", "ext-json": "*",
"ext-mbstring": "*", "ext-mbstring": "*",
"amphp/http-client": "^5.1",
"api-platform/core": "^3.1",
"beberlei/doctrineextensions": "^1.2", "beberlei/doctrineextensions": "^1.2",
"brick/math": "^0.8.15", "brick/math": "0.12.1 as 0.11.0",
"composer/package-versions-deprecated": "1.11.99.4", "composer/ca-bundle": "^1.5",
"doctrine/annotations": "^1.6", "composer/package-versions-deprecated": "^1.11.99.5",
"doctrine/dbal": "^3.4.6", "doctrine/data-fixtures": "^2.0.0",
"doctrine/dbal": "^4.0.0",
"doctrine/doctrine-bundle": "^2.0", "doctrine/doctrine-bundle": "^2.0",
"doctrine/doctrine-migrations-bundle": "^3.0", "doctrine/doctrine-migrations-bundle": "^3.0",
"doctrine/orm": "^2.9", "doctrine/orm": "^3.2.0",
"dompdf/dompdf": "^2.0.0", "dompdf/dompdf": "^v3.0.0",
"erusev/parsedown": "^1.7", "erusev/parsedown": "^1.7",
"florianv/swap": "^4.0", "florianv/swap": "^4.0",
"florianv/swap-bundle": "dev-master", "florianv/swap-bundle": "dev-master",
"gregwar/captcha-bundle": "^2.1.0", "gregwar/captcha-bundle": "^2.1.0",
"jbtronics/2fa-webauthn": "^1.0.0", "hshn/base64-encoded-file": "^5.0",
"jbtronics/2fa-webauthn": "^v2.2.0",
"jbtronics/dompdf-font-loader-bundle": "^1.0.0",
"jfcherng/php-diff": "^6.14",
"knpuniversity/oauth2-client-bundle": "^2.15",
"league/csv": "^9.8.0",
"league/html-to-markdown": "^5.0.1", "league/html-to-markdown": "^5.0.1",
"liip/imagine-bundle": "^2.2", "liip/imagine-bundle": "^2.2",
"nbgrp/onelogin-saml-bundle": "^1.3",
"nelexa/zip": "^4.0", "nelexa/zip": "^4.0",
"nelmio/cors-bundle": "^2.3",
"nelmio/security-bundle": "^3.0", "nelmio/security-bundle": "^3.0",
"nyholm/psr7": "^1.1", "nyholm/psr7": "^1.1",
"ocramius/proxy-manager": "2.2.*", "omines/datatables-bundle": "^0.9.1",
"omines/datatables-bundle": "^0.5.0", "paragonie/sodium_compat": "^1.21",
"php-translation/symfony-bundle": "^0.12.0", "part-db/label-fonts": "^1.0",
"phpdocumentor/reflection-docblock": "^5.2", "rhukster/dom-sanitizer": "^1.0",
"runtime/frankenphp-symfony": "^0.2.0",
"s9e/text-formatter": "^2.1", "s9e/text-formatter": "^2.1",
"scheb/2fa-backup-code": "^5.13", "scheb/2fa-backup-code": "^6.8.0",
"scheb/2fa-bundle": "^5.13", "scheb/2fa-bundle": "^6.8.0",
"scheb/2fa-google-authenticator": "^5.13", "scheb/2fa-google-authenticator": "^6.8.0",
"scheb/2fa-trusted-device": "^5.13", "scheb/2fa-trusted-device": "^6.8.0",
"sensio/framework-extra-bundle": "^6.1.1",
"shivas/versioning-bundle": "^4.0", "shivas/versioning-bundle": "^4.0",
"spatie/db-dumper": "^2.21", "spatie/db-dumper": "^3.3.1",
"symfony/apache-pack": "^1.0", "symfony/apache-pack": "^1.0",
"symfony/asset": "5.4.*", "symfony/asset": "6.4.*",
"symfony/console": "5.4.*", "symfony/console": "6.4.*",
"symfony/dotenv": "5.4.*", "symfony/css-selector": "6.4.*",
"symfony/expression-language": "5.4.*", "symfony/dom-crawler": "6.4.*",
"symfony/flex": "^1.1", "symfony/dotenv": "6.4.*",
"symfony/form": "5.4.*", "symfony/expression-language": "6.4.*",
"symfony/framework-bundle": "5.4.*", "symfony/flex": "^v2.3.1",
"symfony/http-client": "5.4.*", "symfony/form": "6.4.*",
"symfony/http-kernel": "5.4.*", "symfony/framework-bundle": "6.4.*",
"symfony/mailer": "5.4.*", "symfony/http-client": "6.4.*",
"symfony/http-kernel": "6.4.*",
"symfony/mailer": "6.4.*",
"symfony/monolog-bundle": "^3.1", "symfony/monolog-bundle": "^3.1",
"symfony/process": "5.4.*", "symfony/polyfill-php82": "^1.28",
"symfony/property-access": "5.4.*", "symfony/process": "6.4.*",
"symfony/property-info": "5.4.*", "symfony/property-access": "6.4.*",
"symfony/proxy-manager-bridge": "5.4.*", "symfony/property-info": "6.4.*",
"symfony/rate-limiter": "5.4.*", "symfony/rate-limiter": "6.4.*",
"symfony/runtime": "5.4.*", "symfony/runtime": "6.4.*",
"symfony/security-bundle": "5.4.*", "symfony/security-bundle": "6.4.*",
"symfony/serializer": "5.4.*", "symfony/serializer": "6.4.*",
"symfony/translation": "5.4.*", "symfony/string": "6.4.*",
"symfony/twig-bundle": "5.4.*", "symfony/translation": "6.4.*",
"symfony/twig-bundle": "6.4.*",
"symfony/ux-translator": "^2.10",
"symfony/ux-turbo": "^2.0", "symfony/ux-turbo": "^2.0",
"symfony/validator": "5.4.*", "symfony/validator": "6.4.*",
"symfony/web-link": "5.4.*", "symfony/web-link": "6.4.*",
"symfony/webpack-encore-bundle": "^1.1", "symfony/webpack-encore-bundle": "^v2.0.1",
"symfony/yaml": "5.4.*", "symfony/yaml": "6.4.*",
"tecnickcom/tc-lib-barcode": "^1.15", "tecnickcom/tc-lib-barcode": "^2.1.4",
"twig/cssinliner-extra": "^3.0", "twig/cssinliner-extra": "^3.0",
"twig/extra-bundle": "^3.0", "twig/extra-bundle": "^3.8",
"twig/html-extra": "^3.0", "twig/html-extra": "^3.8",
"twig/inky-extra": "^3.0", "twig/inky-extra": "^3.0",
"twig/intl-extra": "^3.0", "twig/intl-extra": "^3.8",
"twig/markdown-extra": "^3.0", "twig/markdown-extra": "^3.8",
"web-auth/webauthn-symfony-bundle": "^3.3", "twig/string-extra": "^3.8",
"webmozart/assert": "^1.4" "web-auth/webauthn-symfony-bundle": "^4.0.0"
}, },
"require-dev": { "require-dev": {
"dama/doctrine-test-bundle": "^7.0", "dama/doctrine-test-bundle": "^v8.0.0",
"doctrine/doctrine-fixtures-bundle": "^3.2", "doctrine/doctrine-fixtures-bundle": "^4.0.0",
"ekino/phpstan-banned-code": "^v1.0.0", "ekino/phpstan-banned-code": "^v3.0.0",
"jbtronics/translation-editor-bundle": "^1.0",
"phpstan/extension-installer": "^1.0", "phpstan/extension-installer": "^1.0",
"phpstan/phpstan": "^1.4.7", "phpstan/phpstan": "^2.0.4",
"phpstan/phpstan-doctrine": "^1.2.11", "phpstan/phpstan-doctrine": "^2.0.1",
"phpstan/phpstan-symfony": "^1.1.7", "phpstan/phpstan-strict-rules": "^2.0.1",
"psalm/plugin-symfony": "^v5.0.1", "phpstan/phpstan-symfony": "^2.0.0",
"phpunit/phpunit": "^9.5",
"rector/rector": "^2.0.4",
"roave/security-advisories": "dev-latest", "roave/security-advisories": "dev-latest",
"symfony/browser-kit": "^5.2", "symfony/browser-kit": "6.4.*",
"symfony/css-selector": "^5.2", "symfony/debug-bundle": "6.4.*",
"symfony/debug-bundle": "^5.2",
"symfony/maker-bundle": "^1.13", "symfony/maker-bundle": "^1.13",
"symfony/phpunit-bridge": "5.4.*", "symfony/phpunit-bridge": "6.4.*",
"symfony/stopwatch": "^5.2", "symfony/stopwatch": "6.4.*",
"symfony/web-profiler-bundle": "^5.2", "symfony/web-profiler-bundle": "6.4.*",
"symplify/easy-coding-standard": "^11.0", "symplify/easy-coding-standard": "^12.0"
"vimeo/psalm": "^5.6.0"
}, },
"suggest": { "suggest": {
"ext-bcmath": "Used to improve price calculation performance", "ext-bcmath": "Used to improve price calculation performance",
@ -106,7 +123,7 @@
"*": "dist" "*": "dist"
}, },
"platform": { "platform": {
"php": "7.4.0" "php": "8.1.0"
}, },
"sort-packages": true, "sort-packages": true,
"allow-plugins": { "allow-plugins": {
@ -138,7 +155,7 @@
"post-update-cmd": [ "post-update-cmd": [
"@auto-scripts" "@auto-scripts"
], ],
"phpstan": "vendor/bin/phpstan analyse src --level 2 --memory-limit 1G" "phpstan": "vendor/bin/phpstan analyse src --level 5 --memory-limit 1G"
}, },
"conflict": { "conflict": {
"symfony/symfony": "*" "symfony/symfony": "*"
@ -146,9 +163,8 @@
"extra": { "extra": {
"symfony": { "symfony": {
"allow-contrib": false, "allow-contrib": false,
"require": "5.4.*" "require": "6.4.*",
"docker": true
} }
}, }
"repositories": [
]
} }

14240
composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,23 +0,0 @@
<?php
use Symfony\Component\Dotenv\Dotenv;
require dirname(__DIR__).'/vendor/autoload.php';
if (!class_exists(Dotenv::class)) {
throw new LogicException('Please run "composer require symfony/dotenv" to load the ".env" files configuring the application.');
}
// Load cached env vars if the .env.local.php file exists
// Run "composer dump-env prod" to create it (requires symfony/flex >=1.2)
if (is_array($env = @include dirname(__DIR__).'/.env.local.php') && (!isset($env['APP_ENV']) || ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? $env['APP_ENV']) === $env['APP_ENV'])) {
(new Dotenv(false))->populate($env);
} else {
// load all the .env files
(new Dotenv(false))->loadEnv(dirname(__DIR__).'/.env');
}
$_SERVER += $_ENV;
$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = ($_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? null) ?: 'dev';
$_SERVER['APP_DEBUG'] = $_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? 'prod' !== $_SERVER['APP_ENV'];
$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = (int) $_SERVER['APP_DEBUG'] || filter_var($_SERVER['APP_DEBUG'], FILTER_VALIDATE_BOOLEAN) ? '1' : '0';

View file

@ -2,7 +2,6 @@
return [ return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
@ -19,12 +18,18 @@ return [
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true], DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true], Gregwar\CaptchaBundle\GregwarCaptchaBundle::class => ['all' => true],
Translation\Bundle\TranslationBundle::class => ['all' => true],
Florianv\SwapBundle\FlorianvSwapBundle::class => ['all' => true], Florianv\SwapBundle\FlorianvSwapBundle::class => ['all' => true],
Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true], Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true],
Symfony\UX\Turbo\TurboBundle::class => ['all' => true], Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
Jbtronics\TFAWebauthn\TFAWebauthnBundle::class => ['all' => true], Jbtronics\TFAWebauthn\TFAWebauthnBundle::class => ['all' => true],
Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true], Scheb\TwoFactorBundle\SchebTwoFactorBundle::class => ['all' => true],
SpomkyLabs\CborBundle\SpomkyLabsCborBundle::class => ['all' => true],
Webauthn\Bundle\WebauthnBundle::class => ['all' => true], Webauthn\Bundle\WebauthnBundle::class => ['all' => true],
Nbgrp\OneloginSamlBundle\NbgrpOneloginSamlBundle::class => ['all' => true],
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true],
Jbtronics\DompdfFontLoaderBundle\DompdfFontLoaderBundle::class => ['all' => true],
KnpU\OAuth2ClientBundle\KnpUOAuth2ClientBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
Jbtronics\TranslationEditorBundle\JbtronicsTranslationEditorBundle::class => ['dev' => true],
]; ];

View file

@ -0,0 +1,41 @@
api_platform:
title: 'Part-DB API'
description: 'API of Part-DB'
version: '0.1.0'
formats:
jsonld: ['application/ld+json']
json: ['application/json']
jsonapi: ['application/vnd.api+json']
docs_formats:
jsonld: ['application/ld+json']
jsonopenapi: ['application/vnd.openapi+json']
html: ['text/html']
json: ['application/vnd.openapi+json']
swagger:
api_keys:
# overridden in OpenApiFactoryDecorator
access_token:
name: Authorization
type: header
defaults:
# TODO: Change this to true later. In the moment it is false, because we use the session in somewhere
stateless: false
cache_headers:
vary: ['Content-Type', 'Authorization', 'Origin']
extra_properties:
standard_put: true
rfc_7807_compliant_errors: true
pagination_client_items_per_page: true # Allow clients to override the default items per page
keep_legacy_inflector: false
# Need to be true, or some tests will fail
use_symfony_listeners: true
serializer:
# Change this to false later, to remove the hydra prefix on the API
hydra_prefix: true

View file

@ -20,3 +20,6 @@ framework:
tree.cache: tree.cache:
adapter: cache.app adapter: cache.app
tags: true tags: true
info_provider.cache:
adapter: cache.app

View file

@ -0,0 +1,5 @@
when@test:
dama_doctrine_test:
enable_static_connection: true
enable_static_meta_data_cache: true
enable_static_query_cache: true

View file

@ -8,15 +8,14 @@ datatables:
# Set options, as documented at https://datatables.net/reference/option/ # Set options, as documented at https://datatables.net/reference/option/
options: options:
lengthMenu : [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]] lengthMenu : [[10, 25, 50, 100], [10, 25, 50, 100]] # We add the "All" option, when part tables are generated
pageLength: 50 pageLength: '%partdb.table.default_page_size%' # Set to -1 to disable pagination (i.e. show all rows) by default
#dom: "<'row' <'col-sm-12' tr>><'row' <'col-sm-6'l><'col-sm-6 text-right'pif>>" dom: " <'row' <'col mb-2 input-group flex-nowrap' B l > <'col-auto mb-2' < p >>>
dom: " <'row'<'col mb-2 input-group' B l> <'col mb-2' <'pull-end' p>>> <'card'
<'card' rt
rt <'card-footer card-footer-table text-muted' i >
<'card-footer card-footer-table text-muted' i > >
> <'row' <'col mt-2 input-group flex-nowrap' B l > <'col-auto mt-2' < p >>>"
<'row'<'col mt-2 input-group' B l> <'col mt-2' <'pull-right' p>>>"
pagingType: 'simple_numbers' pagingType: 'simple_numbers'
searching: true searching: true
stateSave: true stateSave: true

View file

@ -1,5 +0,0 @@
translation:
symfony_profiler:
enabled: true
webui:
enabled: true

View file

@ -2,16 +2,32 @@ doctrine:
dbal: dbal:
url: '%env(resolve:DATABASE_URL)%' url: '%env(resolve:DATABASE_URL)%'
# Required for DAMA doctrine test bundle
use_savepoints: true
# IMPORTANT: You MUST configure your server version, # IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file) # either here or in the DATABASE_URL env var (see .env file)
types: types:
# UTC datetimes
datetime: datetime:
class: App\Doctrine\Types\UTCDateTimeType class: App\Doctrine\Types\UTCDateTimeType
date: date:
class: App\Doctrine\Types\UTCDateTimeType class: App\Doctrine\Types\UTCDateTimeType
datetime_immutable:
class: App\Doctrine\Types\UTCDateTimeImmutableType
date_immutable:
class: App\Doctrine\Types\UTCDateTimeImmutableType
big_decimal: big_decimal:
class: App\Doctrine\Types\BigDecimalType class: App\Doctrine\Types\BigDecimalType
tinyint:
class: App\Doctrine\Types\TinyIntType
# This was removed in doctrine/orm 4.0 but we need it for the WebauthnKey entity
array:
class: App\Doctrine\Types\ArrayType
schema_filter: ~^(?!internal)~ schema_filter: ~^(?!internal)~
# Only enable this when needed # Only enable this when needed
@ -19,20 +35,29 @@ doctrine:
orm: orm:
auto_generate_proxy_classes: true auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
report_fields_where_declared: true
validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true auto_mapping: true
controller_resolver:
auto_mapping: true
mappings: mappings:
App: App:
type: attribute
is_bundle: false is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity' dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity' prefix: 'App\Entity'
alias: App alias: App
dql: dql:
string_functions: string_functions:
regexp: DoctrineExtensions\Query\Mysql\Regexp regexp: App\Doctrine\Functions\Regexp
ifnull: DoctrineExtensions\Query\Mysql\IfNull field: DoctrineExtensions\Query\Mysql\Field
field2: App\Doctrine\Functions\Field2
natsort: App\Doctrine\Functions\Natsort
array_position: App\Doctrine\Functions\ArrayPosition
ilike: App\Doctrine\Functions\ILike
when@test: when@test:
doctrine: doctrine:

View file

@ -0,0 +1,11 @@
dompdf_font_loader:
auto_install: true
fonts:
unifont:
normal: "%kernel.project_dir%/vendor/part-db/label-fonts/fonts/unifont.ttf"
# Enable autodiscovery of fonts, so that font installation is much easier
autodiscovery:
paths:
- "%kernel.project_dir%/assets/fonts/dompdf"

View file

@ -2,8 +2,13 @@
framework: framework:
secret: '%env(APP_SECRET)%' secret: '%env(APP_SECRET)%'
csrf_protection: true csrf_protection: true
annotations: false
handle_all_throwables: true
# Must be set to true, to enable the change of HTTP methhod via _method parameter, otherwise our delete routines does not work anymore # We set this header by ourselves, so we can disable it here
disallow_search_engine_index: false
# Must be set to true, to enable the change of HTTP method via _method parameter, otherwise our delete routines does not work anymore
# TODO: Rework delete routines to work without _method parameter as it is not recommended anymore (see https://github.com/symfony/symfony/issues/45278) # TODO: Rework delete routines to work without _method parameter as it is not recommended anymore (see https://github.com/symfony/symfony/issues/45278)
http_method_override: true http_method_override: true
@ -22,16 +27,12 @@ framework:
handler_id: null handler_id: null
cookie_secure: auto cookie_secure: auto
cookie_samesite: lax cookie_samesite: lax
storage_factory_id: session.storage.factory.native
#esi: true #esi: true
#fragments: true #fragments: true
php_errors: php_errors:
log: true log: true
form:
legacy_error_messages: false # Enable to use the new Form component validation messages
when@test: when@test:
framework: framework:
test: true test: true

View file

@ -0,0 +1,5 @@
framework:
http_client:
default_options:
headers:
'User-Agent': 'Part-DB'

View file

@ -0,0 +1,10 @@
services:
Psr\Http\Message\RequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ResponseFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\ServerRequestFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\StreamFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UploadedFileFactoryInterface: '@http_discovery.psr17_factory'
Psr\Http\Message\UriFactoryInterface: '@http_discovery.psr17_factory'
http_discovery.psr17_factory:
class: Http\Discovery\Psr17Factory

View file

@ -0,0 +1,38 @@
knpu_oauth2_client:
clients:
# configure your clients as described here: https://github.com/knpuniversity/oauth2-client-bundle#configuration
ip_digikey_oauth:
type: generic
provider_class: '\League\OAuth2\Client\Provider\GenericProvider'
client_id: '%env(PROVIDER_DIGIKEY_CLIENT_ID)%'
client_secret: '%env(PROVIDER_DIGIKEY_SECRET)%'
redirect_route: 'oauth_client_check'
redirect_params: {name: 'ip_digikey_oauth'}
provider_options:
urlAuthorize: 'https://api.digikey.com/v1/oauth2/authorize'
urlAccessToken: 'https://api.digikey.com/v1/oauth2/token'
urlResourceOwnerDetails: ''
# Sandbox
#urlAuthorize: 'https://sandbox-api.digikey.com/v1/oauth2/authorize'
#urlAccessToken: 'https://sandbox-api.digikey.com/v1/oauth2/token'
#urlResourceOwnerDetails: ''
ip_octopart_oauth:
type: generic
provider_class: '\League\OAuth2\Client\Provider\GenericProvider'
client_id: '%env(PROVIDER_OCTOPART_CLIENT_ID)%'
client_secret: '%env(PROVIDER_OCTOPART_SECRET)%'
redirect_route: 'oauth_client_check'
redirect_params: { name: 'ip_octopart_oauth' }
provider_options:
urlAuthorize: 'https://identity.nexar.com/connect/authorize'
urlAccessToken: 'https://identity.nexar.com/connect/token'
urlResourceOwnerDetails: ''

View file

@ -3,9 +3,15 @@ liip_imagine:
# valid drivers options include "gd" or "gmagick" or "imagick" # valid drivers options include "gd" or "gmagick" or "imagick"
driver: "gd" driver: "gd"
twig:
mode: lazy
default_filter_set_settings:
format: webp
filter_sets: filter_sets:
thumbnail_sm: thumbnail_sm:
quality: 90 quality: 65
filters: filters:
thumbnail: thumbnail:
size: [150, 150] size: [150, 150]
@ -20,7 +26,7 @@ liip_imagine:
mode: inset mode: inset
thumbnail_xs: thumbnail_xs:
quality: 90 quality: 60
filters: filters:
thumbnail: thumbnail:
size: [50, 50] size: [50, 50]

View file

@ -1,2 +0,0 @@
framework:
lock: '%env(LOCK_DSN)%'

Some files were not shown because too many files have changed in this diff Show more