const bankSelect = document.getElementById("bank-select");
const сalculatePayment = document.getElementById("сalculate-payment");
// add bankName in Select
async function getAllBanks() {
const snapshot = await firebase.firestore().collection("banks").get();
return snapshot.docs.map(
(doc) =>
(bankSelect.innerHTML += `
<option value="${doc.data().bankName}">${doc.data().bankName}</option>
`)
);
}
//count
сalculatePayment.addEventListener("click", (event) => {
event.preventDefault();
});
getAllBanks();
I store banks in a Firestore database. The bank is saved with fields, for example: numberOne, numberTwo, numberThree. I need, depending on the choice of the bank, when you click on the button, multiply the numbers that are recorded in the database for a particular bank. How can i do this?