(channel, field)
| 119 | |
| 120 | // "Provider: <value>" subtext for auto-synced channels (null for manual). |
| 121 | export const getProviderHint = (channel, field) => { |
| 122 | if (!channel?.auto_created) return null; |
| 123 | const providerValue = channel[field]; |
| 124 | const display = |
| 125 | providerValue === null || |
| 126 | providerValue === undefined || |
| 127 | providerValue === '' |
| 128 | ? '(empty)' |
| 129 | : providerValue; |
| 130 | return `Provider: ${display}`; |
| 131 | }; |
| 132 | |
| 133 | // FK provider hint that resolves the ID to a display name via lookup. |
| 134 | export const getFkProviderHint = (channel, field, lookup) => { |
no outgoing calls
no test coverage detected