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
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
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
20be83c345
Allow to configure the currency to get prices in for the LCSCProvider
2024-02-22 23:57:57 +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
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
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
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
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
ee3ad403fb
Fixed exception if no content type or accept header are given
2024-01-26 00:36:14 +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
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
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
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
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
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
17e79207f0
Suppress static analysis issue
2023-12-12 22:42:34 +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
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
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
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
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
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