* Add #purchase to Credit * Assigns spent credits to the listing * Add Credits::Ledger and use it * Localize ledger datetimes * Add organization to the ledger * Add tests for ledger * Remove unused class * Fix scope error * Compare UTC times * Fix broken specs * Wrap listing create in a transaction * Wrap listings bump into a transaction * Avoid microseconds issue with datetimes in tests * Use .detect instead of .select.first * Fix spec description
13 lines
305 B
JavaScript
13 lines
305 B
JavaScript
/* global localizeTimeElements */
|
|
function initializeCreditsPage() {
|
|
const datetimes = document.querySelectorAll('.ledger time');
|
|
|
|
localizeTimeElements(datetimes, {
|
|
year: 'numeric',
|
|
month: 'short',
|
|
day: '2-digit',
|
|
hour: '2-digit',
|
|
minute: '2-digit',
|
|
second: '2-digit',
|
|
});
|
|
}
|