mirror of
https://gitlab.com/wgp/dougal/software.git
synced 2025-12-06 13:07:08 +00:00
Avoid conflict when decrementing sequence numbers
This commit is contained in:
@@ -395,8 +395,11 @@ export default {
|
||||
},
|
||||
|
||||
async shiftSequences(delta) {
|
||||
// We go backwards so as to avoid conflicts.
|
||||
for (const line of [...this.items].reverse()) {
|
||||
const lines = delta < 0
|
||||
? this.items
|
||||
: [...this.items].reverse(); // We go backwards so as to avoid conflicts.
|
||||
|
||||
for (const line of lines) {
|
||||
const sequence = line.sequence+delta;
|
||||
const url = `/project/${this.$route.params.project}/plan/${line.sequence}`;
|
||||
const init = {
|
||||
|
||||
Reference in New Issue
Block a user