marketplacepos 5.33.5 → 5.33.7

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 (37) hide show
  1. package/Marketplace/{chunk-567ET6EM.js → chunk-3FKDH5RG.js} +1 -1
  2. package/Marketplace/{chunk-X5LNHB6B.js → chunk-3JZYRZT3.js} +1 -1
  3. package/Marketplace/{chunk-RCM7O4DG.js → chunk-47JAK757.js} +1 -1
  4. package/Marketplace/{chunk-QPDRGXE6.js → chunk-6BNB4T6D.js} +1 -1
  5. package/Marketplace/{chunk-3IIFBCEN.js → chunk-6WBLOQ4O.js} +1 -1
  6. package/Marketplace/{chunk-ZUUFTWA7.js → chunk-76GDTOVJ.js} +1 -1
  7. package/Marketplace/{chunk-7H7JW7PT.js → chunk-76IZKTSD.js} +1 -1
  8. package/Marketplace/{chunk-W5AINSNN.js → chunk-AP5VEP3X.js} +1 -1
  9. package/Marketplace/{chunk-RO4MJFRL.js → chunk-BSLGEXE4.js} +1 -1
  10. package/Marketplace/{chunk-TQFRU756.js → chunk-CGF5H6YA.js} +1 -1
  11. package/Marketplace/{chunk-W7SVLKHL.js → chunk-D7ZPHL4I.js} +1 -1
  12. package/Marketplace/{chunk-FOXW4EWP.js → chunk-E4C642KN.js} +1 -1
  13. package/Marketplace/{chunk-BYK5U3CK.js → chunk-ECGLNS5H.js} +2 -2
  14. package/Marketplace/{chunk-K73J4PMO.js → chunk-EISLDGIF.js} +1 -1
  15. package/Marketplace/{chunk-QZINW5VX.js → chunk-F5Y65N3B.js} +1 -1
  16. package/Marketplace/{chunk-DSIDFS5M.js → chunk-FT77MFQN.js} +1 -1
  17. package/Marketplace/{chunk-QGAR7VQ4.js → chunk-GUYZJ4TX.js} +1 -1
  18. package/Marketplace/{chunk-7YB72345.js → chunk-HKDNDD2G.js} +1 -1
  19. package/Marketplace/{chunk-B3Z4Y52F.js → chunk-JBFISOFM.js} +1 -1
  20. package/Marketplace/{chunk-YWBWW4KH.js → chunk-JJFCQ6V3.js} +1 -1
  21. package/Marketplace/{chunk-5RLTRTFU.js → chunk-JYYVBBNN.js} +1 -1
  22. package/Marketplace/{chunk-4EMYM322.js → chunk-KOWWF75X.js} +1 -1
  23. package/Marketplace/{chunk-K6JM3GJS.js → chunk-LHMSPWGJ.js} +1 -1
  24. package/Marketplace/{chunk-T3Z545C5.js → chunk-O6EVUHF3.js} +1 -1
  25. package/Marketplace/{chunk-DCN33TBW.js → chunk-RXWNRL3O.js} +1 -1
  26. package/Marketplace/{chunk-KSMHDTW4.js → chunk-SW7GE4R3.js} +1 -1
  27. package/Marketplace/{chunk-7CGLVYCD.js → chunk-TTLK2HTY.js} +1 -1
  28. package/Marketplace/{chunk-KR3QY42G.js → chunk-TVJVDA5Y.js} +1 -1
  29. package/Marketplace/{chunk-5PONAF6B.js → chunk-UDFZKU5J.js} +1 -1
  30. package/Marketplace/{chunk-ACABNDTE.js → chunk-VUVYEGEO.js} +1 -1
  31. package/Marketplace/{chunk-4LQVVPLG.js → chunk-XR6LJHZU.js} +1 -1
  32. package/Marketplace/{chunk-SIDT3QSA.js → chunk-Y6MN6HLH.js} +1 -1
  33. package/Marketplace/{chunk-OXH33ST3.js → chunk-YKJ34DPH.js} +1 -1
  34. package/Marketplace/{chunk-YVF7TRTO.js → chunk-ZYFF443B.js} +1 -1
  35. package/Marketplace/index.html +2 -2
  36. package/Marketplace/{main-IP6IXXME.js → main-5MBYKGSM.js} +1 -1
  37. package/package.json +1 -1
