Commit e675d9df authored by Richard Blechinger's avatar Richard Blechinger
Browse files

Show notification when saving playlist

parent 9f9acc7b
...@@ -525,7 +525,12 @@ ...@@ -525,7 +525,12 @@
if (this.playlistEditor.mode === 'add') { if (this.playlistEditor.mode === 'add') {
this.$store.dispatch('playlists/add', { this.$store.dispatch('playlists/add', {
slug: this.selectedShow.slug, slug: this.selectedShow.slug,
playlist: playlist playlist: playlist,
callback: () => {
this.$root.$emit('bv::refresh::table', 'playlistsTable');
this.$router.push('/files');
this.$toast.success(this.$t('playlistEditor.saved'))
}
}) })
} else if (this.playlistEditor.mode === 'edit') { } else if (this.playlistEditor.mode === 'edit') {
this.$store.dispatch('playlists/update', { this.$store.dispatch('playlists/update', {
...@@ -535,6 +540,7 @@ ...@@ -535,6 +540,7 @@
callback: () => { callback: () => {
this.$root.$emit('bv::refresh::table', 'playlistsTable'); this.$root.$emit('bv::refresh::table', 'playlistsTable');
this.$router.push('/files'); this.$router.push('/files');
this.$toast.success(this.$t('playlistEditor.saved'))
} }
}) })
} }
......
...@@ -36,7 +36,7 @@ class="tw-w-full tw-text-center" ...@@ -36,7 +36,7 @@ class="tw-w-full tw-text-center"
methods: { methods: {
redirectToHome(user) { redirectToHome(user) {
if (!user.is_superuser) { if (!user.is_superuser) {
this.$toast.error(this.$t('auth.permissionError'), {position: 'bottom-left'}) this.$toast.error(this.$t('auth.permissionError'))
this.$router.push({name: 'home'}) this.$router.push({name: 'home'})
} }
} }
......
...@@ -134,9 +134,9 @@ ...@@ -134,9 +134,9 @@
// conflict resolution // conflict resolution
let now = this.apiDate(new Date()) let now = this.apiDate(new Date())
if (this.valuePick.dstart < now) { if (this.valuePick.dstart < now) {
this.valuePick.dstart = now // this.valuePick.dstart = now
this.pastEventWarning = true // this.pastEventWarning = true
return //return
} else { } else {
this.pastEventWarning = false this.pastEventWarning = false
} }
...@@ -213,8 +213,8 @@ ...@@ -213,8 +213,8 @@
let until = end.format('YYYY-MM-DD') let until = end.format('YYYY-MM-DD')
let now = this.apiDate(new Date()) let now = this.apiDate(new Date())
if (dstart < now) { if (dstart < now) {
dstart = now // dstart = now
this.pastEventWarning = true // this.pastEventWarning = true
} else { } else {
this.pastEventWarning = false this.pastEventWarning = false
} }
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
hover hover
outlined outlined
:fields="notesTableArrayFields" :fields="notesTableArrayFields"
:items="notesTableArray.reverse()" :items="notesTableArray"
> >
<template v-slot:cell(thumbnail)="data"> <template v-slot:cell(thumbnail)="data">
<div <div
...@@ -243,6 +243,7 @@ ...@@ -243,6 +243,7 @@
// in the table with our timeslots, we use this computed array to do that // in the table with our timeslots, we use this computed array to do that
notesTableArray: function () { notesTableArray: function () {
let rows = []; let rows = [];
for (const timeslot of this.timeslots) { for (const timeslot of this.timeslots) {
let note = this.getNoteByTimeslotID(timeslot.id) let note = this.getNoteByTimeslotID(timeslot.id)
......
...@@ -46,6 +46,10 @@ export default { ...@@ -46,6 +46,10 @@ export default {
'goToFiles': "Zu 'Dateien & Playlists' gehen" 'goToFiles': "Zu 'Dateien & Playlists' gehen"
}, },
'playlistEditor': {
'saved': 'Die Playlist wurde gespeichert'
},
// Etc // Etc
'rrule': { 'rrule': {
'day': { 'day': {
......
...@@ -46,6 +46,10 @@ export default { ...@@ -46,6 +46,10 @@ export default {
'goToFiles': "Go to 'Files & Playlists'" 'goToFiles': "Go to 'Files & Playlists'"
}, },
'playlistEditor': {
'saved': 'The playlist has been saved'
},
// Etc // Etc
'rrule': { 'rrule': {
'day': { 'day': {
......
...@@ -27,7 +27,9 @@ Vue.use(VueLogger, { ...@@ -27,7 +27,9 @@ Vue.use(VueLogger, {
Vue.use(BootstrapVue) Vue.use(BootstrapVue)
Vue.use(Translation) Vue.use(Translation)
Vue.use(VueToast) Vue.use(VueToast, {
position: "bottom-left"
})
Vue.config.productionTip = false Vue.config.productionTip = false
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment