Part-DB-server/config
Wieland Schopohl 29db029d69
Add SI-prefix-aware sorting column for parts tableFeature/si value sort (#1344)
* Add SI-prefix-aware sorting column for the parts table

Adds an optional "Name (SI)" column that parses numeric values with SI
prefixes (p, n, u/µ, m, k/K, M, G, T) from part names and sorts by the
resulting physical value. This is useful for electronic components where
alphabetical sorting produces wrong results — e.g. 100nF, 10pF, 1uF
should sort as 10pF < 100nF < 1uF.

Implementation:
- New SiValueSort DQL function with platform-specific SQL generation
  for PostgreSQL (POSIX regex), MySQL/MariaDB (REGEXP_SUBSTR), and
  SQLite (PHP callback registered via the existing middleware).
- The regex is start-anchored: only names beginning with a number are
  matched. Part numbers like "MCP2515" or "Crystal 20MHz" are ignored.
- When SI sort is active, NATSORT is appended as a secondary sort so
  that non-matching parts fall back to natural string ordering instead
  of appearing in arbitrary order.
- The column is opt-in (not in default columns) and displays the parsed
  float value, or an empty cell for non-matching names.

* Rename SI column from "Name (SI)" to "SI Value"

The column now shows the parsed numeric value rather than the part name,
so the label should reflect that.

* Support comma as decimal separator in SI value parsing

Part names using European decimal notation (e.g. "4,7 kΩ", "2,2uF")
were parsed incorrectly because the regex only recognized dots. Now
commas are normalized to dots before parsing, matching the existing
pattern used elsewhere in the codebase (PartNormalizer, price providers).
2026-04-15 22:56:34 +02:00
..
packages Add SI-prefix-aware sorting column for parts tableFeature/si value sort (#1344) 2026-04-15 22:56:34 +02:00
routes Updated framework-bundle recipe 2025-07-13 16:40:14 +02:00
banner.md Allow to override the banner with its existing env variable 2025-08-24 17:37:16 +02:00
bundles.php Removed the deprecated symfony/ux-toggle-password package by replacing it by our own local versions 2025-08-30 21:57:57 +02:00
parameters.yaml Allow to disable the NoPrivateNetwork protection for attachment downloads via an env variable 2026-04-05 23:14:18 +02:00
permissions.yaml Allow to set stocktake date for part lots 2026-02-10 22:23:54 +01:00
preload.php Updated symfony recipes. 2021-01-03 20:54:47 +01:00
reference.php Updated dependencies 2026-04-03 21:45:02 +02:00
routes.yaml Updated routing recipe 2025-11-30 15:01:37 +01:00
services.yaml Removed now unnecessary workaround for fixtures 2025-12-07 19:15:47 +01:00