feat(journey-editor): JourneyEditor frontend — issue #753 #792
@@ -149,7 +149,11 @@ async function handleMoveUp(index: number) {
|
||||
if (index === 0) return;
|
||||
const ids = items.map((i) => i.id);
|
||||
[ids[index - 1], ids[index]] = [ids[index], ids[index - 1]];
|
||||
liveAnnounce = m.journey_item_moved();
|
||||
liveAnnounce = m.journey_item_moved({
|
||||
position: index + 1,
|
||||
total: items.length,
|
||||
newPosition: index
|
||||
});
|
||||
await handleReorder(ids);
|
||||
}
|
||||
|
||||
@@ -157,7 +161,11 @@ async function handleMoveDown(index: number) {
|
||||
if (index === items.length - 1) return;
|
||||
const ids = items.map((i) => i.id);
|
||||
[ids[index], ids[index + 1]] = [ids[index + 1], ids[index]];
|
||||
liveAnnounce = m.journey_item_moved();
|
||||
liveAnnounce = m.journey_item_moved({
|
||||
position: index + 1,
|
||||
total: items.length,
|
||||
newPosition: index + 2
|
||||
});
|
||||
await handleReorder(ids);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user