% input = 'w-full px-4 py-3 bg-[#0a0a0a] border border-white/10 rounded-xl text-white placeholder-gray-600 focus:outline-none focus:border-[#f97316] focus:ring-1 focus:ring-[#f97316] transition-colors' menor = 'w-full px-3 py-2.5 bg-[#0a0a0a] border border-white/10 rounded-xl text-white text-sm focus:outline-none focus:border-[#f97316] focus:ring-1 focus:ring-[#f97316] transition-colors' rotulo = 'block text-sm font-medium text-gray-300 mb-1.5' secao = 'text-sm font-medium text-gray-300 mb-4' toggle = "w-11 h-6 bg-gray-700 peer-focus:outline-none rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-[#f97316]" %> <%= form_with model: [:admin, evento], url: (evento.persisted? ? admin_evento_path(evento) : admin_eventos_path), data: { turbo: false }, class: 'bg-[#1a1a1a] rounded-2xl border border-white/5 p-8 space-y-6' do |f| %> <% if evento.errors.any? %>
<%= pluralize(evento.errors.count, 'erro', 'erros') %> encontrado<%= evento.errors.count > 1 ? 's' : '' %>:
<%= icone :travado, cor: 'text-gray-500', tamanho: 'w-4 h-4', espaco: false %> <%= evento.gatilho_label %>
Evento de sistema: o gatilho e a chave são fixos porque o código dispara por eles.
<% else %> <%= f.select :gatilho, EventoNotificacao::GATILHOS.map { |g| [EventoNotificacao::GATILHO_LABEL[g], g] }, {}, class: "#{input} cursor-pointer" %> <% end %>Agendamento — só vale no gatilho "Agendado"
Quais grupos recebem
<% if @linhas_assinatura.blank? %>Nenhum grupo cadastrado ainda — <%= link_to 'crie um grupo', new_admin_grupo_path, data: { turbo: false }, class: 'text-[#f97316] hover:text-orange-400 underline' %> antes.
Ex.: o motorista dono do pagamento, além dos grupos. Só se aplica aos gatilhos de consolidação/pagamento/valor.
Evento inativo não dispara nada