| ☰ |
{{ formatDisplayTime(item.startTime) }} |
@@ -1478,6 +1478,7 @@ export default {
initializeSortable() {
const el = this.$refs.sortableList;
Sortable.create(el, {
+ draggable: '.plan-sortable-row',
handle: ".drag-handle",
onEnd: this.onDragEnd,
});
@@ -2242,6 +2243,9 @@ export default {
},
async onDragEnd(evt) {
const movedItem = this.trainingPlan[evt.oldIndex];
+ if (!movedItem) {
+ return;
+ }
try {
await apiClient.put(`/diary-date-activities/${this.currentClub}/${movedItem.id}/order`, {
orderId: evt.newIndex
|