marketplacepos 5.43.7 → 5.43.8

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 (47) hide show
  1. package/Marketplace/{chunk-GJUPDABG.js → chunk-2WE5VQIB.js} +1 -1
  2. package/Marketplace/{chunk-TXVG5OHR.js → chunk-4FDSLLEW.js} +1 -1
  3. package/Marketplace/{chunk-FHQTKJXS.js → chunk-4TCVWLGV.js} +1 -1
  4. package/Marketplace/{chunk-EBVE2XHU.js → chunk-5J2P4G7C.js} +1 -1
  5. package/Marketplace/{chunk-3IO4ZF34.js → chunk-5W5H64GB.js} +1 -1
  6. package/Marketplace/{chunk-O7FDRTJ2.js → chunk-6CRGHPSR.js} +1 -1
  7. package/Marketplace/{chunk-DO2UECCT.js → chunk-6GSTYF5H.js} +1 -1
  8. package/Marketplace/{chunk-3BYIWPKX.js → chunk-74NKCY42.js} +1 -1
  9. package/Marketplace/{chunk-BCH2MADE.js → chunk-AQGYDN3B.js} +1 -1
  10. package/Marketplace/{chunk-SUJBRB2D.js → chunk-CMLFTAEA.js} +1 -1
  11. package/Marketplace/{chunk-VJNZ5THR.js → chunk-DJLBMG6O.js} +1 -1
  12. package/Marketplace/{chunk-EHU3RPGU.js → chunk-EAKQWIS7.js} +1 -1
  13. package/Marketplace/{chunk-KG47DFP5.js → chunk-EHJ5CYUT.js} +1 -1
  14. package/Marketplace/{chunk-KMZPNPJF.js → chunk-EIWYK5TA.js} +1 -1
  15. package/Marketplace/{chunk-FO2QLLKW.js → chunk-EM443W7B.js} +2 -2
  16. package/Marketplace/{chunk-LZYW24WA.js → chunk-FBDQLWJX.js} +1 -1
  17. package/Marketplace/{chunk-FWG7M5IP.js → chunk-GVQNFCWT.js} +1 -1
  18. package/Marketplace/{chunk-6ZVXICIH.js → chunk-H7A64RRL.js} +1 -1
  19. package/Marketplace/{chunk-UDZIOJVC.js → chunk-HCQDRRUB.js} +1 -1
  20. package/Marketplace/{chunk-TSPQ2LFF.js → chunk-HIAUMXPO.js} +1 -1
  21. package/Marketplace/{chunk-ESX7MIMG.js → chunk-I6FCMA5P.js} +1 -1
  22. package/Marketplace/{chunk-UMA5ZNXQ.js → chunk-IBVAAGUH.js} +1 -1
  23. package/Marketplace/{chunk-LLDNDJ7P.js → chunk-ICZU6TYQ.js} +1 -1
  24. package/Marketplace/{chunk-R45ORDIE.js → chunk-JUIKFEYB.js} +1 -1
  25. package/Marketplace/{chunk-JX6HFP2Y.js → chunk-KXD6CZ7T.js} +1 -1
  26. package/Marketplace/{chunk-YJHI5U5R.js → chunk-KZ7INCKP.js} +1 -1
  27. package/Marketplace/{chunk-ZJVWTRCI.js → chunk-NC3Y335Z.js} +1 -1
  28. package/Marketplace/{chunk-QWJECSZK.js → chunk-NU2AT65H.js} +1 -1
  29. package/Marketplace/{chunk-JJ6HE6R7.js → chunk-OGX774CC.js} +1 -1
  30. package/Marketplace/{chunk-KJATJWWX.js → chunk-Q3IZXH7X.js} +1 -1
  31. package/Marketplace/{chunk-HFBAUQ7H.js → chunk-RC4S5BM5.js} +1 -1
  32. package/Marketplace/{chunk-6NGH2YZQ.js → chunk-SDRFBNFF.js} +1 -1
  33. package/Marketplace/{chunk-UYLU3G52.js → chunk-SEN46Y6T.js} +1 -1
  34. package/Marketplace/{chunk-AOFDSBOE.js → chunk-T6LQ7WTR.js} +1 -1
  35. package/Marketplace/{chunk-SSAGHA7U.js → chunk-UAYWO75X.js} +1 -1
  36. package/Marketplace/{chunk-XC7L6C26.js → chunk-VEPPBK2Y.js} +1 -1
  37. package/Marketplace/{chunk-J6UZFGNY.js → chunk-VWYHEJLH.js} +1 -1
  38. package/Marketplace/{chunk-5FJUX7W5.js → chunk-WPWN2PNK.js} +2 -2
  39. package/Marketplace/{chunk-FYBG3KWC.js → chunk-WRRVCTKT.js} +1 -1
  40. package/Marketplace/{chunk-Q23GGWWT.js → chunk-XT4STZN6.js} +1 -1
  41. package/Marketplace/{chunk-3NP5TQOW.js → chunk-Y4X2G3D4.js} +1 -1
  42. package/Marketplace/{chunk-AEJ5I5MW.js → chunk-YFSXR7TL.js} +1 -1
  43. package/Marketplace/{chunk-RM3KYX7K.js → chunk-ZAJW3O5K.js} +1 -1
  44. package/Marketplace/{chunk-WUUXAXFO.js → chunk-ZVVPREHB.js} +1 -1
  45. package/Marketplace/index.html +2 -2
  46. package/Marketplace/{main-4LOUTBLN.js → main-Y4LW42EY.js} +1 -1
  47. package/package.json +1 -1
