marketplacepos 5.46.3 → 5.46.5

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/3rdpartylicenses.txt +43 -43
  2. package/Marketplace/{chunk-PQQSREEC.js → chunk-3PPLPXAX.js} +2 -2
  3. package/Marketplace/chunk-4BWA3J6V.js +1 -0
  4. package/Marketplace/chunk-5EDCBXCE.js +1 -0
  5. package/Marketplace/{chunk-53AH4SKO.js → chunk-5X2M3HM4.js} +1 -1
  6. package/Marketplace/{chunk-HAJDTNAW.js → chunk-5ZR5WIHG.js} +1 -1
  7. package/Marketplace/{chunk-B3RO2S3D.js → chunk-6NZJ2XKE.js} +1 -1
  8. package/Marketplace/{chunk-YIKOIRZU.js → chunk-6RCPPNMX.js} +1 -1
  9. package/Marketplace/{chunk-ER3SGZ7B.js → chunk-6WE2RKUX.js} +1 -1
  10. package/Marketplace/chunk-6YBD22SK.js +1 -0
  11. package/Marketplace/{chunk-TG5SFCNG.js → chunk-74AYYW2T.js} +1 -1
  12. package/Marketplace/{chunk-CTDSVBZQ.js → chunk-74WQHBVN.js} +1 -1
  13. package/Marketplace/{chunk-LSSYGFVV.js → chunk-774TVUXT.js} +1 -1
  14. package/Marketplace/{chunk-M7DDFDPD.js → chunk-7ES3PHES.js} +1 -1
  15. package/Marketplace/{chunk-4PL4XC3C.js → chunk-7IOOG3TG.js} +8 -8
  16. package/Marketplace/{chunk-EOYO5KJW.js → chunk-7QKEL4DD.js} +1 -1
  17. package/Marketplace/{chunk-3NCIMELL.js → chunk-7TQWJCUW.js} +1 -1
  18. package/Marketplace/{chunk-XSCE2K6J.js → chunk-AY25KXUA.js} +1 -1
  19. package/Marketplace/chunk-BVV5R6HN.js +1 -0
  20. package/Marketplace/{chunk-WIMLQM6B.js → chunk-CAK6MZUW.js} +2 -2
  21. package/Marketplace/chunk-CO5XZENC.js +1 -0
  22. package/Marketplace/{chunk-25N6ECN7.js → chunk-DRVWJPA2.js} +1 -1
  23. package/Marketplace/{chunk-GQXYHXWJ.js → chunk-DXPLB6OB.js} +1 -1
  24. package/Marketplace/chunk-EMJTQYVO.js +1 -0
  25. package/Marketplace/{chunk-BXXJEM76.js → chunk-FYB62QQV.js} +1 -1
  26. package/Marketplace/{chunk-6EMUVAZD.js → chunk-GVXBDVLX.js} +1 -1
  27. package/Marketplace/chunk-HVA57ZPZ.js +1 -0
  28. package/Marketplace/{chunk-QPC5ZTYC.js → chunk-HZPILY4V.js} +1 -1
  29. package/Marketplace/chunk-JX63Y4CW.js +1 -0
  30. package/Marketplace/{chunk-W4MTON2T.js → chunk-KEW73FTY.js} +1 -1
  31. package/Marketplace/{chunk-WBKGEDL6.js → chunk-KUYNX5QT.js} +1 -1
  32. package/Marketplace/{chunk-XSJBP4EN.js → chunk-L74PANZ5.js} +1 -1
  33. package/Marketplace/{chunk-QTTNQJAK.js → chunk-LEM7ESKJ.js} +1 -1
  34. package/Marketplace/{chunk-SBLG2UP7.js → chunk-LRBJ5RU5.js} +1 -1
  35. package/Marketplace/{chunk-V54LZUEC.js → chunk-LS2KMKMD.js} +1 -1
  36. package/Marketplace/chunk-LSWILW54.js +1 -0
  37. package/Marketplace/chunk-MACYDQHW.js +1 -0
  38. package/Marketplace/{chunk-ZC7VX6UG.js → chunk-OFEZTCJA.js} +1 -1
  39. package/Marketplace/{chunk-VHOREEP5.js → chunk-OG4QM5FO.js} +1 -1
  40. package/Marketplace/{chunk-RTF4FRXW.js → chunk-OLVWSY6L.js} +1 -1
  41. package/Marketplace/{chunk-2O4IEGGR.js → chunk-PGP3WHIS.js} +3 -3
  42. package/Marketplace/{chunk-DSAVJZIH.js → chunk-QUEDQBZU.js} +1 -1
  43. package/Marketplace/{chunk-B3HL4DNT.js → chunk-R5WARQUS.js} +1 -1
  44. package/Marketplace/chunk-RNZC6DAM.js +1 -0
  45. package/Marketplace/{chunk-E42O4ZCH.js → chunk-RT3SMV6M.js} +10 -10
  46. package/Marketplace/{chunk-JUHGMPX2.js → chunk-RUXJCVKX.js} +1 -1
  47. package/Marketplace/{chunk-EPCXMVX3.js → chunk-SXFLJBXI.js} +1 -1
  48. package/Marketplace/{chunk-6GQN3CZ7.js → chunk-U23D2EPE.js} +1 -1
  49. package/Marketplace/{chunk-CJ4F7QUO.js → chunk-UGYIOLBR.js} +1 -1
  50. package/Marketplace/{chunk-OCJXLFB4.js → chunk-UQFILVPA.js} +2 -2
  51. package/Marketplace/{chunk-XMZNTZ72.js → chunk-UQL42ODX.js} +1 -1
  52. package/Marketplace/{chunk-WHBI5II7.js → chunk-VEYUDPOA.js} +1 -1
  53. package/Marketplace/{chunk-764WEWDX.js → chunk-VIXNFSMT.js} +1 -1
  54. package/Marketplace/{chunk-ESDWGP24.js → chunk-VQIT62HE.js} +1 -1
  55. package/Marketplace/{chunk-PBHJGJHF.js → chunk-WBCI5HV5.js} +1 -1
  56. package/Marketplace/{chunk-QSERFP5U.js → chunk-WHV5AYGI.js} +1 -1
  57. package/Marketplace/{chunk-K5YVT6CU.js → chunk-WREH3C74.js} +2 -2
  58. package/Marketplace/{chunk-V33UHV5X.js → chunk-XANN3R5J.js} +1 -1
  59. package/Marketplace/{chunk-7NGIEICQ.js → chunk-XHBBUUIF.js} +1 -1
  60. package/Marketplace/index.html +2 -2
  61. package/Marketplace/{main-CVD4P432.js → main-KIV2XNXR.js} +1 -1
  62. package/package.json +1 -1
  63. package/Marketplace/chunk-6L24E3SM.js +0 -1
  64. package/Marketplace/chunk-A44LN77B.js +0 -1
  65. package/Marketplace/chunk-ACNBNSCK.js +0 -1
  66. package/Marketplace/chunk-JGKNYWZY.js +0 -1
  67. package/Marketplace/chunk-JOZJZEGN.js +0 -1
  68. package/Marketplace/chunk-MP3G42LL.js +0 -1
  69. package/Marketplace/chunk-O73TXSTZ.js +0 -1
  70. package/Marketplace/chunk-QOG52KD3.js +0 -1
  71. package/Marketplace/chunk-THMNZQLX.js +0 -1
  72. package/Marketplace/chunk-TYSVSEYQ.js +0 -1
  73. package/Marketplace/chunk-UDXV6RW2.js +0 -1
  74. package/Marketplace/chunk-VODHIYRA.js +0 -1
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"marketplacepos","version":"5.46.3"}
1
+ {"name":"marketplacepos","version":"5.46.5"}
@@ -1 +0,0 @@
1
- import{a as ae}from"./chunk-67HPC5Y3.js";import{a as ie}from"./chunk-OLANEXLB.js";import"./chunk-PFY5UG5D.js";import"./chunk-KS7ACI26.js";import{a as oe,b as re}from"./chunk-ABYG6YZT.js";import"./chunk-RAQRGWCZ.js";import"./chunk-HVCIQI7B.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"./chunk-ACIMXBIC.js";import{i as Q}from"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{e as K}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{a as X,b as Z,d as $,e as ee}from"./chunk-PYXL7UF7.js";import{c as J}from"./chunk-RXQX7567.js";import{m as te,n as ne}from"./chunk-HJXYT6MI.js";import{A as Y,c as U,h as j,m as q,o as G}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as A,J as H,f as W,g as F,k as B,m as k,n as z}from"./chunk-FXQKRJWU.js";import{$c as L,Fc as P,Gb as T,Gc as l,Hc as S,Ic as y,Kc as c,Lc as u,Mb as w,Mc as h,Sc as I,Yb as m,ad as N,bd as V,cd as R,ic as t,jc as n,kc as C,lc as M,mc as x,oc as O,pb as b,rb as r,tc as E,uc as v,xb as D,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var le=a=>({ID:a});function de(a,f){if(a&1&&(t(0,"span",17),C(1,"img",18),n(),l(2)),a&2){let e=f.item;r(),m("src",e.Img,b)("alt",e.Name),r(),y(" ",e.Name," ")}}function me(a,f){if(a&1&&(t(0,"tr")(1,"td"),l(2),n(),t(3,"td"),C(4,"img",28),n(),t(5,"td"),l(6),n(),t(7,"td",29)(8,"a",30),l(9),L(10,"number"),n()(),t(11,"td"),l(12),n(),t(13,"td"),l(14),L(15,"date"),n()()),a&2){let e=f.$implicit;r(2),S(e._source.ChannelName),r(2),m("src",e.logo,b),r(2),S(e._source.DateRange),r(2),m("queryParams",I(12,le,e._source.ID)),r(),y(" ",N(10,7,e._source.CountOrder)," "),r(3),S(e._source.UserLogin),r(2),y(" ",V(15,9,e._source["@timestamp_received"],"dd MMM yyyy HH:mm")," ")}}function pe(a,f){if(a&1){let e=O();M(0),t(1,"div",19)(2,"table",20)(3,"thead")(4,"tr",21)(5,"th",22),l(6,"Channel"),n(),t(7,"th",23),l(8,"Type"),n(),t(9,"th",24),l(10,"Download Date Range"),n(),t(11,"th",25),l(12,"Count"),n(),t(13,"th"),l(14,"User Login"),n(),t(15,"th"),l(16,"Created"),n()()(),t(17,"tbody"),w(18,me,16,14,"tr",26),n()(),t(19,"mat-paginator",27),E("page",function(i){p(e);let d=v();return s(d.onPaginationChange(i))}),n()(),x()}if(a&2){let e=v();r(18),m("ngForOf",e.downloadOrders),r(),m("length",e.paginationTotal)("pageSize",e.paginationPageSize)("pageIndex",(e.filter==null?null:e.filter.PageNumber)==0?0:(e.filter==null?null:e.filter.PageNumber)-1)}}function se(a,f){a&1&&(t(0,"div",31),C(1,"app-empty-state"),n())}var xe=(()=>{class a{constructor(e,g){this.http=e,this.authService=g,this.filter={PageNumber:0,RowCount:20,ChannelID:"",From:"",To:""},this.channelOptions=this.authService.getChannels(),this.onGetLoader()}onGetLoader(){this.http.post("/api/OrdersLoader/OrderLogsLoader",{}).subscribe(e=>{this.filter=e.Filter,this.getDownloadOrders()})}getDownloadOrders(){this.http.post("api/Orders/OrderLogsPaged",this.filter).subscribe(e=>{this.downloadOrders=e.hits,this.setChannelLogo(),this.paginationTotal=e.total.value,this.paginationPageSize=this.filter.RowCount>this.paginationTotal?this.paginationTotal:this.filter.RowCount})}setChannelLogo(){this.downloadOrders=this.downloadOrders.map(e=>(e.logo=J.getChannelLogoByTypeId(e._source.TypeID),e))}onPaginationChange(e){this.filter.PageNumber=e.pageIndex+1,this.getDownloadOrders()}static{this.\u0275fac=function(g){return new(g||a)(D(K),D(Q))}}static{this.\u0275cmp=T({type:a,selectors:[["app-download-order-log"]],decls:29,vars:10,consts:[["EMPTY_STATE",""],["headerTitle","Download Order Log",3,"onSubmit","hideSearchBox"],[1,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[4,"ngIf","ngIfElse"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table-responsive"],[1,"table","table-hover"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],[2,"width","200px"],[1,"text-end",2,"width","200px"],[4,"ngFor","ngForOf"],[3,"page","length","pageSize","pageIndex"],[2,"width","25px",3,"src"],[1,"text-end"],["routerLink","/menu/Order/Download_Order_Log/Detail",3,"queryParams"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"]],template:function(g,i){if(g&1){let d=O();t(0,"mainpanel",1),E("onSubmit",function(){return p(d),s(i.getDownloadOrders())}),t(1,"filters")(2,"div")(3,"label",2),l(4,"Channel"),n(),t(5,"ng-select",3),h("ngModelChange",function(o){return p(d),u(i.filter.ChannelID,o)||(i.filter.ChannelID=o),s(o)}),w(6,de,3,3,"ng-template",4),n()(),t(7,"div",5)(8,"label",6),l(9,"From/To"),n(),t(10,"div",7)(11,"datepicker",8),h("dateChange",function(o){return p(d),u(i.filter.From,o)||(i.filter.From=o),s(o)}),n()(),t(12,"div")(13,"datepicker",9),h("dateChange",function(o){return p(d),u(i.filter.To,o)||(i.filter.To=o),s(o)}),n()()(),t(14,"div",5)(15,"label",10),l(16,"Page Number"),n(),t(17,"input",11),h("ngModelChange",function(o){return p(d),u(i.filter.PageNumber,o)||(i.filter.PageNumber=o),s(o)}),n()(),t(18,"div",5)(19,"label",10),l(20,"Page Size"),n(),t(21,"input",12),h("ngModelChange",function(o){return p(d),u(i.filter.RowCount,o)||(i.filter.RowCount=o),s(o)}),n()()(),t(22,"content")(23,"div",13)(24,"div",14)(25,"div",15),w(26,pe,20,4,"ng-container",16)(27,se,2,0,"ng-template",null,0,R),n()()()()()}if(g&2){let d=P(28);m("hideSearchBox",!0),r(5),m("clearable",!0)("items",i.channelOptions),c("ngModel",i.filter.ChannelID),r(6),c("date",i.filter.From),r(2),c("date",i.filter.To),r(4),c("ngModel",i.filter.PageNumber),r(4),c("ngModel",i.filter.RowCount),r(5),m("ngIf",(i.downloadOrders==null?null:i.downloadOrders.length)>0)("ngIfElse",d)}},dependencies:[z,W,F,k,B,re,oe,ne,te,ee,$,X,Z,Y,U,G,j,q,ae,H,A,ie],encapsulation:2})}}return a})();export{xe as DownloadOrderLogComponent};
@@ -1 +0,0 @@
1
- import{Ra as i}from"./chunk-OJMQBH6T.js";var s=class{constructor(){this.top=i(0)}initTopPosition(){let t=document.querySelector("body");this.top.set(t.getBoundingClientRect()?.top*-1)}adjustOverlayPosition(){let t=document.querySelector(".p-overlay.p-component");if(!t)return;let o=t.getBoundingClientRect(),e=this.top()+o.top;t.style.setProperty("top",`${e}px`,"important"),getComputedStyle(t).position!=="fixed"&&t.style.setProperty("position","fixed","important"),this.startOverlayObserver()}startOverlayObserver(){let t=document.querySelector(".p-overlay.p-component");t&&(this.stopOverlayObserver(),this.overlayObserver=new MutationObserver(o=>{let e=o[0];if(e&&e.type==="attributes"&&e.attributeName==="style"){let r=e.target,n=getComputedStyle(r).display,y=getComputedStyle(r).visibility;(n==="none"||y==="hidden")&&(r.style.setProperty("display","block","important"),r.style.setProperty("visibility","visible","important"),r.style.setProperty("position","fixed","important"))}}),this.overlayObserver.observe(t,{attributes:!0,attributeFilter:["style"]}))}stopOverlayObserver(){this.overlayObserver&&(this.overlayObserver.disconnect(),this.overlayObserver=void 0)}};export{s as a};
@@ -1 +0,0 @@
1
- import{a as Me}from"./chunk-EHBCYQSG.js";import{a as Fe,b as Ve}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 Te,b as De,c as Ee,d as B,e as U}from"./chunk-TKV7XWBT.js";import{a as ve,b as be}from"./chunk-YTCIQBSO.js";import"./chunk-RHHHL4OR.js";import{a as Ie}from"./chunk-M7DDFDPD.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 ye}from"./chunk-C7YK5TDP.js";import"./chunk-HAJDTNAW.js";import"./chunk-ACIMXBIC.js";import{i as ge}from"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import{b as pe,e as _e}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{a as he,b as Ce,d as ue,e as xe}from"./chunk-PYXL7UF7.js";import{c as se}from"./chunk-RXQX7567.js";import{d as fe,l as Pe,m as Se,n as we}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 T,Yb as m,Z as A,ad as F,bd as J,cd as Z,dc as P,ea as $,ec as N,gc as k,hc as R,ic as a,jc as c,kc as S,lc as z,mc as G,oc as u,pa as M,pb as V,rb as l,tc as C,uc as r,xb as f,xc as H,ya as p,za as _}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var O=i=>[i],Le=i=>({"text-decoration-line-through":i}),Be=i=>({"bg-gradient-warning":i});function Ue(i,s){if(i&1&&(a(0,"span",10),S(1,"img",11),c(),d(2)),i&2){let e=s.item;l(),m("src",e==null?null:e.Img,V),l(),b(" ",e.Name," ")}}function Oe(i,s){if(i&1){let e=u();a(0,"button",16),C("click",function(){p(e);let t=r().ngIf,o=r(2);return _(o.updateStock(t))}),S(1,"i",17),d(2," Update "),c()}}function We(i,s){if(i&1){let e=u();a(0,"actions")(1,"div",12),h(2,Oe,3,0,"button",13),a(3,"button",14),C("click",function(){p(e);let t=r(2);return _(t.openExportDialog())}),S(4,"i",15),a(5,"span"),d(6,"Export"),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(2),m("ngIf",n.productService.hasSelectionVariant(e))}}function Ae(i,s){if(i&1){let e=u();a(0,"th")(1,"input",32),C("change",function(t){p(e);let o=r().ngIf,g=r(2);return _(g.onSelectAllSKU(t.target.checked,o))}),c()()}}function $e(i,s){if(i&1){let e=u();a(0,"input",49),y("ngModelChange",function(t){p(e);let o=r(4).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),C("ngModelChange",function(){p(e);let t=r(4).$implicit,o=r(3);return _(o.onCheckboxStateProduct(t))}),c()}if(i&2){let e=r(4).$implicit;w("ngModel",e.selected)}}function je(i,s){if(i&1&&h(0,$e,1,1,"ng-template",26),i&2){let e=r(6);m("ngxPermissionsOnly",T(1,O,e.rolePriceEdit))}}function ze(i,s){if(i&1){let e=u();z(0),a(1,"img",50),C("click",function(t){p(e);let o=r(3).$implicit,g=r(3);return _(g.onZoomImage(t,o==null?null:o.ImageUrl))}),c(),G()}if(i&2){let e=r(3).$implicit;l(),H("src",e.ThumbnailUrl,V)}}function Ge(i,s){i&1&&S(0,"img",51)}function He(i,s){if(i&1&&(a(0,"small",48),d(1),c()),i&2){let e=r(3).$implicit;l(),b("(",e.Category,")")}}function qe(i,s){if(i&1&&(a(0,"td",44)(1,"div",35),h(2,je,1,3,null,26),a(3,"div"),h(4,ze,2,1,"ng-container",45)(5,Ge,1,0,"ng-template",null,0,Z),c()()(),a(7,"td",46)(8,"span",47),d(9),c(),h(10,He,2,1,"small",48),c()),i&2){let e=q(6),n=r(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 Ke(i,s){if(i&1){let e=u();a(0,"input",54),y("ngModelChange",function(t){p(e);let o=r(2).$implicit;return I(o.selected,t)||(o.selected=t),_(t)}),c()}if(i&2){let e=r(2).$implicit;w("ngModel",e.selected)}}function Je(i,s){if(i&1&&(a(0,"td",52),h(1,Ke,1,1,"input",53),c()),i&2){let e=r().$implicit;l(),P(e.UnitPrice>=0?1:-1)}}function Ze(i,s){i&1&&(a(0,"div",36),d(1," Not Found "),c())}function Qe(i,s){if(i&1&&(a(0,"div"),d(1),v(2,"number"),c()),i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.UnitPrice)," ")}}function Xe(i,s){if(i&1&&(a(0,"div",37)(1,"a",40),S(2,"i",55),c()()),i&2){let e=r().$implicit,n=r(4);l(),m("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),V)}}function Ye(i,s){if(i&1){let e=u();a(0,"div",56),C("click",function(){p(e);let t=r().$implicit,o=r().$implicit,g=r(2).ngIf,x=r();return _(x.openTableDialog(t,o,g))}),d(1),v(2,"number"),c()}if(i&2){let e=r().$implicit;l(),b(" ",F(2,1,e.Channel[0]==null?null:e.Channel[0].Price)," ")}}function et(i,s){if(i&1){let e=u();a(0,"tr",33),h(1,qe,11,7),a(2,"td",24),d(3),c(),a(4,"td",27)(5,"span",34),d(6),c()(),h(7,Je,2,1,"ng-template",26),a(8,"td",27)(9,"div",35),h(10,Ze,2,0,"div",36)(11,Qe,3,3,"div")(12,Xe,3,1,"div",37),c()(),a(13,"td",38)(14,"div",35),h(15,Ye,3,3,"div",39),a(16,"div",37)(17,"a",40),S(18,"i",41),c()(),a(19,"div",37)(20,"div",42),C("click",function(){let t=p(e).$implicit,o=r(4);return _(o.refreshPrice(t))}),S(21,"i",43),c()()()()()}if(i&2){let e=s.$implicit,n=s.$index,t=r(4);l(),P(n==0?1:-1),l(2),L(e.Model),l(2),m("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",T(12,Le,e.Discontinued)),l(),b(" ",e.Code," "),l(),m("ngxPermissionsOnly",T(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",T(16,Be,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,V)}}function tt(i,s){if(i&1&&k(0,et,22,18,"tr",33,N),i&2){let e=s.$implicit;R(e.Variants)}}function nt(i,s){if(i&1){let e=u();a(0,"content")(1,"div",18)(2,"div",19)(3,"table",20)(4,"thead",21)(5,"tr")(6,"th",22),d(7," Product "),a(8,"div")(9,"mat-slide-toggle",23),y("ngModelChange",function(t){p(e);let o=r(2);return I(o.toggleDifferentInventory,t)||(o.toggleDifferentInventory=t),_(t)}),C("toggleChange",function(){p(e);let t=r(2);return _(t.onToggleDifferentInventory())}),a(10,"small",7),d(11,"FILTER DIFFERENT PRICE"),c()()()(),a(12,"th",24),d(13,"Variant"),c(),a(14,"th",25),d(15,"SKU"),c(),h(16,Ae,2,0,"ng-template",26),a(17,"th",27),d(18,"POS"),c(),a(19,"th",27)(20,"div",28),C("click",function(){p(e);let t=r(2);return _(t.openModalFilter())}),S(21,"img",29),a(22,"span",30),d(23),v(24,"stringLimit"),c()()()()(),a(25,"tbody"),k(26,tt,2,0,null,null,N),c()(),a(28,"infinite-paginator",31),v(29,"async"),C("onNextPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){p(e);let t=r(2);return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){p(e);let t=r(2);return _(t.infinitePagination.getRowCount(t.searchFilter))}),c()()()()}if(i&2){let e=s.ngIf,n=r(2);l(9),w("ngModel",n.toggleDifferentInventory),l(7),m("ngxPermissionsOnly",T(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,V),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 it(i,s){if(i&1){let e=u();a(0,"mainpanel",2),y("textChange",function(t){p(e);let o=r();return I(o.searchFilter.text,t)||(o.searchFilter.text=t),_(t)}),C("onSubmit",function(){p(e);let t=r();return _(t.onSearch())}),a(1,"filters")(2,"div")(3,"label",3),d(4,"Channel"),c(),a(5,"ng-select",4),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.ChannelID,t)||(o.searchFilter.ChannelID=t),_(t)}),h(6,Ue,3,2,"ng-template",5),c()(),a(7,"div",6)(8,"label",7),d(9,"Page Number"),c(),a(10,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),_(t)}),c()(),a(11,"div",6)(12,"label",7),d(13,"Page Size"),c(),a(14,"input",8),y("ngModelChange",function(t){p(e);let o=r();return I(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),_(t)}),c()()(),h(15,We,7,1,"actions",9),v(16,"async"),h(17,nt,30,18,"content",9),v(18,"async"),c()}if(i&2){let e=r();m("headerTitle",e.pageTitle),w("text",e.searchFilter.text),l(5),m("clearable",!1)("items",e.channelOptions),w("ngModel",e.searchFilter.ChannelID),l(5),w("ngModel",e.searchFilter.PageNumber),l(4),w("ngModel",e.searchFilter.RowCount),l(),m("ngIf",F(16,9,e.data$)),l(2),m("ngIf",F(18,11,e.data$))}}var Wt=(()=>{class i{constructor(e,n,t,o,g,x,Ne,ke,Re){this.http=e,this.toastr=n,this.dialog=t,this.productService=o,this.biggerPictureService=g,this.authService=x,this.mainPanelService=Ne,this.exportService=ke,this.decimalPipe=Re,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(Te,{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(Ve,{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(_e),f(pe),f(fe),f(Ie),f(ye),f(ge),f(Pe),f(Fe),f(D))}}static{this.\u0275cmp=j({type:i,selectors:[["app-price-single-channel"]],features:[K([B,Me,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,"fw-bold","mb-2"],["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[4,"ngIf"],[1,"me-2"],[2,"width","18px",3,"src"],[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,it,19,13,"mainpanel",1),v(1,"async")),n&2&&m("ngIf",F(1,1,t.loader$))},dependencies:[ee,Q,X,Y,D,we,Se,xe,ue,he,Ce,le,ie,re,ne,oe,ae,De,Ee,de,me,be,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{Wt as PriceSingleChannelComponent};
@@ -1 +0,0 @@
1
- import{a as V,b as ft}from"./chunk-IJVKHW3C.js";import"./chunk-YERZ6W22.js";import{a as ut}from"./chunk-THMNZQLX.js";import{a as dt}from"./chunk-LDL3A7NM.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import"./chunk-CGOB6Y3X.js";import"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{e as mt}from"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as st,n as pt}from"./chunk-HJXYT6MI.js";import{A as ct,h as rt,m as lt}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as at,J as ot,d as Q,f as X,g as Z,j as tt,k as et,m as it,n as nt}from"./chunk-FXQKRJWU.js";import{$c as g,Fc as $,Gb as T,Gc as o,Hc as C,Ic as _,Jc as A,Kc as H,Lc as W,Mb as p,Mc as q,Nc as J,Qc as j,Ra as w,Rc as z,Sc as K,Tc as U,Uc as Y,Yb as s,Z as D,ac as F,ad as E,bd as y,cd as G,dc as S,ec as L,gc as k,hc as B,ic as e,jc as n,kc as R,lc as h,mc as N,oc as O,pa as P,pb as M,rb as r,tc as I,uc as f,v as b,ya as d,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var _t=(t,c)=>({"bg-gradient-danger":t,"bg-gradient-warning":c}),gt=()=>["/menu/products/status/notification/detailV2"],St=t=>({ID:t}),Ct=(t,c,i)=>({"text-warning":t,"text-success":c,"text-danger":i});function vt(t,c){t&1&&(e(0,"div"),o(1," Scan in progress. You will be notified once it is complete. "),n())}function xt(t,c){if(t&1&&(e(0,"div"),o(1),g(2,"number"),n()),t&2){let i=c.$implicit;r(),A(" ",i.Key,": ",E(2,2,i.Value)," ")}}function ht(t,c){if(t&1&&(e(0,"div",22)(1,"div",21),o(2,"Status Product:"),n(),k(3,xt,3,4,"div",null,L),n()),t&2){let i=f(2).$implicit;r(3),B(i.ParsedStatus)}}function Nt(t,c){if(t&1&&(e(0,"div",21),o(1),n(),e(2,"div"),o(3),n(),p(4,ht,5,0,"div",22)),t&2){let i=f().$implicit;r(),_(" ",i.ProcessLabel," "),r(2),C(i.ProcessDescription),r(),S(i!=null&&i.ParsedStatus&&(i==null||i.ParsedStatus==null?null:i.ParsedStatus.length)>0?4:-1)}}function It(t,c){if(t&1&&(h(0),o(1),g(2,"number"),e(3,"span"),o(4,"s"),n(),N()),t&2){let i=f().$implicit;r(),_(" ",y(2,1,i.DurationInSecond,"1.1-1")," ")}}function Et(t,c){t&1&&o(0," - ")}function yt(t,c){t&1&&o(0," In Progress ")}function Vt(t,c){t&1&&o(0," Completed ")}function bt(t,c){t&1&&o(0," Failed ")}function Dt(t,c){if(t&1&&(h(0),e(1,"tr",16)(2,"td")(3,"a",17),o(4),n()(),e(5,"td")(6,"div",18),R(7,"img",19),e(8,"span"),o(9),n()()(),e(10,"td"),p(11,vt,2,0,"div")(12,Nt,5,3),n(),e(13,"td"),p(14,It,5,4,"ng-container",20)(15,Et,1,0,"ng-template",null,0,G),n(),e(17,"td")(18,"div",21),p(19,yt,1,0)(20,Vt,1,0)(21,bt,1,0),n()(),e(22,"td",22)(23,"div"),o(24),n(),e(25,"div"),o(26),g(27,"date"),n()()(),N()),t&2){let i,a=c.$implicit,m=$(16),l=f();r(),s("ngClass",U(17,_t,a.Status==1,a.Status==0)),r(2),s("routerLink",z(20,gt))("queryParams",K(21,St,a.ID)),r(),_(" ",a.ID," "),r(3),s("src",a.Img,M),r(2),C(a.ChannelName),r(2),S(a.StateID==l.scanState.InProgress?11:12),r(3),s("ngIf",a.DurationInSecond)("ngIfElse",m),r(4),F(Y(23,Ct,a.StateID==l.scanState.InProgress,a.StateID==l.scanState.Completed,a.StateID==l.scanState.Failed)),r(),S((i=a.StateID)===l.scanState.InProgress?19:i===l.scanState.Completed?20:i===l.scanState.Failed?21:-1),r(5),C(a.LoginID),r(2),_(" ",y(27,14,a.Created,"dd MMM yyyy HH:mm")," ")}}var Kt=(()=>{class t{constructor(){this.notificationService=P(V),this.filter=w({RowCount:20,PageNumber:1,ChannelID:null}),this.scanState=ft,this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(b(i=>(i.Data=i.Data.map(a=>(a.StatusProduct&&(a.ParsedStatus=JSON.parse(a.StatusProduct)),a)),i)),D(1))}onFilter(){this.initNotifications()}static{this.\u0275fac=function(a){return new(a||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-notificationV2"]],features:[j([V])],decls:36,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/notification",1,"btn","btn-outline-secondary","btn-lg"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","260px"],[4,"ngFor","ngForOf"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"d-flex","align-items-center","gap-3"],[1,"channelLogo-md",3,"src","alt"],[4,"ngIf","ngIfElse"],[1,"fw-bold"],[1,"lh-base"]],template:function(a,m){if(a&1){let l=O();J(0),g(1,"async"),e(2,"mainpanel",1),I("onSubmit",function(){return d(l),u(m.onFilter())}),e(3,"actions")(4,"a",2),o(5," Back "),n()(),e(6,"filters")(7,"div")(8,"label",3),o(9,"Channel"),n(),e(10,"channel-select-options",4),q("ngModelChange",function(x){return d(l),W(m.filter().ChannelID,x)||(m.filter().ChannelID=x),u(x)}),n()()(),e(11,"content")(12,"div",5)(13,"div",6)(14,"div",7)(15,"div",8)(16,"table",9)(17,"thead",10)(18,"tr",11)(19,"th",12),o(20,"Job ID"),n(),e(21,"th"),o(22,"Channel"),n(),e(23,"th"),o(24,"Process"),n(),e(25,"th"),o(26,"Duration"),n(),e(27,"th"),o(28,"Status"),n(),e(29,"th"),o(30,"Creator"),n()()(),e(31,"tbody"),p(32,Dt,28,27,"ng-container",13),n()()()()(),e(33,"div",6)(34,"div",14)(35,"app-custom-paginator",15),I("next",function(){return d(l),u(m.initNotifications())})("previous",function(){return d(l),u(m.initNotifications())}),n()()()()()()}if(a&2){let l=E(1,7,m.notifications$);r(2),s("hideSearchBox",!0),r(8),H("ngModel",m.filter().ChannelID),r(22),s("ngForOf",l==null?null:l.Data),r(3),s("filter",m.filter())("totaldata",l==null||l.Data==null?null:l.Data.length)("paginationTotal",l==null?null:l.Count)("hasClicked",!0)}},dependencies:[nt,Q,X,Z,tt,it,et,ct,rt,lt,pt,st,dt,mt,ot,at,ut],encapsulation:2})}}return t})();export{Kt as NotificationV2Component};
@@ -1 +0,0 @@
1
- import{a as Y}from"./chunk-THMNZQLX.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-CGOB6Y3X.js";import{b as j,e as F}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{e as J}from"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as G,n as U}from"./chunk-HJXYT6MI.js";import{A as R,c as B,h as D,m as I}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as P,l as W,n as k}from"./chunk-FXQKRJWU.js";import{$c as S,Gb as x,Gc as i,Hc as E,Kc as C,Lc as b,Mb as M,Mc as _,Nc as T,Oc as V,Pc as v,Ra as h,Yb as f,Z as y,ad as w,dc as O,ic as e,jc as t,kc as A,oc as L,pa as u,rb as d,tc as g,uc as N,ya as s,za as m}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function z(n,q){if(n&1&&(e(0,"pre",21),i(1),S(2,"json"),t()),n&2){N();let l=v(25);d(),E(w(2,1,l))}}function K(n,q){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var ce=(()=>{class n{constructor(){this.httpService=u(F),this.toastr=u(j),this.selectedChannel=h(null),this.orderNumber=h(null)}fetchLog(){if(!this.selectedChannel()||!this.orderNumber()){this.toastr.warning("Please select a channel and enter an order number","Warning");return}this.orderLog$=this.httpService.post(H.GetOrderApiLog,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(y(1))}copyToClipboard(l){if(!l)return;let p=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(p),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=x({type:n,selectors:[["app-order-api"]],decls:40,vars:9,consts:[["headerTitle","Origin Order Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","orderLogText"],[1,"text-center","my-12","text-muted"]],template:function(p,r){if(p&1){let a=L();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return s(a),m(r.fetchLog())}),A(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Order API activities. "),t()(),e(15,"div",9)(16,"channel-select-options",10),_("ngModelChange",function(o){return s(a),b(r.selectedChannel,o)||(r.selectedChannel=o),m(o)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),_("ngModelChange",function(o){return s(a),b(r.orderNumber,o)||(r.orderNumber=o),m(o)}),t()()()()(),T(25),S(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),g("click",function(){s(a);let o=v(25);return m(r.copyToClipboard(o))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),M(38,z,3,3,"pre",21)(39,K,2,0,"p",22),t()()()()()()()()()}if(p&2){f("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),C("ngModel",r.selectedChannel),d(8),C("ngModel",r.orderNumber),d();let a=V(w(26,6,r.orderLog$));d(8),f("disabled",!a),d(5),O(a?38:39)}},dependencies:[k,P,W,U,G,J,R,B,D,I,Y],encapsulation:2})}}return n})();export{ce as OrderApiComponent};
@@ -1 +0,0 @@
1
- import{a as G}from"./chunk-THMNZQLX.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as F}from"./chunk-CGOB6Y3X.js";import{e as j}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as H,n as J}from"./chunk-HJXYT6MI.js";import{A as R,c as k,h as B,m as W}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as D,l as I,n as P}from"./chunk-FXQKRJWU.js";import{$c as b,Gb as S,Gc as i,Hc as N,Kc as g,Lc as f,Mb as x,Mc as C,Nc as O,Oc as V,Pc as _,Ra as w,Yb as m,Z as v,ad as y,dc as M,ic as e,jc as t,kc as L,oc as T,pa as E,rb as p,tc as h,uc as A,ya as d,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(n,U){if(n&1&&(e(0,"pre",21),i(1),b(2,"json"),t()),n&2){A();let l=_(25);p(),N(y(2,1,l))}}function q(n,U){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var pe=(()=>{class n{constructor(){this.httpService=E(j),this.selectedChannel=w(null),this.orderNumber=w(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(F.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(v(1))}copyToClipboard(l){if(!l)return;let c=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-escrow-api"]],decls:40,vars:10,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","onlyInputTypeID"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(c,o){if(c&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),h("click",function(){return d(a),s(o.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"channel-select-options",10),C("ngModelChange",function(r){return d(a),f(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),C("ngModelChange",function(r){return d(a),f(o.orderNumber,r)||(o.orderNumber=r),s(r)}),t()()()()(),O(25),b(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),h("click",function(){d(a);let r=_(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),p(16),g("ngModel",o.selectedChannel),m("onlyInputTypeID",5),p(8),g("ngModel",o.orderNumber),p();let a=V(y(26,7,o.escrowLog$));p(8),m("disabled",!a),p(5),M(a?38:39)}},dependencies:[P,D,I,R,k,B,W,J,H,G],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]})}}return n})();export{pe as EscrowApiComponent};
@@ -1 +0,0 @@
1
- import{a as Ie,b as Oe}from"./chunk-XSJBP4EN.js";import{a as Ae,b as Ve,c as De}from"./chunk-RU43F4UK.js";import{a as Fe}from"./chunk-25N6ECN7.js";import{a as H}from"./chunk-BXXJEM76.js";import{a as Ne}from"./chunk-67HPC5Y3.js";import"./chunk-XPCRS7AL.js";import"./chunk-MX5SR3SR.js";import{a as Pe}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-Q4N2QUV6.js";import"./chunk-7G6GQTSH.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-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-JVNHFIYT.js";import{a as Ee}from"./chunk-THMNZQLX.js";import"./chunk-C7YK5TDP.js";import"./chunk-ACIMXBIC.js";import{a as Me}from"./chunk-LDL3A7NM.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as x}from"./chunk-CGOB6Y3X.js";import{b as M,e as z}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import{b as m,c as E}from"./chunk-RXQX7567.js";import{b as we,d as ve,f as xe,g as ye,h as ke,m as Te,n as Le}from"./chunk-HJXYT6MI.js";import{A as R,b as fe,c as _e,h as O,m as W,o as Ce}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import{r as Se,s as be}from"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{j as ue,k as he,m as ge,n as I}from"./chunk-FXQKRJWU.js";import{$c as P,Ac as oe,Bc as re,Cc as ae,G as J,Gb as V,Gc as s,Hc as L,Ic as D,Kc as C,Lc as S,Mb as y,Mc as b,Nc as le,Oc as pe,Pc as N,Qc as se,Ra as j,Sc as me,Yb as v,Z as X,aa as Y,ac as ee,ad as F,bd as ce,dc as k,ec as te,gc as ie,hc as ne,ic as n,ja as A,jc as r,kc as g,oa as B,oc as T,pa as _,pb as Z,rb as p,rd as de,tc as f,uc as h,v as G,xb as $,ya as d,za as u}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as q,b as K}from"./chunk-66YHNWRR.js";var We=(()=>{class o{constructor(e,t){this.http=e,this.toastr=t}printTokopediaShippingLabel(e,t=!1){let i={OrderNumber:e,Printed:t};return this.http.post(x.TokopediaPrintShippingLabel,i)}printTiktokShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.TiktokPrintShippingLabel,i)}printShopeeShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.ShopeePrintShippingLabel,i).pipe(G(a=>(a&&(a.Number=e),a)))}printLazadaShippingLabel(e,t){let i={ShopID:t,OrderNumber:e};return this.http.post(x.LazadaPrintShippingLabel,i)}handleShippingLabelResponse(e,t){switch(t){case m.Tokopedia:let c=window.open("about:blank","_blank");c.document.write(e.File),c.document.close();break;case m.Tiktok:e.data!=null?window.open(e.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print");break;case m.Shopee:var i=Uint8Array.from(atob(e.File),l=>l.charCodeAt(0)),a=new Blob([i],{type:"octet/stream"});E.openDownloadFile(a,`${e?.Number}.pdf`);break;case m.Lazada:e?.result?.data!=null?window.open(e?.result?.data?.pdf_url,"_blank"):this.toastr.error(e.message,"Cannot Print");break}}static{this.\u0275fac=function(t){return new(t||o)(B(z),B(M))}}static{this.\u0275prov=A({token:o,factory:o.\u0275fac,providedIn:"root"})}}return o})();var Re=(()=>{class o{constructor(e){this.dialogRef=e,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(t){return new(t||o)($(we))}}static{this.\u0275cmp=V({type:o,selectors:[["app-print-tokopedia"]],decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,i){t&1&&(n(0,"div",0)(1,"h2",1),s(2,"Cetak label pesanan"),r(),n(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),s(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),n(8,"div",5)(9,"mat-checkbox",6),b("ngModelChange",function(c){return S(i.tandaiSudahDicetak,c)||(i.tandaiSudahDicetak=c),c}),r(),n(10,"span",7),s(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),n(12,"mat-dialog-actions",8)(13,"button",9),f("click",function(){return i.onCancel()}),s(14,"Cancel"),r(),n(15,"button",10),f("click",function(){return i.onPrint()}),s(16,"Cetak Pesanan"),r()()()),t&2&&(p(9),C("ngModel",i.tandaiSudahDicetak))},dependencies:[I,R,O,W,ke,ye,xe],encapsulation:2})}}return o})();var Q=(()=>{class o{constructor(){this.httpService=_(z),this.shippingLabelService=_(We),this.toastrService=_(M),this.dialog=_(ve)}printShippingLabel(e){switch(e?.MarketType){case m.Shopee:this.shippingLabelService.printShopeeShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Shopee));break;case m.Tiktok:this.shippingLabelService.printTiktokShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Tiktok));break;case m.Tokopedia:this.dialog.open(Re).afterClosed().pipe(J(t=>E.IsNotEmpty(t)),Y(t=>this.shippingLabelService.printTokopediaShippingLabel(e.Number,t))).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Tokopedia));break;case m.Lazada:this.shippingLabelService.printLazadaShippingLabel(e.Number,e.ShopID).subscribe(t=>this.shippingLabelService.handleShippingLabelResponse(t,m.Lazada));break;case m.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}printMultipleShippingLabel(e){let t=e.map(a=>({OrderNumber:a.Number,ShopID:a.ShopID})),i="";switch(e[0]?.MarketType){case m.Shopee:i=x.ShopeePrintMultipleShippingLabel;break;case m.Tiktok:i=x.TiktokPrintMultipleShippingLabel;break;case m.Lazada:i=x.LazadaPrintMultipleShippingLabel;break}this.httpService.post(i,t).subscribe(a=>{var c=Uint8Array.from(atob(a.File),ze=>ze.charCodeAt(0)),l=new Blob([c],{type:"octet/stream"});E.openDownloadFile(l,`${a?.Name}.pdf`)})}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275prov=A({token:o,factory:o.\u0275fac})}}return o})();var je=["contextMenu"],He=o=>({"td-cell-hover":o});function Ue(o,w){if(o&1){let e=T();n(0,"button",20),f("click",function(){d(e);let i=h(),a=N(0);return u(i.onDowloadShippingLabel(a))}),g(1,"i",21),n(2,"span"),s(3,"Download Shipping Label"),r()()}}function Qe(o,w){if(o&1){let e=T();n(0,"input",45),b("ngModelChange",function(i){d(e);let a=h().$implicit;return S(a.selected,i)||(a.selected=i),u(i)}),f("ngModelChange",function(){d(e);let i=h(3),a=N(0);return u(i.onSelectOrders(a))}),r()}if(o&2){let e=h().$implicit,t=h(2);C("ngModel",e.selected),v("disabled",t.selectedChannelType()!=null&&t.selectedChannelType()!=e.MarketType)}}function qe(o,w){if(o&1&&g(0,"variants-dropdown",38),o&2){let e=h().$implicit;v("variants",e==null?null:e.Variants)}}function Ke(o,w){if(o&1&&g(0,"variant-with-image",39),o&2){let e=h().$implicit;v("variant",e==null?null:e.Variants[0])}}function Ge(o,w){if(o&1&&(n(0,"span"),s(1),r()),o&2){let e=h().$implicit;p(),D("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Je(o,w){if(o&1){let e=T();n(0,"button",46),f("click",function(){d(e);let i=h().$implicit,a=h(2);return u(a.onPrintShippingLabel(i))}),g(1,"i",47),r()}}function Xe(o,w){if(o&1){let e=T();n(0,"tr")(1,"td"),y(2,Qe,1,2,"input",30),r(),n(3,"td")(4,"div",31),g(5,"img",32),P(6,"channelImage"),n(7,"div",33)(8,"div"),s(9),r(),n(10,"small",34)(11,"span"),s(12),r()()()()(),n(13,"td")(14,"div",35)(15,"div",36)(16,"div"),g(17,"order-link",37),r()(),n(18,"small"),s(19),P(20,"date"),r()()(),n(21,"td"),s(22),r(),n(23,"td"),y(24,qe,1,1,"variants-dropdown",38)(25,Ke,1,1,"variant-with-image",39),r(),n(26,"td",40),s(27),P(28,"number"),r(),n(29,"td",41),f("mouseenter",function(i){let a=d(e).$implicit,c=h(2);return u(c.onMouseEnter(i,a))}),n(30,"div",42)(31,"div",35)(32,"div",36)(33,"span"),s(34),r(),y(35,Ge,2,1,"span"),r(),n(36,"small"),s(37),r()()()(),n(38,"td",43),y(39,Je,2,0,"button",44),r()()}if(o&2){let e=w.$implicit,t=h(2);p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?2:-1),p(3),v("src",F(6,16,e==null?null:e.MarketType),Z)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(4),L(e.Outlet),p(3),L(e.ChannelName),p(5),v("order",e),p(2),D(" ",ce(20,18,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),L(e.Customer),p(),ee(me(23,He,(e.Variants==null?null:e.Variants.length)>1)),p(),k((e.Variants==null?null:e.Variants.length)>1?24:25),p(3),L(F(28,21,e.Amount)),p(7),L(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),k(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?35:-1),p(2),D(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),k((e==null?null:e.MarketType)!=t.channelType.WooCommerce?39:-1)}}function Ye(o,w){if(o&1){let e=T();n(0,"div",17)(1,"table",22)(2,"thead",23)(3,"tr",24),g(4,"th",25),n(5,"th",26),s(6,"Outlet"),r(),n(7,"th",26),s(8,"Number"),r(),n(9,"th",26),s(10,"Customer"),r(),n(11,"th"),s(12,"Items"),r(),n(13,"th",27),s(14,"Amount"),r(),n(15,"th",26),s(16,"Shipping"),r(),g(17,"th",28),r()(),n(18,"tbody"),ie(19,Xe,40,25,"tr",null,te),r()(),n(21,"app-custom-paginator",29),f("next",function(){d(e);let i=h();return u(i.initAwaitingCollection())})("previous",function(){d(e);let i=h();return u(i.initAwaitingCollection())}),r()()}if(o&2){let e=h(),t=N(0);p(19),ne(t),p(2),v("filter",e.filter())("totaldata",t==null?null:t.length)}}function Ze(o,w){o&1&&(n(0,"div",18),g(1,"app-empty-state"),r())}var Jt=(()=>{class o{constructor(){this.printShippingService=_(Q),this.orderService=_(H),this.toastr=_(M),this.fulfillmentService=_(Ie),this.channelType=m,this.selectedOrders=j([]),this.selectedChannelType=de(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.filter=j({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null}),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"},{id:"fulfillment",label:"Set Fulfillment",icon:"fa-solid fa-truck"}]}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(t=>K(q({},t),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(X(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}onSelectOrders(e){let t=e.filter(i=>i.selected);this.selectedOrders.set(t)}onDowloadShippingLabel(e){e=e.map(t=>(t.selected=!1,t)),this.printShippingService.printMultipleShippingLabel(this.selectedOrders()),this.selectedOrders.set([])}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initAwaitingCollection()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initAwaitingCollection()})}onMouseEnter(e,t){(!t.LogisticService?.Name||!t.ReferenceNumber)&&this.contextMenuEl.show(e,t)}onSelectContextItem(e){e.item?.id==="refresh"?this.refreshShippingAndRefNumber(e.data):this.onSetFulfillment(e.data)}static{this.\u0275fac=function(t){return new(t||o)}}static{this.\u0275cmp=V({type:o,selectors:[["app-awaiting-collection"]],viewQuery:function(t,i){if(t&1&&oe(je,5),t&2){let a;re(a=ae())&&(i.contextMenuEl=a.first)}},features:[se([H,Q])],decls:37,vars:13,consts:[["contextMenu",""],["headerTitle","Awaiting Collection","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-3"],[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"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line","me-3"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","50px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"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"],[1,"d-flex","align-items-end","gap-2"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[3,"mouseenter"],[1,"d-flex","align-items-center","gap-6"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(t,i){if(t&1){let a=T();le(0),P(1,"async"),n(2,"mainpanel",1),f("onSubmit",function(){return d(a),u(i.initAwaitingCollection())}),b("textChange",function(l){return d(a),S(i.filter().Number,l)||(i.filter().Number=l),u(l)}),n(3,"actions"),y(4,Ue,4,0,"button",2),n(5,"a",3),g(6,"i",4),n(7,"span"),s(8,"Order Fulfillment Display"),r()()(),n(9,"filters")(10,"div")(11,"label",5),s(12,"Channel"),r(),n(13,"channel-select-options",6),b("ngModelChange",function(l){return d(a),S(i.filter().ListChannelID,l)||(i.filter().ListChannelID=l),u(l)}),r()(),n(14,"div",7)(15,"label",5),s(16,"From/To"),r(),n(17,"div",8)(18,"datepicker",9),b("dateChange",function(l){return d(a),S(i.filter().From,l)||(i.filter().From=l),u(l)}),r()(),n(19,"div")(20,"datepicker",10),b("dateChange",function(l){return d(a),S(i.filter().To,l)||(i.filter().To=l),u(l)}),r()()(),n(21,"div",7)(22,"label",11),s(23,"Page Number"),r(),n(24,"input",12),b("ngModelChange",function(l){return d(a),S(i.filter().PageNumber,l)||(i.filter().PageNumber=l),u(l)}),r()(),n(25,"div",7)(26,"label",11),s(27,"Page Size"),r(),n(28,"input",13),b("ngModelChange",function(l){return d(a),S(i.filter().PageSize,l)||(i.filter().PageSize=l),u(l)}),r()()(),n(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),y(33,Ye,22,2,"div",17)(34,Ze,2,0,"div",18),r()()()()(),n(35,"app-context-menu",19,0),f("onSelectItem",function(l){return d(a),u(i.onSelectContextItem(l))}),r()}if(t&2){let a=pe(F(1,10,i.awaitingCollections$));p(2),C("text",i.filter().Number),p(2),k(i.selectedOrders().length>0?4:-1),p(9),v("multiple",!0),C("ngModel",i.filter().ListChannelID),p(5),C("date",i.filter().From),p(2),C("date",i.filter().To),p(4),C("ngModel",i.filter().PageNumber),p(4),C("ngModel",i.filter().PageSize),p(5),k((a==null?null:a.length)>0?33:34),p(2),v("items",i.contextMenuItems)}},dependencies:[I,ue,ge,he,Le,Te,Pe,Me,R,_e,Ce,fe,O,W,Ae,Ve,De,Ne,Ee,be,Se,Fe,Oe],encapsulation:2})}}return o})();export{Jt as AwaitingCollectionComponent};
@@ -1 +0,0 @@
1
- import{a as Y}from"./chunk-THMNZQLX.js";import"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-CGOB6Y3X.js";import{e as F}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import"./chunk-PYXL7UF7.js";import"./chunk-RXQX7567.js";import{m as J,n as G}from"./chunk-HJXYT6MI.js";import{A as j,c as K,h as R,m as N,p as O}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as T,j as W,l as D,n as U}from"./chunk-FXQKRJWU.js";import{$c as P,Gb as I,Gc as a,Hc as E,Kc as h,Lc as g,Mb as w,Mc as f,Nc as V,Oc as L,Pc as x,Ra as C,Yb as m,Z as b,ad as v,dc as k,ic as n,jc as i,kc as A,oc as _,pa as B,rb as d,tc as M,uc as u,ya as p,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function q(o,S){if(o&1){let t=_();n(0,"input",30),f("ngModelChange",function(e){p(t);let r=u();return g(r.sku,e)||(r.sku=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.sku)}}function z(o,S){if(o&1){let t=_();n(0,"input",31),f("ngModelChange",function(e){p(t);let r=u();return g(r.itemId,e)||(r.itemId=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.itemId)}}function Q(o,S){if(o&1&&(n(0,"pre",28),a(1),P(2,"json"),i()),o&2){u();let t=x(35);d(),E(v(2,1,t))}}function X(o,S){o&1&&(n(0,"p",29),a(1," Your data will be shown here once it's available "),i())}var me=(()=>{class o{constructor(){this.httpService=B(F),this.selectedChannel=C(null),this.sku=C(null),this.itemId=C(null),this.searchBy="sku"}initProductLog(){let t={ChannelID:this.selectedChannel()};this.searchBy==="sku"?t.SKU=this.sku():t.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,t).pipe(b(1))}copyToClipboard(t){if(!t)return;let c=typeof t=="string"?t:JSON.stringify(t,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||o)}}static{this.\u0275cmp=I({type:o,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","class","form-control","placeholder","Product Code / SKU",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","class","form-control","placeholder","ItemID is Product id from seller center",3,"ngModel","ngModelChange",4,"ngIf"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control",3,"ngModelChange","ngModel"]],template:function(c,e){if(c&1){let r=_();n(0,"mainpanel",0)(1,"actions")(2,"button",1),M("click",function(){return p(r),s(e.initProductLog())}),A(3,"i",2),a(4," Search "),i()(),n(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),a(12,"Channel"),i(),n(13,"p",8),a(14," View logs related to Product API Detail "),i()(),n(15,"div",9)(16,"channel-select-options",10),f("ngModelChange",function(l){return p(r),g(e.selectedChannel,l)||(e.selectedChannel=l),s(l)}),i()()(),n(17,"div",11)(18,"div",7)(19,"h6"),a(20,"Product Code / SKU"),i(),n(21,"p",8),a(22," Product SKU or Code from Channel Product "),i()(),n(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(27,"label",15),a(28,"Search by SKU"),i()(),n(29,"div",13)(30,"input",16),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(31,"label",17),a(32,"Search by ItemID"),i()()(),w(33,q,1,1,"input",18)(34,z,1,1,"input",19),i()()()(),V(35),P(36,"async"),n(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),a(42,"Response"),i(),n(43,"button",24),M("click",function(){p(r);let l=x(35);return s(e.copyToClipboard(l))}),a(44," Copy "),i()(),n(45,"div",25)(46,"div",26)(47,"div",27),w(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),i()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),h("ngModel",e.selectedChannel),d(10),h("ngModel",e.searchBy),m("value","sku"),d(4),h("ngModel",e.searchBy),m("value","itemid"),d(3),m("ngIf",e.searchBy==="sku"),d(),m("ngIf",e.searchBy==="itemid"),d();let r=L(v(36,11,e.productLog$));d(8),m("disabled",!r),d(5),k(r?48:49)}},dependencies:[U,T,W,D,j,K,O,R,N,G,J,Y],encapsulation:2})}}return o})();export{me as ProductApiComponent};
@@ -1 +0,0 @@
1
- import{i as k}from"./chunk-RTF4FRXW.js";import{a as A,b as F,d as U,e as W}from"./chunk-PYXL7UF7.js";import{A as L,a as D,h as V,m as I}from"./chunk-5PS6ZS3N.js";import{n as E}from"./chunk-FXQKRJWU.js";import{Gb as M,Gc as p,Ic as f,Kc as O,Lc as T,Mb as u,Mc as N,Oa as d,Qc as w,Yb as s,dc as y,ic as a,jc as o,kc as h,oc as x,pa as S,pb as g,rb as r,tc as C,uc as _,ya as v,za as b}from"./chunk-OJMQBH6T.js";function z(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o()),t&2){let e=m.item;r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," ")}}function P(t,m){if(t&1){let e=x();a(0,"span",6),C("click",function(){v(e);let n=_(),c=n.item,l=n.clear;return b(l(c))}),p(1,"x"),o()}}function j(t,m){if(t&1&&(a(0,"span",3),h(1,"img",4),o(),a(2,"span"),p(3),o(),u(4,P,2,0,"span",5)),t&2){let e=m.item,i=_();r(),s("src",e==null?null:e.Img,g),r(2),f(" ",e.Name," "),r(),y(i.clearable()?4:-1)}}var Y=(()=>{class t{constructor(){this.authService=S(k),this.multiple=d(!1),this.clearable=d(!0),this.options=this.authService.getChannels(),this.onChange=e=>{}}onChannelChange(e){this.onChange(e)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=M({type:t,selectors:[["channel-select-options"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"]},features:[w([{provide:D,multi:!0,useExisting:t}])],decls:3,vars:4,consts:[["bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel","appendTo","body",1,"center-text",3,"ngModelChange","clearable","items","ngModel","multiple"],["ng-option-tmp",""],["ng-label-tmp",""],[1,"me-2"],[2,"width","18px",3,"src"],["aria-hidden","true",1,"ng-value-icon","right"],["aria-hidden","true",1,"ng-value-icon","right",3,"click"]],template:function(i,n){i&1&&(a(0,"ng-select",0),N("ngModelChange",function(l){return T(n.selectedChannels,l)||(n.selectedChannels=l),l}),C("ngModelChange",function(l){return n.onChannelChange(l)}),u(1,z,4,2,"ng-template",1)(2,j,5,3,"ng-template",2),o()),i&2&&(s("clearable",n.clearable())("items",n.options),O("ngModel",n.selectedChannels),s("multiple",n.multiple()))},dependencies:[E,W,U,A,F,L,V,I],encapsulation:2})}}return t})();export{Y as a};
@@ -1 +0,0 @@
1
- import{a as k}from"./chunk-PIBVGTHJ.js";import{a as be}from"./chunk-A44LN77B.js";import{a as Me}from"./chunk-PQQSREEC.js";import{a as Ve}from"./chunk-GH5FTODR.js";import{a as Te,b as De}from"./chunk-EPBVNII2.js";import{b as ke,c as Ee}from"./chunk-UZWED4UK.js";import"./chunk-4YRBARG2.js";import"./chunk-5CKVZBHM.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 Y}from"./chunk-UMP6ZMEJ.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import{a as ue}from"./chunk-Z3ITXK3D.js";import"./chunk-CGOB6Y3X.js";import{b as Z}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{d as Ce,e as fe}from"./chunk-PYXL7UF7.js";import{c as de}from"./chunk-RXQX7567.js";import{b as xe,c as te,d as ye,j as Se,k as ve,m as Ue,n as we}from"./chunk-HJXYT6MI.js";import{A as H,b as me,h as q,m as j}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import{a as _e,b as ge,c as he}from"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{H as ce,J as pe,j as $,n as z}from"./chunk-FXQKRJWU.js";import{$b as K,$c as F,G as se,Gb as B,Gc as g,Hc as Q,Ic as D,Kb as le,Kc as U,Lc as w,Mb as f,Mc as M,Nc as O,Oc as N,Pc as h,Qc as W,Ra as S,Rc as X,Sc as ee,Yb as _,Z as E,ad as A,dc as v,ea as J,ec as V,gc as P,hc as I,ic as o,jc as s,kc as L,lc as b,mc as T,oc as y,pa as x,pb as ae,q as oe,rb as a,rd as R,tc as C,uc as l,v as G,ya as c,za as p}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import{a as ne,b as re}from"./chunk-66YHNWRR.js";var ie=function(i){return i.ERROR="https://res.cloudinary.com/pos/image/upload/v1705387550/POS/Images/Cashier/globalerror.svg",i.UNAUTHORIZED="https://res.cloudinary.com/pos/image/upload/v1702547639/POS/Images/Dashboard/locked.svg",i.EMPTY_LIST="https://res.cloudinary.com/pos/image/upload/v1705388070/POS/Images/Cashier/globalnodata.svg",i.REMOVE="https://res.cloudinary.com/pos/image/upload/v1706156973/icons/globalerrorclear.svg",i}(ie||{});var Pe=()=>({display:"d-flex"});function Ae(i,m){if(i&1&&(o(0,"div",6),L(1,"img",9),o(2,"p",10),g(3," All users already migrated. "),s()()),i&2){let e=l();a(),_("src",e.emptyStateIcon,ae)}}function Re(i,m){if(i&1){let e=y();o(0,"div",14)(1,"p-checkBox",15),M("ngModelChange",function(t){let n=c(e).$implicit;return w(n.selected,t)||(n.selected=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(2),n=h(0);return p(t.onUserCheckChange(n))}),s(),o(2,"label",16),g(3),s()()}if(i&2){let e=m.$implicit;a(),K(X(7,Pe)),_("binary",!0)("id",e.ID),U("ngModel",e.selected),a(),_("for",e.ID),a(),D(" ",e.Name," ")}}function Ge(i,m){if(i&1){let e=y();o(0,"div",11)(1,"p-checkBox",12),M("ngModelChange",function(t){c(e);let n=l();return w(n.isCheckAll,t)||(n.isCheckAll=t),p(t)}),C("ngModelChange",function(t){c(e);let n=l(),d=h(0);return p(n.onCheckAllChange(t,d))}),s(),o(2,"label",13),g(3," Check All "),s()(),P(4,Re,4,8,"div",14,V)}if(i&2){let e=l(),r=h(0);a(),K(X(4,Pe)),_("binary",!0),U("ngModel",e.isCheckAll),a(3),I(r)}}var Ie=(()=>{class i extends be{constructor(){super(),this.dialogRef=x(xe),this.data=x(te),this.userService=x(k),this.dialogData=x(te),this.toastr=x(Z),this.userGroups=R(()=>this.dialogData.userGroups||[]),this.availableUsers=R(()=>{let e=new Map;return this.dialogData.availableUsers.forEach(r=>e.set(r.ID,r)),e}),this.migrateLoader$=this.userService.getUserMigrateLoader().pipe(G(e=>e.Data),G(e=>e.filter(t=>this.availableUsers().has(t.ID)===!1)),G(e=>e.map(t=>(t.selected=!0,t))),E(1)),this.isCheckAll=S(!0),this.selectedGroup=S(null),this.emptyStateIcon=ie.EMPTY_LIST,this.config=new Se,this.config.title="Migrate Users",this.config.customWidth="600px"}ngAfterViewInit(){this.initTopPosition()}ngOnDestroy(){this.stopOverlayObserver()}onUserCheckChange(e){let r=e.every(t=>t.selected);this.isCheckAll.set(r)}onCheckAllChange(e,r){this.isCheckAll.set(e),r.forEach(t=>t.selected=e)}onClose(){this.dialogRef.close(!1)}onSubmit(e){let r=e.filter(n=>n.selected);if(r.length===0){this.toastr.error("Please select at least one user","Error");return}if(de.IsEmpty(this.selectedGroup())){this.toastr.error("Please select a user group","Error");return}let t={userIds:r.map(n=>n.ID),groupId:this.selectedGroup()};this.userService.migrateUser(t).subscribe(()=>{this.dialogRef.close(!0),this.toastr.success("Users migrated successfully","Success")})}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-migrate-dialog"]],features:[W([k]),le],decls:15,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[1,"row"],[1,"col","border-end"],[1,"modal-title","mb-8"],[1,"user-list-scroll","mt-5",2,"max-height","300x","overflow-y","auto","overflow-x","hidden","box-sizing","border-box"],[1,"d-flex","flex-column","align-items-center","mt-5"],[1,"col"],["optionLabel","Name","optionValue","ID","placeholder","Select a group","filterBy","Name","appendTo","body",1,"w-100",3,"click","ngModelChange","options","filter","ngModel"],["alt","No users found",2,"width","100px","height","100px",3,"src"],[1,"text-muted","mt-4","opacity-50",2,"margin-bottom","0px"],[1,"d-flex","w-100","align-items-center","mb-4"],["id","checkBoxAll",3,"ngModelChange","binary","ngModel"],["for","checkBoxAll",1,"ms-2"],[1,"d-flex","w-100","align-items-center","mb-3","ms-10"],[3,"ngModelChange","binary","id","ngModel"],[1,"ms-2",3,"for"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),o(2,"modal-material",0),C("onClose",function(){return c(n),p(t.onClose())})("onCancel",function(){return c(n),p(t.onClose())})("onOk",function(){c(n);let u=h(0);return p(t.onSubmit(u))}),o(3,"div",1)(4,"div",2)(5,"div",3)(6,"h5",4),g(7,"Users from POS"),s(),o(8,"div",5),f(9,Ae,4,1,"div",6)(10,Ge,6,5),s()(),o(11,"div",7)(12,"h5",4),g(13,"Assign Group"),s(),o(14,"p-select",8),C("click",function(){return c(n),p(t.onClickSelect())}),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()()()()}if(r&2){let n=N(A(1,5,t.migrateLoader$));a(2),_("config",t.config),a(7),v((n==null?null:n.length)===0?9:10),a(5),_("options",t.userGroups())("filter",!0),U("ngModel",t.selectedGroup)}},dependencies:[z,$,ve,H,q,j,ke,Me],styles:[".user-list-scroll[_ngcontent-%COMP%]{max-height:160px;overflow-y:auto;overflow-x:hidden;box-sizing:border-box}"]})}}return i})();var Le=i=>({ID:i});function Be(i,m){if(i&1){let e=y();o(0,"button",13),C("click",function(){c(e);let t=l(2),n=h(0);return p(t.onDeleteUser(n==null?null:n.Filter))}),L(1,"i",14),g(2),s()}if(i&2){let e,r=l(2);a(2),D(" Delete (",(e=r.selectedUsers())==null?null:e.length,") ")}}function We(i,m){if(i&1&&(b(0),f(1,Be,3,1,"button",12),T()),i&2){let e,r=l();a(),v(((e=r.selectedUsers())==null?null:e.length)>0?1:-1)}}function $e(i,m){if(i&1){let e=y();b(0),o(1,"button",15),C("click",function(){c(e);let t=l(),n=h(0),d=h(2);return p(t.onMigrateUser(n==null||n.Options==null?null:n.Options.Groups,d==null?null:d.Data))}),g(2," Migrate "),s(),T()}}function ze(i,m){i&1&&(b(0),o(1,"a",16),g(2," Invite "),s(),T())}function qe(i,m){if(i&1){let e=y();b(0),o(1,"th",17)(2,"div",18)(3,"input",19),C("change",function(t){c(e);let n=l(),d=h(2);return p(n.onCheckAllUser(t.target.checked,d==null?null:d.Data))}),s()()(),T()}}function je(i,m){if(i&1){let e=y();o(0,"div",18)(1,"input",23),M("ngModelChange",function(t){c(e);let n=l(2).$implicit;return w(n.checked,t)||(n.checked=t),p(t)}),C("ngModelChange",function(){c(e);let t=l(3),n=h(2);return p(t.onSelectUser(n==null?null:n.Data))}),s()()}if(i&2){let e=l(2).$implicit;a(),U("ngModel",e.checked)}}function He(i,m){if(i&1&&(b(0),o(1,"td"),f(2,je,2,1,"div",18),s(),T()),i&2){let e,r=l().$implicit,t=l();a(2),v(r.Name!==((e=t.currentLoginUser())==null?null:e.username)?2:-1)}}function Ye(i,m){if(i&1&&(o(0,"a",20),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.UserID)),a(),D(" ",e.Name," ")}}function Ze(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.Name)}}function Je(i,m){if(i&1&&(o(0,"a",21),g(1),s()),i&2){let e=l().$implicit;_("queryParams",ee(2,Le,e.GroupID)),a(),D(" ",e.GroupName," ")}}function Ke(i,m){if(i&1&&(o(0,"span"),g(1),s()),i&2){let e=l().$implicit;a(),Q(e.GroupName)}}function Qe(i,m){if(i&1&&L(0,"p-chip",24),i&2){let e=m.$implicit;_("label",e.Name)("image",e.Logo)("alt",e.Name)}}function Xe(i,m){if(i&1&&P(0,Qe,1,3,"p-chip",24,V),i&2){let e=l().$implicit;I(e.Channels)}}function et(i,m){i&1&&(o(0,"span"),g(1,"All Channels"),s())}function tt(i,m){if(i&1&&(o(0,"tr"),f(1,He,3,1,"ng-container",3),o(2,"td"),f(3,Ye,2,4,"a",20)(4,Ze,2,1,"span"),s(),o(5,"td"),f(6,Je,2,4,"a",21)(7,Ke,2,1,"span"),s(),o(8,"td")(9,"div",22),f(10,Xe,2,0)(11,et,2,0,"span"),s()()()),i&2){let e=m.$implicit,r=l();a(),_("ngxPermissionsOnly",r.userDeleteRole),a(2),v(r.hasUserEditRole()?3:4),a(3),v(r.hasUserEditRole()?6:7),a(4),v((e.Channels==null?null:e.Channels.length)>0?10:11)}}function it(i,m){if(i&1){let e=y();o(0,"app-mat-paginator-no-count",25),C("next",function(){c(e);let t=l(),n=h(0);return p(t.onNextPage(n==null?null:n.Filter))})("previous",function(){c(e);let t=l(),n=h(0);return p(t.onPrevPage(n==null?null:n.Filter))}),s()}if(i&2){l();let e=h(0),r=h(2);_("filter",e==null?null:e.Filter)("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)("alwaysShowNextButton",!0)}}var zt=(()=>{class i{constructor(){this.usersService=x(k),this.permissionService=x(_e),this.toastService=x(Z),this.dialog=x(ye),this.userInviteOptions=S([]),this.searchText=S(null),this.selectedGroup=S(null),this.userLoader$=this.usersService.getLoader().pipe(J(e=>{this.userInviteOptions.set(e.Options.Users),this.initUsers(e.Filter)}),E(1)),this.users$=oe({Count:0,Data:[]}),this.userAddRole=Y.UserInvite,this.userDeleteRole=Y.UserDelete,this.hasUserEditRole=S(!1),this.selectedUsers=S([]),this.currentLoginUser=R(()=>{let e=localStorage.getItem(ue.AUTHORIZATION);return e?JSON.parse(e):null}),this.permissionService.hasPermission(Y.UserEdit).then(e=>{this.hasUserEditRole.set(e)})}initUsers(e){let r=re(ne({},e),{Name:this.searchText(),GroupID:this.selectedGroup()});this.users$=this.usersService.getUsers(r).pipe(J(t=>this.filterUserInvtiteOptions(t.Data)),E(1))}filterUserInvtiteOptions(e){this.userInviteOptions.update(r=>r.filter(t=>e.findIndex(n=>n.UserID===t.ID)===-1))}onCheckAllUser(e,r){r.forEach(n=>{n.Name!==this.currentLoginUser()?.username&&(n.checked=e)});let t=r.filter(n=>n.checked);this.selectedUsers.set(t)}onSelectUser(e){let r=e.filter(t=>t.checked);this.selectedUsers.set(r)}onDeleteUser(e={PageNumber:1,PageSize:10}){let r=this.selectedUsers().map(n=>n.UserID);confirm("Are you sure you want to delete selected users?")&&this.usersService.deleteUsers(r).subscribe(()=>{this.selectedUsers.set([]),this.toastService.success("User deleted successfully","Success"),this.initUsers(e)})}onMigrateUser(e,r){this.dialog.open(Ie,{data:{userGroups:e,availableUsers:r}}).afterClosed().pipe(se(t=>t===!0)).subscribe(()=>{this.initUsers({PageNumber:1,PageSize:10})})}onNextPage(e){e.PageNumber+=1,this.initUsers(e)}onPrevPage(e){e.PageNumber-=1,this.initUsers(e)}onSuccessUpdateUser(e){e.PageNumber=1,this.initUsers(e)}static{this.\u0275fac=function(r){return new(r||i)}}static{this.\u0275cmp=B({type:i,selectors:[["app-users"]],features:[W([k])],decls:33,vars:17,consts:[["headerTitle","Users","description","Manage your users and their permissions",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","ID","placeholder","Select Group",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[4,"ngxPermissionsOnly"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","15%"],[3,"filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"],[3,"onSuccessUpdateUser","groups","users"],[1,"btn","btn-danger","me-3"],[1,"btn","btn-danger","me-3",3,"click"],[1,"fa","fa-trash","me-1"],[1,"btn","btn-outline-secondary","me-3",3,"click"],["role","button","routerLink","/menu/users/users/form",1,"btn","btn-success"],[2,"width","5px"],[1,"d-flex"],["name","selectAll","type","checkbox",3,"change"],["routerLink","/menu/users/users/info",3,"queryParams"],["routerLink","/menu/users/groups/info",3,"queryParams"],[1,"lh-base"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"me-3","mb-3",2,"--p-chip-image-width","1.2rem","--p-chip-image-height","1.2rem","--p-chip-padding-x","1rem","--p-chip-padding-y","0.5rem","--p-chip-border-radius","0.5rem","--p-chip-font-size","1.2rem",3,"label","image","alt"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","alwaysShowNextButton"]],template:function(r,t){if(r&1){let n=y();O(0),F(1,"async"),O(2),F(3,"async"),o(4,"mainpanel",0),M("textChange",function(u){return c(n),w(t.searchText,u)||(t.searchText=u),p(u)}),C("onSubmit",function(){c(n);let u=h(0);return p(t.initUsers(u==null?null:u.Filter))}),o(5,"filters")(6,"div")(7,"label",1),g(8,"Group"),s(),o(9,"ng-select",2),M("ngModelChange",function(u){return c(n),w(t.selectedGroup,u)||(t.selectedGroup=u),p(u)}),s()()(),o(10,"actions"),f(11,We,2,1,"ng-container",3)(12,$e,3,0,"ng-container",3)(13,ze,3,0,"ng-container",3),s(),o(14,"content")(15,"div",4)(16,"div",5)(17,"div",6)(18,"table",7)(19,"thead",8)(20,"tr"),f(21,qe,4,0,"ng-container",3),o(22,"th",9),g(23,"Login ID"),s(),o(24,"th",9),g(25,"Group"),s(),o(26,"th"),g(27,"Channel"),s()()(),o(28,"tbody"),P(29,tt,12,4,"tr",null,V),s()(),f(31,it,1,5,"app-mat-paginator-no-count",10),s()()()()(),o(32,"invite-group",11),C("onSuccessUpdateUser",function(){c(n);let u=h(0);return p(t.onSuccessUpdateUser(u==null?null:u.Filter))}),s()}if(r&2){let n=N(A(1,11,t.userLoader$));a(2);let d=N(A(3,14,t.users$));a(2),U("text",t.searchText),a(5),_("clearable",!0)("items",n==null||n.Options==null?null:n.Options.Groups),U("ngModel",t.selectedGroup),a(2),_("ngxPermissionsOnly",t.userDeleteRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(),_("ngxPermissionsOnly",t.userAddRole),a(8),_("ngxPermissionsOnly",t.userDeleteRole),a(8),I(d==null?null:d.Data),a(2),v(n?31:-1),a(),_("groups",n==null||n.Options==null?null:n.Options.Groups)("users",t.userInviteOptions())}},dependencies:[z,$,we,Ue,pe,ce,Ve,he,ge,fe,Ce,H,me,q,j,Ee,De,Te],encapsulation:2})}}return i})();export{zt as UsersComponent};
@@ -1 +0,0 @@
1
- import{a as xe,b as ve}from"./chunk-XSJBP4EN.js";import{a as ge,b as Ce,c as Se}from"./chunk-RU43F4UK.js";import{a as be}from"./chunk-25N6ECN7.js";import{a as F}from"./chunk-BXXJEM76.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-Q4N2QUV6.js";import"./chunk-7G6GQTSH.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-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import"./chunk-RC5PUUVM.js";import"./chunk-JVNHFIYT.js";import{a as fe}from"./chunk-THMNZQLX.js";import"./chunk-C7YK5TDP.js";import"./chunk-ACIMXBIC.js";import{a as _e}from"./chunk-LDL3A7NM.js";import"./chunk-RTF4FRXW.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"./chunk-PYXL7UF7.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,"channel-select-options",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,fe,be,pe,me,ve],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 +0,0 @@
1
- import{a as fe,b as _e}from"./chunk-FGRPTNDB.js";import{a as ge}from"./chunk-EHBCYQSG.js";import{a as pe}from"./chunk-A44LN77B.js";import{a as le,b as se}from"./chunk-PQQSREEC.js";import{b as de}from"./chunk-GRYGUILI.js";import{b as me}from"./chunk-OXWPLJEW.js";import"./chunk-HVCIQI7B.js";import"./chunk-QS22J2SC.js";import"./chunk-EHUVS2VB.js";import{a as ue}from"./chunk-WHBI5II7.js";import{a as he}from"./chunk-RGAWEFPQ.js";import{c as Ce,d as B,e as U}from"./chunk-TKV7XWBT.js";import"./chunk-YTCIQBSO.js";import"./chunk-LYPHZP72.js";import"./chunk-EPBVNII2.js";import"./chunk-UZWED4UK.js";import"./chunk-4YRBARG2.js";import"./chunk-5CKVZBHM.js";import"./chunk-BKRCW7SH.js";import"./chunk-RGAKHXPF.js";import"./chunk-T2OSIFLN.js";import"./chunk-QW4EOJRM.js";import"./chunk-RHHHL4OR.js";import{a as ce}from"./chunk-M7DDFDPD.js";import"./chunk-Q4N2QUV6.js";import"./chunk-7G6GQTSH.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-UMP6ZMEJ.js";import"./chunk-YQLOB7IQ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-YFDFIBAG.js";import{na as re}from"./chunk-RC5PUUVM.js";import"./chunk-JVNHFIYT.js";import"./chunk-C7YK5TDP.js";import"./chunk-HAJDTNAW.js";import"./chunk-ACIMXBIC.js";import{i as O}from"./chunk-RTF4FRXW.js";import"./chunk-Z3ITXK3D.js";import"./chunk-TGMCGROM.js";import{a as k}from"./chunk-CGOB6Y3X.js";import{b as ee,e as te}from"./chunk-WN5DZGA4.js";import"./chunk-4NEKWRL7.js";import{c as $}from"./chunk-RXQX7567.js";import{d as ie,l as ne,m as oe,n as ae}from"./chunk-HJXYT6MI.js";import{A as N,a as X,c as Y,h as E,m as L,o as Z}from"./chunk-5PS6ZS3N.js";import"./chunk-V3USB3ZU.js";import"./chunk-ERXVXBTU.js";import"./chunk-MFQQEEHJ.js";import"./chunk-GZKOMS4T.js";import{g as q,j as K,m as Q,n as D}from"./chunk-FXQKRJWU.js";import{$c as v,G as W,Gb as T,Gc as C,Hc as A,Kb as H,Kc as _,Lc as P,Mb as f,Mc as w,Nc as J,Oa as V,Qc as F,Ra as M,Yb as m,Z as j,ad as x,dc as z,ea as G,ic as r,jc as p,kc as y,oc as I,pa as S,pb as R,rb as d,tc as u,uc as h,xb as b,ya as l,za as s}from"./chunk-OJMQBH6T.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function be(o,g){if(o&1&&(r(0,"div",6),y(1,"img",7),r(2,"div"),C(3),p()()),o&2){let e=g.$implicit;d(),m("src",e.logo,R),d(2),A(e.Name)}}function ye(o,g){if(o&1){let e=I();r(0,"p-multiselect",4,0),u("click",function(){l(e);let t=h();return s(t.onClickSelect())}),w("ngModelChange",function(t){l(e);let n=h();return P(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){l(e);let n=h();return s(n.onChannelChange(t))}),f(2,be,4,2,"ng-template",5),p()}if(o&2){let e=h();m("options",e.options())("placeholder",e.placeholder()),_("ngModel",e.selectedChannels),m("showClear",e.clearable())("autofocusFilter",!0)("maxSelectedLabels",e.maxSelectedLabels())}}function Ie(o,g){if(o&1&&(r(0,"div",6),y(1,"img",7),r(2,"div"),C(3),p()()),o&2){let e=g.$implicit;d(),m("src",e.logo,R),d(2),A(e.Name)}}function Ve(o,g){if(o&1){let e=I();r(0,"p-select",8,1),u("click",function(){l(e);let t=h();return s(t.onClickSelect())}),w("ngModelChange",function(t){l(e);let n=h();return P(n.selectedChannels,t)||(n.selectedChannels=t),s(t)}),u("ngModelChange",function(t){l(e);let n=h();return s(n.onChannelChange(t))}),f(2,Ie,4,2,"ng-template",5),p()}if(o&2){let e=h();m("options",e.options())("placeholder",e.placeholder()),_("ngModel",e.selectedChannels),m("showClear",e.clearable())("autofocusFilter",!0)("filter",!0)}}var Pe=(()=>{class o extends pe{constructor(){super(),this.authService=S(O),this.multiple=V(!1),this.clearable=V(!0),this.placeholder=V("Select Channels"),this.options=M(this.authService.getChannels()),this.maxSelectedLabels=V(6),this.onChange=e=>{}}ngAfterViewInit(){this.initTopPosition()}onChannelChange(e){this.onChange(e)}onClickSelect(){setTimeout(()=>{this.adjustOverlayPosition()},0)}writeValue(e){this.selectedChannels=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){}static{this.\u0275fac=function(i){return new(i||o)}}static{this.\u0275cmp=T({type:o,selectors:[["app-channel-options-v2"]],inputs:{multiple:[1,"multiple"],clearable:[1,"clearable"],placeholder:[1,"placeholder"],maxSelectedLabels:[1,"maxSelectedLabels"]},features:[F([{provide:X,multi:!0,useExisting:o}]),H],decls:2,vars:1,consts:[["multiSelect",""],["select",""],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"options","placeholder","ngModel","showClear","autofocusFilter","filter"],["optionLabel","Name","optionValue","ID","display","chip","id","multiSelect","appendTo","body",1,"w-100",2,"--p-multiselect-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","maxSelectedLabels"],["pTemplate","item"],[1,"d-flex","align-items-center","gap-2"],[2,"width","18px",3,"src"],["optionLabel","Name","optionValue","ID","appendTo","body",1,"w-100",2,"--p-select-padding-y","12px",3,"click","ngModelChange","options","placeholder","ngModel","showClear","autofocusFilter","filter"]],template:function(i,t){i&1&&f(0,ye,3,6,"p-multiselect",2)(1,Ve,3,6,"p-select",3),i&2&&z(t.multiple()?0:1)},dependencies:[D,_e,fe,re,me,N,E,L,se,le],encapsulation:2})}}return o})();function Me(o,g){if(o&1){let e=I();r(0,"button",16),u("click",function(){l(e);let t=h().ngIf,n=h();return s(n.onUpdateItems(t))}),y(1,"i",17),C(2," Update "),p()}}function ve(o,g){if(o&1&&(r(0,"div"),f(1,Me,3,0,"button",15),p()),o&2){let e=g.ngIf,i=h();d(),m("ngIf",i.productService.hasSelectionVariant(e))}}var mt=(()=>{class o{constructor(e,i,t,n,c){this.http=e,this.toastr=i,this.dialog=t,this.productService=n,this.authService=c,this.infinitePagination=S(B),this.updateResHandling=S(U),this.mainPanelService=S(ne),this.channelOptions=M([]),this.searchFilter=M({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[]}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(j())}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(G(e=>{e.Filter={PageNumber:e.Filter.PageNumber,RowCount:e.Filter.RowCount,filterModel:1},this.searchFilter.set(e.Filter),this.mainPanelService.openModalFilter()}))}onShowDifferencePrice(e){let i=1;e&&(i=3),this.searchFilter.update(t=>(t.filterModel=i,t)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(e){this.searchFilter.update(i=>(i.text=e,i)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels()}onUpdateItems(e){let i=JSON.parse(JSON.stringify(this.channelOptions())),t=this.productService.selectedVariantProduct(e);this.dialog.open(he,{data:{title:"Updating Price",selectedItems:t,channels:i},width:"400px"}).afterClosed().pipe(W(n=>$.IsNotEmpty(n))).subscribe(n=>{this.channelOptions.set(n),this.updatePrice(e)})}filterSelectedChannels(){let i=this.authService.getChannels().filter(t=>this.searchFilter().ListChannelID?.indexOf(t.ID)!==-1);this.channelOptions.set(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(a=>({ID:a.ID,Code:a.Code,Price:a.UnitPrice})),c={ListChannelID:this.getSelectedChannels().map(a=>a.ID),ListPrice:t};this.http.post(k.UpdateChannelPrice,c).subscribe(a=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(a),this.resetSelectedChannels()})}}updatePriceByVariant(e){let i={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:e.Price-0,VariantID:e.ID};this.http.post(k.UpdatePriceById,i).subscribe(t=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(t)})}handlingUpdatePrice(e){let i=e?.Response?.success_list,t=e?.Response?.failure_list,n=this.getSelectedChannels();i?.length>0||t?.length>0?this.updateResHandling.responseHandling(i,t,"Price",n):this.toastr.error(e[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(de,{data:{title:"Export Multi Channel Comparison",pageNumber:this.searchFilter().PageNumber,rowCount:this.searchFilter().RowCount,filterExport:this.searchFilter(),getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportMultipleChannelComparison"}}).afterClosed().subscribe()}resetSelectedChannels(){this.channelOptions.update(e=>(e.forEach(i=>{i.selected=!1}),e))}getSelectedChannels(){return this.channelOptions().filter(e=>e.selected)}static{this.\u0275fac=function(i){return new(i||o)(b(te),b(ee),b(ie),b(ce),b(O))}}static{this.\u0275cmp=T({type:o,selectors:[["app-price-pos-channel"]],features:[F([B,Q,ge,U])],decls:32,vars:23,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit"],[1,"d-flex"],[4,"ngIf"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"mb-5"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"fw-bold"],["type","number",1,"form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["productToggleTitle","FILTER DIFFERENT PRICE","table","price",3,"onToggle","onSubmit","showProductToggle","data","channel","hiddenIPOSInventory"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(i,t){if(i&1){let n=I();J(0),v(1,"async"),r(2,"mainpanel",0),u("onSubmit",function(a){return l(n),s(t.onSearch(a))}),r(3,"actions")(4,"div",1),f(5,ve,2,1,"div",2),v(6,"async"),r(7,"button",3),u("click",function(){return l(n),s(t.openExportDialog())}),y(8,"i",4),r(9,"span"),C(10,"Export"),p()()()(),r(11,"filters")(12,"div",5)(13,"label",6),C(14,"Channel"),p(),r(15,"app-channel-options-v2",7),w("ngModelChange",function(a){return l(n),P(t.searchFilter().ListChannelID,a)||(t.searchFilter().ListChannelID=a),s(a)}),p()(),r(16,"div",5)(17,"label",8),C(18,"Page Number"),p(),r(19,"input",9),w("ngModelChange",function(a){return l(n),P(t.searchFilter().PageNumber,a)||(t.searchFilter().PageNumber=a),s(a)}),p()(),r(20,"div")(21,"label",8),C(22,"Page Size"),p(),r(23,"input",9),w("ngModelChange",function(a){return l(n),P(t.searchFilter().RowCount,a)||(t.searchFilter().RowCount=a),s(a)}),p()()(),r(24,"content")(25,"div",10)(26,"div",11)(27,"div",12)(28,"app-table",13),v(29,"async"),u("onToggle",function(a){return l(n),s(t.onShowDifferencePrice(a))})("onSubmit",function(a){return l(n),s(t.updatePriceByVariant(a))}),p(),r(30,"infinite-paginator",14),v(31,"async"),u("onNextPage",function(){return l(n),s(t.infinitePagination.onNextPage(t.searchFilter()))})("onLastPage",function(){return l(n),s(t.infinitePagination.onLastPage(t.searchFilter()))})("onGetRowCount",function(){return l(n),s(t.infinitePagination.getRowCount(t.searchFilter()))}),p()()()()()()}i&2&&(x(1,15,t.loader$),d(5),m("ngIf",x(6,17,t.data$)),d(10),m("multiple",!0),_("ngModel",t.searchFilter().ListChannelID),d(4),_("ngModel",t.searchFilter().PageNumber),d(4),_("ngModel",t.searchFilter().RowCount),d(5),m("showProductToggle",!0)("data",x(29,19,t.data$))("channel",t.channelOptions())("hiddenIPOSInventory",!1),d(2),m("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",x(31,21,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[D,q,K,N,Y,Z,E,L,Ce,ae,oe,ue,Pe],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]})}}return o})();export{mt as PricePosChannelComponent};