marketplacepos 5.48.2 → 5.48.3

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 (55) hide show
  1. package/Marketplace/{chunk-H7GV5SNI.js → chunk-2XYIINPQ.js} +1 -1
  2. package/Marketplace/{chunk-CAZ7U2IL.js → chunk-4JRHCYVO.js} +1 -1
  3. package/Marketplace/{chunk-6OIMOM7S.js → chunk-4UPWMQJX.js} +1 -1
  4. package/Marketplace/{chunk-ADKAX3OO.js → chunk-5NFLGFHD.js} +1 -1
  5. package/Marketplace/{chunk-Y77WYZ6Y.js → chunk-5QQCKNH2.js} +1 -1
  6. package/Marketplace/{chunk-XK4RP5MQ.js → chunk-6FAJM27Z.js} +1 -1
  7. package/Marketplace/{chunk-ALPG22RQ.js → chunk-77NAUG5Y.js} +1 -1
  8. package/Marketplace/{chunk-HKHNRMPT.js → chunk-7CYONN5M.js} +1 -1
  9. package/Marketplace/{chunk-FRZCC6KZ.js → chunk-A62IPN6W.js} +1 -1
  10. package/Marketplace/{chunk-5KYN6Y7M.js → chunk-B5AYTAZQ.js} +1 -1
  11. package/Marketplace/{chunk-SZVL42NR.js → chunk-BNAARI67.js} +1 -1
  12. package/Marketplace/{chunk-KZSTYKIP.js → chunk-BTSGHYIF.js} +1 -1
  13. package/Marketplace/{chunk-UCEZJNIL.js → chunk-BUY4AAHK.js} +1 -1
  14. package/Marketplace/{chunk-CLQGGKN6.js → chunk-DCAYH4J7.js} +1 -1
  15. package/Marketplace/{chunk-B6F5PDL5.js → chunk-F7I7HQGQ.js} +1 -1
  16. package/Marketplace/chunk-F7JWZJVZ.js +1 -0
  17. package/Marketplace/{chunk-PLLHTY6O.js → chunk-FQQOS3AF.js} +1 -1
  18. package/Marketplace/{chunk-M65Z55OS.js → chunk-GFVJVBGH.js} +1 -1
  19. package/Marketplace/{chunk-RCBY7EIY.js → chunk-GWYT3CQM.js} +1 -1
  20. package/Marketplace/{chunk-AEVLZ7NS.js → chunk-HANPHNZU.js} +1 -1
  21. package/Marketplace/{chunk-7SB4C4PT.js → chunk-HCR33US3.js} +1 -1
  22. package/Marketplace/{chunk-I723PUUO.js → chunk-HF4T6G54.js} +1 -1
  23. package/Marketplace/{chunk-QCV5XC3U.js → chunk-HUZZJ34K.js} +2 -2
  24. package/Marketplace/{chunk-CBU473N2.js → chunk-IFP44BTX.js} +1 -1
  25. package/Marketplace/chunk-IGS6BEII.js +1 -0
  26. package/Marketplace/{chunk-3JYZF65T.js → chunk-KNPQ6DPC.js} +1 -1
  27. package/Marketplace/{chunk-UBTALPOC.js → chunk-KOQGQF2L.js} +1 -1
  28. package/Marketplace/{chunk-KSVJCX2D.js → chunk-M2FDHHOH.js} +1 -1
  29. package/Marketplace/chunk-MQRQ3LOB.js +1 -0
  30. package/Marketplace/{chunk-TIIGDXIJ.js → chunk-NN6DSN34.js} +2 -2
  31. package/Marketplace/{chunk-2IASUYTM.js → chunk-OR34CB7O.js} +1 -1
  32. package/Marketplace/{chunk-7DT7FQ2T.js → chunk-PHTDDNER.js} +1 -1
  33. package/Marketplace/{chunk-5CHTDUME.js → chunk-PL2WVYMI.js} +1 -1
  34. package/Marketplace/{chunk-DH5CXAEM.js → chunk-QMC2DZIB.js} +1 -1
  35. package/Marketplace/{chunk-PZKN5FIT.js → chunk-QQY7JGZW.js} +1 -1
  36. package/Marketplace/{chunk-ZUL6ZHSW.js → chunk-SZVJOKAX.js} +1 -1
  37. package/Marketplace/{chunk-J6BQDYXO.js → chunk-U6KJZIHD.js} +1 -1
  38. package/Marketplace/{chunk-GVI6GJHY.js → chunk-WFXKYFBX.js} +1 -1
  39. package/Marketplace/{chunk-C6JHPCLF.js → chunk-WPKFNEM6.js} +1 -1
  40. package/Marketplace/{chunk-FCFCTT5A.js → chunk-X2RNU4B3.js} +1 -1
  41. package/Marketplace/{chunk-3K2EKA5O.js → chunk-X7JNYYQS.js} +1 -1
  42. package/Marketplace/{chunk-MKADKY44.js → chunk-XMN2RKK3.js} +1 -1
  43. package/Marketplace/{chunk-IDH7MCR3.js → chunk-YF56YLYK.js} +1 -1
  44. package/Marketplace/chunk-YLQKFPMU.js +1 -0
  45. package/Marketplace/chunk-YN55P3QH.js +1 -0
  46. package/Marketplace/{chunk-GX6JPDQ5.js → chunk-YQWENM2M.js} +1 -1
  47. package/Marketplace/{chunk-LABF6W37.js → chunk-Z5D5R7AO.js} +1 -1
  48. package/Marketplace/index.html +2 -2
  49. package/Marketplace/{main-YJKBQ3LW.js → main-BI4BOJO4.js} +1 -1
  50. package/package.json +1 -1
  51. package/Marketplace/chunk-5X2L45XK.js +0 -1
  52. package/Marketplace/chunk-VYQD3A3M.js +0 -1
  53. package/Marketplace/chunk-WRK3ZHRX.js +0 -1
  54. package/Marketplace/chunk-X6COQADC.js +0 -1
  55. package/Marketplace/chunk-XDBH7EGC.js +0 -1
