|
@@ -240,6 +240,21 @@ export default {
|
|
|
},
|
|
|
res => {
|
|
|
new Toast({ content: res.message, timeout: 4000 });
|
|
|
+ if (res.status !== "success") {
|
|
|
+ if (this.sector === "station") {
|
|
|
+ this.repositionSongInListStation({
|
|
|
+ ...moved.element,
|
|
|
+ newIndex: moved.oldIndex,
|
|
|
+ oldIndex: moved.newIndex
|
|
|
+ });
|
|
|
+ } else if (this.sector === "manageStation") {
|
|
|
+ this.repositionSongInListManageStation({
|
|
|
+ ...moved.element,
|
|
|
+ newIndex: moved.oldIndex,
|
|
|
+ oldIndex: moved.newIndex
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
);
|
|
|
},
|
|
@@ -261,6 +276,12 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ ...mapActions("modals/manageStation", {
|
|
|
+ repositionSongInListManageStation: "repositionSongInList"
|
|
|
+ }),
|
|
|
+ ...mapActions("station", {
|
|
|
+ repositionSongInListStation: "repositionSongInList"
|
|
|
+ }),
|
|
|
...mapActions("modalVisibility", ["openModal"]),
|
|
|
...mapActions({
|
|
|
showManageStationTab: "modals/manageStation/showTab"
|