From 03f496ab08ca28f4b68df739d8260289645abc5c Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 29 Mar 2026 14:55:23 +0200 Subject: [PATCH] chore(file): selecting chosen storage stock name as file name when it's available --- src/utils/fileUtils.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/utils/fileUtils.ts b/src/utils/fileUtils.ts index 122b37a..ff149bd 100644 --- a/src/utils/fileUtils.ts +++ b/src/utils/fileUtils.ts @@ -6,11 +6,13 @@ export const useFileUtils = () => { function getCurrentStockFileName() { let fileName = ''; + if (store.chosenStorageStockName.trim() != '') { + return store.chosenStorageStockName; + } + const currentStockString = store.stockList.map((s) => s.vehicleRef.type).join(';'); - const currentRealComp = store.realCompositionList.find( - (rc) => rc.stockString == currentStockString - ); + const currentRealComp = store.realCompositionList.find((rc) => rc.stockString == currentStockString); // Append real composition to the name if chosen if (currentRealComp != undefined) {