1import{o as i,c as n,a as e,t as a,b as c,u as d,ap as u,a4 as y,n as m,S as f,d as r,F as h,q as g,A as x}from"./app.a816cb64.js";import{a as b}from"./axios.f1f32898.js";import{c as _,e as w}from"./api.85804dd1.js";import{_ as p}from"./DatePickerField.5669e755.js";import{L as F}from"./Base.857045cd.js";import{L as $}from"./LoadingOverlay.03494e6c.js";import{C as D}from"./CheckboxField.61231d1c.js";import"./plugin-vue_export-helper.21dcd24c.js";const v={class:"relative py-3 pl-3 pr-2 text-xs sm:pl-4"},V={class:"font-medium text-gray-900"},k={class:"font-bold font-mono text-purple-500"},P={key:0,class:"text-2xs text-gray-600"},R={class:"mt-1 flex flex-col text-gray-500 sm:block lg:hidden text-2xs"},B={class:"mb-0.5"},S={key:0},C={class:"hidden px-3 py-3 text-xs text-gray-500 lg:table-cell"},q={class:"hidden px-3 py-3 text-xs text-gray-500 lg:table-cell"},L={class:"hidden px-3 py-3 text-xs text-gray-500 lg:table-cell"},N={key:0},Q={class:"px-3 py-3 text-xs text-gray-500 text-right font-mono"},U={name:"ReferralFeesBrowserRow",props:{entry:null,payable:{type:Boolean,default:!1},incognito:{type:Boolean,default:!1}}},j=Object.assign(U,{setup(s){return(t,o)=>(i(),n("tr",{class:m([s.payable?"":"opacity-40"])},[e("td",v,[e("div",V,[e("div",k," #"+a(s.entry.title.split("-")[0]),1),s.entry.description?(i(),n("p",P,a(s.entry.description),1)):c("",!0)]),e("div",R,[e("div",B,a(d(u)(s.entry.postDate)),1),e("div",null,[s.entry.expiryDate?(i(),n("span",S,a(d(u)(s.entry.expiryDate)),1)):c("",!0)])])]),e("td",C,a(d(u)(s.entry.postDate)),1),e("td",q,a(s.payable?t.$t("Yes"):t.$t("No")),1),e("td",L,[s.entry.expiryDate?(i(),n("span",N,a(d(u)(s.entry.expiryDate)),1)):c("",!0)]),e("td",Q,a(d(y)(s.entry.planFee,"HUF")),1)],2))}}),A={class:"mt-12 relative"},O={class:"sm:flex sm:items-center"},E={class:"text-base font-semibold leading-6 text-gray-900 sm:flex-auto"},H={class:"w-full lg:w-1/4"},I={class:"bg-white mt-6 ring-1 ring-gray-900/5 sm:mx-0 rounded sm:rounded-lg overflow-hidden"},T={class:"min-w-full divide-y divide-gray-900/5"},z={class:"bg-gray-50"},M={scope:"col",class:"py-3 pl-4 pr-2 text-left text-xs font-semibold text-gray-900 sm:pl-4 xl:w-5/12"},Y={scope:"col",class:"px-3 py-3.5 text-left text-xs font-semibold text-gray-900 hidden lg:table-cell xl:w-2/12"},G={scope:"col",class:"px-3 py-3.5 text-left text-xs font-semibold text-gray-900 hidden lg:table-cell xl:w-1/12"},J={scope:"col",class:"px-3 py-3.5 text-left text-xs font-semibold text-gray-900 hidden lg:table-cell xl:w-2/12"},K={scope:"col",class:"px-3 py-3.5 text-right text-xs font-semibold text-gray-900 xl:w-2/12"},W={key:0},X={class:"relative py-4 pl-4 pr-3 text-xs",colspan:"4"},Z={class:"font-medium text-gray-900"},ee={key:1},te={class:"bg-gray-50"},se=e("td",{colspan:"4",class:"hidden lg:table-cell"},null,-1),ae={colspan:"1",class:"font-bold font-mono px-3 py-2 text-xs text-gray-500"},le={class:"flex items-center justify-between gap-2"},oe=e("span",{class:"text-xl"},"\u03A3",-1),ie={name:"ReferralFeesBrowser",props:{startDate:null},data(){return{entries:[],loading:!0,date:null,datePaid:null,paid:!1,today:new Date}},computed:{paidDateQueryString(){return this.paid?"expiryDate: "+this.datePaid.queryString:'expiryDate: ":empty:"'},referralFeesQuery(){return` 2 query { 3 entries( 4 siteId: "1" 5 section: "referralFees", 6 limit: null, 7 status: null, 8 planFee: "not 0" 9 postDate: `+this.date.queryString+` 10 `+this.paidDateQueryString+` 11 ) { 12 id 13 uid 14 title 15 postDate 16 expiryDate 17 ... on referralFees_default_Entry { 18 planFee 19 description 20 } 21 } 22 } 23 `},total(){return this.entries.reduce((s,t)=>this.isReferralFeePayable(t)?s+t.planFee:s,0)}},methods:{getReferralFees(){if(this.loading)return;this.loading=!0;const s=b.create(_(window.endpoints.gql));w(s,this.referralFeesQuery,t=>{this.entries=t.entries}).finally(()=>{this.loading=!1})},isReferralFeePayable(s){return new Date(s.postDate).getTime()<=this.today.getTime()},submit(){this.getReferralFees()}},mounted(){this.loading=!1},watch:{date:function(s,t){this.getReferralFees()},paid:function(s,t){this.getReferralFees()},datePaid:function(s,t){this.getReferralFees()}}},fe=Object.assign(ie,{setup(s){return(t,o)=>(i(),n("section",A,[e("header",null,[e("div",O,[e("h1",E,a(t.$t("Pending payout")),1)]),e("form",{class:"flex flex-wrap md:flex-nowrap justify-start gap-y-2 gap-x-4 mt-4",onSubmit:o[3]||(o[3]=f((...l)=>t.submit&&t.submit(...l),["prevent"]))},[r(p,{label:"Credit date",class:"w-full lg:w-1/4",handle:"date-picker",modelValue:t.date,"onUpdate:modelValue":o[0]||(o[0]=l=>t.date=l),"start-date":s.startDate,"prevent-min-max-navigation":!1}
23,null,8,["modelValue","start-date"]),e("div",H,[r(F,{label:"Paid"}),r(D,{label:"Show paid only",handle:"paid",modelValue:t.paid,"onUpdate:modelValue":o[1]||(o[1]=l=>t.paid=l)},null,8,["modelValue"])]),r(p,{label:"Payout date",class:m(["w-full lg:w-1/4",t.paid?"":"hidden"]),handle:"date-picker",modelValue:t.datePaid,"onUpdate:modelValue":o[2]||(o[2]=l=>t.datePaid=l),"start-date":s.startDate},null,8,["class","modelValue","start-date"])],32)]),e("div",I,[e("table",T,[e("thead",z,[e("tr",null,[e("th",M,a(t.$t("ID")),1),e("th",Y,a(t.$t("Credit date")),1),e("th",G,a(t.$t("Cleared")),1),e("th",J,a(t.$t("Payout date")),1),e("th",K,a(t.$t("Amount")),1)])]),t.entries.length===0?(i(),n("tbody",W,[e("tr",null,[e("td",X,[e("div",Z,a(t.$t("No commission has been credited yet, or no commission items match the selected filters.")),1)])])])):(i(),n("tbody",ee,[(i(!0),n(h,null,g(t.entries,l=>(i(),x(j,{entry:l,key:l.uid,payable:t.isReferralFeePayable(l)},null,8,["entry","payable"]))),128))])),e("tfoot",te,[e("tr",null,[se,e("td",ae,[e("div",le,[oe,e("span",null,a(d(y)(t.total,"HUF")),1)])])])])])]),r($,{loading:t.loading},null,8,["loading"])]))}});export{fe as default}; 24//# sourceMappingURL=Browser.bfa869ec.js.map
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.