wip
This commit is contained in:
41
resources/js/vendor/nova/js/additional.js
vendored
41
resources/js/vendor/nova/js/additional.js
vendored
@@ -27,33 +27,34 @@ async function fetchCardHistory(passport_serie, passport_id, card_number, card_e
|
||||
})
|
||||
.then(response => response.json())
|
||||
.then(result => {
|
||||
console.log({result: result})
|
||||
if (result.errCode != 0) {
|
||||
Nova.error('Barlap bolmady, tor näsazlygy')
|
||||
}
|
||||
|
||||
cardHistoryDetailContainer.innerHTML = `
|
||||
<h4 class="mb-4">Şahamça: <strong>${result.depName}, </strong></h4>
|
||||
// cardHistoryDetailContainer.innerHTML = `
|
||||
// <h4 class="mb-4">Şahamça: <strong>${result.depName}, </strong></h4>
|
||||
|
||||
<p>
|
||||
<ul>
|
||||
${Array.from(result.transactions).map(transaction => {
|
||||
return `<li style="background: #a3c1f5;color: black;" class="p-3 relative rounded-lg">
|
||||
<strong>${transaction['actionName']}</strong> <strong>${transaction['opersum']}</strong> <strong>${transaction['currency']}</strong>
|
||||
// <p>
|
||||
// <ul>
|
||||
// ${Array.from(result.transactions).map(transaction => {
|
||||
// return `<li style="background: #a3c1f5;color: black;" class="p-3 relative rounded-lg">
|
||||
// <strong>${transaction['actionName']}</strong> <strong>${transaction['opersum']}</strong> <strong>${transaction['currency']}</strong>
|
||||
|
||||
<strong style="top: 0; right: 0;" class="absolute p-2">${transaction['opername']}</strong>
|
||||
// <strong style="top: 0; right: 0;" class="absolute p-2">${transaction['opername']}</strong>
|
||||
|
||||
<p><strong>${
|
||||
new Date(transaction['trandate']).toLocaleDateString('en-GB', {
|
||||
year: 'numeric',
|
||||
month: '2-digit',
|
||||
day: '2-digit',
|
||||
}).replaceAll('/', '.')
|
||||
}</strong></p>
|
||||
</li>`;
|
||||
})}
|
||||
</ul>
|
||||
</p>
|
||||
`;
|
||||
// <p><strong>${
|
||||
// new Date(transaction['trandate']).toLocaleDateString('en-GB', {
|
||||
// year: 'numeric',
|
||||
// month: '2-digit',
|
||||
// day: '2-digit',
|
||||
// }).replaceAll('/', '.')
|
||||
// }</strong></p>
|
||||
// </li>`;
|
||||
// })}
|
||||
// </ul>
|
||||
// </p>
|
||||
// `;
|
||||
})
|
||||
.catch(error => console.log('error', error));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user