PageSourceSearch

https://cravefestival.app/assets/ManagePrintBatches-CB-7VaC5.js

js cravefestival.app collected 2026-10-02 16:00:01 UTC 5,127 bytes, 1 lines download raw bytes

1import{a$ as V,eW as k,b0 as B,b9 as g,ba as N,bb as o,bc as a,cf as Q,bg as m,bh as U,bf as P,ci as Y,cj as M,bk as q,dP as T,be as _,bd as H,bm as E,bn as l,d7 as D,bs as S,dH as R,cb as A,bq as x,co as F,b4 as $,b7 as G,bl as L,bi as j,bo as O}from"./index-CFHz-eb3.js";import{Q as W}from"./QTable-DkYHlQ7_.js";import{Q as z}from"./QPage-BZFI5xAP.js";import{I as J}from"./InternalPageHeader--NXIAWUD.js";import{Q as K}from"./QInnerLoading-DbxEAOQ5.js";import{C as X}from"./ClosePopup-CW5Qgyt_.js";import{G as Z}from"./GBID-EVIxXbDt.js";import"./QList-Doq4ymz0.js";import"./QMarkupTable-DVmA-nqe.js";import"./QSelect-C-hwOXXL.js";import"./QField-tvCM3ORS.js";import"./QChip-BsOJbGyr.js";import"./QItemLabel-BlQoXLXa.js";import"./QMenu-Dic1H9aS.js";import"./selection-DfU4l___.js";import"./rtl-BgSf51W-.js";import"./format-3GJbRjMt.js";import"./QLinearProgress-CdKlS1X0.js";import"./use-fullscreen-BXvNcZRy.js";try{let n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new n.Error().stack;d&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[d]="694f98a2-002b-4242-ad51-ea0267642d2b",n._sentryDebugIdIdentifier="sentry-dbid-694f98a2-002b-4242-ad51-ea0267642d2b")}catch{}const ee={class:"text-subtitle1"},te=V({__name:"ManagePrintBatch",props:{printBatchId:{default:null}},emits:["close","refreshTable","update:printBatchId"],setup(n,{emit:d}){const c=k(),s=n,u=d,p=l(!0),r=l(!0),f=l(null),h=l(""),b=l(1e3),y=(e=null)=>{e?f.value=D.cloneDeep(c.printBatch(e)):s.printBatchId&&(f.value=D.cloneDeep(c.printBatch(s.printBatchId)))},w=()=>{f.value&&(h.value=f.value.id,b.value=f.value.number)},C=async()=>{if(s.printBatchId)try{r.value=!0;const e=await c.exportPrintBatch(s.printBatchId),i=e.users.map(I=>({id:I.id,code:I.qrCode,qrCode:`${I.id}~${I.qrCode}`}));i.unshift({id:"ID",code:"Code",qrCode:"QR Code"});const v=S.formatUnix(e.printBatch.created,"YYYY-MM-DD-HH-mm-ss");await R.downloadCSV(`print-batch-${e.printBatch.id}-${e.printBatch.number}-${v}.csv`,"Print Batch",i,["id","code","qrCode"]),r.value=!1}catch(e){A.error("ManagePrintBatch","Failed to export print batch",{error:e}),x(e)}},t=async()=>{try{r.value=!0;const e=await c.createPrintBatch(Number(b.value));u("update:printBatchId",e),y(e),w(),F.create({message:"Print Batch Created",color:"primary"}),r.value=!1,u("refreshTable")}catch(e){r.value=!1,await x(e)}};return s.printBatchId&&y(),w(),r.value=!1,(e,i)=>(B(),g(N,{persistent:"",modelValue:p.value,"onUpdate:modelValue":i[1]||(i[1]=v=>p.value=v),onHide:i[2]||(i[2]=v=>u("close"))},{default:o(()=>[a(E,{class:"manage-print-batch"},{default:o(()=>[a(Q,{class:"header-with-id"},{default:o(()=>[m("div",ee,U(n.printBatchId?"Update":"Create")+" Print Batch ",1),h.value?(B(),g(Z,{key:0,id:h.value},null,8,["id"])):P("",!0)]),_:1}),a(Q,{class:"content-body"},{default:o(()=>[a(Y,{ref:"form"},{default:o(()=>[a(M,{dense:"",modelValue:b.value,"onUpdate:modelValue":i[0]||(i[0]=v=>b.value=v),label:"Number of QR Codes",type:"number",placeholder:"Name",readonly:n.printBatchId!==null},null,8,["modelValue","readonly"])]),_:1},512)]),_:1}),a(q),a(T,{class:"footer",align:"between"},{default:o(()=>[m("div",null,[n.printBatchId!==null?(B(),g(_,{key:0,onClick:C,flat:"",color:"grey",rounded:"",label:"Export"})):P("",!0)]),m("div",null,[H(a(_,{flat:"",color:"negative",rounded:"",label:"Close"},null,512),[[X]]),n.printBatchId===null?(B(),g(_,{key:0,onClick:t,flat:"",color:"primary",rounded:"",label:"Create"})):P("",!0)])]),_:1}),a(K,{showing:r.value},null,8,["showing"])]),_:1})]),_:1},8,["modelValue"]))}}),ae=$(te,[["__scopeId","data-v-7ae2d38c"]]),ne={class:"row"},re={class:"row"},oe={class:"col-12"},le={class:"pane"},se=V({__name:"ManagePrintBatches",setup(n){const d=k(),c=l({page:1,rowsPerPage:0}),s=l(!0),u=l(""),p=l(!1),r=l(null),f=[{name:"number",field:"number",label:"Number of QR Codes"},{name:"created",field:"created",label:"Created",format:(C,t)=>S.formatUnix(t.created,"MM/DD/YYYY h:mm A")}],h=O(()=>d.printBatches),b=async()=>{await d.fetchPrintBatches(),s.value=!1},y=(C,t)=>{r.value=t.id,p.value=!0},w=()=>{r.value=null,p.value=!0};return G(async()=>{h.value.length&&(s.value=!1),await b()}),(C,t)=>(B(),g(z,{class:"gb-internal-page"},{default:o(()=>[m("div",ne,[a(J,{title:"Manage Print Batches"})]),m("div",re,[m("div",oe,[m("div",le,[a(W,{"binary-state-sort":"",rows:h.value,columns:f,"hide-pagination":!0,pagination:c.value,"onUpdate:pagination":t[1]||(t[1]=e=>c.value=e),loading:s.value,filter:u.value,onRowClick:y},{"top-right":o(()=>[a(M,{borderless:"",dense:"",modelValue:u.value,"onUpdate:modelValue":t[0]||(t[0]=e=>u.value=e),placeholder:"Search"},{append:o(()=>[a(L,{name:"search"})]),_:1},8,["modelValue"]),a(_,{flat:"",icon:"add",onClick:w},{default:o(()=>[...t[4]||(t[4]=[j("Add Print Batch",-1)])]),_:1})]),_:1},8,["rows","pagination","loading","filter"])])])]),p.value?(B(),g(ae,{key:0,"print-batch-id":r.value,"onUpdate:printBatchId":t[2]||(t[2]=e=>r.value=e),onClose:t[3]||(t[3]=e=>p.value=!1)},null,8,["print-batch-id"])):P("",!0)]),_:1}))}}),De=$(se,[["__scopeId","data-v-8f27af63"]]);export{De as default};

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.