@@ -1 +1 @@
1
- import{a as rt}from"./chunk-7KG3DC5J.js";import{b as nt}from"./chunk-6OIMOM7S.js";import{e as it}from"./chunk-6KWG6O5L.js";import{a as pt}from"./chunk-5KYN6Y7M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as lt}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{e as et}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as tt}from"./chunk-JBEKD57G.js";import{m as ot,n as at}from"./chunk-EDEZ3JLR.js";import{A as Z,h as X,m as Y}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{G as K,I as Q,c as q,i as A,j as J,l as U,m as G}from"./chunk-LNJUGHOX.js";import{$b as g,$c as W,Gb as L,Mc as l,Nc as x,Oc as w,Qc as V,Rc as k,Sc as H,Wc as O,Z as v,_c as z,ad as j,bc as S,ca as D,dc as F,ec as R,f as M,fc as $,gc as d,hc as o,hd as c,ic as a,id as u,jc as N,jd as I,kb as E,lb as P,nb as p,qc as B,ra as b,v as _,vc as T,xa as C,xc as s,ya as h}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var st=(i,r)=>({"bg-gradient-danger":i,"bg-gradient-warning":r}),ct=()=>["/menu/products/status/notification/detail"],mt=i=>({ID:i});function dt(i,r){if(i&1&&(l(0),c(1,"number"),o(2,"span"),l(3,"s"),a()),i&2){let n=s().$implicit;w(" ",I(1,1,n.DurationInSecond,"1.1-1")," ")}}function ut(i,r){i&1&&l(0," - ")}function ft(i,r){if(i&1&&(o(0,"tr",11)(1,"td")(2,"a",12),N(3,"img",13),o(4,"span"),l(5),a()()(),o(6,"td")(7,"b"),l(8),a(),N(9,"div",14),a(),o(10,"td"),g(11,dt,4,4)(12,ut,1,0),a(),o(13,"td"),l(14),a(),o(15,"td"),l(16),c(17,"date"),a()()),i&2){let n=r.$implicit;d("ngClass",j(14,st,n.Status==1,n.Status==0)),p(2),d("routerLink",z(17,ct))("queryParams",W(18,mt,n.ID)),p(),d("src",O(n.Img),P),p(2),x(n.Name),p(3),x(n.Label),p(),d("innerHTML",n.Message,E),p(2),S(n.DurationInSecond?11:12),p(3),x(n.StatusLabel),p(2),w(" ",I(17,11,n.Created,"dd MMM yyyy HH:mm")," ")}}function _t(i,r){if(i&1){let n=B();o(0,"div",5)(1,"div",15)(2,"app-custom-paginator",16),c(3,"async"),c(4,"async"),T("total",function(){C(n);let t=s(2);return h(t.getRowCount())})("next",function(){C(n);let t=s(2);return h(t.getNotifications())})("previous",function(){C(n);let t=s(2);return h(t.getNotifications())}),a()()()}if(i&2){let n=s(),e=s();p(2),d("filter",e.filter)("totaldata",n==null?null:n.length)("paginationTotal",u(3,4,e.rowCount$))("hasClicked",u(4,6,e.rowCount$))}}function Ct(i,r){i&1&&g(0,_t,5,8,"div",5),i&2&&S(r.length>0?0:-1)}var Vt=(()=>{let r=class r{constructor(){this.http=b(et),this.notificationService=b(nt),this.filter=new rt,this.destroy$=new M}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(D(this.destroy$)).subscribe(e=>{e.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(e=>{this.filter=e.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let e={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(_(t=>t.Data),_(t=>(t=this.setChannelLogoToNotifications(t),t=this.setTimeToSecond(t),t)),v(1))}setTimeToSecond(e){return e=e.map(t=>(t.DurationInSecond=parseInt(t.Duration)/1e3,t)),e}setChannelLogoToNotifications(e){return e=e.map(t=>(t.Img=tt.getChannelLogoByTypeId(t.TypeID),t)),e}getRowCount(){let e={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(_(t=>t.Count),v(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=L({type:r,selectors:[["app-notification"]],decls:33,vars:6,consts:[["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"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"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,m){if(t&1&&(o(0,"mainpanel",0),T("onSubmit",function(){return m.onFilter()}),o(1,"actions")(2,"a",1),l(3," Scan Job V2 "),a()(),o(4,"filters")(5,"div")(6,"h6",2),l(7,"Channel"),a(),o(8,"app-channel-options-v2",3),H("ngModelChange",function(y){return k(m.filter.ChannelID,y)||(m.filter.ChannelID=y),y}),a()()(),o(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"table",8)(15,"thead",9)(16,"tr",10)(17,"th"),l(18,"Channel"),a(),o(19,"th"),l(20,"Process"),a(),o(21,"th"),l(22,"Duration"),a(),o(23,"th"),l(24,"Status"),a(),o(25,"th"),l(26,"Created"),a()()(),o(27,"tbody"),R(28,ft,18,20,"tr",11,F),c(30,"async"),a()()()()(),g(31,Ct,1,1),c(32,"async"),a()()()),t&2){let f;p(8),V("ngModel",m.filter.ChannelID),p(20),$(u(30,2,m.notifications$)),p(3),S((f=u(32,4,m.notifications$))?31:-1,f)}},dependencies:[G,q,Z,X,Y,at,ot,lt,it,Q,K,pt,A,U,J],encapsulation:2});let i=r;return i})();export{Vt as NotificationComponent};
1
+ import{a as rt}from"./chunk-7KG3DC5J.js";import{b as nt}from"./chunk-4UPWMQJX.js";import{e as it}from"./chunk-6KWG6O5L.js";import{a as pt}from"./chunk-B5AYTAZQ.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as lt}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{e as et}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as tt}from"./chunk-JBEKD57G.js";import{m as ot,n as at}from"./chunk-EDEZ3JLR.js";import{A as Z,h as X,m as Y}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{G as K,I as Q,c as q,i as A,j as J,l as U,m as G}from"./chunk-LNJUGHOX.js";import{$b as g,$c as W,Gb as L,Mc as l,Nc as x,Oc as w,Qc as V,Rc as k,Sc as H,Wc as O,Z as v,_c as z,ad as j,bc as S,ca as D,dc as F,ec as R,f as M,fc as $,gc as d,hc as o,hd as c,ic as a,id as u,jc as N,jd as I,kb as E,lb as P,nb as p,qc as B,ra as b,v as _,vc as T,xa as C,xc as s,ya as h}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var st=(i,r)=>({"bg-gradient-danger":i,"bg-gradient-warning":r}),ct=()=>["/menu/products/status/notification/detail"],mt=i=>({ID:i});function dt(i,r){if(i&1&&(l(0),c(1,"number"),o(2,"span"),l(3,"s"),a()),i&2){let n=s().$implicit;w(" ",I(1,1,n.DurationInSecond,"1.1-1")," ")}}function ut(i,r){i&1&&l(0," - ")}function ft(i,r){if(i&1&&(o(0,"tr",11)(1,"td")(2,"a",12),N(3,"img",13),o(4,"span"),l(5),a()()(),o(6,"td")(7,"b"),l(8),a(),N(9,"div",14),a(),o(10,"td"),g(11,dt,4,4)(12,ut,1,0),a(),o(13,"td"),l(14),a(),o(15,"td"),l(16),c(17,"date"),a()()),i&2){let n=r.$implicit;d("ngClass",j(14,st,n.Status==1,n.Status==0)),p(2),d("routerLink",z(17,ct))("queryParams",W(18,mt,n.ID)),p(),d("src",O(n.Img),P),p(2),x(n.Name),p(3),x(n.Label),p(),d("innerHTML",n.Message,E),p(2),S(n.DurationInSecond?11:12),p(3),x(n.StatusLabel),p(2),w(" ",I(17,11,n.Created,"dd MMM yyyy HH:mm")," ")}}function _t(i,r){if(i&1){let n=B();o(0,"div",5)(1,"div",15)(2,"app-custom-paginator",16),c(3,"async"),c(4,"async"),T("total",function(){C(n);let t=s(2);return h(t.getRowCount())})("next",function(){C(n);let t=s(2);return h(t.getNotifications())})("previous",function(){C(n);let t=s(2);return h(t.getNotifications())}),a()()()}if(i&2){let n=s(),e=s();p(2),d("filter",e.filter)("totaldata",n==null?null:n.length)("paginationTotal",u(3,4,e.rowCount$))("hasClicked",u(4,6,e.rowCount$))}}function Ct(i,r){i&1&&g(0,_t,5,8,"div",5),i&2&&S(r.length>0?0:-1)}var Vt=(()=>{let r=class r{constructor(){this.http=b(et),this.notificationService=b(nt),this.filter=new rt,this.destroy$=new M}ngOnInit(){this.notificationService.clearNotification(),this.initPageLoader(),this.subscribeNotification()}subscribeNotification(){this.notificationService.getNotification().pipe(D(this.destroy$)).subscribe(e=>{e.length>0&&(this.getNotifications(),this.notificationService.clearNotification())})}initPageLoader(){this.http.post("/api/notification/Load",{}).subscribe(e=>{this.filter=e.Filter,this.filter.PageSize=this.filter.RowCount,this.getNotifications()})}onFilter(){this.rowCount$=null,this.getNotifications()}getNotifications(){let e={ChannelID:this.filter.ChannelID,RowCount:this.filter.PageSize,PageNumber:this.filter.PageNumber};this.notifications$=this.http.post("/api/notification/Get",e).pipe(_(t=>t.Data),_(t=>(t=this.setChannelLogoToNotifications(t),t=this.setTimeToSecond(t),t)),v(1))}setTimeToSecond(e){return e=e.map(t=>(t.DurationInSecond=parseInt(t.Duration)/1e3,t)),e}setChannelLogoToNotifications(e){return e=e.map(t=>(t.Img=tt.getChannelLogoByTypeId(t.TypeID),t)),e}getRowCount(){let e={ChannelID:this.filter.ChannelID};this.rowCount$=this.http.post("/api/notification/RowCount",e).pipe(_(t=>t.Count),v(1))}ngOnDestroy(){this.destroy$.next(!0),this.destroy$.complete()}};r.\u0275fac=function(t){return new(t||r)},r.\u0275cmp=L({type:r,selectors:[["app-notification"]],decls:33,vars:6,consts:[["headerTitle","Product Scan Job","hideSearchBox","true",3,"onSubmit"],["routerLink","/menu/products/status/notificationV2",1,"btn","btn-outline-secondary","btn-lg"],[1,"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"],[3,"ngClass"],[3,"routerLink","queryParams"],["alt","",1,"channelLogo-md","me-4",3,"src"],[3,"innerHTML"],[1,"col-12"],[3,"total","next","previous","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,m){if(t&1&&(o(0,"mainpanel",0),T("onSubmit",function(){return m.onFilter()}),o(1,"actions")(2,"a",1),l(3," Scan Job V2 "),a()(),o(4,"filters")(5,"div")(6,"h6",2),l(7,"Channel"),a(),o(8,"app-channel-options-v2",3),H("ngModelChange",function(y){return k(m.filter.ChannelID,y)||(m.filter.ChannelID=y),y}),a()()(),o(9,"content")(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"table",8)(15,"thead",9)(16,"tr",10)(17,"th"),l(18,"Channel"),a(),o(19,"th"),l(20,"Process"),a(),o(21,"th"),l(22,"Duration"),a(),o(23,"th"),l(24,"Status"),a(),o(25,"th"),l(26,"Created"),a()()(),o(27,"tbody"),R(28,ft,18,20,"tr",11,F),c(30,"async"),a()()()()(),g(31,Ct,1,1),c(32,"async"),a()()()),t&2){let f;p(8),V("ngModel",m.filter.ChannelID),p(20),$(u(30,2,m.notifications$)),p(3),S((f=u(32,4,m.notifications$))?31:-1,f)}},dependencies:[G,q,Z,X,Y,at,ot,lt,it,Q,K,pt,A,U,J],encapsulation:2});let i=r;return i})();export{Vt as NotificationComponent};
@@ -1 +1 @@
1
- import{b as Ce}from"./chunk-DXYMG6QK.js";import{c as Se}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import{a as me,b as pe,d as de,e as ge}from"./chunk-6KWG6O5L.js";import{i as ce}from"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{b as re,e as ae}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as g,c as oe}from"./chunk-JBEKD57G.js";import{m as fe,n as _e}from"./chunk-EDEZ3JLR.js";import{A as ie,h as ee,m as te}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{b as se,c as le}from"./chunk-ZETUYNFJ.js";import{v as he,w as ue}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{I as L,i as Z,m as y}from"./chunk-LNJUGHOX.js";import{$b as V,$c as Y,Gb as K,Hb as _,Hc as P,Mb as S,Mc as c,Nc as h,Oc as G,Qc as O,Rc as w,Sc as I,Tc as q,Uc as Q,Vc as X,Z as b,aa as F,bc as W,dc as $,ea as R,ec as j,fc as A,gc as p,hc as r,hd as C,ic as s,id as x,jc as H,kd as D,lb as k,na as u,nb as l,nc as z,oc as J,q as B,qc as E,ra as f,v,vc as N,xa as M,xc as m,ya as T}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ve=t=>[t];function be(t,i){if(t&1&&(r(0,"span",14),H(1,"img",15),s(),r(2,"span"),c(3),s()),t&2){let a=i.item;l(),p("src",a.Img,k)("alt",a.Name),l(2),G(" ",a.Name," ")}}function Me(t,i){if(t&1){let a=E();z(0),q(1),C(2,"async"),r(3,"a",16),N("click",function(){M(a);let e=X(1),o=m();return T(o.submitLogistics(e))}),c(4,"Submit"),s(),J()}if(t&2){let a=m();l(),Q(x(2,0,a.logisticServices$))}}function Te(t,i){}function Ee(t,i){if(t&1){let a=E();r(0,"ng-select",18),I("ngModelChange",function(e){M(a);let o=m(2).$implicit;return w(o.ProductSKU,e)||(o.ProductSKU=e),T(e)}),s()}if(t&2){let a=m(),n=m().$implicit;O("ngModel",n.ProductSKU),p("items",a)}}function Ne(t,i){if(t&1&&(r(0,"span"),c(1),s()),t&2){let a=m(2).$implicit;l(),h(a.ProductSKU||"-")}}function Pe(t,i){if(t&1&&S(0,Te,0,0,"ng-template",17)(1,Ee,1,2,"ng-template",null,0,D)(3,Ne,2,1,"ng-template",null,1,D),t&2){let a=P(2),n=P(4),e=m(2);p("ngxPermissionsOnly",Y(3,ve,e.logisticEditRole))("ngxPermissionsOnlyThen",a)("ngxPermissionsOnlyElse",n)}}function Oe(t,i){if(t&1&&(r(0,"tr")(1,"td"),c(2),s(),r(3,"td"),c(4),s(),r(5,"td"),c(6),s(),r(7,"td"),V(8,Pe,5,5),C(9,"async"),s()()),t&2){let a,n=i.$implicit,e=m();l(2),h(n.Name),l(2),h(n.Service),l(2),h(n.TypeString),l(2),W((a=x(9,4,e.logisticOptions$))?8:-1,a)}}var ye=(()=>{let i=class i{constructor(){this.http=f(ae),this.toastr=f(re),this.authService=f(ce),this.filter={ChannelID:""},this.logisticEditRole=ne.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let n=[g.WooCommerce,g.Lazada,g.Shopify,g.Plugo,g.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(n.forEach(o=>{e.TypeID===o&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(n=>{this.filter=n.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(b(1))}submitLogistics(n){this.clonedLogisticServices$.pipe(v(e=>n.map(o=>(e.findIndex(d=>d.Name===o.Name&&d.ProductSKU==o.ProductSKU)==-1&&(o.IsChange=!0),o))),F(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(n=>n.map(e=>(e.ProductSKU=oe.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),R(n=>{let e=JSON.parse(JSON.stringify(n));this.clonedLogisticServices$=B(e)}),b(1))}iniTitle(){let n=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=n?n.Name:null}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=K({type:i,selectors:[["app-logistic"]],standalone:!1,decls:29,vars:8,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[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"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,o){e&1&&(r(0,"mainpanel",2),N("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",3),c(4,"Select a Channel"),s(),r(5,"ng-select",4),I("ngModelChange",function(d){return w(o.filter.ChannelID,d)||(o.filter.ChannelID=d),d}),S(6,be,4,3,"ng-template",5),s()()(),r(7,"actions"),S(8,Me,5,3,"ng-container",6),s(),r(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),c(18,"Logistic"),s(),r(19,"th"),c(20,"Service"),s(),r(21,"th"),c(22,"Type"),s(),r(23,"th"),c(24,"Logistic Service"),s()()(),r(25,"tbody"),j(26,Oe,10,6,"tr",null,$),C(28,"async"),s()()()()()()()()),e&2&&(p("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),l(5),p("clearable",!1)("items",o.channelOptions),O("ngModel",o.filter.ChannelID),l(3),p("ngxPermissionsOnly",o.logisticEditRole),l(18),A(x(28,6,o.logisticServices$)))},dependencies:[ee,te,fe,de,me,pe,he,se,Z],encapsulation:2});let t=i;return t})();var we=[{path:"",component:ye}],Le=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=_({type:i}),i.\u0275inj=u({imports:[y,L.forChild(we)]});let t=i;return t})();var mt=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=_({type:i}),i.\u0275inj=u({imports:[y,L,Le,ie,_e,ge,Ce,Se,ue,le]});let t=i;return t})();export{mt as LogisticModule};
1
+ import{b as Ce}from"./chunk-DXYMG6QK.js";import{c as Se}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import{a as ne}from"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import{a as me,b as pe,d as de,e as ge}from"./chunk-6KWG6O5L.js";import{i as ce}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import{b as re,e as ae}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as g,c as oe}from"./chunk-JBEKD57G.js";import{m as fe,n as _e}from"./chunk-EDEZ3JLR.js";import{A as ie,h as ee,m as te}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{b as se,c as le}from"./chunk-ZETUYNFJ.js";import{v as he,w as ue}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{I as L,i as Z,m as y}from"./chunk-LNJUGHOX.js";import{$b as V,$c as Y,Gb as K,Hb as _,Hc as P,Mb as S,Mc as c,Nc as h,Oc as G,Qc as O,Rc as w,Sc as I,Tc as q,Uc as Q,Vc as X,Z as b,aa as F,bc as W,dc as $,ea as R,ec as j,fc as A,gc as p,hc as r,hd as C,ic as s,id as x,jc as H,kd as D,lb as k,na as u,nb as l,nc as z,oc as J,q as B,qc as E,ra as f,v,vc as N,xa as M,xc as m,ya as T}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var ve=t=>[t];function be(t,i){if(t&1&&(r(0,"span",14),H(1,"img",15),s(),r(2,"span"),c(3),s()),t&2){let a=i.item;l(),p("src",a.Img,k)("alt",a.Name),l(2),G(" ",a.Name," ")}}function Me(t,i){if(t&1){let a=E();z(0),q(1),C(2,"async"),r(3,"a",16),N("click",function(){M(a);let e=X(1),o=m();return T(o.submitLogistics(e))}),c(4,"Submit"),s(),J()}if(t&2){let a=m();l(),Q(x(2,0,a.logisticServices$))}}function Te(t,i){}function Ee(t,i){if(t&1){let a=E();r(0,"ng-select",18),I("ngModelChange",function(e){M(a);let o=m(2).$implicit;return w(o.ProductSKU,e)||(o.ProductSKU=e),T(e)}),s()}if(t&2){let a=m(),n=m().$implicit;O("ngModel",n.ProductSKU),p("items",a)}}function Ne(t,i){if(t&1&&(r(0,"span"),c(1),s()),t&2){let a=m(2).$implicit;l(),h(a.ProductSKU||"-")}}function Pe(t,i){if(t&1&&S(0,Te,0,0,"ng-template",17)(1,Ee,1,2,"ng-template",null,0,D)(3,Ne,2,1,"ng-template",null,1,D),t&2){let a=P(2),n=P(4),e=m(2);p("ngxPermissionsOnly",Y(3,ve,e.logisticEditRole))("ngxPermissionsOnlyThen",a)("ngxPermissionsOnlyElse",n)}}function Oe(t,i){if(t&1&&(r(0,"tr")(1,"td"),c(2),s(),r(3,"td"),c(4),s(),r(5,"td"),c(6),s(),r(7,"td"),V(8,Pe,5,5),C(9,"async"),s()()),t&2){let a,n=i.$implicit,e=m();l(2),h(n.Name),l(2),h(n.Service),l(2),h(n.TypeString),l(2),W((a=x(9,4,e.logisticOptions$))?8:-1,a)}}var ye=(()=>{let i=class i{constructor(){this.http=f(ae),this.toastr=f(re),this.authService=f(ce),this.filter={ChannelID:""},this.logisticEditRole=ne.LogisticUpdate,this.channelOptions=this.authService.getChannels(),this.initUnsupportedChannel(),this.initLoader()}initUnsupportedChannel(){let n=[g.WooCommerce,g.Lazada,g.Shopify,g.Plugo,g.Tokopedia];this.channelOptions=this.channelOptions.map(e=>(n.forEach(o=>{e.TypeID===o&&(e.disabled=!0)}),e))}initLoader(){this.http.post("/api/Logistic/Load",{}).subscribe(n=>{this.filter=n.Filter,this.channelName=this.channelOptions[0].Name,this.initLogisticServiceOptions(),this.getLogisticService()})}initLogisticServiceOptions(){this.logisticOptions$=this.http.get("/api/Logistic/OptionLogisticsService").pipe(b(1))}submitLogistics(n){this.clonedLogisticServices$.pipe(v(e=>n.map(o=>(e.findIndex(d=>d.Name===o.Name&&d.ProductSKU==o.ProductSKU)==-1&&(o.IsChange=!0),o))),F(e=>this.http.post("/api/Logistic/Submit",e))).subscribe(()=>{this.toastr.success("Logistic service updated successfully.","Success"),this.getLogisticService()})}getLogisticService(){this.iniTitle(),this.logisticServices$=this.http.post("/api/Logistic/Get",this.filter).pipe(v(n=>n.map(e=>(e.ProductSKU=oe.IsEmpty(e.ProductSKU)?null:e.ProductSKU,e))),R(n=>{let e=JSON.parse(JSON.stringify(n));this.clonedLogisticServices$=B(e)}),b(1))}iniTitle(){let n=this.channelOptions.find(e=>e.ID==this.filter.ChannelID);this.channelName=n?n.Name:null}};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=K({type:i,selectors:[["app-logistic"]],standalone:!1,decls:29,vars:8,consts:[["thenBlock",""],["elseBlock",""],["hideSearchBox","true","searchBoxPlaceHolder","Enter Number...",3,"onSubmit","headerTitle","hideSearchDropdown"],[1,"mb-2","fw-bold"],["appendTo","body","bindLabel","Name","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[4,"ngxPermissionsOnly"],[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"],[1,"me-2"],[2,"width","18px",3,"src","alt"],["role","button","data-toggle","tooltip","data-placement","top","matTooltip","enter Logistic for recorded",1,"btn","btn-success","btn-fill","btn-lg","text-white",3,"click"],[3,"ngxPermissionsOnly","ngxPermissionsOnlyThen","ngxPermissionsOnlyElse"],["placeholder","Logistic Service Code","bindLabel","Name","bindValue","Code",1,"w-75",3,"ngModelChange","ngModel","items"]],template:function(e,o){e&1&&(r(0,"mainpanel",2),N("onSubmit",function(){return o.getLogisticService()}),r(1,"filters")(2,"div")(3,"label",3),c(4,"Select a Channel"),s(),r(5,"ng-select",4),I("ngModelChange",function(d){return w(o.filter.ChannelID,d)||(o.filter.ChannelID=d),d}),S(6,be,4,3,"ng-template",5),s()()(),r(7,"actions"),S(8,Me,5,3,"ng-container",6),s(),r(9,"content")(10,"div",7)(11,"div",8)(12,"div",9)(13,"div",10)(14,"table",11)(15,"thead",12)(16,"tr",13)(17,"th"),c(18,"Logistic"),s(),r(19,"th"),c(20,"Service"),s(),r(21,"th"),c(22,"Type"),s(),r(23,"th"),c(24,"Logistic Service"),s()()(),r(25,"tbody"),j(26,Oe,10,6,"tr",null,$),C(28,"async"),s()()()()()()()()),e&2&&(p("headerTitle","Logistic Courier - "+o.channelName)("hideSearchDropdown",!1),l(5),p("clearable",!1)("items",o.channelOptions),O("ngModel",o.filter.ChannelID),l(3),p("ngxPermissionsOnly",o.logisticEditRole),l(18),A(x(28,6,o.logisticServices$)))},dependencies:[ee,te,fe,de,me,pe,he,se,Z],encapsulation:2});let t=i;return t})();var we=[{path:"",component:ye}],Le=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=_({type:i}),i.\u0275inj=u({imports:[y,L.forChild(we)]});let t=i;return t})();var mt=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=_({type:i}),i.\u0275inj=u({imports:[y,L,Le,ie,_e,ge,Ce,Se,ue,le]});let t=i;return t})();export{mt as LogisticModule};
@@ -1,2 +1,2 @@
1
- import{a as E}from"./chunk-DHPNXR6E.js";import{a as je}from"./chunk-6XDT56RT.js";import"./chunk-SHUYFOQI.js";import{a as Ke}from"./chunk-TYQY4WPY.js";import"./chunk-IM5M2CAI.js";import{a as J}from"./chunk-ISMIPSYN.js";import{a as ze,b as Ge,c as qe,d as Y,e as ee}from"./chunk-S5R6MCNP.js";import{c as We,d as $e}from"./chunk-T7HRAMHR.js";import"./chunk-DAUML5UD.js";import{a as He,b as Qe}from"./chunk-DXYMG6QK.js";import"./chunk-3WRXJBHF.js";import"./chunk-UH5C5HXK.js";import"./chunk-63I3I3MX.js";import{a as Ae}from"./chunk-2IASUYTM.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import{a as Z}from"./chunk-ZSUWHVKX.js";import{a as Le,b as Oe,c as Be}from"./chunk-6PW6S7MI.js";import"./chunk-N5AE5WMQ.js";import{a as Ue}from"./chunk-6OJQRHIZ.js";import"./chunk-6OIMOM7S.js";import{e as Ie}from"./chunk-6KWG6O5L.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as be}from"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as X}from"./chunk-AGBJEXIM.js";import{b as fe,e as Se}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as y}from"./chunk-JBEKD57G.js";import{b as Pe,c as De,d as Me,j as Ve,k as Ee,l as ke,m as Re,n as Ne}from"./chunk-EDEZ3JLR.js";import{A as xe,b as _e,c as Ce,h as ue,m as he,o as ge}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as ye,b as ve,c as we}from"./chunk-ZETUYNFJ.js";import{v as Fe,w as Te}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{G as pe,I as me,c as ce,i as $,j as H,l as de,m as Q}from"./chunk-LNJUGHOX.js";import{$b as u,$c as D,G as j,Gb as O,Ha as M,Lc as ie,Mb as B,Mc as m,Nc as L,Oc as I,Qc as F,Rc as T,Sc as P,Tc as oe,Uc as ae,Vc as le,Wc as re,Z as R,Zc as W,_c as se,bc as h,cc as G,ea as z,ec as q,fc as K,gc as g,hc as a,hd as f,ic as r,id as b,jc as v,jd as V,lb as N,nb as s,nc as A,oc as U,qc as w,ra as S,v as k,vc as x,xa as _,xc as l,ya as C}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as ne}from"./chunk-66YHNWRR.js";var Je=()=>["/menu/order/download"];function et(i,c){if(i&1&&(a(0,"li",4)(1,"div"),m(2," The last time you manually download your order is on "),a(3,"span",8),m(4),f(5,"date"),r()(),a(6,"div",9),m(7),r()()),i&2){l();let e=le(0);s(4),I(" ",V(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function tt(i,c){i&1&&(a(0,"li",4),m(1," The last time you manually download your order is on (-) "),r())}var Ze=(()=>{let c=class c{constructor(){this.dialogRef=S(Pe),this.data=S(De),this.modalConfig=new Ve,this.inventoryService=S(E),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(k(n=>{let t=n.OrderDownloadLatestOn!=y.MinDate,o=null,p=null;return t&&(o=new Date(n.OrderDownloadLatestOn),p=y.convertToReadableDate(o)),{OrderDownloadLatestOn:o,calculatedDate:p}}),R(1)),this.selectedProducts=M(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-dialog-update-product-info"]],features:[W([E])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(t,o){if(t&1){let p=w();oe(0),f(1,"async"),a(2,"modal-material",0),x("onCancel",function(){return _(p),C(o.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),m(6),r(),a(7,"div",3)(8,"ul"),u(9,et,8,5,"li",4)(10,tt,2,0,"li",4),r()()()(),a(11,"div",5)(12,"a",6),x("click",function(){return _(p),C(o.onCancel())}),m(13," Download "),r(),a(14,"button",7),x("click",function(){return _(p),C(o.onUpdate())})("keyup.F2",function(){return _(p),C(o.onUpdate())}),m(15," Update Anyway "),r()()()}if(t&2){let p=ae(b(1,4,o.lastDownloadInfo$));s(2),g("config",o.modalConfig),s(4),I("",o.selectedProducts().length," Product(s) will be updated."),s(3),h(p!=null&&p.OrderDownloadLatestOn?9:10),s(3),g("routerLink",se(7,Je))}},dependencies:[Ee,Q,me,pe,$,H],encapsulation:2});let i=c;return i})();var te=i=>[i],nt=i=>({"text-decoration-line-through":i}),it=i=>({"me-10":i}),ot=i=>({"bg-gradient-warning":i}),at=i=>({cursor:i});function lt(i,c){if(i&1){let e=w();a(0,"button",37),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onScanInventory(t))}),v(1,"i",38),m(2,"Refresh "),r()}}function rt(i,c){if(i&1){let e=w();a(0,"div",35)(1,"button",39),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onOpenDialogUpdateStockInfo(t))}),v(2,"i",40),m(3," Update "),r(),v(4,"button",41),a(5,"ul",42)(6,"a",43),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(7,"i",44),a(8,"span"),m(9,"Export"),r()()()()}}function st(i,c){if(i&1){let e=w();a(0,"button",45),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(1,"i",44),a(2,"span"),m(3,"Export"),r()()}}function ct(i,c){if(i&1&&(a(0,"div"),u(1,lt,3,0,"button",34),u(2,rt,10,0,"div",35)(3,st,4,0,"button",36),r()),i&2){let e=c,n=l(2);s(),h(n.productService.hasSelectionVariant(e)?1:-1),s(),h(n.productService.hasSelectionVariant(e)?2:3)}}function dt(i,c){i&1&&(a(0,"div",18)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function pt(i,c){if(i&1){let e=w();a(0,"th")(1,"input",46),P("ngModelChange",function(t){_(e);let o=l(3);return T(o.checkboxState,t)||(o.checkboxState=t),C(t)}),x("ngModelChange",function(){let t=_(e),o=l(3);return C(o.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(3);s(),F("ngModel",e.checkboxState)}}function mt(i,c){if(i&1&&(A(0),u(1,pt,2,1,"th"),f(2,"async"),U()),i&2){let e,n=l(2);s(),h((e=b(2,1,n.products$))?1:-1,e)}}function _t(i,c){i&1&&(a(0,"th",31),m(1," Reserved "),r())}function Ct(i,c){if(i&1){let e=w();a(0,"input",63),P("ngModelChange",function(t){_(e);let o=l(4).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),x("ngModelChange",function(){_(e);let t=l(4).$implicit,o=l(2);return C(o.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(4).$implicit;F("ngModel",e.selected)}}function ut(i,c){if(i&1&&(A(0),a(1,"div",61),u(2,Ct,1,1,"input",62),r(),U()),i&2){let e=l(3).$implicit;s(),g("ngClass",D(2,it,e.Variants.length<=1)),s(),h(e.Variants.length>1?2:-1)}}function ht(i,c){if(i&1){let e=w();a(0,"img",64),x("click",function(t){_(e);let o=l(3).$implicit,p=l(2);return C(p.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;g("src",re(e==null?null:e.ThumbnailUrl),N)}}function gt(i,c){i&1&&v(0,"img",58)}function xt(i,c){if(i&1&&(v(0,"br"),a(1,"div",65),v(2,"i",66),a(3,"small"),m(4),r()()),i&2){let e=l(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function ft(i,c){if(i&1&&(a(0,"td",56)(1,"div",12),B(2,ut,3,4,"ng-container",25),a(3,"div"),u(4,ht,1,2,"img",57)(5,gt,1,0,"img",58),r()()(),a(6,"td",59)(7,"span",60),m(8),r(),u(9,xt,5,1),r()),i&2){let e=l(2).$implicit,n=l(2);g("rowSpan",e==null?null:e.Variants.length),s(2),g("ngxPermissionsOnly",D(6,te,n.inventoryUpdateRole)),s(2),h(e!=null&&e.ThumbnailUrl?4:5),s(2),g("rowSpan",e==null?null:e.Variants.length),s(2),L(e==null?null:e.Name),s(),h(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function St(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(3).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(3).$implicit;F("ngModel",e.selected)}}function yt(i,c){if(i&1&&u(0,St,1,1,"input",68),i&2){let e=l(2).$implicit;h((e==null?null:e.Inventory)<=1e5?0:-1)}}function vt(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(2).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(2).$implicit;F("ngModel",e.selected)}}function wt(i,c){if(i&1&&(A(0),a(1,"td",67),u(2,yt,1,1)(3,vt,1,1,"input",68),r(),U()),i&2){let e=l().$implicit;s(2),h((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function bt(i,c){i&1&&(a(0,"div",51),m(1," Not Found "),r())}function It(i,c){if(i&1&&(a(0,"div")(1,"span",69),m(2),f(3,"number"),r(),m(4," => "),a(5,"span",70),m(6),f(7,"number"),r()()),i&2){let e=l().$implicit;s(2),I(" ",b(3,2,e==null||e.I==null?null:e.I.Available)),s(4),L(b(7,4,e==null?null:e.Inventory))}}function Ft(i,c){if(i&1&&(m(0),f(1,"number")),i&2){let e=l().$implicit;I(" ",b(1,1,e==null?null:e.Inventory)," ")}}function Tt(i,c){if(i&1&&(a(0,"div",52)(1,"a",71),v(2,"i",72),r()()),i&2){let e=l().$implicit,n=l(3);s(),g("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}function Pt(i,c){if(i&1){let e=w();a(0,"span",76),x("click",function(){_(e);let t=l(2).$implicit,o=l().$implicit,p=l(2);return C(p.openTableDialog(o,t))}),m(1),f(2,"number"),r()}if(i&2){let e=l(2).$implicit,n=l(3);ie(D(5,at,n.hasInventoryEdit())),s(),I(" ",b(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Dt(i,c){if(i&1){let e=w();a(0,"td",53)(1,"div",50)(2,"div"),u(3,Pt,3,7,"span",73),f(4,"async"),r(),a(5,"div",52)(6,"a",71),v(7,"i",72),r()(),a(8,"div",52)(9,"span",74),x("click",function(){_(e);let t=l().$implicit,o=l(3);return C(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),v(10,"i",75),r()()()()}if(i&2){let e,n=l().$implicit,t=l(3);g("ngClass",D(5,ot,(n==null?null:n.Inventory)!=(n==null||n.Channel[0]==null?null:n.Channel[0].Inventory))),s(3),h((e=b(4,3,t.products$))?3:-1,e),s(3),g("href",n==null||n.Channel[0]==null?null:n.Channel[0].Url,N)}}function Mt(i,c){if(i&1&&(a(0,"span",77),m(1),f(2,"number"),r()),i&2){let e=l(2).$implicit;s(),I(" (",b(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Vt(i,c){i&1&&m(0," - ")}function Et(i,c){if(i&1&&(a(0,"td",48),u(1,Mt,3,3,"span",77)(2,Vt,1,0),r()),i&2){let e=l().$implicit;s(),h(!(e==null||e.Channel[0]==null)&&e.Channel[0].InventoryReserved?1:2)}}function kt(i,c){i&1&&m(0," - ")}function Rt(i,c){if(i&1&&(a(0,"span",55),f(1,"date"),m(2),f(3,"date"),r()),i&2){let e=l().$implicit;g("matTooltip",V(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",V(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Nt(i,c){if(i&1&&(a(0,"tr"),u(1,ft,10,8),a(2,"td",47),m(3),r(),a(4,"td",48)(5,"span",49),m(6),r()(),B(7,wt,4,1,"ng-container",25),a(8,"td")(9,"div",50),u(10,bt,2,0,"div",51),u(11,It,8,6,"div"),u(12,Ft,2,3),u(13,Tt,3,1,"div",52),r()(),u(14,Dt,11,7,"td",53),u(15,Et,3,1,"td",48),a(16,"td",54),u(17,kt,1,0)(18,Rt,4,8,"span",55),r()()),i&2){let e=c.$implicit,n=c.$index,t=l(3);s(),h(n==0?1:-1),s(2),L(e==null?null:e.Model),s(2),g("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",D(13,nt,e.Discontinued)),s(),L(e==null?null:e.Code),s(),g("ngxPermissionsOnly",D(15,te,t.inventoryUpdateRole)),s(3),h((e==null?null:e.I)==null?10:-1),s(),h((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),h((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),h((e==null?null:e.I)!=null?13:-1),s(),h(e!=null&&e.Channel?14:-1),s(),h(t.isShowReservedColumn?15:-1),s(2),h((e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==t.minDate?17:18)}}function Lt(i,c){if(i&1&&(a(0,"tbody"),q(1,Nt,19,17,"tr",null,G),r()),i&2){let e=c.$implicit;s(),K(e.Variants)}}function Ot(i,c){if(i&1){let e=w();a(0,"mainpanel",1),x("onSubmit",function(t){_(e);let o=l();return C(o.onSearch(t))}),a(1,"actions")(2,"div",2),u(3,ct,4,2,"div"),f(4,"async"),r()(),a(5,"filters")(6,"div",3)(7,"label",4),m(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",5),x("onChannelChange",function(t){_(e);let o=l();return C(o.onChannelChange(t))}),r()(),a(10,"div",3)(11,"filter-query-type",6),P("numberFilterComparatorChange",function(t){_(e);let o=l();return T(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),C(t)})("searchTypeChange",function(t){_(e);let o=l();return T(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),C(t)}),r()(),a(12,"div",3)(13,"label",7),m(14,"PageNumber"),r(),a(15,"input",8),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),C(t)}),r()(),a(16,"div",3)(17,"label",9),m(18,"Page Size"),r(),a(19,"input",10),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),C(t)}),r()(),a(20,"div")(21,"label",11),m(22,"Quantity From - To"),r(),a(23,"div",12)(24,"input",13),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),C(t)}),r(),m(25," - "),a(26,"input",14),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),C(t)}),r()()()(),a(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,dt,3,0,"div",18),a(32,"table",19),x("matSortChange",function(t){_(e);let o=l();return C(o.onSortVariant(t))}),a(33,"thead",20)(34,"tr")(35,"th",21),m(36," Product "),v(37,"br"),a(38,"mat-slide-toggle",22),x("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,C(t.onShowDifferenceStock())}),a(39,"small",11),m(40,"FILTER DIFFERENT INVENTORY"),r()()(),a(41,"th",23),m(42,"Variant"),r(),a(43,"th",24),m(44,"SKU"),r(),B(45,mt,3,3,"ng-container",25),a(46,"th",26),m(47," POS "),r(),a(48,"th",27)(49,"div",28),x("click",function(){_(e);let t=l();return C(t.openModalFilter())}),v(50,"img",29),a(51,"span",30),m(52),f(53,"stringLimit"),r()()(),u(54,_t,2,0,"th",31),a(55,"th",32),m(56,"Last Sync"),r()()(),q(57,Lt,3,0,"tbody",null,G),f(59,"async"),r(),a(60,"infinite-paginator",33),f(61,"async"),x("onNextPage",function(){_(e);let t=l();return C(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return C(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return C(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,n,t,o,p=c,d=l();g("hideSearchBox",!1)("searchBoxPlaceHolder",d.searchPlaceholder()),s(3),h((e=b(4,24,d.products$))?3:-1,e),s(6),g("ngModel",(d.searchFilter==null?null:d.searchFilter.LocationID)||(d.searchFilter==null?null:d.searchFilter.ChannelID)),s(2),g("numberFilterComparatorOptions",p==null||p.Options==null?null:p.Options.SearchComparatorTypeOptions),F("numberFilterComparator",d.searchFilter.NumberFilterComparator),g("searchTypeOptions",p==null||p.Options==null?null:p.Options.SearchSKUOnlyOrSKUNameOptions),F("searchType",d.searchFilter.SearchType),s(4),F("ngModel",d.searchFilter.PageNumber),s(4),F("ngModel",d.searchFilter.RowCount),s(5),F("ngModel",d.searchFilter.QuantityFrom),s(2),F("ngModel",d.searchFilter.QuantityTo),s(5),h((d.searchFilter==null?null:d.searchFilter.filterModel)==3?31:-1),s(14),g("ngxPermissionsOnly",D(33,te,d.inventoryUpdateRole)),s(4),g("matTooltip",((n=d.channelIdentity())==null||n.label==null?null:n.label.length)>13?(n=d.channelIdentity())==null?null:n.label:""),s(),g("src",(t=d.channelIdentity())==null?null:t.img,N),s(2),I(" ",V(53,26,(o=d.channelIdentity())==null?null:o.label,13)," "),s(2),h(d.isShowReservedColumn?54:-1),s(3),K(b(59,29,d.products$)),s(3),g("totalData",d.infinitePagination.totalData())("hideCount",d.infinitePagination.hideCount())("rowCount",b(61,31,d.infinitePagination.totalRowCount$))("pageNumber",d.infinitePagination.pageNumber())("disableNextButton",d.infinitePagination.disableNextButton())("goToLastPage",d.infinitePagination.isLastPage())}}var Bn=(()=>{let c=class c{constructor(){this.http=S(Se),this.toastr=S(fe),this.dialog=S(Me),this.productService=S(Ae),this.authService=S(be),this.biggerPictureService=S(Ue),this.mainPanelService=S(ke),this.placeholderService=S(We),this.infinitePagination=S(Y),this.ngxPermissionsService=S(ye),this.updateResHandling=S(ee),this.inventoryService=S(E),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=y.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=y.GuidEMpty,this.selectedChannel=M(null),this.channelIdentity=M({img:null,label:null}),this.inventoryUpdateRole=Z.InventoryUpdate,this.hasInventoryEdit=M(!0),this.searchPlaceholder=M("Search ...")}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(n=>{this.checkShowReservedColumn(n)}),k(n=>(n=this.calculateAvailableStock(n),n)),R(1)),this.products$=this.sourceObs$}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(R(1),z(n=>{this.searchFilter={RowCount:n.Filter?.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter?.ChannelID,LocationID:n.Filter?.LocationID,NumberFilterComparator:n.Filter?.NumberFilterComparator,SearchType:n.Filter?.SearchType},this.initReloadData(),this.initSearchPlaceholder(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initRoles(){this.ngxPermissionsService.hasPermission(Z.InventoryUpdate).then(n=>this.hasInventoryEdit.set(n))}calculateAvailableStock(n){return n.map(o=>(o.totalAvailable=o.Variants.reduce((p,d)=>(p+=d.I?.Available||0,p),0),o))}checkShowReservedColumn(n){let t=0,o;n.forEach(p=>{o=p.Variants.find(d=>y.IsNotEmpty(d?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),y.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());y.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=y.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=y.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
1
+ import{a as E}from"./chunk-DHPNXR6E.js";import{a as je}from"./chunk-6XDT56RT.js";import"./chunk-SHUYFOQI.js";import{a as Ke}from"./chunk-TYQY4WPY.js";import"./chunk-IM5M2CAI.js";import{a as J}from"./chunk-ISMIPSYN.js";import{a as ze,b as Ge,c as qe,d as Y,e as ee}from"./chunk-S5R6MCNP.js";import{c as We,d as $e}from"./chunk-T7HRAMHR.js";import"./chunk-DAUML5UD.js";import{a as He,b as Qe}from"./chunk-DXYMG6QK.js";import"./chunk-3WRXJBHF.js";import"./chunk-UH5C5HXK.js";import"./chunk-63I3I3MX.js";import{a as Ae}from"./chunk-OR34CB7O.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import{a as Z}from"./chunk-ZSUWHVKX.js";import{a as Le,b as Oe,c as Be}from"./chunk-6PW6S7MI.js";import"./chunk-N5AE5WMQ.js";import{a as Ue}from"./chunk-6OJQRHIZ.js";import"./chunk-4UPWMQJX.js";import{e as Ie}from"./chunk-6KWG6O5L.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as be}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as X}from"./chunk-AGBJEXIM.js";import{b as fe,e as Se}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as y}from"./chunk-JBEKD57G.js";import{b as Pe,c as De,d as Me,j as Ve,k as Ee,l as ke,m as Re,n as Ne}from"./chunk-EDEZ3JLR.js";import{A as xe,b as _e,c as Ce,h as ue,m as he,o as ge}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import{a as ye,b as ve,c as we}from"./chunk-ZETUYNFJ.js";import{v as Fe,w as Te}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{G as pe,I as me,c as ce,i as $,j as H,l as de,m as Q}from"./chunk-LNJUGHOX.js";import{$b as u,$c as D,G as j,Gb as O,Ha as M,Lc as ie,Mb as B,Mc as m,Nc as L,Oc as I,Qc as F,Rc as T,Sc as P,Tc as oe,Uc as ae,Vc as le,Wc as re,Z as R,Zc as W,_c as se,bc as h,cc as G,ea as z,ec as q,fc as K,gc as g,hc as a,hd as f,ic as r,id as b,jc as v,jd as V,lb as N,nb as s,nc as A,oc as U,qc as w,ra as S,v as k,vc as x,xa as _,xc as l,ya as C}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as ne}from"./chunk-66YHNWRR.js";var Je=()=>["/menu/order/download"];function et(i,c){if(i&1&&(a(0,"li",4)(1,"div"),m(2," The last time you manually download your order is on "),a(3,"span",8),m(4),f(5,"date"),r()(),a(6,"div",9),m(7),r()()),i&2){l();let e=le(0);s(4),I(" ",V(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function tt(i,c){i&1&&(a(0,"li",4),m(1," The last time you manually download your order is on (-) "),r())}var Ze=(()=>{let c=class c{constructor(){this.dialogRef=S(Pe),this.data=S(De),this.modalConfig=new Ve,this.inventoryService=S(E),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(k(n=>{let t=n.OrderDownloadLatestOn!=y.MinDate,o=null,p=null;return t&&(o=new Date(n.OrderDownloadLatestOn),p=y.convertToReadableDate(o)),{OrderDownloadLatestOn:o,calculatedDate:p}}),R(1)),this.selectedProducts=M(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-dialog-update-product-info"]],features:[W([E])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(t,o){if(t&1){let p=w();oe(0),f(1,"async"),a(2,"modal-material",0),x("onCancel",function(){return _(p),C(o.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),m(6),r(),a(7,"div",3)(8,"ul"),u(9,et,8,5,"li",4)(10,tt,2,0,"li",4),r()()()(),a(11,"div",5)(12,"a",6),x("click",function(){return _(p),C(o.onCancel())}),m(13," Download "),r(),a(14,"button",7),x("click",function(){return _(p),C(o.onUpdate())})("keyup.F2",function(){return _(p),C(o.onUpdate())}),m(15," Update Anyway "),r()()()}if(t&2){let p=ae(b(1,4,o.lastDownloadInfo$));s(2),g("config",o.modalConfig),s(4),I("",o.selectedProducts().length," Product(s) will be updated."),s(3),h(p!=null&&p.OrderDownloadLatestOn?9:10),s(3),g("routerLink",se(7,Je))}},dependencies:[Ee,Q,me,pe,$,H],encapsulation:2});let i=c;return i})();var te=i=>[i],nt=i=>({"text-decoration-line-through":i}),it=i=>({"me-10":i}),ot=i=>({"bg-gradient-warning":i}),at=i=>({cursor:i});function lt(i,c){if(i&1){let e=w();a(0,"button",37),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onScanInventory(t))}),v(1,"i",38),m(2,"Refresh "),r()}}function rt(i,c){if(i&1){let e=w();a(0,"div",35)(1,"button",39),x("click",function(){_(e);let t=l(),o=l(2);return C(o.onOpenDialogUpdateStockInfo(t))}),v(2,"i",40),m(3," Update "),r(),v(4,"button",41),a(5,"ul",42)(6,"a",43),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(7,"i",44),a(8,"span"),m(9,"Export"),r()()()()}}function st(i,c){if(i&1){let e=w();a(0,"button",45),x("click",function(){_(e);let t=l(3);return C(t.openExportDialog())}),v(1,"i",44),a(2,"span"),m(3,"Export"),r()()}}function ct(i,c){if(i&1&&(a(0,"div"),u(1,lt,3,0,"button",34),u(2,rt,10,0,"div",35)(3,st,4,0,"button",36),r()),i&2){let e=c,n=l(2);s(),h(n.productService.hasSelectionVariant(e)?1:-1),s(),h(n.productService.hasSelectionVariant(e)?2:3)}}function dt(i,c){i&1&&(a(0,"div",18)(1,"span"),m(2," showing only different stock, please press next to populate more data "),r()())}function pt(i,c){if(i&1){let e=w();a(0,"th")(1,"input",46),P("ngModelChange",function(t){_(e);let o=l(3);return T(o.checkboxState,t)||(o.checkboxState=t),C(t)}),x("ngModelChange",function(){let t=_(e),o=l(3);return C(o.onCheckboxStateChange(t))}),r()()}if(i&2){let e=l(3);s(),F("ngModel",e.checkboxState)}}function mt(i,c){if(i&1&&(A(0),u(1,pt,2,1,"th"),f(2,"async"),U()),i&2){let e,n=l(2);s(),h((e=b(2,1,n.products$))?1:-1,e)}}function _t(i,c){i&1&&(a(0,"th",31),m(1," Reserved "),r())}function Ct(i,c){if(i&1){let e=w();a(0,"input",63),P("ngModelChange",function(t){_(e);let o=l(4).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),x("ngModelChange",function(){_(e);let t=l(4).$implicit,o=l(2);return C(o.onCheckboxStateProduct(t))}),r()}if(i&2){let e=l(4).$implicit;F("ngModel",e.selected)}}function ut(i,c){if(i&1&&(A(0),a(1,"div",61),u(2,Ct,1,1,"input",62),r(),U()),i&2){let e=l(3).$implicit;s(),g("ngClass",D(2,it,e.Variants.length<=1)),s(),h(e.Variants.length>1?2:-1)}}function ht(i,c){if(i&1){let e=w();a(0,"img",64),x("click",function(t){_(e);let o=l(3).$implicit,p=l(2);return C(p.onZoomImage(t,o==null?null:o.ImageUrl))}),r()}if(i&2){let e=l(3).$implicit;g("src",re(e==null?null:e.ThumbnailUrl),N)}}function gt(i,c){i&1&&v(0,"img",58)}function xt(i,c){if(i&1&&(v(0,"br"),a(1,"div",65),v(2,"i",66),a(3,"small"),m(4),r()()),i&2){let e=l(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function ft(i,c){if(i&1&&(a(0,"td",56)(1,"div",12),B(2,ut,3,4,"ng-container",25),a(3,"div"),u(4,ht,1,2,"img",57)(5,gt,1,0,"img",58),r()()(),a(6,"td",59)(7,"span",60),m(8),r(),u(9,xt,5,1),r()),i&2){let e=l(2).$implicit,n=l(2);g("rowSpan",e==null?null:e.Variants.length),s(2),g("ngxPermissionsOnly",D(6,te,n.inventoryUpdateRole)),s(2),h(e!=null&&e.ThumbnailUrl?4:5),s(2),g("rowSpan",e==null?null:e.Variants.length),s(2),L(e==null?null:e.Name),s(),h(e.CategoryID!==null&&e.CategoryID!=n.guidEmpty?9:-1)}}function St(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(3).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(3).$implicit;F("ngModel",e.selected)}}function yt(i,c){if(i&1&&u(0,St,1,1,"input",68),i&2){let e=l(2).$implicit;h((e==null?null:e.Inventory)<=1e5?0:-1)}}function vt(i,c){if(i&1){let e=w();a(0,"input",46),P("ngModelChange",function(t){_(e);let o=l(2).$implicit;return T(o.selected,t)||(o.selected=t),C(t)}),r()}if(i&2){let e=l(2).$implicit;F("ngModel",e.selected)}}function wt(i,c){if(i&1&&(A(0),a(1,"td",67),u(2,yt,1,1)(3,vt,1,1,"input",68),r(),U()),i&2){let e=l().$implicit;s(2),h((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function bt(i,c){i&1&&(a(0,"div",51),m(1," Not Found "),r())}function It(i,c){if(i&1&&(a(0,"div")(1,"span",69),m(2),f(3,"number"),r(),m(4," => "),a(5,"span",70),m(6),f(7,"number"),r()()),i&2){let e=l().$implicit;s(2),I(" ",b(3,2,e==null||e.I==null?null:e.I.Available)),s(4),L(b(7,4,e==null?null:e.Inventory))}}function Ft(i,c){if(i&1&&(m(0),f(1,"number")),i&2){let e=l().$implicit;I(" ",b(1,1,e==null?null:e.Inventory)," ")}}function Tt(i,c){if(i&1&&(a(0,"div",52)(1,"a",71),v(2,"i",72),r()()),i&2){let e=l().$implicit,n=l(3);s(),g("href",n.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),N)}}function Pt(i,c){if(i&1){let e=w();a(0,"span",76),x("click",function(){_(e);let t=l(2).$implicit,o=l().$implicit,p=l(2);return C(p.openTableDialog(o,t))}),m(1),f(2,"number"),r()}if(i&2){let e=l(2).$implicit,n=l(3);ie(D(5,at,n.hasInventoryEdit())),s(),I(" ",b(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Dt(i,c){if(i&1){let e=w();a(0,"td",53)(1,"div",50)(2,"div"),u(3,Pt,3,7,"span",73),f(4,"async"),r(),a(5,"div",52)(6,"a",71),v(7,"i",72),r()(),a(8,"div",52)(9,"span",74),x("click",function(){_(e);let t=l().$implicit,o=l(3);return C(o.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),v(10,"i",75),r()()()()}if(i&2){let e,n=l().$implicit,t=l(3);g("ngClass",D(5,ot,(n==null?null:n.Inventory)!=(n==null||n.Channel[0]==null?null:n.Channel[0].Inventory))),s(3),h((e=b(4,3,t.products$))?3:-1,e),s(3),g("href",n==null||n.Channel[0]==null?null:n.Channel[0].Url,N)}}function Mt(i,c){if(i&1&&(a(0,"span",77),m(1),f(2,"number"),r()),i&2){let e=l(2).$implicit;s(),I(" (",b(2,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function Vt(i,c){i&1&&m(0," - ")}function Et(i,c){if(i&1&&(a(0,"td",48),u(1,Mt,3,3,"span",77)(2,Vt,1,0),r()),i&2){let e=l().$implicit;s(),h(!(e==null||e.Channel[0]==null)&&e.Channel[0].InventoryReserved?1:2)}}function kt(i,c){i&1&&m(0," - ")}function Rt(i,c){if(i&1&&(a(0,"span",55),f(1,"date"),m(2),f(3,"date"),r()),i&2){let e=l().$implicit;g("matTooltip",V(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",V(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function Nt(i,c){if(i&1&&(a(0,"tr"),u(1,ft,10,8),a(2,"td",47),m(3),r(),a(4,"td",48)(5,"span",49),m(6),r()(),B(7,wt,4,1,"ng-container",25),a(8,"td")(9,"div",50),u(10,bt,2,0,"div",51),u(11,It,8,6,"div"),u(12,Ft,2,3),u(13,Tt,3,1,"div",52),r()(),u(14,Dt,11,7,"td",53),u(15,Et,3,1,"td",48),a(16,"td",54),u(17,kt,1,0)(18,Rt,4,8,"span",55),r()()),i&2){let e=c.$implicit,n=c.$index,t=l(3);s(),h(n==0?1:-1),s(2),L(e==null?null:e.Model),s(2),g("matTooltip",e.Discontinued?t.discontinuedVariantMsg:"")("ngClass",D(13,nt,e.Discontinued)),s(),L(e==null?null:e.Code),s(),g("ngxPermissionsOnly",D(15,te,t.inventoryUpdateRole)),s(3),h((e==null?null:e.I)==null?10:-1),s(),h((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),h((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),h((e==null?null:e.I)!=null?13:-1),s(),h(e!=null&&e.Channel?14:-1),s(),h(t.isShowReservedColumn?15:-1),s(2),h((e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==t.minDate?17:18)}}function Lt(i,c){if(i&1&&(a(0,"tbody"),q(1,Nt,19,17,"tr",null,G),r()),i&2){let e=c.$implicit;s(),K(e.Variants)}}function Ot(i,c){if(i&1){let e=w();a(0,"mainpanel",1),x("onSubmit",function(t){_(e);let o=l();return C(o.onSearch(t))}),a(1,"actions")(2,"div",2),u(3,ct,4,2,"div"),f(4,"async"),r()(),a(5,"filters")(6,"div",3)(7,"label",4),m(8,"Channel"),r(),a(9,"multiwarehouse-tree-select",5),x("onChannelChange",function(t){_(e);let o=l();return C(o.onChannelChange(t))}),r()(),a(10,"div",3)(11,"filter-query-type",6),P("numberFilterComparatorChange",function(t){_(e);let o=l();return T(o.searchFilter.NumberFilterComparator,t)||(o.searchFilter.NumberFilterComparator=t),C(t)})("searchTypeChange",function(t){_(e);let o=l();return T(o.searchFilter.SearchType,t)||(o.searchFilter.SearchType=t),C(t)}),r()(),a(12,"div",3)(13,"label",7),m(14,"PageNumber"),r(),a(15,"input",8),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.PageNumber,t)||(o.searchFilter.PageNumber=t),C(t)}),r()(),a(16,"div",3)(17,"label",9),m(18,"Page Size"),r(),a(19,"input",10),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.RowCount,t)||(o.searchFilter.RowCount=t),C(t)}),r()(),a(20,"div")(21,"label",11),m(22,"Quantity From - To"),r(),a(23,"div",12)(24,"input",13),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityFrom,t)||(o.searchFilter.QuantityFrom=t),C(t)}),r(),m(25," - "),a(26,"input",14),P("ngModelChange",function(t){_(e);let o=l();return T(o.searchFilter.QuantityTo,t)||(o.searchFilter.QuantityTo=t),C(t)}),r()()()(),a(27,"content")(28,"div",15)(29,"div",16)(30,"div",17),u(31,dt,3,0,"div",18),a(32,"table",19),x("matSortChange",function(t){_(e);let o=l();return C(o.onSortVariant(t))}),a(33,"thead",20)(34,"tr")(35,"th",21),m(36," Product "),v(37,"br"),a(38,"mat-slide-toggle",22),x("toggleChange",function(){_(e);let t=l();return t.showDifferenceStock=!t.showDifferenceStock,C(t.onShowDifferenceStock())}),a(39,"small",11),m(40,"FILTER DIFFERENT INVENTORY"),r()()(),a(41,"th",23),m(42,"Variant"),r(),a(43,"th",24),m(44,"SKU"),r(),B(45,mt,3,3,"ng-container",25),a(46,"th",26),m(47," POS "),r(),a(48,"th",27)(49,"div",28),x("click",function(){_(e);let t=l();return C(t.openModalFilter())}),v(50,"img",29),a(51,"span",30),m(52),f(53,"stringLimit"),r()()(),u(54,_t,2,0,"th",31),a(55,"th",32),m(56,"Last Sync"),r()()(),q(57,Lt,3,0,"tbody",null,G),f(59,"async"),r(),a(60,"infinite-paginator",33),f(61,"async"),x("onNextPage",function(){_(e);let t=l();return C(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){_(e);let t=l();return C(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){_(e);let t=l();return C(t.infinitePagination.getRowCount(t.searchFilter))}),r()()()()()()}if(i&2){let e,n,t,o,p=c,d=l();g("hideSearchBox",!1)("searchBoxPlaceHolder",d.searchPlaceholder()),s(3),h((e=b(4,24,d.products$))?3:-1,e),s(6),g("ngModel",(d.searchFilter==null?null:d.searchFilter.LocationID)||(d.searchFilter==null?null:d.searchFilter.ChannelID)),s(2),g("numberFilterComparatorOptions",p==null||p.Options==null?null:p.Options.SearchComparatorTypeOptions),F("numberFilterComparator",d.searchFilter.NumberFilterComparator),g("searchTypeOptions",p==null||p.Options==null?null:p.Options.SearchSKUOnlyOrSKUNameOptions),F("searchType",d.searchFilter.SearchType),s(4),F("ngModel",d.searchFilter.PageNumber),s(4),F("ngModel",d.searchFilter.RowCount),s(5),F("ngModel",d.searchFilter.QuantityFrom),s(2),F("ngModel",d.searchFilter.QuantityTo),s(5),h((d.searchFilter==null?null:d.searchFilter.filterModel)==3?31:-1),s(14),g("ngxPermissionsOnly",D(33,te,d.inventoryUpdateRole)),s(4),g("matTooltip",((n=d.channelIdentity())==null||n.label==null?null:n.label.length)>13?(n=d.channelIdentity())==null?null:n.label:""),s(),g("src",(t=d.channelIdentity())==null?null:t.img,N),s(2),I(" ",V(53,26,(o=d.channelIdentity())==null?null:o.label,13)," "),s(2),h(d.isShowReservedColumn?54:-1),s(3),K(b(59,29,d.products$)),s(3),g("totalData",d.infinitePagination.totalData())("hideCount",d.infinitePagination.hideCount())("rowCount",b(61,31,d.infinitePagination.totalRowCount$))("pageNumber",d.infinitePagination.pageNumber())("disableNextButton",d.infinitePagination.disableNextButton())("goToLastPage",d.infinitePagination.isLastPage())}}var Bn=(()=>{let c=class c{constructor(){this.http=S(Se),this.toastr=S(fe),this.dialog=S(Me),this.productService=S(Ae),this.authService=S(be),this.biggerPictureService=S(Ue),this.mainPanelService=S(ke),this.placeholderService=S(We),this.infinitePagination=S(Y),this.ngxPermissionsService=S(ye),this.updateResHandling=S(ee),this.inventoryService=S(E),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=y.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=y.GuidEMpty,this.selectedChannel=M(null),this.channelIdentity=M({img:null,label:null}),this.inventoryUpdateRole=Z.InventoryUpdate,this.hasInventoryEdit=M(!0),this.searchPlaceholder=M("Search ...")}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(z(n=>{this.checkShowReservedColumn(n)}),k(n=>(n=this.calculateAvailableStock(n),n)),R(1)),this.products$=this.sourceObs$}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(R(1),z(n=>{this.searchFilter={RowCount:n.Filter?.PageSize,filterModel:1,PageNumber:1,ChannelID:n.Filter?.ChannelID,LocationID:n.Filter?.LocationID,NumberFilterComparator:n.Filter?.NumberFilterComparator,SearchType:n.Filter?.SearchType},this.initReloadData(),this.initSearchPlaceholder(),this.showToastrMarketplaceInactive(!n.Filter.IsMarketplaceAppActive)}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter.SearchType,this.searchFilter.NumberFilterComparator))}initRoles(){this.ngxPermissionsService.hasPermission(Z.InventoryUpdate).then(n=>this.hasInventoryEdit.set(n))}calculateAvailableStock(n){return n.map(o=>(o.totalAvailable=o.Variants.reduce((p,d)=>(p+=d.I?.Available||0,p),0),o))}checkShowReservedColumn(n){let t=0,o;n.forEach(p=>{o=p.Variants.find(d=>y.IsNotEmpty(d?.Channel[0]?.InventoryReserved)),o&&(t+=1)}),this.isShowReservedColumn=t>0}onChannelChange(n){let t=Object.assign({},n);this.selectedChannel.set(t),y.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let n=Object.assign({},this.selectedChannel());y.IsNotEmpty(n.parent)?(this.searchFilter.LocationID=n.id,this.searchFilter.ChannelID=n?.parent?.id,n.label=n?.parent?.label+" - "+n?.label,n.img=y.getChannelLogoByTypeId(n?.parent?.typeid)):(this.searchFilter.LocationID=null,n.img=y.getChannelLogoByTypeId(n?.typeid),this.searchFilter.ChannelID=n?.id,this.selectedChannel.set(n)),this.channelIdentity.update(()=>({img:n.img,label:n.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(n){n&&this.toastr.warning(`Automatic inventory sync disabled.
2
2
  Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(n){this.searchFilter.text=n,this.setChannelFilter(),this.initReloadData(),this.initSearchPlaceholder()}openModalFilter(){this.mainPanelService.openModalFilter()}onOpenDialogUpdateStockInfo(n){let t=this.productService.selectedVariantProduct(n);this.dialog.open(Ze,{data:{channelId:t[0]?.Channel[0]?.ChannelID,selectedProducts:t}}).afterClosed().pipe(j(o=>o===!0)).subscribe(()=>{this.updateStock(t)})}updateStock(n){if(n.length>0){let t=this.searchFilter.LocationID,o=n.map(d=>ne({ChannelItemID:d?.Channel[0]?.ChannelItemID,ChannelVariationID:d?.Channel[0]?.ChannelVariationID,Inventory:d.Inventory},y.IsNotEmpty(t)&&{LocationID:t})),p={ListChannelID:[this.searchFilter.ChannelID],List:o};this.http.post(X.UpdateInventoryChannel,p).subscribe(d=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(d)})}}handlingUpdateStock(n){if(n[0]?.Response){let t=n[0]?.Response?.Fail_list,o=n[0]?.Response?.Success_list;this.updateResHandling.responseHandling(o,t,"Stock")}else this.toastr.error(n[0]?.Exception,"Error")}refreshInventory(n,t,o,p){let d={ChannelItemID:n,ChannelVariationID:t,ChannelID:o,VariantID:p};this.http.post("/api/Inventory/RefreshInventoryChannel",d).subscribe(Bt=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(n){n.Variants=n.Variants.map(t=>(t.Inventory>=0&&(t.selected=n.selected),t))}onCheckboxStateChange(n){n=n.map(t=>(t.Variants=t.Variants.map(o=>(o.selected=this.checkboxState,o)),t))}openTableDialog(n,t){this.hasInventoryEdit()&&this.dialog.open(ze,{data:{Name:n.Name,Variant:t,ChannelID:t?.Channel[0]?.ChannelID,Table:"inventory",ChannelItemID:n.ChannelItemID}}).afterClosed().pipe(j(p=>y.IsNotEmpty(p))).subscribe(p=>{this.updateItemAfterDialog(p)})}updateItemAfterDialog(n){let t=n.InventoryMultiwarehouse[0]?.LocationID,o={ID:n.ChannelID,ChannelItemID:n.ChannelItemID,ChannelVariantID:n.ChannelVariationID,NewQuantity:n?.Inventory,VariantID:n.ID,SKU:n?.Sku,LocationID:t};this.http.post(X.UpdateUpdateQuantityByItem,o).subscribe(p=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([p])})}onScanInventory(n){let t=this.productService.selectedVariantProduct(n);this.inventoryService.refreshInventory(t).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(je,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=J.DIFFERENCE:this.searchFilter.filterModel=J.ALL,this.initReloadData()}onZoomImage(n,t){this.biggerPictureService.openBiggerPicture(n,t)}onSortVariant(n){if(n.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(k(t=>t.map(o=>(o.Variants=o.Variants.sort((p,d)=>y.compare(p.I?.Available,d.I?.Available,n.direction==="asc")),o)).sort((o,p)=>y.compare(o.totalAvailable,p.totalAvailable,n.direction==="asc"))))}};c.\u0275fac=function(t){return new(t||c)},c.\u0275cmp=O({type:c,selectors:[["app-single-channel-comparison"]],features:[W([Y,E,ee])],decls:2,vars:3,consts:[["headerTitle","Inventory Comparison","textButton","Search",3,"hideSearchBox","searchBoxPlaceHolder"],["headerTitle","Inventory Comparison","textButton","Search",3,"onSubmit","hideSearchBox","searchBoxPlaceHolder"],[1,"d-flex"],[1,"mb-5"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],[4,"ngxPermissionsOnly"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],[1,"ms-3"],[1,"text-end",3,"ngClass"],[1,"text-center"],["matTooltipShowDelay","500",3,"matTooltip"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["title","Stock Available"],["title","Inventory below minimum inventory"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[3,"class"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[3,"click"],[1,"text-danger"]],template:function(t,o){if(t&1&&(u(0,Ot,62,35,"mainpanel",0),f(1,"async")),t&2){let p;h((p=b(1,1,o.loader$))?0:-1,p)}},dependencies:[Q,ce,Ne,Re,Ie,xe,Ce,ge,_e,ue,he,qe,we,ve,Qe,He,Te,Fe,Be,Le,Oe,Ke,$e,$,de,H,Ge],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]});let i=c;return i})();export{Bn as SingleChannelComparisonComponent};
@@ -1 +1 @@
1
- import{a as x}from"./chunk-PMVDQ2OP.js";import{a as O}from"./chunk-E66QUDQF.js";import{a as p}from"./chunk-ADKAX3OO.js";import"./chunk-4VNQYYVV.js";import{b}from"./chunk-FKGKMEDE.js";import"./chunk-ZKIO2ZQ6.js";import{a as m}from"./chunk-UCEZJNIL.js";import{a as P}from"./chunk-36U7D4LI.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import{c as C}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{e as f}from"./chunk-6KWG6O5L.js";import{a as h}from"./chunk-PDCVMSLL.js";import"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{n as M}from"./chunk-EDEZ3JLR.js";import{A as g}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{w as u}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as s,I as a,m as i}from"./chunk-LNJUGHOX.js";import{Gb as l,Hb as r,jc as c,na as e}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=l({type:t,selectors:[["app-products"]],standalone:!1,decls:1,vars:0,template:function(n,N){n&1&&c(0,"router-outlet")},dependencies:[s],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=t;return o})();var v=[{path:"",component:w,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-QCV5XC3U.js").then(o=>o.StatusModule),canActivate:[m,p]},{path:"download",loadChildren:()=>import("./chunk-Y77WYZ6Y.js").then(o=>o.DownloadModule),canActivate:[m,p]},{path:"upload",loadComponent:()=>import("./chunk-UBTALPOC.js").then(o=>o.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[m,p]}]}],y=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,a.forChild(v)]});let o=t;return o})();var Y=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,a,y,u,M,f,b,h,C,P,O,x]});let o=t;return o})();export{Y as ProductModule};
1
+ import{a as x}from"./chunk-PMVDQ2OP.js";import{a as O}from"./chunk-E66QUDQF.js";import{a as p}from"./chunk-5NFLGFHD.js";import"./chunk-4VNQYYVV.js";import{b}from"./chunk-FKGKMEDE.js";import"./chunk-ZKIO2ZQ6.js";import{a as m}from"./chunk-BUY4AAHK.js";import{a as P}from"./chunk-36U7D4LI.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import{c as C}from"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{e as f}from"./chunk-6KWG6O5L.js";import{a as h}from"./chunk-PDCVMSLL.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{n as M}from"./chunk-EDEZ3JLR.js";import{A as g}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{w as u}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{E as s,I as a,m as i}from"./chunk-LNJUGHOX.js";import{Gb as l,Hb as r,jc as c,na as e}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";var w=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275cmp=l({type:t,selectors:[["app-products"]],standalone:!1,decls:1,vars:0,template:function(n,N){n&1&&c(0,"router-outlet")},dependencies:[s],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media (min-width: 1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}"]});let o=t;return o})();var v=[{path:"",component:w,children:[{path:"",redirectTo:"status",pathMatch:"full"},{path:"status",loadChildren:()=>import("./chunk-HUZZJ34K.js").then(o=>o.StatusModule),canActivate:[m,p]},{path:"download",loadChildren:()=>import("./chunk-5QQCKNH2.js").then(o=>o.DownloadModule),canActivate:[m,p]},{path:"upload",loadComponent:()=>import("./chunk-KOQGQF2L.js").then(o=>o.ProductUploadComponent),data:{title:"Upload Product"},canActivate:[m,p]}]}],y=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,a.forChild(v)]});let o=t;return o})();var Y=(()=>{let t=class t{};t.\u0275fac=function(n){return new(n||t)},t.\u0275mod=r({type:t}),t.\u0275inj=e({imports:[i,g,a,y,u,M,f,b,h,C,P,O,x]});let o=t;return o})();export{Y as ProductModule};
@@ -0,0 +1 @@
1
+ import{a as xe,b as Te}from"./chunk-L76NLJD7.js";import{a as Ce,b as Se,c as ye}from"./chunk-ILW6ZFFV.js";import{a as ve}from"./chunk-BTSGHYIF.js";import{a as N}from"./chunk-WFXKYFBX.js";import{a as be}from"./chunk-S7CKRTJV.js";import"./chunk-EYT2YJGK.js";import"./chunk-RNWHARPK.js";import{a as fe}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-6KWG6O5L.js";import{a as ge}from"./chunk-B5AYTAZQ.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as he}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import{b as me}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{b as de}from"./chunk-JBEKD57G.js";import{m as ue,n as _e}from"./chunk-EDEZ3JLR.js";import{A as se,b as ne,c as oe,h as re,m as le,o as ae}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as pe,w as ce}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as $,j as ee,l as te,m as ie}from"./chunk-LNJUGHOX.js";import{$b as v,$c as X,Bc as H,Cc as Q,Dc as j,Gb as D,Ha as P,Lc as q,Mc as d,Nc as w,Oc as M,Qc as C,Rc as S,Sc as y,Tc as U,Uc as G,Vc as F,Z as I,Zc as J,_c as K,bc as x,cc as B,ea as k,ec as A,fc as z,gc as f,hc as t,hd as V,ic as n,id as O,jc as h,jd as Y,lb as W,nb as a,od as Z,qc as T,ra as E,vc as g,xa as p,xc as u,ya as c}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as R,b as L}from"./chunk-66YHNWRR.js";var we=["contextMenu"],Me=()=>[],Ve=l=>({"td-cell-hover":l});function Re(l,m){if(l&1){let e=T();t(0,"button",20),g("click",function(){p(e);let r=u();return c(r.setMultipleFulfillment())}),d(1," Set Fulfillment "),n()}}function Ee(l,m){if(l&1&&h(0,"variants-dropdown",38),l&2){let e=u().$implicit;f("variants",e==null?null:e.Variants)}}function Oe(l,m){if(l&1&&h(0,"variant-with-image",39),l&2){let e=u().$implicit;f("variant",e==null?null:e.Variants[0])}}function Pe(l,m){if(l&1&&(t(0,"span"),d(1),n()),l&2){let e=u().$implicit;a(),M("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Fe(l,m){if(l&1){let e=T();t(0,"div",41)(1,"button",45),g("click",function(){p(e);let r=u().$implicit,o=u(2);return c(o.refreshShippingAndRefNumber(r))}),h(2,"i",46),n()()}}function Ne(l,m){if(l&1){let e=T();t(0,"button",47),g("click",function(){p(e);let r=u().$implicit,o=u(2);return c(o.onSetFulfillment(r))}),d(1," Set Fulfillment "),n()}}function Le(l,m){if(l&1){let e=T();t(0,"tr")(1,"td")(2,"input",30),y("ngModelChange",function(r){let o=p(e).$implicit;return S(o.selected,r)||(o.selected=r),c(r)}),g("ngModelChange",function(){p(e);let r=u(2),o=F(0);return c(r.onSelectOrder(o))}),n()(),t(3,"td")(4,"div",31),h(5,"img",32),V(6,"channelImage"),t(7,"div",33)(8,"div"),d(9),n(),t(10,"small",34)(11,"span"),d(12),n()()()()(),t(13,"td")(14,"div",35)(15,"div"),h(16,"order-link",36),n(),t(17,"small"),d(18),V(19,"date"),n(),h(20,"br"),t(21,"small"),h(22,"i",37),d(23),n()()(),t(24,"td"),v(25,Ee,1,1,"variants-dropdown",38)(26,Oe,1,1,"variant-with-image",39),n(),t(27,"td",40),d(28),V(29,"number"),n(),t(30,"td",41)(31,"div",42)(32,"div",35)(33,"div",43)(34,"span"),d(35),n(),v(36,Pe,2,1,"span"),n(),t(37,"small"),d(38),n()(),v(39,Fe,3,0,"div",41),n()(),t(40,"td",41),v(41,Ne,2,0,"button",44),n()()}if(l&2){let e=m.$implicit,i=u(2);a(2),C("ngModel",e.selected),f("disabled",i.selectedChannelType()!=null&&i.selectedChannelType()!=e.MarketType),a(3),f("src",O(6,18,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(4),w(e.Outlet),a(3),w(e.ChannelName),a(4),f("order",e),a(2),M(" ",Y(19,20,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(5),M(" ",e.Customer," "),a(),q(X(25,Ve,(e.Variants==null?null:e.Variants.length)>1)),a(),x((e.Variants==null?null:e.Variants.length)>1?25:26),a(3),w(O(29,23,e.Amount)),a(7),w(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),a(2),M(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),a(),x(!(e.LogisticService!=null&&e.LogisticService.Name)||!e.ReferenceNumber?39:-1),a(2),x((e==null?null:e.MarketType)!=i.channelType.WooCommerce?41:-1)}}function Ie(l,m){if(l&1){let e=T();t(0,"div",17)(1,"table",21)(2,"thead",22)(3,"tr",23),h(4,"th",24),t(5,"th",25),d(6,"Outlet"),n(),t(7,"th",25),d(8,"Number"),n(),t(9,"th"),d(10,"Items"),n(),t(11,"th",26),d(12,"Amount"),n(),t(13,"th",27),d(14,"Shipping"),n(),h(15,"th",28),n()(),t(16,"tbody"),A(17,Le,42,27,"tr",null,B),n()(),t(19,"app-custom-paginator",29),g("next",function(){p(e);let r=u();return c(r.initReadyToShip())})("previous",function(){p(e);let r=u();return c(r.initReadyToShip())}),n()()}if(l&2){let e=u(),i=F(0);a(17),z(i),a(2),f("filter",e.filter())("totaldata",i==null?null:i.length)}}function ke(l,m){l&1&&(t(0,"div",18),h(1,"app-empty-state"),n())}var mt=(()=>{let m=class m{constructor(){this.toastr=E(me),this.orderService=E(N),this.fulfillmentService=E(xe),this.channelType=de,this.selectedOrders=P([]),this.selectedChannelType=Z(()=>{let i=null;return this.selectedOrders().length>0&&(i=this.selectedOrders()[0].MarketType),i}),this.filter=P({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:i=>{this.initFromDate(i)},error:i=>{console.error("Error fetching default date:",i),this.initFromDate(null)}})}initFromDate(i){this.filter.update(r=>L(R({},r),{From:i})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(k(()=>{this.selectedOrders.set([])}),I(1))}onFilterChange(i){this.filter.update(r=>R(R({},r),i))}onSetFulfillment(i){this.fulfillmentService.setFulfillmentOrder(i).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(i){this.orderService.refreshShippingCourier(i.ShopID,i.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(i){let r=i.filter(o=>o.selected);this.selectedOrders.set(r)}onMouseHover(i,r){(!r.LogisticService?.Name||!r.ReferenceNumber)&&this.contextMenuEl.show(i,r)}onSelectContextItem(i){i.item?.id==="refresh"&&this.refreshShippingAndRefNumber(i.data)}};m.\u0275fac=function(r){return new(r||m)},m.\u0275cmp=D({type:m,selectors:[["app-ready-to-ship"]],viewQuery:function(r,o){if(r&1&&H(we,5),r&2){let _;Q(_=j())&&(o.contextMenuEl=_.first)}},features:[J([N])],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","80px"],[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"],[1,"fa-solid","fa-user"],[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(r,o){if(r&1){let _=T();U(0),V(1,"async"),t(2,"mainpanel",1),g("onSubmit",function(){return p(_),c(o.initReadyToShip())}),y("textChange",function(s){return p(_),S(o.filter().Number,s)||(o.filter().Number=s),c(s)}),t(3,"actions"),v(4,Re,2,0,"button",2),t(5,"a",3),h(6,"i",4),t(7,"span"),d(8,"Order Fulfillment Display"),n()()(),t(9,"filters")(10,"div")(11,"label",5),d(12,"Channel"),n(),t(13,"app-channel-options-v2",6),y("ngModelChange",function(s){return p(_),S(o.filter().ListChannelID,s)||(o.filter().ListChannelID=s),c(s)}),n()(),t(14,"div",7)(15,"label",5),d(16,"From/To"),n(),t(17,"div",8)(18,"datepicker",9),y("dateChange",function(s){return p(_),S(o.filter().From,s)||(o.filter().From=s),c(s)}),n()(),t(19,"div")(20,"datepicker",10),y("dateChange",function(s){return p(_),S(o.filter().To,s)||(o.filter().To=s),c(s)}),n()()(),t(21,"div",7)(22,"label",11),d(23,"Page Number"),n(),t(24,"input",12),y("ngModelChange",function(s){return p(_),S(o.filter().PageNumber,s)||(o.filter().PageNumber=s),c(s)}),n()(),t(25,"div",7)(26,"label",11),d(27,"Page Size"),n(),t(28,"input",13),y("ngModelChange",function(s){return p(_),S(o.filter().PageSize,s)||(o.filter().PageSize=s),c(s)}),n()()(),t(29,"content")(30,"div",14)(31,"div",15)(32,"div",16),v(33,Ie,20,2,"div",17)(34,ke,2,0,"div",18),n()()()()(),t(35,"app-context-menu",19,0),g("onSelectItem",function(s){return p(_),c(o.onSelectContextItem(s))}),n()}if(r&2){let _=G(O(1,10,o.readyToShip$)||K(13,Me));a(2),C("text",o.filter().Number),a(2),x(o.selectedOrders().length>0?4:-1),a(9),f("multiple",!0),C("ngModel",o.filter().ListChannelID),a(5),C("date",o.filter().From),a(2),C("date",o.filter().To),a(4),C("ngModel",o.filter().PageNumber),a(4),C("ngModel",o.filter().PageSize),a(5),x(_.length>0?33:34),a(2),f("items",o.contextMenuItems)}},dependencies:[ie,_e,ue,fe,he,se,oe,ae,ne,re,le,Se,ye,be,ve,ce,pe,Te,ge,$,te,ee,Ce],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}"]});let l=m;return l})();export{mt as ReadyToShipComponent};
@@ -0,0 +1 @@
1
+ import{b as de,c as pe}from"./chunk-ILW6ZFFV.js";import{a as ce}from"./chunk-BTSGHYIF.js";import{a as T}from"./chunk-WFXKYFBX.js";import{a as se}from"./chunk-S7CKRTJV.js";import{a as ae}from"./chunk-7JQEF4XX.js";import"./chunk-AFIF6VRM.js";import"./chunk-ZW2TMVZP.js";import"./chunk-ZTHO6JJM.js";import"./chunk-SHUYFOQI.js";import"./chunk-FCEXPGTK.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import{a as me}from"./chunk-B5AYTAZQ.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as le}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import"./chunk-AGBJEXIM.js";import"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as re,n as oe}from"./chunk-EDEZ3JLR.js";import{A as te,c as Y,h as Z,m as $,o as ee}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import{v as ie,w as ne}from"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as K,j as Q,l as U,m as X}from"./chunk-LNJUGHOX.js";import{$b as y,$c as G,Gb as W,Ha as O,Lc as k,Mc as a,Nc as E,Oc as w,Qc as g,Rc as C,Sc as h,Tc as z,Uc as R,Vc as H,Z as F,Zc as j,_c as q,bc as b,cc as D,ec as I,fc as B,gc as v,hc as t,hd as x,ic as i,id as A,jc as _,jd as J,nb as l,qc as V,ra as N,vc as M,xa as c,xc as f,ya as u}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ue=()=>[],_e=r=>({"td-cell-hover":r});function fe(r,m){if(r&1&&_(0,"variants-dropdown",26),r&2){let e=f().$implicit;v("variants",e==null?null:e.Variants)}}function ge(r,m){if(r&1&&_(0,"variant-with-image",27),r&2){let e=f().$implicit;v("variant",e==null?null:e.Variants[0])}}function Ce(r,m){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=f().$implicit;l(),w("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function he(r,m){if(r&1&&(t(0,"tr")(1,"td")(2,"div",23)(3,"div"),_(4,"order-link",24),i(),t(5,"small"),a(6),x(7,"date"),i(),_(8,"br"),t(9,"small"),_(10,"i",25),a(11),i()()(),t(12,"td"),y(13,fe,1,1,"variants-dropdown",26)(14,ge,1,1,"variant-with-image",27),i(),t(15,"td"),a(16),x(17,"number"),i(),t(18,"td")(19,"div",23)(20,"div",28)(21,"span"),a(22),i(),y(23,Ce,2,1,"span"),i(),t(24,"small"),a(25),i()()()()),r&2){let e=m.$implicit;l(4),v("order",e),l(2),w(" ",J(7,10,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),w(" ",e.Customer," "),l(),k(G(15,_e,(e.Variants==null?null:e.Variants.length)>1)),l(),b((e.Variants==null?null:e.Variants.length)>1?13:14),l(3),E(A(17,13,e.Amount)),l(6),E(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),b(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?23:-1),l(2),w(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Se(r,m){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Number"),i(),t(6,"th"),a(7,"Items"),i(),t(8,"th",21),a(9,"Amount"),i(),t(10,"th",21),a(11,"Shipping"),i()()(),t(12,"tbody"),I(13,he,26,17,"tr",null,D),i()(),t(15,"app-custom-paginator",22),M("next",function(){c(e);let p=f();return u(p.initAllOrders())})("previous",function(){c(e);let p=f();return u(p.initAllOrders())}),i()()}if(r&2){let e=f(),d=H(0);l(13),B(d),l(2),v("filter",e.filter())("totaldata",d==null?null:d.length)}}function ve(r,m){r&1&&(t(0,"div",16),_(1,"app-empty-state"),i())}var qe=(()=>{let m=class m{constructor(){this.orderService=N(T),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:d=>{this.initFromDate(d)},error:d=>{console.error("Error fetching default date:",d),this.initFromDate(null)}})}initFromDate(d){this.filter.update(p=>L(P({},p),{From:d})),this.initAllOrders()}initAllOrders(){this.allOrders$=this.orderService.getAllOrders(this.filter()).pipe(F(1))}};m.\u0275fac=function(p){return new(p||m)},m.\u0275cmp=W({type:m,selectors:[["app-all"]],features:[j([T])],decls:34,vars:12,consts:[["headerTitle","Completed","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-solid","fa-clipboard-list","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","250px"],[2,"width","150px"],["rowCountApi","/api/orders/allcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"d-flex","align-items-end","gap-2"]],template:function(p,o){if(p&1){let s=V();z(0),x(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return c(s),u(o.initAllOrders())}),h("textChange",function(n){return c(s),C(o.filter().Number,n)||(o.filter().Number=n),u(n)}),t(3,"actions")(4,"a",1),_(5,"i",2),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),i(),t(12,"app-channel-options-v2",4),h("ngModelChange",function(n){return c(s),C(o.filter().ListChannelID,n)||(o.filter().ListChannelID=n),u(n)}),i()(),t(13,"div",5)(14,"label",3),a(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),h("dateChange",function(n){return c(s),C(o.filter().From,n)||(o.filter().From=n),u(n)}),i()(),t(18,"div")(19,"datepicker",8),h("dateChange",function(n){return c(s),C(o.filter().To,n)||(o.filter().To=n),u(n)}),i()()(),t(20,"div",5)(21,"label",9),a(22,"Page Number"),i(),t(23,"input",10),h("ngModelChange",function(n){return c(s),C(o.filter().PageNumber,n)||(o.filter().PageNumber=n),u(n)}),i()(),t(24,"div",5)(25,"label",9),a(26,"Page Size"),i(),t(27,"input",11),h("ngModelChange",function(n){return c(s),C(o.filter().PageSize,n)||(o.filter().PageSize=n),u(n)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,Se,16,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=R(A(1,8,o.allOrders$)||q(11,ue));l(2),g("text",o.filter().Number),l(10),v("multiple",!0),g("ngModel",o.filter().ListChannelID),l(5),g("date",o.filter().From),l(2),g("date",o.filter().To),l(4),g("ngModel",o.filter().PageNumber),l(4),g("ngModel",o.filter().PageSize),l(5),b((s==null?null:s.length)>0?32:33)}},dependencies:[X,oe,re,ae,le,te,Y,ee,Z,$,de,pe,se,ne,ie,ce,me,K,U,Q],encapsulation:2});let r=m;return r})();export{qe as AllComponent};
@@ -1 +1 @@
1
- import{a as he}from"./chunk-DHPNXR6E.js";import{a as le}from"./chunk-6XDT56RT.js";import"./chunk-SHUYFOQI.js";import{a as pe}from"./chunk-XK4RP5MQ.js";import{a as se}from"./chunk-GG3MDS4C.js";import{c as ce,d as D,e as V}from"./chunk-S5R6MCNP.js";import{a as ie,b as ne,c as re,d as ae}from"./chunk-T7HRAMHR.js";import"./chunk-DAUML5UD.js";import"./chunk-DXYMG6QK.js";import"./chunk-O2YF5VGD.js";import"./chunk-63I3I3MX.js";import{a as te}from"./chunk-2IASUYTM.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-6OIMOM7S.js";import{e as X}from"./chunk-6KWG6O5L.js";import{a as oe}from"./chunk-5KYN6Y7M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as Q}from"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as N}from"./chunk-AGBJEXIM.js";import{b as j,e as z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as K}from"./chunk-JBEKD57G.js";import{d as Y,l as Z,m as $,n as ee}from"./chunk-EDEZ3JLR.js";import{A as J,c as G,h as k,m as x,o as q}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as U,l as W,m as H}from"./chunk-LNJUGHOX.js";import{$b as T,G as E,Gb as L,Ha as b,Mc as g,Qc as P,Rc as f,Sc as _,Tc as B,Z as O,Zc as A,bc as I,ea as R,gc as u,hc as a,hd as S,ic as p,id as y,jc as v,nb as h,qc as M,ra as c,vc as C,xa as l,xc as w,ya as s}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function de(m,d){if(m&1){let F=M();a(0,"button",16),C("click",function(){l(F);let n=w(),e=w();return s(e.onUpdateItems(n))}),v(1,"i",17),g(2," Update "),p()}}function me(m,d){if(m&1&&(a(0,"div"),T(1,de,3,0,"button",15),p()),m&2){let F=w();h(),I(F.productService.hasSelectionVariant(d)?1:-1)}}var Ke=(()=>{let d=class d{constructor(){this.http=c(z),this.toastr=c(j),this.dialog=c(Y),this.productService=c(te),this.authService=c(Q),this.placeholderService=c(re),this.infinitePagination=c(D),this.updateResHandling=c(V),this.mainPanelService=c(Z),this.channelOptions=b([]),this.searchFilter=b({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[],SearchType:ie.NameOnly,NumberFilterComparator:ne.Contains}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(O()),this.searchPlaceholder=b("Search ...")}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(R(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1,SearchType:t.Filter.SearchType,NumberFilterComparator:t.Filter.NumberFilterComparator},this.initSearchPlaceholder(),this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onShowDifferencePrice(t){let n=1;t&&(n=3),this.searchFilter.update(e=>(e.filterModel=n,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(n=>(n.text=t,n)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels(),this.initSearchPlaceholder()}onUpdateItems(t){let n=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(se,{data:{title:"Updating Price",selectedItems:e,channels:n},width:"400px"}).afterClosed().pipe(E(r=>K.IsNotEmpty(r))).subscribe(r=>{this.channelOptions.set(r),this.updatePrice(t)})}filterSelectedChannels(){let n=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(n)}updatePrice(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let e=n.map(i=>({ID:i.ID,Code:i.Code,Price:i.UnitPrice})),o={ListChannelID:this.getSelectedChannels().map(i=>i.ID),ListPrice:e};this.http.post(N.UpdateChannelPrice,o).subscribe(i=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(i),this.resetSelectedChannels()})}}updatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(N.UpdatePriceById,n).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let n=t?.Response?.success_list,e=t?.Response?.failure_list,r=this.getSelectedChannels();n?.length>0||e?.length>0?this.updateResHandling.responseHandling(n,e,"Price",r):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(le,{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(t=>(t.forEach(n=>{n.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=L({type:d,selectors:[["app-price-pos-channel"]],features:[A([D,W,he,V])],decls:34,vars:28,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit","searchBoxPlaceHolder"],[1,"d-flex"],[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"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[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","data-toggle","modal",1,"btn","btn-success","shadow","rounded"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(n,e){if(n&1){let r=M();B(0),S(1,"async"),a(2,"mainpanel",0),C("onSubmit",function(i){return l(r),s(e.onSearch(i))}),a(3,"actions")(4,"div",1),T(5,me,2,1,"div"),S(6,"async"),a(7,"button",2),C("click",function(){return l(r),s(e.openExportDialog())}),v(8,"i",3),a(9,"span"),g(10,"Export"),p()()()(),a(11,"filters")(12,"div",4)(13,"label",5),g(14,"Channel"),p(),a(15,"app-channel-options-v2",6),_("ngModelChange",function(i){return l(r),f(e.searchFilter().ListChannelID,i)||(e.searchFilter().ListChannelID=i),s(i)}),p()(),a(16,"div",4)(17,"filter-query-type",7),_("numberFilterComparatorChange",function(i){return l(r),f(e.searchFilter().NumberFilterComparator,i)||(e.searchFilter().NumberFilterComparator=i),s(i)})("searchTypeChange",function(i){return l(r),f(e.searchFilter().SearchType,i)||(e.searchFilter().SearchType=i),s(i)}),p()(),a(18,"div",4)(19,"label",8),g(20,"Page Number"),p(),a(21,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().PageNumber,i)||(e.searchFilter().PageNumber=i),s(i)}),p()(),a(22,"div")(23,"label",8),g(24,"Page Size"),p(),a(25,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().RowCount,i)||(e.searchFilter().RowCount=i),s(i)}),p()()(),a(26,"content")(27,"div",10)(28,"div",11)(29,"div",12)(30,"app-table",13),S(31,"async"),C("onToggle",function(i){return l(r),s(e.onShowDifferencePrice(i))})("onSubmit",function(i){return l(r),s(e.updatePriceByVariant(i))}),p(),a(32,"infinite-paginator",14),S(33,"async"),C("onNextPage",function(){return l(r),s(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return l(r),s(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return l(r),s(e.infinitePagination.getRowCount(e.searchFilter()))}),p()()()()()()}if(n&2){let r,o=y(1,20,e.loader$);h(2),u("searchBoxPlaceHolder",e.searchPlaceholder()),h(3),I((r=y(6,22,e.data$))?5:-1,r),h(10),u("multiple",!0),P("ngModel",e.searchFilter().ListChannelID),h(2),u("numberFilterComparatorOptions",o==null||o.Options==null?null:o.Options.SearchComparatorTypeOptions),P("numberFilterComparator",e.searchFilter().NumberFilterComparator),u("searchTypeOptions",o==null||o.Options==null?null:o.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",e.searchFilter().SearchType),h(4),P("ngModel",e.searchFilter().PageNumber),h(4),P("ngModel",e.searchFilter().RowCount),h(5),u("showProductToggle",!0)("data",y(31,24,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),h(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",y(33,26,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}},dependencies:[H,J,G,q,k,x,ce,ee,$,pe,oe,X,ae,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let m=d;return m})();export{Ke as PricePosChannelComponent};
1
+ import{a as he}from"./chunk-DHPNXR6E.js";import{a as le}from"./chunk-6XDT56RT.js";import"./chunk-SHUYFOQI.js";import{a as pe}from"./chunk-6FAJM27Z.js";import{a as se}from"./chunk-GG3MDS4C.js";import{c as ce,d as D,e as V}from"./chunk-S5R6MCNP.js";import{a as ie,b as ne,c as re,d as ae}from"./chunk-T7HRAMHR.js";import"./chunk-DAUML5UD.js";import"./chunk-DXYMG6QK.js";import"./chunk-O2YF5VGD.js";import"./chunk-63I3I3MX.js";import{a as te}from"./chunk-OR34CB7O.js";import"./chunk-QFSA7CU4.js";import"./chunk-OPXITNRF.js";import"./chunk-5BSPSA4O.js";import"./chunk-FULVA6QB.js";import"./chunk-HPINZVE4.js";import"./chunk-D2J64VUP.js";import"./chunk-6Q6L5NUD.js";import"./chunk-C7N6EI73.js";import"./chunk-GPHNPV7O.js";import"./chunk-3RK6DDJD.js";import"./chunk-4YCSITNV.js";import"./chunk-WHHW4IZT.js";import"./chunk-ZSUWHVKX.js";import"./chunk-N5AE5WMQ.js";import"./chunk-6OJQRHIZ.js";import"./chunk-4UPWMQJX.js";import{e as X}from"./chunk-6KWG6O5L.js";import{a as oe}from"./chunk-B5AYTAZQ.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import{i as Q}from"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as N}from"./chunk-AGBJEXIM.js";import{b as j,e as z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import{c as K}from"./chunk-JBEKD57G.js";import{d as Y,l as Z,m as $,n as ee}from"./chunk-EDEZ3JLR.js";import{A as J,c as G,h as k,m as x,o as q}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{i as U,l as W,m as H}from"./chunk-LNJUGHOX.js";import{$b as T,G as E,Gb as L,Ha as b,Mc as g,Qc as P,Rc as f,Sc as _,Tc as B,Z as O,Zc as A,bc as I,ea as R,gc as u,hc as a,hd as S,ic as p,id as y,jc as v,nb as h,qc as M,ra as c,vc as C,xa as l,xc as w,ya as s}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function de(m,d){if(m&1){let F=M();a(0,"button",16),C("click",function(){l(F);let n=w(),e=w();return s(e.onUpdateItems(n))}),v(1,"i",17),g(2," Update "),p()}}function me(m,d){if(m&1&&(a(0,"div"),T(1,de,3,0,"button",15),p()),m&2){let F=w();h(),I(F.productService.hasSelectionVariant(d)?1:-1)}}var Ke=(()=>{let d=class d{constructor(){this.http=c(z),this.toastr=c(j),this.dialog=c(Y),this.productService=c(te),this.authService=c(Q),this.placeholderService=c(re),this.infinitePagination=c(D),this.updateResHandling=c(V),this.mainPanelService=c(Z),this.channelOptions=b([]),this.searchFilter=b({PageNumber:1,RowCount:50,filterModel:1,text:"",ListChannelID:[],SearchType:ie.NameOnly,NumberFilterComparator:ne.Contains}),this.loaderAPI="PriceLoader/LoadMultiple",this.getDataAPI="Price/GetMultipleChannelComparison",this.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.data$=this.infinitePagination.data$.pipe(O()),this.searchPlaceholder=b("Search ...")}ngOnInit(){this.initPageLoader()}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.getDataAPI,this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.loader$=this.http.post(`/api/${this.loaderAPI}`).pipe(R(t=>{t.Filter={PageNumber:t.Filter.PageNumber,RowCount:t.Filter.RowCount,filterModel:1,SearchType:t.Filter.SearchType,NumberFilterComparator:t.Filter.NumberFilterComparator},this.initSearchPlaceholder(),this.searchFilter.set(t.Filter),this.mainPanelService.openModalFilter()}))}initSearchPlaceholder(){this.searchPlaceholder.set(this.placeholderService.generatePlaceholderBySearchType(this.searchFilter().SearchType,this.searchFilter().NumberFilterComparator))}onShowDifferencePrice(t){let n=1;t&&(n=3),this.searchFilter.update(e=>(e.filterModel=n,e)),this.infinitePagination.reloadPagination(this.searchFilter())}onSearch(t){this.searchFilter.update(n=>(n.text=t,n)),this.infinitePagination.reloadPagination(this.searchFilter()),this.filterSelectedChannels(),this.initSearchPlaceholder()}onUpdateItems(t){let n=JSON.parse(JSON.stringify(this.channelOptions())),e=this.productService.selectedVariantProduct(t);this.dialog.open(se,{data:{title:"Updating Price",selectedItems:e,channels:n},width:"400px"}).afterClosed().pipe(E(r=>K.IsNotEmpty(r))).subscribe(r=>{this.channelOptions.set(r),this.updatePrice(t)})}filterSelectedChannels(){let n=this.authService.getChannels().filter(e=>this.searchFilter().ListChannelID?.indexOf(e.ID)!==-1);this.channelOptions.set(n)}updatePrice(t){let n=this.productService.selectedVariantProduct(t);if(n.length>0){let e=n.map(i=>({ID:i.ID,Code:i.Code,Price:i.UnitPrice})),o={ListChannelID:this.getSelectedChannels().map(i=>i.ID),ListPrice:e};this.http.post(N.UpdateChannelPrice,o).subscribe(i=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(i),this.resetSelectedChannels()})}}updatePriceByVariant(t){let n={ID:t.ChannelID,ChannelItemID:t.ChannelItemID,ChannelVariantID:t.ChannelVariationID,Price:t.Price-0,VariantID:t.ID};this.http.post(N.UpdatePriceById,n).subscribe(e=>{this.infinitePagination.reloadPagination(this.searchFilter()),this.handlingUpdatePrice(e)})}handlingUpdatePrice(t){let n=t?.Response?.success_list,e=t?.Response?.failure_list,r=this.getSelectedChannels();n?.length>0||e?.length>0?this.updateResHandling.responseHandling(n,e,"Price",r):this.toastr.error(t[0]?.Exception,"Error")}openExportDialog(){this.dialog.open(le,{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(t=>(t.forEach(n=>{n.selected=!1}),t))}getSelectedChannels(){return this.channelOptions().filter(t=>t.selected)}};d.\u0275fac=function(n){return new(n||d)},d.\u0275cmp=L({type:d,selectors:[["app-price-pos-channel"]],features:[A([D,W,he,V])],decls:34,vars:28,consts:[["headerTitle","Price Comparison","textButton","Search",3,"onSubmit","searchBoxPlaceHolder"],[1,"d-flex"],[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"],[3,"numberFilterComparatorChange","searchTypeChange","numberFilterComparatorOptions","numberFilterComparator","searchTypeOptions","searchType"],[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","data-toggle","modal",1,"btn","btn-success","shadow","rounded"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"]],template:function(n,e){if(n&1){let r=M();B(0),S(1,"async"),a(2,"mainpanel",0),C("onSubmit",function(i){return l(r),s(e.onSearch(i))}),a(3,"actions")(4,"div",1),T(5,me,2,1,"div"),S(6,"async"),a(7,"button",2),C("click",function(){return l(r),s(e.openExportDialog())}),v(8,"i",3),a(9,"span"),g(10,"Export"),p()()()(),a(11,"filters")(12,"div",4)(13,"label",5),g(14,"Channel"),p(),a(15,"app-channel-options-v2",6),_("ngModelChange",function(i){return l(r),f(e.searchFilter().ListChannelID,i)||(e.searchFilter().ListChannelID=i),s(i)}),p()(),a(16,"div",4)(17,"filter-query-type",7),_("numberFilterComparatorChange",function(i){return l(r),f(e.searchFilter().NumberFilterComparator,i)||(e.searchFilter().NumberFilterComparator=i),s(i)})("searchTypeChange",function(i){return l(r),f(e.searchFilter().SearchType,i)||(e.searchFilter().SearchType=i),s(i)}),p()(),a(18,"div",4)(19,"label",8),g(20,"Page Number"),p(),a(21,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().PageNumber,i)||(e.searchFilter().PageNumber=i),s(i)}),p()(),a(22,"div")(23,"label",8),g(24,"Page Size"),p(),a(25,"input",9),_("ngModelChange",function(i){return l(r),f(e.searchFilter().RowCount,i)||(e.searchFilter().RowCount=i),s(i)}),p()()(),a(26,"content")(27,"div",10)(28,"div",11)(29,"div",12)(30,"app-table",13),S(31,"async"),C("onToggle",function(i){return l(r),s(e.onShowDifferencePrice(i))})("onSubmit",function(i){return l(r),s(e.updatePriceByVariant(i))}),p(),a(32,"infinite-paginator",14),S(33,"async"),C("onNextPage",function(){return l(r),s(e.infinitePagination.onNextPage(e.searchFilter()))})("onLastPage",function(){return l(r),s(e.infinitePagination.onLastPage(e.searchFilter()))})("onGetRowCount",function(){return l(r),s(e.infinitePagination.getRowCount(e.searchFilter()))}),p()()()()()()}if(n&2){let r,o=y(1,20,e.loader$);h(2),u("searchBoxPlaceHolder",e.searchPlaceholder()),h(3),I((r=y(6,22,e.data$))?5:-1,r),h(10),u("multiple",!0),P("ngModel",e.searchFilter().ListChannelID),h(2),u("numberFilterComparatorOptions",o==null||o.Options==null?null:o.Options.SearchComparatorTypeOptions),P("numberFilterComparator",e.searchFilter().NumberFilterComparator),u("searchTypeOptions",o==null||o.Options==null?null:o.Options.SearchSKUOnlyOrSKUNameOptions),P("searchType",e.searchFilter().SearchType),h(4),P("ngModel",e.searchFilter().PageNumber),h(4),P("ngModel",e.searchFilter().RowCount),h(5),u("showProductToggle",!0)("data",y(31,24,e.data$))("channel",e.channelOptions())("hiddenIPOSInventory",!1),h(2),u("totalData",e.infinitePagination.totalData())("hideCount",e.infinitePagination.hideCount())("rowCount",y(33,26,e.infinitePagination.totalRowCount$))("pageNumber",e.infinitePagination.pageNumber())("disableNextButton",e.infinitePagination.disableNextButton())("goToLastPage",e.infinitePagination.isLastPage())}},dependencies:[H,J,G,q,k,x,ce,ee,$,pe,oe,X,ae,U],styles:[".no-bullet[_ngcontent-%COMP%]{list-style-type:none}"]});let m=d;return m})();export{Ke as PricePosChannelComponent};
@@ -1 +1 @@
1
- import{a as Q}from"./chunk-6OJQRHIZ.js";import{a as q}from"./chunk-FHER4TFY.js";import{a as X}from"./chunk-5KYN6Y7M.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as J}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-I723PUUO.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as M}from"./chunk-AGBJEXIM.js";import{e as Z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as j,n as z}from"./chunk-EDEZ3JLR.js";import{A as H,h as $,m as G}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{G as O,I as W,i as N,l as R,m as F}from"./chunk-LNJUGHOX.js";import{$b as I,Gb as U,Ha as V,Mc as a,Nc as g,Qc as P,Rc as T,Sc as B,Tc as A,Z as b,bc as k,cc as E,ec as L,fc as K,gc as s,hc as e,hd as v,ic as t,id as y,jc as c,lb as D,nb as l,qc as w,ra as x,vc as h,xa as u,xc as S,ya as d}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function Y(r,p){if(r&1){let o=w();e(0,"img",21),h("click",function(m){u(o);let i=S().$implicit,n=S();return d(n.onZoomImage(m,i==null?null:i.ImageUrl))}),t()}if(r&2){let o=S().$implicit;s("src",o==null?null:o.ThumbnailUrl,D)}}function ee(r,p){r&1&&c(0,"img",17)}function te(r,p){if(r&1&&(e(0,"tr")(1,"td")(2,"div",15),I(3,Y,1,1,"img",16)(4,ee,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),v(16,"number"),t()()),r&2){let o=p.$implicit;l(3),k(o.ImageUrl?3:4),l(3),g(o.Name),l(2),g(o.SKU),l(3),s("typeId",o.TypeID),l(2),g(o.ChannelName),l(2),g(y(16,6,o.Count))}}var we=(()=>{let p=class p{constructor(){this.httpService=x(Z),this.biggerPictureService=x(Q),this.filter=V({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=M.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(M.GetMultiListingSKU,this.filter()).pipe(b(1))}onZoomImage(_,m){this.biggerPictureService.openBiggerPicture(_,m)}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=U({type:p,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(m,i){if(m&1){let n=w();A(0),v(1,"async"),e(2,"mainpanel",0),h("onSubmit",function(){return u(n),d(i.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),B("ngModelChange",function(C){return u(n),T(i.filter().ListChannelID,C)||(i.filter().ListChannelID=C),d(C)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),L(30,te,17,8,"tr",null,E),t()(),e(32,"app-custom-paginator",14),h("next",function(){return u(n),d(i.initMultipleListingSKU())})("previous",function(){return u(n),d(i.initMultipleListingSKU())}),t()()()()()()}if(m&2){let n=y(1,6,i.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),P("ngModel",i.filter().ListChannelID),l(18),K(n==null?null:n.Data),l(2),s("filter",i.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",i.rowCountApi)}},dependencies:[F,z,j,J,W,O,q,X,H,$,G,N,R],encapsulation:2});let r=p;return r})();export{we as DuplicateSkuV2Component};
1
+ import{a as Q}from"./chunk-6OJQRHIZ.js";import{a as q}from"./chunk-FHER4TFY.js";import{a as X}from"./chunk-B5AYTAZQ.js";import"./chunk-3JRUKSV3.js";import"./chunk-SJ5MC42H.js";import"./chunk-4RLWHMI6.js";import"./chunk-NWB7EVME.js";import{a as J}from"./chunk-PDCVMSLL.js";import"./chunk-AFDI4TD4.js";import"./chunk-4RG5YR7N.js";import"./chunk-5MV3UFJQ.js";import"./chunk-E6AMKEQR.js";import"./chunk-IGKMJFKP.js";import"./chunk-ITGVXYDV.js";import"./chunk-HK5FXZE4.js";import"./chunk-KJE5GRQ4.js";import"./chunk-4ILDFTIG.js";import"./chunk-A6QXXKPR.js";import"./chunk-HF4T6G54.js";import"./chunk-QXRG5XYP.js";import"./chunk-RXLMJGUY.js";import"./chunk-M4ZE35XK.js";import"./chunk-L7WZ6U4T.js";import"./chunk-LOWGZOML.js";import"./chunk-5PMKN6PM.js";import{a as M}from"./chunk-AGBJEXIM.js";import{e as Z}from"./chunk-OXWPYJNB.js";import"./chunk-XBIHN6D3.js";import"./chunk-JBEKD57G.js";import{m as j,n as z}from"./chunk-EDEZ3JLR.js";import{A as H,h as $,m as G}from"./chunk-L3W6SG2T.js";import"./chunk-YTHY4IFS.js";import"./chunk-ZETUYNFJ.js";import"./chunk-STYL7ETF.js";import"./chunk-XLIPGDSC.js";import{G as O,I as W,i as N,l as R,m as F}from"./chunk-LNJUGHOX.js";import{$b as I,Gb as U,Ha as V,Mc as a,Nc as g,Qc as P,Rc as T,Sc as B,Tc as A,Z as b,bc as k,cc as E,ec as L,fc as K,gc as s,hc as e,hd as v,ic as t,id as y,jc as c,lb as D,nb as l,qc as w,ra as x,vc as h,xa as u,xc as S,ya as d}from"./chunk-ZYJ6LAJ3.js";import"./chunk-WFMAM73Y.js";import"./chunk-66YHNWRR.js";function Y(r,p){if(r&1){let o=w();e(0,"img",21),h("click",function(m){u(o);let i=S().$implicit,n=S();return d(n.onZoomImage(m,i==null?null:i.ImageUrl))}),t()}if(r&2){let o=S().$implicit;s("src",o==null?null:o.ThumbnailUrl,D)}}function ee(r,p){r&1&&c(0,"img",17)}function te(r,p){if(r&1&&(e(0,"tr")(1,"td")(2,"div",15),I(3,Y,1,1,"img",16)(4,ee,1,0,"img",17),t()(),e(5,"td"),a(6),t(),e(7,"td"),a(8),t(),e(9,"td")(10,"div",18),c(11,"app-channel-logo",19),e(12,"span"),a(13),t()()(),e(14,"td",20),a(15),v(16,"number"),t()()),r&2){let o=p.$implicit;l(3),k(o.ImageUrl?3:4),l(3),g(o.Name),l(2),g(o.SKU),l(3),s("typeId",o.TypeID),l(2),g(o.ChannelName),l(2),g(y(16,6,o.Count))}}var we=(()=>{let p=class p{constructor(){this.httpService=x(Z),this.biggerPictureService=x(Q),this.filter=V({PageNumber:1,RowCount:20,ListChannelID:[]}),this.rowCountApi=M.GetMultilistingSKUCount,this.initMultipleListingSKU()}initMultipleListingSKU(){this.multipleListingSKU$=this.httpService.post(M.GetMultiListingSKU,this.filter()).pipe(b(1))}onZoomImage(_,m){this.biggerPictureService.openBiggerPicture(_,m)}};p.\u0275fac=function(m){return new(m||p)},p.\u0275cmp=U({type:p,selectors:[["app-duplicate-sku-v2"]],decls:33,vars:8,consts:[["headerTitle","Duplicate SKU","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/duplicate-sku",1,"d-flex","align-items-center","gap-2","btn","btn-outline-secondary","btn-lg"],[1,"fa-solid","fa-credit-card"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-6"],[1,"col-12"],[1,"table"],[1,"thead-light","sticky-top-thead"],[2,"width","40px"],[2,"width","200px"],[2,"width","250px"],[1,"text-end",2,"width","50px"],[3,"next","previous","filter","totaldata","rowCountApi"],[2,"padding-right","0px"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded",2,"max-width","40px"],[1,"d-flex","align-items-center"],[3,"typeId"],[1,"text-end"],[1,"border","rounded","cursor-pointer",2,"max-width","40px",3,"click","src"]],template:function(m,i){if(m&1){let n=w();A(0),v(1,"async"),e(2,"mainpanel",0),h("onSubmit",function(){return u(n),d(i.initMultipleListingSKU())}),e(3,"actions")(4,"a",1),c(5,"i",2),e(6,"span"),a(7,"Card View"),t()()(),e(8,"filters")(9,"div")(10,"label",3),a(11,"Channel"),t(),e(12,"app-channel-options-v2",4),B("ngModelChange",function(C){return u(n),T(i.filter().ListChannelID,C)||(i.filter().ListChannelID=C),d(C)}),t()()(),e(13,"content")(14,"div",5)(15,"div",6)(16,"div",7)(17,"table",8)(18,"thead",9)(19,"tr"),c(20,"th",10),e(21,"th"),a(22,"Product"),t(),e(23,"th",11),a(24,"SKU"),t(),e(25,"th",12),a(26,"Channel"),t(),e(27,"th",13),a(28,"Count"),t()()(),e(29,"tbody"),L(30,te,17,8,"tr",null,E),t()(),e(32,"app-custom-paginator",14),h("next",function(){return u(n),d(i.initMultipleListingSKU())})("previous",function(){return u(n),d(i.initMultipleListingSKU())}),t()()()()()()}if(m&2){let n=y(1,6,i.multipleListingSKU$);l(2),s("hideSearchBox",!0),l(10),s("multiple",!0),P("ngModel",i.filter().ListChannelID),l(18),K(n==null?null:n.Data),l(2),s("filter",i.filter())("totaldata",n==null||n.Data==null?null:n.Data.length)("rowCountApi",i.rowCountApi)}},dependencies:[F,z,j,J,W,O,q,X,H,$,G,N,R],encapsulation:2});let r=p;return r})();export{we as DuplicateSkuV2Component};