PageSourceSearch

https://foodfinder.mx/chunk-7MUD46OW.js

js foodfinder.mx collected 2026-09-25 03:44:25 UTC 6,798 bytes, 8 lines download raw bytes

1import{a as j}from"./chunk-F3F4KY2J.js";import{b as O,c as R,m as k}from"./chunk-BTGS7UQC.js";import"./chunk-H4QOO6OK.js";import"./chunk-KQ64G6NT.js";import"./chunk-75RZFELW.js";import"./chunk-TCMZHPVP.js";import"./chunk-4QOKRR5P.js";import"./chunk-AYDJ2M35.js";import"./chunk-LWIDYNC2.js";import"./chunk-VXGHG3J7.js";import"./chunk-4RZZDUFM.js";import{a as H}from"./chunk-DMKEOHTA.js";import{s as F}from"./chunk-OLEMAAA2.js";import"./chunk-RZAKCWA5.js";import"./chunk-WPSUQLBS.js";import{h as D,k as z}from"./chunk-XYTVABNA.js";import"./chunk-VVTDXABX.js";import{$b as P,Bb as h,Ja as d,Ka as i,La as t,Lb as I,Ma as S,Ta as T,Va as g,Xa as f,ac as w,fb as a,ha as s,hb as c,jc as E,kc as M,nc as B,pa as p,r as C,s as y,ua as _,za as b,zb as u}from"./chunk-VKOZ2CK3.js";import"./chunk-TAAAIZHL.js";import{e as L}from"./chunk-EQDQRRRY.js";var x=L(H());function N(r,v){r&1&&(i(0,"div",13),a(1," No hay mesas listas para facturar "),t())}function $(r,v){if(r&1){let e=T();i(0,"tr",21)(1,"td",22)(2,"span",23),a(3," \u{1F37D} "),t(),a(4),t(),i(5,"td",24),a(6),t(),i(7,"td",24),a(8),u(9,"date"),t(),i(10,"td",25),a(11),u(12,"number"),t(),i(13,"td",26)(14,"button",27),g("click",function(){let n=C(e).$implicit,l=f(2);return y(l.facturarMesa(n.tableId))}),a(15," Facturar \u2192 "),t()()()}if(r&2){let e=v.$implicit;s(4),c(" Mesa ",e.tableId," "),s(2),c(" ",e.ordersCount," "),s(2),c(" ",h(9,4,e.closedAt,"dd/MM/yyyy HH:mm")," "),s(3),c(" $",h(12,7,e.totalAmount,"1.2-2")," ")}}function V(r,v){if(r&1&&(i(0,"div",14)(1,"table",15)(2,"thead",16)(3,"tr")(4,"th",17),a(5," Mesa "),t(),i(6,"th",17),a(7," \xD3rdenes "),t(),i(8,"th",17),a(9," Cerrada "),t(),i(10,"th",18),a(11," Total "),t(),i(12,"th",19),a(13," Acci\xF3n "),t()()(),i(14,"tbody"),b(15,$,16,10,"tr",20),t()()()),r&2){let e=f();s(15),d("ngForOf",e.tables)}}var te=(()=>{class r{invoiceService;router;cdr;allTables=[];tables=[];isLoading=!1;invoiceCount=0;currentPage=0;itemsPerPage=10;pageSizeOptions=[10,20,50,100];get totalTables(){return this.allTables.length}constructor(e,o,n){this.invoiceService=e,this.router=o,this.cdr=n}ngOnInit(){this.loadTables()}animateCount(e){this.invoiceCount=0;let o=1e3,n=50,l=o/n,m=e/n,A=setInterval(()=>{this.invoiceCount+=m,this.invoiceCount>=e&&(this.invoiceCount=e,clearInterval(A))},l)}loadTables(){this.isLoading=!0,this.invoiceService.getTablesReadyToInvoice().subscribe({next:e=>{this.allTables=e.data||[],this.currentPage=0,this.updatePagination(),this.isLoading=!1,this.cdr.detectChanges()},error:()=>{this.isLoading=!1,this.allTables=[],this.tables=[],this.cdr.detectChanges()}}),this.invoiceService.getInvoiceCount().subscribe({next:e=>{let o=e.summary[0].remaining_invoices;this.animateCount(o)},error:()=>{this.invoiceCount=0}})}updatePagination(){let e=this.currentPage*this.itemsPerPage;this.tables=this.allTables.slice(e,e+this.itemsPerPage)}goToPage(e){this.currentPage=e,this.updatePagination(),this.cdr.detectChanges()}onPageSizeChange(e){this.itemsPerPage=e,this.currentPage=0,this.updatePagination(),this.cdr.detectChanges()}goToInvoice(e){this.router.navigate(["/invoicecreate",e])}goToBuyInvoices(){x.default.fire({title:"Comprar timbres fiscales",html:`
2      <select id="invoiceQty" class="swal2-select">
3        <option value="100">100 timbres</option>
4        <option value="200">200 timbres</option>
5        <option value="500">500 timbres</option>
6        <option value="1000">1000 timbres</option>
7      </select>
8    `,confirmButtonText:"Continuar con PayPal",showCancelButton:!0,confirmButtonColor:"#16a34a",preConfirm:()=>{let e=document.getElementById("invoiceQty").value;return Number(e)}}).then(e=>{e.isConfirmed&&this.invoiceService.buyInvoices(e.value).subscribe(o=>{window.location.href=o.approvalUrl})})}facturarMesa(e){x.default.fire({title:`Facturar mesa ${e}`,text:"Se generar\xE1 una factura con todas las \xF3rdenes de la mesa",icon:"question",showCancelButton:!0,confirmButtonText:"Continuar",cancelButtonText:"Cancelar",confirmButtonColor:"#16a34a"}).then(o=>{o.isConfirmed&&this.router.navigate(["/invoice-create-table",e])})}static \u0275fac=function(o){return new(o||r)(p(j),p(D),p(I))};static \u0275cmp=_({type:r,selectors:[["app-invoice-tables"]],decls:21,vars:10,consts:[[1,"px-6","py-8","max-w-7xl","mx-auto","space-y-6"],[1,"flex","items-center","justify-between"],[1,"text-2xl","font-semibold","text-gray-800"],[1,"text-sm","text-gray-500"],[1,"grid","grid-cols-2","items-center"],[1,"mb-1","text-2xl","font-semibold","tracking-tight","text-center","text-green-700"],[1,"text-sm","font-semibold","text-gray-600","text-center"],[1,"flex","items-center","justify-center"],[1,"bg-green-600","hover:bg-green-500","text-white","px-2","py-1","rounded-md",3,"click"],["src","/icons/carrito.png","alt","Comprar timbres",1,"w-8","h-8"],["class","bg-white rounded-xl shadow p-6 text-center text-gray-500",4,"ngIf"],["class","bg-white rounded-xl shadow overflow-hidden",4,"ngIf"],[3,"pageChange","pageSizeChange","total","currentPage","pageSize","pageSizeOptions"],[1,"bg-white","rounded-xl","shadow","p-6","text-center","text-gray-500"],[1,"bg-white","rounded-xl","shadow","overflow-hidden"],[1,"min-w-full","text-sm"],[1,"bg-gray-50","border-b"],[1,"px-4","py-3","text-left","font-semibold","text-gray-700"],[1,"px-4","py-3","text-right","font-semibold","text-gray-700"],[1,"px-4","py-3","text-center","font-semibold","text-gray-700"],["class","border-b hover:bg-gray-50 transition",4,"ngFor","ngForOf"],[1,"border-b","hover:bg-gray-50","transition"],[1,"px-4","py-3","font-semibold","text-gray-800","flex","items-center","gap-2"],[1,"inline-flex","items-center","justify-center","w-8","h-8","rounded-full","bg-green-100","text-green-700","font-bold"],[1,"px-4","py-3"],[1,"px-4","py-3","text-right","font-semibold"],[1,"px-4","py-3","text-center"],[1,"text-green-600","hover:text-green-800","font-semibold","text-sm",3,"click"]],template:function(o,n){o&1&&(i(0,"div",0)(1,"div",1)(2,"div")(3,"h1",2),a(4," Mesas listas para facturar "),t(),i(5,"p",3),a(6," Mesas cerradas del mes actual "),t()(),i(7,"div")(8,"div",4)(9,"div")(10,"dt",5),a(11),u(12,"number"),t(),i(13,"dd",6),a(14," Timbres restantes "),t()(),i(15,"div",7)(16,"button",8),g("click",function(){return n.goToBuyInvoices()}),S(17,"img",9),t()()()()(),b(18,N,2,0,"div",10)(19,V,16,1,"div",11),i(20,"app-paginator",12),g("pageChange",function(m){return n.goToPage(m)})("pageSizeChange",function(m){return n.onPageSizeChange(m)}),t()()),o&2&&(s(11),c(" ",h(12,7,n.invoiceCount,"1.0-0")," "),s(7),d("ngIf",!n.tables.length&&!n.isLoading),s(),d("ngIf",n.tables.length),s(),d("total",n.totalTables)("currentPage",n.currentPage)("pageSize",n.itemsPerPage)("pageSizeOptions",n.pageSizeOptions))},dependencies:[R,B,P,w,F,O,k,z,E,M],encapsulation:2})}return r})();export{te as InvoiceTablesComponent};

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.