PageSourceSearch

https://store.gemnote.com/_nuxt/CbZzQVw1.js

js gemnote.com collected 2026-10-02 06:15:40 UTC 9,257 bytes, 1 lines download raw bytes

1import{_ as M,c as o,o as a,i as h,f as _,p as w,a as e,t as g,h as f,ab as J,r as v,d as y,q as z,g as X,x as Y,u as q,C as $,F as B,az as ee,A as te,m as P,e as ae,aB as se}from"./SuPpnckH.js";import{T as oe}from"./DGlgZArU.js";import{_ as ie}from"./CqX2UA1J.js";import{_ as ne}from"./YgdDChio.js";import{V as O}from"./B1IhNe0r.js";import{S as le}from"./4myi4zKp.js";import{P as re}from"./DxaoV_SN.js";import{C as de}from"./D2wopb2D.js";import{_ as ue}from"./JSYoA_QN.js";import{u as ce}from"./QVoDY9p2.js";import{u as me}from"./W9H1toHc.js";import{r as N}from"./JiKMaLLI.js";import{u as pe}from"./BU1Wq2eS.js";import{i as fe}from"./jdmn6HMp.js";import{u as ge}from"./TAPo0r_G.js";import{u as ve}from"./BY_riwjv.js";import"./DK0SjmzZ.js";import"./DqjLwpP2.js";import"./C_S_gIIx.js";import"./4hyTJq2L.js";const he="data:image/svg+xml,%3csvg%20width='39'%20height='39'%20viewBox='0%200%2039%2039'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M15.9493%206C17.4889%203.33334%2021.338%203.33333%2022.8776%206L32.7619%2023.1202C34.3015%2025.7868%2032.377%2029.1202%2029.2978%2029.1202H9.52912C6.44992%2029.1202%204.52541%2025.7868%206.06501%2023.1202L15.9493%206Z'%20fill='%23232220'/%3e%3cpath%20d='M20.9929%2013.2035L20.8793%2021.5671H19.5611L19.4475%2013.2035H20.9929ZM20.2202%2024.9308C19.9399%2024.9308%2019.6994%2024.8304%2019.4986%2024.6296C19.2978%2024.4289%2019.1975%2024.1883%2019.1975%2023.908C19.1975%2023.6277%2019.2978%2023.3872%2019.4986%2023.1864C19.6994%2022.9857%2019.9399%2022.8853%2020.2202%2022.8853C20.5005%2022.8853%2020.741%2022.9857%2020.9418%2023.1864C21.1425%2023.3872%2021.2429%2023.6277%2021.2429%2023.908C21.2429%2024.0936%2021.1956%2024.2641%2021.1009%2024.4194C21.01%2024.5747%2020.8869%2024.6997%2020.7316%2024.7944C20.58%2024.8853%2020.4096%2024.9308%2020.2202%2024.9308Z'%20fill='%23F5F2EE'/%3e%3c/svg%3e",be={key:0,class:"zero-state-cta"},_e=["onClick"],we={__name:"CommonListZeroState",props:{columns:{type:Array,required:!0},rows:{type:Array,default:()=>[]},message:{type:String,default:"There are no items to display"},showCta:{type:Boolean,default:!1},ctaText:{type:String,default:""},ctaRoute:{type:[String,Object],default:null}},setup(s){return(d,C)=>{const r=ue;return a(),o("div",null,[h(f(O),{columns:s.columns,rows:s.rows,"style-class":"vgt-table striped","row-style-class":s.rows.length===0?"blur-row":"",style:{width:"100%"}},{emptystate:w(()=>[e("span",null,g(s.message),1)]),_:1},8,["columns","rows","row-style-class"]),s.showCta&&s.ctaRoute?(a(),o("div",be,[e("h5",null,g(s.message),1),h(r,{to:s.ctaRoute,custom:""},{default:w(({navigate:u})=>[e("button",{class:"button-gemnote button-gemnote--medium",onClick:u},g(s.ctaText),9,_e)]),_:1},8,["to"])])):_("",!0)])}}},ye=M(we,[["__scopeId","data-v-5ba262fd"]]),Ce=fe.global.t;function ke({filter:s,searchTerm:d}){const C=J(),{notifySuccess:r,notifyError:u}=pe(),c=v(1),b=v(50),k=y(()=>({page:c.value,perPage:b.value,nameOrEmail:d?.value||"",filter:s?.value||"active"})),{data:m,isLoading:n,isError:A,error:D,refetch:L,isFetching:T}=ce({queryKey:y(()=>z.redemptions.list(k.value)),queryFn:()=>N.getList(k.value)}),F=y(()=>m.value?.items??[]),E=y(()=>m.value?.totalCount??0),R=me({mutationFn:p=>N.delete(p),onSuccess:()=>{C.invalidateQueries({queryKey:z.redemptions.all}),r("Redemption order deleted successfully!")},onError:p=>{u(X(p,Ce("grouporder.action.gorder-lock-error")))}});Y([d,s],()=>{c.value=1});function x(p){c.value=p+1}function S(p){b.value=p,c.value=1}return{redemptions:F,totalRecords:E,isLoading:n,isFetching:T,isError:A,error:D,page:c,perPage:b,changePage:x,changePerPage:S,refetch:L,deleteRedemption:R.mutate,isDeleting:R.isPending}}const xe={key:0},Se={key:0,class:"order-list"},Ae={key:0,style:{display:"flex","justify-content":"center"}},Re={key:0},De={class:"gorder-list-date"},Le={key:1},Te={key:2},Fe={key:3},Ee={class:"gorder-list-submission"},Pe={key:4,class:"flex items-center gap-5"},$e=["onClick"],Me=["disabled","onClick"],ze={key:1},Be={class:"margin-top-1"},Ne={class:"capitalize"},Ve={__name:"RedemptionsRedemptionList",props:{searchTerm:{type:String,default:""},filter:{type:String,default:"active",validator:s=>["active","completed"].includes(s)}},setup(s){const d=s,C=v(d.filter),r=y(()=>d.searchTerm),u=q(),{defaultFormatAndParse:c}=ge(),{redemptions:b,totalRecords:k,isLoading:m,page:n,perPage:A,changePage:D,changePerPage:L,deleteRedemption:T,isDeleting:F}=ke({filter:C,searchTerm:r}),E=y(()=>d.filter==="active"),R=y(()=>!m.value),x=v(!1),S=v({}),p=v([{label:"Created",field:"createdAt",textAlign:"center",width:"160px"},{label:"Redemption Page",field:"uuid"},{label:"Creator",field:"createdBy.email"},{label:"Submissions",field:"submissions"},{label:"Status",field:"status"},{label:"Details",field:"detailsUrl",width:"160px"}]),H=v([{label:"Date",field:"createdAt"},{label:"Redemption Page",field:"uuid"},{label:"Creator",field:"email"},{label:"Submission",field:"submissions"},{label:"Status",field:"status"},{label:"Details",field:"details"}]);function Z(i){switch(i){case"locked":return"Locked";case"finalized":return"Finalized";case"auto_finalising":return"Auto-finalizing";default:return"Pending"}}function G(i){return i?i.charAt(0).toUpperCase()+i.slice(1):""}function U(i){S.value=i,x.value=!0}function j(){T(S.value.id,{onSuccess:()=>{x.value=!1,S.value={}}})}function I(i){D(i)}function K(i){L(i)}function Q(i){u.push(`/swag-store/redemptions/details/${i}`)}return(i,l)=>(a(),o("div",null,[R.value?_("",!0):(a(),o("div",xe,[(a(),o(B,null,ee(15,t=>
1h(le,{key:t,width:"100%",height:"3.5rem"})),64))])),R.value?(a(),o(B,{key:1},[f(b).length>0?(a(),o("div",Se,[h(f(O),{columns:p.value,rows:f(b),"style-class":"vgt-table striped"},{"table-column":w(t=>[t.column.field=="createdAt"?(a(),o("span",Ae,g(t.column.label),1)):_("",!0)]),"table-row":w(t=>[t.column.field==="createdAt"?(a(),o("span",Re,[e("span",De,g(f(c)(t.row.createdAt)),1)])):t.column.field==="uuid"?(a(),o("span",Le,[e("span",null,g(t.row.name),1)])):t.column.field==="status"?(a(),o("span",Te,[e("span",null,g(G(Z(t.row.status))),1)])):t.column.field==="submissions"?(a(),o("span",Fe,[e("span",Ee,g(t.row.submissions),1)])):t.column.field==="detailsUrl"?(a(),o("span",Pe,[e("span",{class:"hoverable-text bold",onClick:W=>Q(t.row.id)},"View Details",8,$e),E.value?(a(),o("button",{key:0,class:te(["block w-max delete-button",{isDisabled:!t.row.isDeletable}]),disabled:!t.row.isDeletable,onClick:W=>U(t.row)},[...l[1]||(l[1]=[e("img",{src:ne,alt:"",class:"w-4.5"},null,-1)])],10,Me)):_("",!0)])):_("",!0)]),_:1},8,["columns","rows"])])):(a(),o("div",ze,[h(ye,{columns:H.value},null,8,["columns"])]))],64)):_("",!0),h(re,{"total-items":f(k),page:f(n)-1,"items-per-page":f(A),onPageChange:I,onPerPageChange:K},null,8,["total-items","page","items-per-page"]),x.value?(a(),$(de,{key:2,"show-footer":!0,"button-label":"Delete","color-variation":"secondary","is-confirm-button-disabled":f(F),width:"550px",onConfirmAction:j,onHideModal:l[0]||(l[0]=t=>x.value=!1)},{header:w(()=>[...l[2]||(l[2]=[P(" Delete Redemption Page ",-1)])]),body:w(()=>[e("div",Be,[e("span",null,[l[3]||(l[3]=P(" Are you sure you want to delete ",-1)),e("span",Ne,g(S.value.name),1),l[4]||(l[4]=P("? ",-1))]),l[5]||(l[5]=e("div",{class:"flex items-center justify-center gap-0.5 gorder-delete__info"},[e("img",{src:he,alt:""}),e("p",{class:"font-bold relative -top-0.5"}," This action cannot be reversed. ")],-1))])]),_:1},8,["is-confirm-button-disabled"])):_("",!0)]))}},V=M(Ve,[["__scopeId","data-v-a7e8d606"]]),qe={class:"content-wrapper","data-testid":"redemptions-page"},Oe={class:"gorder-button-wrapper"},He={class:"search-input","data-testid":"redemptions-search-wrapper"},Ze={class:"gorder-list","data-testid":"redemptions-list-container"},Ge={__name:"index",setup(s){ae({title:"Redemption Pages"});const d=q(),C=ve(),r=v(""),u=v([{name:"Active",isActive:!0},{name:"Completed",isActive:!1}]);function c(){C.resetForCreate(),d.push("/swag-store/redemptions/new")}function b(m){u.value.forEach(n=>{n.isActive=n.name===m.name})}function k(m){r.value=m}return(m,n)=>(a(),o("div",qe,[n[2]||(n[2]=e("h2",{class:"page-titles","data-testid":"redemptions-page-title"},"Redemption Pages",-1)),e("div",Oe,[e("div",He,[h(ie,{"data-testid":"redemptions-search",placeholder:"Search by email or name","model-value":r.value,"onUpdate:modelValue":k},null,8,["model-value"])]),e("button",{class:"button-gemnote button-gemnote--small","data-testid":"new-redemption-button",onClick:c},[...n[1]||(n[1]=[e("svg",{width:"13",height:"13",viewBox:"0 0 13 13",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e("path",{d:"M6 0L6 13",stroke:"#F5F2EE"}),e("path",{d:"M0 6.5L13 6.5",stroke:"#F5F2EE"})],-1),e("span",null," New Redemption Page",-1)])])]),e("div",Ze,[h(oe,{"data-testid":"redemptions-tabs",tabs:u.value,onSetActiveTab:n[0]||(n[0]=A=>b(A))},null,8,["tabs"]),h(se,{name:"slide-fade",mode:"out-in"},{default:w(()=>[u.value[0].isActive?(a(),$(V,{key:"active","data-testid":"redemption-list-active",filter:"active","search-term":r.value},null,8,["search-term"])):(a(),$(V,{key:"completed","data-testid":"redemption-list-completed",filter:"completed","search-term":r.value},null,8,["search-term"]))]),_:1})])]))}},ct=M(Ge,[["__scopeId","data-v-c01ed60b"]]);export{ct 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.