@@ -1 +1 @@
1
- import{a as ce,b as ue,c as fe}from"./chunk-V5BKQSAT.js";import{a as _e}from"./chunk-UDZIOJVC.js";import{a as de}from"./chunk-Q23GGWWT.js";import{a as se}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as pe}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as me}from"./chunk-WPW3D4MQ.js";import"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ne}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as ie}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as oe,n as ae}from"./chunk-CLER2MX6.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as re,s as le}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as J,k as K,m as Q,n as X}from"./chunk-M2FCTYGU.js";import{$c as v,Gb as W,Gc as a,Hc as b,Ic as A,Kc as _,Lc as g,Mb as y,Mc as C,Nc as z,Oc as R,Pc as j,Qc as H,Ra as O,Rc as U,Sc as G,Yb as c,Z as L,ac as I,ad as V,bd as q,dc as x,ec as D,gc as k,hc as B,ic as t,ja as N,jc as i,kc as u,oc as E,pa as w,pb as F,rb as o,tc as M,uc as f,v as P,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var T=(()=>{class n{constructor(){this.httpService=w(ie)}getAllOrders(e){return this.httpService.post(ne.GetAll,e).pipe(P(m=>m.Data))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275prov=N({token:n,factory:n.\u0275fac})}}return n})();var Ce=()=>[],he=n=>({"td-cell-hover":n});function Se(n,h){if(n&1&&u(0,"variants-dropdown",27),n&2){let e=f().$implicit;c("variants",e==null?null:e.Variants)}}function ve(n,h){if(n&1&&u(0,"variant-with-image",28),n&2){let e=f().$implicit;c("variant",e==null?null:e.Variants[0])}}function we(n,h){if(n&1&&(t(0,"span"),a(1),i()),n&2){let e=f().$implicit;o(),A("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ye(n,h){if(n&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div",24)(4,"div"),u(5,"img",25),v(6,"channelImage"),i(),t(7,"div"),u(8,"order-link",26),i()(),t(9,"small"),a(10),v(11,"date"),i()()(),t(12,"td"),a(13),i(),t(14,"td"),y(15,Se,1,1,"variants-dropdown",27)(16,ve,1,1,"variant-with-image",28),i(),t(17,"td"),a(18),v(19,"number"),i(),t(20,"td")(21,"div",23)(22,"div",24)(23,"span"),a(24),i(),y(25,we,2,1,"span"),i(),t(26,"small"),a(27),i()()()()),n&2){let e=h.$implicit;o(5),c("src",V(6,12,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(3),c("order",e),o(2),A(" ",q(11,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),b(e.Customer),o(),I(G(19,he,(e.Variants==null?null:e.Variants.length)>1)),o(),x((e.Variants==null?null:e.Variants.length)>1?15:16),o(3),b(V(19,17,e.Amount)),o(6),b(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1),o(2),A(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function xe(n,h){if(n&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th",20),a(7,"Customer"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",21),a(13,"Shipping"),i()()(),t(14,"tbody"),k(15,ye,28,21,"tr",null,D),i()(),t(17,"app-custom-paginator",22),M("next",function(){d(e);let r=f();return s(r.initAllOrders())})("previous",function(){d(e);let r=f();return s(r.initAllOrders())}),i()()}if(n&2){let e=f(),m=j(0);o(15),B(m),o(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function be(n,h){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Ze=(()=>{class n{constructor(){this.allService=w(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initAllOrders()}initAllOrders(){this.allOrders$=this.allService.getAllOrders(this.filter()).pipe(L(1))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275cmp=W({type:n,selectors:[["app-all"]],features:[H([T])],decls:34,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[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,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[3,"order"],[3,"variants"],[3,"variant"]],template:function(m,r){if(m&1){let p=E();z(0),v(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return d(p),s(r.initAllOrders())}),C("textChange",function(l){return d(p),g(r.filter().Number,l)||(r.filter().Number=l),s(l)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),i(),t(12,"channel-select-options",4),C("ngModelChange",function(l){return d(p),g(r.filter().ListChannelID,l)||(r.filter().ListChannelID=l),s(l)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(l){return d(p),g(r.filter().From,l)||(r.filter().From=l),s(l)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(l){return d(p),g(r.filter().To,l)||(r.filter().To=l),s(l)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(l){return d(p),g(r.filter().PageNumber,l)||(r.filter().PageNumber=l),s(l)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(l){return d(p),g(r.filter().PageSize,l)||(r.filter().PageSize=l),s(l)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,xe,18,2,"div",15)(33,be,2,0,"div",16),i()()()()()}if(m&2){let p=R(V(1,8,r.allOrders$)||U(11,Ce));o(2),_("text",r.filter().Number),o(10),c("multiple",!0),_("ngModel",r.filter().ListChannelID),o(5),_("date",r.filter().From),o(2),_("date",r.filter().To),o(4),_("ngModel",r.filter().PageNumber),o(4),_("ngModel",r.filter().PageSize),o(5),x((p==null?null:p.length)>0?32:33)}},dependencies:[X,J,Q,K,ae,oe,pe,me,te,Y,ee,Z,$,ce,ue,fe,se,de,le,re,_e],encapsulation:2})}}return n})();export{Ze as AllComponent};
1
+ import{a as ce,b as ue,c as fe}from"./chunk-V5BKQSAT.js";import{a as _e}from"./chunk-HCQDRRUB.js";import{a as de}from"./chunk-XT4STZN6.js";import{a as se}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as pe}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as me}from"./chunk-WPW3D4MQ.js";import"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ne}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as ie}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as oe,n as ae}from"./chunk-CLER2MX6.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as re,s as le}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as J,k as K,m as Q,n as X}from"./chunk-M2FCTYGU.js";import{$c as v,Gb as W,Gc as a,Hc as b,Ic as A,Kc as _,Lc as g,Mb as y,Mc as C,Nc as z,Oc as R,Pc as j,Qc as H,Ra as O,Rc as U,Sc as G,Yb as c,Z as L,ac as I,ad as V,bd as q,dc as x,ec as D,gc as k,hc as B,ic as t,ja as N,jc as i,kc as u,oc as E,pa as w,pb as F,rb as o,tc as M,uc as f,v as P,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var T=(()=>{class n{constructor(){this.httpService=w(ie)}getAllOrders(e){return this.httpService.post(ne.GetAll,e).pipe(P(m=>m.Data))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275prov=N({token:n,factory:n.\u0275fac})}}return n})();var Ce=()=>[],he=n=>({"td-cell-hover":n});function Se(n,h){if(n&1&&u(0,"variants-dropdown",27),n&2){let e=f().$implicit;c("variants",e==null?null:e.Variants)}}function ve(n,h){if(n&1&&u(0,"variant-with-image",28),n&2){let e=f().$implicit;c("variant",e==null?null:e.Variants[0])}}function we(n,h){if(n&1&&(t(0,"span"),a(1),i()),n&2){let e=f().$implicit;o(),A("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ye(n,h){if(n&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div",24)(4,"div"),u(5,"img",25),v(6,"channelImage"),i(),t(7,"div"),u(8,"order-link",26),i()(),t(9,"small"),a(10),v(11,"date"),i()()(),t(12,"td"),a(13),i(),t(14,"td"),y(15,Se,1,1,"variants-dropdown",27)(16,ve,1,1,"variant-with-image",28),i(),t(17,"td"),a(18),v(19,"number"),i(),t(20,"td")(21,"div",23)(22,"div",24)(23,"span"),a(24),i(),y(25,we,2,1,"span"),i(),t(26,"small"),a(27),i()()()()),n&2){let e=h.$implicit;o(5),c("src",V(6,12,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),o(3),c("order",e),o(2),A(" ",q(11,14,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),o(3),b(e.Customer),o(),I(G(19,he,(e.Variants==null?null:e.Variants.length)>1)),o(),x((e.Variants==null?null:e.Variants.length)>1?15:16),o(3),b(V(19,17,e.Amount)),o(6),b(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),o(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?25:-1),o(2),A(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function xe(n,h){if(n&1){let e=E();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th",20),a(7,"Customer"),i(),t(8,"th"),a(9,"Items"),i(),t(10,"th",21),a(11,"Amount"),i(),t(12,"th",21),a(13,"Shipping"),i()()(),t(14,"tbody"),k(15,ye,28,21,"tr",null,D),i()(),t(17,"app-custom-paginator",22),M("next",function(){d(e);let r=f();return s(r.initAllOrders())})("previous",function(){d(e);let r=f();return s(r.initAllOrders())}),i()()}if(n&2){let e=f(),m=j(0);o(15),B(m),o(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function be(n,h){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Ze=(()=>{class n{constructor(){this.allService=w(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initAllOrders()}initAllOrders(){this.allOrders$=this.allService.getAllOrders(this.filter()).pipe(L(1))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275cmp=W({type:n,selectors:[["app-all"]],features:[H([T])],decls:34,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[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,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[3,"order"],[3,"variants"],[3,"variant"]],template:function(m,r){if(m&1){let p=E();z(0),v(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return d(p),s(r.initAllOrders())}),C("textChange",function(l){return d(p),g(r.filter().Number,l)||(r.filter().Number=l),s(l)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),i(),t(12,"channel-select-options",4),C("ngModelChange",function(l){return d(p),g(r.filter().ListChannelID,l)||(r.filter().ListChannelID=l),s(l)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),C("dateChange",function(l){return d(p),g(r.filter().From,l)||(r.filter().From=l),s(l)}),i()(),t(18,"div")(19,"datepicker",8),C("dateChange",function(l){return d(p),g(r.filter().To,l)||(r.filter().To=l),s(l)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),C("ngModelChange",function(l){return d(p),g(r.filter().PageNumber,l)||(r.filter().PageNumber=l),s(l)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),C("ngModelChange",function(l){return d(p),g(r.filter().PageSize,l)||(r.filter().PageSize=l),s(l)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,xe,18,2,"div",15)(33,be,2,0,"div",16),i()()()()()}if(m&2){let p=R(V(1,8,r.allOrders$)||U(11,Ce));o(2),_("text",r.filter().Number),o(10),c("multiple",!0),_("ngModel",r.filter().ListChannelID),o(5),_("date",r.filter().From),o(2),_("date",r.filter().To),o(4),_("ngModel",r.filter().PageNumber),o(4),_("ngModel",r.filter().PageSize),o(5),x((p==null?null:p.length)>0?32:33)}},dependencies:[X,J,Q,K,ae,oe,pe,me,te,Y,ee,Z,$,ce,ue,fe,se,de,le,re,_e],encapsulation:2})}}return n})();export{Ze as AllComponent};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-Q23GGWWT.js";import"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as F}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as j}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as H,n as J}from"./chunk-CLER2MX6.js";import{A as R,c as k,h as B,m as W}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as D,l as I,n as P}from"./chunk-M2FCTYGU.js";import{$c as b,Gb as S,Gc as i,Hc as N,Kc as g,Lc as f,Mb as x,Mc as C,Nc as O,Oc as V,Pc as _,Ra as w,Yb as m,Z as v,ad as y,dc as M,ic as e,jc as t,kc as L,oc as T,pa as E,rb as p,tc as h,uc as A,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(n,U){if(n&1&&(e(0,"pre",21),i(1),b(2,"json"),t()),n&2){A();let l=_(25);p(),N(y(2,1,l))}}function q(n,U){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var pe=(()=>{class n{constructor(){this.httpService=E(j),this.selectedChannel=w(null),this.orderNumber=w(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(F.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(v(1))}copyToClipboard(l){if(!l)return;let c=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-escrow-api"]],decls:40,vars:10,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","onlyInputTypeID"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(c,o){if(c&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),h("click",function(){return d(a),s(o.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"channel-select-options",10),C("ngModelChange",function(r){return d(a),f(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),C("ngModelChange",function(r){return d(a),f(o.orderNumber,r)||(o.orderNumber=r),s(r)}),t()()()()(),O(25),b(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),h("click",function(){d(a);let r=_(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),p(16),g("ngModel",o.selectedChannel),m("onlyInputTypeID",5),p(8),g("ngModel",o.orderNumber),p();let a=V(y(26,7,o.escrowLog$));p(8),m("disabled",!a),p(5),M(a?38:39)}},dependencies:[P,D,I,R,k,B,W,J,H,G],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]})}}return n})();export{pe as EscrowApiComponent};
1
+ import{a as G}from"./chunk-XT4STZN6.js";import"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as F}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as j}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as H,n as J}from"./chunk-CLER2MX6.js";import{A as R,c as k,h as B,m as W}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as D,l as I,n as P}from"./chunk-M2FCTYGU.js";import{$c as b,Gb as S,Gc as i,Hc as N,Kc as g,Lc as f,Mb as x,Mc as C,Nc as O,Oc as V,Pc as _,Ra as w,Yb as m,Z as v,ad as y,dc as M,ic as e,jc as t,kc as L,oc as T,pa as E,rb as p,tc as h,uc as A,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(n,U){if(n&1&&(e(0,"pre",21),i(1),b(2,"json"),t()),n&2){A();let l=_(25);p(),N(y(2,1,l))}}function q(n,U){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var pe=(()=>{class n{constructor(){this.httpService=E(j),this.selectedChannel=w(null),this.orderNumber=w(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(F.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(v(1))}copyToClipboard(l){if(!l)return;let c=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-escrow-api"]],decls:40,vars:10,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","onlyInputTypeID"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(c,o){if(c&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),h("click",function(){return d(a),s(o.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"channel-select-options",10),C("ngModelChange",function(r){return d(a),f(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),C("ngModelChange",function(r){return d(a),f(o.orderNumber,r)||(o.orderNumber=r),s(r)}),t()()()()(),O(25),b(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),h("click",function(){d(a);let r=_(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),p(16),g("ngModel",o.selectedChannel),m("onlyInputTypeID",5),p(8),g("ngModel",o.orderNumber),p();let a=V(y(26,7,o.escrowLog$));p(8),m("disabled",!a),p(5),M(a?38:39)}},dependencies:[P,D,I,R,k,B,W,J,H,G],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]})}}return n})();export{pe as EscrowApiComponent};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-AOFDSBOE.js";import{a as C}from"./chunk-5KS4WK6H.js";import{a as h,b as y}from"./chunk-HYJVHRMN.js";import"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as v,J as o,n}from"./chunk-M2FCTYGU.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-HFBAUQ7H.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-3IO4ZF34.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-UYLU3G52.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
1
+ import{a as r}from"./chunk-T6LQ7WTR.js";import{a as C}from"./chunk-5KS4WK6H.js";import{a as h,b as y}from"./chunk-HYJVHRMN.js";import"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as v,J as o,n}from"./chunk-M2FCTYGU.js";import{Gb as l,Hb as s,Qc as f,Yb as u,ic as c,jc as d,ka as m,kc as i,rb as p}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class e{constructor(){this.inventoryTabs=[{Title:"Single Channel Comparison",Url:"/menu/inventory/bychannel"},{Title:"Multi Channel Comparison",Url:"/menu/inventory/pos"},{Title:"Different Inventory",Url:"/menu/inventory/channel_summary"}]}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=l({type:e,selectors:[["app-inventory"]],features:[f([C])],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,b){t&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),d()()(),i(4,"router-outlet")),t&2&&(p(3),u("Tabs",b.inventoryTabs))},dependencies:[n,y,h,o,v],encapsulation:2})}}return e})();var g=[{path:"",component:M,children:[{path:"",redirectTo:"bychannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-RC4S5BM5.js").then(e=>e.MultiChannelComparison)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"bychannel",loadComponent(){return import("./chunk-5W5H64GB.js").then(e=>e.SingleChannelComparisonComponent)},canActivate:[r],data:{title:"Inventory Comparison"}},{path:"channel_summary",loadComponent(){return import("./chunk-SEN46Y6T.js").then(e=>e.ChannelSummaryComponent)},canActivate:[r],data:{title:"Different Inventory"}}]}],E=(()=>{class e{static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275mod=s({type:e})}static{this.\u0275inj=m({imports:[n,o.forChild(g)]})}}return e})();export{E as InventoryRoutingModule};
@@ -1 +1 @@
1
- import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-A4BNLR77.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-YJHI5U5R.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-LLDNDJ7P.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-ESX7MIMG.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-3BYIWPKX.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-GJUPDABG.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-FWG7M5IP.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-6ZVXICIH.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-ZJVWTRCI.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
1
+ import"./chunk-66YHNWRR.js";var o=[{path:"",loadComponent(){return import("./chunk-A4BNLR77.js").then(t=>t.OrdersV2Component)},children:[{path:"to-ship",loadComponent(){return import("./chunk-KZ7INCKP.js").then(t=>t.ReadyToShipComponent)},title:"To Ship"},{path:"awaiting-collection",loadComponent(){return import("./chunk-ICZU6TYQ.js").then(t=>t.AwaitingCollectionComponent)},title:"Awaiting Collection"},{path:"shipped",loadComponent(){return import("./chunk-I6FCMA5P.js").then(t=>t.ShippedComponent)},title:"Shipped"},{path:"completed",loadComponent(){return import("./chunk-74NKCY42.js").then(t=>t.CompletedComponent)},title:"Completed"},{path:"all",loadComponent(){return import("./chunk-2WE5VQIB.js").then(t=>t.AllComponent)},title:"All Orders"},{path:"cancelled",loadComponent(){return import("./chunk-GVQNFCWT.js").then(t=>t.CancelledComponent)},title:"Cancelled"},{path:"download",loadComponent(){return import("./chunk-H7A64RRL.js").then(t=>t.DownloadV2Component)},title:"Download"},{path:"log",loadComponent(){return import("./chunk-NC3Y335Z.js").then(t=>t.DownloadOrderLogComponent)},title:"Download Log"},{path:"",pathMatch:"full",redirectTo:"to-ship"}]}];export{o as routes};
@@ -1,2 +1,2 @@
1
- import{a as L}from"./chunk-7AQ244V7.js";import{b as Re}from"./chunk-RMCAWPWK.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import{a as Be}from"./chunk-SRVGUGY2.js";import{a as K}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as Le,c as Ae,d as Y}from"./chunk-UDIDZKN6.js";import"./chunk-M5XGP4SG.js";import{a as De,b as ke}from"./chunk-CIIO2CJ6.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import{a as Ve}from"./chunk-SSAGHA7U.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import{a as Me}from"./chunk-SYUFPF3D.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-IA6KOBDJ.js";import"./chunk-RECNBAEB.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import"./chunk-5KS4WK6H.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as H}from"./chunk-5DIRXS7I.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as Te,b as Ee,c as Pe}from"./chunk-GSZJGR7K.js";import"./chunk-CMTBBXR5.js";import{h as fe}from"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{e as Se}from"./chunk-5JVEEL2T.js";import{c as f}from"./chunk-PW42BQIY.js";import{a as Ce,b as ge,c as xe}from"./chunk-SWQXSJ7O.js";import"./chunk-DRMAONR7.js";import"./chunk-AEOSNAHH.js";import{b as ue,e as he}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{d as Ie,l as we,m as be,n as Fe}from"./chunk-CLER2MX6.js";import{A as de,b as se,c as ce,h as pe,m as me,o as _e}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as ve,s as ye}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{d as te,g as ie,j as oe,k as ae,m as le,n as re}from"./chunk-M2FCTYGU.js";import{$c as g,Fc as z,G as q,Gb as X,Gc as p,Hc as k,Ic as V,Kc as w,Lc as b,Mb as u,Mc as F,Qc as ne,Ra as R,Sc as M,Yb as m,Z as $,ac as J,ad as v,bd as N,cd as G,dc as y,ea as O,ec as W,gc as j,hc as Q,ic as a,jc as r,kc as x,lc as E,mc as P,oc as S,pa as U,pb as D,rb as s,tc as h,uc as l,v as B,xb as I,xc as ee,ya as _,za as d}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as A}from"./chunk-66YHNWRR.js";var Z=t=>[t],Ue=t=>({"text-decoration-line-through":t}),We=t=>({"me-10":t}),je=t=>({"bg-gradient-warning":t}),Qe=t=>({cursor:t});function ze(t,c){if(t&1){let e=S();a(0,"button",39),h("click",function(){_(e);let n=l().ngIf,i=l(2);return d(i.onScanInventory(n))}),x(1,"i",40),p(2,"Refresh "),r()}}function Ge(t,c){if(t&1){let e=S();a(0,"div",37)(1,"button",41),h("click",function(){_(e);let n=l().ngIf,i=l(2);return d(i.updateStock(n))}),x(2,"i",42),p(3," Update "),r(),x(4,"button",43),a(5,"ul",44)(6,"a",45),h("click",function(){_(e);let n=l(3);return d(n.openExportDialog())}),x(7,"i",46),a(8,"span"),p(9,"Export"),r()()()()}}function He(t,c){if(t&1){let e=S();a(0,"button",47),h("click",function(){_(e);let n=l(3);return d(n.openExportDialog())}),x(1,"i",46),a(2,"span"),p(3,"Export"),r()()}}function Ye(t,c){if(t&1&&(a(0,"div"),u(1,ze,3,0,"button",36)(2,Ge,10,0,"div",37)(3,He,4,0,"button",38),r()),t&2){let e=c.ngIf,o=l(2);s(),m("ngIf",o.productService.hasSelectionVariant(e)),s(),y(o.productService.hasSelectionVariant(e)?2:3)}}function Ke(t,c){t&1&&(a(0,"div",48)(1,"span"),p(2," showing only different stock, please press next to populate more data "),r()())}function Ze(t,c){if(t&1){let e=S();a(0,"th")(1,"input",49),F("ngModelChange",function(n){_(e);let i=l(3);return b(i.checkboxState,n)||(i.checkboxState=n),d(n)}),h("ngModelChange",function(){let n=_(e).ngIf,i=l(3);return d(i.onCheckboxStateChange(n))}),r()()}if(t&2){let e=l(3);s(),w("ngModel",e.checkboxState)}}function qe(t,c){if(t&1&&(E(0),u(1,Ze,2,1,"th",5),g(2,"async"),P()),t&2){let e=l(2);s(),m("ngIf",v(2,1,e.products$))}}function Xe(t,c){t&1&&(a(0,"th",33),p(1," Reserved "),r())}function Je(t,c){if(t&1){let e=S();a(0,"input",65),F("ngModelChange",function(n){_(e);let i=l(4).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),h("ngModelChange",function(){_(e);let n=l(4).$implicit,i=l(2);return d(i.onCheckboxStateProduct(n))}),r()}if(t&2){let e=l(4).$implicit;w("ngModel",e.selected)}}function en(t,c){if(t&1&&(E(0),a(1,"div",63),u(2,Je,1,1,"input",64),r(),P()),t&2){let e=l(3).$implicit;s(),m("ngClass",M(2,We,e.Variants.length<=1)),s(),y(e.Variants.length>1?2:-1)}}function nn(t,c){if(t&1){let e=S();a(0,"img",66),h("click",function(n){_(e);let i=l(3).$implicit,C=l(2);return d(C.onZoomImage(n,i==null?null:i.ImageUrl))}),r()}if(t&2){let e=l(3).$implicit;ee("src",e==null?null:e.ThumbnailUrl,D)}}function tn(t,c){t&1&&x(0,"img",60)}function on(t,c){if(t&1&&(x(0,"br"),a(1,"div",67),x(2,"i",68),a(3,"small"),p(4),r()()),t&2){let e=l(3).$implicit;s(4),V("(",e==null?null:e.Category,")")}}function an(t,c){if(t&1&&(a(0,"td",58)(1,"div",14),u(2,en,3,4,"ng-container",27),a(3,"div"),u(4,nn,1,1,"img",59)(5,tn,1,0,"img",60),r()()(),a(6,"td",61)(7,"span",62),p(8),r(),u(9,on,5,1),r()),t&2){let e=l(2).$implicit,o=l(2);m("rowSpan",e==null?null:e.Variants.length),s(2),m("ngxPermissionsOnly",M(6,Z,o.inventoryUpdateRole)),s(2),y(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function ln(t,c){if(t&1){let e=S();a(0,"input",49),F("ngModelChange",function(n){_(e);let i=l(3).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),r()}if(t&2){let e=l(3).$implicit;w("ngModel",e.selected)}}function rn(t,c){if(t&1&&u(0,ln,1,1,"input",70),t&2){let e=l(2).$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function sn(t,c){if(t&1){let e=S();a(0,"input",49),F("ngModelChange",function(n){_(e);let i=l(2).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),r()}if(t&2){let e=l(2).$implicit;w("ngModel",e.selected)}}function cn(t,c){if(t&1&&(E(0),a(1,"td",69),u(2,rn,1,1)(3,sn,1,1,"input",70),r(),P()),t&2){let e=l().$implicit;s(2),y((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function pn(t,c){t&1&&(a(0,"div",71),p(1," Not Found "),r())}function mn(t,c){if(t&1&&(a(0,"div")(1,"span",72),p(2),g(3,"number"),r(),p(4," => "),a(5,"span",73),p(6),g(7,"number"),r()()),t&2){let e=l().$implicit;s(2),V(" ",v(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(v(7,4,e==null?null:e.Inventory))}}function _n(t,c){if(t&1&&(p(0),g(1,"number")),t&2){let e=l().$implicit;V(" ",v(1,1,e==null?null:e.Inventory)," ")}}function dn(t,c){if(t&1&&(E(0),a(1,"div",74)(2,"a",75),x(3,"i",76),r()(),P()),t&2){let e=l().$implicit,o=l(3);s(2),m("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),D)}}function un(t,c){if(t&1){let e=S();a(0,"span",81),h("click",function(){_(e);let n=l(2).$implicit,i=l().$implicit,C=l(2);return d(C.openTableDialog(i,n))}),p(1),g(2,"number"),r()}if(t&2){let e=l(2).$implicit,o=l(3);J(M(5,Qe,o.hasInventoryEdit())),s(),V(" ",v(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function hn(t,c){if(t&1){let e=S();a(0,"td",77)(1,"div",53)(2,"div"),u(3,un,3,7,"span",78),g(4,"async"),r(),a(5,"div",74)(6,"a",75),x(7,"i",76),r()(),a(8,"div",74)(9,"span",79),h("click",function(){_(e);let n=l().$implicit,i=l(3);return d(i.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),x(10,"i",80),r()()()()}if(t&2){let e=l().$implicit,o=l(3);m("ngClass",M(5,je,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",v(4,3,o.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,D)}}function Cn(t,c){if(t&1&&(E(0),a(1,"span",82),p(2),g(3,"number"),r(),P()),t&2){let e=l(2).$implicit;s(2),V(" (",v(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function gn(t,c){t&1&&p(0," - ")}function xn(t,c){if(t&1&&(E(0),a(1,"td",51),u(2,Cn,4,3,"ng-container",57)(3,gn,1,0,"ng-template",null,1,G),r(),P()),t&2){let e=z(4),o=l().$implicit;s(2),m("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function fn(t,c){t&1&&(E(0),p(1," - "),P())}function Sn(t,c){if(t&1&&(a(0,"span",83),g(1,"date"),p(2),g(3,"date"),r()),t&2){let e=l().$implicit;m("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 vn(t,c){if(t&1&&(a(0,"tr"),u(1,an,10,8),a(2,"td",50),p(3),r(),a(4,"td",51)(5,"span",52),p(6),r()(),u(7,cn,4,1,"ng-container",27),a(8,"td")(9,"div",53),u(10,pn,2,0,"div",54)(11,mn,8,6,"div")(12,_n,2,3)(13,dn,4,1,"ng-container",5),r()(),u(14,hn,11,7,"td",55)(15,xn,5,2,"ng-container",5),a(16,"td",56),u(17,fn,2,0,"ng-container",57)(18,Sn,4,8,"ng-template",null,0,G),r()()),t&2){let e=c.$implicit,o=c.$index,n=z(19),i=l(3);s(),y(o==0?1:-1),s(2),k(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",M(14,Ue,e.Discontinued)),s(),k(e==null?null:e.Code),s(),m("ngxPermissionsOnly",M(16,Z,i.inventoryUpdateRole)),s(3),m("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",n)}}function yn(t,c){if(t&1&&(a(0,"tbody"),j(1,vn,20,18,"tr",null,W),r()),t&2){let e=c.$implicit;s(),Q(e.Variants)}}function In(t,c){if(t&1){let e=S();a(0,"mainpanel",3),h("onSubmit",function(n){_(e);let i=l();return d(i.onSearch(n))}),a(1,"actions")(2,"div",4),u(3,Ye,4,2,"div",5),g(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),p(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),h("onChannelChange",function(n){_(e);let i=l();return d(i.onChannelChange(n))}),r()(),a(10,"div",8)(11,"label",9),p(12,"PageNumber"),r(),a(13,"input",10),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.PageNumber,n)||(i.searchFilter.PageNumber=n),d(n)}),r()(),a(14,"div",8)(15,"label",11),p(16,"Page Size"),r(),a(17,"input",12),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.RowCount,n)||(i.searchFilter.RowCount=n),d(n)}),r()(),a(18,"div",8)(19,"label",13),p(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.QuantityFrom,n)||(i.searchFilter.QuantityFrom=n),d(n)}),r(),p(23," - "),a(24,"input",16),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.QuantityTo,n)||(i.searchFilter.QuantityTo=n),d(n)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),u(29,Ke,3,0,"div",20),a(30,"table",21),h("matSortChange",function(n){_(e);let i=l();return d(i.onSortVariant(n))}),a(31,"thead",22)(32,"tr")(33,"th",23),p(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),h("toggleChange",function(){_(e);let n=l();return n.showDifferenceStock=!n.showDifferenceStock,d(n.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(),u(43,qe,3,3,"ng-container",27),a(44,"th",28),p(45," POS "),r(),a(46,"th",29)(47,"div",30),h("click",function(){_(e);let n=l();return d(n.openModalFilter())}),x(48,"img",31),a(49,"span",32),p(50),g(51,"stringLimit"),r()()(),u(52,Xe,2,0,"th",33),a(53,"th",34),p(54,"Last Sync"),r()()(),j(55,yn,3,0,"tbody",null,W),g(57,"async"),r(),a(58,"infinite-paginator",35),g(59,"async"),h("onNextPage",function(){_(e);let n=l();return d(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(e);let n=l();return d(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(e);let n=l();return d(n.infinitePagination.getRowCount(n.searchFilter))}),r()()()()()()}if(t&2){let e,o,n,i=l();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",v(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),w("ngModel",i.searchFilter.PageNumber),s(4),w("ngModel",i.searchFilter.RowCount),s(5),w("ngModel",i.searchFilter.QuantityFrom),s(2),w("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngxPermissionsOnly",M(30,Z,i.inventoryUpdateRole)),s(4),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(o=i.channelIdentity())==null?null:o.img,D),s(2),V(" ",N(51,23,(n=i.channelIdentity())==null?null:n.label,13)," "),s(2),y(i.isShowReservedColumn?52:-1),s(3),Q(v(57,26,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",v(59,28,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var st=(()=>{class t{constructor(e,o,n,i,C,T,$e,Oe){this.http=e,this.toastr=o,this.dialog=n,this.productService=i,this.authService=C,this.biggerPictureService=T,this.inventoryService=$e,this.mainPanelService=Oe,this.infinitePagination=U(Y),this.ngxPermissionsService=U(Ce),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.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=f.GuidEMpty,this.selectedChannel=R(null),this.channelIdentity=R({img:null,label:null}),this.inventoryUpdateRole=H.InventoryUpdate,this.hasInventoryEdit=R(!0),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.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(O(e=>{this.checkShowReservedColumn(e)}),B(e=>(e=this.calculateAvailableStock(e),e)),$(1)),this.products$=this.sourceObs$}initRoles(){this.ngxPermissionsService.hasPermission(H.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e))}calculateAvailableStock(e){return e.map(n=>(n.totalAvailable=n.Variants.reduce((i,C)=>(i+=C.I?.Available||0,i),0),n))}checkShowReservedColumn(e){let o=0,n;e.forEach(i=>{n=i.Variants.find(C=>f.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),n&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe($(1),O(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
1
+ import{a as L}from"./chunk-7AQ244V7.js";import{b as Re}from"./chunk-RMCAWPWK.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import{a as Be}from"./chunk-SRVGUGY2.js";import{a as K}from"./chunk-XHAXYWZ7.js";import{a as Ne,b as Le,c as Ae,d as Y}from"./chunk-UDIDZKN6.js";import"./chunk-M5XGP4SG.js";import{a as De,b as ke}from"./chunk-CIIO2CJ6.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import{a as Ve}from"./chunk-UAYWO75X.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import{a as Me}from"./chunk-SYUFPF3D.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-IA6KOBDJ.js";import"./chunk-RECNBAEB.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import"./chunk-5KS4WK6H.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{a as H}from"./chunk-5DIRXS7I.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as Te,b as Ee,c as Pe}from"./chunk-GSZJGR7K.js";import"./chunk-CMTBBXR5.js";import{h as fe}from"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{e as Se}from"./chunk-5JVEEL2T.js";import{c as f}from"./chunk-PW42BQIY.js";import{a as Ce,b as ge,c as xe}from"./chunk-SWQXSJ7O.js";import"./chunk-DRMAONR7.js";import"./chunk-AEOSNAHH.js";import{b as ue,e as he}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{d as Ie,l as we,m as be,n as Fe}from"./chunk-CLER2MX6.js";import{A as de,b as se,c as ce,h as pe,m as me,o as _e}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as ve,s as ye}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{d as te,g as ie,j as oe,k as ae,m as le,n as re}from"./chunk-M2FCTYGU.js";import{$c as g,Fc as z,G as q,Gb as X,Gc as p,Hc as k,Ic as V,Kc as w,Lc as b,Mb as u,Mc as F,Qc as ne,Ra as R,Sc as M,Yb as m,Z as $,ac as J,ad as v,bd as N,cd as G,dc as y,ea as O,ec as W,gc as j,hc as Q,ic as a,jc as r,kc as x,lc as E,mc as P,oc as S,pa as U,pb as D,rb as s,tc as h,uc as l,v as B,xb as I,xc as ee,ya as _,za as d}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as A}from"./chunk-66YHNWRR.js";var Z=t=>[t],Ue=t=>({"text-decoration-line-through":t}),We=t=>({"me-10":t}),je=t=>({"bg-gradient-warning":t}),Qe=t=>({cursor:t});function ze(t,c){if(t&1){let e=S();a(0,"button",39),h("click",function(){_(e);let n=l().ngIf,i=l(2);return d(i.onScanInventory(n))}),x(1,"i",40),p(2,"Refresh "),r()}}function Ge(t,c){if(t&1){let e=S();a(0,"div",37)(1,"button",41),h("click",function(){_(e);let n=l().ngIf,i=l(2);return d(i.updateStock(n))}),x(2,"i",42),p(3," Update "),r(),x(4,"button",43),a(5,"ul",44)(6,"a",45),h("click",function(){_(e);let n=l(3);return d(n.openExportDialog())}),x(7,"i",46),a(8,"span"),p(9,"Export"),r()()()()}}function He(t,c){if(t&1){let e=S();a(0,"button",47),h("click",function(){_(e);let n=l(3);return d(n.openExportDialog())}),x(1,"i",46),a(2,"span"),p(3,"Export"),r()()}}function Ye(t,c){if(t&1&&(a(0,"div"),u(1,ze,3,0,"button",36)(2,Ge,10,0,"div",37)(3,He,4,0,"button",38),r()),t&2){let e=c.ngIf,o=l(2);s(),m("ngIf",o.productService.hasSelectionVariant(e)),s(),y(o.productService.hasSelectionVariant(e)?2:3)}}function Ke(t,c){t&1&&(a(0,"div",48)(1,"span"),p(2," showing only different stock, please press next to populate more data "),r()())}function Ze(t,c){if(t&1){let e=S();a(0,"th")(1,"input",49),F("ngModelChange",function(n){_(e);let i=l(3);return b(i.checkboxState,n)||(i.checkboxState=n),d(n)}),h("ngModelChange",function(){let n=_(e).ngIf,i=l(3);return d(i.onCheckboxStateChange(n))}),r()()}if(t&2){let e=l(3);s(),w("ngModel",e.checkboxState)}}function qe(t,c){if(t&1&&(E(0),u(1,Ze,2,1,"th",5),g(2,"async"),P()),t&2){let e=l(2);s(),m("ngIf",v(2,1,e.products$))}}function Xe(t,c){t&1&&(a(0,"th",33),p(1," Reserved "),r())}function Je(t,c){if(t&1){let e=S();a(0,"input",65),F("ngModelChange",function(n){_(e);let i=l(4).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),h("ngModelChange",function(){_(e);let n=l(4).$implicit,i=l(2);return d(i.onCheckboxStateProduct(n))}),r()}if(t&2){let e=l(4).$implicit;w("ngModel",e.selected)}}function en(t,c){if(t&1&&(E(0),a(1,"div",63),u(2,Je,1,1,"input",64),r(),P()),t&2){let e=l(3).$implicit;s(),m("ngClass",M(2,We,e.Variants.length<=1)),s(),y(e.Variants.length>1?2:-1)}}function nn(t,c){if(t&1){let e=S();a(0,"img",66),h("click",function(n){_(e);let i=l(3).$implicit,C=l(2);return d(C.onZoomImage(n,i==null?null:i.ImageUrl))}),r()}if(t&2){let e=l(3).$implicit;ee("src",e==null?null:e.ThumbnailUrl,D)}}function tn(t,c){t&1&&x(0,"img",60)}function on(t,c){if(t&1&&(x(0,"br"),a(1,"div",67),x(2,"i",68),a(3,"small"),p(4),r()()),t&2){let e=l(3).$implicit;s(4),V("(",e==null?null:e.Category,")")}}function an(t,c){if(t&1&&(a(0,"td",58)(1,"div",14),u(2,en,3,4,"ng-container",27),a(3,"div"),u(4,nn,1,1,"img",59)(5,tn,1,0,"img",60),r()()(),a(6,"td",61)(7,"span",62),p(8),r(),u(9,on,5,1),r()),t&2){let e=l(2).$implicit,o=l(2);m("rowSpan",e==null?null:e.Variants.length),s(2),m("ngxPermissionsOnly",M(6,Z,o.inventoryUpdateRole)),s(2),y(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),k(e==null?null:e.Name),s(),y(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function ln(t,c){if(t&1){let e=S();a(0,"input",49),F("ngModelChange",function(n){_(e);let i=l(3).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),r()}if(t&2){let e=l(3).$implicit;w("ngModel",e.selected)}}function rn(t,c){if(t&1&&u(0,ln,1,1,"input",70),t&2){let e=l(2).$implicit;y((e==null?null:e.Inventory)<=1e5?0:-1)}}function sn(t,c){if(t&1){let e=S();a(0,"input",49),F("ngModelChange",function(n){_(e);let i=l(2).$implicit;return b(i.selected,n)||(i.selected=n),d(n)}),r()}if(t&2){let e=l(2).$implicit;w("ngModel",e.selected)}}function cn(t,c){if(t&1&&(E(0),a(1,"td",69),u(2,rn,1,1)(3,sn,1,1,"input",70),r(),P()),t&2){let e=l().$implicit;s(2),y((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function pn(t,c){t&1&&(a(0,"div",71),p(1," Not Found "),r())}function mn(t,c){if(t&1&&(a(0,"div")(1,"span",72),p(2),g(3,"number"),r(),p(4," => "),a(5,"span",73),p(6),g(7,"number"),r()()),t&2){let e=l().$implicit;s(2),V(" ",v(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),k(v(7,4,e==null?null:e.Inventory))}}function _n(t,c){if(t&1&&(p(0),g(1,"number")),t&2){let e=l().$implicit;V(" ",v(1,1,e==null?null:e.Inventory)," ")}}function dn(t,c){if(t&1&&(E(0),a(1,"div",74)(2,"a",75),x(3,"i",76),r()(),P()),t&2){let e=l().$implicit,o=l(3);s(2),m("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),D)}}function un(t,c){if(t&1){let e=S();a(0,"span",81),h("click",function(){_(e);let n=l(2).$implicit,i=l().$implicit,C=l(2);return d(C.openTableDialog(i,n))}),p(1),g(2,"number"),r()}if(t&2){let e=l(2).$implicit,o=l(3);J(M(5,Qe,o.hasInventoryEdit())),s(),V(" ",v(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function hn(t,c){if(t&1){let e=S();a(0,"td",77)(1,"div",53)(2,"div"),u(3,un,3,7,"span",78),g(4,"async"),r(),a(5,"div",74)(6,"a",75),x(7,"i",76),r()(),a(8,"div",74)(9,"span",79),h("click",function(){_(e);let n=l().$implicit,i=l(3);return d(i.refreshInventory(n==null||n.Channel[0]==null?null:n.Channel[0].ChannelItemID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelVariationID,n==null||n.Channel[0]==null?null:n.Channel[0].ChannelID,n==null?null:n.ID))}),x(10,"i",80),r()()()()}if(t&2){let e=l().$implicit,o=l(3);m("ngClass",M(5,je,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",v(4,3,o.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,D)}}function Cn(t,c){if(t&1&&(E(0),a(1,"span",82),p(2),g(3,"number"),r(),P()),t&2){let e=l(2).$implicit;s(2),V(" (",v(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function gn(t,c){t&1&&p(0," - ")}function xn(t,c){if(t&1&&(E(0),a(1,"td",51),u(2,Cn,4,3,"ng-container",57)(3,gn,1,0,"ng-template",null,1,G),r(),P()),t&2){let e=z(4),o=l().$implicit;s(2),m("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function fn(t,c){t&1&&(E(0),p(1," - "),P())}function Sn(t,c){if(t&1&&(a(0,"span",83),g(1,"date"),p(2),g(3,"date"),r()),t&2){let e=l().$implicit;m("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 vn(t,c){if(t&1&&(a(0,"tr"),u(1,an,10,8),a(2,"td",50),p(3),r(),a(4,"td",51)(5,"span",52),p(6),r()(),u(7,cn,4,1,"ng-container",27),a(8,"td")(9,"div",53),u(10,pn,2,0,"div",54)(11,mn,8,6,"div")(12,_n,2,3)(13,dn,4,1,"ng-container",5),r()(),u(14,hn,11,7,"td",55)(15,xn,5,2,"ng-container",5),a(16,"td",56),u(17,fn,2,0,"ng-container",57)(18,Sn,4,8,"ng-template",null,0,G),r()()),t&2){let e=c.$implicit,o=c.$index,n=z(19),i=l(3);s(),y(o==0?1:-1),s(2),k(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",M(14,Ue,e.Discontinued)),s(),k(e==null?null:e.Code),s(),m("ngxPermissionsOnly",M(16,Z,i.inventoryUpdateRole)),s(3),m("ngIf",(e==null?null:e.I)==null),s(),y((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),y((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",n)}}function yn(t,c){if(t&1&&(a(0,"tbody"),j(1,vn,20,18,"tr",null,W),r()),t&2){let e=c.$implicit;s(),Q(e.Variants)}}function In(t,c){if(t&1){let e=S();a(0,"mainpanel",3),h("onSubmit",function(n){_(e);let i=l();return d(i.onSearch(n))}),a(1,"actions")(2,"div",4),u(3,Ye,4,2,"div",5),g(4,"async"),r()(),a(5,"filters")(6,"div")(7,"label",6),p(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",7),h("onChannelChange",function(n){_(e);let i=l();return d(i.onChannelChange(n))}),r()(),a(10,"div",8)(11,"label",9),p(12,"PageNumber"),r(),a(13,"input",10),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.PageNumber,n)||(i.searchFilter.PageNumber=n),d(n)}),r()(),a(14,"div",8)(15,"label",11),p(16,"Page Size"),r(),a(17,"input",12),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.RowCount,n)||(i.searchFilter.RowCount=n),d(n)}),r()(),a(18,"div",8)(19,"label",13),p(20,"Quantity From - To"),r(),a(21,"div",14)(22,"input",15),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.QuantityFrom,n)||(i.searchFilter.QuantityFrom=n),d(n)}),r(),p(23," - "),a(24,"input",16),F("ngModelChange",function(n){_(e);let i=l();return b(i.searchFilter.QuantityTo,n)||(i.searchFilter.QuantityTo=n),d(n)}),r()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),u(29,Ke,3,0,"div",20),a(30,"table",21),h("matSortChange",function(n){_(e);let i=l();return d(i.onSortVariant(n))}),a(31,"thead",22)(32,"tr")(33,"th",23),p(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),h("toggleChange",function(){_(e);let n=l();return n.showDifferenceStock=!n.showDifferenceStock,d(n.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(),u(43,qe,3,3,"ng-container",27),a(44,"th",28),p(45," POS "),r(),a(46,"th",29)(47,"div",30),h("click",function(){_(e);let n=l();return d(n.openModalFilter())}),x(48,"img",31),a(49,"span",32),p(50),g(51,"stringLimit"),r()()(),u(52,Xe,2,0,"th",33),a(53,"th",34),p(54,"Last Sync"),r()()(),j(55,yn,3,0,"tbody",null,W),g(57,"async"),r(),a(58,"infinite-paginator",35),g(59,"async"),h("onNextPage",function(){_(e);let n=l();return d(n.infinitePagination.onNextPage(n.searchFilter))})("onLastPage",function(){_(e);let n=l();return d(n.infinitePagination.onLastPage(n.searchFilter))})("onGetRowCount",function(){_(e);let n=l();return d(n.infinitePagination.getRowCount(n.searchFilter))}),r()()()()()()}if(t&2){let e,o,n,i=l();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",v(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),w("ngModel",i.searchFilter.PageNumber),s(4),w("ngModel",i.searchFilter.RowCount),s(5),w("ngModel",i.searchFilter.QuantityFrom),s(2),w("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngxPermissionsOnly",M(30,Z,i.inventoryUpdateRole)),s(4),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(o=i.channelIdentity())==null?null:o.img,D),s(2),V(" ",N(51,23,(n=i.channelIdentity())==null?null:n.label,13)," "),s(2),y(i.isShowReservedColumn?52:-1),s(3),Q(v(57,26,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",v(59,28,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var st=(()=>{class t{constructor(e,o,n,i,C,T,$e,Oe){this.http=e,this.toastr=o,this.dialog=n,this.productService=i,this.authService=C,this.biggerPictureService=T,this.inventoryService=$e,this.mainPanelService=Oe,this.infinitePagination=U(Y),this.ngxPermissionsService=U(Ce),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.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=f.GuidEMpty,this.selectedChannel=R(null),this.channelIdentity=R({img:null,label:null}),this.inventoryUpdateRole=H.InventoryUpdate,this.hasInventoryEdit=R(!0),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.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(O(e=>{this.checkShowReservedColumn(e)}),B(e=>(e=this.calculateAvailableStock(e),e)),$(1)),this.products$=this.sourceObs$}initRoles(){this.ngxPermissionsService.hasPermission(H.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e))}calculateAvailableStock(e){return e.map(n=>(n.totalAvailable=n.Variants.reduce((i,C)=>(i+=C.I?.Available||0,i),0),n))}checkShowReservedColumn(e){let o=0,n;e.forEach(i=>{n=i.Variants.find(C=>f.IsNotEmpty(C?.Channel[0]?.InventoryReserved)),n&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe($(1),O(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
2
2
  Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(e){this.searchFilter.text=e,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let o=this.productService.selectedVariantProduct(e);if(o.length>0){let n=this.searchFilter.LocationID,i=o.map(T=>A({ID:T.ID,Code:T.Code,Inventory:T.Inventory},f.IsNotEmpty(n)&&{LocationID:n})),C={ListChannelID:[this.searchFilter.ChannelID],List:i};this.http.post("/api/Inventory/UpdateChannel",C).subscribe(T=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(T)})}}handlingUpdateStock(e){if(e[0]?.Response){let o=e[0]?.Response?.Fail_list,n=e[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",n,o)}else this.toastr.error(e[0]?.Exception,"Error")}refreshInventory(e,o,n,i){let C={ChannelItemID:e,ChannelVariationID:o,ChannelID:n,VariantID:i};this.http.post("/api/Inventory/RefreshInventoryChannel",C).subscribe(T=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.Inventory>=0&&(o.selected=e.selected),o))}onCheckboxStateChange(e){e=e.map(o=>(o.Variants=o.Variants.map(n=>(n.selected=this.checkboxState,n)),o))}openTableDialog(e,o){this.hasInventoryEdit()&&this.dialog.open(Ne,{data:{Name:e.Name,Variant:o,ChannelID:o?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe(q(i=>f.IsNotEmpty(i))).subscribe(i=>{this.updateItemAfterDialog(i)})}updateItemAfterDialog(e){let o=this.searchFilter.LocationID,n=A({ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku},f.IsNotEmpty(o)&&{LocationID:o});this.http.post("/api/Inventory/UpdateQuantityByItem",n).subscribe(i=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([i])})}onScanInventory(e){let o=this.productService.selectedVariantProduct(e);this.inventoryService.refreshInventory(o).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(Re,{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=K.DIFFERENCE:this.searchFilter.filterModel=K.ALL,this.initReloadData()}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}onSortVariant(e){if(e.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(B(o=>o.map(n=>(n.Variants=n.Variants.sort((i,C)=>f.compare(i.I?.Available,C.I?.Available,e.direction==="asc")),n)).sort((n,i)=>f.compare(n.totalAvailable,i.totalAvailable,e.direction==="asc"))))}static{this.\u0275fac=function(o){return new(o||t)(I(he),I(ue),I(Ie),I(Ve),I(fe),I(Me),I(L),I(we))}}static{this.\u0275cmp=X({type:t,selectors:[["app-single-channel-comparison"]],features:[ne([Y,L])],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%"],[4,"ngxPermissionsOnly"],["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,"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"],[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"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["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%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["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"],[3,"class","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"],[3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(o,n){o&1&&(u(0,In,60,32,"mainpanel",2),g(1,"async")),o&2&&m("ngIf",v(1,1,n.loader$))},dependencies:[re,te,ie,oe,le,ae,Fe,be,Se,de,ce,_e,se,pe,me,Le,Ae,xe,ge,ke,De,ye,ve,Pe,Te,Ee,Be],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}"]})}}return t})();export{st as SingleChannelComparisonComponent};
@@ -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-6W6DKFRE.js";import{b as ie}from"./chunk-7UHCDGAA.js";import"./chunk-G47XGOST.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import{a as X}from"./chunk-AOFDSBOE.js";import{a as Y,b as Z}from"./chunk-HYJVHRMN.js";import"./chunk-CMTBBXR5.js";import{h as Q}from"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as J}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ee,n as te}from"./chunk-CLER2MX6.js";import{A as q,c as G,h as z,m as K}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as W,H as j,J as $,f as x,g as V,h as A,n as H}from"./chunk-M2FCTYGU.js";import{Fc as v,Gb as C,Gc as p,Hb as k,Hc as B,Ic as L,Ka as M,Kc as O,Lc as F,Mb as m,Mc as R,Qc as P,Sc as w,Yb as l,ic as n,ja as I,jc as i,ka as T,kc as c,lc as f,mc as _,oa as U,ob as N,oc as S,rb as a,tc as y,uc as d,xb as D,ya as g,za as h}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var _e=e=>[e];function ge(e,s){if(e&1&&(f(0),n(1,"a",9),p(2),i(),_()),e&2){let t=s.$implicit;a(),l("routerLink",w(2,_e,t.url)),a(),L(" ",t.title,"")}}var ce=(()=>{class e{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"}]}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-download"]],standalone:!1,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(o,r){o&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),c(3,"nav-tab",2),i()(),n(4,"div")(5,"div",3)(6,"a",4),c(7,"i",5),i(),n(8,"div",6)(9,"div",7),m(10,ge,3,4,"ng-container",8),i()()()()(),c(11,"router-outlet")),o&2&&(a(3),l("Tabs",r.tabs),a(7),l("ngForOf",r.moreMenu))},dependencies:[x,Y,W,j],encapsulation:2})}}return e})();var E=(()=>{class e{constructor(t){this.httpService=t}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(o){return new(o||e)(U(J))}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Se=e=>({"background-color":e});function Ce(e,s){if(e&1&&(n(0,"th"),p(1),i()),e&2){let t=s.$implicit;a(),B(t.column)}}function ye(e,s){if(e&1&&(f(0),n(1,"td"),c(2,"span",6),i(),_()),e&2){let t=s.$implicit,o=d().$implicit;a(2),l("innerHTML",o[t.prop],N)}}function ve(e,s){if(e&1&&(n(0,"tr",5),m(1,ye,3,1,"ng-container",3),i()),e&2){let t=s.$implicit,o=d();l("ngStyle",w(2,Se,t.Status>200?"#F4D6D5":"#DEE9C9")),a(),l("ngForOf",o.configs)}}var de=(()=>{class e{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},standalone:!1,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(o,r){o&1&&(n(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),m(4,Ce,2,1,"th",3),i()(),n(5,"tbody"),m(6,ve,2,4,"tr",4),i()()()),o&2&&(a(4),l("ngForOf",r.configs),a(2),l("ngForOf",r.data))},dependencies:[x,A],encapsulation:2})}}return e})();function xe(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onNewStepperState(u))}),c(2,"i",16),p(3," New "),i(),_()}}function be(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t),d();let r=v(11);return h(r.previous())}),p(2," Back "),i(),_()}}function Ee(e,s){if(e&1){let t=S();f(0),n(1,"button",17),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onStepperNext(u))}),p(2," Next "),i(),_()}}function De(e,s){if(e&1){let t=S();f(0),n(1,"button",18),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onSubmit(u))}),p(2,"Download"),i(),_()}if(e&2){let t=d();a(),l("disabled",!t.urls)}}function Ie(e,s){e&1&&(c(0,"i",19),n(1,"span"),p(2,"Instruction"),i())}function Te(e,s){e&1&&(n(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),p(4,"Note"),i()(),n(5,"div",24)(6,"ol",25)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),i(),n(9,"li"),p(10," Copy Product URL from "),n(11,"a",26),p(12,"https://seller.tokopedia.com/ "),i(),p(13," and paste in this form "),i(),n(14,"li"),p(15," Use New Line when you want to input several product URLs "),i()()()()())}function Ue(e,s){e&1&&(c(0,"i",27),n(1,"span"),p(2,"Download"),i())}function Me(e,s){if(e&1){let t=S();n(0,"div",20)(1,"textarea",28),R("ngModelChange",function(r){g(t);let u=d();return F(u.urls,r)||(u.urls=r),h(r)}),i()()}if(e&2){let t=d();a(),l("placeholder",t.urlPlaceholder),O("ngModel",t.urls)}}function Ne(e,s){e&1&&(c(0,"i",29),n(1,"span"),p(2,"Finish"),i())}function ke(e,s){if(e&1&&(n(0,"div",20),c(1,"app-response-api-list",30),i()),e&2){let t=d();a(),l("data",t.downloadResponses)("configs",t.configs)}}function Be(e,s){e&1&&(n(0,"h6"),p(1,"1"),i())}function Le(e,s){e&1&&(n(0,"h6"),p(1,"2"),i())}function Oe(e,s){e&1&&(n(0,"h6"),p(1,"3"),i())}var ue=(()=>{class e{constructor(t,o){this.downloadService=t,this.authService=o,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-6W6DKFRE.js";import{b as ie}from"./chunk-7UHCDGAA.js";import"./chunk-G47XGOST.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import{a as X}from"./chunk-T6LQ7WTR.js";import{a as Y,b as Z}from"./chunk-HYJVHRMN.js";import"./chunk-CMTBBXR5.js";import{h as Q}from"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as J}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ee,n as te}from"./chunk-CLER2MX6.js";import{A as q,c as G,h as z,m as K}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{F as W,H as j,J as $,f as x,g as V,h as A,n as H}from"./chunk-M2FCTYGU.js";import{Fc as v,Gb as C,Gc as p,Hb as k,Hc as B,Ic as L,Ka as M,Kc as O,Lc as F,Mb as m,Mc as R,Qc as P,Sc as w,Yb as l,ic as n,ja as I,jc as i,ka as T,kc as c,lc as f,mc as _,oa as U,ob as N,oc as S,rb as a,tc as y,uc as d,xb as D,ya as g,za as h}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var _e=e=>[e];function ge(e,s){if(e&1&&(f(0),n(1,"a",9),p(2),i(),_()),e&2){let t=s.$implicit;a(),l("routerLink",w(2,_e,t.url)),a(),L(" ",t.title,"")}}var ce=(()=>{class e{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"}]}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-download"]],standalone:!1,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(o,r){o&1&&(n(0,"nav",0)(1,"div",1)(2,"div"),c(3,"nav-tab",2),i()(),n(4,"div")(5,"div",3)(6,"a",4),c(7,"i",5),i(),n(8,"div",6)(9,"div",7),m(10,ge,3,4,"ng-container",8),i()()()()(),c(11,"router-outlet")),o&2&&(a(3),l("Tabs",r.tabs),a(7),l("ngForOf",r.moreMenu))},dependencies:[x,Y,W,j],encapsulation:2})}}return e})();var E=(()=>{class e{constructor(t){this.httpService=t}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(o){return new(o||e)(U(J))}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();var Se=e=>({"background-color":e});function Ce(e,s){if(e&1&&(n(0,"th"),p(1),i()),e&2){let t=s.$implicit;a(),B(t.column)}}function ye(e,s){if(e&1&&(f(0),n(1,"td"),c(2,"span",6),i(),_()),e&2){let t=s.$implicit,o=d().$implicit;a(2),l("innerHTML",o[t.prop],N)}}function ve(e,s){if(e&1&&(n(0,"tr",5),m(1,ye,3,1,"ng-container",3),i()),e&2){let t=s.$implicit,o=d();l("ngStyle",w(2,Se,t.Status>200?"#F4D6D5":"#DEE9C9")),a(),l("ngForOf",o.configs)}}var de=(()=>{class e{constructor(){this.eventClose=new M}ngOnInit(){}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(o){return new(o||e)}}static{this.\u0275cmp=C({type:e,selectors:[["app-response-api-list"]],inputs:{configs:"configs",data:"data",status:"status"},outputs:{eventClose:"onClose"},standalone:!1,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(o,r){o&1&&(n(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),m(4,Ce,2,1,"th",3),i()(),n(5,"tbody"),m(6,ve,2,4,"tr",4),i()()()),o&2&&(a(4),l("ngForOf",r.configs),a(2),l("ngForOf",r.data))},dependencies:[x,A],encapsulation:2})}}return e})();function xe(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onNewStepperState(u))}),c(2,"i",16),p(3," New "),i(),_()}}function be(e,s){if(e&1){let t=S();f(0),n(1,"button",15),y("click",function(){g(t),d();let r=v(11);return h(r.previous())}),p(2," Back "),i(),_()}}function Ee(e,s){if(e&1){let t=S();f(0),n(1,"button",17),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onStepperNext(u))}),p(2," Next "),i(),_()}}function De(e,s){if(e&1){let t=S();f(0),n(1,"button",18),y("click",function(){g(t);let r=d(),u=v(11);return h(r.onSubmit(u))}),p(2,"Download"),i(),_()}if(e&2){let t=d();a(),l("disabled",!t.urls)}}function Ie(e,s){e&1&&(c(0,"i",19),n(1,"span"),p(2,"Instruction"),i())}function Te(e,s){e&1&&(n(0,"div",20)(1,"div",21)(2,"div",22)(3,"h4",23),p(4,"Note"),i()(),n(5,"div",24)(6,"ol",25)(7,"li"),p(8," Use this form to Download Products from Tokopedia using product URL "),i(),n(9,"li"),p(10," Copy Product URL from "),n(11,"a",26),p(12,"https://seller.tokopedia.com/ "),i(),p(13," and paste in this form "),i(),n(14,"li"),p(15," Use New Line when you want to input several product URLs "),i()()()()())}function Ue(e,s){e&1&&(c(0,"i",27),n(1,"span"),p(2,"Download"),i())}function Me(e,s){if(e&1){let t=S();n(0,"div",20)(1,"textarea",28),R("ngModelChange",function(r){g(t);let u=d();return F(u.urls,r)||(u.urls=r),h(r)}),i()()}if(e&2){let t=d();a(),l("placeholder",t.urlPlaceholder),O("ngModel",t.urls)}}function Ne(e,s){e&1&&(c(0,"i",29),n(1,"span"),p(2,"Finish"),i())}function ke(e,s){if(e&1&&(n(0,"div",20),c(1,"app-response-api-list",30),i()),e&2){let t=d();a(),l("data",t.downloadResponses)("configs",t.configs)}}function Be(e,s){e&1&&(n(0,"h6"),p(1,"1"),i())}function Le(e,s){e&1&&(n(0,"h6"),p(1,"2"),i())}function Oe(e,s){e&1&&(n(0,"h6"),p(1,"3"),i())}var ue=(()=>{class e{constructor(t,o){this.downloadService=t,this.authService=o,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(t){this.stepperState=t.selectedStep.state}onSubmit(t){let o=this.urls.split(/\r?\n/);this.downloadService.download(o).subscribe(r=>{this.downloadResponses=r,this.mappingLinkToProduct(),this.onStepperNext(t)})}mappingLinkToProduct(){this.downloadResponses=this.downloadResponses.map(t=>(t.Name=t?.Name?`<a href="${this.currentDomain}/menu/Products/Catalog/Products/Info?ID=${t.ID}" target="_blank">
3
3
  ${t?.Name}
4
4
  </a>`:"-",t))}onNewStepperState(t){this.downloadResponses=[],this.urls=null,this.stepperState="DOWNLOAD",t.reset(),this.onStepperNext(t)}onStepperNext(t){t.selected.completed=!0,t.next()}static{this.\u0275fac=function(o){return new(o||e)(D(E),D(Q))}}static{this.\u0275cmp=C({type:e,selectors:[["app-by-url"]],standalone:!1,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(o,r){if(o&1){let u=S();n(0,"mainpanel",1)(1,"actions"),m(2,xe,4,0,"ng-container",2)(3,be,3,0,"ng-container",2)(4,Ee,3,0,"ng-container",2)(5,De,3,1,"ng-container",2),i(),n(6,"content")(7,"div",3)(8,"div",4)(9,"div",5)(10,"mat-stepper",6,0),y("selectionChange",function(fe){return g(u),h(r.onStepperChange(fe))}),n(12,"mat-step",7),m(13,Ie,3,0,"ng-template",8)(14,Te,16,0,"ng-template",9),i(),n(15,"mat-step",10),m(16,Ue,3,0,"ng-template",8)(17,Me,2,2,"ng-template",9),i(),n(18,"mat-step",11),m(19,Ne,3,0,"ng-template",8)(20,ke,2,2,"ng-template",9),i(),m(21,Be,2,0,"ng-template",12)(22,Le,2,0,"ng-template",13)(23,Oe,2,0,"ng-template",14),i()()()()()()}o&2&&(l("hideSearchBox",!0)("hideSearchDropdown",!0),a(2),l("ngIf",r.stepperState=="FINISH"),a(),l("ngIf",r.stepperState=="DOWNLOAD"),a(),l("ngIf",r.stepperState=="GUIDE"),a(),l("ngIf",r.stepperState=="DOWNLOAD"),a(5),l("selectedIndex",1),a(2),l("editable",r.stepperState!="FINISH")("completed",!0),a(3),l("editable",r.stepperState!="FINISH")("completed",!1))},dependencies:[V,G,z,K,ee,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%}
@@ -1 +1 @@
1
- import{a as oe}from"./chunk-EPVCMYCI.js";import{a as le,b as re}from"./chunk-6FY74YFQ.js";import"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{b as ae}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{h as X}from"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-5JVEEL2T.js";import{c as K}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as Q}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ne,n as ie}from"./chunk-CLER2MX6.js";import{A as G,h as H,m as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as V,k as J,l as W,n as k}from"./chunk-M2FCTYGU.js";import{$c as m,Gb as P,Gc as p,Hc as C,Ic as y,Kc as j,Lc as O,Mb as u,Mc as q,Qc as z,Yb as d,Z as M,aa as D,ad as c,bd as A,dc as R,ec as B,g as L,gc as T,hc as $,ic as i,ja as w,jc as a,kc as f,oc as F,pa as g,pb as S,rb as l,tc as v,uc as x,v as I,ya as E,za as N}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{class n{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(e=>this.getLogs$(e).pipe()))}getLogs$(e){return this.httpService.post("/api/Channel/GetChannelLogPaged",e)}onPaginationChange(e){let t=this._pageination.value;t.PageNumber=e.pageIndex+1,this._pageination.next(t)}onFilter(e){let t=this._pageination.value;t.PageNumber=1,t=_(_({},t),e),this._pageination.next(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=w({token:n,factory:n.\u0275fac})}}return n})();function me(n,h){if(n&1&&(i(0,"span",10),f(1,"img",11),a(),p(2)),n&2){let e=h.item;l(),d("src",e.Img,S)("alt",e.Name),l(),y(" ",e.Name," ")}}function se(n,h){if(n&1&&(i(0,"tr")(1,"td"),f(2,"img",17),i(3,"span"),p(4),a()(),i(5,"td")(6,"span",18),p(7),m(8,"json"),a()(),i(9,"td"),p(10),m(11,"json"),a(),i(12,"td"),p(13),m(14,"date"),a()()),n&2){let e=h.$implicit;l(2),d("src",e.Img,S),l(2),y(" ",e.ChannelName," "),l(3),C(c(8,5,e.Request)),l(3),C(c(11,7,e.Response)),l(3),C(A(14,9,e.Created,"dd-MM-yyyy hh:mm:ss"))}}function ce(n,h){if(n&1){let e=F();i(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),p(5,"Channel"),a(),i(6,"th"),p(7,"Request"),a(),i(8,"th"),p(9,"Response"),a(),i(10,"th",15),p(11,"Created"),a()()(),i(12,"tbody"),T(13,se,15,12,"tr",null,B),m(15,"async"),a()(),i(16,"mat-paginator",16),m(17,"async"),m(18,"async"),m(19,"async"),m(20,"async"),v("page",function(r){E(e);let o=x();return N(o.channelLogService.onPaginationChange(r))}),a()()}if(n&2){let e,t,r,o,s=x();l(13),$((e=c(15,3,s.channelLogs$))==null?null:e.Data),l(3),d("length",(t=c(17,5,s.channelLogs$))==null?null:t.Count)("pageSize",(r=c(18,7,s.filter$))==null?null:r.RowCount)("pageIndex",(o=c(19,9,s.filter$))!=null&&o.PageNumber?0:((o=c(20,11,s.filter$))==null?null:o.PageNumber)-1)}}function de(n,h){n&1&&(i(0,"div",9),f(1,"app-empty-state"),a())}var Oe=(()=>{class n{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(e=>(e.Data?e.Data=e.Data.map(t=>(t.Response=t.Response?JSON.parse(t.Response):"",t.Request=t.Request?JSON.parse(t.Request):"",t.Img=K.getChannelLogoByTypeId(t.TypeID),t)):e.Data=[],e)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-channel-log"]],features:[z([b])],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"],[1,""]],template:function(t,r){if(t&1&&(i(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),i(1,"filters")(2,"div",1)(3,"div")(4,"label",2),p(5,"Channel"),a(),i(6,"ng-select",3),q("ngModelChange",function(s){return O(r.channelID,s)||(r.channelID=s),s}),u(7,me,3,3,"ng-template",4),a()()()(),i(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,ce,21,13,"div",8),m(13,"async"),u(14,de,2,0,"div",9),a()()()()()),t&2){let o;d("hideSearchBox",!0),l(6),d("clearable",!0)("items",r.channelOptions),j("ngModel",r.channelID),l(6),R(((o=c(13,5,r.channelLogs$))==null||o.Data==null?null:o.Data.length)>0?12:14)}},dependencies:[k,V,W,J,ie,ne,oe,re,le,ae,te,ee,Y,Z,G,H,U],encapsulation:2})}}return n})();export{Oe as ChannelLogComponent};
1
+ import{a as oe}from"./chunk-EPVCMYCI.js";import{a as le,b as re}from"./chunk-6FY74YFQ.js";import"./chunk-7ZXNQAAU.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-3BT5DR3X.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import{b as ae}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{h as X}from"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import"./chunk-5HO2IJ47.js";import{a as Y,b as Z,d as ee,e as te}from"./chunk-5JVEEL2T.js";import{c as K}from"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as Q}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as ne,n as ie}from"./chunk-CLER2MX6.js";import{A as G,h as H,m as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as V,k as J,l as W,n as k}from"./chunk-M2FCTYGU.js";import{$c as m,Gb as P,Gc as p,Hc as C,Ic as y,Kc as j,Lc as O,Mb as u,Mc as q,Qc as z,Yb as d,Z as M,aa as D,ad as c,bd as A,dc as R,ec as B,g as L,gc as T,hc as $,ic as i,ja as w,jc as a,kc as f,oc as F,pa as g,pb as S,rb as l,tc as v,uc as x,v as I,ya as E,za as N}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as _}from"./chunk-66YHNWRR.js";var b=(()=>{class n{constructor(){this.httpService=g(Q),this._pageination=new L({PageNumber:1,RowCount:100,ChannelID:null}),this.filter$=this._pageination.asObservable(),this.log$=this.filter$.pipe(D(e=>this.getLogs$(e).pipe()))}getLogs$(e){return this.httpService.post("/api/Channel/GetChannelLogPaged",e)}onPaginationChange(e){let t=this._pageination.value;t.PageNumber=e.pageIndex+1,this._pageination.next(t)}onFilter(e){let t=this._pageination.value;t.PageNumber=1,t=_(_({},t),e),this._pageination.next(t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=w({token:n,factory:n.\u0275fac})}}return n})();function me(n,h){if(n&1&&(i(0,"span",10),f(1,"img",11),a(),p(2)),n&2){let e=h.item;l(),d("src",e.Img,S)("alt",e.Name),l(),y(" ",e.Name," ")}}function se(n,h){if(n&1&&(i(0,"tr")(1,"td"),f(2,"img",17),i(3,"span"),p(4),a()(),i(5,"td")(6,"span",18),p(7),m(8,"json"),a()(),i(9,"td"),p(10),m(11,"json"),a(),i(12,"td"),p(13),m(14,"date"),a()()),n&2){let e=h.$implicit;l(2),d("src",e.Img,S),l(2),y(" ",e.ChannelName," "),l(3),C(c(8,5,e.Request)),l(3),C(c(11,7,e.Response)),l(3),C(A(14,9,e.Created,"dd-MM-yyyy hh:mm:ss"))}}function ce(n,h){if(n&1){let e=F();i(0,"div",8)(1,"table",12)(2,"thead")(3,"tr",13)(4,"th",14),p(5,"Channel"),a(),i(6,"th"),p(7,"Request"),a(),i(8,"th"),p(9,"Response"),a(),i(10,"th",15),p(11,"Created"),a()()(),i(12,"tbody"),T(13,se,15,12,"tr",null,B),m(15,"async"),a()(),i(16,"mat-paginator",16),m(17,"async"),m(18,"async"),m(19,"async"),m(20,"async"),v("page",function(r){E(e);let o=x();return N(o.channelLogService.onPaginationChange(r))}),a()()}if(n&2){let e,t,r,o,s=x();l(13),$((e=c(15,3,s.channelLogs$))==null?null:e.Data),l(3),d("length",(t=c(17,5,s.channelLogs$))==null?null:t.Count)("pageSize",(r=c(18,7,s.filter$))==null?null:r.RowCount)("pageIndex",(o=c(19,9,s.filter$))!=null&&o.PageNumber?0:((o=c(20,11,s.filter$))==null?null:o.PageNumber)-1)}}function de(n,h){n&1&&(i(0,"div",9),f(1,"app-empty-state"),a())}var Oe=(()=>{class n{constructor(){this.channelLogService=g(b),this.authService=g(X),this.channelOptions=this.authService.getChannels(),this.channelLogs$=this.channelLogService.log$.pipe(I(e=>(e.Data?e.Data=e.Data.map(t=>(t.Response=t.Response?JSON.parse(t.Response):"",t.Request=t.Request?JSON.parse(t.Request):"",t.Img=K.getChannelLogoByTypeId(t.TypeID),t)):e.Data=[],e)),M(1)),this.filter$=this.channelLogService.filter$}onSubmitFilter(){this.channelLogService.onFilter({ChannelID:this.channelID})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-channel-log"]],features:[z([b])],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"],[1,""]],template:function(t,r){if(t&1&&(i(0,"mainpanel",0),v("onSubmit",function(){return r.onSubmitFilter()}),i(1,"filters")(2,"div",1)(3,"div")(4,"label",2),p(5,"Channel"),a(),i(6,"ng-select",3),q("ngModelChange",function(s){return O(r.channelID,s)||(r.channelID=s),s}),u(7,me,3,3,"ng-template",4),a()()()(),i(8,"content")(9,"div",5)(10,"div",6)(11,"div",7),u(12,ce,21,13,"div",8),m(13,"async"),u(14,de,2,0,"div",9),a()()()()()),t&2){let o;d("hideSearchBox",!0),l(6),d("clearable",!0)("items",r.channelOptions),j("ngModel",r.channelID),l(6),R(((o=c(13,5,r.channelLogs$))==null||o.Data==null?null:o.Data.length)>0?12:14)}},dependencies:[k,V,W,J,ie,ne,oe,re,le,ae,te,ee,Y,Z,G,H,U],encapsulation:2})}}return n})();export{Oe as ChannelLogComponent};
@@ -1 +1 @@
1
- import{a as se,b as ce,c as ue}from"./chunk-V5BKQSAT.js";import{a as Ce}from"./chunk-UDZIOJVC.js";import{a as pe}from"./chunk-Q23GGWWT.js";import{a as de}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as me}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as ae}from"./chunk-WPW3D4MQ.js";import"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ie}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as te}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as oe,n as le}from"./chunk-CLER2MX6.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as ne,s as re}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as q,k as J,m as K,n as Q}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as F,Gc as a,Hc as v,Ic as E,Kc as f,Lc as _,Mb as x,Mc as g,Nc as A,Oc as R,Pc as j,Qc as H,Ra as I,Sc as U,Yb as c,Z as O,ac as D,ad as V,bd as G,dc as b,ec as k,gc as B,hc as z,ic as t,ja as N,jc as i,kc as u,oc as M,pa as y,pb as W,rb as l,tc as T,uc as C,v as L,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var P=(()=>{class n{constructor(){this.httpService=y(te)}getCompletedOrders(e){return this.httpService.post(ie.GetCompleted,e).pipe(L(m=>m?.Data||[]))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275prov=N({token:n,factory:n.\u0275fac})}}return n})();var _e=n=>({"td-cell-hover":n});function ge(n,h){if(n&1&&u(0,"variants-dropdown",29),n&2){let e=C().$implicit;c("variants",e==null?null:e.Variants)}}function he(n,h){if(n&1&&u(0,"variant-with-image",30),n&2){let e=C().$implicit;c("variant",e==null?null:e.Variants[0])}}function Se(n,h){if(n&1&&(t(0,"span"),a(1),i()),n&2){let e=C().$implicit;l(),E("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ve(n,h){if(n&1&&(t(0,"tr")(1,"td"),a(2),i(),t(3,"td")(4,"div",25)(5,"div",26)(6,"div"),u(7,"img",27),w(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",28),i()(),t(11,"small"),a(12),w(13,"date"),i()()(),t(14,"td"),a(15),i(),t(16,"td"),x(17,ge,1,1,"variants-dropdown",29)(18,he,1,1,"variant-with-image",30),i(),t(19,"td",31),a(20),w(21,"number"),i(),t(22,"td")(23,"div",25)(24,"div",26)(25,"span"),a(26),i(),x(27,Se,2,1,"span"),i(),t(28,"small"),a(29),i()()()()),n&2){let e=h.$implicit;l(2),v(e.Outlet),l(5),c("src",V(8,13,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(3),c("order",e),l(2),E(" ",G(13,15,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),v(e.Customer),l(),D(U(20,_e,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?17:18),l(3),v(V(21,18,e.Amount)),l(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),l(2),E(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function we(n,h){if(n&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",21),a(7,"Number"),i(),t(8,"th",21),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",22),a(13,"Amount"),i(),t(14,"th",23),a(15,"Shipping"),i()()(),t(16,"tbody"),B(17,ve,30,22,"tr",null,k),i()(),t(19,"app-custom-paginator",24),T("next",function(){d(e);let r=C();return s(r.initCompletedOrders())})("previous",function(){d(e);let r=C();return s(r.initCompletedOrders())}),i()()}if(n&2){let e=C(),m=j(0);l(17),z(m),l(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function ye(n,h){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Xe=(()=>{class n{constructor(){this.completedService=y(P),this.filter=I({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.completedService.getCompletedOrders(this.filter()).pipe(O(1))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275cmp=F({type:n,selectors:[["app-completed"]],features:[H([P])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[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,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,r){if(m&1){let p=M();A(0),w(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return d(p),s(r.initCompletedOrders())}),g("textChange",function(o){return d(p),_(r.filter().Number,o)||(r.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),i(),t(12,"channel-select-options",4),g("ngModelChange",function(o){return d(p),_(r.filter().ListChannelID,o)||(r.filter().ListChannelID=o),s(o)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),g("dateChange",function(o){return d(p),_(r.filter().From,o)||(r.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return d(p),_(r.filter().To,o)||(r.filter().To=o),s(o)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),g("ngModelChange",function(o){return d(p),_(r.filter().PageNumber,o)||(r.filter().PageNumber=o),s(o)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),g("ngModelChange",function(o){return d(p),_(r.filter().PageSize,o)||(r.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,we,20,2,"div",15)(33,ye,2,0,"div",16),i()()()()()}if(m&2){let p=R(V(1,8,r.completedOrders$));l(2),f("text",r.filter().Number),l(10),c("multiple",!0),f("ngModel",r.filter().ListChannelID),l(5),f("date",r.filter().From),l(2),f("date",r.filter().To),l(4),f("ngModel",r.filter().PageNumber),l(4),f("ngModel",r.filter().PageSize),l(5),b((p==null?null:p.length)>0?32:33)}},dependencies:[Q,q,K,J,le,oe,me,ae,ee,X,$,Y,Z,se,ce,ue,de,pe,re,ne,Ce],encapsulation:2})}}return n})();export{Xe as CompletedComponent};
1
+ import{a as se,b as ce,c as ue}from"./chunk-V5BKQSAT.js";import{a as Ce}from"./chunk-HCQDRRUB.js";import{a as pe}from"./chunk-XT4STZN6.js";import{a as de}from"./chunk-66MLRB2J.js";import"./chunk-M5JQ7BGW.js";import{a as me}from"./chunk-EPVCMYCI.js";import"./chunk-JDIBETL5.js";import"./chunk-L7K5HOBY.js";import"./chunk-74IXJYWO.js";import"./chunk-G47XGOST.js";import"./chunk-H3J5OAIG.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-IL5JIRWJ.js";import"./chunk-5OHRA4AS.js";import"./chunk-3BT5DR3X.js";import"./chunk-3RK6DDJD.js";import"./chunk-J2KWRDVH.js";import"./chunk-7SVF5UPT.js";import"./chunk-CMTBBXR5.js";import{a as ae}from"./chunk-WPW3D4MQ.js";import"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as ie}from"./chunk-5HO2IJ47.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{e as te}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as oe,n as le}from"./chunk-CLER2MX6.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as ne,s as re}from"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as q,k as J,m as K,n as Q}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as F,Gc as a,Hc as v,Ic as E,Kc as f,Lc as _,Mb as x,Mc as g,Nc as A,Oc as R,Pc as j,Qc as H,Ra as I,Sc as U,Yb as c,Z as O,ac as D,ad as V,bd as G,dc as b,ec as k,gc as B,hc as z,ic as t,ja as N,jc as i,kc as u,oc as M,pa as y,pb as W,rb as l,tc as T,uc as C,v as L,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var P=(()=>{class n{constructor(){this.httpService=y(te)}getCompletedOrders(e){return this.httpService.post(ie.GetCompleted,e).pipe(L(m=>m?.Data||[]))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275prov=N({token:n,factory:n.\u0275fac})}}return n})();var _e=n=>({"td-cell-hover":n});function ge(n,h){if(n&1&&u(0,"variants-dropdown",29),n&2){let e=C().$implicit;c("variants",e==null?null:e.Variants)}}function he(n,h){if(n&1&&u(0,"variant-with-image",30),n&2){let e=C().$implicit;c("variant",e==null?null:e.Variants[0])}}function Se(n,h){if(n&1&&(t(0,"span"),a(1),i()),n&2){let e=C().$implicit;l(),E("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ve(n,h){if(n&1&&(t(0,"tr")(1,"td"),a(2),i(),t(3,"td")(4,"div",25)(5,"div",26)(6,"div"),u(7,"img",27),w(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",28),i()(),t(11,"small"),a(12),w(13,"date"),i()()(),t(14,"td"),a(15),i(),t(16,"td"),x(17,ge,1,1,"variants-dropdown",29)(18,he,1,1,"variant-with-image",30),i(),t(19,"td",31),a(20),w(21,"number"),i(),t(22,"td")(23,"div",25)(24,"div",26)(25,"span"),a(26),i(),x(27,Se,2,1,"span"),i(),t(28,"small"),a(29),i()()()()),n&2){let e=h.$implicit;l(2),v(e.Outlet),l(5),c("src",V(8,13,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(3),c("order",e),l(2),E(" ",G(13,15,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),v(e.Customer),l(),D(U(20,_e,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?17:18),l(3),v(V(21,18,e.Amount)),l(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),l(2),E(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function we(n,h){if(n&1){let e=M();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",21),a(7,"Number"),i(),t(8,"th",21),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",22),a(13,"Amount"),i(),t(14,"th",23),a(15,"Shipping"),i()()(),t(16,"tbody"),B(17,ve,30,22,"tr",null,k),i()(),t(19,"app-custom-paginator",24),T("next",function(){d(e);let r=C();return s(r.initCompletedOrders())})("previous",function(){d(e);let r=C();return s(r.initCompletedOrders())}),i()()}if(n&2){let e=C(),m=j(0);l(17),z(m),l(2),c("filter",e.filter())("totaldata",m==null?null:m.length)}}function ye(n,h){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var Xe=(()=>{class n{constructor(){this.completedService=y(P),this.filter=I({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.completedService.getCompletedOrders(this.filter()).pipe(O(1))}static{this.\u0275fac=function(m){return new(m||n)}}static{this.\u0275cmp=F({type:n,selectors:[["app-completed"]],features:[H([P])],decls:34,vars:11,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[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,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,r){if(m&1){let p=M();A(0),w(1,"async"),t(2,"mainpanel",0),T("onSubmit",function(){return d(p),s(r.initCompletedOrders())}),g("textChange",function(o){return d(p),_(r.filter().Number,o)||(r.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),i(),t(12,"channel-select-options",4),g("ngModelChange",function(o){return d(p),_(r.filter().ListChannelID,o)||(r.filter().ListChannelID=o),s(o)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),g("dateChange",function(o){return d(p),_(r.filter().From,o)||(r.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return d(p),_(r.filter().To,o)||(r.filter().To=o),s(o)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),g("ngModelChange",function(o){return d(p),_(r.filter().PageNumber,o)||(r.filter().PageNumber=o),s(o)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),g("ngModelChange",function(o){return d(p),_(r.filter().PageSize,o)||(r.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,we,20,2,"div",15)(33,ye,2,0,"div",16),i()()()()()}if(m&2){let p=R(V(1,8,r.completedOrders$));l(2),f("text",r.filter().Number),l(10),c("multiple",!0),f("ngModel",r.filter().ListChannelID),l(5),f("date",r.filter().From),l(2),f("date",r.filter().To),l(4),f("ngModel",r.filter().PageNumber),l(4),f("ngModel",r.filter().PageSize),l(5),b((p==null?null:p.length)>0?32:33)}},dependencies:[Q,q,K,J,le,oe,me,ae,ee,X,$,Y,Z,se,ce,ue,de,pe,re,ne,Ce],encapsulation:2})}}return n})();export{Xe as CompletedComponent};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-Q23GGWWT.js";import"./chunk-AEJ5I5MW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-5HO2IJ47.js";import{e as J}from"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as j,e as F}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as G,n as U}from"./chunk-CLER2MX6.js";import{A as R,c as B,h as D,m as I}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as P,l as W,n as k}from"./chunk-M2FCTYGU.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as b,Mb as M,Mc as _,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as s,za as m}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return s(a),m(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(o){return s(a),b(r.selectedChannel,o)||(r.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(o){return s(a),b(r.orderNumber,o)||(r.orderNumber=o),m(o)}),t()()()()(),T(25),S(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),g("click",function(){s(a);let o=v(25);return m(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
1
+ import{a as Y}from"./chunk-XT4STZN6.js";import"./chunk-YFSXR7TL.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-5HO2IJ47.js";import{e as J}from"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import"./chunk-SWQXSJ7O.js";import"./chunk-AEOSNAHH.js";import{b as j,e as F}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as G,n as U}from"./chunk-CLER2MX6.js";import{A as R,c as B,h as D,m as I}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-YCH6HHU3.js";import"./chunk-B73M3AMU.js";import{j as P,l as W,n as k}from"./chunk-M2FCTYGU.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as b,Mb as M,Mc as _,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as s,za as m}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return s(a),m(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(o){return s(a),b(r.selectedChannel,o)||(r.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(o){return s(a),b(r.orderNumber,o)||(r.orderNumber=o),m(o)}),t()()()()(),T(25),S(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),g("click",function(){s(a);let o=v(25);return m(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};