@@ -1 +1 @@
1
- import{b as u}from"./chunk-X2TVRY2Z.js";import{a as f}from"./chunk-7CGLVYCD.js";import"./chunk-QGAR7VQ4.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{y as d}from"./chunk-BSN7ZAXG.js";import"./chunk-47DMD3UG.js";import{n as c,r as m}from"./chunk-OVEJFFL6.js";import{Cd as n,Ub as a,ka as r,ta as s,ua as i}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-4EMYM322.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
1
+ import{b as u}from"./chunk-X2TVRY2Z.js";import{a as f}from"./chunk-TTLK2HTY.js";import"./chunk-GUYZJ4TX.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{n as l}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{y as d}from"./chunk-BSN7ZAXG.js";import"./chunk-47DMD3UG.js";import{n as c,r as m}from"./chunk-OVEJFFL6.js";import{Cd as n,Ub as a,ka as r,ta as s,ua as i}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var M=(()=>{let t=class t{constructor(){}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=s({type:t,selectors:[["app-report"]],decls:1,vars:0,template:function(e,O){e&1&&a(0,"router-outlet")},dependencies:[c],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]});let o=t;return o})();var y=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-KOWWF75X.js").then(o=>o.OrderModule),canActivate:[f]}]}],C=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,m.forChild(y)]});let o=t;return o})();var b=(()=>{let t=class t{};t.\u0275fac=function(e){return new(e||t)},t.\u0275mod=i({type:t}),t.\u0275inj=r({imports:[n,u,C,d,l,m]});let o=t;return o})();export{b as ReportModule};
@@ -1,2 +1,2 @@
1
- import{a as Ne}from"./chunk-3LR4RLA6.js";import"./chunk-O4CRP4WO.js";import{a as L}from"./chunk-4LQVVPLG.js";import{a as Y}from"./chunk-XHAXYWZ7.js";import{a as ke,b as Re,c as H}from"./chunk-7XUSMPAA.js";import"./chunk-BVIRHZTZ.js";import{a as we,b as be,c as Fe}from"./chunk-ILVEM7H5.js";import{b as De}from"./chunk-S2Z3ZGU7.js";import{a as Pe}from"./chunk-N6IHFFFZ.js";import{a as Ve,b as Me}from"./chunk-PD4CUVAW.js";import"./chunk-IJYSJN63.js";import"./chunk-X5Q6FPWS.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import"./chunk-GCKSYCMI.js";import{a as Te}from"./chunk-ZQWAIH5X.js";import"./chunk-ADRVUMMW.js";import{a as Ee}from"./chunk-LUY3WZJE.js";import"./chunk-HCDKYABV.js";import{e as ge}from"./chunk-CCXKODFV.js";import{j as Ce}from"./chunk-QGAR7VQ4.js";import{b as de,e as ue}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Se,l as ve,m as ye,n as Ie}from"./chunk-BO4PPSB5.js";import{t as xe,u as fe}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as re,c as se,h as ce,m as pe,o as me,y as _e}from"./chunk-BSN7ZAXG.js";import{c as S,f as he}from"./chunk-47DMD3UG.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as ae,Cd as le,Da as m,Ea as _,Eb as h,G as K,Gb as d,Gc as x,Hc as y,Ic as N,Jc as G,Nb as I,Ob as U,Qb as j,Rb as Q,Sb as a,Tb as r,Ub as f,Vb as P,Wb as D,Yb as v,Z as $,bc as l,ea as W,ec as X,gb as M,jb as s,kb as w,mc as z,nc as p,oc as k,pa as Z,pc as V,rc as b,sc as F,sd as te,ta as q,tc as T,uc as J,v as B,vc as ee,vd as ne,xb as O,xc as R,yd as ie,zd as oe}from"./chunk-PQDPS2ID.js";import{a as A}from"./chunk-GNOSNGXM.js";var Be=o=>({"text-decoration-line-through":o}),$e=o=>({"ms-10":o}),We=o=>({"bg-gradient-warning":o});function Oe(o,c){if(o&1){let e=v();a(0,"button",38),g("click",function(){m(e);let t=l().ngIf,i=l(2);return _(i.onScanInventory(t))}),f(1,"i",39),p(2,"Refresh "),r()}}function Ue(o,c){if(o&1){let e=v();a(0,"div",36)(1,"button",40),g("click",function(){m(e);let t=l().ngIf,i=l(2);return _(i.updateStock(t))}),f(2,"i",41),p(3," Update "),r(),f(4,"button",42),a(5,"ul",43)(6,"a",44),g("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),f(7,"i",45),a(8,"span"),p(9,"Export"),r()()()()}}function je(o,c){if(o&1){let e=v();a(0,"button",46),g("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),f(1,"i",45),a(2,"span"),p(3,"Export"),r()()}}function Qe(o,c){if(o&1&&(a(0,"div"),h(1,Oe,3,0,"button",35)(2,Ue,10,0,"div",36)(3,je,4,0,"button",37),r()),o&2){let e=c.ngIf,n=l(2);s(),d("ngIf",n.productService.hasSelectionVariant(e)),s(),I(n.productService.hasSelectionVariant(e)?2:3)}}function ze(o,c){o&1&&(a(0,"div",47)(1,"span"),p(2," showing only different stock, please press next to populate more data "),r()())}function Ge(o,c){if(o&1){let e=v();a(0,"th")(1,"input",48),T("ngModelChange",function(t){m(e);let i=l(2);return F(i.checkboxState,t)||(i.checkboxState=t),_(t)}),g("ngModelChange",function(){let t=m(e).ngIf,i=l(2);return _(i.onCheckboxStateChange(t))}),r()()}if(o&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function He(o,c){o&1&&(a(0,"th",32),p(1," Reserved "),r())}function Ye(o,c){if(o&1){let e=v();a(0,"input",66),T("ngModelChange",function(t){m(e);let i=l(3).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),g("ngModelChange",function(){m(e);let t=l(3).$implicit,i=l(2);return _(i.onCheckboxStateProduct(t))}),r()}if(o&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function Ke(o,c){if(o&1){let e=v();a(0,"img",67),g("click",function(t){m(e);let i=l(3).$implicit,u=l(2);return _(u.onZoomImage(t,i==null?null:i.ImageUrl))}),r()}if(o&2){let e=l(3).$implicit;X("src",e==null?null:e.ThumbnailUrl,M)}}function Ze(o,c){o&1&&f(0,"img",63)}function qe(o,c){if(o&1&&(f(0,"br"),a(1,"div",68),f(2,"i",69),a(3,"small"),p(4),r()()),o&2){let e=l(3).$implicit;s(4),V("(",e==null?null:e.Category,")")}}function Xe(o,c){if(o&1&&(a(0,"td",59)(1,"div",14),h(2,Ye,1,1,"input",60),a(3,"div",61),h(4,Ke,1,1,"img",62)(5,Ze,1,0,"img",63),r()()(),a(6,"td",64)(7,"span",65),p(8),r(),h(9,qe,5,1),r()),o&2){let e=l(2).$implicit,n=l(2);d("rowSpan",e==null?null:e.Variants.length),s(2),I(e.Variants.length>1?2:-1),s(),d("ngClass",R(7,$e,e.Variants.length<=1)),s(),I(e!=null&&e.ThumbnailUrl?4:5),s(2),d("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),I(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function Je(o,c){if(o&1){let e=v();a(0,"input",48),T("ngModelChange",function(t){m(e);let i=l(2).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),r()}if(o&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function et(o,c){if(o&1&&h(0,Je,1,1,"input",53),o&2){let e=l().$implicit;I((e==null?null:e.Inventory)<=1e5?0:-1)}}function tt(o,c){if(o&1){let e=v();a(0,"input",48),T("ngModelChange",function(t){m(e);let i=l().$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),r()}if(o&2){let e=l().$implicit;b("ngModel",e.selected)}}function nt(o,c){o&1&&(a(0,"div",70),p(1," Not Found "),r())}function it(o,c){if(o&1&&(a(0,"div")(1,"span",71),p(2),x(3,"number"),r(),p(4," => "),a(5,"span",72),p(6),x(7,"number"),r()()),o&2){let e=l().$implicit;s(2),V(" ",y(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(y(7,4,e==null?null:e.Inventory))}}function ot(o,c){if(o&1&&(p(0),x(1,"number")),o&2){let e=l().$implicit;V(" ",y(1,1,e==null?null:e.Inventory)," ")}}function at(o,c){if(o&1&&(P(0),a(1,"div",73)(2,"a",74),f(3,"i",75),r()(),D()),o&2){let e=l().$implicit,n=l(3);s(2),d("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),M)}}function lt(o,c){if(o&1){let e=v();a(0,"span",80),g("click",function(){let t=m(e).ngIf,i=l(2).$implicit,u=l().$implicit,C=l(2);return _(C.openTableDialog(u,i,t))}),p(1),x(2,"number"),r()}if(o&2){let e=l(2).$implicit;s(),V(" ",y(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function rt(o,c){if(o&1){let e=v();a(0,"td",76)(1,"div",54)(2,"div"),h(3,lt,3,3,"span",77),x(4,"async"),r(),a(5,"div",73)(6,"a",74),f(7,"i",75),r()(),a(8,"div",73)(9,"span",78),g("click",function(){m(e);let t=l().$implicit,i=l(3);return _(i.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),f(10,"i",79),r()()()()}if(o&2){let e=l().$implicit,n=l(3);d("ngClass",R(5,We,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),d("ngIf",y(4,3,n.products$)),s(3),d("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,M)}}function st(o,c){if(o&1&&(P(0),a(1,"span",81),p(2),x(3,"number"),r(),D()),o&2){let e=l(2).$implicit;s(2),V(" (",y(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function ct(o,c){o&1&&p(0," - ")}function pt(o,c){if(o&1&&(P(0),a(1,"td",50),h(2,st,4,3,"ng-container",58)(3,ct,1,0,"ng-template",null,1,G),r(),D()),o&2){let e=z(4),n=l().$implicit;s(2),d("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",e)}}function mt(o,c){o&1&&(P(0),p(1," - "),D())}function _t(o,c){if(o&1&&(a(0,"span",82),x(1,"date"),p(2),x(3,"date"),r()),o&2){let e=l().$implicit;d("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),V(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function dt(o,c){if(o&1&&(a(0,"tr"),h(1,Xe,10,9),a(2,"td",49),p(3),r(),a(4,"td",50)(5,"span",51),p(6),r()(),a(7,"td",52),h(8,et,1,1)(9,tt,1,1,"input",53),r(),a(10,"td")(11,"div",54),h(12,nt,2,0,"div",55)(13,it,8,6,"div")(14,ot,2,3)(15,at,4,1,"ng-container",5),r()(),h(16,rt,11,7,"td",56)(17,pt,5,2,"ng-container",5),a(18,"td",57),h(19,mt,2,0,"ng-container",58)(20,_t,4,8,"ng-template",null,0,G),r()()),o&2){let e=c.$implicit,n=c.$index,t=z(21),i=l(3);s(),I(n==0?1:-1),s(2),k(e==null?null:e.Model),s(2),d("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",R(14,Be,e.Discontinued)),s(),k(e==null?null:e.Code),s(2),I((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),d("ngIf",(e==null?null:e.I)==null),s(),I((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),I((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),d("ngIf",(e==null?null:e.I)!=null),s(),d("ngIf",e==null?null:e.Channel),s(),d("ngIf",i.isShowReservedColumn),s(2),d("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",t)}}function ut(o,c){if(o&1&&(a(0,"tbody"),j(1,dt,22,16,"tr",null,U),r()),o&2){let e=c.$implicit;s(),Q(e.Variants)}}function ht(o,c){if(o&1){let e=v();a(0,"mainpanel",3),g("onSubmit",function(t){m(e);let i=l();return _(i.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,Qe,4,2,"div",5),x(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),p(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),g("onChannelChange",function(t){m(e);let i=l();return _(i.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),p(12,"PageNumber"),r(),a(13,"input",10),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),_(t)}),r()(),a(14,"div",8)(15,"label",11),p(16,"Page Size"),r(),a(17,"input",12),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),_(t)}),r()(),a(18,"div",8)(19,"label",13),p(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.QuantityFrom,t)||(i.searchFilter.QuantityFrom=t),_(t)}),r(),p(23," - "),a(24,"input",16),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.QuantityTo,t)||(i.searchFilter.QuantityTo=t),_(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,ze,3,0,"div",20),a(30,"table",21),g("matSortChange",function(t){m(e);let i=l();return _(i.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),p(34," Product "),f(35,"br"),a(36,"mat-slide-toggle",24),g("toggleChange",function(){m(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),p(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),p(40,"Variant"),r(),a(41,"th",26),p(42,"SKU"),r(),h(43,Ge,2,1,"th",5),x(44,"async"),a(45,"th",27),p(46," POS "),r(),a(47,"th",28)(48,"div",29),g("click",function(){m(e);let t=l();return _(t.openModalFilter())}),f(49,"img",30),a(50,"span",31),p(51),x(52,"stringLimit"),r()()(),h(53,He,2,0,"th",32),a(54,"th",33),p(55,"Last Sync"),r()()(),j(56,ut,3,0,"tbody",null,U),x(58,"async"),r(),a(59,"infinite-paginator",34),x(60,"async"),g("onNextPage",function(){m(e);let t=l();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){m(e);let t=l();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){m(e);let t=l();return _(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(o&2){let e,n,t,i=l();d("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),d("ngIf",y(4,21,i.products$)),s(6),d("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),b("ngModel",i.searchFilter.PageNumber),s(4),b("ngModel",i.searchFilter.RowCount),s(5),b("ngModel",i.searchFilter.QuantityFrom),s(2),b("ngModel",i.searchFilter.QuantityTo),s(5),d("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),d("ngIf",y(44,23,i.products$)),s(5),d("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),d("src",(n=i.channelIdentity())==null?null:n.img,M),s(2),V(" ",N(52,25,(t=i.channelIdentity())==null?null:t.label,13)," "),s(2),I(i.isShowReservedColumn?53:-1),s(3),Q(y(58,28,i.products$)),s(3),d("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",y(60,30,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var Xt=(()=>{let c=class c{constructor(n,t,i,u,C,E,Le,Ae){this.http=n,this.toastr=t,this.dialog=i,this.productService=u,this.authService=C,this.biggerPictureService=E,this.inventoryService=Le,this.mainPanelService=Ae,this.infinitePagination=Z(H),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=S.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=S.GuidEMpty,this.selectedChannel=O(null),this.channelIdentity=O({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(W(n=>{this.checkShowReservedColumn(n)}),B(n=>(n=this.calculateAvailableStock(n),n)),$(1)),this.products$=this.sourceObs$}calculateAvailableStock(n){return n.map(i=>(i.totalAvailable=i.Variants.reduce((u,C)=>(u+=C.I?.Available||0,u),0),i))}checkShowReservedColumn(n){let t=0,i;n.forEach(u=>{i=u.Variants.find(C=>S.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),i&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe($(1),W(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID,LocationID:n.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),S.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());S.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=S.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=S.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
1
+ import{a as Ne}from"./chunk-3LR4RLA6.js";import"./chunk-O4CRP4WO.js";import{a as L}from"./chunk-XR6LJHZU.js";import{a as Y}from"./chunk-XHAXYWZ7.js";import{a as ke,b as Re,c as H}from"./chunk-7XUSMPAA.js";import"./chunk-BVIRHZTZ.js";import{a as we,b as be,c as Fe}from"./chunk-ILVEM7H5.js";import{b as De}from"./chunk-S2Z3ZGU7.js";import{a as Pe}from"./chunk-N6IHFFFZ.js";import{a as Ve,b as Me}from"./chunk-PD4CUVAW.js";import"./chunk-IJYSJN63.js";import"./chunk-X5Q6FPWS.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import"./chunk-GCKSYCMI.js";import{a as Te}from"./chunk-ZQWAIH5X.js";import"./chunk-ADRVUMMW.js";import{a as Ee}from"./chunk-LUY3WZJE.js";import"./chunk-HCDKYABV.js";import{e as ge}from"./chunk-CCXKODFV.js";import{j as Ce}from"./chunk-GUYZJ4TX.js";import{b as de,e as ue}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as Se,l as ve,m as ye,n as Ie}from"./chunk-BO4PPSB5.js";import{t as xe,u as fe}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{b as re,c as se,h as ce,m as pe,o as me,y as _e}from"./chunk-BSN7ZAXG.js";import{c as S,f as he}from"./chunk-47DMD3UG.js";import"./chunk-OVEJFFL6.js";import{$b as g,Bd as ae,Cd as le,Da as m,Ea as _,Eb as h,G as K,Gb as d,Gc as x,Hc as y,Ic as N,Jc as G,Nb as I,Ob as U,Qb as j,Rb as Q,Sb as a,Tb as r,Ub as f,Vb as P,Wb as D,Yb as v,Z as $,bc as l,ea as W,ec as X,gb as M,jb as s,kb as w,mc as z,nc as p,oc as k,pa as Z,pc as V,rc as b,sc as F,sd as te,ta as q,tc as T,uc as J,v as B,vc as ee,vd as ne,xb as O,xc as R,yd as ie,zd as oe}from"./chunk-PQDPS2ID.js";import{a as A}from"./chunk-GNOSNGXM.js";var Be=o=>({"text-decoration-line-through":o}),$e=o=>({"ms-10":o}),We=o=>({"bg-gradient-warning":o});function Oe(o,c){if(o&1){let e=v();a(0,"button",38),g("click",function(){m(e);let t=l().ngIf,i=l(2);return _(i.onScanInventory(t))}),f(1,"i",39),p(2,"Refresh "),r()}}function Ue(o,c){if(o&1){let e=v();a(0,"div",36)(1,"button",40),g("click",function(){m(e);let t=l().ngIf,i=l(2);return _(i.updateStock(t))}),f(2,"i",41),p(3," Update "),r(),f(4,"button",42),a(5,"ul",43)(6,"a",44),g("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),f(7,"i",45),a(8,"span"),p(9,"Export"),r()()()()}}function je(o,c){if(o&1){let e=v();a(0,"button",46),g("click",function(){m(e);let t=l(3);return _(t.openExportDialog())}),f(1,"i",45),a(2,"span"),p(3,"Export"),r()()}}function Qe(o,c){if(o&1&&(a(0,"div"),h(1,Oe,3,0,"button",35)(2,Ue,10,0,"div",36)(3,je,4,0,"button",37),r()),o&2){let e=c.ngIf,n=l(2);s(),d("ngIf",n.productService.hasSelectionVariant(e)),s(),I(n.productService.hasSelectionVariant(e)?2:3)}}function ze(o,c){o&1&&(a(0,"div",47)(1,"span"),p(2," showing only different stock, please press next to populate more data "),r()())}function Ge(o,c){if(o&1){let e=v();a(0,"th")(1,"input",48),T("ngModelChange",function(t){m(e);let i=l(2);return F(i.checkboxState,t)||(i.checkboxState=t),_(t)}),g("ngModelChange",function(){let t=m(e).ngIf,i=l(2);return _(i.onCheckboxStateChange(t))}),r()()}if(o&2){let e=l(2);s(),b("ngModel",e.checkboxState)}}function He(o,c){o&1&&(a(0,"th",32),p(1," Reserved "),r())}function Ye(o,c){if(o&1){let e=v();a(0,"input",66),T("ngModelChange",function(t){m(e);let i=l(3).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),g("ngModelChange",function(){m(e);let t=l(3).$implicit,i=l(2);return _(i.onCheckboxStateProduct(t))}),r()}if(o&2){let e=l(3).$implicit;b("ngModel",e.selected)}}function Ke(o,c){if(o&1){let e=v();a(0,"img",67),g("click",function(t){m(e);let i=l(3).$implicit,u=l(2);return _(u.onZoomImage(t,i==null?null:i.ImageUrl))}),r()}if(o&2){let e=l(3).$implicit;X("src",e==null?null:e.ThumbnailUrl,M)}}function Ze(o,c){o&1&&f(0,"img",63)}function qe(o,c){if(o&1&&(f(0,"br"),a(1,"div",68),f(2,"i",69),a(3,"small"),p(4),r()()),o&2){let e=l(3).$implicit;s(4),V("(",e==null?null:e.Category,")")}}function Xe(o,c){if(o&1&&(a(0,"td",59)(1,"div",14),h(2,Ye,1,1,"input",60),a(3,"div",61),h(4,Ke,1,1,"img",62)(5,Ze,1,0,"img",63),r()()(),a(6,"td",64)(7,"span",65),p(8),r(),h(9,qe,5,1),r()),o&2){let e=l(2).$implicit,n=l(2);d("rowSpan",e==null?null:e.Variants.length),s(2),I(e.Variants.length>1?2:-1),s(),d("ngClass",R(7,$e,e.Variants.length<=1)),s(),I(e!=null&&e.ThumbnailUrl?4:5),s(2),d("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),I(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function Je(o,c){if(o&1){let e=v();a(0,"input",48),T("ngModelChange",function(t){m(e);let i=l(2).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),r()}if(o&2){let e=l(2).$implicit;b("ngModel",e.selected)}}function et(o,c){if(o&1&&h(0,Je,1,1,"input",53),o&2){let e=l().$implicit;I((e==null?null:e.Inventory)<=1e5?0:-1)}}function tt(o,c){if(o&1){let e=v();a(0,"input",48),T("ngModelChange",function(t){m(e);let i=l().$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),r()}if(o&2){let e=l().$implicit;b("ngModel",e.selected)}}function nt(o,c){o&1&&(a(0,"div",70),p(1," Not Found "),r())}function it(o,c){if(o&1&&(a(0,"div")(1,"span",71),p(2),x(3,"number"),r(),p(4," => "),a(5,"span",72),p(6),x(7,"number"),r()()),o&2){let e=l().$implicit;s(2),V(" ",y(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(y(7,4,e==null?null:e.Inventory))}}function ot(o,c){if(o&1&&(p(0),x(1,"number")),o&2){let e=l().$implicit;V(" ",y(1,1,e==null?null:e.Inventory)," ")}}function at(o,c){if(o&1&&(P(0),a(1,"div",73)(2,"a",74),f(3,"i",75),r()(),D()),o&2){let e=l().$implicit,n=l(3);s(2),d("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),M)}}function lt(o,c){if(o&1){let e=v();a(0,"span",80),g("click",function(){let t=m(e).ngIf,i=l(2).$implicit,u=l().$implicit,C=l(2);return _(C.openTableDialog(u,i,t))}),p(1),x(2,"number"),r()}if(o&2){let e=l(2).$implicit;s(),V(" ",y(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function rt(o,c){if(o&1){let e=v();a(0,"td",76)(1,"div",54)(2,"div"),h(3,lt,3,3,"span",77),x(4,"async"),r(),a(5,"div",73)(6,"a",74),f(7,"i",75),r()(),a(8,"div",73)(9,"span",78),g("click",function(){m(e);let t=l().$implicit,i=l(3);return _(i.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),f(10,"i",79),r()()()()}if(o&2){let e=l().$implicit,n=l(3);d("ngClass",R(5,We,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),d("ngIf",y(4,3,n.products$)),s(3),d("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,M)}}function st(o,c){if(o&1&&(P(0),a(1,"span",81),p(2),x(3,"number"),r(),D()),o&2){let e=l(2).$implicit;s(2),V(" (",y(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function ct(o,c){o&1&&p(0," - ")}function pt(o,c){if(o&1&&(P(0),a(1,"td",50),h(2,st,4,3,"ng-container",58)(3,ct,1,0,"ng-template",null,1,G),r(),D()),o&2){let e=z(4),n=l().$implicit;s(2),d("ngIf",n==null||n.Channel[0]==null?null:n.Channel[0].InventoryReserved)("ngIfElse",e)}}function mt(o,c){o&1&&(P(0),p(1," - "),D())}function _t(o,c){if(o&1&&(a(0,"span",82),x(1,"date"),p(2),x(3,"date"),r()),o&2){let e=l().$implicit;d("matTooltip",N(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),V(" ",N(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function dt(o,c){if(o&1&&(a(0,"tr"),h(1,Xe,10,9),a(2,"td",49),p(3),r(),a(4,"td",50)(5,"span",51),p(6),r()(),a(7,"td",52),h(8,et,1,1)(9,tt,1,1,"input",53),r(),a(10,"td")(11,"div",54),h(12,nt,2,0,"div",55)(13,it,8,6,"div")(14,ot,2,3)(15,at,4,1,"ng-container",5),r()(),h(16,rt,11,7,"td",56)(17,pt,5,2,"ng-container",5),a(18,"td",57),h(19,mt,2,0,"ng-container",58)(20,_t,4,8,"ng-template",null,0,G),r()()),o&2){let e=c.$implicit,n=c.$index,t=z(21),i=l(3);s(),I(n==0?1:-1),s(2),k(e==null?null:e.Model),s(2),d("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",R(14,Be,e.Discontinued)),s(),k(e==null?null:e.Code),s(2),I((e==null?null:e.Channel[0].TypeID)==1?8:(e==null?null:e.Inventory)>=0?9:-1),s(4),d("ngIf",(e==null?null:e.I)==null),s(),I((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?13:-1),s(),I((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?14:-1),s(),d("ngIf",(e==null?null:e.I)!=null),s(),d("ngIf",e==null?null:e.Channel),s(),d("ngIf",i.isShowReservedColumn),s(2),d("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",t)}}function ut(o,c){if(o&1&&(a(0,"tbody"),j(1,dt,22,16,"tr",null,U),r()),o&2){let e=c.$implicit;s(),Q(e.Variants)}}function ht(o,c){if(o&1){let e=v();a(0,"mainpanel",3),g("onSubmit",function(t){m(e);let i=l();return _(i.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,Qe,4,2,"div",5),x(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),p(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),g("onChannelChange",function(t){m(e);let i=l();return _(i.onChannelChange(t))}),r()(),a(10,"div",8)(11,"label",9),p(12,"PageNumber"),r(),a(13,"input",10),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),_(t)}),r()(),a(14,"div",8)(15,"label",11),p(16,"Page Size"),r(),a(17,"input",12),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),_(t)}),r()(),a(18,"div",8)(19,"label",13),p(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.QuantityFrom,t)||(i.searchFilter.QuantityFrom=t),_(t)}),r(),p(23," - "),a(24,"input",16),T("ngModelChange",function(t){m(e);let i=l();return F(i.searchFilter.QuantityTo,t)||(i.searchFilter.QuantityTo=t),_(t)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,ze,3,0,"div",20),a(30,"table",21),g("matSortChange",function(t){m(e);let i=l();return _(i.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),p(34," Product "),f(35,"br"),a(36,"mat-slide-toggle",24),g("toggleChange",function(){m(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),p(38,"FILTER DIFFERENT INVENTORY"),r()()(),a(39,"th",25),p(40,"Variant"),r(),a(41,"th",26),p(42,"SKU"),r(),h(43,Ge,2,1,"th",5),x(44,"async"),a(45,"th",27),p(46," POS "),r(),a(47,"th",28)(48,"div",29),g("click",function(){m(e);let t=l();return _(t.openModalFilter())}),f(49,"img",30),a(50,"span",31),p(51),x(52,"stringLimit"),r()()(),h(53,He,2,0,"th",32),a(54,"th",33),p(55,"Last Sync"),r()()(),j(56,ut,3,0,"tbody",null,U),x(58,"async"),r(),a(59,"infinite-paginator",34),x(60,"async"),g("onNextPage",function(){m(e);let t=l();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){m(e);let t=l();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){m(e);let t=l();return _(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(o&2){let e,n,t,i=l();d("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),d("ngIf",y(4,21,i.products$)),s(6),d("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),b("ngModel",i.searchFilter.PageNumber),s(4),b("ngModel",i.searchFilter.RowCount),s(5),b("ngModel",i.searchFilter.QuantityFrom),s(2),b("ngModel",i.searchFilter.QuantityTo),s(5),d("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),d("ngIf",y(44,23,i.products$)),s(5),d("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),d("src",(n=i.channelIdentity())==null?null:n.img,M),s(2),V(" ",N(52,25,(t=i.channelIdentity())==null?null:t.label,13)," "),s(2),I(i.isShowReservedColumn?53:-1),s(3),Q(y(58,28,i.products$)),s(3),d("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",y(60,30,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var Xt=(()=>{let c=class c{constructor(n,t,i,u,C,E,Le,Ae){this.http=n,this.toastr=t,this.dialog=i,this.productService=u,this.authService=C,this.biggerPictureService=E,this.inventoryService=Le,this.mainPanelService=Ae,this.infinitePagination=Z(H),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=S.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=S.GuidEMpty,this.selectedChannel=O(null),this.channelIdentity=O({img:null,label:null}),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(W(n=>{this.checkShowReservedColumn(n)}),B(n=>(n=this.calculateAvailableStock(n),n)),$(1)),this.products$=this.sourceObs$}calculateAvailableStock(n){return n.map(i=>(i.totalAvailable=i.Variants.reduce((u,C)=>(u+=C.I?.Available||0,u),0),i))}checkShowReservedColumn(n){let t=0,i;n.forEach(u=>{i=u.Variants.find(C=>S.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),i&&(t+=1)}),this.isShowReservedColumn=t>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe($(1),W(n=>{this.searchFilter={RowCount:n.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter.ChannelID,LocationID:n.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),S.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());S.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=S.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=S.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
2
2
  Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(n){this.searchFilter.text=n,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(n){let t=this.productService.selectedVariantProduct(n);if(t.length>0){let i=this.searchFilter.LocationID,u=t.map(E=>A({ID:E.ID,Code:E.Code,Inventory:E.Inventory},S.IsNotEmpty(i)&&{LocationID:i})),C={ListChannelID:[this.searchFilter.ChannelID],List:u};this.http.post("/api/Inventory/UpdateChannel",C).subscribe(E=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(E)})}}handlingUpdateStock(n){if(n[0]?.Response){let t=n[0]?.Response?.Fail_list,i=n[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",i,t)}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,t,i,u){let C={ChannelItemID:n,ChannelVariationID:t,ChannelID:i,VariantID:u};this.http.post("/api/Inventory/RefreshInventoryChannel",C).subscribe(E=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.Inventory>=0&&(t.selected=n.selected),t))}onCheckboxStateChange(n){n=n.map(t=>(t.Variants=t.Variants.map(i=>(i.selected=this.checkboxState,i)),t))}openTableDialog(n,t,i){this.dialog.open(ke,{data:{Name:n.Name,Variant:t,ChannelID:t?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(K(C=>S.IsNotEmpty(C))).subscribe(C=>{this.updateItemAfterDialog(C)})}updateItemAfterDialog(n){let t=this.searchFilter.LocationID,i=A({ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:parseFloat(n.Inventory),VariantID:n.ID,SKU:n.Sku},S.IsNotEmpty(t)&&{LocationID:t});this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(u=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([u])})}onScanInventory(n){let t=this.productService.selectedVariantProduct(n);this.inventoryService.refreshInventory(t).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(De,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=Y.DIFFERENCE:this.searchFilter.filterModel=Y.ALL,this.initReloadData()}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}onSortVariant(n){if(n.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(B(t=>t.map(i=>(i.Variants=i.Variants.sort((u,C)=>S.compare(u.I?.Available,C.I?.Available,n.direction==="asc")),i)).sort((i,u)=>S.compare(i.totalAvailable,u.totalAvailable,n.direction==="asc"))))}};c.\u0275fac=function(t){return new(t||c)(w(ue),w(de),w(Se),w(Te),w(Ce),w(Ee),w(L),w(ve))},c.\u0275cmp=q({type:c,selectors:[["app-single-channel-comparison"]],standalone:!0,features:[J([H,L]),ee],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"align-middle"],["type","checkbox",3,"ngModel"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],["type","checkbox",1,"me-3",3,"ngModel"],[3,"ngClass"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],["class","cursor",3,"click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[1,"cursor",3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(t,i){t&1&&(h(0,ht,61,32,"mainpanel",2),x(1,"async")),t&2&&d("ngIf",y(1,1,i.loader$))},dependencies:[le,te,ne,ie,ae,oe,Ie,ye,ge,_e,se,me,re,ce,pe,Pe,Re,he,Me,Ve,fe,xe,Fe,we,be,Ne],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let o=c;return o})();export{Xt as SingleChannelComparisonComponent};
@@ -1,4 +1,4 @@
1
- import{a as Qe,b as j,c as Je}from"./chunk-O434S2MH.js";import"./chunk-B2TH5YJH.js";import{a as Ye,b as Ge,c as Ue,e as je,f as Ke,g as He}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import{f as Le,g as Be,h as Ae,i as $e,j as ze}from"./chunk-FGPSBTFS.js";import{a as Re}from"./chunk-ZQWAIH5X.js";import"./chunk-ADRVUMMW.js";import{a as ke,b as Ne,c as We}from"./chunk-UMNGKENU.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{c as Ee,d as Pe,e as Ie}from"./chunk-CCXKODFV.js";import{h as te,j as ie}from"./chunk-QGAR7VQ4.js";import{b as Te,e as be}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as Fe,n as Oe}from"./chunk-BO4PPSB5.js";import{t as Me,u as Ve}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as ve,h as ye,m as xe,y as De}from"./chunk-BSN7ZAXG.js";import{b as ee,c as D}from"./chunk-47DMD3UG.js";import{p as Se,r as Ce}from"./chunk-OVEJFFL6.js";import{$b as S,Cd as k,Da as c,Ea as u,Eb as w,Gb as m,Gc as L,Hc as U,Ic as we,Jc as J,Ma as N,Nb as E,Pa as H,Sb as r,Tb as a,Ub as C,Vb as W,Wb as R,Yb as x,Z as Y,aa as se,bc as h,ea as G,ec as me,fc as ce,fd as q,gb as de,hc as ue,ic as he,ja as pe,jb as l,jc as fe,m as le,mc as b,nc as p,oc as F,pa as y,pc as v,rc as P,sc as I,sd as B,ta as V,tc as M,uc as Q,ud as A,v as K,vc as O,vd as $,xb as g,xc as _e,yc as ge,yd as X,zd as Z}from"./chunk-PQDPS2ID.js";import{a as re,b as oe}from"./chunk-GNOSNGXM.js";var et=e=>({"over-due":e});function tt(e,o){if(e&1&&(r(0,"tr",8)(1,"td"),p(2),a(),r(3,"td"),p(4),a(),r(5,"td"),p(6),a(),r(7,"td"),p(8),a()()),e&2){let s=o.$implicit,t=o.index;m("ngClass",_e(5,et,s.Exception)),l(2),F(t+1),l(2),F(s.Number),l(2),F(s.Status),l(2),F(s.Exception)}}function it(e,o){if(e&1&&(W(0),w(1,tt,9,7,"tr",7),R()),e&2){let s,t=h();l(),m("ngForOf",(s=t.downloadResult())==null?null:s.Body)}}function nt(e,o){e&1&&(r(0,"tr",9)(1,"td",10)(2,"div",11),C(3,"i",12),a(),r(4,"h4",13),p(5," There is no order to processed "),a()()())}var qe=(()=>{let o=class o{constructor(){this.downloadResult=N()}ngOnInit(){}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},standalone:!0,features:[O],decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(r(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),C(5,"th",5),r(6,"th"),p(7,"Order Number"),a(),r(8,"th"),p(9,"Status"),a(),r(10,"th"),p(11,"Exception"),a()()(),r(12,"tbody"),w(13,it,2,1,"ng-container",6)(14,nt,6,0,"ng-template",null,0,J),a()()()()),n&2){let d,f=b(15);l(13),m("ngIf",((d=i.downloadResult())==null||d.Body==null?null:d.Body.length)>0)("ngIfElse",f)}},dependencies:[k,B,A,$]});let e=o;return e})();var z=(()=>{let o=class o{constructor(){this.httpService=y(be),this.toastr=y(Te),this.datePipe=y(Z)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(G(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):le}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),d=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${d} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?D.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):D.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=D.formatTitleFromDate(new Date(t),new Date(n)),d=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":d+"-"} ${f}`}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=pe({token:o,factory:o.\u0275fac});let e=o;return e})();function at(e,o){if(e&1&&(r(0,"ng-option",13),C(1,"img",14),p(2),a()),e&2){let s=o.$implicit;m("value",s.ID),l(),m("src",s==null?null:s.Img,de),l(),v("",s.Name," ")}}function rt(e,o){if(e&1){let s=x();r(0,"div",8)(1,"div",4)(2,"h5"),p(3,"Type"),a(),r(4,"p",5),p(5,"Select Type want to download"),a()(),r(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),M("ngModelChange",function(n){c(s);let i=h();return I(i.downloadType,n)||(i.downloadType=n),u(n)}),S("ngModelChange",function(){c(s);let n=h();return u(n.onDownloadTypeChange())}),r(10,"mat-radio-button",17),p(11," Orders "),a(),r(12,"mat-radio-button",18),p(13," Disbursement "),a()()()(),r(14,"div",19)(15,"div",20),C(16,"i",21),a(),r(17,"p",22),p(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let s=h();l(9),P("ngModel",s.downloadType),l(),m("value",!1),l(2),m("value",!0)}}function ot(e,o){e&1&&(r(0,"p",5),p(1," Select Disbursement date "),r(2,"span",23),p(3,"(payment date / order complete date)"),a(),p(4," of the channel you want to download (Max 1 Week). "),a())}function lt(e,o){e&1&&(r(0,"p",5),p(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function st(e,o){if(e&1){let s=x();r(0,"div",12)(1,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.startTime,n)||(i.startTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onStartTimeChange())}),a(),r(2,"span",25),p(3,"-"),a(),r(4,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.endTime,n)||(i.endTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onEndTimeChange())}),a()()}if(e&2){let s=h();l(),P("time",s.startTime),l(3),P("time",s.endTime)}}var Xe=(()=>{let o=class o{constructor(){this.reset=N(!1),this.authService=y(ie),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.filterData=new H,q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(K(t=>t?.Model),Y(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=D.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},standalone:!0,features:[Q([z]),O],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let d=x();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),p(5,"Select a Channel"),a(),r(6,"p",5),p(7,"Select Channel want to download order"),a()(),r(8,"div",4)(9,"ng-select",6),M("ngModelChange",function(_){return c(d),I(i.selectedChannelId,_)||(i.selectedChannelId=_),u(_)}),S("ngModelChange",function(){return c(d),u(i.onSelectChannel())}),w(10,at,3,3,"ng-option",7),a()()(),w(11,rt,19,3,"div",8),L(12,"async"),r(13,"div",8)(14,"div",4)(15,"h5"),p(16,"Date Range"),a(),w(17,ot,5,0,"p",5)(18,lt,2,0,"p",5),a(),r(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),M("ngModelChange",function(_){return c(d),I(i.startDate,_)||(i.startDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())}),a(),r(23,"input",11),M("ngModelChange",function(_){return c(d),I(i.endDate,_)||(i.endDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())})("ngModelChange",function(){return c(d),u(i.onFilterDateChange())}),a()(),C(24,"mat-date-range-picker",null,0),a(),w(26,st,5,2,"div",12),a()()()()}if(n&2){let d,f,_=b(25);l(9),m("clearable",!1),P("ngModel",i.selectedChannelId),l(),m("ngForOf",i.channelOptions()),l(),E((d=U(12,9,i.channelDetail$))!=null&&d.ServiceFeeWriteOff&&((d=i.selectedChannel())==null?null:d.TypeID)==i.channelType.Tokopedia?11:-1),l(6),E(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?17:18),l(4),m("rangePicker",_),l(),P("ngModel",i.startDate),l(),P("ngModel",i.endDate),l(3),E(i.showTimePicker()?26:-1)}},dependencies:[k,A,X,Ie,Pe,Ee,We,ke,Ne,De,ve,ye,xe,Je,$e,Ae,ze,Le,Be],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=o;return e})();var T=function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e}(T||{});var pt=(e,o)=>({"over-due-today":e,"over-due":o});function dt(e,o){if(e&1&&(r(0,"th",21),p(1),a()),e&2){let s=h();l(),v(" ",s.selectedChannel()?"Created Date":"Last Status Update"," ")}}function mt(e,o){if(e&1&&(r(0,"td"),p(1),L(2,"date"),a()),e&2){let s=h().$implicit;l(),v(" ",we(2,1,s.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function ct(e,o){if(e&1&&(r(0,"span"),p(1),a()),e&2){let s=h().$implicit;l(),v(" ",s.ActionString," ")}}function ut(e,o){if(e&1&&(r(0,"li"),p(1),a()),e&2){let s=o.$implicit;l(),v(" ",s," ")}}function ht(e,o){if(e&1&&(r(0,"ul",27),w(1,ut,2,1,"li",22),a()),e&2){let s=h().$implicit;l(),m("ngForOf",s.ActionString)}}function ft(e,o){if(e&1&&(r(0,"span",28),C(1,"i",29),a()),e&2){let s=h().$implicit;ce("title","Delivery : ",s.DeliveryState,`
1
+ import{a as Qe,b as j,c as Je}from"./chunk-O434S2MH.js";import"./chunk-B2TH5YJH.js";import{a as Ye,b as Ge,c as Ue,e as je,f as Ke,g as He}from"./chunk-TPGBOTD4.js";import"./chunk-4LFFAE2I.js";import"./chunk-46AOM3SM.js";import"./chunk-OULUJ2IO.js";import{f as Le,g as Be,h as Ae,i as $e,j as ze}from"./chunk-FGPSBTFS.js";import{a as Re}from"./chunk-ZQWAIH5X.js";import"./chunk-ADRVUMMW.js";import{a as ke,b as Ne,c as We}from"./chunk-UMNGKENU.js";import"./chunk-FMV4LYKN.js";import"./chunk-HCDKYABV.js";import{c as Ee,d as Pe,e as Ie}from"./chunk-CCXKODFV.js";import{h as te,j as ie}from"./chunk-GUYZJ4TX.js";import{b as Te,e as be}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as Fe,n as Oe}from"./chunk-BO4PPSB5.js";import{t as Me,u as Ve}from"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as ve,h as ye,m as xe,y as De}from"./chunk-BSN7ZAXG.js";import{b as ee,c as D}from"./chunk-47DMD3UG.js";import{p as Se,r as Ce}from"./chunk-OVEJFFL6.js";import{$b as S,Cd as k,Da as c,Ea as u,Eb as w,Gb as m,Gc as L,Hc as U,Ic as we,Jc as J,Ma as N,Nb as E,Pa as H,Sb as r,Tb as a,Ub as C,Vb as W,Wb as R,Yb as x,Z as Y,aa as se,bc as h,ea as G,ec as me,fc as ce,fd as q,gb as de,hc as ue,ic as he,ja as pe,jb as l,jc as fe,m as le,mc as b,nc as p,oc as F,pa as y,pc as v,rc as P,sc as I,sd as B,ta as V,tc as M,uc as Q,ud as A,v as K,vc as O,vd as $,xb as g,xc as _e,yc as ge,yd as X,zd as Z}from"./chunk-PQDPS2ID.js";import{a as re,b as oe}from"./chunk-GNOSNGXM.js";var et=e=>({"over-due":e});function tt(e,o){if(e&1&&(r(0,"tr",8)(1,"td"),p(2),a(),r(3,"td"),p(4),a(),r(5,"td"),p(6),a(),r(7,"td"),p(8),a()()),e&2){let s=o.$implicit,t=o.index;m("ngClass",_e(5,et,s.Exception)),l(2),F(t+1),l(2),F(s.Number),l(2),F(s.Status),l(2),F(s.Exception)}}function it(e,o){if(e&1&&(W(0),w(1,tt,9,7,"tr",7),R()),e&2){let s,t=h();l(),m("ngForOf",(s=t.downloadResult())==null?null:s.Body)}}function nt(e,o){e&1&&(r(0,"tr",9)(1,"td",10)(2,"div",11),C(3,"i",12),a(),r(4,"h4",13),p(5," There is no order to processed "),a()()())}var qe=(()=>{let o=class o{constructor(){this.downloadResult=N()}ngOnInit(){}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["complete-step"]],inputs:{downloadResult:[1,"downloadResult"]},standalone:!0,features:[O],decls:16,vars:2,consts:[["EMPTY_DOWNLOAD",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"table"],[1,"thead-light"],["width","1%"],[4,"ngIf","ngIfElse"],[3,"ngClass",4,"ngFor","ngForOf"],[3,"ngClass"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1&&(r(0,"div",1)(1,"div",2)(2,"table",3)(3,"thead",4)(4,"tr"),C(5,"th",5),r(6,"th"),p(7,"Order Number"),a(),r(8,"th"),p(9,"Status"),a(),r(10,"th"),p(11,"Exception"),a()()(),r(12,"tbody"),w(13,it,2,1,"ng-container",6)(14,nt,6,0,"ng-template",null,0,J),a()()()()),n&2){let d,f=b(15);l(13),m("ngIf",((d=i.downloadResult())==null||d.Body==null?null:d.Body.length)>0)("ngIfElse",f)}},dependencies:[k,B,A,$]});let e=o;return e})();var z=(()=>{let o=class o{constructor(){this.httpService=y(be),this.toastr=y(Te),this.datePipe=y(Z)}gerChannelDetailById(t){return this.httpService.post(te.GetChannelDetail,{ID:t})}getOrderPreview(t){return this.httpService.post(te.GetOrderPreviewV2,t)}getDownloadOrder(t){return this.httpService.post(te.GetDownloadOrderV2,t)}onPreviewOrder(t){return this.validateDatePreview(t)?this.getOrderPreview(t).pipe(G(n=>{n.Data?.length===0&&this.toastrEmptyPreview(t)})):le}toastrEmptyPreview(t){let n=this.datePipe.transform(t.From,"dd MMM yyyy"),i=this.datePipe.transform(t.To,"dd MMM yyyy"),d=t.TimeFrom?t.TimeFrom:"",f=t.TimeTo?t.TimeTo:"";this.toastr.info(`There is no orders from ${n} ${d} to ${i} ${f}!`,"No Orders!")}validateDatePreview(t){let n=!0;return t.downloadType==!0?D.getDaysDiff(t?.From,t?.To)+1>7&&(this.toastr.warning("Dates cannot be more than 7 days apart!","Warning"),n=!1):D.getDaysDiff(t?.From,t?.To)+1>14&&(this.toastr.warning("Dates cannot be more than 14 days apart!","Warning"),n=!1),n}getDateTitle(t,n){let i=D.formatTitleFromDate(new Date(t),new Date(n)),d=this.datePipe.transform(t,i),f=this.datePipe.transform(n,"dd MMM yyyy");return`${i==null?"":d+"-"} ${f}`}};o.\u0275fac=function(n){return new(n||o)},o.\u0275prov=pe({token:o,factory:o.\u0275fac});let e=o;return e})();function at(e,o){if(e&1&&(r(0,"ng-option",13),C(1,"img",14),p(2),a()),e&2){let s=o.$implicit;m("value",s.ID),l(),m("src",s==null?null:s.Img,de),l(),v("",s.Name," ")}}function rt(e,o){if(e&1){let s=x();r(0,"div",8)(1,"div",4)(2,"h5"),p(3,"Type"),a(),r(4,"p",5),p(5,"Select Type want to download"),a()(),r(6,"div",4)(7,"div",15)(8,"div")(9,"mat-radio-group",16),M("ngModelChange",function(n){c(s);let i=h();return I(i.downloadType,n)||(i.downloadType=n),u(n)}),S("ngModelChange",function(){c(s);let n=h();return u(n.onDownloadTypeChange())}),r(10,"mat-radio-button",17),p(11," Orders "),a(),r(12,"mat-radio-button",18),p(13," Disbursement "),a()()()(),r(14,"div",19)(15,"div",20),C(16,"i",21),a(),r(17,"p",22),p(18," If there are completed transactions, to obtain payment and service fee, you need to download disbursement. "),a()()()()}if(e&2){let s=h();l(9),P("ngModel",s.downloadType),l(),m("value",!1),l(2),m("value",!0)}}function ot(e,o){e&1&&(r(0,"p",5),p(1," Select Disbursement date "),r(2,"span",23),p(3,"(payment date / order complete date)"),a(),p(4," of the channel you want to download (Max 1 Week). "),a())}function lt(e,o){e&1&&(r(0,"p",5),p(1," Select transaction date of the channel you want to download (Max 2 Weeks) "),a())}function st(e,o){if(e&1){let s=x();r(0,"div",12)(1,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.startTime,n)||(i.startTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onStartTimeChange())}),a(),r(2,"span",25),p(3,"-"),a(),r(4,"app-timepicker",24),M("timeChange",function(n){c(s);let i=h();return I(i.endTime,n)||(i.endTime=n),u(n)}),S("timeChange",function(){c(s);let n=h();return u(n.onEndTimeChange())}),a()()}if(e&2){let s=h();l(),P("time",s.startTime),l(3),P("time",s.endTime)}}var Xe=(()=>{let o=class o{constructor(){this.reset=N(!1),this.authService=y(ie),this.downloadService=y(z),this.downloadType=g(!1),this.selectedChannelId=g(null),this.channelOptions=g(this.authService.getChannels()),this.channelType=ee,this.selectedChannel=g(null),this.showTimePicker=g(!1),this.startDate=g(null),this.endDate=g(null),this.startTime=g("00:00"),this.endTime=g("23:59"),this.filterData=new H,q(()=>{this.reset()&&this.resetFilter()},{allowSignalWrites:!0})}resetFilter(){this.selectedChannelId.update(()=>null),this.startDate.update(()=>null),this.endDate.update(()=>null),this.startTime.update(()=>null),this.endTime.update(()=>null),this.downloadType.update(()=>!1),this.selectedChannel.update(()=>null),this.showTimePicker.update(()=>!1),this.channelDetail$=null}onSelectChannel(){this.selectedChannel.update(()=>this.channelOptions().find(t=>t.ID===this.selectedChannelId())),this.selectedChannel()?this.channelDetail$=this.downloadService.gerChannelDetailById(this.selectedChannelId()).pipe(K(t=>t?.Model),Y(1)):this.channelDetail$=null,this.emitFilterData()}onFilterDateChange(){let t=1;this.startDate()&&this.endDate()&&(t=D.getDaysDiff(this.startDate(),this.endDate())),this.showTimePicker.update(()=>t==0),this.emitFilterData()}onDownloadTypeChange(){this.emitFilterData()}onStartTimeChange(){this.emitFilterData()}onEndTimeChange(){this.emitFilterData()}emitFilterData(){this.filterData.emit({channelId:this.selectedChannelId(),startDate:this.startDate(),endDate:this.endDate(),downloadType:this.downloadType(),startTime:this.startTime(),endTime:this.endTime()})}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["filter-step"]],inputs:{reset:[1,"reset"]},outputs:{filterData:"onFilterChange"},standalone:!0,features:[Q([z]),O],decls:27,vars:11,consts:[["picker",""],[1,"row","pt-2",2,"width","63%","margin-right","40px"],[1,"col-12"],[1,"row"],[1,"col-6"],[1,"text-muted"],["appendTo","body","placeholder","Select Channel",3,"ngModelChange","clearable","ngModel"],[3,"value",4,"ngFor","ngForOf"],[1,"row","mt-6"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"mt-8"],[3,"value"],[2,"width","18px","margin-right","10px",3,"src"],[1,"form-label-group","radio","download-type",2,"margin-bottom","0px"],["name","dowloadType",3,"ngModelChange","ngModel"],["matTooltip","Download from Create sales order until create logistics status",1,"me-5",3,"value"],["matTooltip","Download only Payment and write off",1,"me-5",3,"value"],[1,"d-flex","border","mb-4","pt-6","px-6","mt-3",2,"background","#1f87ac0a","border-radius","5px"],[1,"me-3","pt-1"],[1,"fa","fa-lightbulb","fs-5"],[1,"mb-6"],[1,"fw-bold"],[3,"timeChange","time"],[1,"mx-4"]],template:function(n,i){if(n&1){let d=x();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"h5"),p(5,"Select a Channel"),a(),r(6,"p",5),p(7,"Select Channel want to download order"),a()(),r(8,"div",4)(9,"ng-select",6),M("ngModelChange",function(_){return c(d),I(i.selectedChannelId,_)||(i.selectedChannelId=_),u(_)}),S("ngModelChange",function(){return c(d),u(i.onSelectChannel())}),w(10,at,3,3,"ng-option",7),a()()(),w(11,rt,19,3,"div",8),L(12,"async"),r(13,"div",8)(14,"div",4)(15,"h5"),p(16,"Date Range"),a(),w(17,ot,5,0,"p",5)(18,lt,2,0,"p",5),a(),r(19,"div",4)(20,"div",2)(21,"mat-date-range-input",9)(22,"input",10),M("ngModelChange",function(_){return c(d),I(i.startDate,_)||(i.startDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())}),a(),r(23,"input",11),M("ngModelChange",function(_){return c(d),I(i.endDate,_)||(i.endDate=_),u(_)}),S("click",function(){c(d);let _=b(25);return u(_.open())})("ngModelChange",function(){return c(d),u(i.onFilterDateChange())}),a()(),C(24,"mat-date-range-picker",null,0),a(),w(26,st,5,2,"div",12),a()()()()}if(n&2){let d,f,_=b(25);l(9),m("clearable",!1),P("ngModel",i.selectedChannelId),l(),m("ngForOf",i.channelOptions()),l(),E((d=U(12,9,i.channelDetail$))!=null&&d.ServiceFeeWriteOff&&((d=i.selectedChannel())==null?null:d.TypeID)==i.channelType.Tokopedia?11:-1),l(6),E(i.downloadType()&&((f=i.selectedChannel())==null?null:f.TypeID)==i.channelType.Tokopedia?17:18),l(4),m("rangePicker",_),l(),P("ngModel",i.startDate),l(),P("ngModel",i.endDate),l(3),E(i.showTimePicker()?26:-1)}},dependencies:[k,A,X,Ie,Pe,Ee,We,ke,Ne,De,ve,ye,xe,Je,$e,Ae,ze,Le,Be],styles:[".vertical-radio[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin:15px 0}.mt-1rem[_ngcontent-%COMP%]{margin-top:1rem}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}.form-label-group.radio.download-type[_ngcontent-%COMP%]{height:45.5938px!important;border-radius:.375rem!important}"]});let e=o;return e})();var T=function(e){return e.ALL="all",e.SYNC="sync",e.WRONG="wrong",e.UNSYNC="unsync",e}(T||{});var pt=(e,o)=>({"over-due-today":e,"over-due":o});function dt(e,o){if(e&1&&(r(0,"th",21),p(1),a()),e&2){let s=h();l(),v(" ",s.selectedChannel()?"Created Date":"Last Status Update"," ")}}function mt(e,o){if(e&1&&(r(0,"td"),p(1),L(2,"date"),a()),e&2){let s=h().$implicit;l(),v(" ",we(2,1,s.Modified,"dd MMM yyyy HH:mm:ss")," ")}}function ct(e,o){if(e&1&&(r(0,"span"),p(1),a()),e&2){let s=h().$implicit;l(),v(" ",s.ActionString," ")}}function ut(e,o){if(e&1&&(r(0,"li"),p(1),a()),e&2){let s=o.$implicit;l(),v(" ",s," ")}}function ht(e,o){if(e&1&&(r(0,"ul",27),w(1,ut,2,1,"li",22),a()),e&2){let s=h().$implicit;l(),m("ngForOf",s.ActionString)}}function ft(e,o){if(e&1&&(r(0,"span",28),C(1,"i",29),a()),e&2){let s=h().$implicit;ce("title","Delivery : ",s.DeliveryState,`
2
2
  Payment : `,s.PaymentState,"")}}function _t(e,o){if(e&1&&(r(0,"tr")(1,"td"),p(2),a(),r(3,"td"),p(4),a(),w(5,mt,3,4,"td",23),r(6,"td")(7,"span"),p(8),a(),p(9),a(),r(10,"td",24)(11,"span"),p(12),a(),p(13),a(),r(14,"td"),w(15,ct,2,1,"span",23)(16,ht,2,1,"ul",25),a(),r(17,"td"),w(18,ft,2,3,"span",26),a()()),e&2){let s,t=o.$implicit,n=o.index,i=h(2);l(2),F(n+1),l(2),F(t.Number),l(),m("ngIf",((s=i.selectedChannel())==null?null:s.TypeID)!=i.channelType.Shopee&&((s=i.selectedChannel())==null?null:s.TypeID)!==i.channelType.Tiktok),l(3),v("",t.ChannelStatus," - "),l(),v("",t.ChannelStatusDescription," "),l(),m("ngClass",ge(12,pt,(t==null?null:t.Action)==i.actionPreviewOrder.Update,(t==null?null:t.Action)==i.actionPreviewOrder.New))("matTooltip",t.POSStatus==91||t.POSStatusDescription=="Conflict"?"There is a missed status at POS, usually fulfillment has not been recorded but the payment has been recorded":""),l(2),v("",t.POSStatus," - "),l(),v("",t.POSStatusDescription," "),l(2),m("ngIf",t.ActionString.length==1),l(),m("ngIf",t.ActionString.length>1),l(2),m("ngIf",t.ChannelStatus!=99&&t.POSStatus!=99)}}function gt(e,o){if(e&1&&(W(0),w(1,_t,19,15,"tr",22),R()),e&2){let s=h();l(),m("ngForOf",s.displayPreviewData())}}function wt(e,o){e&1&&(r(0,"tr",30)(1,"td",31)(2,"div",32),C(3,"i",33),a(),r(4,"h4",34),p(5," There is no order to processed "),a()()())}var Ze=(()=>{let o=class o{constructor(){this.orderPreview=N(),this.selectedChannel=N(),this.channelType=ee,this.allData=g(0),this.syncData=g(0),this.wrongData=g(0),this.unsyncData=g(0),this.pillStatus=g(T.ALL),this.actionPreviewOrder=j,this.previewStatus=T,this.displayPreviewData=g([]),this.exportOrders=new H,q(()=>{this.orderPreview()&&(this.filterPreviewData(T.ALL),this.initLengthStatusData())},{allowSignalWrites:!0})}filterPreviewData(t){this.pillStatus.update(()=>t),this.displayPreviewData.update(()=>this.filterDataByStatus(t))}initLengthStatusData(){this.wrongData.update(()=>this.filterDataByStatus(T.WRONG).length),this.syncData.update(()=>this.filterDataByStatus(T.SYNC).length),this.allData.update(()=>this.orderPreview().length),this.unsyncData.update(()=>this.filterDataByStatus(T.UNSYNC).length)}filterDataByStatus(t){let n=[];switch(t){case T.ALL:n=this.orderPreview();break;case T.SYNC:n=this.orderPreview().filter(i=>i.Action==j.DoNothing);break;case T.WRONG:n=this.orderPreview().filter(i=>i.Action==j.Update);break;case T.UNSYNC:n=this.orderPreview().filter(i=>i.Action==j.New);break}return n}onExportOrders(){this.exportOrders.emit()}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["preview-step"]],inputs:{orderPreview:[1,"orderPreview"],selectedChannel:[1,"selectedChannel"]},outputs:{exportOrders:"onExportOrders"},standalone:!0,features:[O],decls:41,vars:11,consts:[["EMPTY",""],[1,"row","pt-2"],[1,"col-md-12"],[1,"row","mx-1","mb-5"],[1,"col-12","d-flex","justify-content-between","align-items-end",2,"padding-left","0px","padding-right","0px"],[1,"nav","nav-pills"],[1,"nav-item","me-3"],[1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],[1,"nav-item","mx-3"],["matTooltip","All Invoice which is already available in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices that have different status between marketplace and POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["matTooltip","Invoices which is not exist in POS",1,"btn","btn-sm","rounded-pill",3,"click","ngClass"],["type","button",1,"btn","btn-outline-secondary",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"table"],[1,"thead-light"],["width","1%"],["width","25%"],["width","15%",4,"ngIf"],["width","10%"],[4,"ngIf","ngIfElse"],["width","15%"],[4,"ngFor","ngForOf"],[4,"ngIf"],["matTooltipClass","custom-width-tooltip",3,"ngClass","matTooltip"],["class","ps-5",4,"ngIf"],[3,"title",4,"ngIf"],[1,"ps-5"],[3,"title"],[1,"fas","fa-info-circle","ms-2"],[1,"text-center"],["colspan","10",1,"border-0"],[2,"margin-top","16vh"],[1,"far","fa-file","text-secondary",2,"font-size","95px"],[1,"text-secondary","mt-6"]],template:function(n,i){if(n&1){let d=x();r(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div")(5,"ul",5)(6,"li",6)(7,"button",7),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.ALL))}),p(8),a()(),r(9,"li",8)(10,"button",9),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.SYNC))}),p(11),a()(),r(12,"li",8)(13,"button",10),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.WRONG))}),p(14),a()(),r(15,"li",8)(16,"button",11),S("click",function(){return c(d),u(i.filterPreviewData(i.previewStatus.UNSYNC))}),p(17),a()()()(),r(18,"div")(19,"button",12),S("click",function(){return c(d),u(i.onExportOrders())}),C(20,"i",13),r(21,"span"),p(22,"Export"),a()()()()(),r(23,"table",14)(24,"thead",15)(25,"tr"),C(26,"th",16),r(27,"th",17),p(28,"Number"),a(),w(29,dt,2,1,"th",18),r(30,"th",19),p(31,"Channel Status"),a(),r(32,"th",19),p(33,"POS Status"),a(),r(34,"th"),p(35,"Action"),a(),C(36,"th",16),a()(),r(37,"tbody"),w(38,gt,2,1,"ng-container",20)(39,wt,6,0,"ng-template",null,0,J),a()()()()}if(n&2){let d,f,_=b(40);l(7),m("ngClass",i.pillStatus()=="all"?"btn-secondary text-white":"btn-outline-dark"),l(),v(" All (",i.allData(),") "),l(2),m("ngClass",i.pillStatus()=="sync"?"btn-success":"btn-outline-success"),l(),v(" Existing (",i.syncData(),") "),l(2),m("ngClass",i.pillStatus()=="wrong"?"btn-warning text-white":"btn-outline-warning"),l(),v(" Wrong Status (",i.wrongData(),") "),l(2),m("ngClass",i.pillStatus()=="unsync"?"btn-danger":"btn-outline-danger"),l(),v(" Missing (",i.unsyncData(),") "),l(12),m("ngIf",((d=i.selectedChannel())==null?null:d.TypeID)!=i.channelType.Shopee&&((d=i.selectedChannel())==null?null:d.TypeID)!==i.channelType.Tiktok),l(9),m("ngIf",((f=i.displayPreviewData())==null?null:f.length)>0)("ngIfElse",_)}},dependencies:[k,B,A,$,Z,Ve,Me]});let e=o;return e})();var St=["stepper"];function Ct(e,o){e&1&&(r(0,"a",2),p(1," Download V1 "),a())}function vt(e,o){if(e&1){let s=x();r(0,"div",3)(1,"button",20),S("click",function(){c(s);let n=h();return u(n.onStepperBack())}),p(2," Back "),a(),r(3,"button",21),S("click",function(){c(s);let n=h();return u(n.onNextStep())}),p(4," Next "),a()()}if(e&2){let s=h();l(3),m("disabled",s.disabledNextFilter())}}function yt(e,o){if(e&1){let s=x();r(0,"button",22),S("click",function(){c(s);let n=h();return u(n.onNextStep())}),p(1," Next "),a()}if(e&2){let s=h();m("disabled",s.disabledNextFilter())}}function xt(e,o){if(e&1){let s=x();r(0,"button",23),S("click",function(){c(s);let n=h();return u(n.onNewDownload())}),C(1,"i",24),p(2," New "),a()}}function Dt(e,o){e&1&&(C(0,"i",25),r(1,"span"),p(2,"Filter"),a())}function Tt(e,o){e&1&&(C(0,"i",26),r(1,"span"),p(2,"Preview"),a())}function bt(e,o){if(e&1){let s=x();W(0),r(1,"preview-step",27),S("onExportOrders",function(){c(s);let n=h();return u(n.onExportOrders())}),a(),R()}if(e&2){let s=o.ngIf;l(),m("orderPreview",s)}}function Et(e,o){e&1&&(C(0,"i",28),r(1,"span"),p(2,"Finish"),a())}function Pt(e,o){if(e&1&&(W(0),C(1,"complete-step",29),R()),e&2){let s=o.ngIf;l(),m("downloadResult",s)}}function It(e,o){e&1&&(r(0,"h6"),p(1,"1"),a())}function Mt(e,o){e&1&&(r(0,"h6"),p(1,"2"),a())}function Vt(e,o){e&1&&(r(0,"h6"),p(1,"3"),a())}var Yi=(()=>{let o=class o{constructor(){this.downloadService=y(z),this.orderService=y(Qe),this.productService=y(Re),this.authService=y(ie),this.stepperSelectedIndex=g(0),this.disabledNextFilter=g(!0),this.isResetFilter=g(!1),this.pageTitle=g("Download to POS"),this.cacheKey=g(D.GuidEMpty)}onFilterChange(t){this.filter=t,this.validateDisabledNext()}validateDisabledNext(){this.disabledNextFilter.update(()=>D.IsEmpty(this.filter?.channelId)||!D.isValidDate(this.filter.startDate)||!D.isValidDate(this.filter.endDate))}onNextStep(){switch(this.stepper.selectedIndex){case 0:this.onPreview();let t=this.productService.findChannelById(this.filter.channelId,this.authService.getChannels());this.setPageTitle(`Preview ${t?.Name}`);break;case 1:this.onDownload(),this.setPageTitle("Download");break}}onStepperNext(){this.stepper.selected.completed=!0,this.stepper.next()}onPreview(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,IsDisbursement:this.filter.downloadType};D.IsNotEmpty(this.filter.startTime)&&(t=oe(re({},t),{TimeFrom:this.filter.startTime+":00",TimeTo:this.filter.endTime+":00"})),this.orderPreview$=this.downloadService.onPreviewOrder(t).pipe(G(n=>{n.Data?.length>0&&(this.cacheKey.update(()=>n.CacheKey),this.onStepperNext())}),K(n=>n.Data),Y(1))}onExportOrders(){let t={ID:this.filter.channelId,From:this.filter.startDate?JSON.stringify(this.filter.startDate):null,To:this.filter.endDate?JSON.stringify(this.filter.endDate):null},n=`Orders ${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)}`;this.orderService.exportOrders(t,n).subscribe()}onDownload(){let t={ID:this.filter.channelId,From:this.filter.startDate,To:this.filter.endDate,ListPreview:[],IsDisbursement:this.filter.downloadType,CacheKey:this.cacheKey()};this.downloadPreview$=this.orderPreview$.pipe(se(n=>(t.ListPreview=n,this.downloadService.getDownloadOrder(t))),G(()=>{this.onStepperNext()}),Y(1))}setPageTitle(t){this.pageTitle.update(()=>`
3
3
  ${t} (${this.downloadService.getDateTitle(this.filter.startDate,this.filter.endDate)})
4
4
  `)}onStepperBack(){this.stepper.previous(),this.pageTitle.update(()=>"Download to POS")}onNewDownload(){this.isResetFilter.update(()=>!0),this.stepper.reset(),this.stepperSelectedIndex.update(()=>0),this.orderPreview$=null,this.downloadPreview$=null,this.pageTitle.update(()=>"Download to POS")}};o.\u0275fac=function(n){return new(n||o)},o.\u0275cmp=V({type:o,selectors:[["app-download-v2"]],viewQuery:function(n,i){if(n&1&&ue(St,5),n&2){let d;he(d=fe())&&(i.stepper=d.first)}},standalone:!0,features:[Q([z,{provide:Ye,useValue:{displayDefaultIndicatorType:!1}}]),O],decls:27,vars:21,consts:[["stepper",""],[3,"hideSearchBox","hideSearchDropdown","headerTitle","description"],["routerLink","/menu/Order/Download/V1",1,"btn","btn-outline-secondary","btn-fill","me-3"],[1,"btn-group","me-3"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"disabled"],[1,"btn","btn-outline-secondary","btn-fill"],[1,"container-fluid","pt-5","mt-5"],[1,"row"],[1,"col-12"],[1,"d-flex","justify-content-center"],["linear","",1,"w-100","stepper-download",3,"selectedIndexChange","ngClass","selectedIndex"],["state","filter",3,"completed","editable"],["matStepLabel",""],[1,"w-100",3,"onFilterChange","reset"],["state","preview",3,"editable","completed"],[4,"ngIf"],["state","finish"],["matStepperIcon","filter"],["matStepperIcon","preview"],["matStepperIcon","finish"],[1,"btn","btn-outline-secondary",3,"click"],["type","button",1,"btn","btn-outline-secondary","bg-success","text-white",3,"click","disabled"],["type","button",1,"btn","btn-outline-secondary","btn-fill","me-3","bg-success","text-white",3,"click","disabled"],[1,"btn","btn-outline-secondary","btn-fill",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],[1,"fa-solid","fa-filter","me-3"],[1,"fa-solid","fa-file","me-3"],[3,"onExportOrders","orderPreview"],[1,"fa-solid","fa-flag","me-3"],[3,"downloadResult"]],template:function(n,i){if(n&1){let d=x();r(0,"mainpanel",1)(1,"actions"),w(2,Ct,2,0,"a",2)(3,vt,5,1,"div",3)(4,yt,2,1,"button",4)(5,xt,3,0,"button",5),a(),r(6,"content")(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"mat-stepper",10,0),M("selectedIndexChange",function(_){return c(d),I(i.stepperSelectedIndex,_)||(i.stepperSelectedIndex=_),u(_)}),r(13,"mat-step",11),w(14,Dt,3,0,"ng-template",12),r(15,"filter-step",13),S("onFilterChange",function(_){return c(d),u(i.onFilterChange(_))}),a()(),r(16,"mat-step",14),w(17,Tt,3,0,"ng-template",12)(18,bt,2,1,"ng-container",15),L(19,"async"),a(),r(20,"mat-step",16),w(21,Et,3,0,"ng-template",12)(22,Pt,2,1,"ng-container",15),L(23,"async"),a(),w(24,It,2,0,"ng-template",17)(25,Mt,2,0,"ng-template",18)(26,Vt,2,0,"ng-template",19),a()()()()()()()}if(n&2){let d=b(12);m("hideSearchBox",!0)("hideSearchDropdown",!0)("headerTitle",i.pageTitle())("description",i.pageTitle()),l(2),E(i.stepperSelectedIndex()==0?2:-1),l(),E(i.stepperSelectedIndex()==1?3:-1),l(),E(i.stepperSelectedIndex()==0?4:-1),l(),E(i.stepperSelectedIndex()==2?5:-1),l(6),me("ngClass","last-edited-step-"+d.selectedIndex),P("selectedIndex",i.stepperSelectedIndex),l(2),m("completed",!1)("editable",i.stepperSelectedIndex()!=2),l(2),m("reset",i.isResetFilter()),l(),m("editable",i.stepperSelectedIndex()!=2)("completed",!1),l(2),m("ngIf",U(19,17,i.orderPreview$)),l(4),m("ngIf",U(23,19,i.downloadPreview$))}},dependencies:[k,B,$,X,qe,Xe,Ze,He,je,Ge,Ke,Ue,Oe,Fe,Ce,Se],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.vertical-radio{display:flex;flex-direction:column;margin:15px 0}.mt-1rem{margin-top:1rem}.dateRange{padding-top:.8rem;padding-bottom:.8rem}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container>div.mat-horizontal-stepper-content:nth-child(1){display:flex;justify-content:left}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-content-container{margin-top:30px}mat-stepper.stepper-download>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container>mat-step-header.mat-horizontal-stepper-header{pointer-events:none!important}.form-label-group.radio.download-type{height:45.5938px!important;border-radius:.375rem!important}
@@ -1 +1 @@
1
- import{a as v,b}from"./chunk-X2TVRY2Z.js";import{a as r}from"./chunk-7CGLVYCD.js";import"./chunk-QGAR7VQ4.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import"./chunk-47DMD3UG.js";import{n as h,r as i}from"./chunk-OVEJFFL6.js";import{Cd as o,Gb as u,Sb as d,Tb as C,Ub as a,jb as s,ka as l,ta as m,ua as c,vc as f}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var T=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-price"]],standalone:!0,features:[f],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),C()()(),a(4,"router-outlet")),n&2&&(s(3),u("Tabs",g.priceTabs))},dependencies:[o,b,v,i,h],encapsulation:2});let t=e;return t})();var P=[{path:"",component:T,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-KR3QY42G.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-7YB72345.js").then(t=>t.CustomChannelPriceComponent)},canActivate:[r],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-YVF7TRTO.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],D=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=l({imports:[o,i.forChild(P)]});let t=e;return t})();export{D as PriceRoutingModule};
1
+ import{a as v,b}from"./chunk-X2TVRY2Z.js";import{a as r}from"./chunk-TTLK2HTY.js";import"./chunk-GUYZJ4TX.js";import"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import"./chunk-47DMD3UG.js";import{n as h,r as i}from"./chunk-OVEJFFL6.js";import{Cd as o,Gb as u,Sb as d,Tb as C,Ub as a,jb as s,ka as l,ta as m,ua as c,vc as f}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var T=(()=>{let e=class e{constructor(){this.priceTabs=[{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Custom Channel Price",Url:"/menu/price/OutletPrice"}]}};e.\u0275fac=function(n){return new(n||e)},e.\u0275cmp=m({type:e,selectors:[["app-price"]],standalone:!0,features:[f],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,g){n&1&&(d(0,"nav",0)(1,"div",1)(2,"div"),a(3,"nav-tab",2),C()()(),a(4,"router-outlet")),n&2&&(s(3),u("Tabs",g.priceTabs))},dependencies:[o,b,v,i,h],encapsulation:2});let t=e;return t})();var P=[{path:"",component:T,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-TVJVDA5Y.js").then(t=>t.PricePosChannelComponent)},canActivate:[r],data:{title:"Global Price Comparison"}},{path:"OutletPrice",loadComponent(){return import("./chunk-HKDNDD2G.js").then(t=>t.CustomChannelPriceComponent)},canActivate:[r],data:{title:"Outlet Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-ZYFF443B.js").then(t=>t.PriceSingleChannelComponent)},canActivate:[r],data:{title:"Price Single Channel Comparison"}}]}],D=(()=>{let e=class e{};e.\u0275fac=function(n){return new(n||e)},e.\u0275mod=c({type:e}),e.\u0275inj=l({imports:[o,i.forChild(P)]});let t=e;return t})();export{D as PriceRoutingModule};
@@ -1 +1 @@
1
- import{a as he}from"./chunk-3LR4RLA6.js";import"./chunk-O4CRP4WO.js";import{a as ce}from"./chunk-TQFRU756.js";import{a as se}from"./chunk-7LZ5ZSXM.js";import{a as N}from"./chunk-XHAXYWZ7.js";import{b as pe,c as V}from"./chunk-7XUSMPAA.js";import"./chunk-BVIRHZTZ.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-IJYSJN63.js";import"./chunk-X5Q6FPWS.js";import"./chunk-46AOM3SM.js";import"./chunk-JXTGH22T.js";import"./chunk-OULUJ2IO.js";import"./chunk-GCKSYCMI.js";import{a as le}from"./chunk-ZQWAIH5X.js";import"./chunk-ADRVUMMW.js";import"./chunk-LUY3WZJE.js";import"./chunk-HCDKYABV.js";import{j as M}from"./chunk-QGAR7VQ4.js";import{b as te,e as ne}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as ie,l as ae,m as oe,n as re}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as q,h as X,m as Y,o as Z,y as ee}from"./chunk-BSN7ZAXG.js";import{c as f}from"./chunk-47DMD3UG.js";import"./chunk-OVEJFFL6.js";import{$b as C,Cd as K,Da as P,Ea as w,Eb as _,G as B,Gb as d,Gc as y,Hc as b,Sb as c,Tb as p,Ub as U,Vb as G,Wb as W,Xb as H,Yb as F,bc as g,ea as k,ja as j,jb as h,kb as u,nc as v,pa as I,rc as L,sc as T,ta as A,tc as E,uc as z,vc as $,vd as Q,xb as D,yd as J}from"./chunk-PQDPS2ID.js";import{a as R,b as x}from"./chunk-GNOSNGXM.js";var O=(()=>{let r=class r{constructor(){this.authService=I(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(o=>{a=e.find(s=>s.ID==o?.parent?.id),a&&(a=x(R({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=e.find(s=>s.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(o=>o.id),n=t.filter(o=>f.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,s,S)=>S.indexOf(o)===s)):(e=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,s,S)=>S.indexOf(o)===s),{locationIds:e,channelIds:a}}};r.\u0275fac=function(i){return new(i||r)},r.\u0275prov=j({token:r,factory:r.\u0275fac});let l=r;return l})();function me(l,r){if(l&1){let m=F();c(0,"button",15),C("click",function(){P(m);let i=g().ngIf,e=g();return w(e.onUpdateItems(i))}),U(1,"i",16),v(2," Update "),p()}}function ue(l,r){if(l&1&&(c(0,"actions")(1,"div",13),_(2,me,3,0,"button",14),p()()),l&2){let m=r.ngIf,t=g();h(2),d("ngIf",t.productService.hasSelectionVariant(m))}}function ge(l,r){l&1&&H(0)}function Ce(l,r){if(l&1){let m=F();G(0),c(1,"app-table",17),C("onToggle",function(i){P(m);let e=g();return w(e.onShowDifferenceStock(i))})("onSubmit",function(i){P(m);let e=g();return w(e.updateStockByVariant(i))}),p(),W()}if(l&2){let m=r.ngIf,t=g();h(),d("data",m)("channel",t.channels())("showProductToggle",!0)("hiddenIPOSInventory",t.searchFilter.HiddenIPOSInventory)}}var Qe=(()=>{let r=class r{constructor(t,i,e,n,a,o){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=I(V),this.multiChannelService=I(O),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=D([]),this.selectedChannels=D([]),this.channels=D([]),this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:N.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>f.isValidGUID(n.id)==!1),e=t.filter(n=>f.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(s=>{s.Channel?.forEach(S=>{n.push({ID:s.ID,Code:s.Code,Inventory:s.Inventory,LocationID:S.LocationID})})});let o={ListChannelID:i.filter(s=>s.selected).map(s=>s.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",o).subscribe(s=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(se,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(B(n=>f.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}};r.\u0275fac=function(i){return new(i||r)(u(ne),u(te),u(ie),u(le),u(M),u(ae))},r.\u0275cmp=A({type:r,selectors:[["app-multi-channel-comparison"]],standalone:!0,features:[z([V,O]),$],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(c(0,"mainpanel",0),C("onSubmit",function(a){return e.onSearch(a)}),_(1,ue,3,1,"actions",1),y(2,"async"),c(3,"filters"),_(4,ge,1,0,"ng-container",1),y(5,"async"),c(6,"div")(7,"label",2),v(8,"Channel"),p(),c(9,"multiwarehouse-tree-select",3),C("onChannelChange",function(a){return e.onChannelChange(a)}),p()(),c(10,"div",4)(11,"label",5),v(12,"PageNumber"),p(),c(13,"input",6),E("ngModelChange",function(a){return T(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),p()(),c(14,"div",4)(15,"label",7),v(16,"Page Size"),p(),c(17,"input",8),E("ngModelChange",function(a){return T(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),p()()(),c(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),_(22,Ce,2,4,"ng-container",1),y(23,"async"),c(24,"infinite-paginator",12),y(25,"async"),C("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),p()()()()()()),i&2&&(d("pageData",e.pageData)("hideSearchBox",!1),h(),d("ngIf",b(2,14,e.paginationService.data$)),h(3),d("ngIf",b(5,16,e.loader$)),h(5),d("multiple",!0),h(4),L("ngModel",e.searchFilter.PageNumber),h(4),L("ngModel",e.searchFilter.RowCount),h(5),d("ngIf",b(23,18,e.paginationService.data$)),h(2),d("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",b(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[K,Q,J,re,oe,ce,ee,q,Z,X,Y,pe,he],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let l=r;return l})();export{Qe as MultiChannelComparison};
1
+ import{a as he}from"./chunk-3LR4RLA6.js";import"./chunk-O4CRP4WO.js";import{a as ce}from"./chunk-CGF5H6YA.js";import{a as se}from"./chunk-7LZ5ZSXM.js";import{a as N}from"./chunk-XHAXYWZ7.js";import{b as pe,c as V}from"./chunk-7XUSMPAA.js";import"./chunk-BVIRHZTZ.js";import"./chunk-N6IHFFFZ.js";import"./chunk-PD4CUVAW.js";import"./chunk-IJYSJN63.js";import"./chunk-X5Q6FPWS.js";import"./chunk-46AOM3SM.js";import"./chunk-JXTGH22T.js";import"./chunk-OULUJ2IO.js";import"./chunk-GCKSYCMI.js";import{a as le}from"./chunk-ZQWAIH5X.js";import"./chunk-ADRVUMMW.js";import"./chunk-LUY3WZJE.js";import"./chunk-HCDKYABV.js";import{j as M}from"./chunk-GUYZJ4TX.js";import{b as te,e as ne}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{d as ie,l as ae,m as oe,n as re}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as q,h as X,m as Y,o as Z,y as ee}from"./chunk-BSN7ZAXG.js";import{c as f}from"./chunk-47DMD3UG.js";import"./chunk-OVEJFFL6.js";import{$b as C,Cd as K,Da as P,Ea as w,Eb as _,G as B,Gb as d,Gc as y,Hc as b,Sb as c,Tb as p,Ub as U,Vb as G,Wb as W,Xb as H,Yb as F,bc as g,ea as k,ja as j,jb as h,kb as u,nc as v,pa as I,rc as L,sc as T,ta as A,tc as E,uc as z,vc as $,vd as Q,xb as D,yd as J}from"./chunk-PQDPS2ID.js";import{a as R,b as x}from"./chunk-GNOSNGXM.js";var O=(()=>{let r=class r{constructor(){this.authService=I(M),this.channelOptions=this.authService.getChannels()}filterSelectedChannels(t,i){let e=Object.assign([],this.channelOptions),n=[],a;return t.forEach(o=>{a=e.find(s=>s.ID==o?.parent?.id),a&&(a=x(R({},a),{Name:`${o?.parent?.label} - ${o?.label}`,LocationID:o?.id}),n.push(a))}),i.forEach(o=>{a=e.find(s=>s.ID==o.id),a&&n.push(a)}),n}generateFilterLocation(t,i){let e=[],n=[],a=[];return t.length>0?(e=t.map(o=>o.id),n=t.filter(o=>f.IsNotEmpty(o?.parent?.id)).map(o=>o?.parent?.id).filter((o,s,S)=>S.indexOf(o)===s)):(e=[],n=[]),a=i.map(o=>o.id),a=a.concat(n).filter((o,s,S)=>S.indexOf(o)===s),{locationIds:e,channelIds:a}}};r.\u0275fac=function(i){return new(i||r)},r.\u0275prov=j({token:r,factory:r.\u0275fac});let l=r;return l})();function me(l,r){if(l&1){let m=F();c(0,"button",15),C("click",function(){P(m);let i=g().ngIf,e=g();return w(e.onUpdateItems(i))}),U(1,"i",16),v(2," Update "),p()}}function ue(l,r){if(l&1&&(c(0,"actions")(1,"div",13),_(2,me,3,0,"button",14),p()()),l&2){let m=r.ngIf,t=g();h(2),d("ngIf",t.productService.hasSelectionVariant(m))}}function ge(l,r){l&1&&H(0)}function Ce(l,r){if(l&1){let m=F();G(0),c(1,"app-table",17),C("onToggle",function(i){P(m);let e=g();return w(e.onShowDifferenceStock(i))})("onSubmit",function(i){P(m);let e=g();return w(e.updateStockByVariant(i))}),p(),W()}if(l&2){let m=r.ngIf,t=g();h(),d("data",m)("channel",t.channels())("showProductToggle",!0)("hiddenIPOSInventory",t.searchFilter.HiddenIPOSInventory)}}var Qe=(()=>{let r=class r{constructor(t,i,e,n,a,o){this.http=t,this.toastr=i,this.dialog=e,this.productService=n,this.authService=a,this.mainPanelService=o,this.paginationService=I(V),this.multiChannelService=I(O),this.searchFilter={PageNumber:1,RowCount:100},this.loaderEndpoint="InventoryLoader/GetMultipleInventoryComparison",this.dataEndpoint="Inventory/GetMultipleChannelComparison",this.allDataCountEndpoint="Inventory/GetMultipleChannelComparisonRowCount",this.selectedLocations=D([]),this.selectedChannels=D([]),this.channels=D([]),this.pageData={Title:"Inventory",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory/pos",Active:!0},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!1}]},this.channelOptions=this.authService.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.paginationService.fetchDataEndpoint=this.dataEndpoint,this.paginationService.fethRowCountEndpoint=this.allDataCountEndpoint,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`,{}).pipe(k(t=>{t.Filter={PageNumber:t.Filter.PageNumber,filterModel:N.ALL,RowCount:t.Filter.PageSize,HiddenIPOSInventory:t.Filter.HiddenIPOSInventory},this.searchFilter=t.Filter,this.mainPanelService.openModalFilter()}))}onChannelChange(t=[]){let i=t.filter(n=>f.isValidGUID(n.id)==!1),e=t.filter(n=>f.isValidGUID(n.id));this.selectedLocations.set(i),this.selectedChannels.set(e)}onSearch(t){let i=this.multiChannelService.filterSelectedChannels(this.selectedLocations(),this.selectedChannels());this.channels.set(i);let e=this.multiChannelService.generateFilterLocation(this.selectedLocations(),this.selectedChannels());this.searchFilter.ListChannelID=e.channelIds,this.searchFilter.ListLocationID=e.locationIds,this.searchFilter.text=t,this.paginationService.reloadPagination(this.searchFilter)}updateStock(t,i){let e=this.productService.selectedVariantProduct(t);if(e.length>0){let n=[];e.forEach(s=>{s.Channel?.forEach(S=>{n.push({ID:s.ID,Code:s.Code,Inventory:s.Inventory,LocationID:S.LocationID})})});let o={ListChannelID:i.filter(s=>s.selected).map(s=>s.ID),List:n};this.http.post("/api/Inventory/UpdateChannel",o).subscribe(s=>{this.paginationService.reloadPagination(this.searchFilter),this.toastr.success("Successfully updated "+o.List.length+" variants in "+o.ListChannelID.length+" channels","Success")})}}updateStockByVariant(t){let i={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,NewQuantity:parseFloat(t.Inventory),VariantID:t.ID,SKU:t.Sku,LocationID:t.LocationID};this.http.post("/api/Inventory/UpdateQuantityByItem",i).subscribe(e=>{this.paginationService.reloadPagination(this.searchFilter);let n=this.productService.findChannelById(i.ID,this.channelOptions);this.toastr.success("Successfully updated "+t.ItemName+"("+t.VarName+") inventory in "+n.Name+" to "+i.NewQuantity,"Success")})}onShowDifferenceStock(t){t?this.searchFilter.filterModel=N.DIFFERENCE:this.searchFilter.filterModel=N.ALL,this.paginationService.reloadPagination(this.searchFilter)}onUpdateItems(t){let i=this.productService.selectedVariantProduct(t),e=this.channelOptions.filter(n=>this.channels()?.find(a=>a.ID===n.ID));this.dialog.open(se,{data:{selectedItems:i,channels:JSON.parse(JSON.stringify(e))},width:"400px"}).afterClosed().pipe(B(n=>f.IsNotEmpty(n))).subscribe(n=>{this.updateStock(t,n)})}};r.\u0275fac=function(i){return new(i||r)(u(ne),u(te),u(ie),u(le),u(M),u(ae))},r.\u0275cmp=A({type:r,selectors:[["app-multi-channel-comparison"]],standalone:!0,features:[z([V,O]),$],decls:26,vars:22,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","pageData","hideSearchBox"],[4,"ngIf"],["for","selectChannel",1,"fw-bold","mb-3"],["id","selectChannel",3,"onChannelChange","multiple"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"d-flex"],["type","button","class","btn btn-success shadow-sm rounded me-3",3,"click",4,"ngIf"],["type","button",1,"btn","btn-success","shadow-sm","rounded","me-3",3,"click"],[1,"fas","fa-chevron-circle-up"],["table","inventory",3,"onToggle","onSubmit","data","channel","showProductToggle","hiddenIPOSInventory"]],template:function(i,e){i&1&&(c(0,"mainpanel",0),C("onSubmit",function(a){return e.onSearch(a)}),_(1,ue,3,1,"actions",1),y(2,"async"),c(3,"filters"),_(4,ge,1,0,"ng-container",1),y(5,"async"),c(6,"div")(7,"label",2),v(8,"Channel"),p(),c(9,"multiwarehouse-tree-select",3),C("onChannelChange",function(a){return e.onChannelChange(a)}),p()(),c(10,"div",4)(11,"label",5),v(12,"PageNumber"),p(),c(13,"input",6),E("ngModelChange",function(a){return T(e.searchFilter.PageNumber,a)||(e.searchFilter.PageNumber=a),a}),p()(),c(14,"div",4)(15,"label",7),v(16,"Page Size"),p(),c(17,"input",8),E("ngModelChange",function(a){return T(e.searchFilter.RowCount,a)||(e.searchFilter.RowCount=a),a}),p()()(),c(18,"content")(19,"div",9)(20,"div",10)(21,"div",11),_(22,Ce,2,4,"ng-container",1),y(23,"async"),c(24,"infinite-paginator",12),y(25,"async"),C("onNextPage",function(){return e.paginationService.onNextPage(e.searchFilter)})("onLastPage",function(){return e.paginationService.onLastPage(e.searchFilter)})("onGetRowCount",function(){return e.paginationService.getRowCount(e.searchFilter)}),p()()()()()()),i&2&&(d("pageData",e.pageData)("hideSearchBox",!1),h(),d("ngIf",b(2,14,e.paginationService.data$)),h(3),d("ngIf",b(5,16,e.loader$)),h(5),d("multiple",!0),h(4),L("ngModel",e.searchFilter.PageNumber),h(4),L("ngModel",e.searchFilter.RowCount),h(5),d("ngIf",b(23,18,e.paginationService.data$)),h(2),d("totalData",e.paginationService.totalData())("hideCount",e.paginationService.hideCount())("rowCount",b(25,20,e.paginationService.totalRowCount$))("pageNumber",e.paginationService.pageNumber())("disableNextButton",e.paginationService.disableNextButton())("goToLastPage",e.paginationService.isLastPage()))},dependencies:[K,Q,J,re,oe,ce,ee,q,Z,X,Y,pe,he],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let l=r;return l})();export{Qe as MultiChannelComparison};
@@ -1 +1 @@
1
- import{a as B}from"./chunk-T3Z545C5.js";import{a as vt}from"./chunk-7KG3DC5J.js";import{a as $}from"./chunk-YYWSBXIP.js";import{a as st,b as ft,d as ut,e as gt}from"./chunk-CCXKODFV.js";import{j as dt}from"./chunk-QGAR7VQ4.js";import{e as pt}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as k,n as ht}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{h as rt,m as lt,y as mt}from"./chunk-BSN7ZAXG.js";import{c as ct}from"./chunk-47DMD3UG.js";import{m as at,p as F,r as R}from"./chunk-OVEJFFL6.js";import{$b as V,Bd as P,Cd as L,Da as N,Ea as E,Eb as u,Gb as p,Gc as s,Hc as _,Ic as S,Jc as it,Sb as r,Tb as o,Ub as D,Vb as g,Wb as h,Yb as G,Z as j,aa as q,bc as f,ca as U,ec as J,f as z,fb as W,gb as H,jb as m,ka as I,kb as v,mc as K,nc as l,oc as d,pc as x,rc as Q,sc as X,sd as nt,ta as y,tc as Y,ua as b,ud as ot,v as C,vd as T,wc as Z,xc as tt,yc as et,yd as w,zd as M}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Et=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Dt=()=>["/menu/notification/detail"],Tt=t=>({ID:t});function wt(t,e){if(t&1&&(r(0,"span",14),D(1,"img",15),o(),l(2)),t&2){let n=e.item;m(),p("src",n.Img,H)("alt",n.Name),m(),x(" ",n.Name," ")}}function Mt(t,e){if(t&1&&(g(0),l(1),s(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Pt(t,e){t&1&&l(0," - ")}function Lt(t,e){if(t&1&&(g(0),r(1,"tr",16)(2,"td")(3,"a",17),D(4,"img",18),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",19),o(),r(11,"td"),u(12,Mt,5,4,"ng-container",20)(13,Pt,1,0,"ng-template",null,0,it),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),s(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(),p("ngClass",et(14,Et,n.Status==1,n.Status==0)),m(2),p("routerLink",Z(17,Dt))("queryParams",tt(18,Tt,n.ID)),m(),J("src",n.Img,H),m(2),d(n.Name),m(3),d(n.Label),m(),p("innerHTML",n.Message,W),m(2),p("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),d(n.StatusLabel),m(2),d(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Ft(t,e){if(t&1){let n=G();g(0),r(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),s(4,"async"),s(5,"async"),V("total",function(){N(n);let i=f(2);return E(i.getRowCount())})("next",function(){N(n);let i=f(2);return E(i.getNotifications())})("previous",function(){N(n);let i=f(2);return E(i.getNotifications())}),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),p("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Rt(t,e){if(t&1&&(g(0),u(1,Ft,6,8,"ng-container",13),h()),t&2){let n=e.ngIf;m(),p("ngIf",n.length>0)}}var _t=(()=>{let e=class e{constructor(a,i,c){this.http=a,this.notificationService=i,this.authService=c,this.filter=new vt,this.destroy$=new z,this.channelOptions=c.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(U(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=ct.getChannelLogoByTypeId(i.TypeID),i)),a}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(pt),v(B),v(dt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"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,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,c){i&1&&(r(0,"mainpanel",1),V("onSubmit",function(){return c.onFilter()}),r(1,"filters")(2,"div")(3,"h6",2),l(4,"Channel"),o(),r(5,"ng-select",3),Y("ngModelChange",function(O){return X(c.filter.ChannelID,O)||(c.filter.ChannelID=O),O}),u(6,wt,3,3,"ng-template",4),o()()(),r(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Lt,20,20,"ng-container",12),s(27,"async"),o()()()()(),u(28,Rt,2,1,"ng-container",13),s(29,"async"),o()()()),i&2&&(m(5),p("clearable",!0)("items",c.channelOptions),Q("ngModel",c.filter.ChannelID),m(21),p("ngForOf",_(27,5,c.notifications$)),m(2),p("ngIf",_(29,7,c.notifications$)))},dependencies:[nt,ot,T,ut,st,ft,rt,lt,k,F,$,w,P,M]});let t=e;return t})();function Bt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),d(n.Perflog)}}function kt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),d(n==null?null:n.StackTrace)}}function $t(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),s(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),s(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,Bt,10,1,"div",16)(58,kt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(),p("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),d(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),d(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),d(n.Label),m(11),d(n.Message),m(),p("ngIf",n==null?null:n.Perflog),m(),p("ngIf",n==null?null:n.StackTrace)}}var Ct=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(q(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};e.\u0275fac=function(i){return new(i||e)(v(at),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,c){i&1&&(u(0,$t,59,16,"ng-container",0),s(1,"async")),i&2&&p("ngIf",_(1,1,c.notification$))},dependencies:[T,k,F,w,P,M]});let t=e;return t})();var Ot=[{path:"",component:_t},{path:"detail",component:Ct}],St=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,R.forChild(Ot)]});let t=e;return t})();var se=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,St,gt,mt,ht,R,$]});let t=e;return t})();export{se as NotificationModule};
1
+ import{a as B}from"./chunk-O6EVUHF3.js";import{a as vt}from"./chunk-7KG3DC5J.js";import{a as $}from"./chunk-YYWSBXIP.js";import{a as st,b as ft,d as ut,e as gt}from"./chunk-CCXKODFV.js";import{j as dt}from"./chunk-GUYZJ4TX.js";import{e as pt}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as k,n as ht}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{h as rt,m as lt,y as mt}from"./chunk-BSN7ZAXG.js";import{c as ct}from"./chunk-47DMD3UG.js";import{m as at,p as F,r as R}from"./chunk-OVEJFFL6.js";import{$b as V,Bd as P,Cd as L,Da as N,Ea as E,Eb as u,Gb as p,Gc as s,Hc as _,Ic as S,Jc as it,Sb as r,Tb as o,Ub as D,Vb as g,Wb as h,Yb as G,Z as j,aa as q,bc as f,ca as U,ec as J,f as z,fb as W,gb as H,jb as m,ka as I,kb as v,mc as K,nc as l,oc as d,pc as x,rc as Q,sc as X,sd as nt,ta as y,tc as Y,ua as b,ud as ot,v as C,vd as T,wc as Z,xc as tt,yc as et,yd as w,zd as M}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var Et=(t,e)=>({"bg-gradient-danger":t,"bg-gradient-warning":e}),Dt=()=>["/menu/notification/detail"],Tt=t=>({ID:t});function wt(t,e){if(t&1&&(r(0,"span",14),D(1,"img",15),o(),l(2)),t&2){let n=e.item;m(),p("src",n.Img,H)("alt",n.Name),m(),x(" ",n.Name," ")}}function Mt(t,e){if(t&1&&(g(0),l(1),s(2,"number"),r(3,"span"),l(4,"s"),o(),h()),t&2){let n=f().$implicit;m(),x(" ",S(2,1,n.DurationInSecond,"1.1-1")," ")}}function Pt(t,e){t&1&&l(0," - ")}function Lt(t,e){if(t&1&&(g(0),r(1,"tr",16)(2,"td")(3,"a",17),D(4,"img",18),r(5,"span"),l(6),o()()(),r(7,"td")(8,"b"),l(9),o(),D(10,"div",19),o(),r(11,"td"),u(12,Mt,5,4,"ng-container",20)(13,Pt,1,0,"ng-template",null,0,it),o(),r(15,"td"),l(16),o(),r(17,"td"),l(18),s(19,"date"),o()(),h()),t&2){let n=e.$implicit,a=K(14);m(),p("ngClass",et(14,Et,n.Status==1,n.Status==0)),m(2),p("routerLink",Z(17,Dt))("queryParams",tt(18,Tt,n.ID)),m(),J("src",n.Img,H),m(2),d(n.Name),m(3),d(n.Label),m(),p("innerHTML",n.Message,W),m(2),p("ngIf",n.DurationInSecond)("ngIfElse",a),m(4),d(n.StatusLabel),m(2),d(S(19,11,n.Created,"dd MMM yyyy HH:mm"))}}function Ft(t,e){if(t&1){let n=G();g(0),r(1,"div",6)(2,"div",21)(3,"app-custom-paginator",22),s(4,"async"),s(5,"async"),V("total",function(){N(n);let i=f(2);return E(i.getRowCount())})("next",function(){N(n);let i=f(2);return E(i.getNotifications())})("previous",function(){N(n);let i=f(2);return E(i.getNotifications())}),o()()(),h()}if(t&2){let n=f().ngIf,a=f();m(3),p("filter",a.filter)("totaldata",n==null?null:n.length)("paginationTotal",_(4,4,a.rowCount$))("hasClicked",_(5,6,a.rowCount$))}}function Rt(t,e){if(t&1&&(g(0),u(1,Ft,6,8,"ng-container",13),h()),t&2){let n=e.ngIf;m(),p("ngIf",n.length>0)}}var _t=(()=>{let e=class e{constructor(a,i,c){this.http=a,this.notificationService=i,this.authService=c,this.filter=new vt,this.destroy$=new z,this.channelOptions=c.getChannels()}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(U(this.destroy$)).subscribe(a=>{a.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(a=>{this.filter=a.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let a={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",a).pipe(C(i=>i.Data),C(i=>(i=this.setChannelLogoToNotifications(i),i=this.setTimeToSecond(i),i)),j(1))}setTimeToSecond(a){return a=a.map(i=>(i.DurationInSecond=parseInt(i.Duration)/1e3,i)),a}setChannelLogoToNotifications(a){return a=a.map(i=>(i.Img=ct.getChannelLogoByTypeId(i.TypeID),i)),a}getRowCount(){let a={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",a).pipe(C(i=>i.Count),j(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};e.\u0275fac=function(i){return new(i||e)(v(pt),v(B),v(dt))},e.\u0275cmp=y({type:e,selectors:[["app-notification"]],decls:30,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification","hideSearchBox","true",3,"onSubmit"],[1,"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,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[4,"ngIf","ngIfElse"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(i,c){i&1&&(r(0,"mainpanel",1),V("onSubmit",function(){return c.onFilter()}),r(1,"filters")(2,"div")(3,"h6",2),l(4,"Channel"),o(),r(5,"ng-select",3),Y("ngModelChange",function(O){return X(c.filter.ChannelID,O)||(c.filter.ChannelID=O),O}),u(6,wt,3,3,"ng-template",4),o()()(),r(7,"content")(8,"div",5)(9,"div",6)(10,"div",7)(11,"div",8)(12,"table",9)(13,"thead",10)(14,"tr",11)(15,"th"),l(16,"Channel"),o(),r(17,"th"),l(18,"Process"),o(),r(19,"th"),l(20,"Duration"),o(),r(21,"th"),l(22,"Status"),o(),r(23,"th"),l(24,"Created"),o()()(),r(25,"tbody"),u(26,Lt,20,20,"ng-container",12),s(27,"async"),o()()()()(),u(28,Rt,2,1,"ng-container",13),s(29,"async"),o()()()),i&2&&(m(5),p("clearable",!0)("items",c.channelOptions),Q("ngModel",c.filter.ChannelID),m(21),p("ngForOf",_(27,5,c.notifications$)),m(2),p("ngIf",_(29,7,c.notifications$)))},dependencies:[nt,ot,T,ut,st,ft,rt,lt,k,F,$,w,P,M]});let t=e;return t})();function Bt(t,e){if(t&1&&(r(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),l(4,"Perflog"),o()(),r(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),l(9),o()()()()()()),t&2){let n=f().ngIf;m(9),d(n.Perflog)}}function kt(t,e){if(t&1&&(g(0),r(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),l(5,"StackTrace"),o()(),r(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),l(10),o()()()()()(),h()),t&2){let n=f().ngIf;m(10),d(n==null?null:n.StackTrace)}}function $t(t,e){if(t&1&&(g(0),r(1,"mainpanel",1)(2,"actions")(3,"a",2),l(4,"Back"),o()(),r(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),l(12,"General"),o()(),r(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),l(18,"Created Date"),o(),r(19,"div")(20,"span"),l(21),s(22,"date"),o()()()(),r(23,"div",10)(24,"div",11)(25,"label"),l(26,"Status"),o(),r(27,"div")(28,"span"),l(29),o()()()()(),r(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),l(34,"Duration"),o(),r(35,"div")(36,"span"),l(37),s(38,"number"),o()()()(),r(39,"div",10)(40,"div",11)(41,"label"),l(42,"Label"),o(),r(43,"div")(44,"span"),l(45),o()()()()()()()()(),r(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),l(51,"Message"),o()(),r(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),l(56),o()()()()()(),u(57,Bt,10,1,"div",16)(58,kt,11,1,"ng-container",0),o()()()(),h()),t&2){let n=e.ngIf;m(),p("headerTitle","Notification "+n.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),m(20),d(S(22,10,n.Created,"dd MMM yyyy HH:mm:ss")),m(8),d(n.StatusLabel),m(8),x("",S(38,13,n.DurationInSecond,"1.1-1")," s"),m(8),d(n.Label),m(11),d(n.Message),m(),p("ngIf",n==null?null:n.Perflog),m(),p("ngIf",n==null?null:n.StackTrace)}}var Ct=(()=>{let e=class e{constructor(a,i){this.activatedRoute=a,this.notificationService=i}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(q(a=>{let i=a.ID;return this.notificationService.getNotificationDetail(i).pipe(C(c=>(c.DurationInSecond=parseInt(c.Duration)/1e3,c)))}))}};e.\u0275fac=function(i){return new(i||e)(v(at),v(B))},e.\u0275cmp=y({type:e,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(i,c){i&1&&(u(0,$t,59,16,"ng-container",0),s(1,"async")),i&2&&p("ngIf",_(1,1,c.notification$))},dependencies:[T,k,F,w,P,M]});let t=e;return t})();var Ot=[{path:"",component:_t},{path:"detail",component:Ct}],St=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,R.forChild(Ot)]});let t=e;return t})();var se=(()=>{let e=class e{};e.\u0275fac=function(i){return new(i||e)},e.\u0275mod=b({type:e}),e.\u0275inj=I({imports:[L,St,gt,mt,ht,R,$]});let t=e;return t})();export{se as NotificationModule};
@@ -1 +1 @@
1
- import{a as re}from"./chunk-RENQ3YZH.js";import{b as le}from"./chunk-P5UOWO2P.js";import{a as pe,b as me}from"./chunk-WT6W7RAQ.js";import{a as ee,b as te,d as ne,e as ie}from"./chunk-CCXKODFV.js";import{j as Z}from"./chunk-QGAR7VQ4.js";import{e as Y}from"./chunk-E3NPUJ23.js";import{m as ae,n as oe}from"./chunk-BO4PPSB5.js";import{h as G,m as K,y as Q}from"./chunk-BSN7ZAXG.js";import{c as X}from"./chunk-47DMD3UG.js";import{$b as x,Ad as H,Cd as U,Da as P,Ea as R,Eb as u,Gb as h,Gc as c,Hc as d,Ic as J,Nb as B,Ob as T,Qb as $,Rb as F,Sb as a,Tb as o,Ub as f,Yb as j,Z as D,aa as w,bc as y,g as I,gb as v,ja as E,jb as p,nc as s,oc as C,pa as g,pc as b,rc as O,sc as q,ta as N,tc as z,uc as A,v as M,vc as V,yd as W,zd as k}from"./chunk-PQDPS2ID.js";import{a as S}from"./chunk-GNOSNGXM.js";var L=(()=>{let t=class t{constructor(){this.httpService=g(Y),this._pageination=new I({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(w(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=S(S({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=E({token:t,factory:t.\u0275fac});let i=t;return i})();function ce(i,t){if(i&1&&(a(0,"span",10),f(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,v)("alt",l.Name),p(),b(" ",l.Name," ")}}function de(i,t){if(i&1&&(a(0,"tr")(1,"td"),f(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td"),s(6),c(7,"json"),o(),a(8,"td"),s(9),c(10,"json"),o(),a(11,"td"),s(12),c(13,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,v),p(2),b(" ",l.ChannelName," "),p(2),C(d(7,5,l.Request)),p(3),C(d(10,7,l.Response)),p(3),C(J(13,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function he(i,t){if(i&1){let l=j();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),$(13,de,14,12,"tr",null,T),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),x("page",function(e){P(l);let r=y();return R(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=y();p(13),F((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function ge(i,t){i&1&&(a(0,"div",9),f(1,"app-empty-state"),o())}var ze=(()=>{let t=class t{constructor(){this.channelLogService=g(L),this.authService=g(Z),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(M(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=X.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),D(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=N({type:t,selectors:[["app-channel-log"]],standalone:!0,features:[A([L]),V],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["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,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),x("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),z("ngModelChange",function(_){return q(r.channelID,_)||(r.channelID=_),_}),u(7,ce,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,he,21,13,"div",8),c(13,"async"),u(14,ge,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),O("ngModel",r.channelID),p(6),B(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[U,W,H,k,oe,ae,re,me,pe,le,ie,ne,ee,te,Q,G,K]});let i=t;return i})();export{ze as a};
1
+ import{a as re}from"./chunk-RENQ3YZH.js";import{b as le}from"./chunk-P5UOWO2P.js";import{a as pe,b as me}from"./chunk-WT6W7RAQ.js";import{a as ee,b as te,d as ne,e as ie}from"./chunk-CCXKODFV.js";import{j as Z}from"./chunk-GUYZJ4TX.js";import{e as Y}from"./chunk-E3NPUJ23.js";import{m as ae,n as oe}from"./chunk-BO4PPSB5.js";import{h as G,m as K,y as Q}from"./chunk-BSN7ZAXG.js";import{c as X}from"./chunk-47DMD3UG.js";import{$b as x,Ad as H,Cd as U,Da as P,Ea as R,Eb as u,Gb as h,Gc as c,Hc as d,Ic as J,Nb as B,Ob as T,Qb as $,Rb as F,Sb as a,Tb as o,Ub as f,Yb as j,Z as D,aa as w,bc as y,g as I,gb as v,ja as E,jb as p,nc as s,oc as C,pa as g,pc as b,rc as O,sc as q,ta as N,tc as z,uc as A,v as M,vc as V,yd as W,zd as k}from"./chunk-PQDPS2ID.js";import{a as S}from"./chunk-GNOSNGXM.js";var L=(()=>{let t=class t{constructor(){this.httpService=g(Y),this._pageination=new I({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(w(n=>this.getLogs$(n).pipe()))}getLogs$(n){return this.httpService.post("/api/Channel/GetChannelLogPaged",n)}onPaginationChange(n){let e=this._pageination.value;e.PageNumber=n.pageIndex+1,this._pageination.next(e)}onFilter(n){let e=this._pageination.value;e.PageNumber=1,e=S(S({},e),n),this._pageination.next(e)}};t.\u0275fac=function(e){return new(e||t)},t.\u0275prov=E({token:t,factory:t.\u0275fac});let i=t;return i})();function ce(i,t){if(i&1&&(a(0,"span",10),f(1,"img",11),o(),s(2)),i&2){let l=t.item;p(),h("src",l.Img,v)("alt",l.Name),p(),b(" ",l.Name," ")}}function de(i,t){if(i&1&&(a(0,"tr")(1,"td"),f(2,"img",17),a(3,"span"),s(4),o()(),a(5,"td"),s(6),c(7,"json"),o(),a(8,"td"),s(9),c(10,"json"),o(),a(11,"td"),s(12),c(13,"date"),o()()),i&2){let l=t.$implicit;p(2),h("src",l.Img,v),p(2),b(" ",l.ChannelName," "),p(2),C(d(7,5,l.Request)),p(3),C(d(10,7,l.Response)),p(3),C(J(13,9,l.Created,"dd-MM-yyyy hh:mm:ss"))}}function he(i,t){if(i&1){let l=j();a(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),s(5,"Channel"),o(),a(6,"th"),s(7,"Request"),o(),a(8,"th"),s(9,"Response"),o(),a(10,"th",15),s(11,"Created"),o()()(),a(12,"tbody"),$(13,de,14,12,"tr",null,T),c(15,"async"),o()(),a(16,"mat-paginator",16),c(17,"async"),c(18,"async"),c(19,"async"),c(20,"async"),x("page",function(e){P(l);let r=y();return R(r.channelLogService.onPaginationChange(e))}),o()()}if(i&2){let l,n,e,r,m=y();p(13),F((l=d(15,3,m.channelLogs$))==null?null:l.Data),p(3),h("length",(n=d(17,5,m.channelLogs$))==null?null:n.Count)("pageSize",(e=d(18,7,m.filter$))==null?null:e.RowCount)("pageIndex",(r=d(19,9,m.filter$))!=null&&r.PageNumber?0:((r=d(20,11,m.filter$))==null?null:r.PageNumber)-1)}}function ge(i,t){i&1&&(a(0,"div",9),f(1,"app-empty-state"),o())}var ze=(()=>{let t=class t{constructor(){this.channelLogService=g(L),this.authService=g(Z),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(M(n=>(n.Data?n.Data=n.Data.map(e=>(e.Response=e.Response?JSON.parse(e.Response):"",e.Request=e.Request?JSON.parse(e.Request):"",e.Img=X.getChannelLogoByTypeId(e.TypeID),e)):n.Data=[],n)),D(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}};t.\u0275fac=function(e){return new(e||t)},t.\u0275cmp=N({type:t,selectors:[["app-channel-log"]],standalone:!0,features:[A([L]),V],decls:15,vars:7,consts:[["headerTitle","Authorization Log",3,"onSubmit","hideSearchBox"],["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,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[3,"page","length","pageSize","pageIndex"],[1,"me-2",2,"width","25px",3,"src"]],template:function(e,r){if(e&1&&(a(0,"mainpanel",0),x("onSubmit",function(){return r.onSubmitFilter()}),a(1,"filters")(2,"div",1)(3,"div")(4,"label",2),s(5,"Channel"),o(),a(6,"ng-select",3),z("ngModelChange",function(_){return q(r.channelID,_)||(r.channelID=_),_}),u(7,ce,3,3,"ng-template",4),o()()()(),a(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,he,21,13,"div",8),c(13,"async"),u(14,ge,2,0,"div",9),o()()()()()),e&2){let m;h("hideSearchBox",!0),p(6),h("clearable",!0)("items",r.channelOptions),O("ngModel",r.channelID),p(6),B(((m=d(13,5,r.channelLogs$))==null||m.Data==null?null:m.Data.length)>0?12:14)}},dependencies:[U,W,H,k,oe,ae,re,me,pe,le,ie,ne,ee,te,Q,G,K]});let i=t;return i})();export{ze as a};
@@ -1,4 +1,4 @@
1
- import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-TPGBOTD4.js";import{b as ie}from"./chunk-4LFFAE2I.js";import{a as ee,b as te}from"./chunk-X2TVRY2Z.js";import{a as X}from"./chunk-7CGLVYCD.js";import{j as Q}from"./chunk-QGAR7VQ4.js";import{e as J}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as Y,n as Z}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as G,h as z,m as K,y as q}from"./chunk-BSN7ZAXG.js";import"./chunk-47DMD3UG.js";import{n as W,p as j,r as $}from"./chunk-OVEJFFL6.js";import{$b as y,Cd as H,Da as g,Ea as h,Eb as c,Gb as s,Pa as M,Sb as o,Tb as r,Ub as d,Vb as f,Wb as _,Yb as S,bc as u,fb as k,ja as D,jb as p,ka as T,kb as I,mc as v,nc as m,oa as U,oc as O,pc as B,rc as L,sc as F,ta as C,tc as R,ua as N,uc as P,ud as w,vd as V,wd as A,xc as x}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var ge=e=>[e];function he(e,t){if(e&1&&(f(0),o(1,"a",9),m(2),r(),_()),e&2){let a=t.$implicit;p(),s("routerLink",x(2,ge,a.url)),p(),B(" ",a.title,"")}}var ce=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-download"]],decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(i,l){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),d(3,"nav-tab",2),r()(),o(4,"div")(5,"div",3)(6,"a",4),d(7,"i",5),r(),o(8,"div",6)(9,"div",7),c(10,he,3,4,"ng-container",8),r()()()()(),d(11,"router-outlet")),i&2&&(p(3),s("Tabs",l.tabs),p(7),s("ngForOf",l.moreMenu))},dependencies:[w,ee,W,j]});let e=t;return e})();var E=(()=>{let t=class t{constructor(n){this.httpService=n}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(i){return new(i||t)(U(J))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ce=e=>({"background-color":e});function ye(e,t){if(e&1&&(o(0,"th"),m(1),r()),e&2){let a=t.$implicit;p(),O(a.column)}}function ve(e,t){if(e&1&&(f(0),o(1,"td"),d(2,"span",6),r(),_()),e&2){let a=t.$implicit,n=u().$implicit;p(2),s("innerHTML",n[a.prop],k)}}function xe(e,t){if(e&1&&(o(0,"tr",5),c(1,ve,3,1,"ng-container",3),r()),e&2){let a=t.$implicit,n=u();s("ngStyle",x(2,Ce,a.Status>200?"#F4D6D5":"#DEE9C9")),p(),s("ngForOf",n.configs)}}var de=(()=>{let t=class t{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(i,l){i&1&&(o(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),c(4,ye,2,1,"th",3),r()(),o(5,"tbody"),c(6,xe,2,4,"tr",4),r()()()),i&2&&(p(4),s("ngForOf",l.configs),p(2),s("ngForOf",l.data))},dependencies:[w,A]});let e=t;return e})();function be(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onNewStepperState(l))}),d(2,"i",16),m(3," New "),r(),_()}}function Ee(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a),u();let i=v(11);return h(i.previous())}),m(2," Back "),r(),_()}}function Ie(e,t){if(e&1){let a=S();f(0),o(1,"button",17),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onStepperNext(l))}),m(2," Next "),r(),_()}}function De(e,t){if(e&1){let a=S();f(0),o(1,"button",18),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onSubmit(l))}),m(2,"Download"),r(),_()}if(e&2){let a=u();p(),s("disabled",!a.urls)}}function Te(e,t){e&1&&(d(0,"i",19),o(1,"span"),m(2,"Instruction"),r())}function Ue(e,t){e&1&&(o(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),m(4,"Note"),r()(),o(5,"div",24)(6,"ol",25)(7,"li"),m(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),m(10," Copy Product URL from "),o(11,"a",26),m(12,"https://seller.tokopedia.com/ "),r(),m(13," and paste in this form "),r(),o(14,"li"),m(15," Use New Line when you want to input several product URLs "),r()()()()())}function Ne(e,t){e&1&&(d(0,"i",27),o(1,"span"),m(2,"Download"),r())}function Me(e,t){if(e&1){let a=S();o(0,"div",20)(1,"textarea",28),R("ngModelChange",function(i){g(a);let l=u();return F(l.urls,i)||(l.urls=i),h(i)}),r()()}if(e&2){let a=u();p(),s("placeholder",a.urlPlaceholder),L("ngModel",a.urls)}}function ke(e,t){e&1&&(d(0,"i",29),o(1,"span"),m(2,"Finish"),r())}function Oe(e,t){if(e&1&&(o(0,"div",20),d(1,"app-response-api-list",30),r()),e&2){let a=u();p(),s("data",a.downloadResponses)("configs",a.configs)}}function Be(e,t){e&1&&(o(0,"h6"),m(1,"1"),r())}function Le(e,t){e&1&&(o(0,"h6"),m(1,"2"),r())}function Fe(e,t){e&1&&(o(0,"h6"),m(1,"3"),r())}var ue=(()=>{let t=class t{constructor(n,i){this.downloadService=n,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
1
+ import{a as ne,b as oe,c as re,d as ae,e as le,f as pe,g as se}from"./chunk-TPGBOTD4.js";import{b as ie}from"./chunk-4LFFAE2I.js";import{a as ee,b as te}from"./chunk-X2TVRY2Z.js";import{a as X}from"./chunk-TTLK2HTY.js";import{j as Q}from"./chunk-GUYZJ4TX.js";import{e as J}from"./chunk-E3NPUJ23.js";import"./chunk-KCDL7SWP.js";import{m as Y,n as Z}from"./chunk-BO4PPSB5.js";import"./chunk-HUUFOAKH.js";import"./chunk-E5GGIVK7.js";import{c as G,h as z,m as K,y as q}from"./chunk-BSN7ZAXG.js";import"./chunk-47DMD3UG.js";import{n as W,p as j,r as $}from"./chunk-OVEJFFL6.js";import{$b as y,Cd as H,Da as g,Ea as h,Eb as c,Gb as s,Pa as M,Sb as o,Tb as r,Ub as d,Vb as f,Wb as _,Yb as S,bc as u,fb as k,ja as D,jb as p,ka as T,kb as I,mc as v,nc as m,oa as U,oc as O,pc as B,rc as L,sc as F,ta as C,tc as R,ua as N,uc as P,ud as w,vd as V,wd as A,xc as x}from"./chunk-PQDPS2ID.js";import"./chunk-GNOSNGXM.js";var ge=e=>[e];function he(e,t){if(e&1&&(f(0),o(1,"a",9),m(2),r(),_()),e&2){let a=t.$implicit;p(),s("routerLink",x(2,ge,a.url)),p(),B(" ",a.title,"")}}var ce=(()=>{let t=class t{constructor(){this.tabs=[{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}],this.moreMenu=[{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}]}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-download"]],decls:12,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[4,"ngFor","ngForOf"],[1,"dropdown-item",3,"routerLink"]],template:function(i,l){i&1&&(o(0,"nav",0)(1,"div",1)(2,"div"),d(3,"nav-tab",2),r()(),o(4,"div")(5,"div",3)(6,"a",4),d(7,"i",5),r(),o(8,"div",6)(9,"div",7),c(10,he,3,4,"ng-container",8),r()()()()(),d(11,"router-outlet")),i&2&&(p(3),s("Tabs",l.tabs),p(7),s("ngForOf",l.moreMenu))},dependencies:[w,ee,W,j]});let e=t;return e})();var E=(()=>{let t=class t{constructor(n){this.httpService=n}download(n){return this.httpService.post("/api/Product/downloadurl",n)}};t.\u0275fac=function(i){return new(i||t)(U(J))},t.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"});let e=t;return e})();var Ce=e=>({"background-color":e});function ye(e,t){if(e&1&&(o(0,"th"),m(1),r()),e&2){let a=t.$implicit;p(),O(a.column)}}function ve(e,t){if(e&1&&(f(0),o(1,"td"),d(2,"span",6),r(),_()),e&2){let a=t.$implicit,n=u().$implicit;p(2),s("innerHTML",n[a.prop],k)}}function xe(e,t){if(e&1&&(o(0,"tr",5),c(1,ve,3,1,"ng-container",3),r()),e&2){let a=t.$implicit,n=u();s("ngStyle",x(2,Ce,a.Status>200?"#F4D6D5":"#DEE9C9")),p(),s("ngForOf",n.configs)}}var de=(()=>{let t=class t{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}};t.\u0275fac=function(i){return new(i||t)},t.\u0275cmp=C({type:t,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},decls:7,vars:2,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[4,"ngFor","ngForOf"],[3,"ngStyle",4,"ngFor","ngForOf"],[3,"ngStyle"],[3,"innerHTML"]],template:function(i,l){i&1&&(o(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),c(4,ye,2,1,"th",3),r()(),o(5,"tbody"),c(6,xe,2,4,"tr",4),r()()()),i&2&&(p(4),s("ngForOf",l.configs),p(2),s("ngForOf",l.data))},dependencies:[w,A]});let e=t;return e})();function be(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onNewStepperState(l))}),d(2,"i",16),m(3," New "),r(),_()}}function Ee(e,t){if(e&1){let a=S();f(0),o(1,"button",15),y("click",function(){g(a),u();let i=v(11);return h(i.previous())}),m(2," Back "),r(),_()}}function Ie(e,t){if(e&1){let a=S();f(0),o(1,"button",17),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onStepperNext(l))}),m(2," Next "),r(),_()}}function De(e,t){if(e&1){let a=S();f(0),o(1,"button",18),y("click",function(){g(a);let i=u(),l=v(11);return h(i.onSubmit(l))}),m(2,"Download"),r(),_()}if(e&2){let a=u();p(),s("disabled",!a.urls)}}function Te(e,t){e&1&&(d(0,"i",19),o(1,"span"),m(2,"Instruction"),r())}function Ue(e,t){e&1&&(o(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),m(4,"Note"),r()(),o(5,"div",24)(6,"ol",25)(7,"li"),m(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),m(10," Copy Product URL from "),o(11,"a",26),m(12,"https://seller.tokopedia.com/ "),r(),m(13," and paste in this form "),r(),o(14,"li"),m(15," Use New Line when you want to input several product URLs "),r()()()()())}function Ne(e,t){e&1&&(d(0,"i",27),o(1,"span"),m(2,"Download"),r())}function Me(e,t){if(e&1){let a=S();o(0,"div",20)(1,"textarea",28),R("ngModelChange",function(i){g(a);let l=u();return F(l.urls,i)||(l.urls=i),h(i)}),r()()}if(e&2){let a=u();p(),s("placeholder",a.urlPlaceholder),L("ngModel",a.urls)}}function ke(e,t){e&1&&(d(0,"i",29),o(1,"span"),m(2,"Finish"),r())}function Oe(e,t){if(e&1&&(o(0,"div",20),d(1,"app-response-api-list",30),r()),e&2){let a=u();p(),s("data",a.downloadResponses)("configs",a.configs)}}function Be(e,t){e&1&&(o(0,"h6"),m(1,"1"),r())}function Le(e,t){e&1&&(o(0,"h6"),m(1,"2"),r())}function Fe(e,t){e&1&&(o(0,"h6"),m(1,"3"),r())}var ue=(()=>{let t=class t{constructor(n,i){this.downloadService=n,this.authService=i,this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=[],this.stepperState="DOWNLOAD",this.urlPlaceholder=`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
2
  https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`,this.currentDomain=this.authService.getDomain()}onStepperChange(n){this.stepperState=n.selectedStep.state}onSubmit(n){let i=this.urls.split(/\r?\n/);this.downloadService.download(i).subscribe(l=>{this.downloadResponses=l,this.mappingLinkToProduct(),this.onStepperNext(n)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(n=>(n.Name=n?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${n.ID}" target="_blank">
3
3
  ${n?.Name}
4
4
  </a>`:"-",n))}onNewStepperState(n){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",n.reset(),this.onStepperNext(n)}onStepperNext(n){n.selected.completed=!0,n.next()}};t.\u0275fac=function(i){return new(i||t)(I(E),I(Q))},t.\u0275cmp=C({type:t,selectors:[["app-by-url"]],features:[P([{provide:ne,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[4,"ngIf"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(i,l){if(i&1){let fe=S();o(0,"mainpanel",1)(1,"actions"),c(2,be,4,0,"ng-container",2)(3,Ee,3,0,"ng-container",2)(4,Ie,3,0,"ng-container",2)(5,De,3,1,"ng-container",2),r(),o(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"mat-stepper",6,0),y("selectionChange",function(_e){return g(fe),h(l.onStepperChange(_e))}),o(12,"mat-step",7),c(13,Te,3,0,"ng-template",8)(14,Ue,16,0,"ng-template",9),r(),o(15,"mat-step",10),c(16,Ne,3,0,"ng-template",8)(17,Me,2,2,"ng-template",9),r(),o(18,"mat-step",11),c(19,ke,3,0,"ng-template",8)(20,Oe,2,2,"ng-template",9),r(),c(21,Be,2,0,"ng-template",12)(22,Le,2,0,"ng-template",13)(23,Fe,2,0,"ng-template",14),r()()()()()()}i&2&&(s("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),s("ngIf",l.stepperState=="FINISH"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(),s("ngIf",l.stepperState=="GUIDE"),p(),s("ngIf",l.stepperState=="DOWNLOAD"),p(5),s("selectedIndex",1),p(2),s("editable",l.stepperState!="FINISH")("completed",!0),p(3),s("editable",l.stepperState!="FINISH")("completed",!1))},dependencies:[V,G,z,K,Y,le,oe,pe,re,ae,de],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}