diff --git a/src/components/tabs/stock-list/StockActions.vue b/src/components/tabs/stock-list/StockActions.vue
index 604e0e5..f08fb03 100644
--- a/src/components/tabs/stock-list/StockActions.vue
+++ b/src/components/tabs/stock-list/StockActions.vue
@@ -67,6 +67,16 @@
>
+
+
@@ -201,6 +211,22 @@ export default defineComponent({
}
},
+ turnAroundCars() {
+ if (this.store.stockList.length <= 1) return;
+
+ const isFirstTractionUnit = isTractionUnit(this.store.stockList[0].vehicleRef);
+
+ const sliceToSwap = isFirstTractionUnit
+ ? this.store.stockList.slice(1)
+ : this.store.stockList.slice();
+
+ sliceToSwap.reverse();
+
+ if (isFirstTractionUnit) sliceToSwap.unshift(this.store.stockList[0]);
+
+ this.store.stockList = sliceToSwap;
+ },
+
downloadStock() {
if (this.store.stockList.length == 0) return alert(this.$t('stocklist.alert-empty'));
diff --git a/src/locales/en.json b/src/locales/en.json
index d06c222..d640eb1 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -68,6 +68,7 @@
"action-copy": "COPY TO CLIPBOARD",
"action-reset": "RESET",
"action-shuffle": "SHUFFLE",
+ "action-switch": "TURN AROUND",
"action-bookmark": "BOOKMARK",
"mass": "Mass",
"mass-accepted": "accepted",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index d0ec67f..7ed3657 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -68,6 +68,7 @@
"action-copy": "SKOPIUJ DO SCHOWKA",
"action-reset": "ZRESETUJ",
"action-shuffle": "PRZETASUJ",
+ "action-switch": "ODWRÓĆ",
"action-bookmark": "ZAPISZ",
"mass": "Masa",
"mass-accepted": "dopuszczalna",