sweetify
sweetify copied to clipboard
Show datas (like table data) on dialogbox and count each data then save it to database
Hi Guys, I want show alert with datas (like table data) in dialogbox alert, I have try with this code
@alerts = Rails.cache.read('safety_alerts').where(profile_id: @organization.profiles.pluck(:id)).unread.order('created_at DESC').group_by(&:profile) @alerts.each do |profile, alert| sweetalert_error(+ profile.full_name + " - " + alert.last.alert_msg + "!", 'Need Attenion!', persistent: 'OK!') end
but only one data show on dialogbox ? And i wan to count each data appear and save it to database, when button click Thanks
Hey @zaychoer,
sweetify is more or less for informational one-time messages only. There is currently no (prebuilt) way to handle clicks or even show multiple alerts at once.
I'm happy to accept a PR, if you find a good solution for this in sweetify.