Sha256: eaedffad4f9b59c5d8dd0d5a17b96cddd0fa7c15c566b143425e69383e3ce2ca

Contents?: true

Size: 840 Bytes

Versions: 30

Compression:

Stored size: 840 Bytes

Contents

import { Controller } from "stimulus"
const $ = window.$

export default class extends Controller {
  static targets = ["container","radio"]

  connect() {
    window.initDatepickersIn(".hd-drug-administration")
  }

  toggleAdministered() {
    var checked = event.target.value == "true"
    this.containerTarget.classList.toggle("administered", checked)
    this.containerTarget.classList.toggle("not-administered", !checked)
    this.containerTarget.classList.remove("undecided")
    // The rest of this actions are using jQuery for now.
    $(".authentication", this.containerTarget).toggle(checked)
    $(".authentication", this.containerTarget).toggleClass("disabled-with-faded-overlay", !checked)
    $(".reason-why-not-administered", this.containerTarget).toggle(!checked)
    $("#btn_save_and_witness_later").toggle(checked)
  }
}

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.1.0 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.167 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.166 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.165 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.164 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.163 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.162 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.161 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.160 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.159 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.158 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.157 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.156 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.155 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.153 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.152 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.151 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.149 app/javascript/renalware/controllers/hd/prescription_administration_controller.js
renalware-core-2.0.148 app/javascript/renalware/controllers/hd/prescription_administration_controller.js