3030 processed_payment_details = "" ;
3131 for ( let i = 0 ; i < xhr . response [ "payments" ] . length ; i ++ ) {
3232 payment = xhr . response [ "payments" ] [ i ] ;
33+ payment_created = payment [ "date_created" ] . slice ( 0 , 4 ) + "-" + payment [ "date_created" ] . slice ( 4 , 6 ) + "-" + payment [ "date_created" ] . slice ( 6 , 8 ) + " " + payment [ "date_created" ] . slice ( 8 , 10 ) + ":" + payment [ "date_created" ] . slice ( 10 , 12 ) + ":" + payment [ "date_created" ] . slice ( 12 )
3334 if ( "processed" in payment ) {
34- processed_payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment [ "username" ] } ">${ payment [ "username" ] } </a></th><th scope="row">${ payment [ "amount" ] } </th><th scope="row">${ payment [ "title" ] } </th><th scope="row"><a href="${ payment [ "processed" ] [ "order" ] } ">${ payment [ "details" ] } </a></th></tr>` ;
35+ processed_payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment [ "username" ] } ">${ payment [ "username" ] } </a></th><th scope="row">${ payment [ "amount" ] } </th><th scope="row">${ payment [ "title" ] } </th><th scope="row"><a href="${ payment [ "processed" ] [ "order" ] } ">${ payment [ "details" ] } </a></th><th scope="row"> ${ payment_created } </th>< /tr>` ;
3536 } else {
36- payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment [ "username" ] } ">${ payment [ "username" ] } </a></th><th scope="row">${ payment [ "amount" ] } </th><th scope="row">${ payment [ "title" ] } </th><th scope="row">${ payment [ "details" ] } </th></tr>` ;
37+ payment_details += `<tr><th scope="row"><a href="details.html?author=${ payment [ "username" ] } ">${ payment [ "username" ] } </a></th><th scope="row">${ payment [ "amount" ] } </th><th scope="row">${ payment [ "title" ] } </th><th scope="row">${ payment [ "details" ] } </th><th scope="row"> ${ payment_created } </th>< /tr>` ;
3738 }
3839 }
3940 document . getElementById ( "outstanding_payments_body" ) . innerHTML += payment_details ;
@@ -158,6 +159,7 @@ <h3>Finances</h3>
158159 < th scope ="col "> Amount</ th >
159160 < th scope ="col "> Title</ th >
160161 < th scope ="col "> Details</ th >
162+ < th scope ="col "> Date Created</ th >
161163 </ tr >
162164 </ thead >
163165 < tbody id ="outstanding_payments_body ">
@@ -182,6 +184,7 @@ <h3>Finances</h3>
182184 < th scope ="col "> Amount</ th >
183185 < th scope ="col "> Title</ th >
184186 < th scope ="col "> Details</ th >
187+ < th scope ="col "> Date Created</ th >
185188 </ tr >
186189 </ thead >
187190 < tbody id ="processed_payments_body ">
0 commit comments