Pop-Up Notification?

When ever a Issue is created i want to receive a pop up notification . If i am in another doctype when the customer creates an issue through portal I want to receive a pop-up notification .

Maybe possible but you have to develop/customize the notification, or set the popup notification how the notification comes on the notification (bell).

1 Like

I am receiving a system notification when a client creates an issue but I cant understand how to grab that notification bell icon so that when it receives something I can create a pop up against that .

you can use the HELP-DESK it will give you pop-up notification + email alert too.

1 Like

@NCP
i am able to get a alert but the system notification is only seen when i am refreshing the page.
thats why its not triggering the alert. I am doing this on my local machine. the system notificaion should come in realtime whenever a issue is created right? it only shows up after i have refreshed

// my_custom_app/public/js/custom_notifications.js
frappe.provide("frappe.search");
frappe.provide("frappe.ui");

(function() {
	
    // Ensure the original class is loaded
    frappe.ui.Notifications = class CustomNotifications extends frappe.ui.Notifications {
        constructor() {
            super();
            this.setup_custom_events();
        }

        setup_custom_events() {
            frappe.realtime.on("notification", () => {
                this.on_new_notification();
            });

            this.dropdown.on("show.bs.dropdown", () => {
                this.on_dropdown_show();
            });

            this.dropdown.on("hide.bs.dropdown", () => {
                this.on_dropdown_hide();
            });
        }

        on_new_notification() {
            console.log("New notification received!");
			frappe.show_alert("received?")
            // Custom logic for new notifications
            // For example, you can call update_dropdown() method or show a message
            this.update_dropdown();
        }

        on_dropdown_show() {
            console.log("Dropdown is shownssssssssssssssss");
			frappe.show_alert("down?")
            // Custom logic when dropdown is shown
        }

        on_dropdown_hide() {
            console.log("Dropdown is hidden");
            // Custom logic when dropdown is hidden
        }
    }
})();

@rs115199789 thanks man. will give it a go.

Your welcome
i tried and it’s far better then that , do and let me know :slight_smile:

1 Like

@rs115199789 yes man will let you know .

@rik_sanchez you can use real time publish , if you are logged in you will get a pop up notification . write this code when a client creates an issue :
frappe.publish_realtime(event='msgprint',message="Bob just created an issue...",user="Administrator")

4 Likes

i wanted something like this. but the problem is i wanted some specific role to receive this notification that’s why i wanted to trigger the event when a user receives the notification . But the system notification bell only shows the notification sent after i refresh the web page

@rik_sanchez you can achieve this using server script . just get the list of users with specific role then send this realtime notification.

2 Likes

@bahaou thanks man i got it. I really appreciate the help