PageSourceSearch

https://sistema.yacamba.com/assets/MainPOS-BaDhfXAp.js

js yacamba.com collected 2026-09-24 11:07:24 UTC 3,263 bytes, 1 lines download raw bytes

1import{jc as $,iU as k,j0 as v,iZ as w,hH as s,iL as N,eI as B,dn as I,b$ as E,gT as a}from"./index-DfEzlclk.js";import{getPosSales as z}from"./utils-CftkfFQ3.js";import{a as G,T as L}from"./TabsContentMobile-BvaIpX26.js";import{T as O}from"./TabsListMobile-DuRHzn_4.js";import{R as U}from"./RowMobile-Ct7Zgq9u.js";import{S as V}from"./SaleRowMobile-SjaFwTFg.js";import{R as A}from"./RowContentMoreInfo-D1yhK3W9.js";import{I as P}from"./InfiniteScrollContainer-B7SxLfkh.js";import"./utils-C_oFoqTa.js";import"./utils-q1U2wIj4.js";import"./tabs-CL_7EPhy.js";import"./index-zuvzRqwN.js";import"./PendingBadge-SxyvWQQJ.js";import"./DrawerOptions-D0qio8RL.js";import"./drawer-Ch_49rYl.js";import"./circle-x-BVT64Xj0.js";import"./circle-check-big-COYDptJk.js";const H="gap-x-[22px] px-5 pb-0 pt-3.5",D="border-b-[2.5px] pb-[9px] pt-0 text-[12.5px] font-bold uppercase tracking-[0.06em] text-slateGray";function le(){const{t:i}=$(),{storesData:d}=k(),[n]=v(),x=w(),[m,Z]=s.useState(d==null?void 0:d.data),[_,u]=s.useState([]),[l,c]=s.useState({pageIndex:0,pageSize:15}),S=N(n,700),[r,M]=s.useState(!1),[g,f]=s.useState(!0),p=B(),T=async(e=!1)=>{if(r)return;M(!0);const o={page:l.pageIndex+1,per_page:l.pageSize,search:S||"",start_date:"",end_date:""},t=await z(o);t!=null&&t.data&&(u(R=>e?[...R,...t.data]:t.data),t.pagination&&f(t.pagination.current_page<t.pagination.last_page)),M(!1)};s.useEffect(()=>{c({pageIndex:0,pageSize:15}),u([]),f(!0)},[S]),s.useEffect(()=>{const e=l.pageIndex>0;T(e)},[l]);const C=s.useCallback(()=>{!r&&g&&c(e=>({...e,pageIndex:e.pageIndex+1}))},[r,g]);async function j(){c({pageIndex:0,pageSize:15}),u([]),f(!0)}s.useEffect(()=>(p.subscribe(`private-get-sales.${I.get("system_id")}`),p.bind("fill-sales",({message:e})=>{j()}),()=>{p.unsubscribe(`private-get-sales.${I.get("system_id")}`)}),[]);const y=E.useMemo(()=>{if(!n)return m||[];const e=n.toLowerCase();return(m||[]).filter(o=>{var t;return(t=o==null?void 0:o.name)==null?void 0:t.toLowerCase().includes(e)})},[m,n]);return a.jsxs(G,{defaultValue:"articles",flat:!0,children:[a.jsx(O,{items:[{label:i("Tickets"),value:"articles"},{label:i("Sucursales"),value:"branch"}],className:H,triggerClassName:D}),a.jsx(L,{value:"articles",containerScroll:!1,childrenClassName:"px-0",children:a.jsx(P,{items:_,hasMore:g,isLoading:r,onLoadMore:C,emptyMessage:i("No se encontraron tickets POS"),endMessage:"No hay más tickets para mostrar",renderItem:(e,o)=>a.jsx(V,{name:e==null?void 0:e.client,folio:e==null?void 0:e.code,amount:e==null?void 0:e.total,date:e==null?void 0:e.created_at,onClick:()=>x(`/sales-mobile/pos/show/${e==null?void 0:e.id}`)})})}),a.jsx(L,{value:"branch",containerScroll:!1,children:a.jsx(P,{items:y,hasMore:!1,isLoading:!1,onLoadMore:()=>{},emptyMessage:i("No se encontraron sucursales"),endMessage:"",renderItem:(e,o)=>a.jsx(U,{onClick:()=>x(`/sales-mobile/sessions/${e==null?void 0:e.id}`),children:a.jsx(A,{title:e==null?void 0:e.name,informations:[`Sesiones: ${(e==null?void 0:e.sessions)||"0"}`,i("Venta día ${{salestotalday}}",{salestotalday:(e==null?void 0:e.sales_total_day)||"0"}),i("Venta Mes: ${{salestotalmonth}}",{salestotalmonth:(e==null?void 0:e.sales_total_month)||"0"}),`${(e==null?void 0:e.latest_session)||"-"}`]})})})})]})}export{le 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.