Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard
Commits
e9eefc93
Commit
e9eefc93
authored
Jun 11, 2020
by
jackie / Andrea Ida Malkah Klaura
Browse files
use show selector component in show manager to fix
#28
parent
a290e85d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/components/ShowManager.vue
View file @
e9eefc93
<
template
>
<b-container>
<!--
The show picker including the modal to add new shows should also be
refactored into an own component, so we can reuse it in the file and
emission managers
-->
<addShowModal
ref=
"addShowModal"
/>
<b-row>
<b-col>
<h3>
Sendungen verwalten
</h3>
</b-col>
<b-col
align=
"right"
>
<b-button
v-if=
"$parent.user.steeringUser.is_superuser"
v-b-popover.hover.top=
"'Add a new show'"
variant=
"info"
@
click=
"$refs.addShowModal.openModal()"
>
+
</b-button>
<b-dropdown
id=
"ddshows"
text=
"Sendereihe auswählen"
variant=
"outline-info"
>
<b-dropdown-item
v-for=
"(show, index) in shows"
:key=
"show.id"
@
click=
"switchShow(index)"
>
{{
show
.
name
}}
</b-dropdown-item>
</b-dropdown>
</b-col>
</b-row>
<show-selector
ref=
"showSelector"
title=
"Radio shows"
:callback=
"showHasSwitched"
/>
<hr>
<!-- The jumbotron is used to display the name and description of the
...
...
@@ -79,20 +48,20 @@ import showMetaSimpleTypes from './shows/MetaSimpleTypes.vue'
import
showMetaArrays
from
'
./shows/MetaArrays.vue
'
import
showMetaOwners
from
'
./shows/MetaOwners.vue
'
import
showMetaImages
from
'
./shows/MetaImages.vue
'
import
modalAddShow
from
'
./
s
how
s/AddShowModal
.vue
'
import
showSelector
from
'
./
S
how
Selector
.vue
'
import
{
mapGetters
}
from
'
vuex
'
export
default
{
// all modals to edit a show and its timeslots/notes, are importet as separate
// components, to make it a tiny lickle bit less messy here
components
:
{
'
addShowModal
'
:
modalAddShow
,
'
show-jumbotron
'
:
showJumbotron
,
'
show-timeslots
'
:
showTimeslots
,
'
show-metaArrays
'
:
showMetaArrays
,
'
show-metaSimpleTypes
'
:
showMetaSimpleTypes
,
'
show-metaOwners
'
:
showMetaOwners
,
'
show-metaImages
'
:
showMetaImages
,
'
show-selector
'
:
showSelector
,
},
data
()
{
...
...
@@ -124,6 +93,7 @@ export default {
this
.
$store
.
dispatch
(
'
shows/fetchShows
'
,
{
callback
:
()
=>
{
this
.
$store
.
dispatch
(
'
playlists/fetch
'
,
{
slug
:
this
.
selectedShow
.
slug
})
this
.
$refs
.
showSelector
.
updateInputSelector
()
}
})
this
.
$store
.
dispatch
(
'
shows/fetchMetaArray
'
,
{
property
:
'
types
'
,
onlyActive
:
true
})
...
...
@@ -137,8 +107,7 @@ export default {
},
methods
:
{
switchShow
:
function
(
index
)
{
this
.
$store
.
commit
(
'
shows/switchShow
'
,
index
)
showHasSwitched
()
{
this
.
$refs
.
timeslotsComponent
.
showHasSwitched
()
},
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment