diff --git a/src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx b/src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx index 78f1a023f3..113d8abe34 100644 --- a/src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx +++ b/src/apps/dashboard/dashboard-notification-list/dashboard-notification-list.tsx @@ -55,6 +55,11 @@ const DashboardNotificationList: FC = ({ soonOverdue: loansSoonOverduePhysical, farFromOverdue: loansFarFromOverduePhysical, isLoading: isLoadingLoansPhysical + }, + publizon: { + soonOverdue: loansSoonOverdueDigital, + farFromOverdue: loansFarFromOverdueDigital, + isLoading: isLoadingLoansDigital } } = useLoans(); @@ -120,12 +125,16 @@ const DashboardNotificationList: FC = ({ break; case soon: - setLoansToDisplay(loansSoonOverduePhysical); + setLoansToDisplay( + loansSoonOverduePhysical.concat(loansSoonOverdueDigital) + ); setModalHeader(t("loansSoonOverdueText")); break; case longer: - setLoansToDisplay(loansFarFromOverduePhysical); + setLoansToDisplay( + loansFarFromOverduePhysical.concat(loansFarFromOverdueDigital) + ); setModalHeader(t("loansNotOverdueText")); break; @@ -140,6 +149,8 @@ const DashboardNotificationList: FC = ({ loansFarFromOverduePhysical, loansOverduePhysical, loansSoonOverduePhysical, + loansSoonOverdueDigital, + loansFarFromOverdueDigital, t ] ); @@ -158,7 +169,8 @@ const DashboardNotificationList: FC = ({ : openDueDateModal(yesterday) }, { - listLength: loansSoonOverduePhysical.length, + listLength: + loansSoonOverduePhysical.length + loansSoonOverdueDigital.length, badge: t("statusBadgeWarningText"), header: t("loansSoonOverdueText"), color: "warning", @@ -170,7 +182,8 @@ const DashboardNotificationList: FC = ({ : openDueDateModal(soon) }, { - listLength: loansFarFromOverduePhysical.length, + listLength: + loansFarFromOverduePhysical.length + loansFarFromOverdueDigital.length, header: t("loansNotOverdueText"), dataCy: "loans-not-overdue", color: "neutral", @@ -218,7 +231,11 @@ const DashboardNotificationList: FC = ({ materialsCount={loans.length} header={t("physicalLoansText")} emptyListText={t("noPhysicalLoansText")} - isLoading={isLoadingLoans || isLoadingLoansPhysical} + isLoading={ + isLoadingLoans || + isLoadingLoansPhysical || + isLoadingLoansDigital + } linkText={t("dashboardLoansLinkText")} linkUrl={physicalLoansUrl} /> @@ -242,7 +259,10 @@ const DashboardNotificationList: FC = ({ ...dashboardNotificationsReservations ]} isLoading={ - isLoadingLoans || isLoadingLoansPhysical || isLoadingReservations + isLoadingLoans || + isLoadingLoansPhysical || + isLoadingLoansDigital || + isLoadingReservations } /> )}