Trigger dialog/modal from backend in backoffice

Hello,

I have some backend code which is run during a publish. In a specific case it will hit a CancelOperation. Currently the Cancel operation is setup like the following;

e.CancelOperation(new EventMessage("title", "Message", messageType: EventMessageType.Error));

This works as expected and a little red notification will appear at the bottom. However I was wondering if I could actually turn this into a dialog/modal instead?

For example when this specific case occurs the user will get a notification like the following;

From my understanding, I can easily create a dialog (or utilise existing ones) using angular. I just don’t know how to; trigger the dialog and feed through the message when this cancel operation is triggered.

Is this possible to do?

Thank you


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/110894-trigger-dialogmodal-from-backend-in-backoffice