Skip to content

Commit

Permalink
Merge branch 'prod' of github.com:StarOne01/foodSuggester into prod
Browse files Browse the repository at this point in the history
  • Loading branch information
StarOne01 committed May 29, 2024
2 parents 45dd9f4 + fcf2014 commit cdc67a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 16 deletions.
13 changes: 0 additions & 13 deletions assets/js/firebase.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,6 @@ pdfMake.createPdf(DataDef)
console.log('Uploaded PDF blob to Firebase Storage!');
getDownloadURL(snapshot.ref).then(async(downloadURL) => {
console.log('File available at', downloadURL);


function encodeUrl(url) {
// Encode special characters using encodeURIComponent
const encodedUrl = encodeURIComponent(url);
// Replace specific characters with their escaped versions for consistency
return encodedUrl.replace(/\//g, '%2F')
.replace(/\?/g, '%3F')
.replace(/&/g, '%26')
.replace(/=/g, '%3D');
}

var raw = downloadURL;
var myHeaders = new Headers();
Expand All @@ -66,8 +55,6 @@ pdfMake.createPdf(DataDef)
});
});
};
link.href = "https://wa.me/91"+PhNo+"?text="+ ((((downloadURL).split(':').join('%3A')).split('/',).join('%2F')).split('?').join('%3F')).split('&').join('%26');

});
}
// Initialize the blob and name variables
Expand Down
6 changes: 3 additions & 3 deletions assets/js/printPdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,9 @@ function printPdf(e, i) {
},
};



let nameO = `${nameval}-${PhNo}/` ;
let d = new Date()
let dateDb = [ d.getDate(),d.getMonth(),d.getFullYear(),d.getHours(),d.getHours(),d.getMinutes()]
let nameO = `${nameval}-${PhNo}//${nameval}-${PhNo}_${dateDb[0]}-${dateDb[1]}-${dateDb[2]}_${dateDb[3]}-${dateDb[4]}` ;
if(i === 0 || i===2) {
DataDef.content.push(foodTable);
nameO += "-Diet"
Expand Down

0 comments on commit cdc67a2

Please sign in to comment.