mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
@@ -17,14 +17,12 @@ exports.getUsersDashboard = async (req, res) => {
|
||||
const [
|
||||
totalUsers,
|
||||
activeUsers,
|
||||
verifiedUsers,
|
||||
archivedUsers,
|
||||
accTypeBreakdown,
|
||||
regTypeBreakdown,
|
||||
] = await Promise.all([
|
||||
mdl_Users.count({ paranoid: false }),
|
||||
mdl_Users.count({ where: { is_active: true } }),
|
||||
mdl_Users.count({ where: { is_verified: true } }),
|
||||
mdl_Users.count({ where: { deletedAt: { [Op.ne]: null } }, paranoid: false }),
|
||||
mdl_Users.findAll({
|
||||
attributes: ['acc_type', [fn('COUNT', col('user_id')), 'count']],
|
||||
@@ -46,8 +44,6 @@ exports.getUsersDashboard = async (req, res) => {
|
||||
{ key: 'total', label: 'Total Users', value: totalUsers },
|
||||
{ key: 'active', label: 'Active Users', value: activeUsers },
|
||||
{ key: 'inactive', label: 'Inactive Users', value: totalUsers - archivedUsers - activeUsers },
|
||||
{ key: 'verified', label: 'Verified', value: verifiedUsers },
|
||||
{ key: 'archived', label: 'Archived', value: archivedUsers },
|
||||
],
|
||||
breakdowns: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user