Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

119
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda