Remove loyalty info since nobody's ever cashed it in anyways

master
Skylar Ittner 1 year ago
parent f5d9bef01a
commit 78f4c4992f

@ -101,11 +101,9 @@ function verifyCode(code) {
} }
function displayAccountInfo() { function displayAccountInfo() {
$("#loyaltyBalanceBox").addClass("display-none");
$("#loyaltyErrorMessage").html("");
if (inStorage("accountkey") && inStorage("accountnumber")) { if (inStorage("accountkey") && inStorage("accountnumber")) {
} else { } else {
$("#loyaltyErrorMessage").text("Error: No account connected."); $("#accountErrorMessage").text("Error: No account connected.");
return; return;
} }
apirequest(SETTINGS.apis.getaccountinfo, { apirequest(SETTINGS.apis.getaccountinfo, {
@ -115,8 +113,6 @@ function displayAccountInfo() {
$("#hasaccountbox").css("display", ""); $("#hasaccountbox").css("display", "");
$("#loadingaccountbox").css("display", "none"); $("#loadingaccountbox").css("display", "none");
if (success.status == "OK") { if (success.status == "OK") {
$("#loyaltyCreditBalanceHeading").text(success.credits + " points");
$("#loyaltyBalanceBox").removeClass("display-none")
$("#accountnumberspan").text(success.accountnumber); $("#accountnumberspan").text(success.accountnumber);
if (success.payments_setup === false) { if (success.payments_setup === false) {
@ -131,11 +127,10 @@ function displayAccountInfo() {
$("#accountupdateform input#streetaddress").val(success.streetaddress); $("#accountupdateform input#streetaddress").val(success.streetaddress);
$("#accountupdateform input#zipcode").val(success.zipcode); $("#accountupdateform input#zipcode").val(success.zipcode);
} else { } else {
$("#loyaltyBalanceBox").addClass("display-none"); $("#accountErrorMessage").text("Error: " + success.msg);
$("#loyaltyErrorMessage").text("Error: " + success.msg);
} }
}, function (xhr, status, error) { }, function (xhr, status, error) {
$("#loyaltyErrorMessage").text("Error: Couldn't get your account info. Try again later."); $("#accountErrorMessage").text("Error: Couldn't get your account info. Try again later.");
sendErrorReport("Account", "Couldn't display account info", "Server/network problem: " + xhr.status + ": " + xhr.statusText); sendErrorReport("Account", "Couldn't display account info", "Server/network problem: " + xhr.status + ": " + xhr.statusText);
}, "GET"); }, "GET");
} }

@ -40,11 +40,6 @@
Your Account Number: Your Account Number:
<h2><span id="accountnumberspan">Loading...</span></h2> <h2><span id="accountnumberspan">Loading...</span></h2>
</div> </div>
<div id="loyaltyBalanceBox" class="card-content-padding">
<div>You have earned a total of</div>
<h2 id="loyaltyCreditBalanceHeading">...</h2>
<img id="loyaltyBarcodeImg" style="width: 90%; max-width: 300px; padding: 1.2em; background: white; display: none;" />
</div>
<div class="row"> <div class="row">
<div class="col-100 medium-50"> <div class="col-100 medium-50">
<div class="block padding-half"> <div class="block padding-half">
@ -57,12 +52,7 @@
</div> </div>
</div> </div>
</div> </div>
<div id="loyaltyErrorMessage"></div> <div id="accountErrorMessage"></div>
<div class="block margin-top">
Loyalty points have no cash value. All points and associated discounts
are offered as a courtesy by and at the discretion of Helena Express
and may be revoked, canceled, or modified at any time for any reason.
</div>
</div> </div>

Loading…
Cancel
Save