Commit 9810fcb8 authored by snamdeo's avatar snamdeo

commiting after making small ui changes

parent 1c1ab177
Pipeline #2312 failed with stage
in 1 second
......@@ -79,6 +79,10 @@ export default function Basket(props) {
<div
className="row"
onClick={() => {
document.getElementById("hiddenSpan").style.display =
"inline-block";
document.getElementById("cancelButtonId").style.display =
"inline-block";
axios
.post("http://localhost:9090/api/v1/addOrderDetails", cartDetails)
.then((response) => {
......@@ -86,8 +90,6 @@ export default function Basket(props) {
// alert("post is successfull");
}
});
document.getElementById("hiddenSpan").style.display =
"inline-block";
}}
>
<StripeCheckout
......@@ -103,10 +105,11 @@ export default function Basket(props) {
</span>
</div>
<br />
<button className = "disabled"onClick={() => {
<button id = "cancelButtonId" onClick={() => {
let newValetAmt = (parseInt(localStorage.getItem("valetAmount")) + itemsPrice)
localStorage.setItem("valetAmount",newValetAmt)
console.log("New Valet Amount", newValetAmt);
document.getElementById("hiddenSpan").style.display =
"none";
const newValetAmount = {
newValetAmt:newValetAmt
}
......@@ -117,7 +120,12 @@ export default function Basket(props) {
// alert("post is successfull");
}
});
document.getElementById("hiddenSpanForCancel").style.display =
"inline-block";
}}>Cancel Order</button>
<span id="hiddenSpanForCancel">
Order is cancelled and the amount of Rs. {itemsPrice} is successfully added in your valet
</span>
</>
)}
</div>
......
......@@ -88,4 +88,14 @@ button.remove{
display: none;
color: darkgreen;
font-weight: bold;
}
#hiddenSpanForCancel{
display: none;
color: red;
font-weight: bold;
}
#cancelButtonId{
display: none;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment