mirror of
https://github.com/Spythere/pojazdownik.git
synced 2026-05-03 05:18:10 +00:00
chore(file): selecting chosen storage stock name as file name when it's available
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user