Aggiunge filtri avanzati per i destinatari delle campagne email.
CI / scan_ruby (push) Failing after 18m40s
CI / scan_js (push) Successful in 11m46s
CI / lint (push) Failing after 13m8s

La scelta della lista passa da un wizard a tre passi, con anteprima del conteggio e lista congelata solo dopo la conferma.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-24 21:00:11 +02:00
co-authored by Cursor
parent 2db7504629
commit 1f946f63ba
19 changed files with 912 additions and 46 deletions
@@ -0,0 +1,34 @@
import { Controller } from "@hotwired/stimulus"
export default class extends Controller {
static targets = ["intent"]
refresh() {
this.persistOpenSections()
this.setIntent("preview")
this.element.requestSubmit()
}
apply() {
this.persistOpenSections()
this.setIntent("apply")
}
persistOpenSections() {
this.element.querySelectorAll("input[data-open-section]").forEach((input) => input.remove())
this.element.querySelectorAll("details[data-section]").forEach((details) => {
if (!details.open) return
const input = document.createElement("input")
input.type = "hidden"
input.name = "open_sections[]"
input.value = details.dataset.section
input.setAttribute("data-open-section", "")
this.element.appendChild(input)
})
}
setIntent(value) {
if (this.hasIntentTarget) this.intentTarget.value = value
}
}