fix(xo-web/render-xo-item/PIF): hide parenthesis if no info inside (#7022)
See Zammad#17381
This commit is contained in:
parent
d992a4cb87
commit
1c9d1049e0
@ -563,14 +563,20 @@ const xoItemToRender = {
|
||||
// PIF.
|
||||
PIF: ({ carrier, device, deviceName, vlan }) => (
|
||||
<span>
|
||||
<Icon icon='network' color={carrier ? 'text-success' : 'text-danger'} /> {device} ({deviceName}
|
||||
{deviceName !== '' && vlan !== -1 && ' - '}
|
||||
{vlan !== -1 &&
|
||||
_('keyValue', {
|
||||
key: _('pifVlanLabel'),
|
||||
value: vlan,
|
||||
})}
|
||||
)
|
||||
<Icon icon='network' color={carrier ? 'text-success' : 'text-danger'} /> {device}
|
||||
{(deviceName !== '' || vlan !== -1) && (
|
||||
<span>
|
||||
{' '}
|
||||
({deviceName}
|
||||
{deviceName !== '' && vlan !== -1 && ' - '}
|
||||
{vlan !== -1 &&
|
||||
_('keyValue', {
|
||||
key: _('pifVlanLabel'),
|
||||
value: vlan,
|
||||
})}
|
||||
)
|
||||
</span>
|
||||
)}
|
||||
</span>
|
||||
),
|
||||
// Tags.
|
||||
|
Loading…
Reference in New Issue
Block a user