Skip to content

Commit 98fc050

Browse files
formatting for timestamp in download name
1 parent cc86514 commit 98fc050

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/components/ModelNavigator/DataDictionary/utils.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,19 +291,19 @@ export function createFileName(fileName, filePreFix, modelVersion = undefined, i
291291
let suffix = '';
292292
if (useTimestamp === true) {
293293
// Explicitly configured to use timestamp
294-
suffix = `${todaysDate} ${hours}-${minutes}-${seconds}`;
294+
suffix = ` ${todaysDate} ${hours}-${minutes}-${seconds}`;
295295
} else if (useTimestamp === false) {
296296
// Explicitly configured to use modelVersion
297297
if (modelVersion) {
298298
suffix = `_${modelVersion}`;
299299
} else {
300300
// No modelVersion available, fallback to timestamp
301-
suffix = `${todaysDate} ${hours}-${minutes}-${seconds}`;
301+
suffix = ` ${todaysDate} ${hours}-${minutes}-${seconds}`;
302302
}
303303
} else {
304304
// useTimestamp is undefined - maintain original/backward-compatible behavior
305305
// Original behavior: use modelVersion if available, otherwise use timestamp
306-
suffix = modelVersion ? `_${modelVersion}` : `${todaysDate} ${hours}-${minutes}-${seconds}`;
306+
suffix = modelVersion ? `_${modelVersion}` : ` ${todaysDate} ${hours}-${minutes}-${seconds}`;
307307
}
308308

309309
if (isTemplate) {

src/stories/ModelNavigator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const pdfDownloadConfig = {
1818
landscape: 'true',
1919
footnote: 'test',
2020
enabled: false,
21-
useTimestampInFilename: '', // Set to true to test timestamp filenames, false for model version, or undefined for default behavior
21+
useTimestampInFilename: undefined, // Set to true to test timestamp filenames, false for model version, or undefined for default behavior
2222
};
2323

2424
const graphViewConfig = {

0 commit comments

Comments
 (0)