PageSourceSearch

https://www.profitbookshq.com/assets/controllers/calculate_service…7a6c52129b1f4953c752d70bbc41be7e9ce5eb6a.js

js profitbookshq.com collected 2026-10-08 16:53:57 UTC 614 bytes, 1 lines download raw bytes

1import{Controller}from"@hotwired/stimulus";export default class extends Controller{static targets=["serviceProduct","availableQty"];connect(){}updateQuantities(){this.serviceProductTargets.forEach((t,e)=>{const r=t.getAttribute("data-product-id"),o=this.availableQtyTargets[e];fetch("quantity_for_product?product_id="+r,{method:"GET"}).then(t=>{if(!t.ok)throw new Error("Network response was not ok");return t.json()}).then(t=>{const e=t.quantity;o.innerHTML=e>0?`<i class="text-green mt-2"> Available Quantity: ${e} </i>`:'<i class="text-danger mt-2"> Stock Not Available. </i>'}).catch(t=>{console.error(t)})})}}

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.