Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Core/Resgrid.Config/SystemBehaviorConfig.cs
Original file line numberDiff line numberDiff 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 numberDiff line numberDiff 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 DownExpand 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 DownExpand 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 DownExpand 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