Skip to content

Commit 11ffaf7

Browse files
committed
Inform user when invoking long running mass actions
1 parent ba09cb3 commit 11ffaf7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

vueapp/components/Schedule/ScheduleList.vue

+7-2
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,9 @@
8686
{{ opt.text }}
8787
</option>
8888
</select>
89-
<StudipButton icon="accept" @click.prevent="performBulkAction">
90-
<span>{{ $gettext('Übernehmen') }}</span>
89+
<StudipButton icon="accept" @click.prevent="performBulkAction"
90+
:disabled="bulkActionRunning">
91+
<span>{{ bulkActionRunning ? $gettext('Bitte warten...') : $gettext('Übernehmen') }}</span>
9192
</StudipButton>
9293
<StudipButton icon="cancel" @click.prevent="resetBulk">
9394
<span>{{ $gettext('Abbrechen') }}</span>
@@ -128,6 +129,7 @@ export default {
128129
bulkRefs: [],
129130
bulkAction: '',
130131
refreshTimeout: null,
132+
bulkActionRunning: false
131133
}
132134
},
133135
@@ -178,12 +180,15 @@ export default {
178180
action: this.bulkAction,
179181
termin_ids: termin_ids,
180182
};
183+
184+
this.bulkActionRunning = true;
181185
this.$store.dispatch('bulkScheduling', params).then(({ data }) => {
182186
this.$store.dispatch('clearMessages');
183187
if (data?.message) {
184188
this.addMesssage(data.message.type, data.message.text, true);
185189
}
186190
this.$store.dispatch('getScheduleList');
191+
this.bulkActionRunning = false;
187192
});
188193
189194
},

0 commit comments

Comments
 (0)