diff --git a/assets/javascripts/application.js b/assets/javascripts/application.js index 809c0dd..11ce176 100644 --- a/assets/javascripts/application.js +++ b/assets/javascripts/application.js @@ -24,7 +24,15 @@ function getSelectedInvoiceIds() { // Display the result (for demonstration) console.log(JSON.stringify(selectedIds)); + + let invoice_link = ''; + let link = ''; + for (const value of selectedIds) { + link = `${value}%0A` + console.log(link); + invoice_link += link; + } // You can return the array or use it as needed - return selectedIds; + return invoice_link; }