Hi All,
I have managed to create a @whitelist script in my APP that will check for check_in timout in case of rooms booked… and cancel the reservation. Now my point goes to how can I send an ALERT to all users logged or to the DESK if the user is idle about the room that needs to be free or cleaning to be done?
Is there an event where I can add my code resulted from the task run on Schedule?
For example one room was booked for 2/3 hours and passed the time an ALERT should be shown to the user of the extra time … tried frappe.print and frappe.msgprint but they only send to the console not to the user like the ALERT.
@rmehta thanks for the tip … just one more question is how to use sockets … should I enable on the config or on the nginx?
Also when tried is said Global name ‘user’ is not defined!
Just tried and no message or alert is shown on the screen … I had added on user=frappe.session.user
now will this get all the users logged and send to them (would be great) ?
@rmehta sorry but the frappe.publish_realtime not working … I have added this to my py like this
frappe.publish_realtime(‘msgprint’, “QUARTO XXXX Cancelada por mais de XXX horas”, user=frappe.session.user)
Where to put this socket code? Please help us with this.
Use Case: We generally file tenders for projects, we created a custom doctype named Tender with all the necessary fields. For this we need popup alerting system which alerts the users 4-5 days before the tendering date.
For example: Tender last date is 15-01-2018 and we set alerts on 10-01-2018, which should be shown as a popup alert.