mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Added internal part number (IPN) as label placeholders
This fixes issue #306
This commit is contained in:
parent
d6500c45aa
commit
c6b6616ee3
3 changed files with 6 additions and 0 deletions
|
@ -76,6 +76,7 @@ const PLACEHOLDERS = [
|
|||
['[[FOOTPRINT_FULL]]', 'Footprint (Full path)'],
|
||||
['[[MASS]]', 'Mass'],
|
||||
['[[MPN]]', 'Manufacturer Product Number (MPN)'],
|
||||
['[[IPN]]', 'Internal Part Number (IPN)'],
|
||||
['[[TAGS]]', 'Tags'],
|
||||
['[[M_STATUS]]', 'Manufacturing status'],
|
||||
['[[DESCRIPTION]]', 'Description'],
|
||||
|
|
|
@ -39,6 +39,7 @@ Object.assign( window.CKEDITOR_TRANSLATIONS[ 'de' ].dictionary, {
|
|||
'Footprint (Full path)': 'Footprint (Vollständiger Pfad)',
|
||||
'Mass': 'Gewicht',
|
||||
'Manufacturer Product Number (MPN)': 'Hersteller Produktnummer (MPN)',
|
||||
'Internal Part Number (IPN)': 'Internal Part Number (IPN)',
|
||||
'Tags': 'Tags',
|
||||
'Manufacturing status': 'Herstellungsstatus',
|
||||
'Description': 'Beschreibung',
|
||||
|
|
|
@ -96,6 +96,10 @@ final class PartProvider implements PlaceholderProviderInterface
|
|||
return $part->getManufacturerProductNumber();
|
||||
}
|
||||
|
||||
if ('[[IPN]]' === $placeholder) {
|
||||
return $part->getIpn() ?? '';
|
||||
}
|
||||
|
||||
if ('[[TAGS]]' === $placeholder) {
|
||||
return $part->getTags();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue