Sha256: 67d9af8493132f9afc8d00ae82cba31d645e734bee2949194a29258078ed9aab

Contents?: true

Size: 380 Bytes

Versions: 45

Compression:

Stored size: 380 Bytes

Contents

import { Controller } from '@hotwired/stimulus'
import URI from 'urijs'

export default class extends Controller {
  static targets = ['cards']

  updateCards(event) {
    this.cardsTargets.forEach((frame) => {
      // Add date param to the existing frame.src
      frame.src = new URI(frame.src).setQuery('global_range[date]', event.target.dataset.days).toString()
    })
  }
}

Version data entries

45 entries across 45 versions & 1 rubygems

Version Path
avo-3.15.1 app/javascript/js/controllers/card_filters_controller.js
avo-3.15.0 app/javascript/js/controllers/card_filters_controller.js
avo-3.14.5 app/javascript/js/controllers/card_filters_controller.js
avo-3.14.4 app/javascript/js/controllers/card_filters_controller.js
avo-3.14.3 app/javascript/js/controllers/card_filters_controller.js
avo-3.14.2 app/javascript/js/controllers/card_filters_controller.js
avo-3.14.1 app/javascript/js/controllers/card_filters_controller.js
avo-3.14.0 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.7 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.6 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.5 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.4 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.3 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.2 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.1 app/javascript/js/controllers/card_filters_controller.js
avo-3.13.0 app/javascript/js/controllers/card_filters_controller.js
avo-3.12.0 app/javascript/js/controllers/card_filters_controller.js
avo-3.11.10 app/javascript/js/controllers/card_filters_controller.js
avo-3.11.9 app/javascript/js/controllers/card_filters_controller.js
avo-3.11.8 app/javascript/js/controllers/card_filters_controller.js