PageSourceSearch

https://mitiendapos.com.ar/assets/controllers/floor_tabs_controller-bdb01e90.js

js mitiendapos.com.ar collected 2026-09-24 14:34:54 UTC 1,085 bytes, 27 lines download raw bytes

1// Pestañas de pisos en la pantalla del mozo (vista floor). Recuerda en el
2// dispositivo el último piso que estaba mirando: al abrir /venue/floor sin
3// ?layout_id, redirige al piso guardado (si sigue activo). Cada navegación a
4// una pestaña re-guarda el id. Persistencia por club en localStorage.
5import { Controller } from "@hotwired/stimulus"
6
7export default class extends Controller {
8  static values = {
9    club: Number,
10    current: Number,
11    explicit: Boolean, // true si la URL ya traía ?layout_id (no redirigir)
12    valid: Array,      // ids de pisos activos (no redirigir a uno archivado)
13    urlTemplate: String // path con "LAYOUT_ID" placeholder
14  }
15
16  connect() {
17    const key = `floorLayout:${this.clubValue}`
18    if (!this.explicitValue) {
19      const saved = parseInt(localStorage.getItem(key) || "", 10)
20      if (saved && saved !== this.currentValue && this.validValue.includes(saved)) {
21        window.location.replace(this.urlTemplateValue.replace("LAYOUT_ID", saved))
22        return
23      }
24    }
25    localStorage.setItem(key, this.currentValue)
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.