| Current Path : /home/users/unlimited/www/whatsapp-crm/public/build/assets/ |
| Current File : /home/users/unlimited/www/whatsapp-crm/public/build/assets/BillingTable-62dc48d8.js |
import{r as v,O as x,o as c,c as m,a as s,w as N,v as B,u as y,b as _,d as S,f as e,g as t,k as r,t as i,F as T,e as $,i as z,n as V}from"./app-f1493ab2.js";import{d as M}from"./debounce-7f7c0d78.js";/* empty css */import{_ as O}from"./Table-700fbce6.js";import{T as j,a as D,_ as u}from"./TableHeaderRowItem-6e9202af.js";import{T as L,a as R,_ as d}from"./TableBodyRowItem-551209f9.js";const F={class:"flex justify-between"},H={class:"bg-white flex items-center shadow-sm h-10 w-full md:w-80 rounded-[0.5rem] mb-6 text-sm"},q=["placeholder"],A={key:1,class:"pr-2"},P={__name:"BillingTable",props:{rows:{type:Object,required:!0},filters:{type:Object},uuid:{type:String}},emits:["update:modelValue","callback"],setup(f,{emit:E}){const w=f,o=v({search:w.filters.search}),p=v(!1),k=()=>{o.value.search=null,b()},C=n=>n===w.rows.data.length-1,h=M(()=>{p.value=!0,b()},1e3),b=()=>{x.visit(window.location.pathname,{method:"get",data:o.value})};return(n,a)=>(c(),m(T,null,[s("div",F,[s("div",H,[a[4]||(a[4]=s("span",{class:"pl-3"},[s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24"},[s("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"m15 15l6 6m-11-4a7 7 0 1 1 0-14a7 7 0 0 1 0 14Z"})])],-1)),N(s("input",{onInput:a[0]||(a[0]=(...l)=>y(h)&&y(h)(...l)),"onUpdate:modelValue":a[1]||(a[1]=l=>o.value.search=l),type:"text",class:"outline-none px-4 w-full bg-inherit",placeholder:n.$t("Search billing logs")},null,40,q),[[B,o.value.search]]),p.value===!1&&o.value.search?(c(),m("button",{key:0,onClick:k,type:"button",class:"pr-2"},a[2]||(a[2]=[s("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24"},[s("path",{fill:"currentColor",d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2zm3.7 12.3c.4.4.4 1 0 1.4c-.4.4-1 .4-1.4 0L12 13.4l-2.3 2.3c-.4.4-1 .4-1.4 0c-.4-.4-.4-1 0-1.4l2.3-2.3l-2.3-2.3c-.4-.4-.4-1 0-1.4c.4-.4 1-.4 1.4 0l2.3 2.3l2.3-2.3c.4-.4 1-.4 1.4 0c.4.4.4 1 0 1.4L13.4 12l2.3 2.3z"})],-1)]))):_("",!0),p.value?(c(),m("span",A,a[3]||(a[3]=[S('<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="0 12 12;90 12 12;180 12 12;270 12 12"></animateTransform><animate attributeName="opacity" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" begin="0.2s" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="30 12 12;120 12 12;210 12 12;300 12 12"></animateTransform><animate attributeName="opacity" begin="0.2s" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle><circle cx="12" cy="3.5" r="1.5" fill="currentColor" opacity="0"><animateTransform attributeName="transform" begin="0.4s" calcMode="discrete" dur="2.4s" repeatCount="indefinite" type="rotate" values="60 12 12;150 12 12;240 12 12;330 12 12"></animateTransform><animate attributeName="opacity" begin="0.4s" dur="0.6s" keyTimes="0;0.5;1" repeatCount="indefinite" values="1;1;0"></animate></circle></svg>',1)]))):_("",!0)])]),e(O,{rows:f.rows},{default:t(()=>[e(j,null,{default:t(()=>[e(D,null,{default:t(()=>[e(u,{position:"first"},{default:t(()=>[r(i(n.$t("Date")),1)]),_:1}),e(u,{position:"first",class:"hidden sm:table-cell"},{default:t(()=>[r(i(n.$t("Organization")),1)]),_:1}),e(u,{class:"hidden sm:table-cell"},{default:t(()=>[r(i(n.$t("Description")),1)]),_:1}),e(u,{class:"hidden sm:table-cell"},{default:t(()=>[r(i(n.$t("Amount")),1)]),_:1}),e(u,{position:"last"})]),_:1})]),_:1}),e(L,null,{default:t(()=>[(c(!0),m(T,null,$(f.rows.data,(l,g)=>(c(),z(R,{key:g,class:V(C(g)?"":"border-b")},{default:t(()=>[e(d,{position:"first",class:"hidden sm:table-cell"},{default:t(()=>[r(i(l.created_at),1)]),_:2},1024),e(d,{position:"first",class:"capitalize"},{default:t(()=>[r(i(l.organization.name),1)]),_:2},1024),e(d,{class:"hidden sm:table-cell capitalize"},{default:t(()=>[r(i(l.description),1)]),_:2},1024),e(d,{class:""},{default:t(()=>[r(i(l.amount),1)]),_:2},1024),e(d,{class:"hidden sm:table-cell"},{default:t(()=>a[5]||(a[5]=[s("span",{class:"float-right"},null,-1)])),_:1})]),_:2},1032,["class"]))),128))]),_:1})]),_:1},8,["rows"])],64))}};export{P as _};