From fbb2d6303373210230ebd60f20e12e6c8fdc023d Mon Sep 17 00:00:00 2001 From: yznahmad Date: Sat, 21 Jun 2025 05:10:37 +0300 Subject: [PATCH] Add 30 n123456789 --- .../components/dashboard/home/generalLook.tsx | 176 ++++++++++-------- 1 file changed, 101 insertions(+), 75 deletions(-) diff --git a/webapp/src/components/dashboard/home/generalLook.tsx b/webapp/src/components/dashboard/home/generalLook.tsx index 7869f56..ed519cd 100644 --- a/webapp/src/components/dashboard/home/generalLook.tsx +++ b/webapp/src/components/dashboard/home/generalLook.tsx @@ -7,90 +7,116 @@ export default function GeneralLook() const t = useTranslations('statistics'); const report = useAppSelector((state) => state.statisticsReducer.value.report) - if (!report) { - return ( -
-
-
-
-
- ); - } - - const stats = [ - { - icon: 'members', - value: report?.membersCount?.value ?? 0, - label: t('totalMembers'), - bgColor: 'bg-info' - }, - { - icon: 'activeMembers', - value: report?.activeMembersCount?.value ?? 0, - label: t('totalActiveMembers'), - bgColor: 'bg-success' - }, - { - icon: 'disActiveMembers', - value: report?.disActiveMembersCount?.value ?? 0, - label: t('totalUnActiveMembers'), - bgColor: 'bg-error' - }, - { - icon: 'services', - value: report?.servicesCount?.value ?? 0, - label: t('totalServices'), - bgColor: 'bg-info' - }, - { - icon: 'activeServices', - value: report?.activeServicesCount?.value ?? 0, - label: t('totalActiveServices'), - bgColor: 'bg-success' - }, - { - icon: 'disActiveServices', - value: report?.disActiveServicesCount?.value ?? 0, - label: t('totalUnActiveServices'), - bgColor: 'bg-error' - }, - { - icon: 'activeSubscriptions', - value: report?.activeSubscriptionsCount?.value ?? 0, - label: t('totalActiveSubscriptions'), - bgColor: 'bg-info' - }, - { - icon: 'expiredSoonSubscriptions', - value: report?.expiredSoonSubscriptionsCount?.value ?? 0, - label: t('expiredSoonSubscriptionsCount'), - bgColor: 'bg-warning' - }, - { - icon: 'expiredSubscriptions', - value: report?.expiredSubscriptionsCount?.value ?? 0, - label: t('totalExpiredSubscriptions'), - bgColor: 'bg-error' - } - ]; - return ( -
- {stats.map((stat, index) => ( -
+ <> +
+
- + -

{stat.value}

-

{stat.label}

+

{report?.membersCount.value}

+

{t('totalMembers')}

+
+
+
+ + + + + + +

{report?.activeMembersCount.value}

+

{t('totalActiveMembers')}

+
+
+
+ + + + + + +

{report?.disActiveMembersCount.value}

+

{t('totalUnActiveMembers')}

- ))} -
+
+
+ + + + + + +

{report?.servicesCount.value}

+

{t('totalServices')}

+
+
+
+ + + + + + +

{report?.activeServicesCount.value}

+

{t('totalActiveServices')}

+
+
+
+ + + + + + +

{report?.disActiveServicesCount.value}

+

{t('totalUnActiveServices')}

+
+
+
+
+
+ + + + + + +

{report?.activeSubscriptionsCount.value}

+

{t('totalActiveSubscriptions')}

+
+
+
+ + + + + + + +

{report?.expiredSoonSubscriptionsCount.value}

+

{t('expiredSoonSubscriptionsCount')}

+
+
+
+ + + + + + +

{report?.expiredSubscriptionsCount.value}

+

{t('totalExpiredSubscriptions')}

+
+
+
+
+ ) } \ No newline at end of file