PageSourceSearch

https://ofv.segurosreservas.com/payment-history.component-UEKIFSSC.js

js segurosreservas.com collected 2026-10-01 15:41:17 UTC 9,220 bytes, 2 lines download raw bytes

1import{a as z}from"./chunk-CQ7D3NXG.js";import"./chunk-GJ2RBRBK.js";import"./chunk-66A7DHL4.js";import"./chunk-A6YJUJS7.js";import{a as q}from"./chunk-BBJDYVW3.js";import{a as Y}from"./chunk-4ZWNAKIT.js";import"./chunk-VGRP6COP.js";import{a as N}from"./chunk-JSUOAAGU.js";import"./chunk-ZR52PNYR.js";import"./chunk-N5U26BUT.js";import"./chunk-6NDNFNNM.js";import"./chunk-RIH2PPJ2.js";import{a as L}from"./chunk-XZNI5UQK.js";import"./chunk-WK5STTER.js";import{i as _}from"./chunk-ZFYQYB3V.js";import{$b as g,Ab as D,Bb as p,Cb as m,Db as w,Gb as O,Kb as I,Lb as B,Ma as k,Mb as T,Qa as r,Ya as y,_b as a,ac as j,db as P,mc as h,nc as A,oc as x,sb as b,tb as R,ub as F,vb as H,wb as M,xb as v,yb as s,zb as c}from"./chunk-IARZTQTQ.js";import{a as u,b as E}from"./chunk-TDZFEMQK.js";var U=(()=>{class i{constructor(t){this._gAnalyticsPaymentsService=t}clickDownloadReceipt(){this._gAnalyticsPaymentsService.downloadReceipt()}static{this.\u0275fac=function(n){return new(n||i)(y(q))}}static{this.\u0275cmp=P({type:i,selectors:[["app-payment-history-card"]],inputs:{receipt:"receipt",numberOfReceipts:"numberOfReceipts"},decls:26,vars:10,consts:[[1,"custom-shadow","rounded-lg","bg-white","p-5","transition-all","duration-300","ease-in-out","2xl:my-0","2xl:p-4"],[1,"flex","items-center","justify-between"],[1,"flex","items-center","space-x-2"],["src","assets/icons/chevron-right-icon-blue.svg","alt","chevron blue","width","16","height","16"],[1,"font-montserratBold","text-lg","text-primary-normal"],["target","_blank",1,"flex","items-center","justify-center","rounded-[5px]","bg-secondary-normal","p-2.5",3,"click","href"],["src","assets/icons/download-icon.svg","alt","download white","width","16","height","16",1,"object-cover"],[1,"mt-5","grid","grid-cols-1","gap-3","md:grid-cols-3"],[1,"flex","flex-col","gap-2","rounded-lg","bg-light-gray","px-4","py-3","text-base","text-primary-normal"],[1,"font-freightSansProBook","text-[15px]"],[1,"font-montserratBold","text-sm"]],template:function(n,e){n&1&&(p(0,"div",0)(1,"div",1)(2,"div",2),w(3,"img",3),p(4,"h3",4),a(5),m()(),p(6,"a",5),B("click",function(){return e.clickDownloadReceipt()}),w(7,"img",6),m()(),p(8,"div",7)(9,"p",8)(10,"span",9),a(11,"Cantidad de p\xF3lizas pagadas"),m(),p(12,"span",10),a(13),m()(),p(14,"p",8)(15,"span",9),a(16,"Fecha del recibo"),m(),p(17,"span",10),a(18),h(19,"date"),m()(),p(20,"p",8)(21,"span",9),a(22,"Monto pagado"),m(),p(23,"span",10),a(24),h(25,"customCurrency"),m()()()()),n&2&&(r(5),j(" Recibo No. ",e.receipt.receipt," "),r(),O("href",e.receipt.url,k),r(7),g(e.numberOfReceipts),r(5),g(x(19,5,e.receipt.dateReceipts,"dd/MM/yyyy")),r(6),g(A(25,8,e.receipt.totalPaid)))},dependencies:[_,Y],encapsulation:2})}}return i})();function $(i,f){if(i&1&&(s(0,"h3",5),a(1," Recibos desde "),s(2,"span",14),a(3),h(4,"date"),c(),a(5," hasta "),s(6,"span",14),a(7),h(8,"date"),c()()),i&2){let t=T();r(3),g(x(4,2,t.startDate,"dd/MM/yyyy")),r(4),g(x(8,5,t.endDate,"dd/MM/yyyy"))}}function G(i,f){i&1&&(s(0,"h3",5),a(1," Recibos en el \xFAltimo a\xF1o "),c())}function J(i,f){if(i&1&&(s(0,"app-payment-history-card",15),a(1," >"),c()),i&2){let t=f.$implicit;v("receipt",t)("numberOfReceipts",t.numberOfReceipts)}}function K(i,f){if(i&1&&(s(0,"div",6),H(1,J,2,2,"app-payment-history-card",15,F),c()),i&2){let t=T();r(),M(t.getPaginatedItems())}}function Q(i,f){i&1&&(s(0,"div",7),a(1," No se encontraron recibos. "),c())}var se=(()=>{class i{constructor(t,n){this._commonService=t,this._authService=n,this.receipts=null,this.filteredReceipts=null,this.startDate=new Date,this.endDate=new Date,this.filteredByDate=!1,this.currentPage=1,this.itemsPerPage=4,this.totalPages=1,this.filters=[{label:"Fecha del recibo",value:"date",img:"assets/icons/calendar-icon.svg",isAdvance:!1,isDateRange:!0},{label:"M\xE1s reciente a m\xE1s antiguo",value:"date-desc",img:"assets/icons/sort-desc.svg",isAdvance:!1,isDateRange:!1},{label:"M\xE1s antiguo a m\xE1s reciente",value:"date-asc",img:"assets/icons/sort-asc.svg",isAdvance:!1,isDateRange:!1},{label:"Limpiar Filtros",value:"clear",img:"",isAdvance:!1,isDateRange:!1}],this.filterLogic=e=>
1{if((e.type==="clear"||e.type==="")&&(e.startDate=null,e.endDate=null),!this.receipts?.data?.receipts)return;let d=e.search?.toLowerCase()||"";if(e.startDate&&e.endDate){this.startDate=e.startDate,this.endDate=e.endDate,this.filteredByDate=!0;let o={clientcode:this.userInfo.clientCode,begindate:e.startDate.toISOString().split("T")[0],enddate:e.endDate.toISOString().split("T")[0]};this._commonService.getPaymentReceipts(o).subscribe({next:l=>{this.receipts=l,this.receipts?(this.receipts.data.receipts=this.aggregateReceipts(this.receipts.data.receipts),this.filteredReceipts=u({},this.receipts),this.filteredReceipts.data.receipts.sort((C,S)=>new Date(S.dateReceipts||0).getTime()-new Date(C.dateReceipts||0).getTime())):this.filteredReceipts=null,this.resetPagination()},error:()=>{}});return}switch(e.type){case"date-desc":this.filteredReceipts?.data.receipts.sort((o,l)=>new Date(l.dateReceipts||0).getTime()-new Date(o.dateReceipts||0).getTime());break;case"date-asc":this.filteredReceipts?.data.receipts.sort((o,l)=>new Date(o.dateReceipts||0).getTime()-new Date(l.dateReceipts||0).getTime());break;case"date":break;case"text":break;default:this.getPreviousYearReceipts(),this.filteredByDate=!1;break}if(this.filteredReceipts&&e.type==="text"){let o=d?this.receipts.data.receipts.filter(l=>l.receipt.toString().toLowerCase().includes(d)):[...this.receipts.data.receipts];this.filteredReceipts=E(u({},this.receipts),{data:{receipts:o}})}this.resetPagination()},this.userInfo=this._authService.getUserInfo()}ngOnInit(){this.getPreviousYearReceipts()}resetPagination(){this.currentPage=1,this.updatePagination()}updatePagination(){this.filteredReceipts?.data?.receipts?this.totalPages=Math.ceil(this.filteredReceipts.data.receipts.length/this.itemsPerPage):this.totalPages=1}getPaginatedItems(){if(!this.filteredReceipts?.data?.receipts)return[];let t=(this.currentPage-1)*this.itemsPerPage,n=t+this.itemsPerPage;return this.filteredReceipts.data.receipts.slice(t,n)}formatDate(t){return t.toISOString().split("T")[0]}changePage(t){t>=1&&t<=this.totalPages&&(this.currentPage=t)}aggregateReceipts(t){let n=t.reduce((e,d)=>{let o=d.receipt;return e[o]||(e[o]=E(u({},d),{numberOfReceipts:0})),e[o].numberOfReceipts+=1,e},{});return Object.values(n)}getPreviousYearReceipts(){let t=new Date,n=new Date(t);n.setDate(t.getDate());let e=new Date(n);e.setFullYear(n.getFullYear()-1);let d={clientcode:this.userInfo.clientCode,begindate:this.formatDate(e),enddate:this.formatDate(n)};this._commonService.getPaymentReceipts(d).subscribe({next:o=>{if(this.receipts=o,this.receipts){let l=this.aggregateReceipts(this.receipts.data.receipts);l.sort((C,S)=>new Date(S.dateReceipts||0).getTime()-new Date(C.dateReceipts||0).getTime()),this.receipts.data.receipts=l,this.filteredReceipts=u({},this.receipts),this.resetPagination()}},error:()=>{}})}static{this.\u0275fac=function(n){return new(n||i)(y(N),y(L))}}static{this.\u0275cmp=P({type:i,selectors:[["app-payment-history"]],decls:22,vars:9,consts:[[1,"flex","min-h-80","flex-col","px-6","xl:w-8/12"],[1,"items-center","justify-between","md:flex"],[1,"mt-5","text-[25px]","font-bold","text-primary-normal","xl:text-[26px]"],[1,"mt-5"],["placeholdertext","N\xFAmero de recibo",3,"filters","filterLogic"],[1,"mt-5","text-lg","font-semibold","text-secondary-strong","xl:text-[21px]"],[1,"mt-5","flex","flex-col","space-y-4"],[1,"mt-10","text-center","text-sm","italic","text-primary-subtle"],[1,"my-5","flex","items-center","justify-center","space-x-2"],[1,"rounded-full","p-2","hover:bg-[#012169]","hover:bg-opacity-[8%]","disabled:cursor-not-allowed",3,"click","disabled"],["src","assets/icons/chevron-right-icon-gray.svg","alt","arrow left",1,"rotate-180"],[1,"flex","items-center","text-sm","font-semibold","text-secondary-strong"],[1,"shadow-sm","mx-3","flex","h-6","w-6","items-center","justify-center","rounded-full","bg-gray-100","font-bold","text-secondary-strong"],["src","assets/icons/chevron-right-icon-gray.svg","alt","arrow right"],[1,"font-bold","text-primary-normal"],[3,"receipt","numberOfReceipts"]],template:function(n,e){n&1&&(s(0,"div",0)(1,"div",1)(2,"h2",2),a(3," Hist\xF3rico de pagos "),c(),s(4,"div",3),D(5,"app-search-filter",4),c()(),b(6,$,9,8,"h3",5)(7,G,2,0,"h3",5),b(8,K,3,0,"div",6),b(9,Q,2,0,"div",7),s(10,"div",8)(11,"button",9),I("click",function(){return e.changePage(e.currentPage-1)}),D(12,"img",10),c(),s(13,"div",11),a(14," P\xE1gina "),s(15,"span",12),a(16),c(),a(17," de "),s(18,"span",12),a(19),c()(),s(20,"button",9),I("click",function(){return e.changePage(e.currentPage+1)}),D(21,"img",13),c()()()),n&2&&(r(5),v("filters",e.filters)("filterLogic",e.filterLogic),r(),R(e.f
1ilteredByDate?6:7),r(2),R(e.filteredReceipts&&e.filteredReceipts.data.receipts.length>0?8:-1),r(),R(!e.filteredReceipts||e.filteredReceipts.data.receipts.length===0?9:-1),r(2),v("disabled",e.currentPage===1),r(5),g(e.currentPage),r(3),g(e.totalPages),r(),v("disabled",e.currentPage===e.totalPages))},dependencies:[U,z,_],encapsulation:2})}}return i})();export{se as PaymentHistoryComponent};
2//# sourceMappingURL=payment-history.component-UEKIFSSC.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.