mirror of
https://github.com/Dispatcharr/Dispatcharr.git
synced 2026-08-02 23:02:37 +00:00
Add EPG source name before epg name in channel edit form.
This commit is contained in:
parent
43afbd4505
commit
0a8b8919b9
1 changed files with 13 additions and 3 deletions
|
|
@ -651,9 +651,19 @@ const ChannelForm = ({ channel = null, isOpen, onClose }) => {
|
|||
}
|
||||
readOnly
|
||||
value={
|
||||
formik.values.epg_data_id
|
||||
? tvgsById[formik.values.epg_data_id].name
|
||||
: 'Dummy'
|
||||
(() => {
|
||||
const tvg = tvgsById[formik.values.epg_data_id];
|
||||
const epgSource = tvg && epgs[tvg.epg_source];
|
||||
if (epgSource && formik.values.name) {
|
||||
return `${epgSource.name} - ${formik.values.name}`;
|
||||
} else if (epgSource) {
|
||||
return epgSource.name;
|
||||
} else if (formik.values.name) {
|
||||
return formik.values.name;
|
||||
} else {
|
||||
return 'Dummy';
|
||||
}
|
||||
})()
|
||||
}
|
||||
onClick={() => setEpgPopoverOpened(true)}
|
||||
size="xs"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue