Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

112
Views
Moving all notifications to "seen" status when clicking on the notification icon

Notification list is coming from the backend. On the homepage, there is a notification icon. I print notifications when I click this icon.

On the returned response; Seen information --> not seen if its value is 0, it will be seen if its value is 1.

I am trying to do; All notifications should be set as 'seen' when the notifications page is opened after pressing the notifications button on the main page.

service

const seen = (inAppNotificationRequestDto) => {
  return new Observable((observer) => {
    axiosInstance
      .put(SERVICE_PATH + '/markAsSeen', inAppNotificationRequestDto)
      .then((response) => {
        observer.next(response.data);
        observer.complete();
      })
      .catch((err) => {
        console.log(err);
      });
  });
};

home page

Notification icon is here. A popup will open listing the notifications you clicked on the icon.

const handleNotificationClick = (event) => {
  console.log(isIconDisabled);
  if (!isIconDisabled) {
    setAnchorEl(event.currentTarget);
  }
};

<div className="header__notification">
 {notificationData?.newNotification === true
   ? (
     <AS.Badge
       color="primary"
       variant="dot"
       onClick={handleNotificationClick}
     />
   )
   : null}
 <AS.NotificationsOutlinedIcon
   className="header__notification_icon"
   onClick={handleNotificationClick}
 />
 <NotificationList notification={notificationData} />
</div>
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!