Skip to content

Commit

Permalink
Merge pull request #158 from Resgrid/develop
Browse files Browse the repository at this point in the history
CU-868a5nz1n trying to fix pricing page.
  • Loading branch information
ucswift authored Oct 11, 2024
2 parents 22a7312 + 0d02f7a commit 85bf4d3
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 5 deletions.
3 changes: 1 addition & 2 deletions Core/Resgrid.Config/SystemBehaviorConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ public static class SystemBehaviorConfig
/// </summary>
public static HashSet<int> BypassDoNotBroadcastDepartments = new HashSet<int>()
{
1,
// 2104
1
};

/// <summary>
Expand Down
34 changes: 31 additions & 3 deletions Web/Resgrid.WebCore/Areas/User/Views/Subscription/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@
border-bottom: 1px dashed #ccc;
background: #999;
}
input[type="number"] {
width: 80px !important;
font-weight: 200;
font-size: 21px;
}
</style>
}

Expand Down Expand Up @@ -325,7 +331,7 @@
<div class="price-form">
<div class="form-group">
<div class="col-sm-12 text-center">
<p class="price lead" id="amount-label">10</p> <span>Entities</span>
<input id="amount-input" type="number" pattern="[0-9]" min="10" max="2000" step="10" value="10" /> <span>Entities</span>
</div>
</div>
<div class="form-group">
Expand Down Expand Up @@ -543,10 +549,31 @@
}
});
$("#amount-input").bind('change mouseup', function () {
let inputAmount = $("#amount-input").val();
if (inputAmount < 10) {
$("#slider").slider('value', 10);
update(1, 10);
} else if (inputAmount > 2000) {
$("#slider").slider('value', 2000);
update(1, 2000);
} else if (inputAmount % 10 != 0) {
let newAmount = Math.ceil(parseInt(inputAmount) / 10) * 10;
$("#amount-input").val(newAmount);
$("#slider").slider('value', newAmount);
update(1, newAmount);
} else {
$("#slider").slider('value', inputAmount);
update(1, inputAmount);
}
});
//Added, set initial value.
$("#amount").val(10);
//$("#duration").val(0);
$("#amount-label").text(0);
//$("#amount-label").text(0);
$("#amount-input").val(0);
$("#monthly-label").text(0);
$("#yearly-label").text(0);
Expand Down Expand Up @@ -574,7 +601,8 @@
//$total = "$" + ($amount * $duration);
$("#amount").val($amount);
$("#amount-label").text($amount);
//$("#amount-label").text($amount);
$("#amount-input").val($amount);
const totalCostMonthly = calculateCostFromUsers($amount, true);
const totalCostYearly = calculateCostFromUsers($amount, false);
Expand Down

0 comments on commit 85bf4d3

Please sign in to comment.