PageSourceSearch

https://sifrcrm.up.railway.app/assets/controllers/enrollment_label…20f4bd951ccdf1c044a1611b50b68ab35c5f5a5d.js

js sifrcrm.up.railway.app collected 2026-10-03 12:15:26 UTC 831 bytes, 27 lines download raw bytes

1import { Controller } from "@hotwired/stimulus"
2
3// MSJD-284: swaps Tickets/Enrollment copy on the event wizard when the
4// schedule-recurrence toggle changes. Targets carry data-one-time /
5// data-recurring text; the server renders the correct initial copy, so this
6// only reacts to live toggles (and to rows added after a toggle).
7export default class extends Controller {
8  static targets = ["label"]
9
10  update(event) {
11    this.recurring = Boolean(event.detail?.recurring)
12    this.apply()
13  }
14
15  // Re-applies the last known state to newly added variation rows.
16  refresh() {
17    this.apply()
18  }
19
20  apply() {
21    if (this.recurring === undefined) return
22    this.labelTargets.forEach((el) => {
23      const text = this.recurring ? el.dataset.recurring : el.dataset.oneTime
24      if (text) el.textContent = text
25    })
26  }
27};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.