Sha256: d35b7b591f26b17fe6d7ee6d23c301f31ca4be99782b8af71ce8434b7e209613

Contents?: true

Size: 725 Bytes

Versions: 12

Compression:

Stored size: 725 Bytes

Contents

import ApplicationController from "signum/controllers/application_controller"

export default class extends ApplicationController {
  static targets = []
  static values = {
    signalId: String,
    signalState: String,
  }

  connect() {
    const niE = new CustomEvent("nd-item-activity", {
      bubbles: true,
      detail: "added",
    })
    window.dispatchEvent(niE)
    if (this.signalStateValue == "broadcasted") {
      fetch("/signal/show", {
        method: "POST",
        headers: {
          "Content-Type": "application/json",
        },
        body: JSON.stringify({ id: this.signalIdValue }),
      })
        .then((res) => {})
        .catch((err) => {
          console.log(err)
        })
    }
  }
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
signum-0.7.4 app/components/signum/notification_drawer_item/component_controller.js
signum-0.7.2 app/components/signum/notification_drawer_item/component_controller.js
signum-0.7.1 app/components/signum/notification_drawer_item/component_controller.js
signum-0.7.0 app/components/signum/notification_drawer_item/component_controller.js
signum-0.6.0 app/components/signum/notification_drawer_item/component_controller.js
signum-0.5.1 app/components/signum/notification_drawer_item/component_controller.js
signum-0.5.0 app/components/signum/notification_drawer_item/component_controller.js
signum-0.4.13 app/components/signum/notification_drawer_item/component_controller.js
signum-0.4.12 app/components/signum/notification_drawer_item/component_controller.js
signum-0.4.11 app/components/signum/notification_drawer_item/component_controller.js
signum-0.4.10 app/components/signum/notification_drawer_item/component_controller.js
signum-0.4.8 app/components/signum/notification_drawer_item/component_controller.js