1import{u as N}from"./DGl7_Nuf.js";import{d as H,u as j,k,y as E,j as b,o as c,l as z,w as i,a as e,t as r,h as t,c as v,F as x,K as A,e as P,b as C,n as T,m as Q,i as F,s as X,Z as Y,$ as ee,B as te,O as ae,U as ne}from"./CYMs3uwY.js";import{u as se}from"./CZe-7otn.js";const oe={class:"view-history-content"},le={class:"title"},ie={class:"table-special"},ce={class:"table-special"},re={key:0,class:"fa-regular fa-circle-question defaulted"},ue={key:0,class:"fa-regular fa-circle-exclamation Overdue"},de={class:"table-special"},me={class:"action-box"},ye=H({__name:"ViewHistoryOverlay",setup(q,{expose:h}){const{t:D}=j(),a=k(!1),{currency:I}=E(),d=k(),U=async s=>{const{fetchIncomingViewHistory:m}=await N();a.value=!0,m({currency:I,installmentPlanId:s}).then(l=>{d.value=l.data})},V=()=>{a.value=!1},B=[{key:"date",title:D("date")},{key:"type",title:""},{key:"amount",title:D("amount")}];return h({showOverlay:U,closeOverlay:V}),(s,m)=>{const l=b("DynaTooltip"),O=b("DynaTable"),g=b("DynaButton"),S=b("DynaOverlay");return c(),z(S,{modelValue:t(a),"onUpdate:modelValue":m[0]||(m[0]=y=>Q(a)?a.value=y:null),title:s.$t("view-history")},{action:i(()=>[e("div",me,[C(g,{type:"dark-outline",onClick:V},{default:i(()=>[P(r(s.$t("close")),1)]),_:1})])]),default:i(()=>{var y;return[e("div",oe,[e("div",le,[e("label",null,r(s.$t("domains")),1),e("span",null,r((y=t(d))==null?void 0:y.domain),1)]),t(d)?(c(),z(O,{key:0,"is-pagination":!1,columns:B,data:t(d).historyItems},{date:i(({row:u})=>[e("div",ie,[(c(!0),v(x,null,A(u.date,($,p)=>(c(),v("span",{key:p},r($),1))),128))])]),type:i(({row:u})=>[e("div",ce,[(c(!0),v(x,null,A(u.message,($,p)=>{var L;return c(),v("span",{key:p},[P(r($)+" ",1),C(l,{effect:"dark",content:s.$t("Payments failed to be made by this date will automatically push the domain back to {target}.",{target:(L=t(d))!=null&&L.userIsPayer?s.$t("seller"):s.$t("you")})},{default:i(()=>[u.paymentStatusValue[p]===4?(c(),v("i",re)):T("",!0)]),_:2},1032,["content"]),C(l,{effect:"dark",content:s.$t("leate-payment")},{default:i(()=>[u.paymentStatusValue[p]===3?(c(),v("i",ue)):T("",!0)]),_:2},1032,["content"])])}),128))])]),amount:i(({row:u})=>[e("div",de,[e("span",null,r(u.amount),1)])]),_:1},8,["data"])):T("",!0)])]}),_:1},8,["modelValue","title"])}}}),pe=F(ye,[["__scopeId","data-v-ef4de4a0"]]),_e={class:"domain-detail-container"},fe={class:"title"},ve={class:"installments-top"},ke={class:"title-action-row"},he={class:"manage-domains-table-container"},we={class:"top-content"},be={class:"panel-input-content"},De=["value","placeholder"],ge=H({__name:"index",async setup(q){let h,D;const{t:a}=j(),{currency:I}=E(),{fetchInstallmentsList:d,downloadInstallments:U}=([h,D]=X(()=>N()),h=await h,D(),h),V=Y(),s=ee().params.detail,m=k(),l=k({currency:I,isDue:s==="due",isGoing:!1,dueDate:"ALL",current:1,size:10,countTotal:!0,keywords:""}),O=k(0),g=k(),S=k(!1),y=async()=>{S.value=!0;const n=await d(l.value);O.value=n.data.total,g.value=n.data.records,S.value=!1},u=[{key:"domain",title:a("domains"),clickable:!0},{key:"purchaseDate",title:a("purchase-date")},{key:"totalPrice",title:a("total-price")},{key:"planStatusDisplay",title:a("status")},{key:"completedDate",title:a("completed-date")}],$=[{key:"domain",title:a("domains"),clickable:!0},{key:"totalPrice",title:a("total-price")},{key:"planStatusDisplay",title:a("status")},{key:"completedDate",title:a("completed-date")},{key:"view",title:"",clickable:!0}],p=s==="due"?u:$,{values:L,updateValue:G}=se({fields:{keywords:{initialValue:"",transform:n=>String(n).trim(),validator:n=>n.length<=100}},delay:300,callback:n=>{l.value.keywords=n.keywords}}),K=n=>ne(`/account/installments/income/${n.installmentPlanId}`),W=()=>{V.back()},Z=async()=>{try{const n=await U({currency:I,statuses:"0,3,4,5",type:s}),o=`${s}-installments.xlsx`,_=window.URL.createObjectURL(n),f=document.createElement("a");f.href=_,f.setAttribute("download",o),document.body.appendChild(f),f.click(),document.body.removeChild(f),window.URL.revokeObjectURL(_)}catch(n){console.error(n)}};te(()=>l.value,()=>{y()},{deep:!0}),y();const J=({row:n,column:o})=>{var _;o.key==="view"?(_=m.value)==null||_.showOverlay(n.installmentPlanId):o.key==="domain"&&K(n)};return(n,o)=>{const _=pe,f=b("DynaTable"),M=b("DynaPanel");return c(),v("div",_e,[C(_,{ref_key:"InstallmentsOverlayRef",ref:m},null,512),e("div",fe,[e("span",{onClick:W},[o[3]||(o[3]=e("i",{class:"fa-solid fa-angle-down fa-rotate-90"},null,-1)),P(r(t(s)==="due"?t(a)("due"):t(a)("income")),1)])]),e("div",ve,[e("div",ke,[e("span",null,r(t(a)("completed/cancel-installments")),1)])]),e("div",he,[C(M,null,{"top-free":i(()=>[e("div",we,[e("div",be,[o[4]||(o[4]=e("i",{class:"fa-light fa-magnifying-glass"},null,-1)),e("input",{value:t(L).keywords.value,placeholder:t(a)("search-domain"),onInput:o[
10]||(o[0]=R=>t(G)("keywords",R.target.value))},null,40,De)]),e("i",{class:"fa-regular fa-download",onClick:Z})])]),default:i(()=>{var R;return[(R=t(g))!=null&&R.length?(c(),z(f,{key:0,current:t(l).current,"onUpdate:current":o[1]||(o[1]=w=>t(l).current=w),size:t(l).size,"onUpdate:size":o[2]||(o[2]=w=>t(l).size=w),data:t(g),total:t(O),columns:t(p),onCellClick:J},{planStatusDisplay:i(({row:w})=>[e("span",{style:ae({color:w.planStatus===4?"red":""})},r(w.planStatusDisplay),5)]),view:i(()=>[P(r(n.$t("view-history")),1)]),_:1},8,["current","size","data","total","columns"])):T("",!0)]}),_:1})])])}}}),Ve=F(ge,[["__scopeId","data-v-886de835"]]);export{Ve 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.