chore(file): selecting chosen storage stock name as file name when it's available

This commit is contained in:
2026-03-29 14:55:23 +02:00
parent be4d99d1c7
commit 03f496ab08
+5 -3
View File
@@ -6,11 +6,13 @@ export const useFileUtils = () => {
function getCurrentStockFileName() { function getCurrentStockFileName() {
let fileName = ''; let fileName = '';
if (store.chosenStorageStockName.trim() != '') {
return store.chosenStorageStockName;
}
const currentStockString = store.stockList.map((s) => s.vehicleRef.type).join(';'); const currentStockString = store.stockList.map((s) => s.vehicleRef.type).join(';');
const currentRealComp = store.realCompositionList.find( const currentRealComp = store.realCompositionList.find((rc) => rc.stockString == currentStockString);
(rc) => rc.stockString == currentStockString
);
// Append real composition to the name if chosen // Append real composition to the name if chosen
if (currentRealComp != undefined) { if (currentRealComp != undefined) {