dealpostools 2.5.3 → 2.5.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"dealpostools","version":"2.5.3"}
1
+ {"name":"dealpostools","version":"2.5.4"}
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[153],{8656:(B,d,i)=>{i.r(d),i.d(d,{InvoicePaymentComponent:()=>O});var l=i(6814),t=i(5879),h=i(4387),x=i(2596),I=i(8017);let u=(()=>{var e;class g{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=(0,t.f3M)(I.O)}getImageUrls$(n={PageNumber:1,RowCount:100}){return this.http.post(`${this.domain}/api/image/InvoicePaymentImage`,n)}migrate(n){return this.http.post(`${this.domain}/api/cloudflare/migrate/InvoicePaymentImage`,{Images:n})}migrateAsync(n){const c={...n,Host:`${localStorage.getItem("Domain")}`};return this.http.post("/api/MigrateImage/InvoicePaymentImage",c)}}return(e=g).\u0275fac=function(n){return new(n||e)},e.\u0275prov=t.Yz7({token:e,factory:e.\u0275fac}),g})();var m=i(7081),P=i(5619),C=i(7398),M=i(2181),Z=i(6328),_=i(9887),v=i(5986),p=i(6223),T=i(2425),A=i(7700),N=i(3988),S=i(6493),y=i(8745);function $(e,g){if(1&e){const a=t.EpF();t.ynx(0),t.TgZ(1,"button",17),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().ngIf,c=t.oxw();return t.KtG(c.onMigrate(o))}),t._uU(2," Migrate "),t.qZA(),t.BQk()}}function b(e,g){if(1&e){const a=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(a);const o=t.oxw(2);return t.KtG(o.onMigrateAsync())}),t._uU(1," Migrate Async "),t.qZA()}}function U(e,g){if(1&e&&(t.ynx(0),t.YNc(1,$,3,0,"ng-container",15),t.YNc(2,b,2,0,"ng-template",null,16,t.W1O),t.BQk()),2&e){const a=t.MAs(3),n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.totalSelected()>0)("ngIfElse",a)}}function J(e,g){if(1&e){const a=t.EpF();t.ynx(0),t.TgZ(1,"mat-checkbox",19),t.NdJ("change",function(o){const r=t.CHM(a).ngIf,s=t.oxw();return t.KtG(s.onSelectAll(o,r))}),t.qZA(),t.BQk()}}function F(e,g){1&e&&(t.ynx(0),t.TgZ(1,"th"),t._uU(2,"New URL"),t.qZA(),t.BQk())}function Q(e,g){if(1&e&&(t.ynx(0),t.TgZ(1,"div",23)(2,"span",24),t._uU(3),t.qZA()(),t.BQk()),2&e){const a=t.oxw(2).$implicit;t.xp6(3),t.Oqu(a.Message)}}function L(e,g){if(1&e&&(t.TgZ(0,"a",21),t._uU(1),t.qZA()),2&e){const a=t.oxw(2).$implicit;t.Q6J("href",a.CloudflareURL,t.LSH),t.xp6(1),t.hij(" ",a.CloudflareURL," ")}}function R(e,g){if(1&e&&(t.ynx(0),t.TgZ(1,"td"),t.YNc(2,Q,4,1,"ng-container",15),t.YNc(3,L,2,2,"ng-template",null,22,t.W1O),t.qZA(),t.BQk()),2&e){const a=t.MAs(4),n=t.oxw().$implicit;t.xp6(2),t.Q6J("ngIf",n.Message)("ngIfElse",a)}}function w(e,g){if(1&e){const a=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"mat-checkbox",20),t.NdJ("ngModelChange",function(o){const r=t.CHM(a).$implicit;return t.KtG(r.selected=o)})("ngModelChange",function(){const c=t.CHM(a).ngForOf,r=t.oxw();return t.KtG(r.onSelect(c))}),t.qZA()(),t.TgZ(4,"td")(5,"a",21),t._uU(6),t.qZA()(),t.YNc(7,R,5,2,"ng-container",5),t.ALo(8,"async"),t.TgZ(9,"td"),t._uU(10),t.ALo(11,"date"),t.qZA()(),t.BQk()}if(2&e){const a=g.$implicit,n=t.oxw();t.xp6(3),t.Q6J("ngModel",a.selected),t.xp6(2),t.Q6J("href",a.URL,t.LSH),t.xp6(1),t.hij(" ",a.URL," "),t.xp6(1),t.Q6J("ngIf",1==t.lcZ(8,5,n.onMigrate$)),t.xp6(3),t.hij(" ",t.xi3(11,7,a.Date,"dd MMM yyyy")," ")}}let O=(()=>{var e;class g{constructor(){this.invoicePaymentMigrate=(0,t.f3M)(u),this.invoicePaymentMigrate$=this.invoicePaymentMigrate.getImageUrls$().pipe((0,m.d)(1)),this._onMigrate=new P.X(!1),this.onMigrate$=this._onMigrate.asObservable(),this.pagination={PageNumber:1,RowCount:100},this.toastr=(0,t.f3M)(T._W),this.dialog=(0,t.f3M)(A.uw),this.dateFilter={},this.totalSelected=(0,t.tdS)(0)}onMigrate(n){let o=n.Data.filter(r=>r.selected);if(0===o.length)return void this.toastr.error("Please select at least one image to migrate.","Error");const c=this.invoicePaymentMigrate.migrate(o).pipe((0,C.U)(r=>(this._onMigrate.next(!0),n.Data=n.Data.map(s=>{s.selected=!1;const f=r.find(k=>k.Path===s.Path);return s.CloudflareURL=f?.URL,s.Message=f?.Message,s}),n)));this.invoicePaymentMigrate$=c.pipe((0,m.d)(1))}onSelectAll(n,o){o=o.map(c=>(c.selected=n.checked,c)),this.totalSelected.set(o.filter(c=>c.selected)?.length)}onSelect(n){this.totalSelected.set(n.filter(o=>o.selected)?.length)}onMigrateAsync(){this.dialog.open(N.j,{data:{date:this.dateFilter}}).afterClosed().pipe((0,M.h)(n=>S.g.IsNotEmpty(n)),(0,Z.b)(n=>this.invoicePaymentMigrate.migrateAsync({PageNumber:n.pageNumber,RowCount:n.rowCount,From:n.from,To:n.to}))).subscribe(n=>{this.toastr.warning(n.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.invoicePaymentMigrate$=this.invoicePaymentMigrate.getImageUrls$().pipe((0,m.d)(1))})}onFilter(){this.invoicePaymentMigrate$=this.invoicePaymentMigrate.getImageUrls$({PageNumber:this.pagination.PageNumber,RowCount:this.pagination.RowCount,From:this.dateFilter.from,To:this.dateFilter.to}).pipe((0,m.d)(1))}onPagination(n){this.pagination.PageNumber=n.pageIndex+1,this.pagination.RowCount=n.pageSize,this.invoicePaymentMigrate$=this.invoicePaymentMigrate.getImageUrls$(this.pagination).pipe((0,m.d)(1))}}return(e=g).\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-invoice-payment"]],standalone:!0,features:[t._Bn([u]),t.jDz],decls:31,vars:19,consts:[["Title","Migrate Invoice Payment",3,"hideSearchBox","onSubmit"],[1,"d-flex"],["container",""],[1,"mb-2"],[3,"date","dateChange"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[2,"width","120px"],[4,"ngFor","ngForOf"],[3,"length","pageSize","pageIndex","page"],[4,"ngIf","ngIfElse"],["ASYNC",""],["type","button",1,"btn","btn-success","shadow","rounded",3,"click"],["type","button",1,"btn","btn-success","shadow","rounded","me-3",3,"click"],["color","primary",3,"change"],["color","primary",3,"ngModel","ngModelChange"],["target","_blank",1,"text-break",3,"href"],["SHOW_URL",""],[1,"text-break"],[1,"text-danger"]],template:function(n,o){if(1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return o.onFilter()}),t.TgZ(1,"filters")(2,"div",1)(3,"div",2)(4,"h6",3),t._uU(5,"From - To"),t.qZA(),t.TgZ(6,"app-datepicker-range",4),t.NdJ("dateChange",function(r){return o.dateFilter=r}),t.qZA()()()(),t.TgZ(7,"actions"),t.YNc(8,U,4,2,"ng-container",5),t.ALo(9,"async"),t.qZA(),t.TgZ(10,"content")(11,"div",6)(12,"div",7)(13,"div",8)(14,"table",9)(15,"thead",10)(16,"tr")(17,"th",11),t.YNc(18,J,2,0,"ng-container",5),t.ALo(19,"async"),t.qZA(),t.TgZ(20,"th"),t._uU(21,"Old URL"),t.qZA(),t.YNc(22,F,3,0,"ng-container",5),t.ALo(23,"async"),t.TgZ(24,"th",12),t._uU(25,"Payment Date"),t.qZA()()(),t.TgZ(26,"tbody"),t.YNc(27,w,12,10,"ng-container",13),t.ALo(28,"async"),t.qZA()(),t.TgZ(29,"mat-paginator",14),t.NdJ("page",function(r){return o.onPagination(r)}),t.ALo(30,"async"),t.qZA()()()()()()),2&n){let c,r,s;t.Q6J("hideSearchBox",!0),t.xp6(6),t.Q6J("date",o.dateFilter),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,9,o.invoicePaymentMigrate$)),t.xp6(10),t.Q6J("ngIf",null==(c=t.lcZ(19,11,o.invoicePaymentMigrate$))?null:c.Data),t.xp6(4),t.Q6J("ngIf",1==t.lcZ(23,13,o.onMigrate$)),t.xp6(5),t.Q6J("ngForOf",null==(r=t.lcZ(28,15,o.invoicePaymentMigrate$))?null:r.Data),t.xp6(2),t.Q6J("length",null==(s=t.lcZ(30,17,o.invoicePaymentMigrate$))?null:s.Count)("pageSize",o.pagination.RowCount)("pageIndex",0==o.pagination.PageNumber?0:o.pagination.PageNumber-1)}},dependencies:[l.ez,l.sg,l.O5,l.Ov,l.uU,h.R,h.p,x.AV,_.TU,_.NW,v.p9,v.oG,p.u5,p.JJ,p.On,y.C8,y.Pg]}),g})()}}]);