Skip to content

Commit

Permalink
Merge pull request #780 from CBIIT/ICDC-3187
Browse files Browse the repository at this point in the history
  • Loading branch information
iksheth authored Jul 26, 2023
2 parents d5f8a11 + 17efe35 commit 10cb528
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/components/ReadMeDialog/ReadMe.component.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export const downloadMarkdownPdf = async (title, content) => {
readMeContent.innerHTML += titleEl;
readMeContent.innerHTML += marked(content);

/** set pdf fileneam */
const fileName = createFileName('read_me', 'ICDC_Data_Model-');
/** set pdf fileneame */
const fileName = createFileName('ICDC-MY-FILES-CART-README', 'pdf');
/** configure pdf increase pixel of the PDF */
const options = {
margin: [0.85, 0.75, 1, 0.75],
Expand Down Expand Up @@ -80,7 +80,7 @@ export const downloadMarkdownPdf = async (title, content) => {
pdf.setFontSize(8);
pdf.setTextColor(0);
pdf.text(pgWidth - 1.75, pgHeight - 0.5, `${date} | ${i}`);
pdf.text(pgWidth - 7.75, pgHeight - 0.5, 'CANINECOMMONS.CANCER.GOV/#/ICDC-DATA-MODEL');
pdf.text(pgWidth - 7.75, pgHeight - 0.5, 'CANINECOMMONS.CANCER.GOV/#/FileCentricCart');
pdf.addImage(footerLine, 'JPEG', pgWidth - 7.75, pgHeight - 0.75, 7, 0.05);
// if (i === 1) {
// pdf.addImage(nihLogo, 'JPEG', pgWidth - 7.75, pgHeight - 10.75, 4, 0.5);
Expand Down
4 changes: 2 additions & 2 deletions src/pages/fileCentricCart/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function createFileName(fileName) {
export function createFileName(fileName, format = 'csv') {
const date = new Date();
const yyyy = date.getFullYear();
let dd = date.getDate();
Expand All @@ -20,7 +20,7 @@ export function createFileName(fileName) {

if (seconds < 10) { seconds = `0${seconds}`; }

return `${fileName} ${todaysDate} ${hours}-${minutes}-${seconds}${'.csv'}`;
return `${fileName} ${todaysDate} ${hours}-${minutes}-${seconds}.${format}`;
}

export function convertToCSV(jsonse, comments, keysToInclude, header) {
Expand Down

0 comments on commit 10cb528

Please sign in to comment.