|
@@ -20,14 +20,14 @@ export const Users = async (req, res) => {
|
|
|
let allUsers = await User.findAll();
|
|
|
allUsers.forEach((account) => {
|
|
|
|
|
|
- let active = '<span class="badge badge-outline text-green">Active</span>'
|
|
|
+ let active = '<span class="badge badge-outline text-green" title="User has logged-in within the last 30 days.">Active</span>'
|
|
|
let lastLogin = new Date(account.lastLogin);
|
|
|
let currentDate = new Date();
|
|
|
let days = Math.floor((currentDate - lastLogin) / (1000 * 60 * 60 * 24));
|
|
|
let avatar = account.username.charAt(0);
|
|
|
|
|
|
if (days > 30) {
|
|
|
- active = '<span class="badge badge-outline text-grey">Inactive</span>';
|
|
|
+ active = '<span class="badge badge-outline text-grey" title="User has not logged-in within the last 30 days.">Inactive</span>';
|
|
|
}
|
|
|
|
|
|
|