Group income notifs by source title
This commit is contained in:
parent
86c256cbf7
commit
52d688885d
|
@ -179,15 +179,16 @@ function IncomeNotificationGroupItem(props: {
|
||||||
(n) => n.sourceType
|
(n) => n.sourceType
|
||||||
)
|
)
|
||||||
for (const sourceType in groupedNotificationsBySourceType) {
|
for (const sourceType in groupedNotificationsBySourceType) {
|
||||||
const groupedNotificationsByContractId = groupBy(
|
// Source title splits by contracts and groups
|
||||||
|
const groupedNotificationsBySourceTitle = groupBy(
|
||||||
groupedNotificationsBySourceType[sourceType],
|
groupedNotificationsBySourceType[sourceType],
|
||||||
(notification) => {
|
(notification) => {
|
||||||
return notification.sourceContractId
|
return notification.sourceTitle
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
for (const contractId in groupedNotificationsByContractId) {
|
for (const contractId in groupedNotificationsBySourceTitle) {
|
||||||
const notificationsForContractId =
|
const notificationsForContractId =
|
||||||
groupedNotificationsByContractId[contractId]
|
groupedNotificationsBySourceTitle[contractId]
|
||||||
if (notificationsForContractId.length === 1) {
|
if (notificationsForContractId.length === 1) {
|
||||||
newNotifications.push(notificationsForContractId[0])
|
newNotifications.push(notificationsForContractId[0])
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue
Block a user