Skip to content

Commit 423b66b

Browse files
committed
ALCS-2029 Logic fix
1 parent d0d7391 commit 423b66b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

alcs-frontend/src/app/features/application/decision/decision-v2/decision-input/decision-conditions/decision-condition-order-dialog/decision-condition-order-dialog.component.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,14 @@ export class DecisionConditionOrderDialogComponent implements OnInit {
112112
if (item.order < currentIndex && item.order >= targetIndex) {
113113
item.order++;
114114
}
115-
}
116-
else if (item.order > currentIndex) {
117-
if (item.order <= targetIndex && item.order <= targetIndex) {
115+
} else if (item.order > currentIndex) {
116+
if (item.order <= targetIndex) {
118117
item.order--;
119118
}
120119
}
121120
});
122121
this.conditionsToOrder[currentIndex].order = targetIndex;
122+
console.log(currentIndex, targetIndex, this.conditionsToOrder.sort((a,b) => a.order - b.order).map(x => `order: ${x.order} desc: ${x.description}`));
123123
this.dataSource.data = this.conditionsToOrder.sort((a,b) => a.order - b.order);
124124
}
125125

0 commit comments

Comments
 (0)