marketplacepos 5.27.0 → 5.27.1

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 (36) hide show
  1. package/Marketplace/{chunk-SSTTF3FQ.js → chunk-2YMECMSR.js} +1 -1
  2. package/Marketplace/{chunk-O2VYLVWY.js → chunk-3Q2URG6A.js} +1 -1
  3. package/Marketplace/{chunk-4IWDZPGG.js → chunk-46R7IHUN.js} +1 -1
  4. package/Marketplace/{chunk-Q26PFOHP.js → chunk-4A32CGYJ.js} +1 -1
  5. package/Marketplace/{chunk-6ZC7AHDI.js → chunk-5GM7EMCW.js} +1 -1
  6. package/Marketplace/{chunk-SFXIE6YZ.js → chunk-5MDJ736Z.js} +1 -1
  7. package/Marketplace/{chunk-6DPEMYNN.js → chunk-7K2MZBIS.js} +1 -1
  8. package/Marketplace/{chunk-2CTM3NU6.js → chunk-7MJLGWGO.js} +1 -1
  9. package/Marketplace/{chunk-KI2CZLVL.js → chunk-B5G3NXGZ.js} +1 -1
  10. package/Marketplace/{chunk-FBH4NQ2Z.js → chunk-BGVNHOVR.js} +1 -1
  11. package/Marketplace/{chunk-BCYGIHIC.js → chunk-BH24WP3G.js} +1 -1
  12. package/Marketplace/{chunk-3LZZZODB.js → chunk-CBTOH6MR.js} +1 -1
  13. package/Marketplace/{chunk-277CLJYZ.js → chunk-EIVRD47O.js} +1 -1
  14. package/Marketplace/{chunk-PGJ2WYXK.js → chunk-F56CFYMK.js} +1 -1
  15. package/Marketplace/{chunk-WDRTJ2IL.js → chunk-FBBV333P.js} +1 -1
  16. package/Marketplace/{chunk-RHDOT4EP.js → chunk-H34Q3GYZ.js} +1 -1
  17. package/Marketplace/{chunk-KLDZNZ5W.js → chunk-J73WANXO.js} +1 -1
  18. package/Marketplace/{chunk-HRKPRVXA.js → chunk-KPJODN5E.js} +1 -1
  19. package/Marketplace/{chunk-F2DG2ON6.js → chunk-LEUYZTMQ.js} +2 -2
  20. package/Marketplace/{chunk-J4PVPKPU.js → chunk-LFO4SCWH.js} +1 -1
  21. package/Marketplace/{chunk-L2DBJKC2.js → chunk-PFSBYBSC.js} +1 -1
  22. package/Marketplace/{chunk-LUSDZAH6.js → chunk-PKLEOUHF.js} +1 -1
  23. package/Marketplace/{chunk-ZASKXRZO.js → chunk-QPOKPYKN.js} +1 -1
  24. package/Marketplace/{chunk-BRKFLVFY.js → chunk-RJQGJK46.js} +1 -1
  25. package/Marketplace/{chunk-TMLN53D4.js → chunk-SBRCDNLE.js} +1 -1
  26. package/Marketplace/{chunk-SAM36DJ5.js → chunk-VO7GA6OK.js} +1 -1
  27. package/Marketplace/{chunk-3X6WYIZH.js → chunk-W2YE2TMM.js} +1 -1
  28. package/Marketplace/{chunk-FBLDXZW5.js → chunk-W56SA7JQ.js} +1 -1
  29. package/Marketplace/{chunk-DAGO5YDD.js → chunk-WG37UJWV.js} +1 -1
  30. package/Marketplace/{chunk-GWQEULN7.js → chunk-WU6F5N6K.js} +1 -1
  31. package/Marketplace/{chunk-6HXQVXUV.js → chunk-WX2SZ2RT.js} +1 -1
  32. package/Marketplace/{chunk-AOBGCH4T.js → chunk-YH6ZV7UM.js} +1 -1
  33. package/Marketplace/{chunk-D5FEJFQG.js → chunk-YS4NTLQO.js} +1 -1
  34. package/Marketplace/index.html +2 -2
  35. package/Marketplace/{main-ZPMXQTRD.js → main-7O2YU7WU.js} +1 -1
  36. package/package.json +1 -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{j as Z}from"./chunk-6ZC7AHDI.js";import{e as X}from"./chunk-E3NPUJ23.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{j as Z}from"./chunk-5GM7EMCW.js";import{e as X}from"./chunk-E3NPUJ23.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 ct}from"./chunk-BCYGIHIC.js";import{a as Ct}from"./chunk-BQ7NR3ET.js";import{a as ht,b as ft}from"./chunk-UMNGKENU.js";import{f as gt}from"./chunk-HCDKYABV.js";import{b as D,c as E,i as k,j as w}from"./chunk-BO4PPSB5.js";import{t as P}from"./chunk-HUUFOAKH.js";import{X as mt}from"./chunk-E5GGIVK7.js";import{h as st,m as pt}from"./chunk-BSN7ZAXG.js";import{b as m,c as f}from"./chunk-64G3XLI6.js";import{o as dt}from"./chunk-OVEJFFL6.js";import{$b as v,Bd as rt,Da as L,Ea as F,Eb as C,Fb as z,Gb as p,Gc as x,Hc as O,Jc as ot,Nb as G,Ob as et,Qb as nt,Rb as it,Sb as a,Tb as r,Ub as y,Vb as H,Wb as J,Yb as R,Z as X,bc as h,gb as I,jb as l,kb as g,mc as at,nc as s,oc as u,pa as Z,pc as S,rc as V,sc as U,sd as B,ta as T,tc as A,ud as K,v as Q,vd as $,xb as tt,xc as W,yd as lt}from"./chunk-PQDPS2ID.js";function bt(n,d){if(n&1&&(a(0,"mat-option",10)(1,"div",11),y(2,"img",12),a(3,"span"),s(4),r()()()),n&2){let t=d.$implicit;p("value",t.ID)("disabled",t.disabled),l(),p("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),p("src",t.Img,I),l(2),u(t.Name)}}function Tt(n,d){if(n&1){let t=R();a(0,"div",13)(1,"label",14),s(2,"Scan Type"),r(),a(3,"mat-radio-group",15),A("ngModelChange",function(e){L(t);let o=h();return U(o.filter.ScanFull,e)||(o.filter.ScanFull=e),F(e)}),a(4,"mat-radio-button",16),s(5," Full (Include Inactive Products) "),r(),a(6,"mat-radio-button",17),s(7," Active "),r()()()}if(n&2){let t=h();l(3),V("ngModel",t.filter.ScanFull),l(),p("value",!0),l(2),p("value",!1)}}function It(n,d){n&1&&(a(0,"span"),s(1,"Never"),r())}function xt(n,d){if(n&1&&(a(0,"span"),s(1),x(2,"async"),r()),n&2){let t=h(2);l(),u(O(2,1,t.lastSync$))}}function Ot(n,d){if(n&1){let t=R();a(0,"div",8)(1,"label",3)(2,"span",18),s(3,"Last Scan:"),r(),C(4,It,2,0,"span"),x(5,"async"),C(6,xt,3,3,"span"),r(),a(7,"mat-radio-group",19),A("ngModelChange",function(e){L(t);let o=h();return U(o.filter.UpdatedProduct,e)||(o.filter.UpdatedProduct=e),F(e)}),a(8,"mat-radio-button",20),s(9," Scan All Products "),r(),a(10,"mat-radio-button",21),s(11),r()()()}if(n&2){let t=h();l(4),G(O(5,6,t.lastSync$)==null?4:6),l(3),V("ngModel",t.filter.UpdatedProduct),l(),p("value",!1),l(2),p("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),l(),S(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Pt(n,d){if(n&1){let t=R();a(0,"div",8)(1,"label",3),s(2," Scan Option "),r(),a(3,"mat-radio-group",22),A("ngModelChange",function(e){L(t);let o=h();return U(o.filter.Async,e)||(o.filter.Async=e),F(e)}),a(4,"mat-radio-button",23),s(5," Asynchronous (Get Notified when Complete) "),r(),a(6,"mat-radio-button",24),s(7," Synchronous (Wait until Complete) "),r()()()}if(n&2){let t=h();l(3),V("ngModel",t.filter.Async),l(),p("value",!0),l(2),p("value",!1)}}var te=(()=>{let d=class d{constructor(i,e,o){this.dialogRef=i,this.data=e,this.router=o,this.channelService=Z(ct),this.channelType=m,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=f.IsNotEmpty(e.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=f.IsEmpty(e.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(i=>(i.disabled=!0,(i.TypeID==m.Tiktok||i.TypeID==m.Tokopedia||i.TypeID==m.Lazada||i.TypeID==m.WooCommerce)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let e=this.filterChannelById(i);this.selectedChannel=e,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(i)}getLastSync(i){this.lastSync$=this.channelService.getLastSync(i).pipe(Q(e=>(this.selectedChannel.LastSync=e.LastSync,this.setDefaultConfigUpdate(),f.IsNotEmpty(e.LastSync)?f.convertToReadableDate(e.LastSync):null)),X(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==m.Shopee||this.selectedChannel.TypeID==m.Tiktok||this.selectedChannel.TypeID==m.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=m.WooCommerce&&this.selectedChannel?.TypeID!=m.KalCare&&this.selectedChannel?.TypeID!=m.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(i){let e;return this.channelOptions&&(e=this.channelOptions.find(o=>o.ID==i)),e}submit(){this.selectedChannel.TypeID==m.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(i){return f.IsNotEmpty(i)}onClose(){this.dialogRef.close()}};d.\u0275fac=function(e){return new(e||d)(g(D),g(E),g(dt))},d.\u0275cmp=T({type:d,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","disabled","ngModel"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(e,o){e&1&&(a(0,"modal-material",0),v("onOk",function(){return o.submit()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),a(1,"div",1)(2,"div",2)(3,"label",3),s(4,"Select a Channel"),r(),a(5,"mat-form-field",4)(6,"mat-select",5),A("ngModelChange",function(c){return U(o.filter.ChannelID,c)||(o.filter.ChannelID=c),c}),v("ngModelChange",function(c){return o.onSelectChannel(c)}),C(7,bt,5,5,"mat-option",6),r()(),C(8,Tt,8,3,"div",7)(9,Ot,12,8,"div",8)(10,Pt,8,3,"div",9),r()()()),e&2&&(p("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),l(6),p("disabled",o.disabledChannelOption),V("ngModel",o.filter.ChannelID),l(),p("ngForOf",o.channelOptions),l(),p("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)),l(),G(o.hasScanUpdate&&o.selectedChannel?9:-1),l(),p("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)))},dependencies:[K,$,st,pt,ht,ft,gt,Ct,mt,P,w,lt],encapsulation:2});let n=d;return n})();var M=function(n){return n.Tokopedia="https://seller.tokopedia.com",n.Shoope="https://seller.shopee.co.id",n.Tiktok="https://seller-id.tiktok.com",n.WooCommerce="https://woocommerce.dealpos.app",n.Lazada="https://sellercenter.lazada.co.id",n}(M||{});var Dt=n=>({"is-disabled":n});function Et(n,d){if(n&1&&(H(0),a(1,"tr")(2,"td",11),s(3),r(),a(4,"td",11),s(5),r(),a(6,"td",12)(7,"p",13),s(8,"Product Not in Channel!"),r()()(),J()),n&2){let t=h().$implicit;l(3),S(" ",t==null?null:t.Model,""),l(2),S(" ",t==null?null:t.Code,"")}}function kt(n,d){if(n&1&&(a(0,"td",11),s(1),r()),n&2){let t=h(3).$implicit;z("rowspan",t.Channel.length),l(),S(" ",t==null?null:t.Model,"")}}function wt(n,d){if(n&1&&(a(0,"td",11),s(1),r()),n&2){let t=h(3).$implicit;z("rowspan",t.Channel.length),l(),S(" ",t==null?null:t.Code,"")}}function Nt(n,d){if(n&1&&(a(0,"tr"),C(1,kt,2,2,"td",14)(2,wt,2,2,"td",14),a(3,"td",11)(4,"div",15)(5,"a",16),y(6,"img",17),r(),a(7,"div",18),s(8),r()()(),a(9,"td",11),s(10),x(11,"number"),r(),a(12,"td",19),s(13),x(14,"number"),r(),a(15,"td",19)(16,"a",20),y(17,"i",21),a(18,"span",22),s(19,"Edit"),r()()()()),n&2){let t=d.$implicit,i=d.index,e=h(3);l(),p("ngIf",i==0),l(),p("ngIf",i==0),l(3),p("href",t.Url,I)("title",t.Title),l(),p("src",e.getChannelLogo(t.TypeID),I),l(),p("matTooltip",(t==null||t.Name==null?null:t.Name.length)>55?t==null?null:t.Name:""),l(),S(" ",t.Name," "),l(2),u(O(11,12,t.Price)),l(3),u(O(14,14,t.Inventory)),l(3),p("href",e.getHyperlinkSellerCenter(t),I)("ngClass",W(16,Dt,t.TypeID==e.channelType.KalCare))("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Vt(n,d){if(n&1&&C(0,Nt,20,18,"tr",9),n&2){let t=h().$implicit;p("ngForOf",t==null?null:t.Channel)}}function Ut(n,d){if(n&1&&(H(0),C(1,Et,9,2,"ng-container",10)(2,Vt,1,1,"ng-template",null,0,ot),J()),n&2){let t=d.$implicit,i=at(3);l(),p("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",i)}}var de=(()=>{let d=class d{constructor(i,e){this.data=i,this.dialogRef=e,this.channelType=m,this.variants=i.variants,this.title=i.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(i){return f.getChannelLogoByTypeId(i)}getHyperlinkSellerCenter(i){let e="javascript:void(0)";switch(i.TypeID){case m.Shopee:e=`${M.Shoope}/portal/product/${i.ChannelItemID}`;break;case m.Tiktok:e=`${M.Tiktok}/product/edit/${i.ChannelItemID}`;break;case m.Tokopedia:e=`${M.Tokopedia}/edit-product/${i.ChannelItemID}`;break;case m.WooCommerce:e=`${M.WooCommerce}/wp-admin/post.php?post=${i.ChannelItemID}&action=edit`;break;case m.Lazada:e=`${M.Lazada}/apps/product/publish?productId=${i.ChannelItemID}`;break}return e}};d.\u0275fac=function(e){return new(e||d)(g(E),g(D))},d.\u0275cmp=T({type:d,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[["printChannelModal",""],[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,o){e&1&&(a(0,"modal-material",1),v("onCancel",function(){return o.dialogRef.close()}),a(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr")(5,"th",5),s(6," VARIANT "),a(7,"sup"),y(8,"i",6),r()(),a(9,"th",5),s(10,"SKU"),r(),a(11,"th",5),s(12," PRODUCT "),a(13,"sup"),y(14,"i",7),r()(),a(15,"th",5),s(16,"PRICE"),r(),a(17,"th",8),s(18,"INVENTORY"),r(),y(19,"th",5),r()(),a(20,"tbody"),C(21,Ut,4,2,"ng-container",9),r()()()()),e&2&&(p("config",o.modalConfig),l(21),p("ngForOf",o.variants))},dependencies:[B,K,$,P,w,rt],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});let n=d;return n})();var At=n=>({"bg-gradient-warning":n});function Lt(n,d){if(n&1&&(a(0,"tr",5)(1,"td"),s(2),r(),a(3,"td",6),s(4),r()()),n&2){let t=d.$implicit;p("matTooltip",t.duplicateMessage),l(2),u(t==null?null:t.Name),l(),p("ngClass",W(4,At,t.isDuplicate)),l(),u(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var Ce=(()=>{let d=class d{constructor(i,e){this.data=i,this.dialogRef=e,this.variants=tt([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let i=this.data?.variants,e={},o=[],_=i.filter(c=>f.IsEmpty(c.ChannelVariationSKU));i.filter(c=>f.IsNotEmpty(c.ChannelVariationSKU)).forEach((c,b,Y)=>{e[c.ChannelVariationSKU]=Y.filter(N=>N.ChannelVariationSKU===c.ChannelVariationSKU)}),Object.keys(e).forEach(c=>{e[c].length>1&&(e[c]=e[c].map((b,Y,N)=>{let q=`SKU ${b.ChannelVariationSKU} is duplicated with variant`;return N.forEach((j,Mt)=>{j.Name!==b.Name&&(q+=` ${N.length>2?j.Name+(Mt!==N.length-1?",":""):j.Name}`)}),b.duplicateMessage=q,b.isDuplicate=!0,b})),o.push(...e[c])}),o.push(..._),this.variants.set(o)}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};d.\u0275fac=function(e){return new(e||d)(g(E),g(D))},d.\u0275cmp=T({type:d,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,o){e&1&&(a(0,"modal-material",0),v("onCancel",function(){return o.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),s(6,"Variant"),r(),a(7,"th",4),s(8,"SKU"),r()()(),a(9,"tbody"),nt(10,Lt,5,6,"tr",5,et),r()()()()),e&2&&(p("config",o.modalConfig),l(10),it(o.variants()))},dependencies:[B,P,w],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let n=d;return n})();export{te as a,de as b,Ce as c};
1
+ import{a as ct}from"./chunk-BH24WP3G.js";import{a as Ct}from"./chunk-BQ7NR3ET.js";import{a as ht,b as ft}from"./chunk-UMNGKENU.js";import{f as gt}from"./chunk-HCDKYABV.js";import{b as D,c as E,i as k,j as w}from"./chunk-BO4PPSB5.js";import{t as P}from"./chunk-HUUFOAKH.js";import{X as mt}from"./chunk-E5GGIVK7.js";import{h as st,m as pt}from"./chunk-BSN7ZAXG.js";import{b as m,c as f}from"./chunk-64G3XLI6.js";import{o as dt}from"./chunk-OVEJFFL6.js";import{$b as v,Bd as rt,Da as L,Ea as F,Eb as C,Fb as z,Gb as p,Gc as x,Hc as O,Jc as ot,Nb as G,Ob as et,Qb as nt,Rb as it,Sb as a,Tb as r,Ub as y,Vb as H,Wb as J,Yb as R,Z as X,bc as h,gb as I,jb as l,kb as g,mc as at,nc as s,oc as u,pa as Z,pc as S,rc as V,sc as U,sd as B,ta as T,tc as A,ud as K,v as Q,vd as $,xb as tt,xc as W,yd as lt}from"./chunk-PQDPS2ID.js";function bt(n,d){if(n&1&&(a(0,"mat-option",10)(1,"div",11),y(2,"img",12),a(3,"span"),s(4),r()()()),n&2){let t=d.$implicit;p("value",t.ID)("disabled",t.disabled),l(),p("matTooltip",t.disabled?"Single Product Scan disabled for this type of Channel":null),l(),p("src",t.Img,I),l(2),u(t.Name)}}function Tt(n,d){if(n&1){let t=R();a(0,"div",13)(1,"label",14),s(2,"Scan Type"),r(),a(3,"mat-radio-group",15),A("ngModelChange",function(e){L(t);let o=h();return U(o.filter.ScanFull,e)||(o.filter.ScanFull=e),F(e)}),a(4,"mat-radio-button",16),s(5," Full (Include Inactive Products) "),r(),a(6,"mat-radio-button",17),s(7," Active "),r()()()}if(n&2){let t=h();l(3),V("ngModel",t.filter.ScanFull),l(),p("value",!0),l(2),p("value",!1)}}function It(n,d){n&1&&(a(0,"span"),s(1,"Never"),r())}function xt(n,d){if(n&1&&(a(0,"span"),s(1),x(2,"async"),r()),n&2){let t=h(2);l(),u(O(2,1,t.lastSync$))}}function Ot(n,d){if(n&1){let t=R();a(0,"div",8)(1,"label",3)(2,"span",18),s(3,"Last Scan:"),r(),C(4,It,2,0,"span"),x(5,"async"),C(6,xt,3,3,"span"),r(),a(7,"mat-radio-group",19),A("ngModelChange",function(e){L(t);let o=h();return U(o.filter.UpdatedProduct,e)||(o.filter.UpdatedProduct=e),F(e)}),a(8,"mat-radio-button",20),s(9," Scan All Products "),r(),a(10,"mat-radio-button",21),s(11),r()()()}if(n&2){let t=h();l(4),G(O(5,6,t.lastSync$)==null?4:6),l(3),V("ngModel",t.filter.UpdatedProduct),l(),p("value",!1),l(2),p("value",!0)("matTooltip",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Use Tokopedia URL for mapping SKU between POS and Tokopedia":"Scan only products that have been updated since the last channel scan"),l(),S(" ",t.selectedChannel.TypeID==t.channelType.Tokopedia?"Product Download By URL":"Scan Updated Products"," ")}}function Pt(n,d){if(n&1){let t=R();a(0,"div",8)(1,"label",3),s(2," Scan Option "),r(),a(3,"mat-radio-group",22),A("ngModelChange",function(e){L(t);let o=h();return U(o.filter.Async,e)||(o.filter.Async=e),F(e)}),a(4,"mat-radio-button",23),s(5," Asynchronous (Get Notified when Complete) "),r(),a(6,"mat-radio-button",24),s(7," Synchronous (Wait until Complete) "),r()()()}if(n&2){let t=h();l(3),V("ngModel",t.filter.Async),l(),p("value",!0),l(2),p("value",!1)}}var te=(()=>{let d=class d{constructor(i,e,o){this.dialogRef=i,this.data=e,this.router=o,this.channelService=Z(ct),this.channelType=m,this.disabledChannelOption=!1,this.filter={ChannelID:f.GuidEMpty,ScanFull:!0,UpdatedProduct:!1,Async:!1},this.isSingleChannel=f.IsNotEmpty(e.isSingleChannel)?this.data.isSingleChannel:!1,this.disabledChannelOption=f.IsEmpty(e.disabledChannelOption)?!1:this.data.disabledChannelOption}ngOnInit(){this.initChannelOptions(),this.initFilter(),this.onSelectChannel(this.data?.filter?.ChannelID),this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.isSingleChannel?"Scan Single Product":"Scan Channel Marketplace",this.modalConfig.bodyScrollable=!0}initFilter(){this.filter.ChannelID=this.data?.filter?.ChannelID}initChannelOptions(){this.channelOptions=JSON.parse(JSON.stringify(this.data.channelOptions)),this.isSingleChannel&&(this.channelOptions=this.channelOptions.map(i=>(i.disabled=!0,(i.TypeID==m.Tiktok||i.TypeID==m.Tokopedia||i.TypeID==m.Lazada||i.TypeID==m.WooCommerce)&&(i.disabled=!1),i)).sort(i=>i.disabled?1:-1))}onSelectChannel(i){let e=this.filterChannelById(i);this.selectedChannel=e,this.filter.Async=!0,this.iniHasScanUpdate(),this.getLastSync(i)}getLastSync(i){this.lastSync$=this.channelService.getLastSync(i).pipe(Q(e=>(this.selectedChannel.LastSync=e.LastSync,this.setDefaultConfigUpdate(),f.IsNotEmpty(e.LastSync)?f.convertToReadableDate(e.LastSync):null)),X(1))}setDefaultConfigUpdate(){this.filter.UpdatedProduct=!1,this.selectedChannel&&f.IsNotEmpty(this.selectedChannel.LastSync)&&(this.selectedChannel.TypeID==m.Shopee||this.selectedChannel.TypeID==m.Tiktok||this.selectedChannel.TypeID==m.Lazada)&&(this.filter.UpdatedProduct=!0)}iniHasScanUpdate(){this.selectedChannel?.TypeID!=m.WooCommerce&&this.selectedChannel?.TypeID!=m.KalCare&&this.selectedChannel?.TypeID!=m.None&&!this.isSingleChannel?this.hasScanUpdate=!0:this.hasScanUpdate=!1}filterChannelById(i){let e;return this.channelOptions&&(e=this.channelOptions.find(o=>o.ID==i)),e}submit(){this.selectedChannel.TypeID==m.Tokopedia&&this.filter.UpdatedProduct?this.router.navigate(["/menu/products/download/by-url"]).then(()=>{this.dialogRef.close()}):this.dialogRef.close(this.filter)}isNotEmpty(i){return f.IsNotEmpty(i)}onClose(){this.dialogRef.close()}};d.\u0275fac=function(e){return new(e||d)(g(D),g(E),g(dt))},d.\u0275cmp=T({type:d,selectors:[["app-scan-dialog"]],decls:11,vars:8,consts:[[3,"onOk","onClose","onCancel","dynamicValidated","config"],["content",""],[1,"mx-4"],[1,"mb-2","fw-bold"],["appearance","outline",1,"w-100"],["name","channelid","placeholder","Channel",1,"mat-select-channel",3,"ngModelChange","disabled","ngModel"],["class","channel-option",3,"value","disabled",4,"ngFor","ngForOf"],["class","mt-4",4,"ngIf"],[1,"mt-8"],["class","mt-8",4,"ngIf"],[1,"channel-option",3,"value","disabled"],["matTooltipPosition","above","matTooltipClass","custom-width-tooltip",3,"matTooltip"],[2,"width","18px","margin-right","10px",3,"src"],[1,"mt-4"],[1,"mb-2","fw-bold","mt-3"],["name","scanType",1,"form-control","h-100","round",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Full Scan Product",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Only Active Product",1,"me-5",3,"value"],[1,"me-2"],["name","ScanFull",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above","matTooltip","Scan product from beginning ( use this if you haven't scanned at all)",1,"me-5",3,"value"],["matTooltipClass","custom-width-tooltip","matTooltipPosition","above",1,"me-5",3,"value","matTooltip"],["name","Async",1,"form-control","h-100","round",2,"line-height","2",3,"ngModelChange","ngModel"],["matTooltipClass","custom-width-tooltip","matTooltip","Scan is running in the background, status will be visible in the notification menu","matTooltipPosition","above",1,"me-5",3,"value"],[1,"me-5",3,"value"]],template:function(e,o){e&1&&(a(0,"modal-material",0),v("onOk",function(){return o.submit()})("onClose",function(){return o.onClose()})("onCancel",function(){return o.onClose()}),a(1,"div",1)(2,"div",2)(3,"label",3),s(4,"Select a Channel"),r(),a(5,"mat-form-field",4)(6,"mat-select",5),A("ngModelChange",function(c){return U(o.filter.ChannelID,c)||(o.filter.ChannelID=c),c}),v("ngModelChange",function(c){return o.onSelectChannel(c)}),C(7,bt,5,5,"mat-option",6),r()(),C(8,Tt,8,3,"div",7)(9,Ot,12,8,"div",8)(10,Pt,8,3,"div",9),r()()()),e&2&&(p("dynamicValidated",o.isNotEmpty(o.filter.ChannelID))("config",o.modalConfig),l(6),p("disabled",o.disabledChannelOption),V("ngModel",o.filter.ChannelID),l(),p("ngForOf",o.channelOptions),l(),p("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)),l(),G(o.hasScanUpdate&&o.selectedChannel?9:-1),l(),p("ngIf",!o.isSingleChannel&&o.isNotEmpty(o.filter.ChannelID)))},dependencies:[K,$,st,pt,ht,ft,gt,Ct,mt,P,w,lt],encapsulation:2});let n=d;return n})();var M=function(n){return n.Tokopedia="https://seller.tokopedia.com",n.Shoope="https://seller.shopee.co.id",n.Tiktok="https://seller-id.tiktok.com",n.WooCommerce="https://woocommerce.dealpos.app",n.Lazada="https://sellercenter.lazada.co.id",n}(M||{});var Dt=n=>({"is-disabled":n});function Et(n,d){if(n&1&&(H(0),a(1,"tr")(2,"td",11),s(3),r(),a(4,"td",11),s(5),r(),a(6,"td",12)(7,"p",13),s(8,"Product Not in Channel!"),r()()(),J()),n&2){let t=h().$implicit;l(3),S(" ",t==null?null:t.Model,""),l(2),S(" ",t==null?null:t.Code,"")}}function kt(n,d){if(n&1&&(a(0,"td",11),s(1),r()),n&2){let t=h(3).$implicit;z("rowspan",t.Channel.length),l(),S(" ",t==null?null:t.Model,"")}}function wt(n,d){if(n&1&&(a(0,"td",11),s(1),r()),n&2){let t=h(3).$implicit;z("rowspan",t.Channel.length),l(),S(" ",t==null?null:t.Code,"")}}function Nt(n,d){if(n&1&&(a(0,"tr"),C(1,kt,2,2,"td",14)(2,wt,2,2,"td",14),a(3,"td",11)(4,"div",15)(5,"a",16),y(6,"img",17),r(),a(7,"div",18),s(8),r()()(),a(9,"td",11),s(10),x(11,"number"),r(),a(12,"td",19),s(13),x(14,"number"),r(),a(15,"td",19)(16,"a",20),y(17,"i",21),a(18,"span",22),s(19,"Edit"),r()()()()),n&2){let t=d.$implicit,i=d.index,e=h(3);l(),p("ngIf",i==0),l(),p("ngIf",i==0),l(3),p("href",t.Url,I)("title",t.Title),l(),p("src",e.getChannelLogo(t.TypeID),I),l(),p("matTooltip",(t==null||t.Name==null?null:t.Name.length)>55?t==null?null:t.Name:""),l(),S(" ",t.Name," "),l(2),u(O(11,12,t.Price)),l(3),u(O(14,14,t.Inventory)),l(3),p("href",e.getHyperlinkSellerCenter(t),I)("ngClass",W(16,Dt,t.TypeID==e.channelType.KalCare))("matTooltip",t.TypeID!=e.channelType.KalCare?"Edit this product in Seller Center, inventory changes must be done via DEALPOS":"")}}function Vt(n,d){if(n&1&&C(0,Nt,20,18,"tr",9),n&2){let t=h().$implicit;p("ngForOf",t==null?null:t.Channel)}}function Ut(n,d){if(n&1&&(H(0),C(1,Et,9,2,"ng-container",10)(2,Vt,1,1,"ng-template",null,0,ot),J()),n&2){let t=d.$implicit,i=at(3);l(),p("ngIf",!t.Channel||t.Channel.length<1)("ngIfElse",i)}}var de=(()=>{let d=class d{constructor(i,e){this.data=i,this.dialogRef=e,this.channelType=m,this.variants=i.variants,this.title=i.title}ngOnInit(){this.initModalConfig()}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.data.title,this.modalConfig.bodyScrollable=!0,this.modalConfig.hideCancel=!0,this.modalConfig.hideOk=!0}getChannelLogo(i){return f.getChannelLogoByTypeId(i)}getHyperlinkSellerCenter(i){let e="javascript:void(0)";switch(i.TypeID){case m.Shopee:e=`${M.Shoope}/portal/product/${i.ChannelItemID}`;break;case m.Tiktok:e=`${M.Tiktok}/product/edit/${i.ChannelItemID}`;break;case m.Tokopedia:e=`${M.Tokopedia}/edit-product/${i.ChannelItemID}`;break;case m.WooCommerce:e=`${M.WooCommerce}/wp-admin/post.php?post=${i.ChannelItemID}&action=edit`;break;case m.Lazada:e=`${M.Lazada}/apps/product/publish?productId=${i.ChannelItemID}`;break}return e}};d.\u0275fac=function(e){return new(e||d)(g(E),g(D))},d.\u0275cmp=T({type:d,selectors:[["app-modal-variant"]],decls:22,vars:2,consts:[["printChannelModal",""],[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"text-start","sticky-top"],["matTooltip","Variant from POS",1,"fas","fa-info-circle","ms-1"],["matTooltip","Product and Variant from each Channel",1,"fas","fa-info-circle","ms-1"],[1,"text-start","sticky-top",2,"width","0%"],[4,"ngFor","ngForOf"],[4,"ngIf","ngIfElse"],[1,"text-start"],["colspan","3",1,"text-center"],[1,"my-auto"],["class","text-start",4,"ngIf"],[1,"d-flex"],["target","_blank",1,"me-1",3,"href","title"],[2,"width","20px","height","20px",3,"src"],[1,"text-ellipsis","ps-2",2,"max-width","18vw",3,"matTooltip"],[1,"text-center"],["target","_blank",1,"btn","btn-small","btn-light","px-4","py-2",3,"href","ngClass","matTooltip"],[1,"fa-solid","fa-pencil","me-2",2,"font-size","10px"],[1,"fs-6"]],template:function(e,o){e&1&&(a(0,"modal-material",1),v("onCancel",function(){return o.dialogRef.close()}),a(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr")(5,"th",5),s(6," VARIANT "),a(7,"sup"),y(8,"i",6),r()(),a(9,"th",5),s(10,"SKU"),r(),a(11,"th",5),s(12," PRODUCT "),a(13,"sup"),y(14,"i",7),r()(),a(15,"th",5),s(16,"PRICE"),r(),a(17,"th",8),s(18,"INVENTORY"),r(),y(19,"th",5),r()(),a(20,"tbody"),C(21,Ut,4,2,"ng-container",9),r()()()()),e&2&&(p("config",o.modalConfig),l(21),p("ngForOf",o.variants))},dependencies:[B,K,$,P,w,rt],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#fff!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}a.is-disabled[_ngcontent-%COMP%]{color:gray;cursor:default}a.is-disabled[_ngcontent-%COMP%]:hover{text-decoration:none}"]});let n=d;return n})();var At=n=>({"bg-gradient-warning":n});function Lt(n,d){if(n&1&&(a(0,"tr",5)(1,"td"),s(2),r(),a(3,"td",6),s(4),r()()),n&2){let t=d.$implicit;p("matTooltip",t.duplicateMessage),l(2),u(t==null?null:t.Name),l(),p("ngClass",W(4,At,t.isDuplicate)),l(),u(t!=null&&t.ChannelVariationSKU?t==null?null:t.ChannelVariationSKU:"Not Assigned")}}var Ce=(()=>{let d=class d{constructor(i,e){this.data=i,this.dialogRef=e,this.variants=tt([])}ngOnInit(){this.initModalConfig(),this.initVariants()}initVariants(){let i=this.data?.variants,e={},o=[],_=i.filter(c=>f.IsEmpty(c.ChannelVariationSKU));i.filter(c=>f.IsNotEmpty(c.ChannelVariationSKU)).forEach((c,b,Y)=>{e[c.ChannelVariationSKU]=Y.filter(N=>N.ChannelVariationSKU===c.ChannelVariationSKU)}),Object.keys(e).forEach(c=>{e[c].length>1&&(e[c]=e[c].map((b,Y,N)=>{let q=`SKU ${b.ChannelVariationSKU} is duplicated with variant`;return N.forEach((j,Mt)=>{j.Name!==b.Name&&(q+=` ${N.length>2?j.Name+(Mt!==N.length-1?",":""):j.Name}`)}),b.duplicateMessage=q,b.isDuplicate=!0,b})),o.push(...e[c])}),o.push(..._),this.variants.set(o)}initModalConfig(){this.modalConfig=new k,this.modalConfig.title=this.data?.title,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0,this.modalConfig.bodyScrollable=!0}};d.\u0275fac=function(e){return new(e||d)(g(E),g(D))},d.\u0275cmp=T({type:d,selectors:[["app-modal-variants"]],decls:12,vars:1,consts:[[3,"onCancel","config"],["content",""],[1,"table"],[1,"sticky-top-thead","variant-modal"],[1,"sticky-top"],["matTooltipPosition","above",3,"matTooltip"],[3,"ngClass"]],template:function(e,o){e&1&&(a(0,"modal-material",0),v("onCancel",function(){return o.dialogRef.close()}),a(1,"div",1)(2,"table",2)(3,"thead",3)(4,"tr")(5,"th",4),s(6,"Variant"),r(),a(7,"th",4),s(8,"SKU"),r()()(),a(9,"tbody"),nt(10,Lt,5,6,"tr",5,et),r()()()()),e&2&&(p("config",o.modalConfig),l(10),it(o.variants()))},dependencies:[B,P,w],styles:[".mat-dialog-title[_ngcontent-%COMP%]{margin-bottom:0%;margin-left:24px}.sticky-top-thead[_ngcontent-%COMP%] th.sticky-top[_ngcontent-%COMP%]{top:0}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] tr.sticky-top[_ngcontent-%COMP%]{border:none!important;border-bottom:1px solid!important}table[_ngcontent-%COMP%] > thead[_ngcontent-%COMP%] > tr[_ngcontent-%COMP%]{border-top:none!important;border-left:none!important;border-right:none!important}.table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{background-color:#f6f6f6!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:last-child:after{border-right:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:first-child:before{border-left:0px!important}.sticky-top-thead.variant-modal[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:before{border-top:0px}"]});let n=d;return n})();export{te as a,de as b,Ce as c};
@@ -1 +1 @@
1
- import{a as pe}from"./chunk-BVIRHZTZ.js";import{e as _e}from"./chunk-CCXKODFV.js";import{a as ge,j as be}from"./chunk-6ZC7AHDI.js";import{b as fe,e as S}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{c as te,h as ne,i as ie,k as oe,m as re,n as ae,s as se,t as de,u as ce,v as le,y as me}from"./chunk-BSN7ZAXG.js";import{a as w,c as ue,d as he,f as xe}from"./chunk-64G3XLI6.js";import{m as y,o as v,r as j}from"./chunk-OVEJFFL6.js";import{$b as u,Cd as ee,Da as b,Ea as _,Eb as f,Gb as p,Gc as Q,Hc as K,Jc as $,Kb as U,Sb as i,Tb as r,Ub as l,Vb as k,Wb as E,Yb as z,Z as F,bc as g,gb as M,hc as W,ic as q,ja as R,jb as c,jc as H,ka as A,kb as m,mc as P,nc as a,oc as C,pc as B,qc as Y,rc as I,sc as L,sd as J,ta as x,tc as T,ua as N,ud as D,vd as X,yc as G,yd as Z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),p("href",d.href,M),c(),p("src",d.imgSrc,M),c(),p("href",d.href,M),c(),C(d.title),c(2),C(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),p("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),p("src",d.img,M)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),p("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),p("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),p("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),p("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),p("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),p("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),p("ngIf",e.browser!="edge"),c(),p("ngIf",n.invalid&&(n.dirty||n.touched))}}var we=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:w.SHOOPE},{title:"Tokopedia",img:w.TOKOPEDIA},{title:"Tiktok",img:w.TIKTOK},{title:"Woocommerce",img:w.WOOCOMMERCE},{title:"Lazada",img:w.LAZADA},{title:"Shopify",img:w.SHOPIFY},{title:"Plugo",img:w.PLUGONEW}],this.version=ge.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(v),m(fe),m(Ce),m(be),m(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),p("newsList",K(6,5,s.news$)),c(3),p("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),p("href",s.changelogUrl,M),c(),B("version ",s.version,"")}},dependencies:[J,D,X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var He=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
1
+ import{a as pe}from"./chunk-BVIRHZTZ.js";import{e as _e}from"./chunk-CCXKODFV.js";import{a as ge,j as be}from"./chunk-5GM7EMCW.js";import{b as fe,e as S}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{c as te,h as ne,i as ie,k as oe,m as re,n as ae,s as se,t as de,u as ce,v as le,y as me}from"./chunk-BSN7ZAXG.js";import{a as w,c as ue,d as he,f as xe}from"./chunk-64G3XLI6.js";import{m as y,o as v,r as j}from"./chunk-OVEJFFL6.js";import{$b as u,Cd as ee,Da as b,Ea as _,Eb as f,Gb as p,Gc as Q,Hc as K,Jc as $,Kb as U,Sb as i,Tb as r,Ub as l,Vb as k,Wb as E,Yb as z,Z as F,bc as g,gb as M,hc as W,ic as q,ja as R,jb as c,jc as H,ka as A,kb as m,mc as P,nc as a,oc as C,pc as B,qc as Y,rc as I,sc as L,sd as J,ta as x,tc as T,ua as N,ud as D,vd as X,yc as G,yd as Z}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Ce=(()=>{let t=class t{constructor(){}getBrowserName(){let n=window.navigator.userAgent.toLowerCase();switch(!0){case(n.indexOf("edge")>-1||n.indexOf("edg")>-1):return"edge";case n.indexOf("opr")>-1:return"opera";case n.indexOf("chrome")>-1:return"chrome";case n.indexOf("trident")>-1:return"ie";case n.indexOf("firefox")>-1:return"firefox";case n.indexOf("safari")>-1:return"safari";default:return"other"}}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=R({token:t,factory:t.\u0275fac,providedIn:"root"});let o=t;return o})();function Le(o,t){if(o&1&&(i(0,"swiper-slide")(1,"div")(2,"a",2),l(3,"img",3),r()(),i(4,"a",4),a(5),r(),i(6,"p",5),a(7),r()()),o&2){let d=t.$implicit;c(2),p("href",d.href,M),c(),p("src",d.imgSrc,M),c(),p("href",d.href,M),c(),C(d.title),c(2),C(d.description)}}var ve=(()=>{let t=class t{constructor(){this.newsList=[]}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=x({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:"newsList"},decls:2,vars:1,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],[4,"ngFor","ngForOf"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(e,s){e&1&&(i(0,"swiper-container",0),f(1,Le,8,5,"swiper-slide",1),r()),e&2&&(c(),p("ngForOf",s.newsList))},dependencies:[D],styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"]});let o=t;return o})();var Ae=["subdomainEl"],Ne=(o,t)=>({"rounded-end":o,"border-end-0":t});function ze(o,t){if(o&1&&(k(0),i(1,"div",36),l(2,"img",37),r(),E()),o&2){let d=t.$implicit;c(2),p("src",d.img,M)("title",d.title)("alt",d.title)}}function De(o,t){if(o&1){let d=z();k(0),i(1,"div",17)(2,"h3",18),a(3," DealPOS Omnichannel "),r(),i(4,"small",19),a(5," Multichannel Inventory Management Software "),r()(),i(6,"form",20)(7,"div",21)(8,"div",22)(9,"div",23)(10,"span"),l(11,"i",24),r()(),i(12,"input",25,1),T("ngModelChange",function(e){b(d);let s=g();return L(s.subdomain,e)||(s.subdomain=e),_(e)}),r(),i(14,"div")(15,"select",26),T("ngModelChange",function(e){b(d);let s=g();return L(s.domain,e)||(s.domain=e),_(e)}),i(16,"option",27),a(17,".dealpos.co.id"),r(),i(18,"option",28),a(19,".dealpos.net"),r(),i(20,"option",29),a(21,".dealpos.com"),r(),i(22,"option",30),a(23,".dealpos.app"),r()()()(),i(24,"div",31)(25,"button",32),u("click",function(){b(d);let e=g();return _(e.onNextState())}),a(26," Next "),r()(),i(27,"div",33)(28,"div",34),f(29,ze,3,3,"ng-container",35),r()()()(),E()}if(o&2){let d=g();c(12),I("ngModel",d.subdomain),c(3),I("ngModel",d.domain),c(14),p("ngForOf",d.channels)}}function je(o,t){o&1&&(i(0,"p"),a(1," Username is required "),r())}function Ve(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,je,2,0,"p",47),r()(),E()),o&2){g();let d=P(14);c(4),p("ngIf",d.errors.required)}}function Fe(o,t){if(o&1){let d=z();i(0,"i",62),u("click",function(){b(d);let e=g(3);return _(e.hideShowPassword())}),r()}if(o&2){let d=g(3);U("fa "+d.passwordIcon)}}function Re(o,t){if(o&1&&(i(0,"span",60),f(1,Fe,1,2,"i",61),r()),o&2){let d=g(2);c(),p("ngIf",d.password)}}function Ue(o,t){o&1&&(i(0,"p"),a(1," Password is required "),r())}function We(o,t){if(o&1&&(k(0),i(1,"div",57),l(2,"div",58),i(3,"div",59),f(4,Ue,2,0,"p",47),r()(),E()),o&2){g();let d=P(21);c(4),p("ngIf",d.errors.required)}}function qe(o,t){if(o&1){let d=z();i(0,"div",38)(1,"h3",39),a(2,"Sign in"),r(),i(3,"h3",40),a(4," to "),i(5,"h6",41),a(6),r(),i(7,"i",42),u("click",function(){b(d);let e=g();return _(e.onEditDomain())}),r()()(),i(8,"form",43)(9,"div",44)(10,"div",23)(11,"span"),l(12,"i",45),r()(),i(13,"input",46,2),T("ngModelChange",function(e){b(d);let s=g();return L(s.username,e)||(s.username=e),_(e)}),r()(),f(15,Ve,5,1,"ng-container",47),i(16,"div",22)(17,"div",23)(18,"span"),l(19,"i",48),r()(),i(20,"input",49,3),T("ngModelChange",function(e){b(d);let s=g();return L(s.password,e)||(s.password=e),_(e)}),r(),f(22,Re,2,1,"span",50),r(),f(23,We,5,1,"ng-container",47),i(24,"div",51)(25,"button",52),u("click",function(){b(d);let e=g();return _(e.onLogin())}),a(26," Log in "),r()(),i(27,"div",53),l(28,"hr"),i(29,"span",54),a(30,"or"),r(),l(31,"hr"),r(),i(32,"div")(33,"button",55),u("click",function(e){b(d);let s=g();return _(s.onLoginByGoogle(e))}),l(34,"i",56),a(35," Sign In with Google "),r()()()}if(o&2){let d=P(14),n=P(21),e=g();c(6),Y(" (",e.subdomain,"",e.domain,") "),c(7),I("ngModel",e.username),c(2),p("ngIf",d.invalid&&(d.dirty||d.touched)),c(5),p("type",e.passwordType)("ngClass",G(9,Ne,e.browser=="edge",e.browser!="edge")),I("ngModel",e.password),c(2),p("ngIf",e.browser!="edge"),c(),p("ngIf",n.invalid&&(n.dirty||n.touched))}}var we=(()=>{let t=class t{constructor(n,e,s,h,ke){this._router=n,this.toastr=e,this.checkBrowser=s,this.authService=h,this.ngxPermission=ke,this.domain=".dealpos.co.id",this.loginState="FORM_DOMAIN",this.passwordType="password",this.passwordIcon="fa-eye",this.channels=[{title:"Shopee",img:w.SHOOPE},{title:"Tokopedia",img:w.TOKOPEDIA},{title:"Tiktok",img:w.TIKTOK},{title:"Woocommerce",img:w.WOOCOMMERCE},{title:"Lazada",img:w.LAZADA},{title:"Shopify",img:w.SHOPIFY},{title:"Plugo",img:w.PLUGONEW}],this.version=ge.version,this.news$=h.getNews().pipe(F(1))}ngOnInit(){this.initLogin(),this.browser=this.checkBrowser.getBrowserName(),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let n=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=n}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let n=JSON.parse(localStorage.getItem("Authorization"));if(n){this.username=n?.username,this.subdomain=n?.Host?.split(".")[0];let e=n?.Host?.split("dealpos");this.domain=`.dealpos${e[1]}`,this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(ue.IsEmpty(this.subdomain)){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState="FORM_AUTH"}parseSubdomain(){let n=this.subdomain.indexOf(".dealpos");n!=-1&&(this.subdomain=this.subdomain.substring(0,n))}onEditDomain(){this.loginState="FORM_DOMAIN"}onLogin(){let n={Host:`${this.subdomain}${this.domain}`,Username:this.username,Password:this.password};this.authService.login(n).subscribe(e=>{this.onSuccessLogin(e)})}onLoginByGoogle(n){let e=`${this.subdomain}${this.domain}`;this.authService.loginWithGoogle(n,e).subscribe(s=>{this.onSuccessLogin(s)})}onSuccessLogin(n){this.ngxPermission.hasPermission([pe.dashboardView]).then(e=>{e?this._router.navigate(["menu/dashboard"]):n?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType=this.passwordType==="text"?"password":"text",this.passwordIcon=this.passwordIcon==="fa-eye"?"fa-eye-slash":"fa-eye"}ngOnDestroy(){document.body.classList.remove("login-body")}};t.\u0275fac=function(e){return new(e||t)(m(v),m(fe),m(Ce),m(be),m(he))},t.\u0275cmp=x({type:t,selectors:[["app-login"]],viewQuery:function(e,s){if(e&1&&W(Ae,5),e&2){let h;q(h=H())&&(s.subdomainEl=h.first)}},decls:19,vars:7,consts:[["USERNAME_PASSWORD",""],["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[4,"ngIf","ngIfElse"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[4,"ngFor","ngForOf"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngClass","ngModel"],["class","input-group-text border-start-0 rounded-end",4,"ngIf"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[2,"width","52px"],[1,"text-danger","ps-1"],[1,"input-group-text","border-start-0","rounded-end"],[3,"class","click",4,"ngIf"],[3,"click"]],template:function(e,s){if(e&1&&(i(0,"div",4)(1,"div",5)(2,"div",6)(3,"h3",7),a(4,"New Features"),r(),l(5,"POS-news-swiper",8),Q(6,"async"),r(),i(7,"div",9),f(8,De,30,3,"ng-container",10)(9,qe,36,12,"ng-template",null,0,$),r()(),i(11,"div",11)(12,"span",12),a(13,"powered by :"),r(),l(14,"a",13),r(),i(15,"div",14)(16,"a",15),a(17),l(18,"i",16),r()()()),e&2){let h=P(10);c(5),p("newsList",K(6,5,s.news$)),c(3),p("ngIf",s.loginState=="FORM_DOMAIN")("ngIfElse",h),c(8),p("href",s.changelogUrl,M),c(),B("version ",s.version,"")}},dependencies:[J,D,X,ae,de,ce,te,se,ne,ie,le,re,oe,ve,Z],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"]});let o=t;return o})();var Oe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.shopID=n.shop_id,this.code=n.code})}addShopee(){let n={ShopID:Number(this.shopID),Code:this.code};this.http.post("/api/ChannelAdd/ShopeeV2",n).subscribe(s=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["shopee-authorized"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-t",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Shopee"),r(),i(13,"div"),a(14," Your shopID is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addShopee()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.shopID))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var Pe=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code,this.state=n.state})}addChannelTiktok(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddTiktok",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-tiktok"]],decls:24,vars:2,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Tiktok"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"div"),a(18," Your State is "),i(19,"span",8),a(20),r()(),i(21,"button",9),u("click",function(){return s.addChannelTiktok()}),l(22,"i",10),a(23," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code),c(4),C(s.state))},styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media (max-width: 768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width: 1300px) and (min-width: 1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media (max-width: 820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media (max-width: 768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media (min-width: 1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media (max-width: 768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media (min-width: 1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media (max-width: 768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}.form-signin[_ngcontent-%COMP%]{max-width:600px}.card[_ngcontent-%COMP%]{font:100 14px/25px Roboto,Helvetica Neue,sans-serif;border-radius:13px;box-sizing:border-box}.text-shopee[_ngcontent-%COMP%]{color:#f53d2d}"]});let o=t;return o})();var ye=(()=>{let t=class t{constructor(n,e,s){this.route=n,this.http=e,this.service=s}ngOnInit(){this.route.queryParams.subscribe(n=>{this.code=n.code})}addChannelLazada(){let n={Code:this.code};this.http.post("/api/ChannelAdd/AddLazada",n).subscribe(e=>{this.service.navigate(["/menu/channel"])})}};t.\u0275fac=function(e){return new(e||t)(m(y),m(S),m(v))},t.\u0275cmp=x({type:t,selectors:[["app-lazada"]],decls:20,vars:1,consts:[[1,"container","h-100"],[1,"row","d-flex","justify-content-center","align-items-center","h-100"],[1,"col-md-4"],[1,"card"],[1,"card-header","text-center"],[1,"far","fa-check-circle","text-success",2,"font-size","115px"],[1,"h3","fw-bold"],[1,"card-body","text-center","py-6"],[1,"text-shopee","fw-bold"],["type","button",1,"btn","btn-success","mt-6",3,"click"],[1,"fas","fa-undo"]],template:function(e,s){e&1&&(i(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4),l(5,"i",5),i(6,"div",6),a(7,"Success !"),r()(),i(8,"div",7)(9,"div"),a(10,"You have successfully authorized "),r(),i(11,"div"),a(12,"DEALPOS to manage your Lazada"),r(),i(13,"div"),a(14," Your Code is "),i(15,"span",8),a(16),r()(),i(17,"button",9),u("click",function(){return s.addChannelLazada()}),l(18,"i",10),a(19," Add to my Channel"),r()()()()()()),e&2&&(c(16),C(s.code))}});let o=t;return o})();var He=[{path:"",component:we,data:{title:"Dealpos x Marketplace"}},{path:"shopee",component:Oe,data:{title:"Success"}},{path:"tiktok",component:Pe,data:{title:"Success"}},{path:"lazada",component:ye,data:{title:"Success"}}],Se=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[j.forChild(He),j]});let o=t;return o})();var yt=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=N({type:t}),t.\u0275inj=A({imports:[ee,me,Se,_e,xe]});let o=t;return o})();export{yt as LoginModule};
@@ -1 +1 @@
1
- import{a as Ge}from"./chunk-L2DBJKC2.js";import{a as Z}from"./chunk-J5D7PMX5.js";import"./chunk-6U6JR5K6.js";import{a as Y}from"./chunk-RENQ3YZH.js";import{a as qe,b as He}from"./chunk-N3TTJVBG.js";import"./chunk-MY4B7K3R.js";import"./chunk-LB6JFX4H.js";import"./chunk-FGPSBTFS.js";import"./chunk-ADRVUMMW.js";import{a as K,b as ze}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import{a as W}from"./chunk-BRKFLVFY.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as pe,b as ce,d as ue,e as Be}from"./chunk-CCXKODFV.js";import{j as de}from"./chunk-6ZC7AHDI.js";import{e as M}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as R,n as je}from"./chunk-BO4PPSB5.js";import{t as Ae,u as Fe}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as ae,h as le,m as se,o as me,t as Oe,u as ke,y as We,z as Ve}from"./chunk-BSN7ZAXG.js";import{c as X}from"./chunk-64G3XLI6.js";import{m as A,n as Le,p as k,r as ye}from"./chunk-OVEJFFL6.js";import{$b as N,Ad as re,Cd as ve,Da as g,Ea as h,Eb as y,Gb as p,Gc as x,Hc as G,Ic as E,Jc as U,Kb as Me,Pa as Te,Sb as t,Tb as i,Ub as w,Vb as j,Wb as q,Yb as L,Z as xe,bc as b,ea as we,ec as Re,gb as V,ja as ie,jb as m,ka as ne,kb as f,ld as Ne,ma as Ie,mc as H,nc as l,oa as he,oc as u,pc as P,rc as _,sb as De,sc as C,sd as fe,ta as I,tc as S,ua as oe,ud as J,v as be,va as Ee,vd as T,wc as z,xc as B,yd as Pe,zd as D}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Ue=(()=>{let n=class n{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"}]}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=I({type:n,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(r,e){r&1&&(t(0,"nav",0)(1,"div",1)(2,"div"),w(3,"nav-tab",2),i()()(),w(4,"router-outlet")),r&2&&(m(3),p("Tabs",e.ObjectlogTabs))},dependencies:[Le,qe]});let o=n;return o})();var F=(()=>{let n=class n{constructor(){}get Data(){return this._Data}set Data(s){this._Data=s}Fill(s){return this._Data.find(r=>r._id==s)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var dt=()=>["/menu/log/order/detail"],pt=o=>({ID:o}),ct=o=>({"bg-warning":o});function ut(o,n){if(o&1&&(t(0,"span",22),w(1,"img",23),i(),l(2)),o&2){let a=n.item;m(),p("src",a.Img,V)("alt",a.Name),m(),P(" ",a.Name," ")}}function gt(o,n){o&1&&(t(0,"th",27)(1,"span",33),l(2," Response Body Warning "),i()())}function ht(o,n){o&1&&(t(0,"th")(1,"span",33),l(2," Number Override "),i()())}function ft(o,n){if(o&1&&(t(0,"td",27)(1,"span",36),l(2),i()()),o&2){let a=b().$implicit;m(),p("ngClass",B(2,ct,a.responseBodyWarning!=null)),m(),u(a.responseBodyWarning)}}function vt(o,n){if(o&1&&(t(0,"td"),l(1),i()),o&2){let a=b().$implicit;m(),P(" ",a.ResponseBodyWarningReference," ")}}function yt(o,n){if(o&1&&(t(0,"tr")(1,"td")(2,"a",34),l(3),x(4,"date"),i()(),t(5,"td"),l(6),i(),t(7,"td"),l(8),i(),t(9,"td"),l(10),i(),t(11,"td",27)(12,"span",35),l(13),i()(),y(14,ft,3,4,"td",29)(15,vt,2,1,"td",30),i()),o&2){let a=n.$implicit,s=b(2);m(2),p("routerLink",z(14,dt))("queryParams",B(15,pt,a.ID)),m(),P(" ",E(4,11,a.Created,"dd MMM yyyy HH:mm:ss")," "),m(3),u(a.MarketTypeString),m(2),u(a.POSActionTypeString),m(2),u(a.Number),m(2),Me(a.ResponseCode===200||a.ResponseCode===202?"bg-success":"bg-warning"),m(),P(" ",a.ResponseCode," "),m(),p("ngIf",s.responseBodyWarningVisible),m(),p("ngIf",s.responseBodyWarningVisible)}}function _t(o,n){if(o&1){let a=L();j(0),t(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),l(6,"Date"),i(),t(7,"th"),l(8,"Channel"),i(),t(9,"th"),l(10,"Actions"),i(),t(11,"th"),l(12,"Number"),i(),t(13,"th",27)(14,"span",28),l(15," Response Code "),i()(),y(16,gt,3,0,"th",29)(17,ht,3,0,"th",30),i()(),t(18,"tbody"),y(19,yt,16,17,"tr",31),i()(),t(20,"mat-paginator",32),N("page",function(r){g(a);let e=b();return h(e.changePage(r))}),i()(),q()}if(o&2){let a=b();m(16),p("ngIf",a.responseBodyWarningVisible),m(),p("ngIf",a.responseBodyWarningVisible),m(2),p("ngForOf",a.Result),m(),p("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Ct(o,n){o&1&&(t(0,"div",37),w(1,"app-empty-state"),i())}var Qe=(()=>{let n=class n{constructor(s,r,e,c){this.http=s,this._RawLogService=r,this.route=e,this.authService=c,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(s=>{this.responseCode=s.responseCode,this.responseCode!=null?this.Load(s):this.Load()})}Load(s={}){this.http.post("/api/OrdersLoader/Get",s).subscribe(r=>{this.filter=r.Filter,this.ActionTypeList=r.Options.ActionTypeList,this.Get()})}Get(s){this.filter.Number=s,this.http.post("/api/Orders/Get",this.filter).subscribe(r=>{this._RawLogService.Data=r.hits,this.Result=Array();for(let e of r.hits){e._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let c={ID:e._id,Created:e._source["@timestamp_received"],shopId:e._source.shopId,MarketTypeString:e._source.log.type,POSActionTypeString:e._source.message,Number:e._source.log.number,ResponseCode:e._source.log.responseCode,responseBodyWarning:e._source.log.responseBodyWarning,ResponseBodyWarningReference:e._source.log.ResponseBodyWarningReference};this.Result.push(c)}this.paginationTotal=r.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};n.\u0275fac=function(r){return new(r||n)(f(M),f(F),f(A),f(de))},n.\u0275cmp=I({type:n,selectors:[["app-order"]],decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["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"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1){let c=L();t(0,"mainpanel",1),S("textChange",function(d){return g(c),C(e.Number,d)||(e.Number=d),h(d)}),N("onSubmit",function(d){return g(c),h(e.Get(d))}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),i(),t(5,"ng-select",3),S("ngModelChange",function(d){return g(c),C(e.filter.ChannelID,d)||(e.filter.ChannelID=d),h(d)}),y(6,ut,3,3,"ng-template",4),i()(),t(7,"div",5)(8,"label",2),l(9,"Action"),i(),t(10,"ng-select",6),S("ngModelChange",function(d){return g(c),C(e.filter.ActionType,d)||(e.filter.ActionType=d),h(d)}),i()(),t(11,"div",5)(12,"label",7),l(13,"From/To"),i(),t(14,"div",8)(15,"datepicker",9),S("dateChange",function(d){return g(c),C(e.filter.From,d)||(e.filter.From=d),h(d)}),i()(),t(16,"div")(17,"datepicker",10),S("dateChange",function(d){return g(c),C(e.filter.To,d)||(e.filter.To=d),h(d)}),i()()(),t(18,"div",5)(19,"label",11),l(20,"Response Code"),i(),t(21,"input",12),S("ngModelChange",function(d){return g(c),C(e.filter.StatusCode,d)||(e.filter.StatusCode=d),h(d)}),i()(),t(22,"div",5)(23,"label",11),l(24,"Response Body Warning"),i(),t(25,"input",13),S("ngModelChange",function(d){return g(c),C(e.filter.responseBodyWarning,d)||(e.filter.responseBodyWarning=d),h(d)}),i(),t(26,"datalist",14),w(27,"option",15),i()(),t(28,"div",5)(29,"label",11),l(30,"Page Number"),i(),t(31,"input",16),S("ngModelChange",function(d){return g(c),C(e.filter.PageNumber,d)||(e.filter.PageNumber=d),h(d)}),i()(),t(32,"div",5)(33,"label",11),l(34,"Page Size"),i(),t(35,"input",17),S("ngModelChange",function(d){return g(c),C(e.filter.RowCount,d)||(e.filter.RowCount=d),h(d)}),i()()(),t(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),y(40,_t,21,6,"ng-container",21)(41,Ct,2,0,"ng-template",null,0,U),i()()()()()}if(r&2){let c=H(42);_("text",e.Number),m(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),m(5),p("clearable",!0)("items",e.ActionTypeList),_("ngModel",e.filter.ActionType),m(5),_("date",e.filter.From),m(2),_("date",e.filter.To),m(4),_("ngModel",e.filter.StatusCode),m(4),_("ngModel",e.filter.responseBodyWarning),m(6),_("ngModel",e.filter.PageNumber),m(4),_("ngModel",e.filter.RowCount),m(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",c)}},dependencies:[fe,J,T,Oe,ke,ae,me,le,se,k,R,K,ue,pe,ce,Z,Y,Ae,D]});let o=n;return o})();var St=o=>({"bg-gradient-warning":o}),bt=()=>["/menu/log/inventory/sync-inventory/detail"],xt=o=>({ID:o});function wt(o,n){if(o&1&&(t(0,"span",19),w(1,"img",20),i(),l(2)),o&2){let a=n.item;m(),p("src",a.Img,V)("alt",a.Name),m(),P(" ",a.Name," ")}}function It(o,n){if(o&1&&(t(0,"tr",26)(1,"td")(2,"a",27),l(3),x(4,"date"),i()(),t(5,"td"),l(6),i(),t(7,"td"),l(8),i(),t(9,"td"),l(10),i(),t(11,"td"),l(12),i()()),o&2){let a=n.$implicit;p("ngClass",B(11,St,a.ResponseCode==400)),m(2),p("routerLink",z(13,bt))("queryParams",B(14,xt,a.ID)),m(),P(" ",E(4,8,a.Created,"dd MMM yyyy HH:mm")," "),m(3),u(a.channelName),m(2),u(a.Sku),m(2),u(a.Stock),m(2),u(a.ResponseCode)}}function Et(o,n){if(o&1){let a=L();j(0),t(1,"div",21)(2,"table",22)(3,"thead")(4,"tr",23)(5,"th"),l(6,"Created"),i(),t(7,"th"),l(8,"Channel"),i(),t(9,"th"),l(10,"SKU"),i(),t(11,"th"),l(12,"Stock"),i(),t(13,"th"),l(14,"Response code"),i()()(),t(15,"tbody"),y(16,It,13,16,"tr",24),i()(),t(17,"mat-paginator",25),N("page",function(r){g(a);let e=b();return h(e.changePage(r))}),i()(),q()}if(o&2){let a=b();m(16),p("ngForOf",a.Result),m(),p("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Tt(o,n){o&1&&(t(0,"div",28),w(1,"app-empty-state"),i())}var Xe=(()=>{let n=class n{constructor(s,r,e){this.http=s,this._RawLogService=r,this.authService=e,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(s=>{this.filter=s.Filter,this.ActionTypeList=s.Options.ActionTypeList,this.Get()})}Get(s){s!=null&&(this.filter.Sku=s),this.http.post("api/Inventory/GetLog",this.filter).subscribe(r=>{this._RawLogService.Data=r.hits,this.Result=Array();for(let e of r.hits){let c={ID:e._source.log.id,Created:e._source["@timestamp_received"],channelName:e._source.log.channelName,Sku:e._source.log.sku,Stock:e._source.log.stock,ResponseCode:e._source.log.responseCode};this.Result.push(c)}this.paginationTotal=r.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};n.\u0275fac=function(r){return new(r||n)(f(M),f(F),f(de))},n.\u0275cmp=I({type:n,selectors:[["app-inventory-log"]],decls:33,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Inventory Sync","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",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"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1){let c=L();t(0,"mainpanel",1),S("textChange",function(d){return g(c),C(e.filter.Sku,d)||(e.filter.Sku=d),h(d)}),N("onSubmit",function(d){return g(c),h(e.Get(d))}),t(1,"actions")(2,"a",2),l(3," Order Inventory Sync Job "),i()(),t(4,"filters")(5,"div",3)(6,"div")(7,"label",4),l(8,"Channel"),i(),t(9,"ng-select",5),S("ngModelChange",function(d){return g(c),C(e.filter.ChannelID,d)||(e.filter.ChannelID=d),h(d)}),y(10,wt,3,3,"ng-template",6),i()(),t(11,"div",7)(12,"label",8),l(13,"From/To"),i(),t(14,"div",9)(15,"datepicker",10),S("dateChange",function(d){return g(c),C(e.filter.From,d)||(e.filter.From=d),h(d)}),i()(),t(16,"div")(17,"datepicker",11),S("dateChange",function(d){return g(c),C(e.filter.To,d)||(e.filter.To=d),h(d)}),i()()(),t(18,"div",7)(19,"label",12),l(20,"Page Number"),i(),t(21,"input",13),S("ngModelChange",function(d){return g(c),C(e.filter.PageNumber,d)||(e.filter.PageNumber=d),h(d)}),i()(),t(22,"div",7)(23,"label",12),l(24,"Page Size"),i(),t(25,"input",14),S("ngModelChange",function(d){return g(c),C(e.filter.RowCount,d)||(e.filter.RowCount=d),h(d)}),i()()()(),t(26,"content")(27,"div",15)(28,"div",16)(29,"div",17),y(30,Et,18,4,"ng-container",18)(31,Tt,2,0,"ng-template",null,0,U),i()()()()()}if(r&2){let c=H(32);_("text",e.filter.Sku),m(9),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),m(6),_("date",e.filter.From),m(2),_("date",e.filter.To),m(4),_("ngModel",e.filter.PageNumber),m(4),_("ngModel",e.filter.RowCount),m(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",c)}},dependencies:[fe,J,T,ae,me,le,se,k,R,K,ue,pe,ce,Z,Y,D]});let o=n;return o})();var Dt=()=>["/menu/log/order/detail"],Mt=o=>({ID:o});function Rt(o,n){if(o&1&&(t(0,"span",17),w(1,"img",18),i(),l(2)),o&2){let a=n.item;m(),p("src",a.Img,V)("alt",a.Name),m(),P(" ",a.Name," ")}}function Nt(o,n){if(o&1&&(t(0,"tr")(1,"td")(2,"a",25),l(3),x(4,"date"),i()(),t(5,"td"),l(6),i(),t(7,"td"),l(8),i(),t(9,"td"),l(10),i()()),o&2){let a=n.$implicit;m(2),p("routerLink",z(9,Dt))("queryParams",B(10,Mt,a.id)),m(),P(" ",E(4,6,a.Created,"dd MMM yyyy HH:mm:ss")," "),m(3),u(a.type),m(2),u(a.number),m(2),u(a.message)}}function Pt(o,n){if(o&1){let a=L();j(0),t(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),l(6,"Date"),i(),t(7,"th"),l(8,"Type"),i(),t(9,"th"),l(10,"Number"),i(),t(11,"th"),l(12,"Message"),i()()(),t(13,"tbody"),y(14,Nt,11,12,"tr",23),i()(),t(15,"mat-paginator",24),N("page",function(r){g(a);let e=b();return h(e.changePage(r))}),i()(),q()}if(o&2){let a=b();m(14),p("ngForOf",a.Result),m(),p("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Lt(o,n){o&1&&(t(0,"div",26),w(1,"app-empty-state"),i())}var $e=(()=>{let n=class n{constructor(s,r,e){this.http=s,this._RawLogService=r,this.authService=e,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(s={}){this.http.post("/api/OrdersLoader/Get",s).subscribe(r=>{this.filter=r.Filter,this.ActionTypeList=r.Options.ActionTypeList,this.Get()})}Get(s){this.filter.Number=s,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(r=>{this._RawLogService.Data=r.hits,this.Result=Array();for(let e of r.hits){let c={id:e._id,message:e._source.message,responseCode:e._source.log.responseCode,processTypeString:e._source.log.processType,type:e._source.log.type,number:e._source.log.number,Created:e._source["@timestamp_received"]};this.Result.push(c)}this.paginationTotal=r.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};n.\u0275fac=function(r){return new(r||n)(f(M),f(F),f(de))},n.\u0275cmp=I({type:n,selectors:[["app-raw-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",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"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1){let c=L();t(0,"mainpanel",1),S("textChange",function(d){return g(c),C(e.filter.Number,d)||(e.filter.Number=d),h(d)}),N("onSubmit",function(d){return g(c),h(e.Get(d))}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),i(),t(5,"ng-select",3),S("ngModelChange",function(d){return g(c),C(e.filter.ChannelID,d)||(e.filter.ChannelID=d),h(d)}),y(6,Rt,3,3,"ng-template",4),i()(),t(7,"div",5)(8,"label",6),l(9,"From/To"),i(),t(10,"div",7)(11,"datepicker",8),S("dateChange",function(d){return g(c),C(e.filter.From,d)||(e.filter.From=d),h(d)}),i()(),t(12,"div")(13,"datepicker",9),S("dateChange",function(d){return g(c),C(e.filter.To,d)||(e.filter.To=d),h(d)}),i()()(),t(14,"div",5)(15,"label",10),l(16,"Page Number"),i(),t(17,"input",11),S("ngModelChange",function(d){return g(c),C(e.filter.PageNumber,d)||(e.filter.PageNumber=d),h(d)}),i()(),t(18,"div",5)(19,"label",10),l(20,"Page Size"),i(),t(21,"input",12),S("ngModelChange",function(d){return g(c),C(e.filter.RowCount,d)||(e.filter.RowCount=d),h(d)}),i()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),y(26,Pt,16,4,"ng-container",16)(27,Lt,2,0,"ng-template",null,0,U),i()()()()()}if(r&2){let c=H(28);_("text",e.filter.Number),m(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),m(6),_("date",e.filter.From),m(2),_("date",e.filter.To),m(4),_("ngModel",e.filter.PageNumber),m(4),_("ngModel",e.filter.RowCount),m(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",c)}},dependencies:[J,T,ae,me,le,se,k,R,K,ue,pe,ce,Z,Y,D]});let o=n;return o})();var Se=class{constructor(n,a){this._document=a;let s=this._textarea=this._document.createElement("textarea"),r=s.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",s.setAttribute("aria-hidden","true"),s.value=n,s.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(s)}copy(){let n=this._textarea,a=!1;try{if(n){let s=this._document.activeElement;n.select(),n.setSelectionRange(0,n.value.length),a=this._document.execCommand("copy"),s&&s.focus()}}catch{}return a}destroy(){let n=this._textarea;n&&(n.remove(),this._textarea=void 0)}},Ot=(()=>{let n=class n{constructor(s){this._document=s}copy(s){let r=this.beginCopy(s),e=r.copy();return r.destroy(),e}beginCopy(s){return new Se(s,this._document)}};n.\u0275fac=function(r){return new(r||n)(he(Ne))},n.\u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),kt=new Ie("CDK_COPY_TO_CLIPBOARD_CONFIG"),et=(()=>{let n=class n{constructor(s,r,e){this._clipboard=s,this._ngZone=r,this.text="",this.attempts=1,this.copied=new Te,this._pending=new Set,e&&e.attempts!=null&&(this.attempts=e.attempts)}copy(s=this.attempts){if(s>1){let r=s,e=this._clipboard.beginCopy(this.text);this._pending.add(e);let c=()=>{let v=e.copy();!v&&--r&&!this._destroyed?this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(c,1)):(this._currentTimeout=null,this._pending.delete(e),e.destroy(),this.copied.emit(v))};c()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(s=>s.destroy()),this._pending.clear(),this._destroyed=!0}};n.\u0275fac=function(r){return new(r||n)(f(Ot),f(De),f(kt,8))},n.\u0275dir=Ee({type:n,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(r,e){r&1&&N("click",function(){return e.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"},standalone:!0});let o=n;return o})(),tt=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oe({type:n}),n.\u0275inj=ne({});let o=n;return o})();function Vt(o,n){o&1&&w(0,"img",21)}function Bt(o,n){o&1&&w(0,"img",22)}function At(o,n){if(o&1&&(t(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),l(4,"General"),i()(),t(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),l(10,"Date"),i(),t(11,"div")(12,"span"),l(13),x(14,"date"),i()()()(),t(15,"div",10)(16,"div",9)(17,"label"),l(18,"Market Place Type"),i(),y(19,Vt,1,0,"img",11)(20,Bt,1,0,"img",12),t(21,"a",13)(22,"span",14),l(23),i(),w(24,"br"),t(25,"small",15),l(26),i()()()(),t(27,"div",10)(28,"div",9)(29,"label"),l(30,"Number"),i(),t(31,"div")(32,"span"),l(33),i()()()(),t(34,"div",8)(35,"div",9)(36,"label"),l(37,"Process Type"),i(),t(38,"div")(39,"span"),l(40),i()()()(),t(41,"div",4)(42,"div",9)(43,"label"),l(44,"Authorization Header"),i(),t(45,"div")(46,"span"),l(47),i()()()(),t(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),l(53,"Request"),i()(),t(54,"div",19)(55,"button",20),l(56,"Copy to clipboard"),i()()(),t(57,"div",7),l(58),i()()()()()()()),o&2){let a=b();m(13),u(E(14,11,a.data.Created,"dd MMM yyyy HH:mm:ss")),m(6),p("ngIf",a.data.TypeID==1),m(),p("ngIf",a.data.TypeID==0),m(),Re("href",a.data.ShopLink,V),m(2),u(a.data.ShopName),m(3),u(a.data.ShopLink),m(7),u(a.data._source.log.number),m(7),u(a.data._source.log.processType),m(7),u(a.data._source.log.authorizationHeader),m(8),p("cdkCopyToClipboard",a.data._source.log.request),m(3),P(" ",a.data._source.log.request," ")}}var it=(()=>{let n=class n{constructor(s,r,e){this.route=s,this.http=r,this._RawLogService=e,this.route.queryParams.subscribe(c=>{let v=JSON.parse(localStorage.getItem("channel"));if(this.ID=c.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],v.length>0){let d=v.find(mt=>mt.ShopID==this.data._source.shopId);d?(this.data.TypeID=d.TypeID,this.data.ShopName=d.Name,this.data.ShopLink=d.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}};n.\u0275fac=function(r){return new(r||n)(f(A),f(M),f(F))},n.\u0275cmp=I({type:n,selectors:[["app-raw-detail"]],decls:5,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-2"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-2"],[1,"info-label-group"],[1,"col-sm-4"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["target","_blank",3,"href"],[1,"fw-bold"],[1,"text-dark"],[1,"col-sm-12","mt-2"],[1,"card-header","d-lg-flex"],[1,"me-auto"],[1,"d-sm-block","mt-2"],[3,"cdkCopyToClipboard"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",1,"me-2"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",1,"me-2"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),y(4,At,59,14,"div",3),i()()()()),r&2&&(p("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),m(4),p("ngIf",e.data))},dependencies:[T,R,et,D]});let o=n;return o})();function Ft(o,n){if(o&1&&(t(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),l(4,"General"),i()(),t(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),l(10,"Date"),i(),t(11,"div")(12,"span"),l(13),x(14,"date"),i()()()(),t(15,"div",6)(16,"div",12)(17,"label"),l(18,"SKU"),i(),t(19,"div")(20,"span"),l(21),i()()()(),t(22,"div",6)(23,"div",12)(24,"label"),l(25,"Channel"),i(),t(26,"div")(27,"span"),l(28),i()()()(),t(29,"div",6)(30,"div",12)(31,"label"),l(32,"Response Code"),i(),t(33,"div")(34,"span"),l(35),i()()()()()()()()),o&2){let a=b();m(13),u(E(14,4,a.data.Created,"dd MMM yyyy")),m(8),u(a.data.Sku),m(7),u(a.data.ChannelName),m(7),u(a.data.ResponseCode)}}var nt=(()=>{let n=class n{constructor(s,r,e){this.route=s,this.http=r,this._RawLogService=e,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(c=>{this.ID=c.ID,this.Load()})}ngOnInit(){}Load(){var s={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",s).subscribe(r=>{this.data.Created=r.hits[0]._source["@timestamp_received"],this.data.Sku=r.hits[0]._source.log.sku,this.data.ChannelName=r.hits[0]._source.log.channelName,this.data.ResponseCode=r.hits[0]._source.log.responseCode,this.request=X.IsNotEmpty(r.hits[0]?._source.log?.request)?JSON.parse(r.hits[0]?._source?.log?.request):"",this.response=r.hits[0]._source.log.response})}};n.\u0275fac=function(r){return new(r||n)(f(A),f(M),f(F))},n.\u0275cmp=I({type:n,selectors:[["app-inventory-detail"]],decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3),y(7,Ft,36,7,"div",4),i(),t(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),l(13,"Request"),i()(),t(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),l(18),x(19,"json"),i()()()()()(),t(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),l(24,"Response"),i()(),t(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),l(29),i()()()()()()()()()()),r&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),m(7),p("ngIf",e.data),m(11),u(G(19,5,e.request)),m(11),u(e.response))},dependencies:[T,k,R,re,D]});let o=n;return o})();function jt(o,n){if(o&1&&(t(0,"div",9)(1,"div",10)(2,"label"),l(3,"Process Code"),i(),t(4,"div")(5,"span"),l(6),i()()()()),o&2){let a=b();m(6),u(a.ProcessedCode)}}function qt(o,n){if(o&1){let a=L();t(0,"a",16),N("click",function(){g(a);let r=b();return h(r.Retry())}),l(1,"Retry"),i()}}var ot=(()=>{let n=class n{constructor(s,r){this.route=s,this.http=r,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var s={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",s).subscribe(r=>{alert(JSON.stringify(r))})}Load(){var s={ID:this.ID};this.http.post("/api/Orders/GetDetail",s).subscribe(r=>{for(let e of r.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=X.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=X.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}};n.\u0275fac=function(r){return new(r||n)(f(A),f(M))},n.\u0275cmp=I({type:n,selectors:[["app-orderdetail"]],decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),l(11,"General"),i()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),l(17,"Date"),i(),t(18,"div")(19,"span"),l(20),x(21,"date"),i()()()(),t(22,"div",9)(23,"div",10)(24,"label"),l(25,"Number"),i(),t(26,"div")(27,"span"),l(28),i()()()(),t(29,"div",9)(30,"div",10)(31,"label"),l(32,"Type"),i(),t(33,"div")(34,"span"),l(35),i()()()(),t(36,"div",9)(37,"div",10)(38,"label"),l(39,"Response Code"),i(),t(40,"div")(41,"span"),l(42),i()()()(),t(43,"div",9)(44,"div",10)(45,"label"),l(46,"ShopID"),i(),t(47,"div")(48,"span"),l(49),i()()()(),y(50,jt,7,1,"div",11),t(51,"div",9)(52,"div",10)(53,"label"),l(54,"Action"),i(),t(55,"div")(56,"span"),l(57),i()()()()()()()()(),t(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),l(63,"Request"),i()(),t(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),l(68),x(69,"json"),i()()(),t(70,"actions",14),y(71,qt,2,0,"a",15),i()()()(),t(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),l(76,"Response"),i()(),t(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),l(81),x(82,"json"),i()()()()()()()()()()),r&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),u(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),m(8),u(e.Number),m(7),u(e.MarketTypeString),m(7),u(e.ResponseCode),m(7),u(e.shopId),m(),p("ngIf",e.ProcessedCode!=null),m(7),u(e.POSActionTypeString),m(11),u(G(69,17,e.request)),m(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),m(10),u(G(82,19,e.response)))},dependencies:[T,k,R,re,D]});let o=n;return o})();var Ht=()=>["/menu/log/exception/detail"],zt=o=>({ID:o});function Gt(o,n){if(o&1&&(t(0,"tr")(1,"td",12),w(2,"img",13),i(),t(3,"td"),l(4),x(5,"date"),i(),t(6,"td")(7,"a",14),l(8),i()(),t(9,"td")(10,"div",15),l(11),i(),t(12,"div"),l(13),i()()()),o&2){let a=n.$implicit;m(2),p("src",a.logo,V),m(2),u(E(5,7,a.date,"dd-MM-yyyy hh:mm:ss")),m(3),p("routerLink",z(10,Ht))("queryParams",B(11,zt,a.id)),m(),P(" ",a.number," "),m(3),u(a.message),m(2),u(a.stackTrace)}}function Ut(o,n){if(o&1){let a=L();j(0),t(1,"mat-paginator",16),N("page",function(r){g(a);let e=b(2);return h(e.onPaginationChange(r))}),i(),q()}if(o&2){let a=b(2);m(),p("length",a.pageTotal)("pageSize",a.pageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Jt(o,n){if(o&1&&(j(0),t(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),l(6,"Channel"),i(),t(7,"th",9),l(8,"Date"),i(),t(9,"th"),l(10,"Number"),i(),t(11,"th"),l(12,"Exception"),i()()(),t(13,"tbody"),y(14,Gt,14,13,"tr",10),i()(),y(15,Ut,2,3,"ng-container",11),i(),q()),o&2){let a=b();m(14),p("ngForOf",a.exceptions),m(),p("ngIf",(a.exceptions==null?null:a.exceptions.length)>0)}}function Yt(o,n){o&1&&(t(0,"div",17),w(1,"app-empty-state"),i())}var rt=(()=>{let n=class n{constructor(s){this.http=s,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(s=>{this.exceptions=s.hits.map(r=>({id:r._id,logo:X.getChannelLogoByName(r._source.error?.Type),number:r._source.error.number,date:r._source["@timestamp_received"],stackTrace:r._source.error.stackTrace,message:r._source.message,requestJSON:r._source?.error?.requestJSON})),this.pageTotal=s.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(s){this.filter.PageNumber=s.pageIndex+1,this.getData()}};n.\u0275fac=function(r){return new(r||n)(f(M))},n.\u0275cmp=I({type:n,selectors:[["app-exception-log"]],decls:8,vars:2,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","140px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-center"],[2,"width","25px",3,"src"],[3,"routerLink","queryParams"],[1,"fw-bold"],[3,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1&&(t(0,"mainpanel",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4),y(5,Jt,16,2,"ng-container",5)(6,Yt,2,0,"ng-template",null,0,U),i()()()()()),r&2){let c=H(7);m(5),p("ngIf",e.exceptions.length>0)("ngIfElse",c)}},dependencies:[J,T,k,R,K,Y,D]});let o=n;return o})();var at=(()=>{let n=class n{constructor(s){this.httpService=s}getExceptionDetail(s){return this.httpService.post("/api/Orders/GetDetailException",{ID:s}).pipe(be(e=>e?.hits[0]?._source))}};n.\u0275fac=function(r){return new(r||n)(he(M))},n.\u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();function Zt(o,n){if(o&1&&(t(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),l(6,"General"),i()(),t(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),l(12,"Date"),i(),t(13,"div")(14,"span"),l(15),x(16,"date"),i()()()(),t(17,"div",9)(18,"div",10)(19,"label"),l(20,"Number"),i(),t(21,"div")(22,"span"),l(23),i()()()(),t(24,"div",9)(25,"div",10)(26,"label"),l(27,"Type"),i(),t(28,"div")(29,"span"),l(30),i()()()(),t(31,"div",9)(32,"div",10)(33,"label"),l(34,"ShopID"),i(),t(35,"div")(36,"span"),l(37),i()()()()()()()()(),t(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),l(43,"Request"),i()(),t(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),l(48),x(49,"json"),i()()()()()(),t(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),l(54,"Exception"),i()(),t(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),l(59),i(),t(60,"pre"),l(61),i()()()()()()()()),o&2){let a=n.ngIf;m(15),u(E(16,7,a["@timestamp"],"dd MMM yyyy HH:mm:ss")),m(8),u(a==null||a.error==null?null:a.error.number),m(7),u(a==null||a.error==null?null:a.error.Type),m(7),u(a==null?null:a.shopId),m(11),u(G(49,10,a==null||a.error==null?null:a.error.requestJSON)),m(11),u(a==null?null:a.message),m(2),u(a==null||a.error==null?null:a.error.stackTrace)}}var lt=(()=>{let n=class n{constructor(s,r){this.activatedRoute=s,this.exceptionService=r,this.invoiceNumber=""}ngOnInit(){let s=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(s?.ID)}getExceptionDetail(s){this.exceptionDetail$=this.exceptionService.getExceptionDetail(s).pipe(we(r=>{this.invoiceNumber=r?.error?.number}),xe(1))}};n.\u0275fac=function(r){return new(r||n)(f(A),f(at))},n.\u0275cmp=I({type:n,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"],[1,"fw-bold"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"content"),y(2,Zt,62,12,"div",1),x(3,"async"),i()()),r&2&&(p("headerTitle","Order #"+e.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),m(2),p("ngIf",G(3,4,e.exceptionDetail$)))},dependencies:[T,R,Pe,re,D]});let o=n;return o})();var Qt=[{path:"",component:Ue,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:Qe,canActivate:[W],data:{title:"Order Log"}},{path:"inventory/sync-inventory",component:Xe,canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"rawlog",component:$e,canActivate:[W],data:{title:"Raw Log"}},{path:"rawlog/detail",component:it,canActivate:[W],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",component:nt,canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",component:ot,canActivate:[W],data:{title:"Order Details"}},{path:"exception",component:rt,canActivate:[W],data:{title:"Exception Log"}},{path:"exception/detail",component:lt,canActivate:[W],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-QGVD6MF4.js").then(o=>o.InventoryAsyncLogComponent),canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-KAEUZC2Y.js").then(o=>o.InventoryAsyncDetailComponent),canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-277CLJYZ.js").then(o=>o.ChannelLogComponent)},canActivate:[W],data:{title:"Authorization Log"}}]}],st=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oe({type:n}),n.\u0275inj=ne({imports:[ve,ye.forChild(Qt)]});let o=n;return o})();var hn=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oe({type:n}),n.\u0275inj=ne({imports:[ve,We,Ve,st,ye,je,tt,ze,Be,He,Z,Fe,Ge]});let o=n;return o})();export{hn as LogsModule};
1
+ import{a as Ge}from"./chunk-PFSBYBSC.js";import{a as Z}from"./chunk-J5D7PMX5.js";import"./chunk-6U6JR5K6.js";import{a as Y}from"./chunk-RENQ3YZH.js";import{a as qe,b as He}from"./chunk-N3TTJVBG.js";import"./chunk-MY4B7K3R.js";import"./chunk-LB6JFX4H.js";import"./chunk-FGPSBTFS.js";import"./chunk-ADRVUMMW.js";import{a as K,b as ze}from"./chunk-WT6W7RAQ.js";import"./chunk-BQ7NR3ET.js";import{a as W}from"./chunk-RJQGJK46.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{a as pe,b as ce,d as ue,e as Be}from"./chunk-CCXKODFV.js";import{j as de}from"./chunk-5GM7EMCW.js";import{e as M}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as R,n as je}from"./chunk-BO4PPSB5.js";import{t as Ae,u as Fe}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as ae,h as le,m as se,o as me,t as Oe,u as ke,y as We,z as Ve}from"./chunk-BSN7ZAXG.js";import{c as X}from"./chunk-64G3XLI6.js";import{m as A,n as Le,p as k,r as ye}from"./chunk-OVEJFFL6.js";import{$b as N,Ad as re,Cd as ve,Da as g,Ea as h,Eb as y,Gb as p,Gc as x,Hc as G,Ic as E,Jc as U,Kb as Me,Pa as Te,Sb as t,Tb as i,Ub as w,Vb as j,Wb as q,Yb as L,Z as xe,bc as b,ea as we,ec as Re,gb as V,ja as ie,jb as m,ka as ne,kb as f,ld as Ne,ma as Ie,mc as H,nc as l,oa as he,oc as u,pc as P,rc as _,sb as De,sc as C,sd as fe,ta as I,tc as S,ua as oe,ud as J,v as be,va as Ee,vd as T,wc as z,xc as B,yd as Pe,zd as D}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Ue=(()=>{let n=class n{constructor(){this.ObjectlogTabs=[{Title:"Sync Order",Url:"/menu/log/order"},{Title:"Inventory Sync ",Url:"/menu/log/inventory"},{Title:"Channel Webhook",Url:"/menu/log/rawlog"},{Title:"Channel Webhook Exception ",Url:"/menu/log/exception"},{Title:"Authorization Log ",Url:"/menu/log/authorization-log"}]}};n.\u0275fac=function(r){return new(r||n)},n.\u0275cmp=I({type:n,selectors:[["app-logs"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(r,e){r&1&&(t(0,"nav",0)(1,"div",1)(2,"div"),w(3,"nav-tab",2),i()()(),w(4,"router-outlet")),r&2&&(m(3),p("Tabs",e.ObjectlogTabs))},dependencies:[Le,qe]});let o=n;return o})();var F=(()=>{let n=class n{constructor(){}get Data(){return this._Data}set Data(s){this._Data=s}Fill(s){return this._Data.find(r=>r._id==s)}};n.\u0275fac=function(r){return new(r||n)},n.\u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();var dt=()=>["/menu/log/order/detail"],pt=o=>({ID:o}),ct=o=>({"bg-warning":o});function ut(o,n){if(o&1&&(t(0,"span",22),w(1,"img",23),i(),l(2)),o&2){let a=n.item;m(),p("src",a.Img,V)("alt",a.Name),m(),P(" ",a.Name," ")}}function gt(o,n){o&1&&(t(0,"th",27)(1,"span",33),l(2," Response Body Warning "),i()())}function ht(o,n){o&1&&(t(0,"th")(1,"span",33),l(2," Number Override "),i()())}function ft(o,n){if(o&1&&(t(0,"td",27)(1,"span",36),l(2),i()()),o&2){let a=b().$implicit;m(),p("ngClass",B(2,ct,a.responseBodyWarning!=null)),m(),u(a.responseBodyWarning)}}function vt(o,n){if(o&1&&(t(0,"td"),l(1),i()),o&2){let a=b().$implicit;m(),P(" ",a.ResponseBodyWarningReference," ")}}function yt(o,n){if(o&1&&(t(0,"tr")(1,"td")(2,"a",34),l(3),x(4,"date"),i()(),t(5,"td"),l(6),i(),t(7,"td"),l(8),i(),t(9,"td"),l(10),i(),t(11,"td",27)(12,"span",35),l(13),i()(),y(14,ft,3,4,"td",29)(15,vt,2,1,"td",30),i()),o&2){let a=n.$implicit,s=b(2);m(2),p("routerLink",z(14,dt))("queryParams",B(15,pt,a.ID)),m(),P(" ",E(4,11,a.Created,"dd MMM yyyy HH:mm:ss")," "),m(3),u(a.MarketTypeString),m(2),u(a.POSActionTypeString),m(2),u(a.Number),m(2),Me(a.ResponseCode===200||a.ResponseCode===202?"bg-success":"bg-warning"),m(),P(" ",a.ResponseCode," "),m(),p("ngIf",s.responseBodyWarningVisible),m(),p("ngIf",s.responseBodyWarningVisible)}}function _t(o,n){if(o&1){let a=L();j(0),t(1,"div",24)(2,"table",25)(3,"thead")(4,"tr",26)(5,"th"),l(6,"Date"),i(),t(7,"th"),l(8,"Channel"),i(),t(9,"th"),l(10,"Actions"),i(),t(11,"th"),l(12,"Number"),i(),t(13,"th",27)(14,"span",28),l(15," Response Code "),i()(),y(16,gt,3,0,"th",29)(17,ht,3,0,"th",30),i()(),t(18,"tbody"),y(19,yt,16,17,"tr",31),i()(),t(20,"mat-paginator",32),N("page",function(r){g(a);let e=b();return h(e.changePage(r))}),i()(),q()}if(o&2){let a=b();m(16),p("ngIf",a.responseBodyWarningVisible),m(),p("ngIf",a.responseBodyWarningVisible),m(2),p("ngForOf",a.Result),m(),p("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Ct(o,n){o&1&&(t(0,"div",37),w(1,"app-empty-state"),i())}var Qe=(()=>{let n=class n{constructor(s,r,e,c){this.http=s,this._RawLogService=r,this.route=e,this.authService=c,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""},this.responseBodyWarningVisible=!1,this.channelOptions=this.authService.getChannels()}ngOnInit(){this.route.queryParams.subscribe(s=>{this.responseCode=s.responseCode,this.responseCode!=null?this.Load(s):this.Load()})}Load(s={}){this.http.post("/api/OrdersLoader/Get",s).subscribe(r=>{this.filter=r.Filter,this.ActionTypeList=r.Options.ActionTypeList,this.Get()})}Get(s){this.filter.Number=s,this.http.post("/api/Orders/Get",this.filter).subscribe(r=>{this._RawLogService.Data=r.hits,this.Result=Array();for(let e of r.hits){e._source.log.responseBodyWarning!=null&&(this.responseBodyWarningVisible=!0);let c={ID:e._id,Created:e._source["@timestamp_received"],shopId:e._source.shopId,MarketTypeString:e._source.log.type,POSActionTypeString:e._source.message,Number:e._source.log.number,ResponseCode:e._source.log.responseCode,responseBodyWarning:e._source.log.responseBodyWarning,ResponseBodyWarningReference:e._source.log.ResponseBodyWarningReference};this.Result.push(c)}this.paginationTotal=r.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};n.\u0275fac=function(r){return new(r||n)(f(M),f(F),f(A),f(de))},n.\u0275cmp=I({type:n,selectors:[["app-order"]],decls:43,vars:15,consts:[["EMPTY_STATE",""],["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["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"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],["class","text-center",4,"ngIf"],[4,"ngIf"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"],[1,"text-white","p-2","rounded","response-desc",3,"ngClass"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1){let c=L();t(0,"mainpanel",1),S("textChange",function(d){return g(c),C(e.Number,d)||(e.Number=d),h(d)}),N("onSubmit",function(d){return g(c),h(e.Get(d))}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),i(),t(5,"ng-select",3),S("ngModelChange",function(d){return g(c),C(e.filter.ChannelID,d)||(e.filter.ChannelID=d),h(d)}),y(6,ut,3,3,"ng-template",4),i()(),t(7,"div",5)(8,"label",2),l(9,"Action"),i(),t(10,"ng-select",6),S("ngModelChange",function(d){return g(c),C(e.filter.ActionType,d)||(e.filter.ActionType=d),h(d)}),i()(),t(11,"div",5)(12,"label",7),l(13,"From/To"),i(),t(14,"div",8)(15,"datepicker",9),S("dateChange",function(d){return g(c),C(e.filter.From,d)||(e.filter.From=d),h(d)}),i()(),t(16,"div")(17,"datepicker",10),S("dateChange",function(d){return g(c),C(e.filter.To,d)||(e.filter.To=d),h(d)}),i()()(),t(18,"div",5)(19,"label",11),l(20,"Response Code"),i(),t(21,"input",12),S("ngModelChange",function(d){return g(c),C(e.filter.StatusCode,d)||(e.filter.StatusCode=d),h(d)}),i()(),t(22,"div",5)(23,"label",11),l(24,"Response Body Warning"),i(),t(25,"input",13),S("ngModelChange",function(d){return g(c),C(e.filter.responseBodyWarning,d)||(e.filter.responseBodyWarning=d),h(d)}),i(),t(26,"datalist",14),w(27,"option",15),i()(),t(28,"div",5)(29,"label",11),l(30,"Page Number"),i(),t(31,"input",16),S("ngModelChange",function(d){return g(c),C(e.filter.PageNumber,d)||(e.filter.PageNumber=d),h(d)}),i()(),t(32,"div",5)(33,"label",11),l(34,"Page Size"),i(),t(35,"input",17),S("ngModelChange",function(d){return g(c),C(e.filter.RowCount,d)||(e.filter.RowCount=d),h(d)}),i()()(),t(36,"content")(37,"div",18)(38,"div",19)(39,"div",20),y(40,_t,21,6,"ng-container",21)(41,Ct,2,0,"ng-template",null,0,U),i()()()()()}if(r&2){let c=H(42);_("text",e.Number),m(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),m(5),p("clearable",!0)("items",e.ActionTypeList),_("ngModel",e.filter.ActionType),m(5),_("date",e.filter.From),m(2),_("date",e.filter.To),m(4),_("ngModel",e.filter.StatusCode),m(4),_("ngModel",e.filter.responseBodyWarning),m(6),_("ngModel",e.filter.PageNumber),m(4),_("ngModel",e.filter.RowCount),m(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",c)}},dependencies:[fe,J,T,Oe,ke,ae,me,le,se,k,R,K,ue,pe,ce,Z,Y,Ae,D]});let o=n;return o})();var St=o=>({"bg-gradient-warning":o}),bt=()=>["/menu/log/inventory/sync-inventory/detail"],xt=o=>({ID:o});function wt(o,n){if(o&1&&(t(0,"span",19),w(1,"img",20),i(),l(2)),o&2){let a=n.item;m(),p("src",a.Img,V)("alt",a.Name),m(),P(" ",a.Name," ")}}function It(o,n){if(o&1&&(t(0,"tr",26)(1,"td")(2,"a",27),l(3),x(4,"date"),i()(),t(5,"td"),l(6),i(),t(7,"td"),l(8),i(),t(9,"td"),l(10),i(),t(11,"td"),l(12),i()()),o&2){let a=n.$implicit;p("ngClass",B(11,St,a.ResponseCode==400)),m(2),p("routerLink",z(13,bt))("queryParams",B(14,xt,a.ID)),m(),P(" ",E(4,8,a.Created,"dd MMM yyyy HH:mm")," "),m(3),u(a.channelName),m(2),u(a.Sku),m(2),u(a.Stock),m(2),u(a.ResponseCode)}}function Et(o,n){if(o&1){let a=L();j(0),t(1,"div",21)(2,"table",22)(3,"thead")(4,"tr",23)(5,"th"),l(6,"Created"),i(),t(7,"th"),l(8,"Channel"),i(),t(9,"th"),l(10,"SKU"),i(),t(11,"th"),l(12,"Stock"),i(),t(13,"th"),l(14,"Response code"),i()()(),t(15,"tbody"),y(16,It,13,16,"tr",24),i()(),t(17,"mat-paginator",25),N("page",function(r){g(a);let e=b();return h(e.changePage(r))}),i()(),q()}if(o&2){let a=b();m(16),p("ngForOf",a.Result),m(),p("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Tt(o,n){o&1&&(t(0,"div",28),w(1,"app-empty-state"),i())}var Xe=(()=>{let n=class n{constructor(s,r,e){this.http=s,this._RawLogService=r,this.authService=e,this.Result=Array(),this.filter={PageNumber:0,RowCount:20,Sku:null,ChannelID:"",StatusCode:"",From:"",To:""},this.Load(),this.channelOptions=this.authService.getChannels()}Load(){this.http.post("/api/OrdersLoader/Get",{}).subscribe(s=>{this.filter=s.Filter,this.ActionTypeList=s.Options.ActionTypeList,this.Get()})}Get(s){s!=null&&(this.filter.Sku=s),this.http.post("api/Inventory/GetLog",this.filter).subscribe(r=>{this._RawLogService.Data=r.hits,this.Result=Array();for(let e of r.hits){let c={ID:e._source.log.id,Created:e._source["@timestamp_received"],channelName:e._source.log.channelName,Sku:e._source.log.sku,Stock:e._source.log.stock,ResponseCode:e._source.log.responseCode};this.Result.push(c)}this.paginationTotal=r.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};n.\u0275fac=function(r){return new(r||n)(f(M),f(F),f(de))},n.\u0275cmp=I({type:n,selectors:[["app-inventory-log"]],decls:33,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Inventory Sync","searchBoxPlaceHolder","Enter SKU...",3,"textChange","onSubmit","text"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-success"],["container",""],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",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"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1){let c=L();t(0,"mainpanel",1),S("textChange",function(d){return g(c),C(e.filter.Sku,d)||(e.filter.Sku=d),h(d)}),N("onSubmit",function(d){return g(c),h(e.Get(d))}),t(1,"actions")(2,"a",2),l(3," Order Inventory Sync Job "),i()(),t(4,"filters")(5,"div",3)(6,"div")(7,"label",4),l(8,"Channel"),i(),t(9,"ng-select",5),S("ngModelChange",function(d){return g(c),C(e.filter.ChannelID,d)||(e.filter.ChannelID=d),h(d)}),y(10,wt,3,3,"ng-template",6),i()(),t(11,"div",7)(12,"label",8),l(13,"From/To"),i(),t(14,"div",9)(15,"datepicker",10),S("dateChange",function(d){return g(c),C(e.filter.From,d)||(e.filter.From=d),h(d)}),i()(),t(16,"div")(17,"datepicker",11),S("dateChange",function(d){return g(c),C(e.filter.To,d)||(e.filter.To=d),h(d)}),i()()(),t(18,"div",7)(19,"label",12),l(20,"Page Number"),i(),t(21,"input",13),S("ngModelChange",function(d){return g(c),C(e.filter.PageNumber,d)||(e.filter.PageNumber=d),h(d)}),i()(),t(22,"div",7)(23,"label",12),l(24,"Page Size"),i(),t(25,"input",14),S("ngModelChange",function(d){return g(c),C(e.filter.RowCount,d)||(e.filter.RowCount=d),h(d)}),i()()()(),t(26,"content")(27,"div",15)(28,"div",16)(29,"div",17),y(30,Et,18,4,"ng-container",18)(31,Tt,2,0,"ng-template",null,0,U),i()()()()()}if(r&2){let c=H(32);_("text",e.filter.Sku),m(9),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),m(6),_("date",e.filter.From),m(2),_("date",e.filter.To),m(4),_("ngModel",e.filter.PageNumber),m(4),_("ngModel",e.filter.RowCount),m(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",c)}},dependencies:[fe,J,T,ae,me,le,se,k,R,K,ue,pe,ce,Z,Y,D]});let o=n;return o})();var Dt=()=>["/menu/log/order/detail"],Mt=o=>({ID:o});function Rt(o,n){if(o&1&&(t(0,"span",17),w(1,"img",18),i(),l(2)),o&2){let a=n.item;m(),p("src",a.Img,V)("alt",a.Name),m(),P(" ",a.Name," ")}}function Nt(o,n){if(o&1&&(t(0,"tr")(1,"td")(2,"a",25),l(3),x(4,"date"),i()(),t(5,"td"),l(6),i(),t(7,"td"),l(8),i(),t(9,"td"),l(10),i()()),o&2){let a=n.$implicit;m(2),p("routerLink",z(9,Dt))("queryParams",B(10,Mt,a.id)),m(),P(" ",E(4,6,a.Created,"dd MMM yyyy HH:mm:ss")," "),m(3),u(a.type),m(2),u(a.number),m(2),u(a.message)}}function Pt(o,n){if(o&1){let a=L();j(0),t(1,"div",19)(2,"table",20)(3,"thead",21)(4,"tr")(5,"th",22),l(6,"Date"),i(),t(7,"th"),l(8,"Type"),i(),t(9,"th"),l(10,"Number"),i(),t(11,"th"),l(12,"Message"),i()()(),t(13,"tbody"),y(14,Nt,11,12,"tr",23),i()(),t(15,"mat-paginator",24),N("page",function(r){g(a);let e=b();return h(e.changePage(r))}),i()(),q()}if(o&2){let a=b();m(14),p("ngForOf",a.Result),m(),p("length",a.paginationTotal)("pageSize",a.paginationPageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Lt(o,n){o&1&&(t(0,"div",26),w(1,"app-empty-state"),i())}var $e=(()=>{let n=class n{constructor(s,r,e){this.http=s,this._RawLogService=r,this.authService=e,this.Result=Array(),this.filter={RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:""},this.list=[],this.Types=[{Key:0,Value:"Shopee"},{Key:1,Value:"Tokopedia"}],this.channelOptions=this.authService.getChannels()}ngOnInit(){this.Load()}Load(s={}){this.http.post("/api/OrdersLoader/Get",s).subscribe(r=>{this.filter=r.Filter,this.ActionTypeList=r.Options.ActionTypeList,this.Get()})}Get(s){this.filter.Number=s,this.http.post("api/Orders/GetRawLog",this.filter).subscribe(r=>{this._RawLogService.Data=r.hits,this.Result=Array();for(let e of r.hits){let c={id:e._id,message:e._source.message,responseCode:e._source.log.responseCode,processTypeString:e._source.log.processType,type:e._source.log.type,number:e._source.log.number,Created:e._source["@timestamp_received"]};this.Result.push(c)}this.paginationTotal=r.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}changePage(s){this.filter.PageNumber=s.pageIndex+1,this.Get()}};n.\u0275fac=function(r){return new(r||n)(f(M),f(F),f(de))},n.\u0275cmp=I({type:n,selectors:[["app-raw-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Channel Webhook Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",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"],[1,"thead-light"],[2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[3,"routerLink","queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1){let c=L();t(0,"mainpanel",1),S("textChange",function(d){return g(c),C(e.filter.Number,d)||(e.filter.Number=d),h(d)}),N("onSubmit",function(d){return g(c),h(e.Get(d))}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),i(),t(5,"ng-select",3),S("ngModelChange",function(d){return g(c),C(e.filter.ChannelID,d)||(e.filter.ChannelID=d),h(d)}),y(6,Rt,3,3,"ng-template",4),i()(),t(7,"div",5)(8,"label",6),l(9,"From/To"),i(),t(10,"div",7)(11,"datepicker",8),S("dateChange",function(d){return g(c),C(e.filter.From,d)||(e.filter.From=d),h(d)}),i()(),t(12,"div")(13,"datepicker",9),S("dateChange",function(d){return g(c),C(e.filter.To,d)||(e.filter.To=d),h(d)}),i()()(),t(14,"div",5)(15,"label",10),l(16,"Page Number"),i(),t(17,"input",11),S("ngModelChange",function(d){return g(c),C(e.filter.PageNumber,d)||(e.filter.PageNumber=d),h(d)}),i()(),t(18,"div",5)(19,"label",10),l(20,"Page Size"),i(),t(21,"input",12),S("ngModelChange",function(d){return g(c),C(e.filter.RowCount,d)||(e.filter.RowCount=d),h(d)}),i()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),y(26,Pt,16,4,"ng-container",16)(27,Lt,2,0,"ng-template",null,0,U),i()()()()()}if(r&2){let c=H(28);_("text",e.filter.Number),m(5),p("clearable",!0)("items",e.channelOptions),_("ngModel",e.filter.ChannelID),m(6),_("date",e.filter.From),m(2),_("date",e.filter.To),m(4),_("ngModel",e.filter.PageNumber),m(4),_("ngModel",e.filter.RowCount),m(5),p("ngIf",(e.Result==null?null:e.Result.length)>0)("ngIfElse",c)}},dependencies:[J,T,ae,me,le,se,k,R,K,ue,pe,ce,Z,Y,D]});let o=n;return o})();var Se=class{constructor(n,a){this._document=a;let s=this._textarea=this._document.createElement("textarea"),r=s.style;r.position="fixed",r.top=r.opacity="0",r.left="-999em",s.setAttribute("aria-hidden","true"),s.value=n,s.readOnly=!0,(this._document.fullscreenElement||this._document.body).appendChild(s)}copy(){let n=this._textarea,a=!1;try{if(n){let s=this._document.activeElement;n.select(),n.setSelectionRange(0,n.value.length),a=this._document.execCommand("copy"),s&&s.focus()}}catch{}return a}destroy(){let n=this._textarea;n&&(n.remove(),this._textarea=void 0)}},Ot=(()=>{let n=class n{constructor(s){this._document=s}copy(s){let r=this.beginCopy(s),e=r.copy();return r.destroy(),e}beginCopy(s){return new Se(s,this._document)}};n.\u0275fac=function(r){return new(r||n)(he(Ne))},n.\u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})(),kt=new Ie("CDK_COPY_TO_CLIPBOARD_CONFIG"),et=(()=>{let n=class n{constructor(s,r,e){this._clipboard=s,this._ngZone=r,this.text="",this.attempts=1,this.copied=new Te,this._pending=new Set,e&&e.attempts!=null&&(this.attempts=e.attempts)}copy(s=this.attempts){if(s>1){let r=s,e=this._clipboard.beginCopy(this.text);this._pending.add(e);let c=()=>{let v=e.copy();!v&&--r&&!this._destroyed?this._currentTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(c,1)):(this._currentTimeout=null,this._pending.delete(e),e.destroy(),this.copied.emit(v))};c()}else this.copied.emit(this._clipboard.copy(this.text))}ngOnDestroy(){this._currentTimeout&&clearTimeout(this._currentTimeout),this._pending.forEach(s=>s.destroy()),this._pending.clear(),this._destroyed=!0}};n.\u0275fac=function(r){return new(r||n)(f(Ot),f(De),f(kt,8))},n.\u0275dir=Ee({type:n,selectors:[["","cdkCopyToClipboard",""]],hostBindings:function(r,e){r&1&&N("click",function(){return e.copy()})},inputs:{text:[0,"cdkCopyToClipboard","text"],attempts:[0,"cdkCopyToClipboardAttempts","attempts"]},outputs:{copied:"cdkCopyToClipboardCopied"},standalone:!0});let o=n;return o})(),tt=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oe({type:n}),n.\u0275inj=ne({});let o=n;return o})();function Vt(o,n){o&1&&w(0,"img",21)}function Bt(o,n){o&1&&w(0,"img",22)}function At(o,n){if(o&1&&(t(0,"div",4)(1,"div",5)(2,"div",6)(3,"h5"),l(4,"General"),i()(),t(5,"div",7)(6,"div",2)(7,"div",8)(8,"div",9)(9,"label"),l(10,"Date"),i(),t(11,"div")(12,"span"),l(13),x(14,"date"),i()()()(),t(15,"div",10)(16,"div",9)(17,"label"),l(18,"Market Place Type"),i(),y(19,Vt,1,0,"img",11)(20,Bt,1,0,"img",12),t(21,"a",13)(22,"span",14),l(23),i(),w(24,"br"),t(25,"small",15),l(26),i()()()(),t(27,"div",10)(28,"div",9)(29,"label"),l(30,"Number"),i(),t(31,"div")(32,"span"),l(33),i()()()(),t(34,"div",8)(35,"div",9)(36,"label"),l(37,"Process Type"),i(),t(38,"div")(39,"span"),l(40),i()()()(),t(41,"div",4)(42,"div",9)(43,"label"),l(44,"Authorization Header"),i(),t(45,"div")(46,"span"),l(47),i()()()(),t(48,"div",16)(49,"div",5)(50,"div",17)(51,"div",18)(52,"h3"),l(53,"Request"),i()(),t(54,"div",19)(55,"button",20),l(56,"Copy to clipboard"),i()()(),t(57,"div",7),l(58),i()()()()()()()),o&2){let a=b();m(13),u(E(14,11,a.data.Created,"dd MMM yyyy HH:mm:ss")),m(6),p("ngIf",a.data.TypeID==1),m(),p("ngIf",a.data.TypeID==0),m(),Re("href",a.data.ShopLink,V),m(2),u(a.data.ShopName),m(3),u(a.data.ShopLink),m(7),u(a.data._source.log.number),m(7),u(a.data._source.log.processType),m(7),u(a.data._source.log.authorizationHeader),m(8),p("cdkCopyToClipboard",a.data._source.log.request),m(3),P(" ",a.data._source.log.request," ")}}var it=(()=>{let n=class n{constructor(s,r,e){this.route=s,this.http=r,this._RawLogService=e,this.route.queryParams.subscribe(c=>{let v=JSON.parse(localStorage.getItem("channel"));if(this.ID=c.ID,this.data=this._RawLogService.Fill(this.ID),this.data.Created=this.data._source["@timestamp_received"],v.length>0){let d=v.find(mt=>mt.ShopID==this.data._source.shopId);d?(this.data.TypeID=d.TypeID,this.data.ShopName=d.Name,this.data.ShopLink=d.URL):(this.data.TypeID=null,this.data.ShopName=null,this.data.ShopLink=null)}})}ngOnInit(){}};n.\u0275fac=function(r){return new(r||n)(f(A),f(M),f(F))},n.\u0275cmp=I({type:n,selectors:[["app-raw-detail"]],decls:5,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-2"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-2"],[1,"info-label-group"],[1,"col-sm-4"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",4,"ngIf"],["class","me-2","src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",4,"ngIf"],["target","_blank",3,"href"],[1,"fw-bold"],[1,"text-dark"],[1,"col-sm-12","mt-2"],[1,"card-header","d-lg-flex"],[1,"me-auto"],[1,"d-sm-block","mt-2"],[3,"cdkCopyToClipboard"],["src","https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png",1,"me-2"],["src","https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png",1,"me-2"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"content")(2,"div",1)(3,"div",2),y(4,At,59,14,"div",3),i()()()()),r&2&&(p("headerTitle","Request Raw Log Detail")("hideSearchBox",!0)("hideSearchDropdown",!0),m(4),p("ngIf",e.data))},dependencies:[T,R,et,D]});let o=n;return o})();function Ft(o,n){if(o&1&&(t(0,"div",10)(1,"div",7)(2,"div",8)(3,"h5"),l(4,"General"),i()(),t(5,"div",9)(6,"div",3)(7,"div",6)(8,"div",12)(9,"label"),l(10,"Date"),i(),t(11,"div")(12,"span"),l(13),x(14,"date"),i()()()(),t(15,"div",6)(16,"div",12)(17,"label"),l(18,"SKU"),i(),t(19,"div")(20,"span"),l(21),i()()()(),t(22,"div",6)(23,"div",12)(24,"label"),l(25,"Channel"),i(),t(26,"div")(27,"span"),l(28),i()()()(),t(29,"div",6)(30,"div",12)(31,"label"),l(32,"Response Code"),i(),t(33,"div")(34,"span"),l(35),i()()()()()()()()),o&2){let a=b();m(13),u(E(14,4,a.data.Created,"dd MMM yyyy")),m(8),u(a.data.Sku),m(7),u(a.data.ChannelName),m(7),u(a.data.ResponseCode)}}var nt=(()=>{let n=class n{constructor(s,r,e){this.route=s,this.http=r,this._RawLogService=e,this.data={Created:"",Sku:"",ChannelName:"",ResponseCode:""},this.route.queryParams.subscribe(c=>{this.ID=c.ID,this.Load()})}ngOnInit(){}Load(){var s={ID:this.ID};this.http.post("/api/Inventory/GetInventoryLogDeatil",s).subscribe(r=>{this.data.Created=r.hits[0]._source["@timestamp_received"],this.data.Sku=r.hits[0]._source.log.sku,this.data.ChannelName=r.hits[0]._source.log.channelName,this.data.ResponseCode=r.hits[0]._source.log.responseCode,this.request=X.IsNotEmpty(r.hits[0]?._source.log?.request)?JSON.parse(r.hits[0]?._source?.log?.request):"",this.response=r.hits[0]._source.log.response})}};n.\u0275fac=function(r){return new(r||n)(f(A),f(M),f(F))},n.\u0275cmp=I({type:n,selectors:[["app-inventory-detail"]],decls:30,vars:7,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory/sync-inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[1,"container-fluid","mt-3"],[1,"row"],["class","col-sm-12",4,"ngIf"],[1,"row","mt-2"],[1,"col-sm-6"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group"],[1,"info-label-group"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3),y(7,Ft,36,7,"div",4),i(),t(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"h5"),l(13,"Request"),i()(),t(14,"div",9)(15,"div",10)(16,"div",11)(17,"pre"),l(18),x(19,"json"),i()()()()()(),t(20,"div",6)(21,"div",7)(22,"div",8)(23,"h5"),l(24,"Response"),i()(),t(25,"div",9)(26,"div",10)(27,"div",11)(28,"pre"),l(29),i()()()()()()()()()()),r&2&&(p("hideSearchBox",!0)("hideSearchDropdown",!0),m(7),p("ngIf",e.data),m(11),u(G(19,5,e.request)),m(11),u(e.response))},dependencies:[T,k,R,re,D]});let o=n;return o})();function jt(o,n){if(o&1&&(t(0,"div",9)(1,"div",10)(2,"label"),l(3,"Process Code"),i(),t(4,"div")(5,"span"),l(6),i()()()()),o&2){let a=b();m(6),u(a.ProcessedCode)}}function qt(o,n){if(o&1){let a=L();t(0,"a",16),N("click",function(){g(a);let r=b();return h(r.Retry())}),l(1,"Retry"),i()}}var ot=(()=>{let n=class n{constructor(s,r){this.route=s,this.http=r,this.ProcessDuration=0,this.request="",this.response="",this.route.queryParams.subscribe(e=>{this.ID=e.ID,this.Load()})}Retry(){var s={Number:this.Number,ShopID:this.shopId};this.http.post("/api/Orders/Retry",s).subscribe(r=>{alert(JSON.stringify(r))})}Load(){var s={ID:this.ID};this.http.post("/api/Orders/GetDetail",s).subscribe(r=>{for(let e of r.hits)this.Number=e._source.log.number,this.MarketTypeString=e._source.log.type,this.ResponseCode=e._source.log.responseCode,this.POSActionTypeString=e._source.message,this.ProcessDuration=0,this.Created=e._source["@timestamp_received"],this.request=X.IsNotEmpty(e._source?.log?.request)?JSON.parse(e._source.log?.request):"",this.response=X.IsNotEmpty(e._source?.log?.response)?JSON.parse(e._source.log?.response):"",this.shopId=e._source.shopId,this.ProcessedCode=e._source.log.processedCode})}};n.\u0275fac=function(r){return new(r||n)(f(A),f(M))},n.\u0275cmp=I({type:n,selectors:[["app-orderdetail"]],decls:83,vars:21,consts:[[3,"headerTitle","pageData","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/order",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-sm-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],["class","col-sm-6",4,"ngIf"],[1,"row","mt-2"],[1,"form-group"],[1,"float-right"],["role","button","class","btn btn-success btn-fill btn-lg me-3",3,"click",4,"ngIf"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","me-3",3,"click"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),l(3,"Back"),i()(),t(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),l(11,"General"),i()(),t(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),l(17,"Date"),i(),t(18,"div")(19,"span"),l(20),x(21,"date"),i()()()(),t(22,"div",9)(23,"div",10)(24,"label"),l(25,"Number"),i(),t(26,"div")(27,"span"),l(28),i()()()(),t(29,"div",9)(30,"div",10)(31,"label"),l(32,"Type"),i(),t(33,"div")(34,"span"),l(35),i()()()(),t(36,"div",9)(37,"div",10)(38,"label"),l(39,"Response Code"),i(),t(40,"div")(41,"span"),l(42),i()()()(),t(43,"div",9)(44,"div",10)(45,"label"),l(46,"ShopID"),i(),t(47,"div")(48,"span"),l(49),i()()()(),y(50,jt,7,1,"div",11),t(51,"div",9)(52,"div",10)(53,"label"),l(54,"Action"),i(),t(55,"div")(56,"span"),l(57),i()()()()()()()()(),t(58,"div",12)(59,"div",9)(60,"div",5)(61,"div",6)(62,"h5"),l(63,"Request"),i()(),t(64,"div",7)(65,"div",4)(66,"div",13)(67,"pre"),l(68),x(69,"json"),i()()(),t(70,"actions",14),y(71,qt,2,0,"a",15),i()()()(),t(72,"div",9)(73,"div",5)(74,"div",6)(75,"h5"),l(76,"Response"),i()(),t(77,"div",7)(78,"div",4)(79,"div",13)(80,"pre"),l(81),x(82,"json"),i()()()()()()()()()()),r&2&&(p("headerTitle","Order #"+e.Number)("pageData","Orders Detail ")("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),u(E(21,14,e.Created,"dd MMM yyyy HH:mm:ss")),m(8),u(e.Number),m(7),u(e.MarketTypeString),m(7),u(e.ResponseCode),m(7),u(e.shopId),m(),p("ngIf",e.ProcessedCode!=null),m(7),u(e.POSActionTypeString),m(11),u(G(69,17,e.request)),m(3),p("ngIf",e.ResponseCode!="200"&&e.ResponseCode!="201"),m(10),u(G(82,19,e.response)))},dependencies:[T,k,R,re,D]});let o=n;return o})();var Ht=()=>["/menu/log/exception/detail"],zt=o=>({ID:o});function Gt(o,n){if(o&1&&(t(0,"tr")(1,"td",12),w(2,"img",13),i(),t(3,"td"),l(4),x(5,"date"),i(),t(6,"td")(7,"a",14),l(8),i()(),t(9,"td")(10,"div",15),l(11),i(),t(12,"div"),l(13),i()()()),o&2){let a=n.$implicit;m(2),p("src",a.logo,V),m(2),u(E(5,7,a.date,"dd-MM-yyyy hh:mm:ss")),m(3),p("routerLink",z(10,Ht))("queryParams",B(11,zt,a.id)),m(),P(" ",a.number," "),m(3),u(a.message),m(2),u(a.stackTrace)}}function Ut(o,n){if(o&1){let a=L();j(0),t(1,"mat-paginator",16),N("page",function(r){g(a);let e=b(2);return h(e.onPaginationChange(r))}),i(),q()}if(o&2){let a=b(2);m(),p("length",a.pageTotal)("pageSize",a.pageSize)("pageIndex",(a.filter==null?null:a.filter.PageNumber)==0?0:(a.filter==null?null:a.filter.PageNumber)-1)}}function Jt(o,n){if(o&1&&(j(0),t(1,"div",6)(2,"table",7)(3,"thead")(4,"tr",8)(5,"th"),l(6,"Channel"),i(),t(7,"th",9),l(8,"Date"),i(),t(9,"th"),l(10,"Number"),i(),t(11,"th"),l(12,"Exception"),i()()(),t(13,"tbody"),y(14,Gt,14,13,"tr",10),i()(),y(15,Ut,2,3,"ng-container",11),i(),q()),o&2){let a=b();m(14),p("ngForOf",a.exceptions),m(),p("ngIf",(a.exceptions==null?null:a.exceptions.length)>0)}}function Yt(o,n){o&1&&(t(0,"div",17),w(1,"app-empty-state"),i())}var rt=(()=>{let n=class n{constructor(s){this.http=s,this.exceptions=[],this.filter={RowCount:50,PageNumber:1},this.getData()}getData(){this.http.post("/api/Orders/GetExceptionList",this.filter).subscribe(s=>{this.exceptions=s.hits.map(r=>({id:r._id,logo:X.getChannelLogoByName(r._source.error?.Type),number:r._source.error.number,date:r._source["@timestamp_received"],stackTrace:r._source.error.stackTrace,message:r._source.message,requestJSON:r._source?.error?.requestJSON})),this.pageTotal=s.total.value,this.pageSize=this.filter.RowCount>this.pageTotal?this.pageTotal:this.filter.RowCount})}onPaginationChange(s){this.filter.PageNumber=s.pageIndex+1,this.getData()}};n.\u0275fac=function(r){return new(r||n)(f(M))},n.\u0275cmp=I({type:n,selectors:[["app-exception-log"]],decls:8,vars:2,consts:[["EMPTY_STATE",""],["headerTitle","Exception Log","searchBoxPlaceHolder","Enter Number...","hideSearchBox","true","hideSearchDropdown","true"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","140px"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"text-center"],[2,"width","25px",3,"src"],[3,"routerLink","queryParams"],[1,"fw-bold"],[3,"page","length","pageSize","pageIndex"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(r,e){if(r&1&&(t(0,"mainpanel",1)(1,"content")(2,"div",2)(3,"div",3)(4,"div",4),y(5,Jt,16,2,"ng-container",5)(6,Yt,2,0,"ng-template",null,0,U),i()()()()()),r&2){let c=H(7);m(5),p("ngIf",e.exceptions.length>0)("ngIfElse",c)}},dependencies:[J,T,k,R,K,Y,D]});let o=n;return o})();var at=(()=>{let n=class n{constructor(s){this.httpService=s}getExceptionDetail(s){return this.httpService.post("/api/Orders/GetDetailException",{ID:s}).pipe(be(e=>e?.hits[0]?._source))}};n.\u0275fac=function(r){return new(r||n)(he(M))},n.\u0275prov=ie({token:n,factory:n.\u0275fac,providedIn:"root"});let o=n;return o})();function Zt(o,n){if(o&1&&(t(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),l(6,"General"),i()(),t(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),l(12,"Date"),i(),t(13,"div")(14,"span"),l(15),x(16,"date"),i()()()(),t(17,"div",9)(18,"div",10)(19,"label"),l(20,"Number"),i(),t(21,"div")(22,"span"),l(23),i()()()(),t(24,"div",9)(25,"div",10)(26,"label"),l(27,"Type"),i(),t(28,"div")(29,"span"),l(30),i()()()(),t(31,"div",9)(32,"div",10)(33,"label"),l(34,"ShopID"),i(),t(35,"div")(36,"span"),l(37),i()()()()()()()()(),t(38,"div",11)(39,"div",9)(40,"div",5)(41,"div",6)(42,"h5"),l(43,"Request"),i()(),t(44,"div",7)(45,"div",12)(46,"div",13)(47,"pre"),l(48),x(49,"json"),i()()()()()(),t(50,"div",9)(51,"div",5)(52,"div",6)(53,"h5"),l(54,"Exception"),i()(),t(55,"div",7)(56,"div",14)(57,"div",13)(58,"div",15),l(59),i(),t(60,"pre"),l(61),i()()()()()()()()),o&2){let a=n.ngIf;m(15),u(E(16,7,a["@timestamp"],"dd MMM yyyy HH:mm:ss")),m(8),u(a==null||a.error==null?null:a.error.number),m(7),u(a==null||a.error==null?null:a.error.Type),m(7),u(a==null?null:a.shopId),m(11),u(G(49,10,a==null||a.error==null?null:a.error.requestJSON)),m(11),u(a==null?null:a.message),m(2),u(a==null||a.error==null?null:a.error.stackTrace)}}var lt=(()=>{let n=class n{constructor(s,r){this.activatedRoute=s,this.exceptionService=r,this.invoiceNumber=""}ngOnInit(){let s=this.activatedRoute.snapshot.queryParams;this.getExceptionDetail(s?.ID)}getExceptionDetail(s){this.exceptionDetail$=this.exceptionService.getExceptionDetail(s).pipe(we(r=>{this.invoiceNumber=r?.error?.number}),xe(1))}};n.\u0275fac=function(r){return new(r||n)(f(A),f(at))},n.\u0275cmp=I({type:n,selectors:[["app-exception-detail"]],decls:4,vars:6,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["class","container-fluid mt-3",4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"],[1,"fw-bold"]],template:function(r,e){r&1&&(t(0,"mainpanel",0)(1,"content"),y(2,Zt,62,12,"div",1),x(3,"async"),i()()),r&2&&(p("headerTitle","Order #"+e.invoiceNumber)("hideSearchBox",!0)("hideSearchDropdown",!0),m(2),p("ngIf",G(3,4,e.exceptionDetail$)))},dependencies:[T,R,Pe,re,D]});let o=n;return o})();var Qt=[{path:"",component:Ue,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",component:Qe,canActivate:[W],data:{title:"Order Log"}},{path:"inventory/sync-inventory",component:Xe,canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"rawlog",component:$e,canActivate:[W],data:{title:"Raw Log"}},{path:"rawlog/detail",component:it,canActivate:[W],data:{title:"Raw Log Detail"}},{path:"inventory/sync-inventory/detail",component:nt,canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"order/detail",component:ot,canActivate:[W],data:{title:"Order Details"}},{path:"exception",component:rt,canActivate:[W],data:{title:"Exception Log"}},{path:"exception/detail",component:lt,canActivate:[W],data:{title:"Exception Log Detail"}},{path:"inventory",loadComponent:()=>import("./chunk-QGVD6MF4.js").then(o=>o.InventoryAsyncLogComponent),canActivate:[W],data:{title:"Product Inventory Sync"}},{path:"inventory/detail",loadComponent:()=>import("./chunk-KAEUZC2Y.js").then(o=>o.InventoryAsyncDetailComponent),canActivate:[W],data:{title:"Product Inventory Sync Detail"}},{path:"authorization-log",loadComponent(){return import("./chunk-EIVRD47O.js").then(o=>o.ChannelLogComponent)},canActivate:[W],data:{title:"Authorization Log"}}]}],st=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oe({type:n}),n.\u0275inj=ne({imports:[ve,ye.forChild(Qt)]});let o=n;return o})();var hn=(()=>{let n=class n{};n.\u0275fac=function(r){return new(r||n)},n.\u0275mod=oe({type:n}),n.\u0275inj=ne({imports:[ve,We,Ve,st,ye,je,tt,ze,Be,He,Z,Fe,Ge]});let o=n;return o})();export{hn as LogsModule};