sweetify icon indicating copy to clipboard operation
sweetify copied to clipboard

Show datas (like table data) on dialogbox and count each data then save it to database

Open zaychoer opened this issue 6 years ago • 1 comments

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

zaychoer avatar May 22 '19 04:05 zaychoer

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.

Atrox avatar May 22 '19 10:05 Atrox