marketplacepos 5.46.5 → 5.46.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/Marketplace/{chunk-OFEZTCJA.js → chunk-22ARBR7W.js} +1 -1
  2. package/Marketplace/{chunk-LEM7ESKJ.js → chunk-2BV7ZXRB.js} +1 -1
  3. package/Marketplace/{chunk-VEYUDPOA.js → chunk-2DLU2LJJ.js} +1 -1
  4. package/Marketplace/{chunk-6WE2RKUX.js → chunk-4HOZLG47.js} +1 -1
  5. package/Marketplace/{chunk-U23D2EPE.js → chunk-5BHSTOJT.js} +1 -1
  6. package/Marketplace/{chunk-HVA57ZPZ.js → chunk-5DTUHJSS.js} +1 -1
  7. package/Marketplace/{chunk-GHFADTRR.js → chunk-5EIQGYTB.js} +1 -1
  8. package/Marketplace/{chunk-WHV5AYGI.js → chunk-5KUKIH4H.js} +1 -1
  9. package/Marketplace/{chunk-BVV5R6HN.js → chunk-5Z5Y537T.js} +1 -1
  10. package/Marketplace/{chunk-C7YK5TDP.js → chunk-63ANFYRV.js} +1 -1
  11. package/Marketplace/{chunk-DGIH7HSJ.js → chunk-7TI3OR34.js} +1 -1
  12. package/Marketplace/{chunk-74AYYW2T.js → chunk-7WY57PVD.js} +1 -1
  13. package/Marketplace/{chunk-OG4QM5FO.js → chunk-7Y7SPMGZ.js} +1 -1
  14. package/Marketplace/{chunk-6NZJ2XKE.js → chunk-AWNZSJSP.js} +1 -1
  15. package/Marketplace/{chunk-7QKEL4DD.js → chunk-B2ZWLW3F.js} +1 -1
  16. package/Marketplace/{chunk-CO5XZENC.js → chunk-CBQUB3KW.js} +1 -1
  17. package/Marketplace/{chunk-5X2M3HM4.js → chunk-CRD4OUSG.js} +1 -1
  18. package/Marketplace/{chunk-KEW73FTY.js → chunk-CT73GC7O.js} +1 -1
  19. package/Marketplace/chunk-D2TELRO7.js +1 -0
  20. package/Marketplace/{chunk-6YBD22SK.js → chunk-EFB55SZR.js} +1 -1
  21. package/Marketplace/{chunk-UQL42ODX.js → chunk-ELZBUFG5.js} +1 -1
  22. package/Marketplace/chunk-EUYQST7Q.js +1 -0
  23. package/Marketplace/{chunk-CAK6MZUW.js → chunk-EXSI44LD.js} +1 -1
  24. package/Marketplace/{chunk-PHLSX23M.js → chunk-F2XHUFJC.js} +2 -2
  25. package/Marketplace/{chunk-MACYDQHW.js → chunk-F3GLNINI.js} +1 -1
  26. package/Marketplace/{chunk-DRVWJPA2.js → chunk-FHNST4Y7.js} +1 -1
  27. package/Marketplace/{chunk-XHBBUUIF.js → chunk-FKQ7ZVGD.js} +1 -1
  28. package/Marketplace/{chunk-WREH3C74.js → chunk-FOT5AJYX.js} +2 -2
  29. package/Marketplace/{chunk-RUXJCVKX.js → chunk-GSVFDIM6.js} +1 -1
  30. package/Marketplace/{chunk-5ZR5WIHG.js → chunk-GZS2MOSK.js} +1 -1
  31. package/Marketplace/{chunk-WY37QAZ4.js → chunk-JAWWMIGP.js} +1 -1
  32. package/Marketplace/{chunk-VIXNFSMT.js → chunk-JUJFPAAU.js} +1 -1
  33. package/Marketplace/{chunk-WBCI5HV5.js → chunk-JZDOMET2.js} +1 -1
  34. package/Marketplace/chunk-KTB223SK.js +1 -0
  35. package/Marketplace/{chunk-IJVKHW3C.js → chunk-KWHVCPX2.js} +1 -1
  36. package/Marketplace/{chunk-FYB62QQV.js → chunk-LLHPMXKP.js} +1 -1
  37. package/Marketplace/{chunk-VQIT62HE.js → chunk-LS7AO6KP.js} +1 -1
  38. package/Marketplace/{chunk-LRBJ5RU5.js → chunk-LXXEN7OV.js} +1 -1
  39. package/Marketplace/{chunk-6RCPPNMX.js → chunk-MGLOTL2T.js} +1 -1
  40. package/Marketplace/{chunk-7IOOG3TG.js → chunk-MZWTCBAF.js} +4 -4
  41. package/Marketplace/{chunk-774TVUXT.js → chunk-NDBC2CS6.js} +1 -1
  42. package/Marketplace/{chunk-57MSCWQ4.js → chunk-NFGFM7TW.js} +1 -1
  43. package/Marketplace/{chunk-TKV7XWBT.js → chunk-O2YNPIYM.js} +1 -1
  44. package/Marketplace/{chunk-7TQWJCUW.js → chunk-OGJMVAEL.js} +1 -1
  45. package/Marketplace/{chunk-XANN3R5J.js → chunk-OO2CSDGF.js} +1 -1
  46. package/Marketplace/{chunk-OLVWSY6L.js → chunk-P2AADVEN.js} +1 -1
  47. package/Marketplace/{chunk-SXFLJBXI.js → chunk-P2IQLBGG.js} +1 -1
  48. package/Marketplace/{chunk-KUYNX5QT.js → chunk-PTNJ3YC5.js} +1 -1
  49. package/Marketplace/{chunk-4BWA3J6V.js → chunk-QREUIGWW.js} +1 -1
  50. package/Marketplace/{chunk-BPAZ4TES.js → chunk-RGY4FVTG.js} +1 -1
  51. package/Marketplace/{chunk-RU43F4UK.js → chunk-T27ABFCP.js} +1 -1
  52. package/Marketplace/{chunk-LS2KMKMD.js → chunk-TI67Q3JR.js} +1 -1
  53. package/Marketplace/{chunk-RNZC6DAM.js → chunk-TMKLT3K2.js} +1 -1
  54. package/Marketplace/{chunk-QUEDQBZU.js → chunk-TWOIWWMO.js} +1 -1
  55. package/Marketplace/{chunk-74WQHBVN.js → chunk-URGPZLCB.js} +1 -1
  56. package/Marketplace/{chunk-GVXBDVLX.js → chunk-USBIAIK6.js} +1 -1
  57. package/Marketplace/{chunk-AY25KXUA.js → chunk-UYFUJBC4.js} +1 -1
  58. package/Marketplace/{chunk-L74PANZ5.js → chunk-V3ZRQKJA.js} +1 -1
  59. package/Marketplace/{chunk-UQFILVPA.js → chunk-WGCIF2R4.js} +2 -2
  60. package/Marketplace/{chunk-7ES3PHES.js → chunk-X4B2FYY3.js} +1 -1
  61. package/Marketplace/{chunk-JX63Y4CW.js → chunk-X52QA4QU.js} +1 -1
  62. package/Marketplace/{chunk-5EDCBXCE.js → chunk-XLWWNO5M.js} +1 -1
  63. package/Marketplace/{chunk-2REDCSBO.js → chunk-XONEJSCE.js} +1 -1
  64. package/Marketplace/{chunk-R5WARQUS.js → chunk-Y4XF2TXJ.js} +1 -1
  65. package/Marketplace/{chunk-HZPILY4V.js → chunk-YEDXFYTD.js} +1 -1
  66. package/Marketplace/{chunk-LSWILW54.js → chunk-YF4XELSP.js} +1 -1
  67. package/Marketplace/{chunk-2WHJU6CS.js → chunk-YU2SDRUC.js} +1 -1
  68. package/Marketplace/{chunk-RT3SMV6M.js → chunk-ZYQD6SBV.js} +1 -1
  69. package/Marketplace/index.html +4 -4
  70. package/Marketplace/{main-KIV2XNXR.js → main-YKZPM7WW.js} +1 -1
  71. package/package.json +1 -1
  72. package/Marketplace/chunk-EMJTQYVO.js +0 -1
  73. package/Marketplace/chunk-OLANEXLB.js +0 -1
  74. package/Marketplace/chunk-RXQX7567.js +0 -1
