feat: Add 'Day Usage' column to user table
This commit is contained in:
@ -83,6 +83,7 @@
|
||||
<th>Traffic Usage</th>
|
||||
<th class="text-nowrap">Expiry Date</th>
|
||||
<th class="text-nowrap">Expiry Days</th>
|
||||
<th class="text-nowrap">Day Usage</th>
|
||||
<th>Enable</th>
|
||||
<th class="text-nowrap requires-iplimit-service" style="display: none;">Unlimited IP</th>
|
||||
<th class="text-nowrap">Configs</th>
|
||||
@ -116,6 +117,7 @@
|
||||
<td>{{ user.traffic_used }}</td>
|
||||
<td>{{ user.expiry_date }}</td>
|
||||
<td>{{ user.expiry_days }}</td>
|
||||
<td>{{ user.day_usage }}</td>
|
||||
<td>
|
||||
{% if user.enable %}
|
||||
<i class="fas fa-check-circle text-success"></i>
|
||||
@ -381,8 +383,8 @@
|
||||
switch (filter) {
|
||||
case "on-hold": showRow = $(this).find("td:eq(2) i").hasClass("text-warning"); break;
|
||||
case "online": showRow = $(this).find("td:eq(2) i").hasClass("text-success"); break;
|
||||
case "enable": showRow = $(this).find("td:eq(7) i").hasClass("text-success"); break;
|
||||
case "disable": showRow = $(this).find("td:eq(7) i").hasClass("text-danger"); break;
|
||||
case "enable": showRow = $(this).find("td:eq(8) i").hasClass("text-success"); break;
|
||||
case "disable": showRow = $(this).find("td:eq(8) i").hasClass("text-danger"); break;
|
||||
default: showRow = true;
|
||||
}
|
||||
$(this).toggle(showRow).find(".user-checkbox").prop("checked", false);
|
||||
@ -463,7 +465,7 @@
|
||||
$("#editUsername").val(user);
|
||||
$("#editTrafficLimit").val(parseFloat(trafficText.split('/')[1]) || 0);
|
||||
$("#editExpirationDays").val(parseInt(expiryText) || 0);
|
||||
$("#editBlocked").prop("checked", !row.find("td:eq(7) i").hasClass("text-success"));
|
||||
$("#editBlocked").prop("checked", !row.find("td:eq(8) i").hasClass("text-success"));
|
||||
$("#editUnlimitedIp").prop("checked", row.find(".unlimited-ip-cell i").hasClass("text-primary"));
|
||||
validateUsername('#editUsername', '#editUsernameError');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user