PageSourceSearch

https://saltstraumen.info/dist/all/chunks/1708-3ca80e8495f47a828381.js

js saltstraumen.info collected 2026-09-25 07:12:25 UTC 4,412 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkwips_components_scripts||=[]).push([[1708],{"5504badffd57f0a1"(e,l,a){a.r(l),a.d(l,{default:()=>p}),a("27e0a48d3d4d9aab");var t=a("b641633d6c906d19"),i=a("a54fa6d0a722ba3f"),u=a("99c472be6da17922"),s=a("0a7bbc22bb49fa90"),o=a("ab5c7e913102dd40"),d=a("6155503b942128ba"),n=a("da19b2b0057d147a"),c=a("ba3785355cfb5e6b"),b=a("8ec26946b6f254bb");const m=(0,t.pM)({__name:"ReceiptTemplates",setup(e){const{t:l}=(0,o.s)(),a=(0,i.KR)([]),m=(0,i.KR)(""),p=(0,i.KR)({}),r=(0,t.EW)(()=>Object.fromEntries(a.value.map(e=>[e,e]))),f=(0,i.KR)("/admin/addons/subscription-receipt-templates-api/config"),{data:R}=(0,d.u)(f);(0,t.wB)(R,e=>{e&&(a.value=e.languages??[],p.value={...e.templates??{}},m.value&&p.value[m.value]||(m.value=a.value[0]??""))},{immediate:!0});const y={pdfHtml:"",pdfCss:"",emailSubject:"",emailBody:"",noticeSubject:"",noticeBody:""};function v(e){return(0,t.EW)({get:()=>p.value[m.value]?.[e]??"",set:l=>{const a=m.value;p.value[a]={...p.value[a]??y,[e]:l}}})}const h=v("emailSubject"),V=v("emailBody"),w=v("noticeSubject"),_=v("noticeBody"),g=v("pdfHtml"),C=v("pdfCss");async function T(){const e=await fetch("/admin/addons/subscription-receipt-templates-api/config",{method:"post",credentials:"same-origin",headers:{"Content-Type":"application/json"},body:JSON.stringify({templates:p.value})});(await e.json()).succeeded&&(0,b.i)()}return(e,a)=>((0,t.uX)(),(0,t.Wv)(s.default,{title:(0,i.R1)(l)("Receipt templates"),width:1020},{default:(0,t.k6)(()=>[(0,t.bF)(c.default,{title:(0,i.R1)(l)("Receipt templates"),"back-button-label":(0,i.R1)(l)("Back"),"submit-button-label":(0,i.R1)(l)("Save"),onSubmit:T},{default:(0,t.k6)(()=>[(0,t.Lk)("div",{class:(0,u.C4)(e.$style.form)},[(0,t.bF)(n.default,{modelValue:m.value,"onUpdate:modelValue":a[0]||(a[0]=e=>m.value=e),type:"select",name:"language",label:(0,i.R1)(l)("Language"),options:r.value,"hide-required-label":""},null,8,["modelValue","label","options"]),(0,t.Lk)("p",{class:(0,u.C4)(e.$style.hint)},(0,u.v_)((0,i.R1)(l)("Templates use Twig with receipt.* variables (e.g. receipt.receiptNumber, receipt.seller.*, receipt.buyer.*, receipt.lines, receipt.net/vat/gross/currency) and the format_amount filter.")),3),(0,t.bF)(n.default,{modelValue:(0,i.R1)(h),"onUpdate:modelValue":a[1]||(a[1]=e=>(0,i.i9)(h)?h.value=e:null),type:"text",name:"emailSubject",label:(0,i.R1)(l)("Receipt email subject"),"hide-required-label":""},null,8,["modelValue","label"]),(0,t.bF)(n.default,{modelValue:(0,i.R1)(V),"onUpdate:modelValue":a[2]||(a[2]=e=>(0,i.i9)(V)?V.value=e:null),type:"textarea",name:"emailBody",rows:"6",label:(0,i.R1)(l)("Receipt email body (HTML)"),class:(0,u.C4)(e.$style.code),"hide-required-label":""},null,8,["modelValue","label","class"]),(0,t.bF)(n.default,{modelValue:(0,i.R1)(g),"onUpdate:modelValue":a[3]||(a[3]=e=>(0,i.i9)(g)?g.value=e:null),type:"textarea",name:"pdfHtml",rows:"12",label:(0,i.R1)(l)("Receipt PDF template (HTML)"),class:(0,u.C4)(e.$style.code),"hide-required-label":""},null,8,["modelValue","label","class"]),(0,t.bF)(n.default,{modelValue:(0,i.R1)(C),"onUpdate:modelValue":a[4]||(a[4]=e=>(0,i.i9)(C)?C.value=e:null),type:"textarea",name:"pdfCss",rows:"8",label:(0,i.R1)(l)("Receipt PDF styles (CSS)"),class:(0,u.C4)(e.$style.code),"hide-required-label":""},null,8,["modelValue","label","class"]),(0,t.Lk)("p",{class:(0,u.C4)(e.$style.hint)},(0,u.v_)((0,i.R1)(l)("The renewal notice uses Twig with notice.* variables (notice.buyerName, notice.subscriptionName, notice.renewalDate, notice.amount, notice.currency, notice.sellerName) and the format_amount filter.")),3),(0,t.bF)(n.default,{modelValue:(0,i.R1)(w),"onUpdate:modelValue":a[5]||(a[5]=e=>(0,i.i9)(w)?w.value=e:null),type:"text",name:"noticeSubject",label:(0,i.R1)(l)("Renewal notice email subject"),"hide-required-label":""},null,8,["modelValue","label"]),(0,t.bF)(n.default,{modelValue:(0,i.R1)(_),"onUpdate:modelValue":a[6]||(a[6]=e=>(0,i.i9)(_)?_.value=e:null),type:"textarea",name:"noticeBody",rows:"10",label:(0,i.R1)(l)("Renewal notice email body (HTML)"),class:(0,u.C4)(e.$style.code),"hide-required-label":""},null,8,["modelValue","label","class"])],2)]),_:1},8,["title","back-button-label","submit-button-label"])]),_:1},8,["title"]))}}),p=(0,a("461bee8a7784aa7f").A)(m,[["__cssModules",{$style:{form:"ReceiptTemplates__form--cBRRa",hint:"ReceiptTemplates__hint--tZUZs",code:"ReceiptTemplates__code--ybC6m"}}]])}}]);

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.