Commit iniziale di eminuxCRM: CRM Rails con pipeline, campagne email e Docker.
Include autenticazione, progetti isolati, mail marketing HTML con SMTP, test A/B e editor WYSIWYG. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { Controller } from "@hotwired/stimulus"
|
||||
|
||||
export default class extends Controller {
|
||||
static targets = ["checkbox", "panel", "grid"]
|
||||
|
||||
connect() {
|
||||
this.sync()
|
||||
}
|
||||
|
||||
toggle() {
|
||||
this.sync()
|
||||
}
|
||||
|
||||
sync() {
|
||||
if (!this.hasCheckboxTarget) return
|
||||
|
||||
const on = this.checkboxTarget.checked
|
||||
this.panelTargets.forEach((el) => el.classList.toggle("hidden", !on))
|
||||
if (this.hasGridTarget) this.gridTarget.classList.toggle("lg:grid-cols-2", on)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user