marketplacepos 3.23.1 → 3.23.3

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.
Files changed (39) hide show
  1. package/Marketplace/{chunk-XTU6D7FF.js → chunk-37U2QWW4.js} +1 -1
  2. package/Marketplace/{chunk-ZUWZSCZI.js → chunk-45WE4DCV.js} +1 -1
  3. package/Marketplace/chunk-4BYGZ6ZX.js +93 -0
  4. package/Marketplace/{chunk-S3IIGX3A.js → chunk-4VL2M2J3.js} +2 -2
  5. package/Marketplace/{chunk-CJR3CWTG.js → chunk-5C256WOF.js} +1 -1
  6. package/Marketplace/{chunk-QQRZLJVK.js → chunk-5Y2RCGGZ.js} +1 -1
  7. package/Marketplace/{chunk-4K24LK5D.js → chunk-5YQCJMOO.js} +1 -1
  8. package/Marketplace/{chunk-OKHO6QPY.js → chunk-AQUAUJAL.js} +1 -1
  9. package/Marketplace/{chunk-BTCI4J5S.js → chunk-BVALIHDS.js} +1 -1
  10. package/Marketplace/{chunk-VEUJBLGF.js → chunk-C3RPJXVH.js} +1 -1
  11. package/Marketplace/{chunk-QFCVVQFA.js → chunk-D7BOTNZP.js} +1 -1
  12. package/Marketplace/{chunk-M435ASCR.js → chunk-DQIPTZLE.js} +1 -1
  13. package/Marketplace/chunk-EGQH63JK.js +1 -0
  14. package/Marketplace/{chunk-JSMWQ2BB.js → chunk-FARFEISL.js} +1 -1
  15. package/Marketplace/{chunk-PGYOSNSB.js → chunk-FPBY3HZR.js} +1 -1
  16. package/Marketplace/{chunk-DGDJICZA.js → chunk-FWRFA4UE.js} +1 -1
  17. package/Marketplace/{chunk-4RQGDS4U.js → chunk-GCKOWEZA.js} +1 -1
  18. package/Marketplace/{chunk-AQVZFCT5.js → chunk-H37S72CB.js} +1 -1
  19. package/Marketplace/{chunk-5CMHP3Y6.js → chunk-HN56DIDB.js} +1 -1
  20. package/Marketplace/{chunk-SCXRA7PD.js → chunk-HWMNU5IS.js} +1 -1
  21. package/Marketplace/{chunk-GIKQQS3T.js → chunk-IZNP7RTH.js} +1 -1
  22. package/Marketplace/{chunk-UZFNQS4G.js → chunk-JLZWCXAU.js} +1 -1
  23. package/Marketplace/{chunk-XZENNBFW.js → chunk-JQVRJL45.js} +1 -1
  24. package/Marketplace/{chunk-DYSDYXLW.js → chunk-PYMNNVIN.js} +1 -1
  25. package/Marketplace/{chunk-IDWDF4FV.js → chunk-RJSZUJBC.js} +1 -1
  26. package/Marketplace/{chunk-6SIZ4MMS.js → chunk-RKRG5VIR.js} +1 -1
  27. package/Marketplace/{chunk-MDDDR6RZ.js → chunk-SCY3CDYQ.js} +1 -1
  28. package/Marketplace/{chunk-LOUGYJ7W.js → chunk-UFIHQLID.js} +1 -1
  29. package/Marketplace/{chunk-PYUHUWFC.js → chunk-WSLAYRCA.js} +1 -1
  30. package/Marketplace/{chunk-ZUDP2DLF.js → chunk-WW6BQ4KG.js} +1 -1
  31. package/Marketplace/{chunk-MJS75ZNN.js → chunk-X7HFDXDQ.js} +1 -1
  32. package/Marketplace/{chunk-UQQ6V37M.js → chunk-XH43ICFG.js} +1 -1
  33. package/Marketplace/{chunk-T6UUYNDX.js → chunk-ZNY375RR.js} +1 -1
  34. package/Marketplace/index.html +2 -2
  35. package/Marketplace/{main-PEDZ3WKT.js → main-4V2JX3QV.js} +1 -1
  36. package/Marketplace/{styles-BTL6DIRV.css → styles-VNC3CHFK.css} +1 -1
  37. package/package.json +1 -1
  38. package/Marketplace/chunk-7S7ALPNB.js +0 -1
  39. package/Marketplace/chunk-UYJ6AQMM.js +0 -1
