This commit is contained in:
2024-10-18 20:42:14 +05:00
parent 55d12712e6
commit 87e8c10776

View File

@@ -106,15 +106,9 @@ async function fetchCardHistory(passport_serie, passport_id, card_number, card_e
return; return;
} }
cardHistoryDetailContainer.innerHTML = ` let insideTemplate = ``;
<h4>Müşderi: <strong>${result.clientName}</strong></h4> Array.from(result.transactions).map(transaction => {
<h4>Şahamça: <strong>${result.depName}</strong></h4> insideTemplate += `<li style="background: #a3c1f5;color: black;" class="p-3 relative rounded-lg">
<h4 class="mb-4">Şertnama belgisi: <strong>${result.cardAccountNumber}</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> <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>
@@ -126,10 +120,15 @@ async function fetchCardHistory(passport_serie, passport_id, card_number, card_e
day: '2-digit', day: '2-digit',
}).replaceAll('/', '.') }).replaceAll('/', '.')
}</strong></p> }</strong></p>
</li>`; </li>`
}) '<br />'} })
</ul>
</p> cardHistoryDetailContainer.innerHTML = `
<h4>Müşderi: <strong>${result.clientName}</strong></h4>
<h4>Şahamça: <strong>${result.depName}</strong></h4>
<h4 class="mb-4">Şertnama belgisi: <strong>${result.cardAccountNumber}</strong></h4>
<p><ul>${insideTemplate}</ul></p>
`; `;
}) })
.catch(error => console.log('error', error)) .catch(error => console.log('error', error))