dealpostools 2.5.4 → 2.5.6

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.4"}
1
+ {"name":"dealpostools","version":"2.5.6"}
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[135],{1135:(Y,d,i)=>{i.r(d),i.d(d,{PaymentBillComponent:()=>O});var c=i(6814),t=i(5879),h=i(4387),C=i(2596),u=i(9887),_=i(5986),p=i(6223),M=i(8017);let y=(()=>{var e;class s{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=(0,t.f3M)(M.O)}getImageUrls$(n={PageNumber:1,RowCount:100}){return this.http.post(`${this.domain}/api/image/SupplierInvoicePaymentImage`,n)}migrate(n){return this.http.post(`${this.domain}/api/cloudflare/migrate/SupplierInvoicePaymentImage`,{Images:n})}migrateAsync(n){const l={...n,Host:`${localStorage.getItem("Domain")}`};return this.http.post("/api/MigrateImage/SupplierInvoicePaymentImage",l)}}return(e=s).\u0275fac=function(n){return new(n||e)},e.\u0275prov=t.Yz7({token:e,factory:e.\u0275fac}),s})();var m=i(7081),Z=i(5619),v=i(7398),b=i(2181),T=i(6328),B=i(2425),f=i(7700),A=i(6493),x=i(8745),I=i(583),S=i(3988);function N(e,s){if(1&e){const o=t.EpF();t.ynx(0),t.TgZ(1,"button",17),t.NdJ("click",function(){t.CHM(o);const a=t.oxw().ngIf,l=t.oxw();return t.KtG(l.onMigrate(a))}),t._uU(2," Migrate "),t.qZA(),t.BQk()}}function $(e,s){if(1&e){const o=t.EpF();t.TgZ(0,"button",18),t.NdJ("click",function(){t.CHM(o);const a=t.oxw(2);return t.KtG(a.onMigrateAsync())}),t._uU(1," Migrate Async "),t.qZA()}}function U(e,s){if(1&e&&(t.ynx(0),t.YNc(1,N,3,0,"ng-container",15),t.YNc(2,$,2,0,"ng-template",null,16,t.W1O),t.BQk()),2&e){const o=t.MAs(3),n=t.oxw();t.xp6(1),t.Q6J("ngIf",n.totalSelected()>0)("ngIfElse",o)}}function J(e,s){if(1&e){const o=t.EpF();t.ynx(0),t.TgZ(1,"mat-checkbox",19),t.NdJ("change",function(a){const r=t.CHM(o).ngIf,g=t.oxw();return t.KtG(g.onSelectAll(a,r))}),t.qZA(),t.BQk()}}function F(e,s){1&e&&(t.ynx(0),t.TgZ(1,"th"),t._uU(2,"New URL"),t.qZA(),t.BQk())}function Q(e,s){if(1&e&&(t.ynx(0),t.TgZ(1,"div",23)(2,"span",24),t._uU(3),t.qZA()(),t.BQk()),2&e){const o=t.oxw(2).$implicit;t.xp6(3),t.Oqu(o.Message)}}function L(e,s){if(1&e&&(t.TgZ(0,"a",21),t._uU(1),t.qZA()),2&e){const o=t.oxw(2).$implicit;t.Q6J("href",o.CloudflareURL,t.LSH),t.xp6(1),t.hij(" ",o.CloudflareURL," ")}}function R(e,s){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 o=t.MAs(4),n=t.oxw().$implicit;t.xp6(2),t.Q6J("ngIf",n.Message)("ngIfElse",o)}}function w(e,s){if(1&e){const o=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"mat-checkbox",20),t.NdJ("ngModelChange",function(a){const r=t.CHM(o).$implicit;return t.KtG(r.selected=a)})("ngModelChange",function(){const l=t.CHM(o).ngForOf,r=t.oxw();return t.KtG(r.onSelect(l))}),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 o=s.$implicit,n=t.oxw();t.xp6(3),t.Q6J("ngModel",o.selected),t.xp6(2),t.Q6J("href",o.URL,t.LSH),t.xp6(1),t.hij(" ",o.URL," "),t.xp6(1),t.Q6J("ngIf",1==t.lcZ(8,5,n.onMigrate$)),t.xp6(3),t.hij(" ",t.xi3(11,7,o.Date,"dd MMM yyyy")," ")}}let O=(()=>{var e;class s{constructor(){this.billPaymentMigrate=(0,t.f3M)(y),this.billPaymentMigrate$=this.billPaymentMigrate.getImageUrls$().pipe((0,m.d)(1)),this._onMigrate=new Z.X(!1),this.onMigrate$=this._onMigrate.asObservable(),this.pagination={PageNumber:1,RowCount:100},this.toastr=(0,t.f3M)(B._W),this.dialog=(0,t.f3M)(f.uw),this.dateFilter={},this.totalSelected=(0,t.tdS)(0)}onMigrate(n){let a=n.Data.filter(r=>r.selected);if(0===a.length)return void this.toastr.error("Please select at least one image to migrate.","Error");const l=this.billPaymentMigrate.migrate(a).pipe((0,v.U)(r=>(this._onMigrate.next(!0),this.totalSelected.set(0),n.Data=n.Data.map(g=>{g.selected=!1;const P=r.find(k=>k.Path===g.Path);return g.CloudflareURL=P?.URL,g.Message=P?.Message,g}),n)));this.billPaymentMigrate$=l.pipe((0,m.d)(1))}onFilter(){this.billPaymentMigrate$=this.billPaymentMigrate.getImageUrls$({PageNumber:this.pagination.PageNumber,RowCount:this.pagination.RowCount,From:this.dateFilter.from,To:this.dateFilter.to}).pipe((0,m.d)(1))}onSelectAll(n,a){a=a.map(l=>(l.selected=n.checked,l)),this.totalSelected.set(a.filter(l=>l.selected)?.length)}onSelect(n){this.totalSelected.set(n.filter(a=>a.selected)?.length)}onMigrateAsync(){this.dialog.open(S.j,{data:{date:this.dateFilter}}).afterClosed().pipe((0,b.h)(n=>A.g.IsNotEmpty(n)),(0,T.b)(n=>this.billPaymentMigrate.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.billPaymentMigrate$=this.billPaymentMigrate.getImageUrls$().pipe((0,m.d)(1))})}onPagination(n){this.pagination.PageNumber=n.pageIndex+1,this.pagination.RowCount=n.pageSize,this.billPaymentMigrate$=this.billPaymentMigrate.getImageUrls$(this.pagination).pipe((0,m.d)(1))}}return(e=s).\u0275fac=function(n){return new(n||e)},e.\u0275cmp=t.Xpm({type:e,selectors:[["app-payment-bill"]],standalone:!0,features:[t._Bn([y]),t.jDz],decls:31,vars:19,consts:[["Title","Migrate Bill 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,a){if(1&n&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return a.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 a.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 a.onPagination(r)}),t.ALo(30,"async"),t.qZA()()()()()()),2&n){let l,r,g;t.Q6J("hideSearchBox",!0),t.xp6(6),t.Q6J("date",a.dateFilter),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,9,a.billPaymentMigrate$)),t.xp6(10),t.Q6J("ngIf",null==(l=t.lcZ(19,11,a.billPaymentMigrate$))?null:l.Data),t.xp6(4),t.Q6J("ngIf",1==t.lcZ(23,13,a.onMigrate$)),t.xp6(5),t.Q6J("ngForOf",null==(r=t.lcZ(28,15,a.billPaymentMigrate$))?null:r.Data),t.xp6(2),t.Q6J("length",null==(g=t.lcZ(30,17,a.billPaymentMigrate$))?null:g.Count)("pageSize",a.pagination.RowCount)("pageIndex",0==a.pagination.PageNumber?0:a.pagination.PageNumber-1)}},dependencies:[c.ez,c.sg,c.O5,c.Ov,c.uU,h.R,h.p,C.AV,u.TU,u.NW,_.p9,_.oG,p.u5,p.JJ,p.On,f.Is,x.C8,x.Pg,I.ZU]}),s})()}}]);
@@ -1 +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})()}}]);
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),this.totalSelected.set(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})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[431],{4431:(Q,_,r)=>{r.r(_),r.d(_,{CustomerFeedbackComponent:()=>N});var f=r(5915),e=r(5879);let u=(()=>{var n;class c extends f.k{constructor(){super("CustomerFeedBackImage")}}return(n=c).\u0275fac=function(o){return new(o||n)},n.\u0275prov=e.Yz7({token:n,factory:n.\u0275fac}),c})();var x=r(1932),l=r(6814),p=r(4387),b=r(2596),d=r(9887),C=r(5986),m=r(6223),k=r(8745);function h(n,c){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"button",12),e.NdJ("click",function(){e.CHM(t);const a=e.oxw().ngIf,i=e.oxw();return e.KtG(i.onMigrate(a))}),e._uU(2," Migrate "),e.qZA(),e.BQk()}}function Z(n,c){if(1&n){const t=e.EpF();e.TgZ(0,"button",13),e.NdJ("click",function(){e.CHM(t);const a=e.oxw(2);return e.KtG(a.onMigrateAsync())}),e._uU(1," Migrate Async "),e.qZA()}}function F(n,c){if(1&n&&(e.ynx(0),e.YNc(1,h,3,0,"ng-container",10),e.YNc(2,Z,2,0,"ng-template",null,11,e.W1O),e.BQk()),2&n){const t=e.MAs(3),o=e.oxw();e.xp6(1),e.Q6J("ngIf",o.totalSelected()>0)("ngIfElse",t)}}function T(n,c){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"mat-checkbox",14),e.NdJ("change",function(a){const s=e.CHM(t).ngIf,g=e.oxw();return e.KtG(g.onSelectAll(a,s))}),e.qZA(),e.BQk()}}function A(n,c){1&n&&(e.ynx(0),e.TgZ(1,"th"),e._uU(2,"New URL"),e.qZA(),e.BQk())}function v(n,c){if(1&n&&(e.ynx(0),e.TgZ(1,"div",18)(2,"span",19),e._uU(3),e.qZA()(),e.BQk()),2&n){const t=e.oxw(2).$implicit;e.xp6(3),e.Oqu(t.Message)}}function M(n,c){if(1&n&&(e.TgZ(0,"a",16),e._uU(1),e.qZA()),2&n){const t=e.oxw(2).$implicit;e.Q6J("href",t.CloudflareURL,e.LSH),e.xp6(1),e.hij(" ",t.CloudflareURL," ")}}function y(n,c){if(1&n&&(e.ynx(0),e.TgZ(1,"td"),e.YNc(2,v,4,1,"ng-container",10),e.YNc(3,M,2,2,"ng-template",null,17,e.W1O),e.qZA(),e.BQk()),2&n){const t=e.MAs(4),o=e.oxw().$implicit;e.xp6(2),e.Q6J("ngIf",o.Message)("ngIfElse",t)}}function J(n,c){if(1&n){const t=e.EpF();e.ynx(0),e.TgZ(1,"tr")(2,"td")(3,"mat-checkbox",15),e.NdJ("ngModelChange",function(a){const s=e.CHM(t).$implicit;return e.KtG(s.selected=a)})("ngModelChange",function(){const i=e.CHM(t).ngForOf,s=e.oxw();return e.KtG(s.onSelect(i))}),e.qZA()(),e.TgZ(4,"td")(5,"a",16),e._uU(6),e.qZA()(),e.YNc(7,y,5,2,"ng-container",1),e.ALo(8,"async"),e.qZA(),e.BQk()}if(2&n){const t=c.$implicit,o=e.oxw();e.xp6(3),e.Q6J("ngModel",t.selected),e.xp6(2),e.Q6J("href",t.URL,e.LSH),e.xp6(1),e.hij(" ",t.URL," "),e.xp6(1),e.Q6J("ngIf",1==e.lcZ(8,4,o.onMigrate$))}}let N=(()=>{var n;class c extends x.X{constructor(o){super(o,!0),this.customerFeedbackService=o}}return(n=c).\u0275fac=function(o){return new(o||n)(e.Y36(u))},n.\u0275cmp=e.Xpm({type:n,selectors:[["app-customer-feedback"]],standalone:!0,features:[e._Bn([u]),e.qOj,e.jDz],decls:23,vars:19,consts:[["Title","Migrate Customer Image",3,"hideSearchBox","hideSearchDropdown","onSubmit"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[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(o,a){if(1&o&&(e.TgZ(0,"mainpanel",0),e.NdJ("onSubmit",function(){return a.onFilter()}),e.TgZ(1,"actions"),e.YNc(2,F,4,2,"ng-container",1),e.ALo(3,"async"),e.qZA(),e.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"table",5)(9,"thead",6)(10,"tr")(11,"th",7),e.YNc(12,T,2,0,"ng-container",1),e.ALo(13,"async"),e.qZA(),e.TgZ(14,"th"),e._uU(15,"Old URL"),e.qZA(),e.YNc(16,A,3,0,"ng-container",1),e.ALo(17,"async"),e.qZA()(),e.TgZ(18,"tbody"),e.YNc(19,J,9,6,"ng-container",8),e.ALo(20,"async"),e.qZA()(),e.TgZ(21,"mat-paginator",9),e.NdJ("page",function(s){return a.onPagination(s)}),e.ALo(22,"async"),e.qZA()()()()()()),2&o){let i,s,g;e.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),e.xp6(2),e.Q6J("ngIf",e.lcZ(3,9,a.imageMigrate$)),e.xp6(10),e.Q6J("ngIf",null==(i=e.lcZ(13,11,a.imageMigrate$))?null:i.Data),e.xp6(4),e.Q6J("ngIf",1==e.lcZ(17,13,a.onMigrate$)),e.xp6(3),e.Q6J("ngForOf",null==(s=e.lcZ(20,15,a.imageMigrate$))?null:s.Data),e.xp6(2),e.Q6J("length",null==(g=e.lcZ(22,17,a.imageMigrate$))?null:g.Count)("pageSize",a.pagination.RowCount)("pageIndex",0==a.pagination.PageNumber?0:a.pagination.PageNumber-1)}},dependencies:[l.ez,l.sg,l.O5,l.Ov,p.R,p.p,b.AV,d.TU,d.NW,C.p9,C.oG,m.u5,m.JJ,m.On,k.C8]}),c})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[528],{528:(B,m,i)=>{i.r(m),i.d(m,{PrepaidPackageComponent:()=>L});var l=i(6814),t=i(5879),h=i(4387),x=i(2596),p=i(7081),k=i(5619),C=i(7398),M=i(2181),v=i(6328),u=i(9887),P=i(5986),d=i(6223),Z=i(2425),T=i(7700),y=i(3988),A=i(6493),S=i(8745),I=i(8017);let f=(()=>{var a;class c{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=(0,t.f3M)(I.O)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.http.post(`${this.domain}/api/image/PrepaidPackage`,e)}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/PrepaidPackage`,{Images:e})}migrateAsync(e){const r={...e,Host:`${localStorage.getItem("Domain")}`};return this.http.post("/api/MigrateImage/PrepaidPackage",r)}}return(a=c).\u0275fac=function(e){return new(e||a)},a.\u0275prov=t.Yz7({token:a,factory:a.\u0275fac}),c})();function N(a,c){if(1&a){const o=t.EpF();t.ynx(0),t.TgZ(1,"button",12),t.NdJ("click",function(){t.CHM(o);const n=t.oxw().ngIf,r=t.oxw();return t.KtG(r.onMigrate(n))}),t._uU(2," Migrate "),t.qZA(),t.BQk()}}function $(a,c){if(1&a){const o=t.EpF();t.TgZ(0,"button",13),t.NdJ("click",function(){t.CHM(o);const n=t.oxw(2);return t.KtG(n.onMigrateAsync())}),t._uU(1," Migrate Async "),t.qZA()}}function b(a,c){if(1&a&&(t.ynx(0),t.YNc(1,N,3,0,"ng-container",10),t.YNc(2,$,2,0,"ng-template",null,11,t.W1O),t.BQk()),2&a){const o=t.MAs(3),e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.totalSelected()>0)("ngIfElse",o)}}function U(a,c){if(1&a){const o=t.EpF();t.ynx(0),t.TgZ(1,"mat-checkbox",14),t.NdJ("change",function(n){const g=t.CHM(o).ngIf,s=t.oxw();return t.KtG(s.onSelectAll(n,g))}),t.qZA(),t.BQk()}}function J(a,c){1&a&&(t.ynx(0),t.TgZ(1,"th"),t._uU(2,"New URL"),t.qZA(),t.BQk())}function Q(a,c){if(1&a&&(t.ynx(0),t.TgZ(1,"div",18)(2,"span",19),t._uU(3),t.qZA()(),t.BQk()),2&a){const o=t.oxw(2).$implicit;t.xp6(3),t.Oqu(o.Message)}}function R(a,c){if(1&a&&(t.TgZ(0,"a",16),t._uU(1),t.qZA()),2&a){const o=t.oxw(2).$implicit;t.Q6J("href",o.CloudflareURL,t.LSH),t.xp6(1),t.hij(" ",o.CloudflareURL," ")}}function w(a,c){if(1&a&&(t.ynx(0),t.TgZ(1,"td"),t.YNc(2,Q,4,1,"ng-container",10),t.YNc(3,R,2,2,"ng-template",null,17,t.W1O),t.qZA(),t.BQk()),2&a){const o=t.MAs(4),e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngIf",e.Message)("ngIfElse",o)}}function F(a,c){if(1&a){const o=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"mat-checkbox",15),t.NdJ("ngModelChange",function(n){const g=t.CHM(o).$implicit;return t.KtG(g.selected=n)})("ngModelChange",function(){const r=t.CHM(o).ngForOf,g=t.oxw();return t.KtG(g.onSelect(r))}),t.qZA()(),t.TgZ(4,"td")(5,"a",16),t._uU(6),t.qZA()(),t.YNc(7,w,5,2,"ng-container",1),t.ALo(8,"async"),t.qZA(),t.BQk()}if(2&a){const o=c.$implicit,e=t.oxw();t.xp6(3),t.Q6J("ngModel",o.selected),t.xp6(2),t.Q6J("href",o.URL,t.LSH),t.xp6(1),t.hij(" ",o.URL," "),t.xp6(1),t.Q6J("ngIf",1==t.lcZ(8,4,e.onMigrate$))}}let L=(()=>{var a;class c{constructor(){this.prepaidPackageMigrate=(0,t.f3M)(f),this.prepaidPackageMigrate$=this.prepaidPackageMigrate.getImageUrls$().pipe((0,p.d)(1)),this._onMigrate=new k.X(!1),this.onMigrate$=this._onMigrate.asObservable(),this.pagination={PageNumber:1,RowCount:100},this.toastr=(0,t.f3M)(Z._W),this.dialog=(0,t.f3M)(T.uw),this.dateFilter={},this.totalSelected=(0,t.tdS)(0)}onMigrate(e){let n=e.Data.filter(g=>g.selected);if(0===n.length)return void this.toastr.error("Please select at least one image to migrate.","Error");const r=this.prepaidPackageMigrate.migrate(n).pipe((0,C.U)(g=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(s=>{s.selected=!1;const _=g.find(O=>O.Path===s.Path);return s.CloudflareURL=_?.URL,s.Message=_?.Message,s}),e)));this.prepaidPackageMigrate$=r.pipe((0,p.d)(1))}onSelectAll(e,n){n=n.map(r=>(r.selected=e.checked,r)),this.totalSelected.set(n.filter(r=>r.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(n=>n.selected)?.length)}onMigrateAsync(){this.dialog.open(y.j,{data:{showDateFilter:!1}}).afterClosed().pipe((0,M.h)(e=>A.g.IsNotEmpty(e)),(0,v.b)(e=>this.prepaidPackageMigrate.migrateAsync({PageNumber:e.pageNumber,RowCount:e.rowCount}))).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.prepaidPackageMigrate$=this.prepaidPackageMigrate.getImageUrls$().pipe((0,p.d)(1))})}onFilter(){this.prepaidPackageMigrate$=this.prepaidPackageMigrate.getImageUrls$({PageNumber:this.pagination.PageNumber,RowCount:this.pagination.RowCount,From:this.dateFilter.from,To:this.dateFilter.to}).pipe((0,p.d)(1))}onPagination(e){this.pagination.PageNumber=e.pageIndex+1,this.pagination.RowCount=e.pageSize,this.prepaidPackageMigrate$=this.prepaidPackageMigrate.getImageUrls$(this.pagination).pipe((0,p.d)(1))}}return(a=c).\u0275fac=function(e){return new(e||a)},a.\u0275cmp=t.Xpm({type:a,selectors:[["app-prepaid-package"]],standalone:!0,features:[t._Bn([f]),t.jDz],decls:23,vars:19,consts:[["Title","Migrate Prepaid Package",3,"hideSearchBox","hideSearchDropdown","onSubmit"],[4,"ngIf"],[1,"container-fluid"],[1,"row"],[1,"col-12"],[1,"table","mt-8"],[1,"thead-light"],[2,"width","5px"],[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(e,n){if(1&e&&(t.TgZ(0,"mainpanel",0),t.NdJ("onSubmit",function(){return n.onFilter()}),t.TgZ(1,"actions"),t.YNc(2,b,4,2,"ng-container",1),t.ALo(3,"async"),t.qZA(),t.TgZ(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"table",5)(9,"thead",6)(10,"tr")(11,"th",7),t.YNc(12,U,2,0,"ng-container",1),t.ALo(13,"async"),t.qZA(),t.TgZ(14,"th"),t._uU(15,"Old URL"),t.qZA(),t.YNc(16,J,3,0,"ng-container",1),t.ALo(17,"async"),t.qZA()(),t.TgZ(18,"tbody"),t.YNc(19,F,9,6,"ng-container",8),t.ALo(20,"async"),t.qZA()(),t.TgZ(21,"mat-paginator",9),t.NdJ("page",function(g){return n.onPagination(g)}),t.ALo(22,"async"),t.qZA()()()()()()),2&e){let r,g,s;t.Q6J("hideSearchBox",!0)("hideSearchDropdown",!0),t.xp6(2),t.Q6J("ngIf",t.lcZ(3,9,n.prepaidPackageMigrate$)),t.xp6(10),t.Q6J("ngIf",null==(r=t.lcZ(13,11,n.prepaidPackageMigrate$))?null:r.Data),t.xp6(4),t.Q6J("ngIf",1==t.lcZ(17,13,n.onMigrate$)),t.xp6(3),t.Q6J("ngForOf",null==(g=t.lcZ(20,15,n.prepaidPackageMigrate$))?null:g.Data),t.xp6(2),t.Q6J("length",null==(s=t.lcZ(22,17,n.prepaidPackageMigrate$))?null:s.Count)("pageSize",n.pagination.RowCount)("pageIndex",0==n.pagination.PageNumber?0:n.pagination.PageNumber-1)}},dependencies:[l.ez,l.sg,l.O5,l.Ov,h.R,h.p,x.AV,u.TU,u.NW,P.p9,P.oG,d.u5,d.JJ,d.On,S.C8]}),c})()}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkweb_tools=self.webpackChunkweb_tools||[]).push([[572],{4572:(B,u,r)=>{r.r(u),r.d(u,{ProductComponent:()=>O});var l=r(6814),t=r(5879),m=r(4387),M=r(2596),p=r(7081),P=r(5619),Z=r(7398),T=r(2181),v=r(6328),h=r(9887),_=r(5986),d=r(6223),y=r(2425),A=r(7700),I=r(3988),N=r(6493),f=r(8745),S=r(8017);let x=(()=>{var n;class s{constructor(){this.domain=`https://${localStorage.getItem("Domain")}`,this.http=(0,t.f3M)(S.O)}getImageUrls$(e={PageNumber:1,RowCount:100}){return this.http.post(`${this.domain}/api/image/ProductImage`,e)}migrate(e){return this.http.post(`${this.domain}/api/cloudflare/migrate/ProductImage`,{Images:e})}migrateAsync(e){const i={...e,Host:`${localStorage.getItem("Domain")}`};return this.http.post("/api/MigrateImage/ProductImage",i)}}return(n=s).\u0275fac=function(e){return new(e||n)},n.\u0275prov=t.Yz7({token:n,factory:n.\u0275fac}),s})();function $(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"button",17),t.NdJ("click",function(){t.CHM(a);const o=t.oxw().ngIf,i=t.oxw();return t.KtG(i.onMigrate(o))}),t._uU(2," Migrate "),t.qZA(),t.BQk()}}function b(n,s){if(1&n){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(n,s){if(1&n&&(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&n){const a=t.MAs(3),e=t.oxw();t.xp6(1),t.Q6J("ngIf",e.totalSelected()>0)("ngIfElse",a)}}function J(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"mat-checkbox",19),t.NdJ("change",function(o){const c=t.CHM(a).ngIf,g=t.oxw();return t.KtG(g.onSelectAll(o,c))}),t.qZA(),t.BQk()}}function F(n,s){1&n&&(t.ynx(0),t.TgZ(1,"th"),t._uU(2,"New URL"),t.qZA(),t.BQk())}function Q(n,s){if(1&n&&(t.ynx(0),t.TgZ(1,"div",23)(2,"span",24),t._uU(3),t.qZA()(),t.BQk()),2&n){const a=t.oxw(2).$implicit;t.xp6(3),t.Oqu(a.Message)}}function L(n,s){if(1&n&&(t.TgZ(0,"a",21),t._uU(1),t.qZA()),2&n){const a=t.oxw(2).$implicit;t.Q6J("href",a.CloudflareURL,t.LSH),t.xp6(1),t.hij(" ",a.CloudflareURL," ")}}function R(n,s){if(1&n&&(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&n){const a=t.MAs(4),e=t.oxw().$implicit;t.xp6(2),t.Q6J("ngIf",e.Message)("ngIfElse",a)}}function w(n,s){if(1&n){const a=t.EpF();t.ynx(0),t.TgZ(1,"tr")(2,"td")(3,"mat-checkbox",20),t.NdJ("ngModelChange",function(o){const c=t.CHM(a).$implicit;return t.KtG(c.selected=o)})("ngModelChange",function(){const i=t.CHM(a).ngForOf,c=t.oxw();return t.KtG(c.onSelect(i))}),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&n){const a=s.$implicit,e=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,e.onMigrate$)),t.xp6(3),t.hij(" ",t.xi3(11,7,a.Date,"dd MMM yyyy")," ")}}let O=(()=>{var n;class s{constructor(){this.productMigrate=(0,t.f3M)(x),this.productMigrate$=this.productMigrate.getImageUrls$().pipe((0,p.d)(1)),this._onMigrate=new P.X(!1),this.onMigrate$=this._onMigrate.asObservable(),this.pagination={PageNumber:1,RowCount:100},this.toastr=(0,t.f3M)(y._W),this.dialog=(0,t.f3M)(A.uw),this.dateFilter={},this.totalSelected=(0,t.tdS)(0)}onMigrate(e){let o=e.Data.filter(c=>c.selected);if(0===o.length)return void this.toastr.error("Please select at least one image to migrate.","Error");const i=this.productMigrate.migrate(o).pipe((0,Z.U)(c=>(this._onMigrate.next(!0),this.totalSelected.set(0),e.Data=e.Data.map(g=>{g.selected=!1;const C=c.find(k=>k.Path===g.Path);return g.CloudflareURL=C?.URL,g.Message=C?.Message,g}),e)));this.productMigrate$=i.pipe((0,p.d)(1))}onSelectAll(e,o){o=o.map(i=>(i.selected=e.checked,i)),this.totalSelected.set(o.filter(i=>i.selected)?.length)}onSelect(e){this.totalSelected.set(e.filter(o=>o.selected)?.length)}onMigrateAsync(){this.dialog.open(I.j,{data:{showDateFilter:!1}}).afterClosed().pipe((0,T.h)(e=>N.g.IsNotEmpty(e)),(0,v.b)(e=>this.productMigrate.migrateAsync({PageNumber:e.pageNumber,RowCount:e.rowCount}))).subscribe(e=>{this.toastr.warning(e.message,"Migrate In Progress",{toastClass:"ngx-toastr toast-waiting"}),this.productMigrate$=this.productMigrate.getImageUrls$().pipe((0,p.d)(1))})}onFilter(){this.productMigrate$=this.productMigrate.getImageUrls$({PageNumber:this.pagination.PageNumber,RowCount:this.pagination.RowCount,From:this.dateFilter.from,To:this.dateFilter.to}).pipe((0,p.d)(1))}onPagination(e){this.pagination.PageNumber=e.pageIndex+1,this.pagination.RowCount=e.pageSize,this.productMigrate$=this.productMigrate.getImageUrls$(this.pagination).pipe((0,p.d)(1))}}return(n=s).\u0275fac=function(e){return new(e||n)},n.\u0275cmp=t.Xpm({type:n,selectors:[["app-product-image"]],standalone:!0,features:[t._Bn([x]),t.jDz],decls:31,vars:19,consts:[["Title","Migrate Product Image",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(e,o){if(1&e&&(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(c){return o.dateFilter=c}),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,"Created"),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(c){return o.onPagination(c)}),t.ALo(30,"async"),t.qZA()()()()()()),2&e){let i,c,g;t.Q6J("hideSearchBox",!0),t.xp6(6),t.Q6J("date",o.dateFilter),t.xp6(2),t.Q6J("ngIf",t.lcZ(9,9,o.productMigrate$)),t.xp6(10),t.Q6J("ngIf",null==(i=t.lcZ(19,11,o.productMigrate$))?null:i.Data),t.xp6(4),t.Q6J("ngIf",1==t.lcZ(23,13,o.onMigrate$)),t.xp6(5),t.Q6J("ngForOf",null==(c=t.lcZ(28,15,o.productMigrate$))?null:c.Data),t.xp6(2),t.Q6J("length",null==(g=t.lcZ(30,17,o.productMigrate$))?null:g.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,m.R,m.p,M.AV,h.TU,h.NW,_.p9,_.oG,d.u5,d.JJ,d.On,f.C8,f.Pg]}),s})()}}]);