@@ -1 +1 @@
1
- import{b as w}from"./chunk-5ZR5WIHG.js";import"./chunk-ACIMXBIC.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import{m as k,n as B}from"./chunk-HJXYT6MI.js";import"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{E as P,H as T,J as R,g as D,j as C,k as b,m as y,n as M}from"./chunk-FXQKRJWU.js";import{$c as c,Gb as h,Gc as n,Hc as d,Ic as _,Mb as s,Yb as m,aa as I,ad as E,bd as x,ic as i,jc as t,lc as f,mc as u,rb as o,uc as S,v as g,xb as v}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function N(a,p){if(a&1&&(i(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),n(4,"Perflog"),t()(),i(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),n(9),t()()()()()()),a&2){let e=S().ngIf;o(9),d(e.Perflog)}}function L(a,p){if(a&1&&(f(0),i(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),n(5,"StackTrace"),t()(),i(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),n(10),t()()()()()(),u()),a&2){let e=S().ngIf;o(10),d(e==null?null:e.StackTrace)}}function A(a,p){if(a&1&&(f(0),i(1,"mainpanel",1)(2,"actions")(3,"a",2),n(4,"Back"),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),n(12,"General"),t()(),i(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),n(18,"Created Date"),t(),i(19,"div")(20,"span"),n(21),c(22,"date"),t()()()(),i(23,"div",10)(24,"div",11)(25,"label"),n(26,"Status"),t(),i(27,"div")(28,"span"),n(29),t()()()()(),i(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),n(34,"Duration"),t(),i(35,"div")(36,"span"),n(37),c(38,"number"),t()()()(),i(39,"div",10)(40,"div",11)(41,"label"),n(42,"Label"),t(),i(43,"div")(44,"span"),n(45),t()()()()()()()()(),i(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),n(51,"Message"),t()(),i(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),n(56),t()()()()()(),s(57,N,10,1,"div",16)(58,L,11,1,"ng-container",0),t()()()(),u()),a&2){let e=p.ngIf;o(),m("headerTitle","Notification "+e.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),o(20),d(x(22,10,e.Created,"dd MMM yyyy HH:mm:ss")),o(8),d(e.StatusLabel),o(8),_("",x(38,13,e.DurationInSecond,"1.1-1")," s"),o(8),d(e.Label),o(11),d(e.Message),o(),m("ngIf",e==null?null:e.Perflog),o(),m("ngIf",e==null?null:e.StackTrace)}}var K=(()=>{class a{constructor(e,r){this.activatedRoute=e,this.notificationService=r}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(I(e=>{let r=e.ID;return this.notificationService.getNotificationDetail(r).pipe(g(l=>(l.DurationInSecond=parseInt(l.Duration)/1e3,l)))}))}static{this.\u0275fac=function(r){return new(r||a)(v(P),v(w))}}static{this.\u0275cmp=h({type:a,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(r,l){r&1&&(s(0,A,59,16,"ng-container",0),c(1,"async")),r&2&&m("ngIf",E(1,1,l.notification$))},dependencies:[M,D,C,y,b,B,k,R,T],encapsulation:2})}}return a})();export{K as DetailComponent};
1
+ import{b as w}from"./chunk-GZS2MOSK.js";import"./chunk-ACIMXBIC.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as k,n as B}from"./chunk-HJXYT6MI.js";import"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{E as P,H as T,J as R,g as D,j as C,k as b,m as y,n as M}from"./chunk-FXQKRJWU.js";import{$c as c,Gb as h,Gc as n,Hc as d,Ic as _,Mb as s,Yb as m,aa as I,ad as E,bd as x,ic as i,jc as t,lc as f,mc as u,rb as o,uc as S,v as g,xb as v}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function N(a,p){if(a&1&&(i(0,"div",10)(1,"div",13)(2,"div",7)(3,"h5"),n(4,"Perflog"),t()(),i(5,"div",8)(6,"div",14)(7,"div",15)(8,"pre"),n(9),t()()()()()()),a&2){let e=S().ngIf;o(9),d(e.Perflog)}}function L(a,p){if(a&1&&(f(0),i(1,"div",17)(2,"div",13)(3,"div",7)(4,"h5"),n(5,"StackTrace"),t()(),i(6,"div",8)(7,"div",14)(8,"div",15)(9,"pre"),n(10),t()()()()()(),u()),a&2){let e=S().ngIf;o(10),d(e==null?null:e.StackTrace)}}function A(a,p){if(a&1&&(f(0),i(1,"mainpanel",1)(2,"actions")(3,"a",2),n(4,"Back"),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h5"),n(12,"General"),t()(),i(13,"div",8)(14,"div",9)(15,"div",10)(16,"div",11)(17,"label"),n(18,"Created Date"),t(),i(19,"div")(20,"span"),n(21),c(22,"date"),t()()()(),i(23,"div",10)(24,"div",11)(25,"label"),n(26,"Status"),t(),i(27,"div")(28,"span"),n(29),t()()()()(),i(30,"div",12)(31,"div",10)(32,"div",11)(33,"label"),n(34,"Duration"),t(),i(35,"div")(36,"span"),n(37),c(38,"number"),t()()()(),i(39,"div",10)(40,"div",11)(41,"label"),n(42,"Label"),t(),i(43,"div")(44,"span"),n(45),t()()()()()()()()(),i(46,"div",4)(47,"div",10)(48,"div",13)(49,"div",7)(50,"h5"),n(51,"Message"),t()(),i(52,"div",8)(53,"div",14)(54,"div",15)(55,"pre"),n(56),t()()()()()(),s(57,N,10,1,"div",16)(58,L,11,1,"ng-container",0),t()()()(),u()),a&2){let e=p.ngIf;o(),m("headerTitle","Notification "+e.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),o(20),d(x(22,10,e.Created,"dd MMM yyyy HH:mm:ss")),o(8),d(e.StatusLabel),o(8),_("",x(38,13,e.DurationInSecond,"1.1-1")," s"),o(8),d(e.Label),o(11),d(e.Message),o(),m("ngIf",e==null?null:e.Perflog),o(),m("ngIf",e==null?null:e.StackTrace)}}var K=(()=>{class a{constructor(e,r){this.activatedRoute=e,this.notificationService=r}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(I(e=>{let r=e.ID;return this.notificationService.getNotificationDetail(r).pipe(g(l=>(l.DurationInSecond=parseInt(l.Duration)/1e3,l)))}))}static{this.\u0275fac=function(r){return new(r||a)(v(P),v(w))}}static{this.\u0275cmp=h({type:a,selectors:[["app-detail"]],decls:2,vars:3,consts:[[4,"ngIf"],[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],["class","col-sm-6",4,"ngIf"],[1,"col-sm-12"]],template:function(r,l){r&1&&(s(0,A,59,16,"ng-container",0),c(1,"async")),r&2&&m("ngIf",E(1,1,l.notification$))},dependencies:[M,D,C,y,b,B,k,R,T],encapsulation:2})}}return a})();export{K as DetailComponent};
@@ -1 +1 @@
1
- import{a as q}from"./chunk-IITU3NV6.js";import{a as j,b as V}from"./chunk-PGP3WHIS.js";import{na as $}from"./chunk-RC5PUUVM.js";import{b as s,c as a}from"./chunk-RXQX7567.js";import{A as F,a as R,h as A,m as D}from"./chunk-5PS6ZS3N.js";import{a as I}from"./chunk-V3USB3ZU.js";import{r as U,s as W}from"./chunk-MFQQEEHJ.js";import{j as O,n as z}from"./chunk-FXQKRJWU.js";import{$c as E,Ga as _,Gb as w,Gc as y,Ic as M,Ka as T,Kc as v,Lc as L,Mb as g,Mc as P,Oa as h,Qc as B,Ra as c,Yb as d,Z as S,ad as x,dc as k,ia as b,ic as u,jc as r,pa as m,rb as p,tc as f,uc as N,v as C}from"./chunk-OJMQBH6T.js";function J(n,G){if(n&1&&(u(0,"div",4),y(1),r()),n&2){let e=N();p(),M(" ",e.selectedCategoryLabel()," ")}}function K(n,G){n&1&&(u(0,"label",3),y(1,"Channel"),r())}var he=(()=>{class n{constructor(){this.multiwarehousTreeService=m(q),this.destroyRef=m(_),this.selectedCategoryLabel=c("Select a Channel"),this.disabled=c(!1),this.selectedNode=c(null),this.multiple=h(!1),this.floatingLabel=h(!1),this.onChannelChange=new T,this.channels$=this.multiwarehousTreeService.getChannelTree$().pipe(C(e=>e.map(t=>{t.children=t.children.map(i=>(i.icon="fa-solid fa-warehouse",i));let o=this.getChannelType(t.typeid);return t.icon=`custom-icon-${o}`,t.expandedIcon=null,t.collapsedIcon=null,t.styleClass=`custom-icon-${o}`,t.logo=a.getChannelLogoByTypeId(t.typeid),t})),S(1)),this.htmlBody=document.querySelector("body"),this.onChange=e=>{},this.onTouched=()=>{}}getChannelType(e){switch(e){case s.Tokopedia:return"tokopedia";case s.Shopee:return"shopee";case s.Lazada:return"lazada";case s.Shopify:return"shopify";case s.WooCommerce:return"woocommerce";case s.Tiktok:return"tiktok";case s.Plugo:return"plugo";case s.ShopifyV2:return"shopify"}}initSelectedNode(e){this.channels$.pipe(I(this.destroyRef)).subscribe(t=>{if(this.multiple()){let o=[];for(let i of e){let l=a.searchByIdWithParentDFS(t,i),H=Object.assign({},l);o.push(H)}this.selectedNode.set(o),this.emitMultipleNodes()}else{let o=a.searchByIdWithParentDFS(t,e),i=Object.assign({},o);this.selectedNode.set(i),this.emitSingleNode(i)}})}onNodeSelect(e){let t=Object.assign({},e.node);this.multiple()?this.emitMultipleNodes():this.emitSingleNode(t)}emitMultipleNodes(){let e=Object.assign([],this.selectedNode()),t=e.map(o=>o.id);this.onChange(t),this.onChannelChange.emit(e),this.generateLabel()}emitSingleNode(e){this.onChange(e.id),this.onChannelChange.emit(e),this.generateLabel()}onNodeUnSelect(e){if(this.multiple()){let t=e.node;this.selectedNode.update(o=>o.filter(i=>i.id!==t.id)),this.emitMultipleNodes(),this.generateLabel()}}generateLabel(){let e="Select a Channel";if(this.multiple()){e="";for(let t of this.selectedNode())e+=a.getLabelPathTree(t)+", ";this.selectedCategoryLabel.set(e)}else{let t=this.selectedNode();t?(e=a.getLabelPathTree(t),this.selectedCategoryLabel.set(e)):this.selectedCategoryLabel.set(e)}}onClear(){this.onChange(null)}onClick(){let e=this.getBodyTop(),t=document.querySelector(".p-overlay.p-component"),o=e+t.getBoundingClientRect().top,i=t.getAttribute("style")||"";t.setAttribute("style",`${i} top: ${o+e}px;`)}getBodyTop(){return this.htmlBody.getBoundingClientRect().top*-1}writeValue(e){a.IsNotEmpty(e)&&this.initSelectedNode(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["multiwarehouse-tree-select"]],inputs:{multiple:[1,"multiple"],floatingLabel:[1,"floatingLabel"]},outputs:{onChannelChange:"onChannelChange"},features:[B([{provide:R,useExisting:b(()=>n),multi:!0}])],decls:5,vars:9,consts:[["matTooltipPosition","above",1,"p-float-label",3,"matTooltip"],["appendTo","body","containerStyleClass","w-100","id","selectChannel",1,"multiwarehouse-select",3,"click","onNodeSelect","ngModelChange","onClear","onNodeUnselect","filter","filterInputAutoFocus","options","ngModel","selectionMode"],["pTemplate","value","type","default"],["for","selectChannel"],["matTooltipPosition","above"]],template:function(t,o){t&1&&(u(0,"span",0)(1,"p-treeSelect",1),E(2,"async"),f("click",function(){return o.onClick()})("onNodeSelect",function(l){return o.onNodeSelect(l)}),P("ngModelChange",function(l){return L(o.selectedNode,l)||(o.selectedNode=l),l}),f("onClear",function(){return o.onClear()})("onNodeUnselect",function(l){return o.onNodeUnSelect(l)}),g(3,J,2,1,"ng-template",2),r(),g(4,K,2,0,"label",3),r()),t&2&&(d("matTooltip",o.selectedCategoryLabel()),p(),d("filter",!0)("filterInputAutoFocus",!0)("options",x(2,7,o.channels$)),v("ngModel",o.selectedNode),d("selectionMode",o.multiple()?"multiple":"single"),p(3),k(o.floatingLabel()?4:-1))},dependencies:[z,O,V,j,$,F,A,D,W,U],styles:["[_nghost-%COMP%] .p-treeselect{width:100%;display:inline-flex;border:1px solid #ced4da;font-size:.875rem!important} .p-element .p-icon-wrapper{width:14px} .p-float-label .multiwarehouse-select.p-treeselect{padding:7px!important;min-height:.6rem!important} .custom-icon-tokopedia.p-tree-node-icon, .custom-icon-shopee.p-tree-node-icon, .custom-icon-woocommerce.p-tree-node-icon, .custom-icon-lazada.p-tree-node-icon, .custom-icon-tiktok.p-tree-node-icon, .custom-icon-shopify.p-tree-node-icon, .custom-icon-plugo.p-tree-node-icon{background-size:contain;background-repeat:no-repeat;width:20px;height:20px;display:inline-block} .custom-icon-tokopedia.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png)} .custom-icon-woocommerce.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp)} .custom-icon-shopee.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png)} .custom-icon-tiktok.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png)} .custom-icon-lazada.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png)} .custom-icon-shopify.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png)} .custom-icon-plugo.p-tree-node-icon{background-image:url(https://res.cloudinary.com/pos/image/upload/v1739236419/icons/marketplace_icons/plugo.ico)} .custom-icon-shopee .fa-warehouse.p-tree-node-icon, .custom-icon-tiktok .fa-warehouse.p-tree-node-icon, .custom-icon-tokopedia .fa-warehouse.p-tree-node-icon, .custom-icon-lazada .fa-warehouse.p-tree-node-icon, .custom-icon-shopify .fa-warehouse.p-tree-node-icon, .custom-icon-woocommerce .fa-warehouse.p-tree-node-icon, .custom-icon-plugo .fa-warehouse.p-tree-node-icon{background-image:none!important;display:inline-block!important}"]})}}return n})();export{he as a};
1
+ import{a as q}from"./chunk-IITU3NV6.js";import{a as j,b as V}from"./chunk-PGP3WHIS.js";import{na as $}from"./chunk-RC5PUUVM.js";import{b as s,c as a}from"./chunk-EUYQST7Q.js";import{A as F,a as R,h as A,m as D}from"./chunk-5PS6ZS3N.js";import{a as I}from"./chunk-V3USB3ZU.js";import{r as U,s as W}from"./chunk-MFQQEEHJ.js";import{j as O,n as z}from"./chunk-FXQKRJWU.js";import{$c as E,Ga as _,Gb as w,Gc as y,Ic as M,Ka as T,Kc as v,Lc as L,Mb as g,Mc as P,Oa as h,Qc as B,Ra as c,Yb as d,Z as S,ad as x,dc as k,ia as b,ic as u,jc as r,pa as m,rb as p,tc as f,uc as N,v as C}from"./chunk-OJMQBH6T.js";function J(n,G){if(n&1&&(u(0,"div",4),y(1),r()),n&2){let e=N();p(),M(" ",e.selectedCategoryLabel()," ")}}function K(n,G){n&1&&(u(0,"label",3),y(1,"Channel"),r())}var he=(()=>{class n{constructor(){this.multiwarehousTreeService=m(q),this.destroyRef=m(_),this.selectedCategoryLabel=c("Select a Channel"),this.disabled=c(!1),this.selectedNode=c(null),this.multiple=h(!1),this.floatingLabel=h(!1),this.onChannelChange=new T,this.channels$=this.multiwarehousTreeService.getChannelTree$().pipe(C(e=>e.map(t=>{t.children=t.children.map(i=>(i.icon="fa-solid fa-warehouse",i));let o=this.getChannelType(t.typeid);return t.icon=`custom-icon-${o}`,t.expandedIcon=null,t.collapsedIcon=null,t.styleClass=`custom-icon-${o}`,t.logo=a.getChannelLogoByTypeId(t.typeid),t})),S(1)),this.htmlBody=document.querySelector("body"),this.onChange=e=>{},this.onTouched=()=>{}}getChannelType(e){switch(e){case s.Tokopedia:return"tokopedia";case s.Shopee:return"shopee";case s.Lazada:return"lazada";case s.Shopify:return"shopify";case s.WooCommerce:return"woocommerce";case s.Tiktok:return"tiktok";case s.Plugo:return"plugo";case s.ShopifyV2:return"shopify"}}initSelectedNode(e){this.channels$.pipe(I(this.destroyRef)).subscribe(t=>{if(this.multiple()){let o=[];for(let i of e){let l=a.searchByIdWithParentDFS(t,i),H=Object.assign({},l);o.push(H)}this.selectedNode.set(o),this.emitMultipleNodes()}else{let o=a.searchByIdWithParentDFS(t,e),i=Object.assign({},o);this.selectedNode.set(i),this.emitSingleNode(i)}})}onNodeSelect(e){let t=Object.assign({},e.node);this.multiple()?this.emitMultipleNodes():this.emitSingleNode(t)}emitMultipleNodes(){let e=Object.assign([],this.selectedNode()),t=e.map(o=>o.id);this.onChange(t),this.onChannelChange.emit(e),this.generateLabel()}emitSingleNode(e){this.onChange(e.id),this.onChannelChange.emit(e),this.generateLabel()}onNodeUnSelect(e){if(this.multiple()){let t=e.node;this.selectedNode.update(o=>o.filter(i=>i.id!==t.id)),this.emitMultipleNodes(),this.generateLabel()}}generateLabel(){let e="Select a Channel";if(this.multiple()){e="";for(let t of this.selectedNode())e+=a.getLabelPathTree(t)+", ";this.selectedCategoryLabel.set(e)}else{let t=this.selectedNode();t?(e=a.getLabelPathTree(t),this.selectedCategoryLabel.set(e)):this.selectedCategoryLabel.set(e)}}onClear(){this.onChange(null)}onClick(){let e=this.getBodyTop(),t=document.querySelector(".p-overlay.p-component"),o=e+t.getBoundingClientRect().top,i=t.getAttribute("style")||"";t.setAttribute("style",`${i} top: ${o+e}px;`)}getBodyTop(){return this.htmlBody.getBoundingClientRect().top*-1}writeValue(e){a.IsNotEmpty(e)&&this.initSelectedNode(e)}registerOnChange(e){this.onChange=e}registerOnTouched(e){this.onTouched=e}setDisabledState(e){this.disabled.set(e)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["multiwarehouse-tree-select"]],inputs:{multiple:[1,"multiple"],floatingLabel:[1,"floatingLabel"]},outputs:{onChannelChange:"onChannelChange"},features:[B([{provide:R,useExisting:b(()=>n),multi:!0}])],decls:5,vars:9,consts:[["matTooltipPosition","above",1,"p-float-label",3,"matTooltip"],["appendTo","body","containerStyleClass","w-100","id","selectChannel",1,"multiwarehouse-select",3,"click","onNodeSelect","ngModelChange","onClear","onNodeUnselect","filter","filterInputAutoFocus","options","ngModel","selectionMode"],["pTemplate","value","type","default"],["for","selectChannel"],["matTooltipPosition","above"]],template:function(t,o){t&1&&(u(0,"span",0)(1,"p-treeSelect",1),E(2,"async"),f("click",function(){return o.onClick()})("onNodeSelect",function(l){return o.onNodeSelect(l)}),P("ngModelChange",function(l){return L(o.selectedNode,l)||(o.selectedNode=l),l}),f("onClear",function(){return o.onClear()})("onNodeUnselect",function(l){return o.onNodeUnSelect(l)}),g(3,J,2,1,"ng-template",2),r(),g(4,K,2,0,"label",3),r()),t&2&&(d("matTooltip",o.selectedCategoryLabel()),p(),d("filter",!0)("filterInputAutoFocus",!0)("options",x(2,7,o.channels$)),v("ngModel",o.selectedNode),d("selectionMode",o.multiple()?"multiple":"single"),p(3),k(o.floatingLabel()?4:-1))},dependencies:[z,O,V,j,$,F,A,D,W,U],styles:["[_nghost-%COMP%] .p-treeselect{width:100%;display:inline-flex;border:1px solid #ced4da;font-size:.875rem!important} .p-element .p-icon-wrapper{width:14px} .p-float-label .multiwarehouse-select.p-treeselect{padding:7px!important;min-height:.6rem!important} .custom-icon-tokopedia.p-tree-node-icon, .custom-icon-shopee.p-tree-node-icon, .custom-icon-woocommerce.p-tree-node-icon, .custom-icon-lazada.p-tree-node-icon, .custom-icon-tiktok.p-tree-node-icon, .custom-icon-shopify.p-tree-node-icon, .custom-icon-plugo.p-tree-node-icon{background-size:contain;background-repeat:no-repeat;width:20px;height:20px;display:inline-block} .custom-icon-tokopedia.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1598262221/icons/marketplace_icons/tokopedia.png)} .custom-icon-woocommerce.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/w_50/v1632447439/icons/WooCommerce/woocommerce-icon.webp)} .custom-icon-shopee.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1598262220/icons/marketplace_icons/shopee.png)} .custom-icon-tiktok.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/w_30/v1645761611/icons/Marketplace%20logo/tiktok.png)} .custom-icon-lazada.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1680681836/icons/marketplace_icons/Lazadanew.png)} .custom-icon-shopify.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1707987435/icons/marketplace_icons/shopify.png)} .custom-icon-plugo.p-tree-node-icon{background-image:url(https://resc.cloudinary.com/pos/image/upload/v1739236419/icons/marketplace_icons/plugo.ico)} .custom-icon-shopee .fa-warehouse.p-tree-node-icon, .custom-icon-tiktok .fa-warehouse.p-tree-node-icon, .custom-icon-tokopedia .fa-warehouse.p-tree-node-icon, .custom-icon-lazada .fa-warehouse.p-tree-node-icon, .custom-icon-shopify .fa-warehouse.p-tree-node-icon, .custom-icon-woocommerce .fa-warehouse.p-tree-node-icon, .custom-icon-plugo .fa-warehouse.p-tree-node-icon{background-image:none!important;display:inline-block!important}"]})}}return n})();export{he as a};
@@ -1 +1 @@
1
- import{a as be,b as ye}from"./chunk-TKV7XWBT.js";import{a as fe,b as Te}from"./chunk-YTCIQBSO.js";import{b as he}from"./chunk-IHSGQFDX.js";import{a as xe}from"./chunk-HIC5QC3Y.js";import{a as F}from"./chunk-UMP6ZMEJ.js";import{a as Ce}from"./chunk-C7YK5TDP.js";import{i as pe}from"./chunk-OLVWSY6L.js";import{c as z}from"./chunk-RXQX7567.js";import{d as ge,h as ue}from"./chunk-HJXYT6MI.js";import{A as le,b as oe,h as re,m as ae}from"./chunk-5PS6ZS3N.js";import{a as ce,b as _e,c as se}from"./chunk-ERXVXBTU.js";import{r as me,s as de}from"./chunk-MFQQEEHJ.js";import{d as J,f as Q,g as ee,i as te,m as ne,n as ie}from"./chunk-FXQKRJWU.js";import{$c as $,Fc as b,G as H,Gb as K,Gc as m,Hc as O,Ic as y,Ka as R,Kc as k,Lc as D,Mb as p,Mc as N,Oa as j,Ra as B,Sc as T,Tc as Y,Yb as s,ad as W,bd as G,ca as Z,cd as w,dc as S,ec as E,f as A,gc as M,hc as V,ic as c,jc as _,kc as I,lc as x,mc as h,nc as L,oc as C,pa as q,pb as v,rb as a,tc as f,uc as o,xb as P,xc as X,ya as d,za as g}from"./chunk-OJMQBH6T.js";var U=t=>[t],Se=t=>({"text-decoration-line-through":t}),Ie=t=>({"text-danger":t}),we=(t,l)=>({"bg-gradient-warning":t,"cell-hover pointer":l});function Fe(t,l){if(t&1){let e=C();c(0,"mat-slide-toggle",13),f("toggleChange",function(){d(e);let n=o();return n.toggleStatus=!n.toggleStatus,g(n.onToggle())}),c(1,"small",14),m(2),_()()}if(t&2){let e=o();a(2),y(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function Pe(t,l){if(t&1){let e=C();c(0,"th")(1,"input",16),N("ngModelChange",function(n){d(e);let r=o(2);return D(r.checkboxState,n)||(r.checkboxState=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(2);return g(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Ee(t,l){if(t&1&&(p(0,Pe,2,1,"ng-template",15),c(1,"th",11),m(2,"POS"),_()),t&2){let e=o();s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Me(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),I(4,"img",20),c(5,"div",21),m(6),$(7,"stringLimit"),_()()()(),h()),t&2){let e=l.$implicit;a(3),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),s("src",e==null?null:e.Img,v),a(2),y(" ",G(7,3,e.Name,20)," ")}}function Ve(t,l){t&1&&L(0)}function Oe(t,l){if(t&1&&p(0,Ve,1,0,"ng-container",33),t&2){o(2);let e=b(7);s("ngTemplateOutlet",e)}}function ke(t,l){if(t&1&&(x(0),p(1,Oe,1,1,"ng-template",15),h()),t&2){let e=o(4);a(),s("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function De(t,l){t&1&&L(0)}function Ne(t,l){if(t&1&&p(0,De,1,0,"ng-container",33),t&2){o(2);let e=b(7);s("ngTemplateOutlet",e)}}function $e(t,l){if(t&1&&p(0,Ne,1,1,"ng-template",15),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ue(t,l){if(t&1){let e=C();x(0),c(1,"div")(2,"input",34),N("ngModelChange",function(n){d(e);let r=o(4).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(4).$implicit,r=o();return g(r.onCheckboxStateProduct(n.ID))}),_()(),h()}if(t&2){let e=o(4).$implicit;a(2),k("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function Re(t,l){if(t&1&&p(0,Ue,3,2,"ng-container",22),t&2){let e=o(3).$implicit;s("ngIf",(e==null||e.Variants==null?null:e.Variants.length)>1)}}function je(t,l){if(t&1){let e=C();x(0),c(1,"img",35),f("click",function(n){d(e);let r=o(3).$implicit,u=o();return g(u.onZoomImage(n,r==null?null:r.ImageUrl))}),_(),h()}if(t&2){let e=o(3).$implicit;a(),X("src",e==null?null:e.ThumbnailUrl,v)}}function Be(t,l){t&1&&I(0,"img",36)}function Le(t,l){if(t&1&&(x(0),c(1,"td",28)(2,"div",29),p(3,ke,2,3,"ng-container",30)(4,$e,1,3,"ng-template",null,0,w)(6,Re,1,1,"ng-template",null,1,w),c(8,"div"),p(9,je,2,1,"ng-container",30)(10,Be,1,0,"ng-template",null,2,w),_()()(),c(12,"td",31)(13,"div"),m(14),_(),c(15,"small",32),m(16),_()(),h()),t&2){let e=b(5),i=b(11),n=o(2).$implicit,r=o();a(),s("rowSpan",n==null?null:n.Variants.length),a(2),s("ngIf",r.table=="inventory")("ngIfElse",e),a(6),s("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",i),a(3),s("rowSpan",n==null?null:n.Variants.length),a(2),O(n==null?null:n.Name),a(),s("ngClass",T(9,Ie,!(n!=null&&n.Category))),a(),y("(",n!=null&&n.Category?n==null?null:n.Category:"Not Found In POS",")")}}function We(t,l){if(t&1&&(c(0,"a",27),I(1,"i",37),_()),t&2){let e=o().$implicit,i=o(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function ze(t,l){if(t&1){let e=C();c(0,"input",40),N("ngModelChange",function(n){d(e);let r=o(3).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function Ae(t,l){if(t&1&&(c(0,"td",38),p(1,ze,1,2,"input",39),_()),t&2){let e=o(2).$implicit,i=o(2);a(),s("ngIf",i.printPOS(e)>=0||i.table=="price")}}function He(t,l){if(t&1&&(p(0,Ae,2,1,"ng-template",15),c(1,"td",24),m(2),$(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);s("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),O(W(3,2,i.printPOS(e)))}}function Ze(t,l){if(t&1){let e=C();x(0),c(1,"td",41),f("click",function(){d(e);let n=o().$implicit,r=o().$implicit,u=o().$implicit,ve=o();return g(ve.onUpdateData(u.Name,r,n.ID,u.ChannelItemID))}),c(2,"div",42)(3,"div",43),m(4),$(5,"number"),_(),c(6,"a",44),f("click",function(n){return d(e),g(n==null?null:n.stopPropagation())}),I(7,"i",37),_()()(),h()}if(t&2){let e=l.$implicit,i=o(2).$implicit,n=o(2);a(),s("ngClass",Y(5,we,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table=="price"||n.hasInventoryEdit()&&n.table=="inventory")),a(3),y(" ",W(5,3,n.printItem(e))," "),a(2),s("href",e.Url,v)}}function qe(t,l){t&1&&(c(0,"td",45)(1,"div",42)(2,"span"),m(3,"X"),_()()())}function Ke(t,l){if(t&1&&p(0,Ze,8,8,"ng-container",30)(1,qe,4,0,"ng-template",null,3,w),t&2){let e=l.$implicit,i=b(2),n=o().$implicit,r=o(2);s("ngIf",r.getItemFromChannel(n,e))("ngIfElse",i)}}function Xe(t,l){if(t&1&&(c(0,"tr"),p(1,Le,17,11,"ng-container",22),c(2,"td",23),m(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),m(7),_(),c(8,"div",21),p(9,We,2,1,"a",27),_()()(),p(10,He,4,6),M(11,Ke,3,2,null,null,E),_()),t&2){let e=l.$implicit,i=l.$index,n=o().$implicit,r=o();a(),s("ngIf",i==0),a(2),O(e==null?null:e.Model),a(2),s("matTooltip",e.Discontinued?r.discontinuedVariantMsg:""),a(),s("ngClass",T(7,Se,e.Discontinued)),a(),y(" ",e.Code," "),a(2),S(n.Category?9:-1),a(),S(r.hiddenIPOSInventory()==!1?10:-1),a(),V(r.channel)}}function Ye(t,l){if(t&1&&(c(0,"tbody"),M(1,Xe,13,9,"tr",null,E),_()),t&2){let e=l.$implicit;a(),V(e.Variants)}}var vt=(()=>{class t{constructor(e,i,n){this.dialog=e,this.biggerPictureService=i,this.authService=n,this.permissionsService=q(ce),this.showProductToggle=!1,this.multiwarehouse=j(!1),this.hiddenIPOSInventory=j(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=F.PriceUpdate,this.roleInventoryUpdate=F.InventoryUpdate,this.hasPriceEdit=B(!1),this.hasInventoryEdit=B(!1),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.onSubmit=new R,this.destroy$=new A,this.toggle=new R,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles(),this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(F.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(F.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(r=>(r.selected=n.selected,r)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState,i)),e))}getItemFromChannel(e,i){return e.Channel.find(r=>z.IsNotEmpty(i.LocationID)?r.LocationID==i.LocationID:r.ChannelID==i.ID)}printItem(e){if(this.table=="inventory")return e.Inventory;if(this.table=="price")return e.Price}onUpdateData(e,i,n,r){this.hasPriceEdit()&&this.table=="price"&&this.onOpenDialogUpdate(e,i,n,r),this.hasInventoryEdit()&&this.table=="inventory"&&this.onOpenDialogUpdate(e,i,n,r)}onOpenDialogUpdate(e,i,n,r){this.dialog.open(be,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table,ChannelItemID:r}}).afterClosed().pipe(H(u=>z.IsNotEmpty(u)),Z(this.destroy$)).subscribe(u=>{this.onSubmit.emit(u)})}printPOS(e){return this.table=="inventory"?e.Inventory?e.Inventory:0:this.table=="price"?e.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)(P(ge),P(Ce),P(pe))}}static{this.\u0275cmp=K({type:t,selectors:[["app-table"]],inputs:{data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:17,vars:3,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(i,n){i&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),m(7,"Product"),_(),p(8,Fe,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),m(10,"Variant"),_(),c(11,"th",11),m(12,"SKU"),_(),p(13,Ee,3,3)(14,Me,8,6,"ng-container",12),_()(),M(15,Ye,3,0,"tbody",null,E),_()()),i&2&&(a(8),S(n.showProductToggle?8:-1),a(5),S(n.hiddenIPOSInventory()==!1?13:-1),a(),s("ngForOf",n.channel),a(),V(n.data))},dependencies:[ie,J,Q,ee,te,ne,le,oe,re,ae,Te,fe,ue,xe,he,se,_e,de,me,ye],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]})}}return t})();export{vt as a};
1
+ import{a as be,b as ye}from"./chunk-O2YNPIYM.js";import{a as fe,b as Te}from"./chunk-YTCIQBSO.js";import{b as he}from"./chunk-IHSGQFDX.js";import{a as xe}from"./chunk-HIC5QC3Y.js";import{a as F}from"./chunk-UMP6ZMEJ.js";import{a as Ce}from"./chunk-63ANFYRV.js";import{i as pe}from"./chunk-P2AADVEN.js";import{c as z}from"./chunk-EUYQST7Q.js";import{d as ge,h as ue}from"./chunk-HJXYT6MI.js";import{A as le,b as oe,h as re,m as ae}from"./chunk-5PS6ZS3N.js";import{a as ce,b as _e,c as se}from"./chunk-ERXVXBTU.js";import{r as me,s as de}from"./chunk-MFQQEEHJ.js";import{d as J,f as Q,g as ee,i as te,m as ne,n as ie}from"./chunk-FXQKRJWU.js";import{$c as $,Fc as b,G as H,Gb as K,Gc as m,Hc as O,Ic as y,Ka as R,Kc as k,Lc as D,Mb as p,Mc as N,Oa as j,Ra as B,Sc as T,Tc as Y,Yb as s,ad as W,bd as G,ca as Z,cd as w,dc as S,ec as E,f as A,gc as M,hc as V,ic as c,jc as _,kc as I,lc as x,mc as h,nc as L,oc as C,pa as q,pb as v,rb as a,tc as f,uc as o,xb as P,xc as X,ya as d,za as g}from"./chunk-OJMQBH6T.js";var U=t=>[t],Se=t=>({"text-decoration-line-through":t}),Ie=t=>({"text-danger":t}),we=(t,l)=>({"bg-gradient-warning":t,"cell-hover pointer":l});function Fe(t,l){if(t&1){let e=C();c(0,"mat-slide-toggle",13),f("toggleChange",function(){d(e);let n=o();return n.toggleStatus=!n.toggleStatus,g(n.onToggle())}),c(1,"small",14),m(2),_()()}if(t&2){let e=o();a(2),y(" ",e.productToggleTitle?e.productToggleTitle:"FILTER DIFFERENT INVENTORY"," ")}}function Pe(t,l){if(t&1){let e=C();c(0,"th")(1,"input",16),N("ngModelChange",function(n){d(e);let r=o(2);return D(r.checkboxState,n)||(r.checkboxState=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(2);return g(n.onCheckboxStateChange())}),_()()}if(t&2){let e=o(2);a(),k("ngModel",e.checkboxState)}}function Ee(t,l){if(t&1&&(p(0,Pe,2,1,"ng-template",15),c(1,"th",11),m(2,"POS"),_()),t&2){let e=o();s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Me(t,l){if(t&1&&(x(0),c(1,"th",17)(2,"div",18)(3,"div",19),I(4,"img",20),c(5,"div",21),m(6),$(7,"stringLimit"),_()()()(),h()),t&2){let e=l.$implicit;a(3),s("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),a(),s("src",e==null?null:e.Img,v),a(2),y(" ",G(7,3,e.Name,20)," ")}}function Ve(t,l){t&1&&L(0)}function Oe(t,l){if(t&1&&p(0,Ve,1,0,"ng-container",33),t&2){o(2);let e=b(7);s("ngTemplateOutlet",e)}}function ke(t,l){if(t&1&&(x(0),p(1,Oe,1,1,"ng-template",15),h()),t&2){let e=o(4);a(),s("ngxPermissionsOnly",T(1,U,e.roleInventoryUpdate))}}function De(t,l){t&1&&L(0)}function Ne(t,l){if(t&1&&p(0,De,1,0,"ng-container",33),t&2){o(2);let e=b(7);s("ngTemplateOutlet",e)}}function $e(t,l){if(t&1&&p(0,Ne,1,1,"ng-template",15),t&2){let e=o(4);s("ngxPermissionsOnly",T(1,U,e.rolePriceEdit))}}function Ue(t,l){if(t&1){let e=C();x(0),c(1,"div")(2,"input",34),N("ngModelChange",function(n){d(e);let r=o(4).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),f("ngModelChange",function(){d(e);let n=o(4).$implicit,r=o();return g(r.onCheckboxStateProduct(n.ID))}),_()(),h()}if(t&2){let e=o(4).$implicit;a(2),k("ngModel",e.selected),s("disabled",!(e!=null&&e.Category))}}function Re(t,l){if(t&1&&p(0,Ue,3,2,"ng-container",22),t&2){let e=o(3).$implicit;s("ngIf",(e==null||e.Variants==null?null:e.Variants.length)>1)}}function je(t,l){if(t&1){let e=C();x(0),c(1,"img",35),f("click",function(n){d(e);let r=o(3).$implicit,u=o();return g(u.onZoomImage(n,r==null?null:r.ImageUrl))}),_(),h()}if(t&2){let e=o(3).$implicit;a(),X("src",e==null?null:e.ThumbnailUrl,v)}}function Be(t,l){t&1&&I(0,"img",36)}function Le(t,l){if(t&1&&(x(0),c(1,"td",28)(2,"div",29),p(3,ke,2,3,"ng-container",30)(4,$e,1,3,"ng-template",null,0,w)(6,Re,1,1,"ng-template",null,1,w),c(8,"div"),p(9,je,2,1,"ng-container",30)(10,Be,1,0,"ng-template",null,2,w),_()()(),c(12,"td",31)(13,"div"),m(14),_(),c(15,"small",32),m(16),_()(),h()),t&2){let e=b(5),i=b(11),n=o(2).$implicit,r=o();a(),s("rowSpan",n==null?null:n.Variants.length),a(2),s("ngIf",r.table=="inventory")("ngIfElse",e),a(6),s("ngIf",n==null?null:n.ThumbnailUrl)("ngIfElse",i),a(3),s("rowSpan",n==null?null:n.Variants.length),a(2),O(n==null?null:n.Name),a(),s("ngClass",T(9,Ie,!(n!=null&&n.Category))),a(),y("(",n!=null&&n.Category?n==null?null:n.Category:"Not Found In POS",")")}}function We(t,l){if(t&1&&(c(0,"a",27),I(1,"i",37),_()),t&2){let e=o().$implicit,i=o(2);s("href",i.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),v)}}function ze(t,l){if(t&1){let e=C();c(0,"input",40),N("ngModelChange",function(n){d(e);let r=o(3).$implicit;return D(r.selected,n)||(r.selected=n),g(n)}),_()}if(t&2){let e=o(3).$implicit,i=o().$implicit;k("ngModel",e.selected),s("disabled",!(i!=null&&i.Category))}}function Ae(t,l){if(t&1&&(c(0,"td",38),p(1,ze,1,2,"input",39),_()),t&2){let e=o(2).$implicit,i=o(2);a(),s("ngIf",i.printPOS(e)>=0||i.table=="price")}}function He(t,l){if(t&1&&(p(0,Ae,2,1,"ng-template",15),c(1,"td",24),m(2),$(3,"number"),_()),t&2){let e=o().$implicit,i=o(2);s("ngxPermissionsOnly",T(4,U,i.rolePriceEdit)),a(2),O(W(3,2,i.printPOS(e)))}}function Ze(t,l){if(t&1){let e=C();x(0),c(1,"td",41),f("click",function(){d(e);let n=o().$implicit,r=o().$implicit,u=o().$implicit,ve=o();return g(ve.onUpdateData(u.Name,r,n.ID,u.ChannelItemID))}),c(2,"div",42)(3,"div",43),m(4),$(5,"number"),_(),c(6,"a",44),f("click",function(n){return d(e),g(n==null?null:n.stopPropagation())}),I(7,"i",37),_()()(),h()}if(t&2){let e=l.$implicit,i=o(2).$implicit,n=o(2);a(),s("ngClass",Y(5,we,n.printPOS(i)!=n.printItem(e)&&n.hiddenIPOSInventory()==!1,n.hasPriceEdit()&&n.table=="price"||n.hasInventoryEdit()&&n.table=="inventory")),a(3),y(" ",W(5,3,n.printItem(e))," "),a(2),s("href",e.Url,v)}}function qe(t,l){t&1&&(c(0,"td",45)(1,"div",42)(2,"span"),m(3,"X"),_()()())}function Ke(t,l){if(t&1&&p(0,Ze,8,8,"ng-container",30)(1,qe,4,0,"ng-template",null,3,w),t&2){let e=l.$implicit,i=b(2),n=o().$implicit,r=o(2);s("ngIf",r.getItemFromChannel(n,e))("ngIfElse",i)}}function Xe(t,l){if(t&1&&(c(0,"tr"),p(1,Le,17,11,"ng-container",22),c(2,"td",23),m(3),_(),c(4,"td",24)(5,"div",25)(6,"div",26),m(7),_(),c(8,"div",21),p(9,We,2,1,"a",27),_()()(),p(10,He,4,6),M(11,Ke,3,2,null,null,E),_()),t&2){let e=l.$implicit,i=l.$index,n=o().$implicit,r=o();a(),s("ngIf",i==0),a(2),O(e==null?null:e.Model),a(2),s("matTooltip",e.Discontinued?r.discontinuedVariantMsg:""),a(),s("ngClass",T(7,Se,e.Discontinued)),a(),y(" ",e.Code," "),a(2),S(n.Category?9:-1),a(),S(r.hiddenIPOSInventory()==!1?10:-1),a(),V(r.channel)}}function Ye(t,l){if(t&1&&(c(0,"tbody"),M(1,Xe,13,9,"tr",null,E),_()),t&2){let e=l.$implicit;a(),V(e.Variants)}}var vt=(()=>{class t{constructor(e,i,n){this.dialog=e,this.biggerPictureService=i,this.authService=n,this.permissionsService=q(ce),this.showProductToggle=!1,this.multiwarehouse=j(!1),this.hiddenIPOSInventory=j(!1),this.toggleStatus=!1,this.checkboxState=!1,this.rolePriceEdit=F.PriceUpdate,this.roleInventoryUpdate=F.InventoryUpdate,this.hasPriceEdit=B(!1),this.hasInventoryEdit=B(!1),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.onSubmit=new R,this.destroy$=new A,this.toggle=new R,this.hostName=this.authService.getDomain()}ngOnInit(){this.initRoles(),this.table=="inventory"?this.stockHeader="Stock":this.table=="price"&&(this.stockHeader="Price")}initRoles(){this.permissionsService.hasPermission(F.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e)),this.permissionsService.hasPermission(F.PriceUpdate).then(e=>this.hasPriceEdit.set(e))}onCheckboxStateProduct(e){let i=this.data.filter(n=>n.ID==e);i.length>0&&(i=i.map(n=>(n.Variants=n.Variants.map(r=>(r.selected=n.selected,r)),n)))}onCheckboxStateChange(){this.data=this.data.map(e=>(e.Variants=e.Variants.map(i=>(i.selected=this.checkboxState,i)),e))}getItemFromChannel(e,i){return e.Channel.find(r=>z.IsNotEmpty(i.LocationID)?r.LocationID==i.LocationID:r.ChannelID==i.ID)}printItem(e){if(this.table=="inventory")return e.Inventory;if(this.table=="price")return e.Price}onUpdateData(e,i,n,r){this.hasPriceEdit()&&this.table=="price"&&this.onOpenDialogUpdate(e,i,n,r),this.hasInventoryEdit()&&this.table=="inventory"&&this.onOpenDialogUpdate(e,i,n,r)}onOpenDialogUpdate(e,i,n,r){this.dialog.open(be,{data:{Name:e,Variant:i,ChannelID:n,Table:this.table,ChannelItemID:r}}).afterClosed().pipe(H(u=>z.IsNotEmpty(u)),Z(this.destroy$)).subscribe(u=>{this.onSubmit.emit(u)})}printPOS(e){return this.table=="inventory"?e.Inventory?e.Inventory:0:this.table=="price"?e.UnitPrice:null}onToggle(){this.toggle.emit(this.toggleStatus)}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}static{this.\u0275fac=function(i){return new(i||t)(P(ge),P(Ce),P(pe))}}static{this.\u0275cmp=K({type:t,selectors:[["app-table"]],inputs:{data:"data",table:"table",channel:"channel",showProductToggle:"showProductToggle",productToggleTitle:"productToggleTitle",multiwarehouse:[1,"multiwarehouse"],hiddenIPOSInventory:[1,"hiddenIPOSInventory"]},outputs:{onSubmit:"onSubmit",toggle:"onToggle"},decls:17,vars:3,consts:[["PRICE",""],["checkbox_update",""],["elsePic",""],["elseCol",""],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","w-25"],[1,"w-100"],[2,"width","200px"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[4,"ngFor","ngForOf"],[2,"width","200px",3,"toggleChange"],[1,"fw-bold"],[3,"ngxPermissionsOnly"],["type","checkbox",3,"ngModelChange","ngModel"],["scope","col"],[1,"w-100","d-flex","align-items-center","justify-content-center"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],[4,"ngIf"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-end",3,"matTooltip"],[3,"ngClass"],["target","_blank",3,"href"],[1,"text-center",3,"rowSpan"],[1,"d-flex","align-items-center","justify-content-end"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"padding-left","0px",3,"rowSpan"],[1,"mt-1",3,"ngClass"],[4,"ngTemplateOutlet"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel","disabled"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"align-middle"],["type","checkbox",3,"ngModel","disabled","ngModelChange",4,"ngIf"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"p-0",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2","mt-1"],["target","_blank",3,"click","href"],[1,"table-white","text-center",2,"color","red"]],template:function(i,n){i&1&&(c(0,"div",4)(1,"table",5)(2,"thead",6)(3,"tr")(4,"th",7)(5,"div",8)(6,"div"),m(7,"Product"),_(),p(8,Fe,3,1,"mat-slide-toggle",9),_()(),c(9,"th",10),m(10,"Variant"),_(),c(11,"th",11),m(12,"SKU"),_(),p(13,Ee,3,3)(14,Me,8,6,"ng-container",12),_()(),M(15,Ye,3,0,"tbody",null,E),_()()),i&2&&(a(8),S(n.showProductToggle?8:-1),a(5),S(n.hiddenIPOSInventory()==!1?13:-1),a(),s("ngForOf",n.channel),a(),V(n.data))},dependencies:[ie,J,Q,ee,te,ne,le,oe,re,ae,Te,fe,ue,xe,he,se,_e,de,me,ye],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}.text-wrapping[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;width:88px}.cell-hover[_ngcontent-%COMP%]{width:400px!important}"]})}}return t})();export{vt as a};
@@ -1 +1 @@
1
- import{a as o}from"./chunk-774TVUXT.js";import{a as s,b as l}from"./chunk-WRJFUNM3.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as c,J as d}from"./chunk-FXQKRJWU.js";import{Gb as a,Yb as i,ic as p,jc as m,kc as n,rb as r}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var f=(()=>{class t{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=a({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,v){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),m()()(),n(4,"router-outlet")),e&2&&(r(3),i("Tabs",v.tabs))},dependencies:[l,s,d,c],encapsulation:2})}}return t})(),g=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-6YBD22SK.js").then(t=>t.OrderApiComponent)},canActivate:[o],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-5EDCBXCE.js").then(t=>t.ProductApiComponent)},canActivate:[o],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-RNZC6DAM.js").then(t=>t.EscrowApiComponent)},canActivate:[o],data:{title:"Escrow API"}}]}];export{f as JsonApiComponent,g as routes};
1
+ import{a as o}from"./chunk-NDBC2CS6.js";import{a as s,b as l}from"./chunk-WRJFUNM3.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as c,J as d}from"./chunk-FXQKRJWU.js";import{Gb as a,Yb as i,ic as p,jc as m,kc as n,rb as r}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var f=(()=>{class t{constructor(){this.tabs=[{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"}]}static{this.\u0275fac=function(e){return new(e||t)}}static{this.\u0275cmp=a({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(e,v){e&1&&(p(0,"nav",0)(1,"div",1)(2,"div"),n(3,"nav-tab",2),m()()(),n(4,"router-outlet")),e&2&&(r(3),i("Tabs",v.tabs))},dependencies:[l,s,d,c],encapsulation:2})}}return t})(),g=[{path:"",component:f,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-EFB55SZR.js").then(t=>t.OrderApiComponent)},canActivate:[o],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-XLWWNO5M.js").then(t=>t.ProductApiComponent)},canActivate:[o],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-TMKLT3K2.js").then(t=>t.EscrowApiComponent)},canActivate:[o],data:{title:"Escrow API"}}]}];export{f as JsonApiComponent,g as routes};
@@ -1 +1 @@
1
- import{a as me,b as de,c as pe}from"./chunk-RU43F4UK.js";import{a as ue}from"./chunk-DRVWJPA2.js";import{a as T}from"./chunk-FYB62QQV.js";import{a as se}from"./chunk-67HPC5Y3.js";import{a as le}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as ae}from"./chunk-CO5XZENC.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-C7YK5TDP.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import{a as oe}from"./chunk-LDL3A7NM.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import{m as ne,n as re}from"./chunk-HJXYT6MI.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as te,s as ie}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as G,k as J,m as K,n as Q}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as I,Gc as a,Hc as S,Ic as b,Kc as _,Lc as f,Mb as x,Mc as g,Nc as A,Oc as R,Pc as H,Qc as j,Ra as F,Sc as U,Yb as u,Z as O,ac as D,ad as E,bd as q,dc as y,ec as B,gc as k,hc as z,ic as t,jc as i,kc as c,oc as V,pa as N,pb as W,rb as l,tc as M,uc as C,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ce=r=>({"td-cell-hover":r});function Ce(r,h){if(r&1&&c(0,"variants-dropdown",31),r&2){let e=C().$implicit;u("variants",e==null?null:e.Variants)}}function _e(r,h){if(r&1&&c(0,"variant-with-image",32),r&2){let e=C().$implicit;u("variant",e==null?null:e.Variants[0])}}function fe(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),c(3,"img",25),w(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),c(15,"order-link",30),i()(),t(16,"small"),a(17),w(18,"date"),i()()(),t(19,"td"),a(20),i(),t(21,"td"),x(22,Ce,1,1,"variants-dropdown",31)(23,_e,1,1,"variant-with-image",32),i(),t(24,"td",33),a(25),w(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),a(31),i(),x(32,fe,2,1,"span"),i(),t(33,"small"),a(34),i()()()()),r&2){let e=h.$implicit;l(3),u("src",E(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),S(e.Outlet),l(3),S(e.ChannelName),l(5),u("order",e),l(2),b(" ",q(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),S(e.Customer),l(),D(U(21,ce,(e.Variants==null?null:e.Variants.length)>1)),l(),y((e.Variants==null?null:e.Variants.length)>1?22:23),l(3),S(E(26,19,e.Amount)),l(6),S(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),l(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function he(r,h){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th",20),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",21),a(13,"Amount"),i(),t(14,"th",22),a(15,"Shipping"),i()()(),t(16,"tbody"),k(17,ge,35,23,"tr",null,B),i()(),t(19,"app-custom-paginator",23),M("next",function(){p(e);let n=C();return s(n.initCompletedOrders())})("previous",function(){p(e);let n=C();return s(n.initCompletedOrders())}),i()()}if(r&2){let e=C(),m=H(0);l(17),z(m),l(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function ve(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=N(T),this.filter=F({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>L(P({},m),{From:e})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=I({type:r,selectors:[["app-completed"]],features:[j([T])],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","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,n){if(m&1){let d=V();A(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),g("textChange",function(o){return p(d),f(n.filter().Number,o)||(n.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),g("ngModelChange",function(o){return p(d),f(n.filter().ListChannelID,o)||(n.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 p(d),f(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return p(d),f(n.filter().To,o)||(n.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 p(d),f(n.filter().PageNumber,o)||(n.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 p(d),f(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,he,20,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(m&2){let d=R(E(1,8,n.completedOrders$));l(2),_("text",n.filter().Number),l(10),u("multiple",!0),_("ngModel",n.filter().ListChannelID),l(5),_("date",n.filter().From),l(2),_("date",n.filter().To),l(4),_("ngModel",n.filter().PageNumber),l(4),_("ngModel",n.filter().PageSize),l(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[Q,G,K,J,re,ne,le,oe,ee,X,$,Y,Z,me,de,pe,se,ie,te,ue,ae],encapsulation:2})}}return r})();export{He as CompletedComponent};
1
+ import{a as me,b as de,c as pe}from"./chunk-T27ABFCP.js";import{a as ue}from"./chunk-FHNST4Y7.js";import{a as T}from"./chunk-LLHPMXKP.js";import{a as se}from"./chunk-67HPC5Y3.js";import{a as le}from"./chunk-KTB223SK.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as ae}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import{a as oe}from"./chunk-LDL3A7NM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{m as ne,n as re}from"./chunk-HJXYT6MI.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as te,s as ie}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as G,k as J,m as K,n as Q}from"./chunk-FXQKRJWU.js";import{$c as w,Gb as I,Gc as a,Hc as S,Ic as b,Kc as _,Lc as f,Mb as x,Mc as g,Nc as A,Oc as R,Pc as H,Qc as j,Ra as F,Sc as U,Yb as u,Z as O,ac as D,ad as E,bd as q,dc as y,ec as B,gc as k,hc as z,ic as t,jc as i,kc as c,oc as V,pa as N,pb as W,rb as l,tc as M,uc as C,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ce=r=>({"td-cell-hover":r});function Ce(r,h){if(r&1&&c(0,"variants-dropdown",31),r&2){let e=C().$implicit;u("variants",e==null?null:e.Variants)}}function _e(r,h){if(r&1&&c(0,"variant-with-image",32),r&2){let e=C().$implicit;u("variant",e==null?null:e.Variants[0])}}function fe(r,h){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=C().$implicit;l(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ge(r,h){if(r&1&&(t(0,"tr")(1,"td")(2,"div",24),c(3,"img",25),w(4,"channelImage"),t(5,"div",26)(6,"div"),a(7),i(),t(8,"small",27)(9,"span"),a(10),i()()()()(),t(11,"td")(12,"div",28)(13,"div",29)(14,"div"),c(15,"order-link",30),i()(),t(16,"small"),a(17),w(18,"date"),i()()(),t(19,"td"),a(20),i(),t(21,"td"),x(22,Ce,1,1,"variants-dropdown",31)(23,_e,1,1,"variant-with-image",32),i(),t(24,"td",33),a(25),w(26,"number"),i(),t(27,"td")(28,"div",28)(29,"div",29)(30,"span"),a(31),i(),x(32,fe,2,1,"span"),i(),t(33,"small"),a(34),i()()()()),r&2){let e=h.$implicit;l(3),u("src",E(4,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),S(e.Outlet),l(3),S(e.ChannelName),l(5),u("order",e),l(2),b(" ",q(18,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),S(e.Customer),l(),D(U(21,ce,(e.Variants==null?null:e.Variants.length)>1)),l(),y((e.Variants==null?null:e.Variants.length)>1?22:23),l(3),S(E(26,19,e.Amount)),l(6),S(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?32:-1),l(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function he(r,h){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),i(),t(6,"th",20),a(7,"Number"),i(),t(8,"th",20),a(9,"Customer"),i(),t(10,"th"),a(11,"Items"),i(),t(12,"th",21),a(13,"Amount"),i(),t(14,"th",22),a(15,"Shipping"),i()()(),t(16,"tbody"),k(17,ge,35,23,"tr",null,B),i()(),t(19,"app-custom-paginator",23),M("next",function(){p(e);let n=C();return s(n.initCompletedOrders())})("previous",function(){p(e);let n=C();return s(n.initCompletedOrders())}),i()()}if(r&2){let e=C(),m=H(0);l(17),z(m),l(2),u("filter",e.filter())("totaldata",m==null?null:m.length)}}function ve(r,h){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=N(T),this.filter=F({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(m=>L(P({},m),{From:e})),this.initCompletedOrders()}initCompletedOrders(){this.completedOrders$=this.orderService.getCompletedOrders(this.filter()).pipe(O(1))}static{this.\u0275fac=function(m){return new(m||r)}}static{this.\u0275cmp=I({type:r,selectors:[["app-completed"]],features:[j([T])],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","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],["rowCountApi","/api/orders/completedcount",3,"next","previous","filter","totaldata"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(m,n){if(m&1){let d=V();A(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return p(d),s(n.initCompletedOrders())}),g("textChange",function(o){return p(d),f(n.filter().Number,o)||(n.filter().Number=o),s(o)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),g("ngModelChange",function(o){return p(d),f(n.filter().ListChannelID,o)||(n.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 p(d),f(n.filter().From,o)||(n.filter().From=o),s(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return p(d),f(n.filter().To,o)||(n.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 p(d),f(n.filter().PageNumber,o)||(n.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 p(d),f(n.filter().PageSize,o)||(n.filter().PageSize=o),s(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),x(32,he,20,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(m&2){let d=R(E(1,8,n.completedOrders$));l(2),_("text",n.filter().Number),l(10),u("multiple",!0),_("ngModel",n.filter().ListChannelID),l(5),_("date",n.filter().From),l(2),_("date",n.filter().To),l(4),_("ngModel",n.filter().PageNumber),l(4),_("ngModel",n.filter().PageSize),l(5),y((d==null?null:d.length)>0?32:33)}},dependencies:[Q,G,K,J,re,ne,le,oe,ee,X,$,Y,Z,me,de,pe,se,ie,te,ue,ae],encapsulation:2})}}return r})();export{He as CompletedComponent};
@@ -1 +1 @@
1
- import{a as Te}from"./chunk-EHBCYQSG.js";import{a as Ie,b as ye}from"./chunk-GRYGUILI.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as Fe,b as be,c as Ve,d as B,e as U}from"./chunk-TKV7XWBT.js";import{a as Se,b as we}from"./chunk-YTCIQBSO.js";import"./chunk-RHHHL4OR.js";import{a as fe}from"./chunk-7ES3PHES.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ce}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as ve}from"./chunk-CO5XZENC.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import{a as Pe}from"./chunk-C7YK5TDP.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-5ZR5WIHG.js";import"./chunk-ACIMXBIC.js";import{i as ge}from"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as _e,e as pe}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as se}from"./chunk-RXQX7567.js";import{d as he,l as Ce,m as ue,n as xe}from"./chunk-HJXYT6MI.js";import{A as le,b as ne,c as ie,h as oe,m as ae,o as re}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as me,c as de}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{d as Q,g as X,j as Y,m as D,n as ee,q as te}from"./chunk-FXQKRJWU.js";import{$c as v,Fc as q,G as W,Gb as j,Gc as d,Hc as L,Ic as b,Kc as w,Lc as I,Mb as h,Mc as y,Qc as K,Sc as V,Yb as m,Z as A,ad as F,bd as J,cd as Z,dc as P,ea as $,ec as k,gc as N,hc as R,ic as r,jc as c,kc as S,lc as z,mc as G,oc as u,pa as M,pb as T,rb as l,tc as C,uc as a,xb as f,xc as H,ya as _,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var O=i=>[i],ke=i=>({"text-decoration-line-through":i}),Ne=i=>({"bg-gradient-warning":i});function Re(i,s){if(i&1){let e=u();r(0,"button",14),C("click",function(){_(e);let t=a().ngIf,o=a(2);return p(o.updateStock(t))}),S(1,"i",15),d(2," Update "),c()}}function Le(i,s){if(i&1){let e=u();r(0,"actions")(1,"div",10),h(2,Re,3,0,"button",11),r(3,"button",12),C("click",function(){_(e);let t=a(2);return p(t.openExportDialog())}),S(4,"i",13),r(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=a(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Be(i,s){if(i&1){let e=u();r(0,"th")(1,"input",30),C("change",function(t){_(e);let o=a().ngIf,g=a(2);return p(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function Ue(i,s){if(i&1){let e=u();r(0,"input",47),y("ngModelChange",function(t){_(e);let o=a(4).$implicit;return I(o.selected,t)||(o.selected=t),p(t)}),C("ngModelChange",function(){_(e);let t=a(4).$implicit,o=a(3);return p(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=a(4).$implicit;w("ngModel",e.selected)}}function Oe(i,s){if(i&1&&h(0,Ue,1,1,"ng-template",24),i&2){let e=a(6);m("ngxPermissionsOnly",V(1,O,e.rolePriceEdit))}}function We(i,s){if(i&1){let e=u();z(0),r(1,"img",48),C("click",function(t){_(e);let o=a(3).$implicit,g=a(3);return p(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),G()}if(i&2){let e=a(3).$implicit;l(),H("src",e.ThumbnailUrl,T)}}function Ae(i,s){i&1&&S(0,"img",49)}function $e(i,s){if(i&1&&(r(0,"small",46),d(1),c()),i&2){let e=a(3).$implicit;l(),b("(",e.Category,")")}}function je(i,s){if(i&1&&(r(0,"td",42)(1,"div",33),h(2,Oe,1,3,null,24),r(3,"div"),h(4,We,2,1,"ng-container",43)(5,Ae,1,0,"ng-template",null,0,Z),c()()(),r(7,"td",44)(8,"span",45),d(9),c(),h(10,$e,2,1,"small",46),c()),i&2){let e=q(6),n=a(2).$implicit;m("rowSpan",n.Variants.length),l(2),P((n.Variants==null?null:n.Variants.length)>1?2:-1),l(2),m("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),m("rowSpan",n.Variants.length),l(2),L(n.Name),l(),P(n.Category?10:-1)}}function ze(i,s){if(i&1){let e=u();r(0,"input",52),y("ngModelChange",function(t){_(e);let o=a(2).$implicit;return I(o.selected,t)||(o.selected=t),p(t)}),c()}if(i&2){let e=a(2).$implicit;w("ngModel",e.selected)}}function Ge(i,s){if(i&1&&(r(0,"td",50),h(1,ze,1,1,"input",51),c()),i&2){let e=a().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function He(i,s){i&1&&(r(0,"div",34),d(1," Not Found "),c())}function qe(i,s){if(i&1&&(r(0,"div"),d(1),v(2,"number"),c()),i&2){let e=a().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Ke(i,s){if(i&1&&(r(0,"div",35)(1,"a",38),S(2,"i",53),c()()),i&2){let e=a().$implicit,n=a(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),T)}}function Je(i,s){if(i&1){let e=u();r(0,"div",54),C("click",function(){_(e);let t=a().$implicit,o=a().$implicit,g=a(2).ngIf,x=a();return p(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=a().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function Ze(i,s){if(i&1){let e=u();r(0,"tr",31),h(1,je,11,7),r(2,"td",22),d(3),c(),r(4,"td",25)(5,"span",32),d(6),c()(),h(7,Ge,2,1,"ng-template",24),r(8,"td",25)(9,"div",33),h(10,He,2,0,"div",34)(11,qe,3,3,"div")(12,Ke,3,1,"div",35),c()(),r(13,"td",36)(14,"div",33),h(15,Je,3,3,"div",37),r(16,"div",35)(17,"a",38),S(18,"i",39),c()(),r(19,"div",35)(20,"div",40),C("click",function(){let t=_(e).$implicit,o=a(4);return p(o.refreshPrice(t))}),S(21,"i",41),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=a(4);l(),P(n==0?1:-1),l(2),L(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",V(12,ke,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",V(14,O,t.rolePriceEdit)),l(3),P((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),m("ngClass",V(16,Ne,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),P(e.Channel.length>0?15:-1),l(2),m("href",e.Channel[0]==null?null:e.Channel[0].Url,T)}}function Qe(i,s){if(i&1&&N(0,Ze,22,18,"tr",31,k),i&2){let e=s.$implicit;R(e.Variants)}}function Xe(i,s){if(i&1){let e=u();r(0,"content")(1,"div",16)(2,"div",17)(3,"table",18)(4,"thead",19)(5,"tr")(6,"th",20),d(7," Product "),r(8,"div")(9,"mat-slide-toggle",21),y("ngModelChange",function(t){_(e);let o=a(2);return I(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),p(t)}),C("toggleChange",function(){_(e);let t=a(2);return p(t.onToggleDifferentInventory())}),r(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),r(12,"th",22),d(13,"Variant"),c(),r(14,"th",23),d(15,"SKU"),c(),h(16,Be,2,0,"ng-template",24),r(17,"th",25),d(18,"POS"),c(),r(19,"th",25)(20,"div",26),C("click",function(){_(e);let t=a(2);return p(t.openModalFilter())}),S(21,"img",27),r(22,"span",28),d(23),v(24,"stringLimit"),c()()()()(),r(25,"tbody"),N(26,Qe,2,0,null,null,k),c()(),r(28,"infinite-paginator",29),v(29,"async"),C("onNextPage",function(){_(e);let t=a(2);return p(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=a(2);return p(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=a(2);return p(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=a(2);l(9),w("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",V(16,O,n.rolePriceEdit)),l(4),m("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),m("src",n.selectedChannel==null?null:n.selectedChannel.Img,T),l(2),b(" ",J(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),R(e),l(2),m("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function Ye(i,s){if(i&1){let e=u();r(0,"mainpanel",2),y("textChange",function(t){_(e);let o=a();return I(o.searchFilter.text,t)||(o.searchFilter.text=t),p(t)}),C("onSubmit",function(){_(e);let t=a();return p(t.onSearch())}),r(1,"filters")(2,"div",3)(3,"label",4),d(4,"Channel"),c(),r(5,"app-channel-options-v2",5),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),p(t)}),c()(),r(6,"div",6)(7,"label",7),d(8,"Page Number"),c(),r(9,"input",8),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),p(t)}),c()(),r(10,"div",6)(11,"label",7),d(12,"Page Size"),c(),r(13,"input",8),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),p(t)}),c()()(),h(14,Le,7,1,"actions",9),v(15,"async"),h(16,Xe,30,18,"content",9),v(17,"async"),c()}if(i&2){let e=a();m("headerTitle",e.pageTitle),w("text",e.searchFilter.text),l(5),w("ngModel",e.searchFilter.ChannelID),l(4),w("ngModel",e.searchFilter.PageNumber),l(4),w("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(15,7,e.data$)),l(2),m("ngIf",F(17,9,e.data$))}}var Rt=(()=>{class i{constructor(e,n,t,o,g,x,De,Ee,Me){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.authService=x,this.mainPanelService=De,this.exportService=Ee,this.decimalPipe=Me,this.infinitePagination=M(B),this.updateResHandling=M(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ce.PriceUpdate,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.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(A(1)),this.channelOptions=x.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=E.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=E.ALL:this.searchFilter.filterModel=E.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",o).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,n,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,t){let o=JSON.parse(JSON.stringify(e));this.dialog.open(Fe,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(W(x=>se.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x,e)})}updateItemAfterDialog(e,n){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(o=>{let g=this.productService.findChannelById(t.ID,this.channelOptions),x=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${x}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=t.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=e,o)),t))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(ye,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(f(pe),f(_e),f(he),f(fe),f(Pe),f(ge),f(Ce),f(Ie),f(D))}}static{this.\u0275cmp=j({type:i,selectors:[["app-price-single-channel"]],features:[K([B,Te,te("https://res.cloudinary.com/"),D,U])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&(h(0,Ye,18,11,"mainpanel",1),v(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[ee,Q,X,Y,D,xe,ue,le,ie,re,ne,oe,ae,be,Ve,de,me,we,Se,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Rt as PriceSingleChannelComponent};
1
+ import{a as Te}from"./chunk-EHBCYQSG.js";import{a as Ie,b as ye}from"./chunk-GRYGUILI.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{a as E}from"./chunk-XHAXYWZ7.js";import{a as Fe,b as be,c as Ve,d as B,e as U}from"./chunk-O2YNPIYM.js";import{a as Se,b as we}from"./chunk-YTCIQBSO.js";import"./chunk-RHHHL4OR.js";import{a as fe}from"./chunk-X4B2FYY3.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import{a as ce}from"./chunk-UMP6ZMEJ.js";import"./chunk-JVNHFIYT.js";import{a as ve}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import{a as Pe}from"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-GZS2MOSK.js";import"./chunk-ACIMXBIC.js";import{i as ge}from"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as _e,e as pe}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as se}from"./chunk-EUYQST7Q.js";import{d as he,l as Ce,m as ue,n as xe}from"./chunk-HJXYT6MI.js";import{A as le,b as ne,c as ie,h as oe,m as ae,o as re}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{b as me,c as de}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{d as Q,g as X,j as Y,m as D,n as ee,q as te}from"./chunk-FXQKRJWU.js";import{$c as v,Fc as q,G as W,Gb as j,Gc as d,Hc as L,Ic as b,Kc as w,Lc as I,Mb as h,Mc as y,Qc as K,Sc as V,Yb as m,Z as A,ad as F,bd as J,cd as Z,dc as P,ea as $,ec as k,gc as N,hc as R,ic as r,jc as c,kc as S,lc as z,mc as G,oc as u,pa as M,pb as T,rb as l,tc as C,uc as a,xb as f,xc as H,ya as _,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var O=i=>[i],ke=i=>({"text-decoration-line-through":i}),Ne=i=>({"bg-gradient-warning":i});function Re(i,s){if(i&1){let e=u();r(0,"button",14),C("click",function(){_(e);let t=a().ngIf,o=a(2);return p(o.updateStock(t))}),S(1,"i",15),d(2," Update "),c()}}function Le(i,s){if(i&1){let e=u();r(0,"actions")(1,"div",10),h(2,Re,3,0,"button",11),r(3,"button",12),C("click",function(){_(e);let t=a(2);return p(t.openExportDialog())}),S(4,"i",13),r(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=a(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Be(i,s){if(i&1){let e=u();r(0,"th")(1,"input",30),C("change",function(t){_(e);let o=a().ngIf,g=a(2);return p(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function Ue(i,s){if(i&1){let e=u();r(0,"input",47),y("ngModelChange",function(t){_(e);let o=a(4).$implicit;return I(o.selected,t)||(o.selected=t),p(t)}),C("ngModelChange",function(){_(e);let t=a(4).$implicit,o=a(3);return p(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=a(4).$implicit;w("ngModel",e.selected)}}function Oe(i,s){if(i&1&&h(0,Ue,1,1,"ng-template",24),i&2){let e=a(6);m("ngxPermissionsOnly",V(1,O,e.rolePriceEdit))}}function We(i,s){if(i&1){let e=u();z(0),r(1,"img",48),C("click",function(t){_(e);let o=a(3).$implicit,g=a(3);return p(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),G()}if(i&2){let e=a(3).$implicit;l(),H("src",e.ThumbnailUrl,T)}}function Ae(i,s){i&1&&S(0,"img",49)}function $e(i,s){if(i&1&&(r(0,"small",46),d(1),c()),i&2){let e=a(3).$implicit;l(),b("(",e.Category,")")}}function je(i,s){if(i&1&&(r(0,"td",42)(1,"div",33),h(2,Oe,1,3,null,24),r(3,"div"),h(4,We,2,1,"ng-container",43)(5,Ae,1,0,"ng-template",null,0,Z),c()()(),r(7,"td",44)(8,"span",45),d(9),c(),h(10,$e,2,1,"small",46),c()),i&2){let e=q(6),n=a(2).$implicit;m("rowSpan",n.Variants.length),l(2),P((n.Variants==null?null:n.Variants.length)>1?2:-1),l(2),m("ngIf",n.ThumbnailUrl)("ngIfElse",e),l(3),m("rowSpan",n.Variants.length),l(2),L(n.Name),l(),P(n.Category?10:-1)}}function ze(i,s){if(i&1){let e=u();r(0,"input",52),y("ngModelChange",function(t){_(e);let o=a(2).$implicit;return I(o.selected,t)||(o.selected=t),p(t)}),c()}if(i&2){let e=a(2).$implicit;w("ngModel",e.selected)}}function Ge(i,s){if(i&1&&(r(0,"td",50),h(1,ze,1,1,"input",51),c()),i&2){let e=a().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function He(i,s){i&1&&(r(0,"div",34),d(1," Not Found "),c())}function qe(i,s){if(i&1&&(r(0,"div"),d(1),v(2,"number"),c()),i&2){let e=a().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Ke(i,s){if(i&1&&(r(0,"div",35)(1,"a",38),S(2,"i",53),c()()),i&2){let e=a().$implicit,n=a(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),T)}}function Je(i,s){if(i&1){let e=u();r(0,"div",54),C("click",function(){_(e);let t=a().$implicit,o=a().$implicit,g=a(2).ngIf,x=a();return p(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=a().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function Ze(i,s){if(i&1){let e=u();r(0,"tr",31),h(1,je,11,7),r(2,"td",22),d(3),c(),r(4,"td",25)(5,"span",32),d(6),c()(),h(7,Ge,2,1,"ng-template",24),r(8,"td",25)(9,"div",33),h(10,He,2,0,"div",34)(11,qe,3,3,"div")(12,Ke,3,1,"div",35),c()(),r(13,"td",36)(14,"div",33),h(15,Je,3,3,"div",37),r(16,"div",35)(17,"a",38),S(18,"i",39),c()(),r(19,"div",35)(20,"div",40),C("click",function(){let t=_(e).$implicit,o=a(4);return p(o.refreshPrice(t))}),S(21,"i",41),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=a(4);l(),P(n==0?1:-1),l(2),L(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",V(12,ke,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",V(14,O,t.rolePriceEdit)),l(3),P((e.Channel[0]==null?null:e.Channel[0].Description)!=null?10:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?11:-1),l(),P((e.Channel[0]==null?null:e.Channel[0].Description)==null?12:-1),l(),m("ngClass",V(16,Ne,e.UnitPrice!=(e.Channel[0]==null?null:e.Channel[0].Price))),l(2),P(e.Channel.length>0?15:-1),l(2),m("href",e.Channel[0]==null?null:e.Channel[0].Url,T)}}function Qe(i,s){if(i&1&&N(0,Ze,22,18,"tr",31,k),i&2){let e=s.$implicit;R(e.Variants)}}function Xe(i,s){if(i&1){let e=u();r(0,"content")(1,"div",16)(2,"div",17)(3,"table",18)(4,"thead",19)(5,"tr")(6,"th",20),d(7," Product "),r(8,"div")(9,"mat-slide-toggle",21),y("ngModelChange",function(t){_(e);let o=a(2);return I(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),p(t)}),C("toggleChange",function(){_(e);let t=a(2);return p(t.onToggleDifferentInventory())}),r(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),r(12,"th",22),d(13,"Variant"),c(),r(14,"th",23),d(15,"SKU"),c(),h(16,Be,2,0,"ng-template",24),r(17,"th",25),d(18,"POS"),c(),r(19,"th",25)(20,"div",26),C("click",function(){_(e);let t=a(2);return p(t.openModalFilter())}),S(21,"img",27),r(22,"span",28),d(23),v(24,"stringLimit"),c()()()()(),r(25,"tbody"),N(26,Qe,2,0,null,null,k),c()(),r(28,"infinite-paginator",29),v(29,"async"),C("onNextPage",function(){_(e);let t=a(2);return p(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=a(2);return p(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=a(2);return p(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=a(2);l(9),w("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",V(16,O,n.rolePriceEdit)),l(4),m("matTooltip",(n.selectedChannel==null||n.selectedChannel.Name==null?null:n.selectedChannel.Name.length)>=20?n.selectedChannel==null?null:n.selectedChannel.Name:""),l(),m("src",n.selectedChannel==null?null:n.selectedChannel.Img,T),l(2),b(" ",J(24,11,n.selectedChannel==null?null:n.selectedChannel.Name,20)," "),l(3),R(e),l(2),m("totalData",n.infinitePagination.totalData())("hideCount",n.infinitePagination.hideCount())("rowCount",F(29,14,n.infinitePagination.totalRowCount$))("pageNumber",n.infinitePagination.pageNumber())("disableNextButton",n.infinitePagination.disableNextButton())("goToLastPage",n.infinitePagination.isLastPage())}}function Ye(i,s){if(i&1){let e=u();r(0,"mainpanel",2),y("textChange",function(t){_(e);let o=a();return I(o.searchFilter.text,t)||(o.searchFilter.text=t),p(t)}),C("onSubmit",function(){_(e);let t=a();return p(t.onSearch())}),r(1,"filters")(2,"div",3)(3,"label",4),d(4,"Channel"),c(),r(5,"app-channel-options-v2",5),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),p(t)}),c()(),r(6,"div",6)(7,"label",7),d(8,"Page Number"),c(),r(9,"input",8),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),p(t)}),c()(),r(10,"div",6)(11,"label",7),d(12,"Page Size"),c(),r(13,"input",8),y("ngModelChange",function(t){_(e);let o=a();return I(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),p(t)}),c()()(),h(14,Le,7,1,"actions",9),v(15,"async"),h(16,Xe,30,18,"content",9),v(17,"async"),c()}if(i&2){let e=a();m("headerTitle",e.pageTitle),w("text",e.searchFilter.text),l(5),w("ngModel",e.searchFilter.ChannelID),l(4),w("ngModel",e.searchFilter.PageNumber),l(4),w("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(15,7,e.data$)),l(2),m("ngIf",F(17,9,e.data$))}}var Rt=(()=>{class i{constructor(e,n,t,o,g,x,De,Ee,Me){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.authService=x,this.mainPanelService=De,this.exportService=Ee,this.decimalPipe=Me,this.infinitePagination=M(B),this.updateResHandling=M(U),this.pageTitle="Price Single Channel Comparison",this.toggleDifferentInventory=!1,this.loaderEndpoint="PriceLoader/Load",this.dataEndpoint="Price/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.rolePriceEdit=ce.PriceUpdate,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.hostName=this.authService.getDomain(),this.data$=this.infinitePagination.data$.pipe(A(1)),this.channelOptions=x.getChannels()}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.dataEndpoint,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/API/${this.loaderEndpoint}`).pipe($(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=E.ALL,this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}))}onToggleDifferentInventory(){this.toggleDifferentInventory?this.searchFilter.filterModel=E.ALL:this.searchFilter.filterModel=E.DIFFERENCE,this.onSearch()}onCheckboxStateProduct(e){e.Variants=e.Variants.map(n=>(n.selected=e.selected,n))}openModalFilter(){this.mainPanelService.openModalFilter()}updateStock(e){let t=this.productService.selectedVariantProduct(e).map(g=>({ID:g.ID,ChannelID:g.Channel[0].ChannelID,Code:g.Code,Price:g.UnitPrice})),o={ListChannelID:[this.searchFilter.ChannelID],ListPrice:t};this.http.post("/api/Price/UpdateChannel",o).subscribe(g=>{this.onSearch(),this.handlingUpdateStock(g.Response)})}handlingUpdateStock(e){if(e.success_list?.length>0||e.failure_list?.length>0){let n=e.failure_list,t=e.success_list;this.updateResHandling.responseHandling(t,n,"Price")}else this.toastr.error(e[0]?.Exception,"Error")}refreshPrice(e){let n={ChannelItemID:e?.Channel[0].ChannelItemID,ChannelVariationID:e?.Channel[0]?.ChannelVariationID,ChannelID:e?.Channel[0]?.ChannelID,VariantID:e.ID};this.http.post("/api/Price/RefreshPriceChannel",n).subscribe(t=>{this.toastr.success("Successfully updated","Success"),this.onSearch()})}onSearch(){this.infinitePagination.reloadPagination(this.searchFilter),this.initSelectedChannel()}openTableDialog(e,n,t){let o=JSON.parse(JSON.stringify(e));this.dialog.open(Fe,{data:{Name:n.Name,Variant:o,ChannelID:o?.Channel[0]?.ChannelID,Table:"price",ChannelItemID:o?.Channel[0]?.ChannelItemID}}).afterClosed().pipe(W(x=>se.IsNotEmpty(x))).subscribe(x=>{this.updateItemAfterDialog(x,e)})}updateItemAfterDialog(e,n){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(o=>{let g=this.productService.findChannelById(t.ID,this.channelOptions),x=t.Price?this.decimalPipe.transform(t.Price):t.Price;this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) price in ${g.Name} to ${x}`,"Success"),n.Channel[0]&&(n.Channel[0].Price=t.Price),this.infinitePagination.reloadPagination(this.searchFilter)})}initSelectedChannel(){this.selectedChannel=this.channelOptions.find(e=>e.ID==this.searchFilter.ChannelID)}onSelectAllSKU(e,n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=e,o)),t))}onZoomImage(e,n){this.biggerPictureService.openBiggerPicture(e,n)}openExportDialog(){this.dialog.open(ye,{data:{title:"Export Price Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,exportApi:"price/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}static{this.\u0275fac=function(n){return new(n||i)(f(pe),f(_e),f(he),f(fe),f(Pe),f(ge),f(Ce),f(Ie),f(D))}}static{this.\u0275cmp=j({type:i,selectors:[["app-price-single-channel"]],features:[K([B,Te,te("https://resc.cloudinary.com/"),D,U])],decls:2,vars:3,consts:[["elsePic",""],["class","single-price",3,"headerTitle","text","textChange","onSubmit",4,"ngIf"],[1,"single-price",3,"textChange","onSubmit","headerTitle","text"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"d-flex"],["class","btn btn-success",3,"click",4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],[1,"container-fluid","mt-5"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],["colspan","2",1,"text-center","ps-12",2,"width","36%"],["name","differentInventory",3,"ngModelChange","toggleChange","ngModel"],[1,"text-start"],[1,"text-end",2,"width","20%"],[3,"ngxPermissionsOnly"],[1,"text-end"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","checkbox",1,"me-3",3,"change"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[2,"cursor","pointer"],["target","_blank",3,"href"],[1,"fas","external-link-custom","fa-solid","fa-arrow-up-right-from-square"],["matTooltip","Refresh Unit Price according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","external-link-custom","fa-sync","fa-lg"],[1,"text-start",2,"width","0%",3,"rowSpan"],[4,"ngIf","ngIfElse"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[1,"d-block"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],["loading","lazy",1,"border","rounded","w-img","cursor-pointer",2,"margin-left","8px",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png","loading","lazy",1,"border","rounded","w-img",2,"margin-left","8px"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[2,"cursor","pointer",3,"click"]],template:function(n,t){n&1&&(h(0,Ye,18,11,"mainpanel",1),v(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[ee,Q,X,Y,D,xe,ue,le,ie,re,ne,oe,ae,be,Ve,de,me,we,Se,ve],styles:[".w-img[_ngcontent-%COMP%]{width:40px;height:40px}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}i.fas.custom-size[_ngcontent-%COMP%]{font-size:13px}.item-name[_ngcontent-%COMP%]{font-size:larger}"],changeDetection:0})}}return i})();export{Rt as PriceSingleChannelComponent};
@@ -1 +1 @@
1
- import{b as t,c as v}from"./chunk-RXQX7567.js";import{n as y}from"./chunk-FXQKRJWU.js";import{$b as C,Gb as p,Gc as N,Hc as k,Mb as r,Oa as o,Tc as w,Yb as d,dc as f,ic as s,jc as m,kc as g,pb as l,rb as h,uc as u}from"./chunk-OJMQBH6T.js";var L=(e,c)=>({width:e,height:c});function T(e,c){if(e&1&&(s(0,"span",2),N(1),m()),e&2){let n=u();h(),k(n.channelName)}}var D=(()=>{class e{set typeId(n){this.channelLogo=v.getChannelLogoByTypeId(n),this.initChannelName(n)}constructor(){this.showChannelName=o(!0),this.width=o(20),this.height=o(20)}initChannelName(n){switch(n){case t.Tokopedia:this.channelName="Tokopedia";break;case t.Tiktok:this.channelName="Tiktok";break;case t.WooCommerce:this.channelName="WooCommerce";break;case t.Shopee:this.channelName="Shopee";break;case t.Lazada:this.channelName="Lazada";break;case t.KalCare:this.channelName="Kalcare";break;case t.ShopifyV2:this.channelName="Shopify";break}}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-channel-logo"]],inputs:{showChannelName:[1,"showChannelName"],width:[1,"width"],height:[1,"height"],typeId:"typeId"},decls:3,vars:7,consts:[[1,"d-flex","align-items-center"],[1,"me-2",3,"src"],[1,"fw-normal"]],template:function(a,i){a&1&&(s(0,"div",0),g(1,"img",1),r(2,T,2,1,"span",2),m()),a&2&&(h(),C(w(4,L,i.width()+"px",i.height()+"px")),d("src",i.channelLogo,l),h(),f(i.showChannelName()?2:-1))},dependencies:[y],encapsulation:2})}}return e})();export{D as a};
1
+ import{b as t,c as v}from"./chunk-EUYQST7Q.js";import{n as y}from"./chunk-FXQKRJWU.js";import{$b as C,Gb as p,Gc as N,Hc as k,Mb as r,Oa as o,Tc as w,Yb as d,dc as f,ic as s,jc as m,kc as g,pb as l,rb as h,uc as u}from"./chunk-OJMQBH6T.js";var L=(e,c)=>({width:e,height:c});function T(e,c){if(e&1&&(s(0,"span",2),N(1),m()),e&2){let n=u();h(),k(n.channelName)}}var D=(()=>{class e{set typeId(n){this.channelLogo=v.getChannelLogoByTypeId(n),this.initChannelName(n)}constructor(){this.showChannelName=o(!0),this.width=o(20),this.height=o(20)}initChannelName(n){switch(n){case t.Tokopedia:this.channelName="Tokopedia";break;case t.Tiktok:this.channelName="Tiktok";break;case t.WooCommerce:this.channelName="WooCommerce";break;case t.Shopee:this.channelName="Shopee";break;case t.Lazada:this.channelName="Lazada";break;case t.KalCare:this.channelName="Kalcare";break;case t.ShopifyV2:this.channelName="Shopify";break}}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-channel-logo"]],inputs:{showChannelName:[1,"showChannelName"],width:[1,"width"],height:[1,"height"],typeId:"typeId"},decls:3,vars:7,consts:[[1,"d-flex","align-items-center"],[1,"me-2",3,"src"],[1,"fw-normal"]],template:function(a,i){a&1&&(s(0,"div",0),g(1,"img",1),r(2,T,2,1,"span",2),m()),a&2&&(h(),C(w(4,L,i.width()+"px",i.height()+"px")),d("src",i.channelLogo,l),h(),f(i.showChannelName()?2:-1))},dependencies:[y],encapsulation:2})}}return e})();export{D as a};
@@ -1 +1 @@
1
- import{a as l}from"./chunk-774TVUXT.js";import{b as u}from"./chunk-WRJFUNM3.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-RXQX7567.js";import{n as c}from"./chunk-HJXYT6MI.js";import{A as s}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as a,J as n,n as i}from"./chunk-FXQKRJWU.js";import{Gb as p,Hb as r,ka as e,kc as d}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class t{constructor(){}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=p({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(o,C){o&1&&d(0,"router-outlet")},dependencies:[a],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]})}}return t})();var R=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-74AYYW2T.js").then(t=>t.OrderModule),canActivate:[l]}]}],h=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,n.forChild(R)]})}}return t})();var S=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,u,h,s,c,n]})}}return t})();export{S as ReportModule};
1
+ import{a as l}from"./chunk-NDBC2CS6.js";import{b as u}from"./chunk-WRJFUNM3.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-EUYQST7Q.js";import{n as c}from"./chunk-HJXYT6MI.js";import{A as s}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{F as a,J as n,n as i}from"./chunk-FXQKRJWU.js";import{Gb as p,Hb as r,ka as e,kc as d}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var M=(()=>{class t{constructor(){}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=p({type:t,selectors:[["app-report"]],standalone:!1,decls:1,vars:0,template:function(o,C){o&1&&d(0,"router-outlet")},dependencies:[a],styles:["ul[_ngcontent-%COMP%] > li.dropdown-item[_ngcontent-%COMP%]{font-size:.6875rem!important}"]})}}return t})();var R=[{path:"",component:M,children:[{path:"",redirectTo:"order",pathMatch:"full"},{path:"order",loadChildren:()=>import("./chunk-7WY57PVD.js").then(t=>t.OrderModule),canActivate:[l]}]}],h=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,n.forChild(R)]})}}return t})();var S=(()=>{class t{static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275mod=r({type:t})}static{this.\u0275inj=e({imports:[i,u,h,s,c,n]})}}return t})();export{S as ReportModule};
@@ -1 +1 @@
1
- import{a as xe,b as ve}from"./chunk-L74PANZ5.js";import{a as ge,b as Ce,c as Se}from"./chunk-RU43F4UK.js";import{a as be}from"./chunk-DRVWJPA2.js";import{a as F}from"./chunk-FYB62QQV.js";import{a as ye}from"./chunk-67HPC5Y3.js";import"./chunk-XPCRS7AL.js";import"./chunk-MX5SR3SR.js";import{a as he}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as fe}from"./chunk-CO5XZENC.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-C7YK5TDP.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import"./chunk-PYXL7UF7.js";import{a as _e}from"./chunk-LDL3A7NM.js";import"./chunk-OLVWSY6L.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as de}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as se}from"./chunk-RXQX7567.js";import{m as ce,n as ue}from"./chunk-HJXYT6MI.js";import{A as ae,b as ie,c as ne,h as oe,m as re,o as le}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as me,s as pe}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as Z,k as $,m as ee,n as te}from"./chunk-FXQKRJWU.js";import{$c as w,Ac as H,Bc as Q,Cc as j,Gb as W,Gc as d,Hc as T,Ic as R,Kc as g,Lc as C,Mb as b,Mc as S,Nc as q,Oc as U,Pc as P,Qc as G,Ra as O,Rc as J,Sc as K,Yb as h,Z as L,ac as D,ad as E,bd as X,dc as x,ea as I,ec as B,gc as A,hc as z,ic as i,jc as n,kc as u,oc as v,pa as V,pb as k,rb as l,rd as Y,tc as f,uc as c,ya as m,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as M,b as N}from"./chunk-66YHNWRR.js";var Te=["contextMenu"],we=()=>[],Me=r=>({"td-cell-hover":r});function Ve(r,_){if(r&1){let e=v();i(0,"button",20),f("click",function(){m(e);let t=c();return p(t.setMultipleFulfillment())}),d(1," Set Fulfillment "),n()}}function Re(r,_){if(r&1&&u(0,"variants-dropdown",37),r&2){let e=c().$implicit;h("variants",e==null?null:e.Variants)}}function Ee(r,_){if(r&1&&u(0,"variant-with-image",38),r&2){let e=c().$implicit;h("variant",e==null?null:e.Variants[0])}}function Oe(r,_){if(r&1&&(i(0,"span"),d(1),n()),r&2){let e=c().$implicit;l(),R("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Pe(r,_){if(r&1){let e=v();i(0,"div",40)(1,"button",44),f("click",function(){m(e);let t=c().$implicit,s=c(2);return p(s.refreshShippingAndRefNumber(t))}),u(2,"i",45),n()()}}function Fe(r,_){if(r&1){let e=v();i(0,"button",46),f("click",function(){m(e);let t=c().$implicit,s=c(2);return p(s.onSetFulfillment(t))}),d(1," Set Fulfillment "),n()}}function Ne(r,_){if(r&1){let e=v();i(0,"tr")(1,"td")(2,"input",30),S("ngModelChange",function(t){let s=m(e).$implicit;return C(s.selected,t)||(s.selected=t),p(t)}),f("ngModelChange",function(){m(e);let t=c(2),s=P(0);return p(t.onSelectOrder(s))}),n()(),i(3,"td")(4,"div",31),u(5,"img",32),w(6,"channelImage"),i(7,"div",33)(8,"div"),d(9),n(),i(10,"small",34)(11,"span"),d(12),n()()()()(),i(13,"td")(14,"div",35)(15,"div"),u(16,"order-link",36),n(),i(17,"small"),d(18),w(19,"date"),n()()(),i(20,"td"),d(21),n(),i(22,"td"),b(23,Re,1,1,"variants-dropdown",37)(24,Ee,1,1,"variant-with-image",38),n(),i(25,"td",39),d(26),w(27,"number"),n(),i(28,"td",40)(29,"div",41)(30,"div",35)(31,"div",42)(32,"span"),d(33),n(),b(34,Oe,2,1,"span"),n(),i(35,"small"),d(36),n()(),b(37,Pe,3,0,"div",40),n()(),i(38,"td",40),b(39,Fe,2,0,"button",43),n()()}if(r&2){let e=_.$implicit,o=c(2);l(2),g("ngModel",e.selected),h("disabled",o.selectedChannelType()!=null&&o.selectedChannelType()!=e.MarketType),l(3),h("src",E(6,18,e==null?null:e.MarketType),k)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),T(e.Outlet),l(3),T(e.ChannelName),l(4),h("order",e),l(2),R(" ",X(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),T(e.Customer),l(),D(K(25,Me,(e.Variants==null?null:e.Variants.length)>1)),l(),x((e.Variants==null?null:e.Variants.length)>1?23:24),l(3),T(E(27,23,e.Amount)),l(7),T(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?34:-1),l(2),R(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(),x(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?37:-1),l(2),x((e==null?null:e.MarketType)!=o.channelType.WooCommerce?39:-1)}}function Le(r,_){if(r&1){let e=v();i(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),u(4,"th",24),i(5,"th",25),d(6,"Outlet"),n(),i(7,"th",25),d(8,"Number"),n(),i(9,"th",25),d(10,"Customer"),n(),i(11,"th"),d(12,"Items"),n(),i(13,"th",26),d(14,"Amount"),n(),i(15,"th",27),d(16,"Shipping"),n(),u(17,"th",28),n()(),i(18,"tbody"),A(19,Ne,40,27,"tr",null,B),n()(),i(21,"app-custom-paginator",29),f("next",function(){m(e);let t=c();return p(t.initReadyToShip())})("previous",function(){m(e);let t=c();return p(t.initReadyToShip())}),n()()}if(r&2){let e=c(),o=P(0);l(19),z(o),l(2),h("filter",e.filter())("totaldata",o==null?null:o.length)}}function Ie(r,_){r&1&&(i(0,"div",18),u(1,"app-empty-state"),n())}var dt=(()=>{class r{constructor(){this.toastr=V(de),this.orderService=V(F),this.fulfillmentService=V(xe),this.channelType=se,this.selectedOrders=O([]),this.selectedChannelType=Y(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(o=>N(M({},o),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(I(()=>{this.selectedOrders.set([])}),L(1))}onFilterChange(e){this.filter.update(o=>M(M({},o),e))}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}setMultipleFulfillment(){this.fulfillmentService.setFulfillmentMultipleOrders(this.selectedOrders()).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}onSelectOrder(e){let o=e.filter(t=>t.selected);this.selectedOrders.set(o)}onMouseHover(e,o){(!o.LogisticService?.Name||!o.ReferenceNumber)&&this.contextMenuEl.show(e,o)}onSelectContextItem(e){e.item?.id==="refresh"&&this.refreshShippingAndRefNumber(e.data)}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-ready-to-ship"]],viewQuery:function(o,t){if(o&1&&H(Te,5),o&2){let s;Q(s=j())&&(t.contextMenuEl=s.first)}},features:[G([F])],decls:37,vars:14,consts:[["contextMenu",""],["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["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"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],[2,"width","150px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem"],["matTooltip","Retrieve shipping courier and reference number",1,"btn","btn-icon-only",3,"click"],[1,"fa-solid","fa-arrows-rotate","fs-6"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(o,t){if(o&1){let s=v();q(0),w(1,"async"),i(2,"mainpanel",1),f("onSubmit",function(){return m(s),p(t.initReadyToShip())}),S("textChange",function(a){return m(s),C(t.filter().Number,a)||(t.filter().Number=a),p(a)}),i(3,"actions"),b(4,Ve,2,0,"button",2),i(5,"a",3),u(6,"i",4),i(7,"span"),d(8,"Order Fulfillment Display"),n()()(),i(9,"filters")(10,"div")(11,"label",5),d(12,"Channel"),n(),i(13,"app-channel-options-v2",6),S("ngModelChange",function(a){return m(s),C(t.filter().ListChannelID,a)||(t.filter().ListChannelID=a),p(a)}),n()(),i(14,"div",7)(15,"label",5),d(16,"From/To"),n(),i(17,"div",8)(18,"datepicker",9),S("dateChange",function(a){return m(s),C(t.filter().From,a)||(t.filter().From=a),p(a)}),n()(),i(19,"div")(20,"datepicker",10),S("dateChange",function(a){return m(s),C(t.filter().To,a)||(t.filter().To=a),p(a)}),n()()(),i(21,"div",7)(22,"label",11),d(23,"Page Number"),n(),i(24,"input",12),S("ngModelChange",function(a){return m(s),C(t.filter().PageNumber,a)||(t.filter().PageNumber=a),p(a)}),n()(),i(25,"div",7)(26,"label",11),d(27,"Page Size"),n(),i(28,"input",13),S("ngModelChange",function(a){return m(s),C(t.filter().PageSize,a)||(t.filter().PageSize=a),p(a)}),n()()(),i(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),b(33,Le,22,2,"div",17)(34,Ie,2,0,"div",18),n()()()()(),i(35,"app-context-menu",19,0),f("onSelectItem",function(a){return m(s),p(t.onSelectContextItem(a))}),n()}if(o&2){let s=U(E(1,10,t.readyToShip$)||J(13,we));l(2),g("text",t.filter().Number),l(2),x(t.selectedOrders().length>0?4:-1),l(9),h("multiple",!0),g("ngModel",t.filter().ListChannelID),l(5),g("date",t.filter().From),l(2),g("date",t.filter().To),l(4),g("ngModel",t.filter().PageNumber),l(4),g("ngModel",t.filter().PageSize),l(5),x(s.length>0?33:34),l(2),h("items",t.contextMenuItems)}},dependencies:[te,Z,ee,$,ue,ce,he,_e,ae,ne,le,ie,oe,re,ge,Ce,Se,ye,be,pe,me,ve,fe],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], div[_ngcontent-%COMP%]:hover.actions-cell .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return r})();export{dt as ReadyToShipComponent};
1
+ import{a as xe,b as ve}from"./chunk-V3ZRQKJA.js";import{a as ge,b as Ce,c as Se}from"./chunk-T27ABFCP.js";import{a as be}from"./chunk-FHNST4Y7.js";import{a as F}from"./chunk-LLHPMXKP.js";import{a as ye}from"./chunk-67HPC5Y3.js";import"./chunk-XPCRS7AL.js";import"./chunk-MX5SR3SR.js";import{a as he}from"./chunk-KTB223SK.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import"./chunk-3GDM5JNY.js";import"./chunk-XXT6F2ZS.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import"./chunk-IHSGQFDX.js";import"./chunk-MO53T3IK.js";import"./chunk-W3JTS22H.js";import"./chunk-SDUUFQUI.js";import"./chunk-6L7TD5DW.js";import"./chunk-6OMSPZZC.js";import"./chunk-3RK6DDJD.js";import"./chunk-HIC5QC3Y.js";import"./chunk-JBT7GBCM.js";import"./chunk-JVNHFIYT.js";import{a as fe}from"./chunk-CBQUB3KW.js";import"./chunk-FGRPTNDB.js";import"./chunk-3PPLPXAX.js";import"./chunk-OXWPLJEW.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-5CKVZBHM.js";import"./chunk-4YRBARG2.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.js";import"./chunk-63ANFYRV.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-ACIMXBIC.js";import"./chunk-PYXL7UF7.js";import{a as _e}from"./chunk-LDL3A7NM.js";import"./chunk-P2AADVEN.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as de}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{b as se}from"./chunk-EUYQST7Q.js";import{m as ce,n as ue}from"./chunk-HJXYT6MI.js";import{A as ae,b as ie,c as ne,h as oe,m as re,o as le}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as me,s as pe}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as Z,k as $,m as ee,n as te}from"./chunk-FXQKRJWU.js";import{$c as w,Ac as H,Bc as Q,Cc as j,Gb as W,Gc as d,Hc as T,Ic as R,Kc as g,Lc as C,Mb as b,Mc as S,Nc as q,Oc as U,Pc as P,Qc as G,Ra as O,Rc as J,Sc as K,Yb as h,Z as L,ac as D,ad as E,bd as X,dc as x,ea as I,ec as B,gc as A,hc as z,ic as i,jc as n,kc as u,oc as v,pa as V,pb as k,rb as l,rd as Y,tc as f,uc as c,ya as m,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as M,b as N}from"./chunk-66YHNWRR.js";var Te=["contextMenu"],we=()=>[],Me=r=>({"td-cell-hover":r});function Ve(r,_){if(r&1){let e=v();i(0,"button",20),f("click",function(){m(e);let t=c();return p(t.setMultipleFulfillment())}),d(1," Set Fulfillment "),n()}}function Re(r,_){if(r&1&&u(0,"variants-dropdown",37),r&2){let e=c().$implicit;h("variants",e==null?null:e.Variants)}}function Ee(r,_){if(r&1&&u(0,"variant-with-image",38),r&2){let e=c().$implicit;h("variant",e==null?null:e.Variants[0])}}function Oe(r,_){if(r&1&&(i(0,"span"),d(1),n()),r&2){let e=c().$implicit;l(),R("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Pe(r,_){if(r&1){let e=v();i(0,"div",40)(1,"button",44),f("click",function(){m(e);let t=c().$implicit,s=c(2);return p(s.refreshShippingAndRefNumber(t))}),u(2,"i",45),n()()}}function Fe(r,_){if(r&1){let e=v();i(0,"button",46),f("click",function(){m(e);let t=c().$implicit,s=c(2);return p(s.onSetFulfillment(t))}),d(1," Set Fulfillment "),n()}}function Ne(r,_){if(r&1){let e=v();i(0,"tr")(1,"td")(2,"input",30),S("ngModelChange",function(t){let s=m(e).$implicit;return C(s.selected,t)||(s.selected=t),p(t)}),f("ngModelChange",function(){m(e);let t=c(2),s=P(0);return p(t.onSelectOrder(s))}),n()(),i(3,"td")(4,"div",31),u(5,"img",32),w(6,"channelImage"),i(7,"div",33)(8,"div"),d(9),n(),i(10,"small",34)(11,"span"),d(12),n()()()()(),i(13,"td")(14,"div",35)(15,"div"),u(16,"order-link",36),n(),i(17,"small"),d(18),w(19,"date"),n()()(),i(20,"td"),d(21),n(),i(22,"td"),b(23,Re,1,1,"variants-dropdown",37)(24,Ee,1,1,"variant-with-image",38),n(),i(25,"td",39),d(26),w(27,"number"),n(),i(28,"td",40)(29,"div",41)(30,"div",35)(31,"div",42)(32,"span"),d(33),n(),b(34,Oe,2,1,"span"),n(),i(35,"small"),d(36),n()(),b(37,Pe,3,0,"div",40),n()(),i(38,"td",40),b(39,Fe,2,0,"button",43),n()()}if(r&2){let e=_.$implicit,o=c(2);l(2),g("ngModel",e.selected),h("disabled",o.selectedChannelType()!=null&&o.selectedChannelType()!=e.MarketType),l(3),h("src",E(6,18,e==null?null:e.MarketType),k)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),T(e.Outlet),l(3),T(e.ChannelName),l(4),h("order",e),l(2),R(" ",X(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(3),T(e.Customer),l(),D(K(25,Me,(e.Variants==null?null:e.Variants.length)>1)),l(),x((e.Variants==null?null:e.Variants.length)>1?23:24),l(3),T(E(27,23,e.Amount)),l(7),T(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?34:-1),l(2),R(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(),x(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?37:-1),l(2),x((e==null?null:e.MarketType)!=o.channelType.WooCommerce?39:-1)}}function Le(r,_){if(r&1){let e=v();i(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),u(4,"th",24),i(5,"th",25),d(6,"Outlet"),n(),i(7,"th",25),d(8,"Number"),n(),i(9,"th",25),d(10,"Customer"),n(),i(11,"th"),d(12,"Items"),n(),i(13,"th",26),d(14,"Amount"),n(),i(15,"th",27),d(16,"Shipping"),n(),u(17,"th",28),n()(),i(18,"tbody"),A(19,Ne,40,27,"tr",null,B),n()(),i(21,"app-custom-paginator",29),f("next",function(){m(e);let t=c();return p(t.initReadyToShip())})("previous",function(){m(e);let t=c();return p(t.initReadyToShip())}),n()()}if(r&2){let e=c(),o=P(0);l(19),z(o),l(2),h("filter",e.filter())("totaldata",o==null?null:o.length)}}function Ie(r,_){r&1&&(i(0,"div",18),u(1,"app-empty-state"),n())}var dt=(()=>{class r{constructor(){this.toastr=V(de),this.orderService=V(F),this.fulfillmentService=V(xe),this.channelType=se,this.selectedOrders=O([]),this.selectedChannelType=Y(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(o=>N(M({},o),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(I(()=>{this.selectedOrders.set([])}),L(1))}onFilterChange(e){this.filter.update(o=>M(M({},o),e))}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}setMultipleFulfillment(){this.fulfillmentService.setFulfillmentMultipleOrders(this.selectedOrders()).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}onSelectOrder(e){let o=e.filter(t=>t.selected);this.selectedOrders.set(o)}onMouseHover(e,o){(!o.LogisticService?.Name||!o.ReferenceNumber)&&this.contextMenuEl.show(e,o)}onSelectContextItem(e){e.item?.id==="refresh"&&this.refreshShippingAndRefNumber(e.data)}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-ready-to-ship"]],viewQuery:function(o,t){if(o&1&&H(Te,5),o&2){let s;Q(s=j())&&(t.contextMenuEl=s.first)}},features:[G([F])],decls:37,vars:14,consts:[["contextMenu",""],["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["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"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","100px"],[2,"width","150px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem"],["matTooltip","Retrieve shipping courier and reference number",1,"btn","btn-icon-only",3,"click"],[1,"fa-solid","fa-arrows-rotate","fs-6"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(o,t){if(o&1){let s=v();q(0),w(1,"async"),i(2,"mainpanel",1),f("onSubmit",function(){return m(s),p(t.initReadyToShip())}),S("textChange",function(a){return m(s),C(t.filter().Number,a)||(t.filter().Number=a),p(a)}),i(3,"actions"),b(4,Ve,2,0,"button",2),i(5,"a",3),u(6,"i",4),i(7,"span"),d(8,"Order Fulfillment Display"),n()()(),i(9,"filters")(10,"div")(11,"label",5),d(12,"Channel"),n(),i(13,"app-channel-options-v2",6),S("ngModelChange",function(a){return m(s),C(t.filter().ListChannelID,a)||(t.filter().ListChannelID=a),p(a)}),n()(),i(14,"div",7)(15,"label",5),d(16,"From/To"),n(),i(17,"div",8)(18,"datepicker",9),S("dateChange",function(a){return m(s),C(t.filter().From,a)||(t.filter().From=a),p(a)}),n()(),i(19,"div")(20,"datepicker",10),S("dateChange",function(a){return m(s),C(t.filter().To,a)||(t.filter().To=a),p(a)}),n()()(),i(21,"div",7)(22,"label",11),d(23,"Page Number"),n(),i(24,"input",12),S("ngModelChange",function(a){return m(s),C(t.filter().PageNumber,a)||(t.filter().PageNumber=a),p(a)}),n()(),i(25,"div",7)(26,"label",11),d(27,"Page Size"),n(),i(28,"input",13),S("ngModelChange",function(a){return m(s),C(t.filter().PageSize,a)||(t.filter().PageSize=a),p(a)}),n()()(),i(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),b(33,Le,22,2,"div",17)(34,Ie,2,0,"div",18),n()()()()(),i(35,"app-context-menu",19,0),f("onSelectItem",function(a){return m(s),p(t.onSelectContextItem(a))}),n()}if(o&2){let s=U(E(1,10,t.readyToShip$)||J(13,we));l(2),g("text",t.filter().Number),l(2),x(t.selectedOrders().length>0?4:-1),l(9),h("multiple",!0),g("ngModel",t.filter().ListChannelID),l(5),g("date",t.filter().From),l(2),g("date",t.filter().To),l(4),g("ngModel",t.filter().PageNumber),l(4),g("ngModel",t.filter().PageSize),l(5),x(s.length>0?33:34),l(2),h("items",t.contextMenuItems)}},dependencies:[te,Z,ee,$,ue,ce,he,_e,ae,ne,le,ie,oe,re,ge,Ce,Se,ye,be,pe,me,ve,fe],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], div[_ngcontent-%COMP%]:hover.actions-cell .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return r})();export{dt as ReadyToShipComponent};
@@ -1,4 +1,4 @@
1
- import{c as mt}from"./chunk-RXQX7567.js";import{ja as dt}from"./chunk-OJMQBH6T.js";import{a as We,b as ut,i as at}from"./chunk-66YHNWRR.js";function L(){}var Ge=e=>e;function pt(e,t){for(let n in t)e[n]=t[n];return e}function Mt(e){return e()}function Y(e){e.forEach(Mt)}function Ye(e){return typeof e=="function"}function oe(e,t){return e!=e?t==t:e!==t}function Ot(e){return Object.keys(e).length===0}function Rt(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Rt(t,n))}function Ce(e){return e&&Ye(e.destroy)?e.destroy:L}var Qe=()=>globalThis.performance.now(),xe=e=>requestAnimationFrame(e),he=new Set;function Et(e){he.forEach(t=>{t.c(e)||(he.delete(t),t.f())}),he.size!==0&&xe(Et)}function et(e){let t;return he.size===0&&xe(Et),{promise:new Promise(n=>{he.add(t={c:e,f:n})}),abort(){he.delete(t)}}}function ge(e,t){e.appendChild(t)}function P(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function At(e){return document.createTextNode(e)}function Ee(){return At("")}function N(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function R(e,t,n){e.classList[n?"add":"remove"](t)}function Nt(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var pe,tt=0,Ze={};function $t(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
1
+ import{c as mt}from"./chunk-EUYQST7Q.js";import{ja as dt}from"./chunk-OJMQBH6T.js";import{a as We,b as ut,i as at}from"./chunk-66YHNWRR.js";function L(){}var Ge=e=>e;function pt(e,t){for(let n in t)e[n]=t[n];return e}function Mt(e){return e()}function Y(e){e.forEach(Mt)}function Ye(e){return typeof e=="function"}function oe(e,t){return e!=e?t==t:e!==t}function Ot(e){return Object.keys(e).length===0}function Rt(e,...t){if(e==null)return L;let n=e.subscribe(...t);return n.unsubscribe?()=>n.unsubscribe():n}function me(e,t,n){e.$$.on_destroy.push(Rt(t,n))}function Ce(e){return e&&Ye(e.destroy)?e.destroy:L}var Qe=()=>globalThis.performance.now(),xe=e=>requestAnimationFrame(e),he=new Set;function Et(e){he.forEach(t=>{t.c(e)||(he.delete(t),t.f())}),he.size!==0&&xe(Et)}function et(e){let t;return he.size===0&&xe(Et),{promise:new Promise(n=>{he.add(t={c:e,f:n})}),abort(){he.delete(t)}}}function ge(e,t){e.appendChild(t)}function P(e,t,n){e.insertBefore(t,n||null)}function S(e){e.parentNode.removeChild(e)}function C(e){return document.createElement(e)}function At(e){return document.createTextNode(e)}function Ee(){return At("")}function N(e,t,n,i){return e.addEventListener(t,n,i),()=>e.removeEventListener(t,n,i)}function I(e,t,n){n==null?e.removeAttribute(t):e.getAttribute(t)!==n&&e.setAttribute(t,n)}function E(e,t,n,i){n===null?e.style.removeProperty(t):e.style.setProperty(t,n)}function R(e,t,n){e.classList[n?"add":"remove"](t)}function Nt(e,t,n=!1){let i=document.createEvent("CustomEvent");return i.initCustomEvent(e,n,!1,t),i}var pe,tt=0,Ze={};function $t(e,t,n,i,o,r,s,c=0){let l=16.666/i,f=`{
2
2
  `;for(let a=0;a<=1;a+=l){let p=t+(n-t)*r(a);f+=a*100+`%{${s(p,1-p)}}
3
3
  `}let d=f+`100% {${s(n,1-n)}}
4
4
  }`,u=`_bp_${Math.round(Math.random()*1e9)}_${c}`;if(!Ze[u]){if(!pe){let a=C("style");document.head.appendChild(a),pe=a.sheet}Ze[u]=!0,pe.insertRule(`@keyframes ${u} ${d}`,pe.cssRules.length)}let h=e.style.animation||"";return e.style.animation=`${h?`${h}, `:""}${u} ${i}ms linear ${o}ms 1 both`,tt+=1,u}function qe(e,t){e.style.animation=(e.style.animation||"").split(", ").filter(t?n=>n.indexOf(t)<0:n=>n.indexOf("_bp")===-1).join(", "),t&&!--tt&&Yt()}function Yt(){xe(()=>{if(tt)return;let e=pe.cssRules.length;for(;e--;)pe.deleteRule(e);Ze={}})}var nt;function Ie(e){nt=e}var ze=[],ht=[],Oe=[],gt=[],Xt=Promise.resolve(),je=!1;function Wt(){je||(je=!0,Xt.then(Ct))}function ee(e){Oe.push(e)}var Fe=new Set,Le=0;function Ct(){let e=nt;do{for(;Le<ze.length;){let t=ze[Le];Le++,Ie(t),Ft(t.$$)}for(Ie(null),ze.length=0,Le=0;ht.length;)ht.pop()();for(let t=0;t<Oe.length;t+=1){let n=Oe[t];Fe.has(n)||(Fe.add(n),n())}Oe.length=0}while(ze.length);for(;gt.length;)gt.pop()();je=!1,Fe.clear(),Ie(e)}function Ft(e){if(e.fragment!==null){e.update(),Y(e.before_update);let t=e.dirty;e.dirty=[-1],e.fragment&&e.fragment.p(e.ctx,t),e.after_update.forEach(ee)}}var Te;function Dt(){return Te||(Te=Promise.resolve(),Te.then(()=>{Te=null})),Te}function Ae(e,t,n){e.dispatchEvent(Nt(`${t?"intro":"outro"}${n}`))}var Re=new Set,U;function te(){U={r:0,c:[],p:U}}function ne(){U.r||Y(U.c),U=U.p}function v(e,t){e&&e.i&&(Re.delete(e),e.i(t))}function $(e,t,n,i){if(e&&e.o){if(Re.has(e))return;Re.add(e),U.c.push(()=>{Re.delete(e),i&&(n&&e.d(1),i())}),e.o(t)}}var Pt={duration:0};function St(e,t,n){let i=t(e,n),o=!1,r,s,c=0;function l(){r&&qe(e,r)}function f(){let{delay:u=0,duration:h=300,easing:a=Ge,tick:p=L,css:g}=i||Pt;g&&(r=$t(e,0,1,h,u,a,g,c++)),p(0,1);let k=Qe()+u,H=k+h;s&&s.abort(),o=!0,ee(()=>Ae(e,!0,"start")),s=et(X=>{if(o){if(X>=H)return p(1,0),Ae(e,!0,"end"),l(),o=!1;if(X>=k){let y=a((X-k)/h);p(y,1-y)}}return o})}let d=!1;return{start(){d||(d=!0,qe(e),Ye(i)?(i=i(),Dt().then(f)):f())},invalidate(){d=!1},end(){o&&(l(),o=!1)}}}function _e(e,t,n){let i=t(e,n),o=!0,r,s=U;s.r+=1;function c(){let{delay:l=0,duration:f=300,easing:d=Ge,tick:u=L,css:h}=i||Pt;h&&(r=$t(e,1,0,f,l,d,h));let a=Qe()+l,p=a+f;ee(()=>Ae(e,!1,"start")),et(g=>{if(o){if(g>=p)return u(0,1),Ae(e,!1,"end"),--s.r||Y(s.c),!1;if(g>=a){let k=d((g-a)/f);u(1-k,k)}}return o})}return Ye(i)?Dt().then(()=>{i=i(),c()}):c(),{end(l){l&&i.tick&&i.tick(1,0),o&&(r&&qe(e,r),o=!1)}}}function ke(e){e&&e.c()}function re(e,t,n,i){let{fragment:o,on_mount:r,on_destroy:s,after_update:c}=e.$$;o&&o.m(t,n),i||ee(()=>{let l=r.map(Mt).filter(Ye);s?s.push(...l):Y(l),e.$$.on_mount=[]}),c.forEach(ee)}function se(e,t){let n=e.$$;n.fragment!==null&&(Y(n.on_destroy),n.fragment&&n.fragment.d(t),n.on_destroy=n.fragment=null,n.ctx=[])}function Bt(e,t){e.$$.dirty[0]===-1&&(ze.push(e),Wt(),e.$$.dirty.fill(0)),e.$$.dirty[t/31|0]|=1<<t%31}function De(e,t,n,i,o,r,s,c=[-1]){let l=nt;Ie(e);let f=e.$$={fragment:null,ctx:null,props:r,update:L,not_equal:o,bound:{},on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(t.context||(l?l.$$.context:[])),callbacks:{},dirty:c,skip_bound:!1,root:t.target||l.$$.root};s&&s(f.root);let d=!1;f.ctx=n?n(e,t.props||{},(u,h,...a)=>{let p=a.length?a[0]:h;return f.ctx&&o(f.ctx[u],f.ctx[u]=p)&&(!f.skip_bound&&f.bound[u]&&f.bound[u](p),d&&Bt(e,u)),h}):[],f.update(),d=!0,Y(f.before_update),f.fragment=i?i(f.ctx):!1,t.target&&(f.fragment&&f.fragment.c(),re(e,t.target,t.anchor,t.customElement),Ct()),Ie(l)}var ie=class{$destroy(){se(this,1),this.$destroy=L}$on(t,n){let i=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return i.push(n),()=>{let o=i.indexOf(n);o!==-1&&i.splice(o,1)}}$set(t){this.$$set&&!Ot(t)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}};function it(e){let t=e-1;return t*t*t+1}function V(e,{delay:t=0,duration:n=400,easing:i=it,x:o=0,y:r=0,opacity:s=0}={}){let c=getComputedStyle(e),l=+c.opacity,f=c.transform==="none"?"":c.transform,d=l*(1-s);return{delay:t,duration:n,easing:i,css:(u,h)=>`
@@ -1,4 +1,4 @@
1
- import{b as d}from"./chunk-WN5DZGA4.js";import{c}from"./chunk-RXQX7567.js";import{ja as h,pa as f}from"./chunk-OJMQBH6T.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
1
+ import{b as d}from"./chunk-WN5DZGA4.js";import{c}from"./chunk-EUYQST7Q.js";import{ja as h,pa as f}from"./chunk-OJMQBH6T.js";var w=(()=>{class a{constructor(){this.toastrService=f(d)}showToastrUploadMultiple(l,e){let s=[],i=[],o=null,r=this.getResponseList(l);if(l.filter(t=>c.IsNotEmpty(t)).forEach(t=>{typeof t?.Response=="string"?i=[...i,r.length>1?this.setHtmlli(t.Response):this.setHtmlli(t.Response,!1)]:(t?.Response?.Success_list.forEach(n=>{s=[...s,r.length>1?this.setHtmlli(e?e(n,t.Channel):`
2
2
  <div>
3
3
  Product ${n.Name} was <div class="d-inline fw-bold">successfully</div> uploaded to ${t.Channel}
4
4
  </div>