@visns-studio/visns-components 4.8.13 → 4.8.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
76
76
|
},
|
|
77
77
|
"name": "@visns-studio/visns-components",
|
|
78
|
-
"version": "4.8.
|
|
78
|
+
"version": "4.8.15",
|
|
79
79
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
80
80
|
"main": "src/index.js",
|
|
81
81
|
"files": [
|
|
@@ -5,6 +5,7 @@ import { Outlet } from 'react-router-dom';
|
|
|
5
5
|
import { toast } from 'react-toastify';
|
|
6
6
|
import { saveAs } from 'file-saver';
|
|
7
7
|
import _ from 'lodash';
|
|
8
|
+
import moment from 'moment';
|
|
8
9
|
|
|
9
10
|
import CustomFetch from '../Fetch';
|
|
10
11
|
import Download from '../Download';
|
|
@@ -223,7 +224,7 @@ function GenericIndex({
|
|
|
223
224
|
e.preventDefault();
|
|
224
225
|
}
|
|
225
226
|
|
|
226
|
-
|
|
227
|
+
const date = moment().format('YYYYMMDD');
|
|
227
228
|
|
|
228
229
|
const res = await Download(
|
|
229
230
|
config.export.url,
|
|
@@ -236,7 +237,7 @@ function GenericIndex({
|
|
|
236
237
|
} else {
|
|
237
238
|
// Assuming the response contains a Blob or similar data
|
|
238
239
|
if (res.data && res.data instanceof Blob) {
|
|
239
|
-
const fileName = `${config.export.filename}`;
|
|
240
|
+
const fileName = `${date}_${config.export.filename}`;
|
|
240
241
|
saveAs(res.data, fileName);
|
|
241
242
|
} else {
|
|
242
243
|
// Handle the case where the response is not a Blob
|