remove crypto position
This commit is contained in:
parent
9636670336
commit
32c0ea4d98
@ -2936,7 +2936,6 @@ function removeStockPorftolio() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// update stock portfolio position with new values
|
// update stock portfolio position with new values
|
||||||
function updateStockPorftolio() {
|
function updateStockPorftolio() {
|
||||||
|
|
||||||
@ -2969,6 +2968,38 @@ function updateStockPorftolio() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// remove crypto portfolio position
|
||||||
|
function removeCryptoPorftolio() {
|
||||||
|
|
||||||
|
let remove_crypto_symbol = document.getElementById('inputText4').value;
|
||||||
|
|
||||||
|
if (remove_crypto_symbol !== '') {
|
||||||
|
document.getElementById('cryptoshares').value = '';
|
||||||
|
document.getElementById('cryptocost').value = '';
|
||||||
|
document.getElementById('cryptodate').value = '';
|
||||||
|
|
||||||
|
fetch("/deletePortfolioPositionCrypto", {
|
||||||
|
method: "POST",
|
||||||
|
body: JSON.stringify(remove_crypto_symbol),
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById('cryptoremoved-p').innerHTML = 'Crypto Position Removed!';
|
||||||
|
document.getElementById('removed-crypto-p').style.display = "block";
|
||||||
|
setTimeout(function hideElement() {
|
||||||
|
document.getElementById('removed-crypto-p').style.display = "none";
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
|
||||||
|
else {
|
||||||
|
document.getElementById('cryptoremoved-p').innerHTML = 'No symbol selected.';
|
||||||
|
document.getElementById('removed-crypto-p').style.display = "block";
|
||||||
|
setTimeout(function hideElement() {
|
||||||
|
document.getElementById('removed-crypto-p').style.display = "none";
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// update crypto portfolio position with new values
|
// update crypto portfolio position with new values
|
||||||
function updateCryptoPorftolio() {
|
function updateCryptoPorftolio() {
|
||||||
|
Loading…
Reference in New Issue
Block a user