@@ -1 +1 @@
1
- import{a as re}from"./chunk-RENQ3YZH.js";import{a as de,b as me}from"./chunk-LJHZMQZD.js";import"./chunk-MY4B7K3R.js";import"./chunk-FGPSBTFS.js";import"./chunk-ADRVUMMW.js";import{a as ae,b as le}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as $,b as ee,d as te,e as ie}from"./chunk-CCXKODFV.js";import{i as Z}from"./chunk-6SIZ4MMS.js";import{e as X}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{m as ne,n as oe}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as G,h as H,m as Y,o as J,y as K}from"./chunk-BSN7ZAXG.js";import{c as Q}from"./chunk-64G3XLI6.js";import{p as j,r as q}from"./chunk-OVEJFFL6.js";import{$b as v,Bd as A,Cd as U,Da as c,Ea as u,Eb as C,Gb as p,Gc as T,Hc as F,Ic as R,Jc as W,Sb as e,Tb as t,Ub as S,Vb as x,Wb as P,Yb as O,bc as M,gb as D,jb as r,kb as E,mc as I,nc as a,oc as y,pc as b,rc as h,sc as f,ta as L,tc as _,ud as B,vc as N,vd as k,xc as V,zd as z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var pe=l=>({ID:l});function se(l,m){if(l&1&&(e(0,"span",17),S(1,"img",18),t(),a(2)),l&2){let i=m.item;r(),p("src",i.Img,D)("alt",i.Name),r(),b(" ",i.Name," ")}}function ge(l,m){if(l&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),S(4,"img",28),t(),e(5,"td"),a(6),t(),e(7,"td",29)(8,"a",30),a(9),T(10,"number"),t()(),e(11,"td"),a(12),t(),e(13,"td"),a(14),T(15,"date"),t()()),l&2){let i=m.$implicit;r(2),y(i._source.ChannelName),r(2),p("src",i.logo,D),r(2),y(i._source.DateRange),r(2),p("queryParams",V(12,pe,i._source.ID)),r(),b(" ",F(10,7,i._source.CountOrder)," "),r(3),y(i._source.UserLogin),r(2),b(" ",R(15,9,i._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function ce(l,m){if(l&1){let i=O();x(0),e(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),a(6,"Channel"),t(),e(7,"th",23),a(8,"Type"),t(),e(9,"th",24),a(10,"Download Date Range"),t(),e(11,"th",25),a(12,"Count"),t(),e(13,"th"),a(14,"User Login"),t(),e(15,"th"),a(16,"Created"),t()()(),e(17,"tbody"),C(18,ge,16,14,"tr",26),t()(),e(19,"mat-paginator",27),v("page",function(s){c(i);let n=M();return u(n.onPaginationChange(s))}),t()(),P()}if(l&2){let i=M();r(18),p("ngForOf",i.downloadOrders),r(),p("length",i.paginationTotal)("pageSize",i.paginationPageSize)("pageIndex",(i.filter==null?null:i.filter.PageNumber)==0?0:(i.filter==null?null:i.filter.PageNumber)-1)}}function ue(l,m){l&1&&(e(0,"div",31),S(1,"app-empty-state"),t())}var Ve=(()=>{let m=class m{constructor(d,s){this.http=d,this.authService=s,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=Q.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(s){return new(s||m)(E(X),E(Z))},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],standalone:!0,features:[N],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(s,n){if(s&1){let g=O();e(0,"mainpanel",1),v("onSubmit",function(){return c(g),u(n.getDownloadOrders())}),e(1,"filters")(2,"div")(3,"label",2),a(4,"Channel"),t(),e(5,"ng-select",3),_("ngModelChange",function(o){return c(g),f(n.filter.ChannelID,o)||(n.filter.ChannelID=o),u(o)}),C(6,se,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),a(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),_("dateChange",function(o){return c(g),f(n.filter.From,o)||(n.filter.From=o),u(o)}),t()(),e(12,"div")(13,"datepicker",9),_("dateChange",function(o){return c(g),f(n.filter.To,o)||(n.filter.To=o),u(o)}),t()()(),e(14,"div",5)(15,"label",10),a(16,"Page Number"),t(),e(17,"input",11),_("ngModelChange",function(o){return c(g),f(n.filter.PageNumber,o)||(n.filter.PageNumber=o),u(o)}),t()(),e(18,"div",5)(19,"label",10),a(20,"Page Size"),t(),e(21,"input",12),_("ngModelChange",function(o){return c(g),f(n.filter.RowCount,o)||(n.filter.RowCount=o),u(o)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),C(26,ce,20,4,"ng-container",16)(27,ue,2,0,"ng-template",null,0,W),t()()()()()}if(s&2){let g=I(28);p("hideSearchBox",!0),r(5),p("clearable",!0)("items",n.channelOptions),h("ngModel",n.filter.ChannelID),r(6),h("date",n.filter.From),r(2),h("date",n.filter.To),r(4),h("ngModel",n.filter.PageNumber),r(4),h("ngModel",n.filter.RowCount),r(5),p("ngIf",(n.downloadOrders==null?null:n.downloadOrders.length)>0)("ngIfElse",g)}},dependencies:[U,B,k,A,z,le,ae,oe,ne,ie,te,$,ee,K,G,J,H,Y,me,de,q,j,re]});let l=m;return l})();export{Ve as DownloadOrderLogComponent};
1
+ import{a as re}from"./chunk-RENQ3YZH.js";import{a as de,b as me}from"./chunk-LJHZMQZD.js";import"./chunk-MY4B7K3R.js";import"./chunk-FGPSBTFS.js";import"./chunk-ADRVUMMW.js";import{a as ae,b as le}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as $,b as ee,d as te,e as ie}from"./chunk-CCXKODFV.js";import{i as Z}from"./chunk-RKRG5VIR.js";import{e as X}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{m as ne,n as oe}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as G,h as H,m as Y,o as J,y as K}from"./chunk-BSN7ZAXG.js";import{c as Q}from"./chunk-64G3XLI6.js";import{p as j,r as q}from"./chunk-OVEJFFL6.js";import{$b as v,Bd as A,Cd as U,Da as c,Ea as u,Eb as C,Gb as p,Gc as T,Hc as F,Ic as R,Jc as W,Sb as e,Tb as t,Ub as S,Vb as x,Wb as P,Yb as O,bc as M,gb as D,jb as r,kb as E,mc as I,nc as a,oc as y,pc as b,rc as h,sc as f,ta as L,tc as _,ud as B,vc as N,vd as k,xc as V,zd as z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var pe=l=>({ID:l});function se(l,m){if(l&1&&(e(0,"span",17),S(1,"img",18),t(),a(2)),l&2){let i=m.item;r(),p("src",i.Img,D)("alt",i.Name),r(),b(" ",i.Name," ")}}function ge(l,m){if(l&1&&(e(0,"tr")(1,"td"),a(2),t(),e(3,"td"),S(4,"img",28),t(),e(5,"td"),a(6),t(),e(7,"td",29)(8,"a",30),a(9),T(10,"number"),t()(),e(11,"td"),a(12),t(),e(13,"td"),a(14),T(15,"date"),t()()),l&2){let i=m.$implicit;r(2),y(i._source.ChannelName),r(2),p("src",i.logo,D),r(2),y(i._source.DateRange),r(2),p("queryParams",V(12,pe,i._source.ID)),r(),b(" ",F(10,7,i._source.CountOrder)," "),r(3),y(i._source.UserLogin),r(2),b(" ",R(15,9,i._source["@timestamp_received"],"dd MMM yyyy hh:mm")," ")}}function ce(l,m){if(l&1){let i=O();x(0),e(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),a(6,"Channel"),t(),e(7,"th",23),a(8,"Type"),t(),e(9,"th",24),a(10,"Download Date Range"),t(),e(11,"th",25),a(12,"Count"),t(),e(13,"th"),a(14,"User Login"),t(),e(15,"th"),a(16,"Created"),t()()(),e(17,"tbody"),C(18,ge,16,14,"tr",26),t()(),e(19,"mat-paginator",27),v("page",function(s){c(i);let n=M();return u(n.onPaginationChange(s))}),t()(),P()}if(l&2){let i=M();r(18),p("ngForOf",i.downloadOrders),r(),p("length",i.paginationTotal)("pageSize",i.paginationPageSize)("pageIndex",(i.filter==null?null:i.filter.PageNumber)==0?0:(i.filter==null?null:i.filter.PageNumber)-1)}}function ue(l,m){l&1&&(e(0,"div",31),S(1,"app-empty-state"),t())}var Ve=(()=>{let m=class m{constructor(d,s){this.http=d,this.authService=s,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(d=>{this.filter=d.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(d=>{this.downloadOrders=d.hits,this.setChannelLogo(),this.paginationTotal=d.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(d=>(d.logo=Q.getChannelLogoByTypeId(d._source.TypeID),d))}onPaginationChange(d){this.filter.PageNumber=d.pageIndex+1,this.getDownloadOrders()}};m.\u0275fac=function(s){return new(s||m)(E(X),E(Z))},m.\u0275cmp=L({type:m,selectors:[["app-download-order-log"]],standalone:!0,features:[N],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(s,n){if(s&1){let g=O();e(0,"mainpanel",1),v("onSubmit",function(){return c(g),u(n.getDownloadOrders())}),e(1,"filters")(2,"div")(3,"label",2),a(4,"Channel"),t(),e(5,"ng-select",3),_("ngModelChange",function(o){return c(g),f(n.filter.ChannelID,o)||(n.filter.ChannelID=o),u(o)}),C(6,se,3,3,"ng-template",4),t()(),e(7,"div",5)(8,"label",6),a(9,"From/To"),t(),e(10,"div",7)(11,"datepicker",8),_("dateChange",function(o){return c(g),f(n.filter.From,o)||(n.filter.From=o),u(o)}),t()(),e(12,"div")(13,"datepicker",9),_("dateChange",function(o){return c(g),f(n.filter.To,o)||(n.filter.To=o),u(o)}),t()()(),e(14,"div",5)(15,"label",10),a(16,"Page Number"),t(),e(17,"input",11),_("ngModelChange",function(o){return c(g),f(n.filter.PageNumber,o)||(n.filter.PageNumber=o),u(o)}),t()(),e(18,"div",5)(19,"label",10),a(20,"Page Size"),t(),e(21,"input",12),_("ngModelChange",function(o){return c(g),f(n.filter.RowCount,o)||(n.filter.RowCount=o),u(o)}),t()()(),e(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),C(26,ce,20,4,"ng-container",16)(27,ue,2,0,"ng-template",null,0,W),t()()()()()}if(s&2){let g=I(28);p("hideSearchBox",!0),r(5),p("clearable",!0)("items",n.channelOptions),h("ngModel",n.filter.ChannelID),r(6),h("date",n.filter.From),r(2),h("date",n.filter.To),r(4),h("ngModel",n.filter.PageNumber),r(4),h("ngModel",n.filter.RowCount),r(5),p("ngIf",(n.downloadOrders==null?null:n.downloadOrders.length)>0)("ngIfElse",g)}},dependencies:[U,B,k,A,z,le,ae,oe,ne,ie,te,$,ee,K,G,J,H,Y,me,de,q,j,re]});let l=m;return l})();export{Ve as DownloadOrderLogComponent};
@@ -1 +1 @@
1
- import{a as Z}from"./chunk-DYSDYXLW.js";import{a as Y}from"./chunk-7LZ5ZSXM.js";import{b as ee,c as V}from"./chunk-B5PFUQJP.js";import"./chunk-BVIRHZTZ.js";import{b as X}from"./chunk-AMSVLO4N.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-JXTGH22T.js";import"./chunk-GCKSYCMI.js";import{a as Q}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{i as q}from"./chunk-6SIZ4MMS.js";import{b as $,e as H}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as z,m as J,n as K}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as U,h as j,m as k,o as G,y as W}from"./chunk-BSN7ZAXG.js";import"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as I,Cd as O,Da as s,Ea as l,Eb as w,G as F,Gb as P,Gc as C,Hc as x,Sb as a,Tb as m,Ub as b,Yb as S,Z as T,bc as o,ea as M,jb as u,kb as h,nc as f,pa as N,rc as v,sc as y,ta as E,tc as D,uc as R,vc as L,vd as A,yd as B}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";function te(r,c){if(r&1){let i=S();a(0,"button",15),g("click",function(){s(i);let e=o().ngIf,n=o(2);return l(n.onUpdateItems(e))}),b(1,"i",16),f(2," Update "),m()}}function ie(r,c){if(r&1&&(a(0,"div"),w(1,te,3,0,"button",14),m()),r&2){let i=c.ngIf,t=o(2);u(),P("ngIf",t.productService.hasSelectionVariant(i))}}function ne(r,c){if(r&1){let i=S();a(0,"mainpanel",1),g("onSubmit",function(e){s(i);let n=o();return l(n.onSearch(e))}),a(1,"actions")(2,"div",2),w(3,ie,2,1,"div",3),C(4,"async"),a(5,"button",4),g("click",function(){s(i);let e=o();return l(e.openExportDialog())}),b(6,"i",5),a(7,"span"),f(8,"Export"),m()()()(),a(9,"filters")(10,"div")(11,"label",6),f(12,"Page Number"),m(),a(13,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.PageNumber,e)||(n.searchFilter.PageNumber=e),l(e)}),m()(),a(14,"div",8)(15,"label",6),f(16,"Page Size"),m(),a(17,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.RowCount,e)||(n.searchFilter.RowCount=e),l(e)}),m()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),C(23,"async"),g("onToggle",function(e){s(i);let n=o();return l(n.onShowDifferencePrice(e))})("onSubmit",function(e){s(i);let n=o();return l(n.updatePriceByVariant(e))}),m(),a(24,"infinite-paginator",13),C(25,"async"),g("onNextPage",function(){s(i);let e=o();return l(e.infinitePagination.onNextPage(e.searchFilter))})("onLastPage",function(){s(i);let e=o();return l(e.infinitePagination.onLastPage(e.searchFilter))})("onGetRowCount",function(){s(i);let e=o();return l(e.infinitePagination.getRowCount(e.searchFilter))}),m()()()()()()}if(r&2){let i=o();P("textButton","Search"),u(3),P("ngIf",x(4,14,i.data$)),u(10),v("ngModel",i.searchFilter.PageNumber),u(4),v("ngModel",i.searchFilter.RowCount),u(5),P("showProductToggle",!0)("data",x(23,16,i.data$))("channel",i.channelOptions)("hiddenIPOSInventory",!1),u(2),P("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",x(25,18,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var ve=(()=>{let c=class c{constructor(t,e,n,_,d,p){this.http=t,this.toastr=e,this.dialog=n,this.productService=_,this.authService=d,this.decimalPipe=p,this.infinitePagination=N(V),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(M(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter=t.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(t){this.searchFilter.filterModel=1,t&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(t){this.searchFilter.text=t,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(t){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let _=e.map(p=>({ID:p.ID,Code:p.Code,Price:p.UnitPrice}));var n=this.channelOptions.filter(p=>p.selected).map(p=>p.ID);let d={ListChannelID:n,ListPrice:_};this.http.post("/api/Price/UpdateChannel",d).subscribe(p=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+d.ListPrice.length+" items in "+d.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(t){let e={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",e).subscribe(n=>{let _=this.productService.findChannelById(e.ID,this.channelOptions),d=e.Price?this.decimalPipe.transform(e.Price):e.Price;this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+_.Name+" to "+d,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(t){let e=this.productService.selectedVariantProduct(t);this.dialog.open(Y,{data:{title:"Updating Price",selectedItems:e,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(F(n=>n!==void 0)).subscribe(n=>{this.channelOptions=n,this.updatePrice(t)})}openExportDialog(){this.dialog.open(X,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}};c.\u0275fac=function(e){return new(e||c)(h(H),h($),h(z),h(Q),h(q),h(I))},c.\u0275cmp=E({type:c,selectors:[["app-price-pos-channel"]],standalone:!0,features:[R([V,I]),L],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(e,n){e&1&&(w(0,ne,26,20,"mainpanel",0),C(1,"async")),e&2&&P("ngIf",x(1,1,n.loader$))},dependencies:[O,A,B,W,U,G,j,k,ee,K,J,Z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let r=c;return r})();export{ve as PricePosChannelComponent};
1
+ import{a as Z}from"./chunk-PYMNNVIN.js";import{a as Y}from"./chunk-7LZ5ZSXM.js";import{b as ee,c as V}from"./chunk-B5PFUQJP.js";import"./chunk-BVIRHZTZ.js";import{b as X}from"./chunk-AMSVLO4N.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-JXTGH22T.js";import"./chunk-GCKSYCMI.js";import{a as Q}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import"./chunk-XFTUE2ST.js";import"./chunk-HCDKYABV.js";import{i as q}from"./chunk-RKRG5VIR.js";import{b as $,e as H}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{d as z,m as J,n as K}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as U,h as j,m as k,o as G,y as W}from"./chunk-BSN7ZAXG.js";import"./chunk-64G3XLI6.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as I,Cd as O,Da as s,Ea as l,Eb as w,G as F,Gb as P,Gc as C,Hc as x,Sb as a,Tb as m,Ub as b,Yb as S,Z as T,bc as o,ea as M,jb as u,kb as h,nc as f,pa as N,rc as v,sc as y,ta as E,tc as D,uc as R,vc as L,vd as A,yd as B}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";function te(r,c){if(r&1){let i=S();a(0,"button",15),g("click",function(){s(i);let e=o().ngIf,n=o(2);return l(n.onUpdateItems(e))}),b(1,"i",16),f(2," Update "),m()}}function ie(r,c){if(r&1&&(a(0,"div"),w(1,te,3,0,"button",14),m()),r&2){let i=c.ngIf,t=o(2);u(),P("ngIf",t.productService.hasSelectionVariant(i))}}function ne(r,c){if(r&1){let i=S();a(0,"mainpanel",1),g("onSubmit",function(e){s(i);let n=o();return l(n.onSearch(e))}),a(1,"actions")(2,"div",2),w(3,ie,2,1,"div",3),C(4,"async"),a(5,"button",4),g("click",function(){s(i);let e=o();return l(e.openExportDialog())}),b(6,"i",5),a(7,"span"),f(8,"Export"),m()()()(),a(9,"filters")(10,"div")(11,"label",6),f(12,"Page Number"),m(),a(13,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.PageNumber,e)||(n.searchFilter.PageNumber=e),l(e)}),m()(),a(14,"div",8)(15,"label",6),f(16,"Page Size"),m(),a(17,"input",7),D("ngModelChange",function(e){s(i);let n=o();return y(n.searchFilter.RowCount,e)||(n.searchFilter.RowCount=e),l(e)}),m()()(),a(18,"content")(19,"div",9)(20,"div",10)(21,"div",11)(22,"app-table",12),C(23,"async"),g("onToggle",function(e){s(i);let n=o();return l(n.onShowDifferencePrice(e))})("onSubmit",function(e){s(i);let n=o();return l(n.updatePriceByVariant(e))}),m(),a(24,"infinite-paginator",13),C(25,"async"),g("onNextPage",function(){s(i);let e=o();return l(e.infinitePagination.onNextPage(e.searchFilter))})("onLastPage",function(){s(i);let e=o();return l(e.infinitePagination.onLastPage(e.searchFilter))})("onGetRowCount",function(){s(i);let e=o();return l(e.infinitePagination.getRowCount(e.searchFilter))}),m()()()()()()}if(r&2){let i=o();P("textButton","Search"),u(3),P("ngIf",x(4,14,i.data$)),u(10),v("ngModel",i.searchFilter.PageNumber),u(4),v("ngModel",i.searchFilter.RowCount),u(5),P("showProductToggle",!0)("data",x(23,16,i.data$))("channel",i.channelOptions)("hiddenIPOSInventory",!1),u(2),P("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",x(25,18,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var ve=(()=>{let c=class c{constructor(t,e,n,_,d,p){this.http=t,this.toastr=e,this.dialog=n,this.productService=_,this.authService=d,this.decimalPipe=p,this.infinitePagination=N(V),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(T()),this.pageData={Title:"Price",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!0},{Title:"Price Realtime",Url:"/menu/price/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(M(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1},this.searchFilter=t.Filter,this.infinitePagination.reloadPagination(this.searchFilter)}))}onShowDifferencePrice(t){this.searchFilter.filterModel=1,t&&(this.searchFilter.filterModel=3),this.infinitePagination.reloadPagination(this.searchFilter)}onSearch(t){this.searchFilter.text=t,this.infinitePagination.reloadPagination(this.searchFilter)}updatePrice(t){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let _=e.map(p=>({ID:p.ID,Code:p.Code,Price:p.UnitPrice}));var n=this.channelOptions.filter(p=>p.selected).map(p=>p.ID);let d={ListChannelID:n,ListPrice:_};this.http.post("/api/Price/UpdateChannel",d).subscribe(p=>{this.infinitePagination.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+d.ListPrice.length+" items in "+d.ListChannelID.length+" channels","Success")})}}updatePriceByVariant(t){let e={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post("/api/Price/UpdatePriceByID",e).subscribe(n=>{let _=this.productService.findChannelById(e.ID,this.channelOptions),d=e.Price?this.decimalPipe.transform(e.Price):e.Price;this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") price in "+_.Name+" to "+d,"Success"),this.infinitePagination.reloadPagination(this.searchFilter)})}onUpdateItems(t){let e=this.productService.selectedVariantProduct(t);this.dialog.open(Y,{data:{title:"Updating Price",selectedItems:e,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(F(n=>n!==void 0)).subscribe(n=>{this.channelOptions=n,this.updatePrice(t)})}openExportDialog(){this.dialog.open(X,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}};c.\u0275fac=function(e){return new(e||c)(h(H),h($),h(z),h(Q),h(q),h(I))},c.\u0275cmp=E({type:c,selectors:[["app-price-pos-channel"]],standalone:!0,features:[R([V,I]),L],decls:2,vars:3,consts:[["headerTitle","Price Comparison",3,"textButton","onSubmit",4,"ngIf"],["headerTitle","Price Comparison",3,"onSubmit","textButton"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(e,n){e&1&&(w(0,ne,26,20,"mainpanel",0),C(1,"async")),e&2&&P("ngIf",x(1,1,n.loader$))},dependencies:[O,A,B,W,U,G,j,k,ee,K,J,Z],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let r=c;return r})();export{ve as PricePosChannelComponent};
@@ -0,0 +1,93 @@
1
+ import{a as ge,b as ue}from"./chunk-IJYSJN63.js";import{a as fe}from"./chunk-46AOM3SM.js";import{Y as ce,Z as T,da as de}from"./chunk-OULUJ2IO.js";import{e as re}from"./chunk-4SAJUEHO.js";import{t as se,u as pe}from"./chunk-HUUFOAKH.js";import{a as oe,h as le,m as ie,y as ne}from"./chunk-BSN7ZAXG.js";import{b as u,c as r}from"./chunk-64G3XLI6.js";import{$b as Y,Ca as P,Cd as L,Da as h,Ea as b,Eb as m,Gb as C,Gc as X,Ha as k,Hc as Z,Ib as W,Jc as ee,Nb as G,Pa as z,Sb as y,Tb as _,Xb as N,Yb as R,Z as F,aa as f,bc as s,cc as J,dc as U,ea as p,g as d,ia as E,ja as v,jb as M,ka as V,mc as D,nc as $,pa as g,pc as H,q as c,rc as q,sc as K,ta as S,tc as Q,ua as j,uc as w,vc as x,xb as I,xd as te,yd as ae,zb as B}from"./chunk-PQDPS2ID.js";var be=(()=>{let l=class l{constructor(){this.httpService=g(re),this.shopeeCategories=new d({data:[],isFirstLoad:!1}),this.tiktokCategories=new d({data:[],isFirstLoad:!1}),this.lazadaCategories=new d({data:[],isFirstLoad:!1}),this.tokopediaCategories=new d({data:[],isFirstLoad:!1}),this.wooCommerceCategories=new d({data:[],isFirstLoad:!1})}getCategories(t,a){switch(t){case u.Shopee:return this.shopeeCategories.asObservable().pipe(f(o=>o.isFirstLoad?c(o.data):this.getShopeeCategories(a)));case u.Tiktok:return this.tiktokCategories.asObservable().pipe(f(o=>o.isFirstLoad?c(o.data):this.getTiktokCategories(a)));case u.Lazada:return this.lazadaCategories.asObservable().pipe(f(o=>o.isFirstLoad?c(o.data):this.getLazadaCategories(a)));case u.Tokopedia:return this.tokopediaCategories.asObservable().pipe(f(o=>o.isFirstLoad?c(o.data):this.getTokopediaCategories(a)));case u.WooCommerce:return this.wooCommerceCategories.asObservable().pipe(f(o=>o.isFirstLoad?c(o.data):this.getWooCommerceCategories(a)));default:return c([])}}getShopeeCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}]).pipe(p(o=>{let n={data:o,isFirstLoad:!0};this.shopeeCategories.next(n)}))}getTiktokCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}]).pipe(p(o=>{let n={data:o,isFirstLoad:!0};this.tiktokCategories.next(n)}))}getLazadaCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}]).pipe(p(o=>{let n={data:o,isFirstLoad:!0};this.lazadaCategories.next(n)}))}getTokopediaCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}]).pipe(p(o=>{let n={data:o,isFirstLoad:!0};this.tokopediaCategories.next(n)}))}getWooCommerceCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}]).pipe(p(o=>{let n={data:o,isFirstLoad:!0};this.wooCommerceCategories.next(n)}))}searchByIdWithParentDFS(t,a){let o=[...t];for(;o.length>0;){let n=o.pop();if(n.id===JSON.stringify(a))return n;if(n.children&&n.children.length>0)for(let O of n.children)O.parent=n,o.push(O)}return null}searchSelectAbleNode(t){let a=null;if(t.selectable)return t;let o=t.children?t.children:[];if(o.length==0)return t;for(let n of o){if(n.children.length==0&&n.selectable)return n;if(a=this.searchSelectAbleNode(n),a)return a}return a}generateCategoryLabel(t){let a="";return t?a=r.getLabelPathTree(t):a="Select a Category",a}};l.\u0275fac=function(a){return new(a||l)},l.\u0275prov=v({token:l,factory:l.\u0275fac,providedIn:"root"});let e=l;return e})();var ye=({dt:e})=>`
2
+ .p-floatlabel {
3
+ display: block;
4
+ position: relative;
5
+ }
6
+
7
+ .p-floatlabel label {
8
+ position: absolute;
9
+ pointer-events: none;
10
+ top: 50%;
11
+ transform: translateY(-50%);
12
+ transition-property: all;
13
+ transition-timing-function: ease;
14
+ line-height: 1;
15
+ font-weight: ${e("floatlabel.font.weight")};
16
+ inset-inline-start: ${e("floatlabel.position.x")};
17
+ color: ${e("floatlabel.color")};
18
+ transition-duration: ${e("floatlabel.transition.duration")};
19
+ }
20
+
21
+ .p-floatlabel:has(.p-textarea) label {
22
+ top: ${e("floatlabel.position.y")};
23
+ transform: translateY(0);
24
+ }
25
+
26
+ .p-floatlabel:has(.p-inputicon:first-child) label {
27
+ inset-inline-start: calc((${e("form.field.padding.x")} * 2) + ${e("icon.size")});
28
+ }
29
+
30
+ .p-floatlabel:has(.ng-invalid.ng-dirty) label {
31
+ color: ${e("floatlabel.invalid.color")};
32
+ }
33
+
34
+ .p-floatlabel:has(input:focus) label,
35
+ .p-floatlabel:has(input.p-filled) label,
36
+ .p-floatlabel:has(input:-webkit-autofill) label,
37
+ .p-floatlabel:has(textarea:focus) label,
38
+ .p-floatlabel:has(textarea.p-filled) label,
39
+ .p-floatlabel:has(.p-inputwrapper-focus) label,
40
+ .p-floatlabel:has(.p-inputwrapper-filled) label {
41
+ top: ${e("floatlabel.over.active.top")};
42
+ transform: translateY(0);
43
+ font-size: ${e("floatlabel.active.font.size")};
44
+ font-weight: ${e("floatlabel.label.active.font.weight")};
45
+ }
46
+
47
+ .p-floatlabel:has(input.p-filled) label,
48
+ .p-floatlabel:has(textarea.p-filled) label,
49
+ .p-floatlabel:has(.p-inputwrapper-filled) label {
50
+ color: ${e("floatlabel.active.color")};
51
+ }
52
+
53
+ .p-floatlabel:has(input:focus) label,
54
+ .p-floatlabel:has(input:-webkit-autofill) label,
55
+ .p-floatlabel:has(textarea:focus) label,
56
+ .p-floatlabel:has(.p-inputwrapper-focus) label {
57
+ color: ${e("floatlabel.focus.color")};
58
+ }
59
+
60
+ .p-floatlabel-in .p-inputtext,
61
+ .p-floatlabel-in .p-textarea,
62
+ .p-floatlabel-in .p-select-label,
63
+ .p-floatlabel-in .p-multiselect-label-container,
64
+ .p-floatlabel-in .p-autocomplete-input-multiple,
65
+ .p-floatlabel-in .p-cascadeselect-label,
66
+ .p-floatlabel-in .p-treeselect-label {
67
+ padding-top: ${e("floatlabel.in.input.padding.top")};
68
+ }
69
+
70
+ .p-floatlabel-in:has(input:focus) label,
71
+ .p-floatlabel-in:has(input.p-filled) label,
72
+ .p-floatlabel-in:has(input:-webkit-autofill) label,
73
+ .p-floatlabel-in:has(textarea:focus) label,
74
+ .p-floatlabel-in:has(textarea.p-filled) label,
75
+ .p-floatlabel-in:has(.p-inputwrapper-focus) label,
76
+ .p-floatlabel-in:has(.p-inputwrapper-filled) label {
77
+ top: ${e("floatlabel.in.active.top")};
78
+ }
79
+
80
+ .p-floatlabel-on:has(input:focus) label,
81
+ .p-floatlabel-on:has(input.p-filled) label,
82
+ .p-floatlabel-on:has(input:-webkit-autofill) label,
83
+ .p-floatlabel-on:has(textarea:focus) label,
84
+ .p-floatlabel-on:has(textarea.p-filled) label,
85
+ .p-floatlabel-on:has(.p-inputwrapper-focus) label,
86
+ .p-floatlabel-on:has(.p-inputwrapper-filled) label {
87
+ top: 0;
88
+ transform: translateY(-50%);
89
+ border-radius: ${e("floatlabel.on.border.radius")};
90
+ background: ${e("floatlabel.on.active.background")};
91
+ padding: ${e("floatlabel.on.active.padding")};
92
+ }
93
+ `,ve={root:({instance:e,props:l})=>["p-floatlabel",{"p-floatlabel-over":l.variant==="over","p-floatlabel-on":l.variant==="on","p-floatlabel-in":l.variant==="in"}]},me=(()=>{class e extends de{name="floatlabel";theme=ye;classes=ve;static \u0275fac=(()=>{let i;return function(a){return(i||(i=k(e)))(a||e)}})();static \u0275prov=v({token:e,factory:e.\u0275fac})}return e})();var Se=["*"],A=(()=>{class e extends fe{_componentStyle=g(me);variant="over";static \u0275fac=(()=>{let i;return function(a){return(i||(i=k(e)))(a||e)}})();static \u0275cmp=S({type:e,selectors:[["p-floatlabel"],["p-floatLabel"],["p-float-label"]],hostVars:8,hostBindings:function(t,a){t&2&&W("p-floatlabel",!0)("p-floatlabel-over",a.variant==="over")("p-floatlabel-on",a.variant==="on")("p-floatlabel-in",a.variant==="in")},inputs:{variant:"variant"},standalone:!0,features:[w([me]),B,x],ngContentSelectors:Se,decls:1,vars:0,template:function(t,a){t&1&&(J(),U(0))},dependencies:[L,T],encapsulation:2,changeDetection:0})}return e})(),Ce=(()=>{class e{static \u0275fac=function(t){return new(t||e)};static \u0275mod=j({type:e});static \u0275inj=V({imports:[A,T,T]})}return e})();function we(e,l){e&1&&N(0)}function xe(e,l){if(e&1&&(y(0,"p-floatLabel",1),m(1,we,1,0,"ng-container",2),y(2,"label",3),$(3,"Category"),_()()),e&2){s();let i=D(3);M(),C("ngTemplateOutlet",i)}}function Le(e,l){e&1&&N(0)}function Te(e,l){if(e&1&&m(0,Le,1,0,"ng-container",2),e&2){s();let i=D(3);C("ngTemplateOutlet",i)}}function Fe(e,l){if(e&1&&(y(0,"div",6),$(1),_()),e&2){let i=s(2);C("matTooltip",i.selectedCategoryLabel()),M(),H(" ",i.selectedCategoryLabel()," ")}}function ke(e,l){if(e&1){let i=R();y(0,"p-treeSelect",4),X(1,"async"),Q("ngModelChange",function(a){h(i);let o=s();return K(o.selectedNode,a)||(o.selectedNode=a),b(a)}),Y("click",function(){h(i);let a=s();return b(a.onClickSelect())})("onNodeSelect",function(a){h(i);let o=s();return b(o.onNodeSelect(a))})("onClear",function(){h(i);let a=s();return b(a.onNodeUnselect())}),m(2,Fe,2,2,"ng-template",5),_()}if(e&2){let i=s();q("ngModel",i.selectedNode),C("filter",!0)("options",Z(1,5,i.categories$))("showClear",i.showClear)("disabled",i.disabled)}}var dt=(()=>{let l=class l{constructor(){this.categoryService=g(be),this.showClear=!1,this.showLabel=!1,this.disabled=!1,this.selectedCategory=new z,this.selectedCategoryLabel=I("Select a Category"),this.selectedNode=I(null),this.onChange=t=>{},this.onTouched=()=>{}}ngOnChanges(t){let a=t?.categoryId?.previousValue,o=t?.categoryId?.currentValue;r.IsEmpty(a)&&r.IsNotEmpty(o)&&this.initCategories(),r.IsEmpty(o)&&r.IsNotEmpty(a)&&this.generateCategoryLabel(null)}initCategories(){this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(p(t=>this.setDefaultCategory(t)),F(1))}setDefaultCategory(t){try{let a=this.categoryService.searchByIdWithParentDFS(t,this.categoryId);a&&(this.generateCategoryLabel(a),this.selectedNode.set(a))}catch(a){console.error(a)}}onClickSelect(){this.disabled==!1&&(this.categories$=this.categoryService.getCategories(this.channelType,this.channelId).pipe(F(1)))}onNodeSelect(t){let a=this.categoryService.searchSelectAbleNode(t.node);this.selectedCategoryLabel.set(r.getLabelPathTree(a));let o=parseInt(a.id);this.onChange(o),this.selectedCategory.emit(o)}onNodeUnselect(){this.selectedCategoryLabel.set("Select a Category"),this.selectedCategory.emit(null)}generateCategoryLabel(t){t?this.selectedCategoryLabel.set(r.getLabelPathTree(t)):this.selectedCategoryLabel.set("Select a Category")}writeValue(t){r.IsNotEmpty(t)&&(this.categoryId=t,this.initCategories())}registerOnChange(t){this.onChange=t}registerOnTouched(t){this.onTouched=t}setDisabledState(t){this.disabled=t}};l.\u0275fac=function(a){return new(a||l)},l.\u0275cmp=S({type:l,selectors:[["app-channel-category-select"]],inputs:{channelId:"channelId",channelType:"channelType",categoryId:"categoryId",showClear:"showClear",showLabel:"showLabel",disabled:"disabled"},outputs:{selectedCategory:"selectedCategory"},standalone:!0,features:[w([{provide:oe,useExisting:E(()=>l),multi:!0}]),P,x],decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","containerStyleClass","w-100","placeholder","Select a Category","id","selectCategory","inputId","selectCategory",3,"ngModelChange","click","onNodeSelect","onClear","ngModel","filter","options","showClear","disabled"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(a,o){a&1&&m(0,xe,4,1,"p-floatLabel",1)(1,Te,1,1,"ng-container")(2,ke,3,7,"ng-template",null,0,ee),a&2&&G(o.showLabel?0:1)},dependencies:[L,te,ae,ue,ge,ce,pe,se,ne,le,ie,Ce,A],styles:[".p-overlay.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]});let e=l;return e})();export{be as a,dt as b};
@@ -1,8 +1,8 @@
1
- import{a as ve,b as Ie,c as Ge}from"./chunk-YC44HHHF.js";import{a as Q}from"./chunk-J5D7PMX5.js";import"./chunk-6U6JR5K6.js";import"./chunk-B2TH5YJH.js";import{a as $e}from"./chunk-BVIRHZTZ.js";import{a as le,b as pe,c as bt}from"./chunk-ILVEM7H5.js";import{a as de}from"./chunk-RENQ3YZH.js";import{b as At}from"./chunk-AMSVLO4N.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import{a as Wt,b as Bt,c as zt,d as Gt,e as jt,f as Ht,g as Ut}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import{a as Tt,b as Dt}from"./chunk-N3TTJVBG.js";import"./chunk-MY4B7K3R.js";import"./chunk-46AOM3SM.js";import{a as Yt,b as qt}from"./chunk-JXTGH22T.js";import"./chunk-OULUJ2IO.js";import{a as me,b as vt}from"./chunk-LB6JFX4H.js";import{f as Ot,g as Lt,h as kt,i as Vt,j as Ft}from"./chunk-FGPSBTFS.js";import"./chunk-GCKSYCMI.js";import{a as Mt}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as X}from"./chunk-5JOW2QWK.js";import{b as Rt}from"./chunk-WT6W7RAQ.js";import{b as Nt}from"./chunk-BQ7NR3ET.js";import{a as Et,b as Pt,c as It}from"./chunk-UMNGKENU.js";import{a as oe}from"./chunk-4K24LK5D.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as ae,b as re,c as ht,d as $,e as _t}from"./chunk-CCXKODFV.js";import{f as se,i as J}from"./chunk-6SIZ4MMS.js";import{b as we,e as B}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{b as St,d as be,e as Ct,f as yt,g as xt,m as H,n as wt}from"./chunk-BO4PPSB5.js";import{t as ut,u as ft}from"./chunk-HUUFOAKH.js";import{P as gt}from"./chunk-E5GGIVK7.js";import{b as ze,c as K,h as G,m as j,o as ne,y as ct}from"./chunk-BSN7ZAXG.js";import{b as I,c as N}from"./chunk-64G3XLI6.js";import{m as We,n as st,p as q,r as Be}from"./chunk-OVEJFFL6.js";import{$b as b,B as et,Bd as Y,Ca as nt,Cd as xe,Da as _,Ea as g,Eb as u,Fa as qe,G as tt,Ga as Ke,Gb as s,Gc as P,Hc as O,Ic as A,Jc as z,Nb as Je,Sb as n,Tb as a,Ub as C,Vb as D,Wb as E,Yb as M,Z as ge,aa as it,bc as c,ea as Ve,ec as rt,fc as ot,gb as k,ja as Fe,jb as l,ka as Ae,kb as T,mc as L,nc as m,oa as ue,oc as f,pc as v,rc as y,sc as x,sd as dt,ta as V,tc as w,ua as Re,uc as lt,ud as R,v as U,vc as pt,vd as W,wc as te,xb as at,xc as mt,yc as ie,yd as ye,zd as F}from"./chunk-PQDPS2ID.js";import{a as Qe,b as Ze}from"./chunk-GNOSNGXM.js";var Kt=(()=>{let p=class p{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[$e.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[$e.downloadOrder]}]}ngOnInit(){}};p.\u0275fac=function(t){return new(t||p)},p.\u0275cmp=V({type:p,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,i){t&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),t&2&&(l(3),s("Tabs",i.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Tt,st]});let r=p;return r})();var je=(()=>{let p=class p{constructor(e,t){this.http=e,this.toastr=t}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ve(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(e){let t=e.filter(h=>h.Status==!1),i=e.filter(h=>h.Status==!0);if(t.length==0&&i.length>0){let h=`<ol>${this.generateSuccessMessage(i)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&i.length>0){let h=`<ol>
1
+ import{a as ve,b as Ie,c as Ge}from"./chunk-YC44HHHF.js";import{a as Q}from"./chunk-J5D7PMX5.js";import"./chunk-6U6JR5K6.js";import"./chunk-B2TH5YJH.js";import{a as $e}from"./chunk-BVIRHZTZ.js";import{a as le,b as pe,c as bt}from"./chunk-ILVEM7H5.js";import{a as de}from"./chunk-RENQ3YZH.js";import{b as At}from"./chunk-AMSVLO4N.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import{a as Wt,b as Bt,c as zt,d as Gt,e as jt,f as Ht,g as Ut}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import{a as Tt,b as Dt}from"./chunk-N3TTJVBG.js";import"./chunk-MY4B7K3R.js";import"./chunk-46AOM3SM.js";import{a as Yt,b as qt}from"./chunk-JXTGH22T.js";import"./chunk-OULUJ2IO.js";import{a as me,b as vt}from"./chunk-LB6JFX4H.js";import{f as Ot,g as Lt,h as kt,i as Vt,j as Ft}from"./chunk-FGPSBTFS.js";import"./chunk-GCKSYCMI.js";import{a as Mt}from"./chunk-ZFQW5CVZ.js";import"./chunk-ADRVUMMW.js";import{a as X}from"./chunk-5JOW2QWK.js";import{b as Rt}from"./chunk-WT6W7RAQ.js";import{b as Nt}from"./chunk-BQ7NR3ET.js";import{a as Et,b as Pt,c as It}from"./chunk-UMNGKENU.js";import{a as oe}from"./chunk-5YQCJMOO.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as ae,b as re,c as ht,d as $,e as _t}from"./chunk-CCXKODFV.js";import{f as se,i as J}from"./chunk-RKRG5VIR.js";import{b as we,e as B}from"./chunk-4SAJUEHO.js";import"./chunk-KCDL7SWP.js";import{b as St,d as be,e as Ct,f as yt,g as xt,m as H,n as wt}from"./chunk-BO4PPSB5.js";import{t as ut,u as ft}from"./chunk-HUUFOAKH.js";import{P as gt}from"./chunk-E5GGIVK7.js";import{b as ze,c as K,h as G,m as j,o as ne,y as ct}from"./chunk-BSN7ZAXG.js";import{b as I,c as N}from"./chunk-64G3XLI6.js";import{m as We,n as st,p as q,r as Be}from"./chunk-OVEJFFL6.js";import{$b as b,B as et,Bd as Y,Ca as nt,Cd as xe,Da as _,Ea as g,Eb as u,Fa as qe,G as tt,Ga as Ke,Gb as s,Gc as P,Hc as O,Ic as A,Jc as z,Nb as Je,Sb as n,Tb as a,Ub as C,Vb as D,Wb as E,Yb as M,Z as ge,aa as it,bc as c,ea as Ve,ec as rt,fc as ot,gb as k,ja as Fe,jb as l,ka as Ae,kb as T,mc as L,nc as m,oa as ue,oc as f,pc as v,rc as y,sc as x,sd as dt,ta as V,tc as w,ua as Re,uc as lt,ud as R,v as U,vc as pt,vd as W,wc as te,xb as at,xc as mt,yc as ie,yd as ye,zd as F}from"./chunk-PQDPS2ID.js";import{a as Qe,b as Ze}from"./chunk-GNOSNGXM.js";var Kt=(()=>{let p=class p{constructor(){this.ObjectOrderTabs=[{Title:"1 - New Order",Url:"/menu/Order/new",Permissions:[]},{Title:"2 - Ready to Ship",Url:"/menu/Order/ready_to_ship",Permissions:[]},{Title:"3 - Shipped",Url:"/menu/Order/Shipped",Permissions:[]},{Title:"4 - Completed",Url:"/menu/Order/Delivered",Permissions:[]},{Title:"All",Url:"/menu/Order/All",Permissions:[]},{Title:"99 - Cancelled",Url:"/menu/Order/Cancelled",Permissions:[]},{Title:"Download",Url:"/menu/Order/Download",Permissions:[$e.downloadOrder]},{Title:"Log",Url:"/menu/Order/Download_Order_Log",Permissions:[$e.downloadOrder]}]}ngOnInit(){}};p.\u0275fac=function(t){return new(t||p)},p.\u0275cmp=V({type:p,selectors:[["app-orders"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,i){t&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),C(3,"nav-tab",2),a()()(),C(4,"router-outlet")),t&2&&(l(3),s("Tabs",i.ObjectOrderTabs)("usePermissions",!0))},dependencies:[Tt,st]});let r=p;return r})();var je=(()=>{let p=class p{constructor(e,t){this.http=e,this.toastr=t}acceptTokopediaOrders(e){return this.http.post("/api/Orders/AcceptOrderTokopedia",e).pipe(Ve(t=>{this.tokopediaAcceptOrderHandler(t)}))}tokopediaAcceptOrderHandler(e){let t=e.filter(h=>h.Status==!1),i=e.filter(h=>h.Status==!0);if(t.length==0&&i.length>0){let h=`<ol>${this.generateSuccessMessage(i)}</ol>`;this.toastr.success(h,"Success",{enableHtml:!0})}else if(t.length>0&&i.length>0){let h=`<ol>
2
2
  ${this.generateSuccessMessage(i)}
3
3
  ${this.generateErrorMessage(t)}
4
4
  </ol>`;this.toastr.warning(h,"Warning",{enableHtml:!0})}else{let h=`<ol>${this.generateErrorMessage(t)}</ol>`;this.toastr.error(h,"Error",{enableHtml:!0})}}generateSuccessMessage(e){let t="";return e.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> was successfully Accept</li>`}),t}generateErrorMessage(e){let t="";return e.forEach(i=>{t+=`<li><b>${i.OrderNumber}</b> ${i.Message}</li>`}),t}};p.\u0275fac=function(t){return new(t||p)(ue(B),ue(we))},p.\u0275prov=Fe({token:p,factory:p.\u0275fac});let r=p;return r})();function pi(r,p){if(r&1){let o=M();D(0),n(1,"button",18),b("click",function(){_(o);let t=c().ngIf,i=c();return g(i.onAcceptOrder(t))}),C(2,"i",19),m(3," Accept "),a(),E()}}function mi(r,p){if(r&1&&(D(0),u(1,pi,4,0,"ng-container",3),E()),r&2){let o=c();l(),s("ngIf",o.isTokopediaAvailable&&o.isTokopediaSelected)}}function di(r,p){if(r&1&&(n(0,"span",20),C(1,"img",21),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k),l(),v(" ",o.Name," ")}}function si(r,p){if(r&1){let o=M();D(0),n(1,"th",33)(2,"input",34),w("ngModelChange",function(t){_(o);let i=c(3);return x(i.isCheckAll,t)||(i.isCheckAll=t),g(t)}),b("ngModelChange",function(){_(o);let t=c(2).ngIf,i=c();return g(i.onSelectAllOrderData(t))}),a()(),E()}if(r&2){let o=c(3);l(2),y("ngModel",o.isCheckAll)}}function ci(r,p){if(r&1){let o=M();D(0),n(1,"input",34),w("ngModelChange",function(t){_(o);let i=c(2).$implicit;return x(i.selected,t)||(i.selected=t),g(t)}),b("ngModelChange",function(){_(o);let t=c(4).ngIf,i=c();return g(i.onSelectOrderData(t))}),a(),E()}if(r&2){let o=c(2).$implicit;l(),y("ngModel",o.selected)}}function hi(r,p){if(r&1&&(D(0),n(1,"td"),u(2,ci,2,1,"ng-container",3),a(),E()),r&2){let o=c().$implicit,e=c(3);l(2),s("ngIf",o.Type==e.tokopediaType)}}function _i(r,p){if(r&1&&(D(0),n(1,"span"),m(2),a(),E()),r&2){let o=c().$implicit;l(2),f(o.Number)}}function gi(r,p){if(r&1&&(n(0,"a",36),m(1),a()),r&2){let o=c().$implicit,e=c(3);s("href",e.domain+"/menu/Orders/Order/Sales_Order/Info?ID="+o.ID,k),l(),f(o.Number)}}function ui(r,p){if(r&1&&(n(0,"tr"),u(1,hi,3,1,"ng-container",3),n(2,"td"),m(3),a(),n(4,"td"),u(5,_i,3,1,"ng-container",22)(6,gi,2,2,"ng-template",null,1,z),a(),n(8,"td"),m(9),a(),n(10,"td"),m(11),P(12,"date"),a(),n(13,"td"),C(14,"app-channel-logo",35),a()()),r&2){let o=p.$implicit,e=L(7),t=c(3);l(),s("ngIf",t.isTokopediaAvailable),l(2),f(o.Outlet),l(2),s("ngIf",o.ID==t.guidEmpty)("ngIfElse",e),l(4),f(o.Customer),l(2),f(A(12,7,o.Created,"dd MMM yyyy HH:mm")),l(3),s("typeId",o.Type)}}function fi(r,p){if(r&1){let o=M();D(0),n(1,"div",23)(2,"table",24),b("matSortChange",function(t){_(o);let i=c(2);return g(i.onSort(t))}),n(3,"thead",25)(4,"tr",26),u(5,si,3,1,"ng-container",3),n(6,"th",27),m(7,"Outlet"),a(),n(8,"th",28),m(9,"Order number"),a(),n(10,"th"),m(11,"Customer"),a(),n(12,"th",29),m(13,"Created On"),a(),n(14,"th",30),m(15,"Channel"),a()()(),n(16,"tbody"),u(17,ui,15,10,"tr",31),a()(),n(18,"app-mat-paginator-no-count",32),P(19,"async"),P(20,"async"),b("total",function(){_(o);let t=c(2);return g(t.getPaginatonTotal())})("next",function(){_(o);let t=c(2);return g(t.onNextPage())})("previous",function(){_(o);let t=c(2);return g(t.onPreviousPage())}),a()(),E()}if(r&2){let o,e=c().ngIf,t=c();l(5),s("ngIf",t.isTokopediaAvailable&&e),l(12),s("ngForOf",e),l(),s("filter",t.filter)("totaldata",(o=O(19,5,t.newOrdersData$))==null?null:o.length)("paginationTotal",O(20,7,t.paginationTotal$))}}function Si(r,p){if(r&1&&(D(0),u(1,fi,21,9,"ng-container",22),E()),r&2){let o=p.ngIf;c();let e=L(32);l(),s("ngIf",(o==null?null:o.length)>0)("ngIfElse",e)}}function Ci(r,p){r&1&&(n(0,"div",37),C(1,"app-empty-state"),a())}var $t=(()=>{let p=class p{constructor(e,t,i,h){this.localDataService=e,this.orderService=t,this.acceptOrderService=i,this.authService=h,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.domain=`https://${this.localDataService.getHostName()}`,this.guidEmpty=N.GuidEMpty,this.tokopediaType=I.Tokopedia,this.isTokopediaSelected=!1,this.isTokopediaAvailable=!1,this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initLoadPage()}initLoadPage(){this.orderService.loadInitialPage().subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.getNewOrders()})}getNewOrders(){let e={PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.orderService.getNewOrders(e).pipe(ge()),this.newOrdersData$=this.sourceObs$.pipe(Ve(t=>{t.filter(h=>h.Type==I.Tokopedia).length>0&&(this.isTokopediaAvailable=!0)}))}getPaginatonTotal(){this.paginationTotal$=this.orderService.getTotalNewOrders(this.filter.ListChannelID,this.filter.From,this.filter.To).pipe(ge())}onNextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getNewOrders()}onPreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getNewOrders()}onSelectOrderData(e){this.isTokopediaSelected=!1,e.filter(i=>i.selected).length>0&&(this.isTokopediaSelected=!0)}onSelectAllOrderData(e){e=e.map(t=>(t.Type==I.Tokopedia&&(t.selected=this.isCheckAll),t)),this.onSelectOrderData(e)}onAcceptOrder(e){let t=this.getSelectedTokopediaOrders(e);this.acceptOrderService.acceptTokopediaOrders(t).subscribe(i=>{this.isTokopediaSelected=!1,location.reload()})}getSelectedTokopediaOrders(e){return e.filter(i=>i.selected).map(i=>i.Number)}onSort(e){if(e.direction==""){this.newOrdersData$=this.sourceObs$;return}if(e.active=="created"){let t=e.direction=="asc";this.newOrdersData$=this.newOrdersData$.pipe(U(i=>(i=i.sort((h,S)=>N.compare(h.Created,S.Created,t)),i)))}}};p.\u0275fac=function(t){return new(t||p)(T(se),T(ve),T(je),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-new-order"]],decls:33,vars:15,consts:[["EMPTY_STATE",""],["NOT_EMPTY",""],["headerTitle","1 - New Order","searchBoxPlaceHolder","Search Orders...",3,"onSubmit","hideSearchBox"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-check"],[1,"me-2"],["alt","",2,"width","18px",3,"src"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[3,"typeId"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,i){if(t&1){let h=M();n(0,"mainpanel",2),b("onSubmit",function(){return _(h),g(i.getNewOrders())}),n(1,"actions"),u(2,mi,2,1,"ng-container",3),P(3,"async"),a(),n(4,"filters")(5,"div")(6,"label",4),m(7,"Channel"),a(),n(8,"ng-select",5),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(9,di,3,2,"ng-template",6),a()(),n(10,"div",7)(11,"label",8),m(12,"Page Number"),a(),n(13,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(14,"div",7)(15,"label",8),m(16,"Page Size"),a(),n(17,"input",10),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(18,"div",7)(19,"label",11),m(20,"From/To"),a(),n(21,"div",12)(22,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(23,"div")(24,"datepicker",14),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(25,"content")(26,"div",15)(27,"div",16)(28,"div",17),u(29,Si,2,2,"ng-container",3),P(30,"async"),u(31,Ci,2,0,"ng-template",null,0,z),a()()()()()}t&2&&(s("hideSearchBox",!0),l(2),s("ngIf",O(3,11,i.newOrdersData$)),l(6),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",O(30,13,i.newOrdersData$)))},dependencies:[R,W,K,ne,ze,G,j,H,$,ae,re,X,me,de,le,pe,Q,ye,F]});let r=p;return r})();var yi=()=>["/menu/Order"];function xi(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),m(4),P(5,"number"),a(),n(6,"td"),m(7),P(8,"number"),a()()),r&2){let o=p.$implicit;l(2),f(o.Code),l(2),f(O(5,3,o.Quantity)),l(3),f(O(8,5,o.Price))}}function wi(r,p){if(r&1&&(n(0,"div",4)(1,"div",5)(2,"div",6)(3,"div",7)(4,"h3",8),m(5,"Outlet Info"),a()(),n(6,"div",4)(7,"div",9),m(8," Outlet : "),a(),n(9,"div",9),m(10),a()(),n(11,"div",4)(12,"div",9),m(13," Date : "),a(),n(14,"div",9),m(15),P(16,"date"),a()(),n(17,"div",4)(18,"div",9),m(19," Status : "),a(),n(20,"div",9),m(21),a()(),n(22,"div",4)(23,"div",9),m(24," Tax Type : "),a(),n(25,"div",9),m(26),a()(),n(27,"div",4)(28,"div",9),m(29," Due Date : "),a(),n(30,"div",9),m(31),P(32,"date"),a()()(),n(33,"div",6)(34,"div",7)(35,"h3",8),m(36,"Customer Info"),a()(),n(37,"div",4)(38,"div",9),m(39," Name : "),a(),n(40,"div",9),m(41),a()(),n(42,"div",4)(43,"div",9),m(44," Email : "),a(),n(45,"div",9),m(46),a()(),n(47,"div",4)(48,"div",9),m(49," Mobile : "),a(),n(50,"div",9),m(51),a()()()(),n(52,"div",10)(53,"h3",11),m(54,"Products Sold"),a(),n(55,"div",12)(56,"table",13)(57,"thead",14)(58,"tr",15)(59,"th"),m(60,"Code"),a(),n(61,"th"),m(62,"Quantity"),a(),n(63,"th"),m(64,"Price"),a()()(),n(65,"tbody"),u(66,xi,9,7,"tr",16),a()()()()()),r&2){let o=c();l(10),v(" ",o.model.Outlet," "),l(5),v(" ",A(16,9,o.model.Date,"dd MMM yyyy")," "),l(6),v(" ",o.model.Delivery," "),l(5),v(" ",o.model.TaxType," "),l(5),v(" ",A(32,12,o.model.DueDate,"dd MMM yyyy")," "),l(10),v(" ",o.model.Customer.Name," "),l(5),v(" ",o.model.Customer.Email," "),l(5),v(" ",o.model.Customer.Mobile," "),l(15),s("ngForOf",o.model.Variants)}}var Xt=(()=>{let p=class p{constructor(e,t){this.http=e,this.url=t,this.number=this.url.snapshot.queryParams.Number,this.outlet=this.url.snapshot.queryParams.Outlet}ngOnInit(){this.Load()}Load(){var e={Number:this.number,Outlet:this.outlet};this.http.post("/api/orders/GetInvoiceDetail",e).subscribe(t=>{this.model=t})}};p.\u0275fac=function(t){return new(t||p)(T(B),T(We))},p.\u0275cmp=V({type:p,selectors:[["app-detail-order"]],decls:7,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button",1,"btn","btn-secondary","btn-fill","btn-lg","me-3",3,"routerLink"],[1,"container"],["class","row",4,"ngIf"],[1,"row"],[1,"col-4"],[1,"border","my-3","py-3","col-12"],[1,"row","m-2"],[1,"text-center"],[1,"col"],[1,"col-8"],[1,"text-center","my-3","py-3"],[1,"table-responsive"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"]],template:function(t,i){t&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),m(3,"Back"),a()(),n(4,"content")(5,"div",2),u(6,wi,67,15,"div",3),a()()()),t&2&&(s("headerTitle","Order #"+i.number)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),s("routerLink",te(5,yi)),l(4),s("ngIf",i.model))},dependencies:[R,W,H,q,Y,F]});let r=p;return r})();var Qt=(()=>{let p=class p{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}};p.\u0275fac=function(t){return new(t||p)(T(St))},p.\u0275cmp=V({type:p,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),m(2,"Cetak label pesanan"),a(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),m(7,"Kamu akan mencetak label yang berisi detail pesanan"),a(),n(8,"div",5)(9,"mat-checkbox",6),w("ngModelChange",function(S){return x(i.tandaiSudahDicetak,S)||(i.tandaiSudahDicetak=S),S}),a(),n(10,"span",7),m(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),a()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),b("click",function(){return i.onCancel()}),m(14,"Cancel"),a(),n(15,"button",10),b("click",function(){return i.onPrint()}),m(16,"Cetak Pesanan"),a()()()),t&2&&(l(9),y("ngModel",i.tandaiSudahDicetak))},dependencies:[G,j,Yt,yt,Ct]});let r=p;return r})();var Ue=(()=>{let p=class p{constructor(e,t,i){this.http=e,this.toastr=t,this.dialog=i}getTokopediaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Tokopedia,i)),t)))}getTiktokShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Tiktok,i)),t)))}getShopeeShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Shopee,i)),t)))}getLazadaShippingLabel(e){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:e}).pipe(U(t=>(t=t.map(i=>(i.ChannelType=I.Lazada,i)),t)))}printShippingLabelTokopedia(e){let t={OrderNumber:e,Printed:!0};this.dialog.open(Qt).afterClosed().pipe(tt(i=>i!==void 0),it(i=>(t.Printed=i,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(i=>{let h=window.open("about:blank","_blank");h.document.write(i.File),h.document.close()})}printShippingLabelTiktok(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Tiktok",i).subscribe(h=>{h.data!=null?window.open(h.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",i).subscribe(h=>{var S=Uint8Array.from(atob(h.File),Pe=>Pe.charCodeAt(0)),d=new Blob([S],{type:"octet/stream"});N.openDownloadFile(d,`${e}.pdf`)})}printShippingLabelLazada(e,t){let i={ShopID:t,OrderNumber:e};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",i).subscribe(h=>{h.result.data!=null?window.open(h.result.data.pdf_url,"_blank"):this.toastr.error(h.message,"Cannot Print")})}};p.\u0275fac=function(t){return new(t||p)(ue(B),ue(we),ue(be))},p.\u0275prov=Fe({token:p,factory:p.\u0275fac,providedIn:"root"});let r=p;return r})();var ce=function(r){return r.SPX="https://res.cloudinary.com/pos/image/upload/v1698216798/APP/Print%20Shipping%20Label/SPX_Logo.png",r.SICEPAT="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/SiCepat_Logo.png",r.JNT="https://res.cloudinary.com/pos/image/upload/v1698216792/APP/Print%20Shipping%20Label/J_T_Logo.png",r.ANTERAJA="https://res.cloudinary.com/pos/image/upload/v1698218271/APP/Print%20Shipping%20Label/anteraja_Logo.png",r.JNE="https://res.cloudinary.com/pos/image/upload/v1698216791/APP/Print%20Shipping%20Label/JNE_Logo.png",r.GRAB="https://res.cloudinary.com/pos/image/upload/v1698216794/APP/Print%20Shipping%20Label/GrabExpress_Logo.png",r.GOSEND="https://res.cloudinary.com/pos/image/upload/v1698218375/APP/Print%20Shipping%20Label/Gosend_Logo.png",r.LAZADA_EXPRESS="https://res.cloudinary.com/pos/image/upload/v1698914677/icons/Marketplace%20logo/lazada-Logistics.png",r}(ce||{});var Ee=function(r){return r.TOKOPEDIA="https://res.cloudinary.com/pos/image/upload/v1698216793/APP/Print%20Shipping%20Label/Tokopedia_Logo.png",r.SHOPEE="https://res.cloudinary.com/pos/image/upload/v1698219243/APP/Print%20Shipping%20Label/shopee-logo.png",r.LAZADA="https://res.cloudinary.com/pos/image/upload/v1698912333/icons/Marketplace%20logo/Lazada_icon.png",r.TIKTOK="https://res.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",r}(Ee||{});function vi(r,p){if(r&1&&(D(0),n(1,"div",36)(2,"div",12)(3,"div",37),m(4),a()(),n(5,"div",12)(6,"div",37),m(7),a()()(),E()),r&2){let o=c();l(4),v(" ",o.recipient==null?null:o.recipient.City," "),l(3),v(" ",o.recipient==null?null:o.recipient.District," ")}}function Ti(r,p){if(r&1&&(D(0),n(1,"div")(2,"span",15),m(3,"Berat: "),a(),n(4,"span",18),m(5),a()(),E()),r&2){let o=c();l(5),v("",o.shippingLabel==null?null:o.shippingLabel.Weight," gr")}}function Di(r,p){if(r&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"Batas Kirim:"),a(),n(4,"span",18),m(5),P(6,"date"),a()(),E()),r&2){let o=c();l(5),f(A(6,1,o.logistic==null?null:o.logistic.Batas_kirim,"dd-MM-yyy"))}}function Ei(r,p){if(r&1&&(D(0),n(1,"div",38)(2,"span",14),m(3,"No.Pesanan:"),a(),n(4,"span",18),m(5),a()(),E()),r&2){let o=c();l(5),f(o.shippingLabel==null?null:o.shippingLabel.OrderNumber)}}function Pi(r,p){if(r&1&&(n(0,"tr")(1,"td",39),m(2),a(),n(3,"td"),m(4),a(),n(5,"td"),m(6),a(),n(7,"td"),m(8),P(9,"number"),a()()),r&2){let o=p.$implicit,e=p.index;l(2),f(e+1),l(2),f(o.Product_Name),l(2),f(o.SKU),l(2),f(O(9,4,o.Quantity))}}var Ye=(()=>{let p=class p{constructor(){this.minDate=N.MinDate,this.channelType=I}ngOnChanges(e){e.shippingLabel&&e.shippingLabel.currentValue&&(this.initShippingLabel(),this.getShippingLogo(),this.getChannelLogo())}ngAfterViewInit(){this.initBarcodeConfig()}getChannelLogo(){switch(this.shippingLabel.ChannelType){case I.Tokopedia:this.marketplaceLogo=Ee.TOKOPEDIA;break;case I.Shopee:this.marketplaceLogo=Ee.SHOPEE;break;case I.Lazada:this.marketplaceLogo=Ee.LAZADA;break;case I.Tiktok:this.marketplaceLogo=Ee.TIKTOK;break}}getShippingLogo(){let e=this.shippingLabel.Logistic.Logistic_Name;e=e?.toLowerCase(),e.includes("anteraja")?this.shippingLogo=ce.ANTERAJA:e.includes("grabexpress")?this.shippingLogo=ce.GRAB:e.includes("jne")?this.shippingLogo=ce.JNE:e.includes("gosend")?this.shippingLogo=ce.GOSEND:e.includes("j&t")?this.shippingLogo=ce.JNT:e.includes("sicepat")?this.shippingLogo=ce.SICEPAT:e.includes("spx")?this.shippingLogo=ce.SPX:e.includes("lex")&&(this.shippingLogo=ce.LAZADA_EXPRESS)}initShippingLabel(){this.recipient=this.shippingLabel.Recipient,this.store=this.shippingLabel.Store,this.products=this.shippingLabel.Products,this.logistic=this.shippingLabel.Logistic}initBarcodeConfig(){if(N.IsNotEmpty(this.logistic?.Resi_Number)){let e=this.logistic?.Resi_Number;JsBarcode(`#RESI${this.id}`,this.logistic?.Resi_Number,{displayValue:!1,width:e.length>15?1:1.5,height:40})}N.IsNotEmpty(this.shippingLabel?.OrderNumber)&&JsBarcode(`#NO${this.id}`,this.shippingLabel?.OrderNumber,{displayValue:!1,width:this.shippingLabel?.OrderNumber.length>15?.5:1,height:40})}};p.\u0275fac=function(t){return new(t||p)},p.\u0275cmp=V({type:p,selectors:[["app-shipping-label"]],inputs:{shippingLabel:"shippingLabel",id:"id"},standalone:!0,features:[nt,pt],decls:87,vars:20,consts:[[1,"label-container"],[2,"border","1px solid","padding","12px"],[1,"row","mb-2"],[1,"col-12"],[1,"d-flex","align-items-center","justify-content-between"],["width","105px",1,"border-0",3,"src"],[1,"mb-4"],[1,"row","mb-1"],[1,"text-center","fw-bold","border","p-2","fs-5","border-dark"],[1,"me-2"],[1,"col-12","text-center"],[3,"id"],[1,"col-6"],[1,"d-flex"],[1,"fw-bold","fs-6","me-1"],[1,"fw-bold","fs-6"],[1,"mt-2"],[1,"mb-0","fs-6",2,"max-width","200px","word-wrap","break-word"],[1,"fs-6"],[1,"fs-6",2,"word-wrap","break-word","max-width","160px"],[4,"ngIf"],[1,"row","px-6"],[1,"col-5","border","border-dark","border-end-0","text-center","p-2"],[1,"col-7","border","border-dark","p-2","text-center","fs-6"],[1,"fst-italic"],[1,"row"],[1,"col-5","pt-4",2,"padding-right","0px"],[1,"d-flex","justify-content-between"],[1,"col-7","text-center"],[1,"mt-1",3,"id"],[1,"table","table-sm","fs-6"],[1,"text-center",2,"width","5px"],[2,"width","150px"],[2,"width","50px"],[2,"width","25px"],[4,"ngFor","ngForOf"],[1,"row","mb-4"],[1,"text-center","fw-bold","border","p-2","fs-6","border-dark","text-uppercase"],[1,"mt-4"],[1,"text-center"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div"),C(6,"img",5),a(),n(7,"div")(8,"h4"),m(9),a()(),n(10,"div"),C(11,"img",5),a()()()(),n(12,"div",6),C(13,"hr"),a(),n(14,"div",7)(15,"div",3)(16,"div",8)(17,"span",9),m(18),a(),n(19,"span"),m(20),a()()()(),n(21,"div",7)(22,"div",10),qe(),C(23,"svg",11),a()(),Ke(),n(24,"div",6),C(25,"hr"),a(),n(26,"div",2)(27,"div",12)(28,"div",13)(29,"div",14),m(30,"Penerima: "),a(),n(31,"div",15),m(32),a()(),n(33,"div",16)(34,"span",15),m(35,"Alamat Pengiriman:"),a(),n(36,"div",17),m(37),a()()(),n(38,"div",12)(39,"div",13)(40,"div",14),m(41,"Pengirim: "),a(),n(42,"div")(43,"div",15),m(44),a(),n(45,"div",18),m(46),a(),n(47,"div",19),m(48),a()()(),C(49,"div"),a()(),u(50,vi,8,2,"ng-container",20),n(51,"div",21)(52,"div",22)(53,"div",15),m(54,"CASHLESS"),a()(),n(55,"div",23)(56,"small",24),m(57,"Penjual tidak perlu membayar ongkos kirim ke kurir"),a()()(),n(58,"div",25)(59,"div",26)(60,"div",27),u(61,Ti,6,1,"ng-container",20),n(62,"div")(63,"span",15),m(64,"COD: "),a(),n(65,"span",18),m(66),P(67,"number"),a()()(),u(68,Di,7,4,"ng-container",20)(69,Ei,6,1,"ng-container",20),a(),n(70,"div",28),qe(),C(71,"svg",29),a()()(),Ke(),n(72,"div",25)(73,"div",3)(74,"table",30)(75,"thead")(76,"tr")(77,"th",31),m(78,"No."),a(),n(79,"th",32),m(80,"Nama Produk"),a(),n(81,"th",33),m(82,"SKU"),a(),n(83,"th",34),m(84,"Qty"),a()()(),n(85,"tbody"),u(86,Pi,10,6,"tr",35),a()()()()()),t&2&&(l(6),s("src",i.marketplaceLogo,k),l(3),f(i.logistic==null?null:i.logistic.Service),l(2),s("src",i.shippingLogo,k),l(7),v(" ",(i.shippingLabel==null?null:i.shippingLabel.ChannelType)==(i.channelType==null?null:i.channelType.Tokopedia)?"Kode Booking: ":"No. Resi: "," "),l(2),f(i.logistic==null?null:i.logistic.Resi_Number),l(3),s("id","RESI"+i.id),l(9),f(i.recipient==null?null:i.recipient.Name),l(5),v(" ",i.recipient==null?null:i.recipient.Address," "),l(7),f(i.store==null?null:i.store.Name),l(2),f(i.store==null?null:i.store.Phone),l(2),v(" ",i.store==null?null:i.store.Address," "),l(2),s("ngIf",(i.recipient==null?null:i.recipient.City)&&(i.recipient==null?null:i.recipient.District)),l(11),s("ngIf",i.shippingLabel==null?null:i.shippingLabel.Weight),l(5),v("Rp. ",i.shippingLabel!=null&&i.shippingLabel.IsCOD?O(67,18,i.shippingLabel==null||i.shippingLabel.SummaryPrice==null?null:i.shippingLabel.SummaryPrice.Total):0,""),l(2),s("ngIf",(i.logistic==null?null:i.logistic.Batas_kirim)&&(i.logistic==null?null:i.logistic.Batas_kirim)!==i.minDate),l(),s("ngIf",i.shippingLabel==null?null:i.shippingLabel.OrderNumber),l(2),s("id","NO"+i.id),l(15),s("ngForOf",i.products))},dependencies:[xe,R,W,Y,F],styles:[".table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{border:none!important}.table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-transform:capitalize;padding:4px!important}.table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border:none!important;padding:2px 2px 2px 5px!important;font-size:10px}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{border-bottom:1px solid rgba(0,0,0,.4509803922)}.label-container[_ngcontent-%COMP%]{width:465px;float:left}hr[_ngcontent-%COMP%]{opacity:.8;margin:0}"]});let r=p;return r})();var Ni=()=>["/menu/Order/detail"],Mi=(r,p)=>({Number:r,Outlet:p});function Oi(r,p){if(r&1){let o=M();D(0),n(1,"button",19),b("click",function(){_(o);let t=c();return g(t.onPrintMultipleShippingLabel())}),C(2,"i",20),n(3,"span"),m(4,"Print Shipping Label"),a()(),E()}}function Li(r,p){if(r&1&&(n(0,"span",21),C(1,"img",22),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function ki(r,p){if(r&1){let o=M();D(0),n(1,"input",29),w("ngModelChange",function(t){_(o);let i=c().$implicit;return x(i.Selected,t)||(i.Selected=t),g(t)}),b("ngModelChange",function(){_(o);let t=c(3).ngIf,i=c();return g(i.onSelectReadyToShip(t))}),a(),E()}if(r&2){let o=c().$implicit;l(),y("ngModel",o.Selected)}}function Vi(r,p){if(r&1&&(n(0,"a",42),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,Ni))("queryParams",ie(4,Mi,o.Number,o.Outlet)),l(),f(o.Number)}}function Fi(r,p){if(r&1&&(n(0,"a",43),m(1),a()),r&2){let o=c().$implicit,e=c(3);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function Ai(r,p){if(r&1){let o=M();n(0,"a",44),b("click",function(){_(o);let t=c().$implicit,i=c(3);return g(i.onPrintShippingLabel(t.Number,t.ShopID,t.TypeID))}),C(1,"i",45),a()}}function Ri(r,p){if(r&1&&(n(0,"tr")(1,"td"),u(2,ki,2,1,"ng-container",2),a(),n(3,"td"),m(4),a(),n(5,"td"),u(6,Vi,2,7,"a",37)(7,Fi,2,2,"a",38),a(),n(8,"td"),m(9),a(),n(10,"td"),m(11),P(12,"number"),a(),n(13,"td"),m(14),P(15,"date"),a(),n(16,"td"),C(17,"app-channel-logo",39),a(),n(18,"td",40),u(19,Ai,2,0,"a",41),a()()),r&2){let o=p.$implicit,e=c(3);l(2),s("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok),l(2),f(o.Outlet),l(2),s("ngIf",e.guidEmpty==o.ID),l(),s("ngIf",e.guidEmpty!=o.ID),l(2),f(o.Customer),l(2),f(O(12,9,o.Amount)),l(3),f(A(15,11,o.Date,"dd MMM yyyy")),l(3),s("typeId",o.TypeID),l(2),s("ngIf",o.TypeID==e.channelType.Shopee||o.TypeID==e.channelType.Tokopedia||o.TypeID==e.channelType.Tiktok||o.TypeID==e.channelType.Lazada)}}function Wi(r,p){if(r&1){let o=M();D(0),n(1,"div",24)(2,"table",25),b("matSortChange",function(t){_(o);let i=c(2);return g(i.onSort(t))}),n(3,"thead",26)(4,"tr",27)(5,"th",28)(6,"input",29),w("ngModelChange",function(t){_(o);let i=c(2);return x(i.isCheckAll,t)||(i.isCheckAll=t),g(t)}),b("ngModelChange",function(){_(o);let t=c().ngIf,i=c();return g(i.onSelectAllReadyToShip(t))}),a()(),n(7,"th",30),m(8,"Outlet"),a(),n(9,"th",31),m(10,"Order number"),a(),n(11,"th"),m(12,"Customer"),a(),n(13,"th",32),m(14,"Amount"),a(),n(15,"th",33),m(16,"Date"),a(),n(17,"th",34),m(18,"Channel"),a(),C(19,"th",35),a()(),n(20,"tbody"),u(21,Ri,20,14,"tr",18),a()(),n(22,"app-mat-paginator-no-count",36),P(23,"async"),P(24,"async"),b("total",function(){_(o);let t=c(2);return g(t.getRowCount())})("next",function(){_(o);let t=c(2);return g(t.NextPage())})("previous",function(){_(o);let t=c(2);return g(t.PreviousPage())}),a()(),E()}if(r&2){let o,e=c().ngIf,t=c();l(6),y("ngModel",t.isCheckAll),l(15),s("ngForOf",e),l(),s("filter",t.filter)("totaldata",(o=O(23,5,t.readyToShip$))==null?null:o.length)("paginationTotal",O(24,7,t.paginationTotal$))}}function Bi(r,p){if(r&1&&(D(0),u(1,Wi,25,9,"ng-container",23),E()),r&2){let o=p.ngIf;c();let e=L(31);l(),s("ngIf",o.length>0)("ngIfElse",e)}}function zi(r,p){r&1&&(n(0,"div",46),C(1,"app-empty-state"),a())}function Gi(r,p){r&1&&(D(0),n(1,"div",48),m(2,"\xA0"),a(),E())}function ji(r,p){if(r&1&&(D(0),C(1,"app-shipping-label",47),u(2,Gi,3,0,"ng-container",2),E()),r&2){let o=p.$implicit,e=p.index,t=c();l(),s("shippingLabel",o)("id",e),l(),s("ngIf",e!==(t.shippingLabels==null?null:t.shippingLabels.length)-1)}}var Zt=(()=>{let p=class p{constructor(e,t,i,h,S,d){this.http=e,this.localDataService=t,this.dialog=i,this.shippingLabelService=h,this.datePipe=S,this.authService=d,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.channelType=I,this.guidEmpty=N.GuidEMpty,this.selectedReadyToShip=[],this.isCheckAll=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.getReadyToShip()})}getReadyToShip(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.sourceObs$=this.http.post("api/orders/GetReadyToShip",t).pipe(U(i=>i.Data),ge(1)),this.readyToShip$=this.sourceObs$}onPrintMultipleShippingLabel(){let e=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tokopedia),t=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Shopee),i=this.filterReadyToShipByChannel(this.selectedReadyToShip,I.Tiktok),h=[];e.length>0&&h.push(this.shippingLabelService.getTokopediaShippingLabel(this.shippingLabelPayload(e))),t.length>0&&h.push(this.shippingLabelService.getShopeeShippingLabel(this.shippingLabelPayload(t))),i.length>0&&h.push(this.shippingLabelService.getTiktokShippingLabel(this.shippingLabelPayload(i))),et(h).pipe(U(S=>S.reduce((d,Pe)=>d.concat(Pe),[]))).subscribe({next:S=>{this.shippingLabels=S,this.printShippingLabel()}})}filterReadyToShipByChannel(e,t){return e.filter(i=>i.TypeID==t)}shippingLabelPayload(e){return e.map(t=>({ShopID:t.ShopID,OrderNumber:t.Number}))}printShippingLabel(){setTimeout(()=>{this.setPdfname(),window.print()},500)}onPrintShippingLabel(e,t,i){switch(i){case I.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e);break;case I.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e,t);break;case I.Shopee:this.shippingLabelService.printShippingLabelShopee(e,t);break;case I.Lazada:this.shippingLabelService.printShippingLabelLazada(e,t);break}}setPdfname(){if(this.selectedReadyToShip.length>1){let e=new Date,t=this.datePipe.transform(e,"dd-MM-yyyy"),i=this.datePipe.transform(e,"HH-mm");document.title=`ShippingLabel_${t}_${i}`}else{let e=this.selectedReadyToShip[0].Number;document.title=`ShippingLabel_${e}`}}getSelectedReadyToShip(e){return e.filter(t=>t.Selected)}getRowCount(){var e={PaymentState:"Unpaid",DeliveryState:"Unsent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.paginationTotal$=this.http.post("api/orders/GetRowCount",e).pipe(U(t=>t?.Total))}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.getReadyToShip()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.getReadyToShip()}onSort(e){if(e.direction==""){this.readyToShip$=this.sourceObs$;return}if(e.active=="date"){let t=e.direction=="asc";this.readyToShip$=this.readyToShip$.pipe(U(i=>i.sort((h,S)=>N.compare(h.Date,S.Date,t))))}}onSelectReadyToShip(e){this.selectedReadyToShip=this.getSelectedReadyToShip(e)}onSelectAllReadyToShip(e){e=e.map(t=>((t.TypeID==I.Tokopedia||t.TypeID==I.Shopee||t.TypeID==I.Lazada)&&(t.Selected=this.isCheckAll),t)),this.selectedReadyToShip=this.getSelectedReadyToShip(e)}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(be),T(Ue),T(F),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-ready-to-ship"]],decls:34,vars:13,consts:[["EMPTY_STATE",""],["headerTitle","2 - Ready to Ship","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[4,"ngIf"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3","d-print-none"],[1,"row"],[1,"col-md-12"],[1,"print_containers"],[4,"ngFor","ngForOf"],[1,"btn","btn-outline-secondary","shadow","rounded","me-3",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],["type","checkbox",3,"ngModelChange","ngModel"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","date",2,"width","130px"],[2,"width","114px"],[2,"width","10px"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[1,"text-center","text-primary"],["title","Print shipping label",3,"click",4,"ngIf"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],["title","Print shipping label",3,"click"],[1,"fa-solid","fa-print","fs-3","cursor"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"shippingLabel","id"],[1,"page-break"]],template:function(t,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.getReadyToShip(d))}),n(1,"actions"),u(2,Oi,5,0,"ng-container",2),a(),n(3,"filters")(4,"div")(5,"label",3),m(6,"Channel"),a(),n(7,"ng-select",4),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(8,Li,3,3,"ng-template",5),a()(),n(9,"div",6)(10,"label",7),m(11,"Page Number"),a(),n(12,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(13,"div",6)(14,"label",7),m(15,"Page Size"),a(),n(16,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(17,"div",6)(18,"label",10),m(19,"From/To"),a(),n(20,"div",11)(21,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(22,"div")(23,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(24,"content")(25,"div",14)(26,"div",15)(27,"div",16),u(28,Bi,2,2,"ng-container",2),P(29,"async"),u(30,zi,2,0,"ng-template",null,0,z),a()()()()(),n(32,"div",17),u(33,ji,3,3,"ng-container",18),a()}t&2&&(l(2),s("ngIf",i.selectedReadyToShip.length>0),l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",O(29,11,i.readyToShip$)),l(5),s("ngForOf",i.shippingLabels))},dependencies:[R,W,K,ne,ze,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Ye,ye,Y,F],styles:[".print_containers[_ngcontent-%COMP%]{display:none}@media print{.print_containers[_ngcontent-%COMP%]{display:block}}@media print{.page-break[_ngcontent-%COMP%]{page-break-after:always}}"]});let r=p;return r})();var Hi=()=>["/menu/Order/detail"],Ui=(r,p)=>({Number:r,Outlet:p});function Yi(r,p){if(r&1&&(n(0,"span",17),C(1,"img",18),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function qi(r,p){if(r&1&&(n(0,"a",33),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,Hi))("queryParams",ie(4,Ui,o.Number,o.Outlet)),l(),f(o.Number)}}function Ki(r,p){if(r&1&&(n(0,"a",34),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function Ji(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,qi,2,7,"a",30)(5,Ki,2,2,"a",31),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),C(15,"app-channel-logo",32),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,7,o.Amount)),l(3),f(A(13,9,o.Created,"dd MMM yyyy HH:mm")),l(3),s("typeId",o.TypeID)}}function $i(r,p){if(r&1){let o=M();D(0),n(1,"div",19)(2,"table",20),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),a(),n(7,"th",24),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",25),m(12,"Amount"),a(),n(13,"th",26),m(14," Created On "),a(),n(15,"th",27),m(16,"Channel"),a()()(),n(17,"tbody"),u(18,Ji,16,12,"tr",28),a()(),n(19,"app-mat-paginator-no-count",29),b("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(18),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function Xi(r,p){r&1&&(n(0,"div",35),C(1,"app-empty-state"),a())}var ei=(()=>{let p=class p{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}hasGuidEmpty(e){return e==N.GuidEMpty}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetShipped",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Unpaid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-shipped"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","3 - Shipped","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),a(),n(5,"ng-select",3),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(6,Yi,3,3,"ng-template",4),a()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),a(),n(10,"input",7),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),a(),n(14,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),a(),n(18,"div",10)(19,"datepicker",11),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(20,"div")(21,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,$i,20,4,"ng-container",16)(27,Xi,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(28);l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var Qi=()=>["/menu/Order/detail"],Zi=(r,p)=>({Number:r,Outlet:p});function en(r,p){if(r&1&&(n(0,"span",17),C(1,"img",18),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function tn(r,p){if(r&1&&(n(0,"a",33),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,Qi))("queryParams",ie(4,Zi,o.Number,o.Outlet)),l(),f(o.Number)}}function nn(r,p){if(r&1&&(n(0,"a",34),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.customerInfoUrl+o.ID,k),l(),f(o.Number)}}function an(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,tn,2,7,"a",30)(5,nn,2,2,"a",31),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),C(15,"app-channel-logo",32),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,7,o.Amount)),l(3),f(A(13,9,o.Created,"dd MMM yyyy HH:mm")),l(3),s("typeId",o.TypeID)}}function rn(r,p){if(r&1){let o=M();D(0),n(1,"div",19)(2,"table",20),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",21)(4,"tr",22)(5,"th",23),m(6,"Outlet"),a(),n(7,"th",24),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",25),m(12,"Amount"),a(),n(13,"th",26),m(14," Created On "),a(),n(15,"th",27),m(16,"Channel"),a()()(),n(17,"tbody"),u(18,an,16,12,"tr",28),a()(),n(19,"app-mat-paginator-no-count",29),b("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(18),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function on(r,p){r&1&&(n(0,"div",35),C(1,"app-empty-state"),a())}var ti=(()=>{let p=class p{constructor(e,t){this.http=e,this.authService=t,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelType=I,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.customerInfoUrl=`${this.authService.getDomain()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetDelivered ",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"Paid",DeliveryState:"Sent",ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-delivered"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","4 - Completed","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),a(),n(5,"ng-select",3),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(6,en,3,3,"ng-template",4),a()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),a(),n(10,"input",7),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),a(),n(14,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(15,"div",5)(16,"label",9),m(17,"From/To"),a(),n(18,"div",10)(19,"datepicker",11),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(20,"div")(21,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),u(26,rn,20,4,"ng-container",16)(27,on,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(28);l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var ln=()=>["/menu/Order/detail"],pn=(r,p)=>({Number:r,Outlet:p});function mn(r,p){if(r&1&&(n(0,"span",19),C(1,"img",20),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function dn(r,p){if(r&1&&(n(0,"a",36),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,ln))("queryParams",ie(4,pn,o.Number,o.Outlet)),l(),f(o.Number)}}function sn(r,p){if(r&1&&(n(0,"a",37),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function cn(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,dn,2,7,"a",33)(5,sn,2,2,"a",34),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),m(15),a(),n(16,"td"),C(17,"app-channel-logo",35),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,8,o.Amount)),l(3),f(A(13,10,o.Created,"dd MMM yyyy HH:mm")),l(3),f(o.State),l(2),s("typeId",o.TypeID)}}function hn(r,p){if(r&1){let o=M();D(0),n(1,"div",21)(2,"table",22),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",23)(4,"tr",24)(5,"th",25),m(6,"Outlet"),a(),n(7,"th",26),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",27),m(12,"Amount"),a(),n(13,"th",28),m(14," Created On "),a(),n(15,"th",29),m(16,"Status"),a(),n(17,"th",30),m(18,"Channel"),a()()(),n(19,"tbody"),u(20,cn,18,13,"tr",31),a()(),n(21,"app-mat-paginator-no-count",32),b("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(20),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function _n(r,p){r&1&&(n(0,"div",38),C(1,"app-empty-state"),a())}var ii=(()=>{let p=class p{constructor(e,t,i,h){this.http=e,this.localDataService=t,this.authService=i,this.dialog=h,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetAll",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.Data],this.totaldata=this.data.length})}openExportDialog(){this.dialog.open(At,{data:{title:"Export Order All",pageNumber:this.filter.PageNumber,rowCount:this.filter.PageSize,filterExport:this.filter,getRowCountApi:"orders/GetRowCount",exportApi:"orders/GetExportAll"}}).afterClosed().subscribe()}changePage(e){this.filter=e,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!1,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(J),T(be))},p.\u0275cmp=V({type:p,selectors:[["app-all-order"]],decls:34,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","All","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","135px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"actions")(2,"button",2),b("click",function(){return _(h),g(i.openExportDialog())}),C(3,"i",3),n(4,"span"),m(5,"Export"),a()()(),n(6,"filters")(7,"div")(8,"label",4),m(9,"Channel"),a(),n(10,"ng-select",5),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(11,mn,3,3,"ng-template",6),a()(),n(12,"div",7)(13,"label",8),m(14,"Page Number"),a(),n(15,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(16,"div",7)(17,"label",8),m(18,"Page Size"),a(),n(19,"input",10),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(20,"div",7)(21,"label",11),m(22,"From/To"),a(),n(23,"div",12)(24,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(25,"div")(26,"datepicker",14),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,hn,22,4,"ng-container",18)(32,_n,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(33);l(10),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var gn=()=>["/menu/Order/detail"],un=(r,p)=>({Number:r,Outlet:p});function fn(r,p){if(r&1&&(n(0,"span",18),C(1,"img",19),a(),m(2)),r&2){let o=p.item;l(),s("src",o==null?null:o.Img,k)("alt",o.Name),l(),v(" ",o.Name," ")}}function Sn(r,p){if(r&1&&(n(0,"a",34),m(1),a()),r&2){let o=c().$implicit;s("routerLink",te(3,gn))("queryParams",ie(4,un,o.Number,o.Outlet)),l(),f(o.Number)}}function Cn(r,p){if(r&1&&(n(0,"a",35),m(1),a()),r&2){let o=c().$implicit,e=c(2);s("href",e.domain+o.ID,k),l(),f(o.Number)}}function yn(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),u(4,Sn,2,7,"a",31)(5,Cn,2,2,"a",32),a(),n(6,"td"),m(7),a(),n(8,"td"),m(9),P(10,"number"),a(),n(11,"td"),m(12),P(13,"date"),a(),n(14,"td"),C(15,"app-channel-logo",33),a()()),r&2){let o=p.$implicit,e=c(2);l(2),f(o.Outlet),l(2),s("ngIf",e.hasGuidEmpty(o.ID)),l(),s("ngIf",!e.hasGuidEmpty(o.ID)),l(2),f(o.Customer),l(2),f(O(10,7,o.Amount)),l(3),f(A(13,9,o.Created,"dd MMM yyyy HH:mm")),l(3),s("typeId",o.TypeID)}}function xn(r,p){if(r&1){let o=M();D(0),n(1,"div",20)(2,"table",21),b("matSortChange",function(t){_(o);let i=c();return g(i.onSort(t))}),n(3,"thead",22)(4,"tr",23)(5,"th",24),m(6,"Outlet"),a(),n(7,"th",25),m(8,"Order number"),a(),n(9,"th"),m(10,"Customer"),a(),n(11,"th",26),m(12,"Amount"),a(),n(13,"th",27),m(14," Created On "),a(),n(15,"th",28),m(16,"Channel"),a()()(),n(17,"tbody"),u(18,yn,16,12,"tr",29),a()(),n(19,"app-mat-paginator-no-count",30),b("total",function(){_(o);let t=c();return g(t.StoreRowsCountAPIResult())})("next",function(){_(o);let t=c();return g(t.NextPage())})("previous",function(){_(o);let t=c();return g(t.PreviousPage())}),a()(),E()}if(r&2){let o=c();l(18),s("ngForOf",o.data),l(),s("filter",o.filter)("totaldata",o.totaldata)("paginationTotal",o.paginationTotal)}}function wn(r,p){r&1&&(n(0,"div",36),C(1,"app-empty-state"),a())}var ni=(()=>{let p=class p{constructor(e,t,i){this.http=e,this.localDataService=t,this.authService=i,this.filter={PageNumber:null,PageSize:null,ListChannelID:[],Note:"",From:null,To:null},this.totaldata=0,this.paginationTotal=0,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}hasGuidEmpty(e){return e==N.GuidEMpty}Load(){this.http.post("/api/ordersLoader/GetOrder",{}).subscribe(e=>{this.filter.PageNumber=e.Filter.PageNumber,this.filter.PageSize=e.Filter.RowCount,this.filter.From=e.Filter.From,this.filter.To=e.Filter.To,this.domain=`https://${this.localDataService.getHostName()}/menu/Orders/Orders/Customer_Invoice/Info?ID=`,this.Get()})}Get(e){var t={Number:e,PageNumber:this.filter.PageNumber,PageSize:this.filter.PageSize,ListChannelID:this.filter.ListChannelID,Note:this.filter.Note,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetCancelled ",t).subscribe(i=>{this.data=i.Data,this.sourceData=[...i.Data],this.totaldata=this.data.length})}changePage(e){this.filter.PageNumber=e.pageIndex+1,this.Get()}StoreRowsCountAPIResult(){var e={PaymentState:"",DeliveryState:"",Bin:!0,ListChannelID:this.filter.ListChannelID,From:this.filter.From,To:this.filter.To};this.http.post("api/orders/GetRowCount",e).subscribe(t=>{this.paginationTotal=t.Total})}NextPage(){this.filter.PageNumber=this.filter.PageNumber+1,this.Get()}PreviousPage(){this.filter.PageNumber=this.filter.PageNumber-1,this.Get()}getChannelLogo(e){return N.getChannelLogoByTypeId(e)}onSort(e){if(e.direction==""){this.data=this.sourceData;return}if(e.active=="created"){let t=e.direction=="asc";this.data=this.data.sort((i,h)=>N.compare(i.Created,h.Created,t))}}};p.\u0275fac=function(t){return new(t||p)(T(B),T(se),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-cancelled"]],decls:33,vars:11,consts:[["EMPTY_STATE",""],["headerTitle","99 - Cancelled","searchBoxPlaceHolder","Search ...",3,"onSubmit"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","multiple","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","Note",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],["matSort","",1,"table","table-hover",3,"matSortChange"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[4,"ngFor","ngForOf"],[3,"total","next","previous","filter","totaldata","paginationTotal"],[3,"routerLink","queryParams",4,"ngIf"],["target","_blank",3,"href",4,"ngIf"],[3,"typeId"],[3,"routerLink","queryParams"],["target","_blank",3,"href"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(t,i){if(t&1){let h=M();n(0,"mainpanel",1),b("onSubmit",function(d){return _(h),g(i.Get(d))}),n(1,"filters")(2,"div")(3,"label",2),m(4,"Channel"),a(),n(5,"ng-select",3),w("ngModelChange",function(d){return _(h),x(i.filter.ListChannelID,d)||(i.filter.ListChannelID=d),g(d)}),u(6,fn,3,3,"ng-template",4),a()(),n(7,"div",5)(8,"label",6),m(9,"Page Number"),a(),n(10,"input",7),w("ngModelChange",function(d){return _(h),x(i.filter.PageNumber,d)||(i.filter.PageNumber=d),g(d)}),a()(),n(11,"div",5)(12,"label",6),m(13,"Page Size"),a(),n(14,"input",8),w("ngModelChange",function(d){return _(h),x(i.filter.PageSize,d)||(i.filter.PageSize=d),g(d)}),a()(),n(15,"div",5)(16,"label",6),m(17,"Note"),a(),n(18,"input",9),w("ngModelChange",function(d){return _(h),x(i.filter.Note,d)||(i.filter.Note=d),g(d)}),a()(),n(19,"div",5)(20,"label",10),m(21,"From/To"),a(),n(22,"div",11)(23,"datepicker",12),w("dateChange",function(d){return _(h),x(i.filter.From,d)||(i.filter.From=d),g(d)}),a()(),n(24,"div")(25,"datepicker",13),w("dateChange",function(d){return _(h),x(i.filter.To,d)||(i.filter.To=d),g(d)}),a()()()(),n(26,"content")(27,"div",14)(28,"div",15)(29,"div",16),u(30,xn,20,4,"ng-container",17)(31,wn,2,0,"ng-template",null,0,z),a()()()()()}if(t&2){let h=L(32);l(5),s("clearable",!0)("multiple",!0)("items",i.channelOptions),y("ngModel",i.filter.ListChannelID),l(5),y("ngModel",i.filter.PageNumber),l(4),y("ngModel",i.filter.PageSize),l(4),y("ngModel",i.filter.Note),l(5),y("date",i.filter.From),l(2),y("date",i.filter.To),l(5),s("ngIf",i.data&&i.data.length>0)("ngIfElse",h)}},dependencies:[R,W,K,ne,G,j,H,q,$,ae,re,X,me,de,le,pe,Q,Y,F]});let r=p;return r})();var bn=(r,p)=>({"over-due-today":r,"over-due":p}),vn=r=>({"over-due":r});function Tn(r,p){r&1&&(D(0),n(1,"a",19),m(2," Download V2 "),a(),E())}function Dn(r,p){if(r&1){let o=M();D(0),n(1,"div",20)(2,"button",21),b("click",function(){_(o),c();let t=L(12);return g(t.previous())}),m(3," Back "),a(),n(4,"button",22),b("click",function(){_(o);let t=c(),i=L(12);return g(t.onNext(i))}),m(5," Next "),a()(),E()}if(r&2){let o=c();l(4),s("disabled",o.checkDisabledNextFilter())}}function En(r,p){if(r&1){let o=M();D(0),n(1,"button",23),b("click",function(){_(o);let t=c(),i=L(12);return g(t.onNext(i))}),m(2," Next "),a(),E()}if(r&2){let o=c();l(),s("disabled",o.checkDisabledNextFilter())}}function Pn(r,p){if(r&1){let o=M();D(0),n(1,"button",24),b("click",function(){_(o);let t=c(),i=L(12);return g(t.onNew(i))}),C(2,"i",25),m(3," New "),a(),E()}}function In(r,p){r&1&&(C(0,"i",26),n(1,"span"),m(2,"Filter"),a())}function Nn(r,p){if(r&1&&(n(0,"ng-option",36),C(1,"img",37),m(2),a()),r&2){let o=p.$implicit;s("value",o.ID),l(),s("src",o==null?null:o.Img,k),l(),v("",o.Name," ")}}function Mn(r,p){if(r&1){let o=M();n(0,"div",32)(1,"div",28)(2,"h5"),m(3,"Type"),a(),n(4,"p",29),m(5," Select Type want to download "),a()(),n(6,"div",28)(7,"div",38)(8,"div")(9,"mat-radio-group",39),w("ngModelChange",function(t){_(o);let i=c(2);return x(i.downloadType,t)||(i.downloadType=t),g(t)}),n(10,"mat-radio-button",40),m(11," Orders "),a(),n(12,"mat-radio-button",41),m(13," Disbursement "),a()()()(),n(14,"div",42)(15,"div",43),C(16,"i",44),a(),n(17,"p",45),m(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(r&2){let o=c(2);l(9),y("ngModel",o.downloadType),l(),s("value",!1),l(2),s("value",!0)}}function On(r,p){r&1&&(n(0,"p",29),m(1," Select Disbursement date "),n(2,"span",46),m(3,"(payment date / order complete date)"),a(),m(4," of the channel you want to download (Max 1 Week). "),a())}function Ln(r,p){r&1&&(n(0,"p",29),m(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function kn(r,p){if(r&1){let o=M();D(0),n(1,"div",47)(2,"app-timepicker",48),w("timeChange",function(t){_(o);let i=c(2);return x(i.timeFrom,t)||(i.timeFrom=t),g(t)}),a(),n(3,"span",49),m(4,"-"),a(),n(5,"app-timepicker",48),w("timeChange",function(t){_(o);let i=c(2);return x(i.timeTo,t)||(i.timeTo=t),g(t)}),a()(),E()}if(r&2){let o=c(2);l(2),y("time",o.timeFrom),l(3),y("time",o.timeTo)}}function Vn(r,p){if(r&1){let o=M();n(0,"div",27)(1,"div",8)(2,"div",7)(3,"div",28)(4,"h5"),m(5,"Select a Channel"),a(),n(6,"p",29),m(7," Select Channel want to download order "),a()(),n(8,"div",28)(9,"ng-select",30),w("ngModelChange",function(t){_(o);let i=c();return x(i.channelID,t)||(i.channelID=t),g(t)}),b("ngModelChange",function(){_(o);let t=c();return g(t.onSelectChannel())}),u(10,Nn,3,3,"ng-option",31),a()()(),u(11,Mn,19,3,"div",32),P(12,"async"),n(13,"div",32)(14,"div",28)(15,"h5"),m(16,"Date Range"),a(),u(17,On,5,0,"p",29)(18,Ln,2,0,"p",29),a(),n(19,"div",28)(20,"div",8)(21,"mat-date-range-input",33)(22,"input",34),w("ngModelChange",function(t){_(o);let i=c();return x(i.startDate,t)||(i.startDate=t),g(t)}),b("click",function(){_(o);let t=L(25);return g(t.open())}),a(),n(23,"input",35),w("ngModelChange",function(t){_(o);let i=c();return x(i.endDate,t)||(i.endDate=t),g(t)}),b("click",function(){_(o);let t=L(25);return g(t.open())})("ngModelChange",function(){_(o);let t=c();return g(t.onFilterDateChange())}),a()(),C(24,"mat-date-range-picker",null,1),a(),u(26,kn,6,2,"ng-container",5),a()()()()}if(r&2){let o,e=L(25),t=c();l(9),s("clearable",!1),y("ngModel",t.channelID),l(),s("ngForOf",t.channelOptions),l(),Je((o=O(12,9,t.channelDetail$))!=null&&o.ServiceFeeWriteOff?11:-1),l(6),Je(t.downloadType()&&(t.currentChannel==null?null:t.currentChannel.TypeID)==t.channelType.Tokopedia?17:18),l(4),s("rangePicker",e),l(),y("ngModel",t.startDate),l(),y("ngModel",t.endDate),l(3),s("ngIf",t.showTimePicker)}}function Fn(r,p){r&1&&(C(0,"i",50),n(1,"span"),m(2,"Preview"),a())}function An(r,p){if(r&1&&(n(0,"th",72),m(1),a()),r&2){let o=c(3);l(),v(" ",o.currentChannel?"Created Date":"Last Status Update"," ")}}function Rn(r,p){if(r&1&&(n(0,"td"),m(1),P(2,"date"),a()),r&2){let o=c().$implicit;l(),v(" ",A(2,1,o.Date,"dd MMM yyyy HH:mm:ss")," ")}}function Wn(r,p){if(r&1&&(n(0,"span"),m(1),a()),r&2){let o=c().$implicit;l(),v(" ",o.ActionString," ")}}function Bn(r,p){if(r&1&&(n(0,"li"),m(1),a()),r&2){let o=p.$implicit;l(),v(" ",o," ")}}function zn(r,p){if(r&1&&(n(0,"ul",77),u(1,Bn,2,1,"li",73),a()),r&2){let o=c().$implicit;l(),s("ngForOf",o.ActionString)}}function Gn(r,p){if(r&1&&(n(0,"span",78),C(1,"i",79),a()),r&2){let o=c().$implicit;ot("title","Delivery : ",o.DeliveryState,`
5
5
  Payment : `,o.PaymentState,"")}}function jn(r,p){if(r&1&&(n(0,"tr")(1,"td"),m(2),a(),n(3,"td"),m(4),a(),u(5,Rn,3,4,"td",5),n(6,"td")(7,"span"),m(8),a(),m(9),a(),n(10,"td",74)(11,"span"),m(12),a(),m(13),a(),n(14,"td"),u(15,Wn,2,1,"span",5)(16,zn,2,1,"ul",75),a(),n(17,"td"),u(18,Gn,2,3,"span",76),a()()),r&2){let o=p.$implicit,e=p.index,t=c(4);l(2),f(e+1),l(2),f(o.Number),l(),s("ngIf",(t.currentChannel==null?null:t.currentChannel.TypeID)!=t.channelType.Shopee&&(t.currentChannel==null?null:t.currentChannel.TypeID)!==t.channelType.Tiktok),l(3),v("",o.ChannelStatus," - "),l(),v("",o.ChannelStatusDescription," "),l(),s("ngClass",ie(12,bn,(o==null?null:o.Action)==t.actionPreviewOrder.Update,(o==null?null:o.Action)==t.actionPreviewOrder.New))("matTooltip",o.POSStatus==91||o.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),v("",o.POSStatus," - "),l(),v("",o.POSStatusDescription," "),l(2),s("ngIf",o.ActionString.length==1),l(),s("ngIf",o.ActionString.length>1),l(2),s("ngIf",o.ChannelStatus!=99&&o.POSStatus!=99)}}function Hn(r,p){if(r&1&&(D(0),u(1,jn,19,15,"tr",73),E()),r&2){let o=c(3);l(),s("ngForOf",o.displayedPreviewData)}}function Un(r,p){r&1&&(n(0,"tr",80)(1,"td",81)(2,"div",82),C(3,"i",83),a(),n(4,"h4",84),m(5," There is no order to processed "),a()()())}function Yn(r,p){if(r&1){let o=M();n(0,"div",52)(1,"div",53)(2,"div",54)(3,"div",55)(4,"div")(5,"ul",56)(6,"li",57)(7,"button",58),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.ALL))}),m(8),a()(),n(9,"li",59)(10,"button",60),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.SYNC))}),m(11),a()(),n(12,"li",59)(13,"button",61),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.WRONG))}),m(14),a()(),n(15,"li",59)(16,"button",62),b("click",function(){_(o);let t=c(2);return g(t.filterPreviewData(t.previewStatus.UNSYNC))}),m(17),a()()()(),n(18,"div")(19,"button",63),b("click",function(){_(o);let t=c(2);return g(t.exportOrders())}),C(20,"i",64),n(21,"span"),m(22,"Export"),a()()()()(),n(23,"table",65)(24,"thead",66)(25,"tr"),C(26,"th",67),n(27,"th",68),m(28,"Number"),a(),u(29,An,2,1,"th",69),n(30,"th",70),m(31,"Channel Status"),a(),n(32,"th",70),m(33,"POS Status"),a(),n(34,"th"),m(35,"Action"),a(),C(36,"th",67),a()(),n(37,"tbody"),u(38,Hn,2,1,"ng-container",71)(39,Un,6,0,"ng-template",null,2,z),a()()()()}if(r&2){let o=L(40),e=c(2);l(7),s("ngClass",e.pillStatus=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),v(" All (",e.allData,") "),l(2),s("ngClass",e.pillStatus=="sync"?"btn-success":"btn-outline-success"),l(),v(" Existing (",e.syncData,") "),l(2),s("ngClass",e.pillStatus=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),v(" Wrong Status (",e.wrongData,") "),l(2),s("ngClass",e.pillStatus=="unsync"?"btn-danger":"btn-outline-danger"),l(),v(" Missing (",e.unsyncData,") "),l(12),s("ngIf",(e.currentChannel==null?null:e.currentChannel.TypeID)!=e.channelType.Shopee&&(e.currentChannel==null?null:e.currentChannel.TypeID)!==e.channelType.Tiktok),l(9),s("ngIf",e.displayedPreviewData.length>0)("ngIfElse",o)}}function qn(r,p){if(r&1&&u(0,Yn,41,11,"div",51),r&2){let o=c();s("ngIf",o.currentState=="preview")}}function Kn(r,p){r&1&&(C(0,"i",85),n(1,"span"),m(2,"Finish"),a())}function Jn(r,p){if(r&1&&(n(0,"tr",87)(1,"td"),m(2),a(),n(3,"td"),m(4),a(),n(5,"td"),m(6),a(),n(7,"td"),m(8),a()()),r&2){let o=p.$implicit,e=p.index;s("ngClass",mt(5,vn,o.Exception)),l(2),f(e+1),l(2),f(o.Number),l(2),f(o.Status),l(2),f(o.Exception)}}function $n(r,p){if(r&1&&(D(0),u(1,Jn,9,7,"tr",86),E()),r&2){let o=c(3);l(),s("ngForOf",o.downloadData)}}function Xn(r,p){r&1&&(n(0,"tr",80)(1,"td",81)(2,"div",82),C(3,"i",83),a(),n(4,"h4",84),m(5," There is no order to processed "),a()()())}function Qn(r,p){if(r&1&&(n(0,"div",52)(1,"div",53)(2,"table",65)(3,"thead",66)(4,"tr"),C(5,"th",67),n(6,"th"),m(7,"Order Number"),a(),n(8,"th"),m(9,"Status"),a(),n(10,"th"),m(11,"Exception"),a()()(),n(12,"tbody"),u(13,$n,2,1,"ng-container",71)(14,Xn,6,0,"ng-template",null,3,z),a()()()()),r&2){let o=L(15),e=c(2);l(13),s("ngIf",(e.downloadData==null?null:e.downloadData.length)>0)("ngIfElse",o)}}function Zn(r,p){if(r&1&&u(0,Qn,16,2,"div",51),r&2){let o=c();s("ngIf",o.currentState=="finish")}}function ea(r,p){r&1&&(n(0,"h6"),m(1,"1"),a())}function ta(r,p){r&1&&(n(0,"h6"),m(1,"2"),a())}function ia(r,p){r&1&&(n(0,"h6"),m(1,"3"),a())}var ee=function(r){return r.ALL="all",r.SYNC="sync",r.WRONG="wrong",r.UNSYNC="unsync",r}(ee||{}),ai=(()=>{let p=class p{constructor(e,t,i,h,S,d,Pe){this.http=e,this.toastr=t,this.datePipe=i,this.url=h,this.productService=S,this.orderService=d,this.authService=Pe,this.pageTitle="Download to POS",this.pillStatus="all",this.displayedPreviewData=[],this.previewData=[],this.channelType=I,this.previewStatus=ee,this.currentState="filter",this.wrongData=0,this.unsyncData=0,this.syncData=0,this.allData=0,this.actionPreviewOrder=Ie,this.cacheKey="",this.showTimePicker=!1,this.downloadType=at(!1),this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initTimeFilter(),this.url.queryParams.subscribe(e=>{this.channelID=e.ChannelID,this.startDate=new Date(e.Date),this.endDate=new Date(e.Date)})}initTimeFilter(){this.timeFrom="00:00",this.timeTo="23:59"}onDownload(e){let t={ID:this.channelID,From:this.startDate,To:this.endDate,ListPreview:this.downloadedPreviewData,IsDisbursement:this.downloadType(),cacheKey:this.cacheKey};this.http.post("/api/Orders/Download",t).subscribe(i=>{this.downloadData=i.Body,this.onStepperNext(e)})}onPreview(e){if(!this.validateDatePreview())return;let t={ID:this.channelID,From:this.startDate,To:this.endDate,IsDisbursement:this.downloadType()};this.showTimePicker&&(t=Ze(Qe({},t),{TimeFrom:this.timeFrom+":00",TimeTo:this.timeTo+":00"})),this.http.post("/api/Orders/Preview",t).subscribe(i=>{if(i.Data.length==0){this.toastrEmptyPreview();return}this.cacheKey=i.cacheKey,this.previewData=i.Data,this.groupingPreviewData(),this.filterPreviewData(ee.ALL),this.initLengthStatusData(),this.onStepperNext(e)})}toastrEmptyPreview(){let e=this.datePipe.transform(this.startDate,"dd MMM yyyy"),t=this.datePipe.transform(this.endDate,"dd MMM yyyy"),i=this.showTimePicker?this.timeFrom+":00":"",h=this.showTimePicker?this.timeTo+":00":"";this.toastr.info(`There is no orders from ${e} ${i} to ${t} ${h}!`,"No Orders!")}validateDatePreview(){let e=!0;return this.downloadType()==!0?N.getDaysDiff(this.startDate,this.endDate)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Failed"),e=!1):N.getDaysDiff(this.startDate,this.endDate)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Failed"),e=!1),e}onSelectChannel(){this.currentChannel=this.channelOptions.find(e=>e.ID==this.channelID),this.initGetChannelDetail()}initGetChannelDetail(){this.currentChannel.TypeID==I.Tokopedia?this.channelDetail$=this.http.post("/api/ChannelLoader/GetChannelView",{ID:this.currentChannel.ID}).pipe(U(e=>e?.Model),ge(1)):this.channelDetail$=null}setPageTitle(e){this.pageTitle=`
6
6
  ${e} (${this.getDateTitle()})
7
7
  `}getDateTitle(){let e=N.formatTitleFromDate(new Date(this.startDate),new Date(this.endDate)),t=this.datePipe.transform(this.startDate,e),i=this.datePipe.transform(this.endDate,"dd MMM yyyy");return`${e==null?"":t+"-"} ${i}`}onNew(e){this.channelID=null,this.startDate=null,this.endDate=null,this.pageTitle="Download to POS",this.channelDetail$=null,e.reset()}groupingPreviewData(){let e=this.filterDataByStatus(ee.UNSYNC),t=this.filterDataByStatus(ee.WRONG),i=[];this.currentChannel.TypeID==I.Tokopedia&&(i=this.filterDataByStatus(ee.SYNC)),this.downloadedPreviewData=[...i,...e,...t]}filterDataByStatus(e){let t=[];switch(e){case ee.ALL:t=this.previewData;break;case ee.SYNC:t=this.previewData.filter(i=>i.Action==Ie.DoNothing);break;case ee.WRONG:t=this.previewData.filter(i=>i.Action==Ie.Update);break;case ee.UNSYNC:t=this.previewData.filter(i=>i.Action==Ie.New);break}return t}filterPreviewData(e){this.pillStatus=e,this.displayedPreviewData=this.filterDataByStatus(e)}initLengthStatusData(){this.wrongData=this.filterDataByStatus(ee.WRONG).length,this.allData=this.previewData.length,this.syncData=this.filterDataByStatus(ee.SYNC).length,this.unsyncData=this.filterDataByStatus(ee.UNSYNC).length}getTypeID(){var e=this.channelOptions.find(t=>t.ID==this.channelID)?.TypeID;return e??0}onStepperChange(e){this.currentState=e.selectedStep.state}onStepperNext(e){e.selected.completed=!0,e.next()}onNext(e){switch(this.currentState){case"filter":this.onPreview(e);break;case"preview":this.onDownload(e);break}}stepChange(e){switch(e?.selectedStep?.state){case"filter":this.pageTitle="Download To POS",this.resetPreviewData();break;case"preview":let t=this.productService.findChannelById(this.channelID,this.channelOptions);this.setPageTitle(`Preview ${t?.Name}`);break;case"finish":this.setPageTitle("Download");break}}resetPreviewData(){this.displayedPreviewData=[],this.previewData=[],this.initLengthStatusData()}checkDisabledNextFilter(){let e=!N.isValidDate(this.startDate)||!N.isValidDate(this.endDate),t=N.IsEmpty(this.channelID);return e||t}exportOrders(){let e={ID:this.channelID,From:this.startDate,To:this.endDate},t=`Orders ${this.getDateTitle()}`;this.orderService.exportOrders(e,t).subscribe()}onFilterDateChange(){let e=1;this.startDate&&this.endDate&&(e=N.getDaysDiff(this.startDate,this.endDate)),this.showTimePicker=e==0}};p.\u0275fac=function(t){return new(t||p)(T(B),T(we),T(F),T(We),T(Mt),T(ve),T(J))},p.\u0275cmp=V({type:p,selectors:[["app-download"]],features:[lt([{provide:Wt,useValue:{displayDefaultIndicatorType:!1}}])],decls:25,vars:13,consts:[["stepper",""],["picker",""],["EMPTY",""],["EMPTY_DOWNLOAD",""],[3,"headerTitle","description","hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectionChange","ngClass"],["state","filter",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","preview",3,"editable","completed"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],["routerLink","/menu/Order/Download",1,"btn","btn-outline-secondary","btn-fill","me-3"],[1,"btn-group","me-3"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[1,"mt-8"],[3,"timeChange","time"],[1,"mx-4"],[1,"fa-solid","fa-file","me-3"],["class","row pt-2",4,"ngIf"],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"]],template:function(t,i){if(t&1){let h=M();n(0,"mainpanel",4)(1,"actions"),u(2,Tn,3,0,"ng-container",5)(3,Dn,6,1,"ng-container",5)(4,En,3,1,"ng-container",5)(5,Pn,4,0,"ng-container",5),a(),n(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"mat-stepper",10,0),b("selectionChange",function(d){return _(h),g(i.stepChange(d))})("selectionChange",function(d){return _(h),g(i.onStepperChange(d))}),n(13,"mat-step",11),u(14,In,3,0,"ng-template",12)(15,Vn,27,11,"ng-template",13),a(),n(16,"mat-step",14),u(17,Fn,3,0,"ng-template",12)(18,qn,1,1,"ng-template",13),a(),n(19,"mat-step",15),u(20,Kn,3,0,"ng-template",12)(21,Zn,1,1,"ng-template",13),a(),u(22,ea,2,0,"ng-template",16)(23,ta,2,0,"ng-template",17)(24,ia,2,0,"ng-template",18),a()()()()()()()}if(t&2){let h=L(12);s("headerTitle",i.pageTitle)("description",i.pageTitle)("hideSearchBox",!0)("hideSearchDropdown",!0),l(2),s("ngIf",i.currentState=="filter"),l(),s("ngIf",i.currentState=="preview"),l(),s("ngIf",i.currentState=="filter"),l(),s("ngIf",i.currentState=="finish"),l(6),rt("ngClass","last-edited-step-"+h.selectedIndex),l(2),s("editable",i.currentState!="finish")("completed",!1),l(3),s("editable",i.currentState!="finish")("completed",!1)}},dependencies:[dt,R,W,K,G,j,H,q,$,ht,kt,Ot,Lt,Vt,jt,Bt,Ht,zt,Gt,ut,Ge,Et,Pt,ye,F],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
8
- `],encapsulation:2});let r=p;return r})();var na=[{path:"",component:Kt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:$t,canActivate:[oe],data:{title:"New Order"}},{path:"detail",component:Xt,canActivate:[oe],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Zt,canActivate:[oe],data:{title:"Ready To Ship"}},{path:"Shipped",component:ei,canActivate:[oe],data:{title:"Shipped"}},{path:"Delivered",component:ti,canActivate:[oe],data:{title:"Delivered"}},{path:"All",component:ii,canActivate:[oe],data:{title:"All Order"}},{path:"Cancelled",component:ni,canActivate:[oe],data:{title:"Cancelled"}},{path:"Download/V1",component:ai,canActivate:[oe],data:{title:"Download V1"}},{path:"Download",loadComponent(){return import("./chunk-5CMHP3Y6.js").then(r=>r.DownloadV2Component)},canActivate:[oe],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-XTU6D7FF.js").then(r=>r.DownloadOrderLogComponent),canActivate:[oe],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-OKR5PVTL.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[oe],data:{title:"Download Order Log Detail"}}]}],ri=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({imports:[xe,Be.forChild(na)]});let r=p;return r})();var mo=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({providers:[ve,je,Ue],imports:[xe,ct,ri,Dt,wt,Rt,Be,_t,Ft,gt,X,Ut,ft,vt,qt,xt,Nt,bt,Q,Ye,Ge,It]});let r=p;return r})();export{mo as OrdersModule};
8
+ `],encapsulation:2});let r=p;return r})();var na=[{path:"",component:Kt,children:[{path:"",redirectTo:"new",pathMatch:"full"},{path:"new",component:$t,canActivate:[oe],data:{title:"New Order"}},{path:"detail",component:Xt,canActivate:[oe],data:{title:"Orders detail"}},{path:"ready_to_ship",component:Zt,canActivate:[oe],data:{title:"Ready To Ship"}},{path:"Shipped",component:ei,canActivate:[oe],data:{title:"Shipped"}},{path:"Delivered",component:ti,canActivate:[oe],data:{title:"Delivered"}},{path:"All",component:ii,canActivate:[oe],data:{title:"All Order"}},{path:"Cancelled",component:ni,canActivate:[oe],data:{title:"Cancelled"}},{path:"Download/V1",component:ai,canActivate:[oe],data:{title:"Download V1"}},{path:"Download",loadComponent(){return import("./chunk-HN56DIDB.js").then(r=>r.DownloadV2Component)},canActivate:[oe],data:{title:"Download"}},{path:"Download_Order_Log",loadComponent:()=>import("./chunk-37U2QWW4.js").then(r=>r.DownloadOrderLogComponent),canActivate:[oe],data:{title:"Download Order Log"}},{path:"Download_Order_Log/Detail",loadComponent:()=>import("./chunk-OKR5PVTL.js").then(r=>r.DownloadOrderDetailComponent),canActivate:[oe],data:{title:"Download Order Log Detail"}}]}],ri=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({imports:[xe,Be.forChild(na)]});let r=p;return r})();var mo=(()=>{let p=class p{};p.\u0275fac=function(t){return new(t||p)},p.\u0275mod=Re({type:p}),p.\u0275inj=Ae({providers:[ve,je,Ue],imports:[xe,ct,ri,Dt,wt,Rt,Be,_t,Ft,gt,X,Ut,ft,vt,qt,xt,Nt,bt,Q,Ye,Ge,It]});let r=p;return r})();export{mo as OrdersModule};