marketplacepos 5.44.0 → 5.44.2

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 (76) hide show
  1. package/Marketplace/{chunk-XYEV5RMD.js → chunk-2TXL3UEN.js} +1 -1
  2. package/Marketplace/{chunk-DHIDUIOD.js → chunk-3DMGCQAD.js} +1 -1
  3. package/Marketplace/{chunk-JF4QOCAZ.js → chunk-3IIKX554.js} +1 -1
  4. package/Marketplace/{chunk-EVXMYPWP.js → chunk-3YNS3PF3.js} +1 -1
  5. package/Marketplace/{chunk-MRODDSR7.js → chunk-4GW36MPQ.js} +1 -1
  6. package/Marketplace/{chunk-HZHUTC6E.js → chunk-4J4NGUMH.js} +1 -1
  7. package/Marketplace/{chunk-X67M7TFE.js → chunk-5SYAYUVP.js} +1 -1
  8. package/Marketplace/{chunk-M6YFSBMG.js → chunk-5UGNYVSK.js} +1 -1
  9. package/Marketplace/chunk-66N77XWP.js +1 -0
  10. package/Marketplace/chunk-6EH5RQIV.js +1 -0
  11. package/Marketplace/{chunk-JHYTM6OD.js → chunk-6JUVLRWS.js} +1 -1
  12. package/Marketplace/{chunk-YRSF6N67.js → chunk-74U7L3IP.js} +1 -1
  13. package/Marketplace/{chunk-ZMEMG7ZN.js → chunk-7YA3MQOI.js} +1 -1
  14. package/Marketplace/{chunk-OFD3D5IO.js → chunk-AVT3WVH4.js} +1 -1
  15. package/Marketplace/chunk-BAUHJDSM.js +1 -0
  16. package/Marketplace/chunk-BXW7N3ER.js +1 -0
  17. package/Marketplace/{chunk-ZXNM4AGN.js → chunk-CZDUJH26.js} +1 -1
  18. package/Marketplace/{chunk-55BJO7BI.js → chunk-DUEZ2ZYL.js} +2 -2
  19. package/Marketplace/{chunk-JIOSKHGT.js → chunk-DXEJKRNB.js} +1 -1
  20. package/Marketplace/{chunk-PVPN53WE.js → chunk-EYBZQLBT.js} +1 -1
  21. package/Marketplace/{chunk-BO7BG424.js → chunk-FIXI7CJ5.js} +1 -1
  22. package/Marketplace/{chunk-LFAU6HXM.js → chunk-GGSB6FC2.js} +1 -1
  23. package/Marketplace/{chunk-MKUH4R2N.js → chunk-GLZJR5RB.js} +1 -1
  24. package/Marketplace/{chunk-TZQFN56G.js → chunk-GYPJGQYN.js} +1 -1
  25. package/Marketplace/{chunk-IMEGV3MV.js → chunk-HVLMIZAB.js} +1 -1
  26. package/Marketplace/{chunk-5GLSI4QU.js → chunk-IBCRFNV4.js} +1 -1
  27. package/Marketplace/{chunk-5W7TCSDK.js → chunk-IT3DTSKV.js} +1 -1
  28. package/Marketplace/{chunk-22AHRDNQ.js → chunk-KCH7AGAT.js} +1 -1
  29. package/Marketplace/{chunk-V4D6BB2N.js → chunk-KPGKJKR5.js} +1 -1
  30. package/Marketplace/{chunk-NSS35UR3.js → chunk-KX7FIURR.js} +1 -1
  31. package/Marketplace/{chunk-HWHDJDQN.js → chunk-L6WNU54G.js} +1 -1
  32. package/Marketplace/{chunk-4YWSKMFD.js → chunk-LZQRF7OP.js} +1 -1
  33. package/Marketplace/chunk-M6UMLTY2.js +1 -0
  34. package/Marketplace/{chunk-LRCKOJEI.js → chunk-M6UQ3NJ3.js} +1 -1
  35. package/Marketplace/{chunk-ELE7BOLL.js → chunk-M7HQIICB.js} +1 -1
  36. package/Marketplace/{chunk-OFUTQWBX.js → chunk-MMLMRH2X.js} +1 -1
  37. package/Marketplace/{chunk-KGMQTWMX.js → chunk-NAT7HRBS.js} +1 -1
  38. package/Marketplace/chunk-NRNXUMZX.js +1 -0
  39. package/Marketplace/{chunk-64JGYG54.js → chunk-NXOXSOUJ.js} +1 -1
  40. package/Marketplace/{chunk-MDHPQWC7.js → chunk-O6GXF2YS.js} +2 -2
  41. package/Marketplace/{chunk-C3VEI2IE.js → chunk-O75DCJY4.js} +1 -1
  42. package/Marketplace/{chunk-GRIUDEPO.js → chunk-OWQ3RWNF.js} +1 -1
  43. package/Marketplace/{chunk-LYBSI3ZX.js → chunk-PAMSUURJ.js} +1 -1
  44. package/Marketplace/{chunk-4PDRBB73.js → chunk-PH6H2XX4.js} +1 -1
  45. package/Marketplace/{chunk-X743YBE6.js → chunk-Q6P7MEKT.js} +1 -1
  46. package/Marketplace/{chunk-ENLYKIFW.js → chunk-QANQWW5Y.js} +1 -1
  47. package/Marketplace/{chunk-UCQKKX2L.js → chunk-QINTIYLK.js} +1 -1
  48. package/Marketplace/{chunk-RHCH74ZR.js → chunk-R46PZJM7.js} +1 -1
  49. package/Marketplace/{chunk-QYCOQS7D.js → chunk-ROEKFCHJ.js} +2 -2
  50. package/Marketplace/{chunk-STPUGFHI.js → chunk-S25SHAFH.js} +1 -1
  51. package/Marketplace/{chunk-W7VYUPIP.js → chunk-SNPFU5TF.js} +1 -1
  52. package/Marketplace/{chunk-LYZVX4EZ.js → chunk-U7I4JXN6.js} +11 -11
  53. package/Marketplace/chunk-UD3DLFU3.js +1 -0
  54. package/Marketplace/{chunk-NDSJ4AAU.js → chunk-UTCTTFIM.js} +1 -1
  55. package/Marketplace/{chunk-W7H6T326.js → chunk-UWAXFTHD.js} +1 -1
  56. package/Marketplace/{chunk-EJWZFRMT.js → chunk-UYYAK364.js} +1 -1
  57. package/Marketplace/{chunk-G3O7MWIB.js → chunk-VA7FHRY6.js} +1 -1
  58. package/Marketplace/{chunk-TPC5KHGH.js → chunk-VK3NG4L3.js} +1 -1
  59. package/Marketplace/{chunk-RMAEWPJV.js → chunk-VPWALMDU.js} +1 -1
  60. package/Marketplace/{chunk-KIPJJIYU.js → chunk-WMFWJNS5.js} +1 -1
  61. package/Marketplace/{chunk-LC6TXSYB.js → chunk-WQ3GDXQW.js} +1 -1
  62. package/Marketplace/{chunk-WKUTDZ7J.js → chunk-X3TNRXVW.js} +1 -1
  63. package/Marketplace/chunk-YERZ6W22.js +1 -0
  64. package/Marketplace/{chunk-TPW56VWM.js → chunk-YTL4RBBS.js} +1 -1
  65. package/Marketplace/{chunk-WY4BY2ID.js → chunk-ZKZ5DIIR.js} +1 -1
  66. package/Marketplace/{chunk-3VUDKIND.js → chunk-ZOKAF4JQ.js} +1 -1
  67. package/Marketplace/index.html +2 -2
  68. package/Marketplace/{main-WUG4WUAT.js → main-QWLBNOBB.js} +1 -1
  69. package/package.json +1 -1
  70. package/Marketplace/chunk-G5DA2OSB.js +0 -1
  71. package/Marketplace/chunk-H3DIKLA5.js +0 -1
  72. package/Marketplace/chunk-PANQ33RQ.js +0 -1
  73. package/Marketplace/chunk-UUSBNUEH.js +0 -1
  74. package/Marketplace/chunk-W3L5LPU5.js +0 -1
  75. package/Marketplace/chunk-XF4BVLTJ.js +0 -1
  76. package/Marketplace/chunk-ZEYELO7U.js +0 -1
@@ -1 +1 @@
1
- import{a as ue}from"./chunk-6RKA4STM.js";import{a as ge,b as _e,c as Ce}from"./chunk-V5BKQSAT.js";import{a as fe,b as P}from"./chunk-ZMEMG7ZN.js";import{a as se}from"./chunk-2ODVHD2K.js";import{a as de}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-YM4TJJMM.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as ce}from"./chunk-KIPJJIYU.js";import{a as me}from"./chunk-D6URDVES.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import{b as oe}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import{b as g}from"./chunk-PW42BQIY.js";import{m as le,n as pe}from"./chunk-UGVEAL7H.js";import{A as ne,c as $,h as ee,m as te,o as ie}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as re,s as ae}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Q,k as X,m as Y,n as Z}from"./chunk-M2FCTYGU.js";import{$c as T,Gb as O,Gc as l,Hc as x,Ic as V,Kc as f,Lc as h,Mb as v,Mc as S,Nc as H,Oc as U,Pc as q,Qc as G,Ra as D,Sc as J,Yb as C,Z as I,ac as B,ad as M,bd as K,dc as y,ec as z,gc as R,hc as j,ic as t,ja as F,jc as i,kc as u,oc as L,pa as b,pb as W,rb as a,tc as E,uc as s,ya as d,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as k,b as N}from"./chunk-66YHNWRR.js";var A=(()=>{class n{constructor(){this.shippingLabelService=b(ue),this.toastrService=b(oe)}printShippingLabel(e){switch(e?.MarketType){case g.Shopee:this.shippingLabelService.printShippingLabelShopee(e.Number,e.ShopID);break;case g.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e.Number,e.ShopID);break;case g.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e.Number);break;case g.Lazada:this.shippingLabelService.printShippingLabelLazada(e.Number,e.ShopID);break;case g.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=F({token:n,factory:n.\u0275fac})}}return n})();var Se=n=>({"td-cell-hover":n});function we(n,_){if(n&1&&u(0,"variants-dropdown",30),n&2){let e=s().$implicit;C("variants",e==null?null:e.Variants)}}function be(n,_){if(n&1&&u(0,"variant-with-image",31),n&2){let e=s().$implicit;C("variant",e==null?null:e.Variants[0])}}function ve(n,_){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=s().$implicit;a(),V("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ye(n,_){if(n&1){let e=L();t(0,"button",35),E("click",function(){d(e);let o=s().$implicit,m=s(2);return c(m.onPrintShippingLabel(o))}),u(1,"i",36),i()}}function xe(n,_){if(n&1&&(t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",26)(5,"div",27)(6,"div"),u(7,"img",28),T(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",29),i()(),t(11,"small"),l(12),T(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),v(17,we,1,1,"variants-dropdown",30)(18,be,1,1,"variant-with-image",31),i(),t(19,"td",32),l(20),T(21,"number"),i(),t(22,"td")(23,"div",26)(24,"div",27)(25,"span"),l(26),i(),v(27,ve,2,1,"span"),i(),t(28,"small"),l(29),i()()(),t(30,"td",33),v(31,ye,2,0,"button",34),i()()),n&2){let e=_.$implicit,p=s(2);a(2),x(e.Outlet),a(5),C("src",M(8,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),C("order",e),a(2),V(" ",K(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),x(e.Customer),a(),B(J(21,Se,(e.Variants==null?null:e.Variants.length)>1)),a(),y((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),x(M(21,19,e.Amount)),a(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),a(2),V(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),a(2),y((e==null?null:e.MarketType)!=p.channelType.WooCommerce?31:-1)}}function Te(n,_){if(n&1){let e=L();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i(),u(16,"th",24),i()(),t(17,"tbody"),R(18,xe,32,23,"tr",null,z),i()(),t(20,"app-custom-paginator",25),E("next",function(){d(e);let o=s();return c(o.initAwaitingCollection())})("previous",function(){d(e);let o=s();return c(o.initAwaitingCollection())}),i()()}if(n&2){let e=s(),p=q(0);a(18),j(p),a(2),C("filter",e.filter())("totaldata",p==null?null:p.length)}}function Le(n,_){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var it=(()=>{class n{constructor(){this.printShippingService=b(A),this.orderService=b(P),this.channelType=g,this.filter=D({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(p=>N(k({},p),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(I(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-awaiting-collection"]],features:[G([P,A])],decls:34,vars:11,consts:[["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(p,o){if(p&1){let m=L();H(0),T(1,"async"),t(2,"mainpanel",0),E("onSubmit",function(){return d(m),c(o.initAwaitingCollection())}),S("textChange",function(r){return d(m),h(o.filter().Number,r)||(o.filter().Number=r),c(r)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),S("ngModelChange",function(r){return d(m),h(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),c(r)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),S("dateChange",function(r){return d(m),h(o.filter().From,r)||(o.filter().From=r),c(r)}),i()(),t(18,"div")(19,"datepicker",8),S("dateChange",function(r){return d(m),h(o.filter().To,r)||(o.filter().To=r),c(r)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),S("ngModelChange",function(r){return d(m),h(o.filter().PageNumber,r)||(o.filter().PageNumber=r),c(r)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),S("ngModelChange",function(r){return d(m),h(o.filter().PageSize,r)||(o.filter().PageSize=r),c(r)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),v(32,Te,21,2,"div",15)(33,Le,2,0,"div",16),i()()()()()}if(p&2){let m=U(M(1,8,o.awaitingCollections$));a(2),f("text",o.filter().Number),a(10),C("multiple",!0),f("ngModel",o.filter().ListChannelID),a(5),f("date",o.filter().From),a(2),f("date",o.filter().To),a(4),f("ngModel",o.filter().PageNumber),a(4),f("ngModel",o.filter().PageSize),a(5),y((m==null?null:m.length)>0?32:33)}},dependencies:[Z,Q,Y,X,pe,le,de,me,ne,$,ie,ee,te,ge,_e,Ce,se,ce,ae,re,fe],encapsulation:2})}}return n})();export{it as AwaitingCollectionComponent};
1
+ import{a as ue}from"./chunk-6RKA4STM.js";import{a as ge,b as _e,c as Ce}from"./chunk-V5BKQSAT.js";import{a as fe,b as P}from"./chunk-7YA3MQOI.js";import{a as se}from"./chunk-2ODVHD2K.js";import{a as de}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-YM4TJJMM.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as ce}from"./chunk-WMFWJNS5.js";import{a as me}from"./chunk-D6URDVES.js";import"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-OWQ3RWNF.js";import{b as oe}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import{b as g}from"./chunk-PW42BQIY.js";import{m as le,n as pe}from"./chunk-UGVEAL7H.js";import{A as ne,c as $,h as ee,m as te,o as ie}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as re,s as ae}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Q,k as X,m as Y,n as Z}from"./chunk-M2FCTYGU.js";import{$c as T,Gb as O,Gc as l,Hc as x,Ic as V,Kc as f,Lc as h,Mb as v,Mc as S,Nc as H,Oc as U,Pc as q,Qc as G,Ra as D,Sc as J,Yb as C,Z as I,ac as B,ad as M,bd as K,dc as y,ec as z,gc as R,hc as j,ic as t,ja as F,jc as i,kc as u,oc as L,pa as b,pb as W,rb as a,tc as E,uc as s,ya as d,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as k,b as N}from"./chunk-66YHNWRR.js";var A=(()=>{class n{constructor(){this.shippingLabelService=b(ue),this.toastrService=b(oe)}printShippingLabel(e){switch(e?.MarketType){case g.Shopee:this.shippingLabelService.printShippingLabelShopee(e.Number,e.ShopID);break;case g.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e.Number,e.ShopID);break;case g.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e.Number);break;case g.Lazada:this.shippingLabelService.printShippingLabelLazada(e.Number,e.ShopID);break;case g.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=F({token:n,factory:n.\u0275fac})}}return n})();var Se=n=>({"td-cell-hover":n});function we(n,_){if(n&1&&u(0,"variants-dropdown",30),n&2){let e=s().$implicit;C("variants",e==null?null:e.Variants)}}function be(n,_){if(n&1&&u(0,"variant-with-image",31),n&2){let e=s().$implicit;C("variant",e==null?null:e.Variants[0])}}function ve(n,_){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=s().$implicit;a(),V("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ye(n,_){if(n&1){let e=L();t(0,"button",35),E("click",function(){d(e);let o=s().$implicit,m=s(2);return c(m.onPrintShippingLabel(o))}),u(1,"i",36),i()}}function xe(n,_){if(n&1&&(t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",26)(5,"div",27)(6,"div"),u(7,"img",28),T(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",29),i()(),t(11,"small"),l(12),T(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),v(17,we,1,1,"variants-dropdown",30)(18,be,1,1,"variant-with-image",31),i(),t(19,"td",32),l(20),T(21,"number"),i(),t(22,"td")(23,"div",26)(24,"div",27)(25,"span"),l(26),i(),v(27,ve,2,1,"span"),i(),t(28,"small"),l(29),i()()(),t(30,"td",33),v(31,ye,2,0,"button",34),i()()),n&2){let e=_.$implicit,p=s(2);a(2),x(e.Outlet),a(5),C("src",M(8,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),C("order",e),a(2),V(" ",K(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),x(e.Customer),a(),B(J(21,Se,(e.Variants==null?null:e.Variants.length)>1)),a(),y((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),x(M(21,19,e.Amount)),a(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),a(2),V(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),a(2),y((e==null?null:e.MarketType)!=p.channelType.WooCommerce?31:-1)}}function Te(n,_){if(n&1){let e=L();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i(),u(16,"th",24),i()(),t(17,"tbody"),R(18,xe,32,23,"tr",null,z),i()(),t(20,"app-custom-paginator",25),E("next",function(){d(e);let o=s();return c(o.initAwaitingCollection())})("previous",function(){d(e);let o=s();return c(o.initAwaitingCollection())}),i()()}if(n&2){let e=s(),p=q(0);a(18),j(p),a(2),C("filter",e.filter())("totaldata",p==null?null:p.length)}}function Le(n,_){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var it=(()=>{class n{constructor(){this.printShippingService=b(A),this.orderService=b(P),this.channelType=g,this.filter=D({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(p=>N(k({},p),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(I(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-awaiting-collection"]],features:[G([P,A])],decls:34,vars:11,consts:[["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(p,o){if(p&1){let m=L();H(0),T(1,"async"),t(2,"mainpanel",0),E("onSubmit",function(){return d(m),c(o.initAwaitingCollection())}),S("textChange",function(r){return d(m),h(o.filter().Number,r)||(o.filter().Number=r),c(r)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),S("ngModelChange",function(r){return d(m),h(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),c(r)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),S("dateChange",function(r){return d(m),h(o.filter().From,r)||(o.filter().From=r),c(r)}),i()(),t(18,"div")(19,"datepicker",8),S("dateChange",function(r){return d(m),h(o.filter().To,r)||(o.filter().To=r),c(r)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),S("ngModelChange",function(r){return d(m),h(o.filter().PageNumber,r)||(o.filter().PageNumber=r),c(r)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),S("ngModelChange",function(r){return d(m),h(o.filter().PageSize,r)||(o.filter().PageSize=r),c(r)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),v(32,Te,21,2,"div",15)(33,Le,2,0,"div",16),i()()()()()}if(p&2){let m=U(M(1,8,o.awaitingCollections$));a(2),f("text",o.filter().Number),a(10),C("multiple",!0),f("ngModel",o.filter().ListChannelID),a(5),f("date",o.filter().From),a(2),f("date",o.filter().To),a(4),f("ngModel",o.filter().PageNumber),a(4),f("ngModel",o.filter().PageSize),a(5),y((m==null?null:m.length)>0?32:33)}},dependencies:[Z,Q,Y,X,pe,le,de,me,ne,$,ie,ee,te,ge,_e,Ce,se,ce,ae,re,fe],encapsulation:2})}}return n})();export{it as AwaitingCollectionComponent};
@@ -1 +1 @@
1
- import{a as G}from"./chunk-KIPJJIYU.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as F}from"./chunk-GRIUDEPO.js";import{e as j}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as H,n as J}from"./chunk-UGVEAL7H.js";import{A as R,c as k,h as B,m as W}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as D,l as I,n as P}from"./chunk-M2FCTYGU.js";import{$c as b,Gb as S,Gc as i,Hc as N,Kc as g,Lc as f,Mb as x,Mc as C,Nc as O,Oc as V,Pc as _,Ra as w,Yb as m,Z as v,ad as y,dc as M,ic as e,jc as t,kc as L,oc as T,pa as E,rb as p,tc as h,uc as A,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(n,U){if(n&1&&(e(0,"pre",21),i(1),b(2,"json"),t()),n&2){A();let l=_(25);p(),N(y(2,1,l))}}function q(n,U){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var pe=(()=>{class n{constructor(){this.httpService=E(j),this.selectedChannel=w(null),this.orderNumber=w(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(F.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(v(1))}copyToClipboard(l){if(!l)return;let c=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-escrow-api"]],decls:40,vars:10,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","onlyInputTypeID"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(c,o){if(c&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),h("click",function(){return d(a),s(o.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"channel-select-options",10),C("ngModelChange",function(r){return d(a),f(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),C("ngModelChange",function(r){return d(a),f(o.orderNumber,r)||(o.orderNumber=r),s(r)}),t()()()()(),O(25),b(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),h("click",function(){d(a);let r=_(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),p(16),g("ngModel",o.selectedChannel),m("onlyInputTypeID",5),p(8),g("ngModel",o.orderNumber),p();let a=V(y(26,7,o.escrowLog$));p(8),m("disabled",!a),p(5),M(a?38:39)}},dependencies:[P,D,I,R,k,B,W,J,H,G],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]})}}return n})();export{pe as EscrowApiComponent};
1
+ import{a as G}from"./chunk-WMFWJNS5.js";import"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as F}from"./chunk-OWQ3RWNF.js";import{e as j}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as H,n as J}from"./chunk-UGVEAL7H.js";import{A as R,c as k,h as B,m as W}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as D,l as I,n as P}from"./chunk-M2FCTYGU.js";import{$c as b,Gb as S,Gc as i,Hc as N,Kc as g,Lc as f,Mb as x,Mc as C,Nc as O,Oc as V,Pc as _,Ra as w,Yb as m,Z as v,ad as y,dc as M,ic as e,jc as t,kc as L,oc as T,pa as E,rb as p,tc as h,uc as A,ya as d,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function Y(n,U){if(n&1&&(e(0,"pre",21),i(1),b(2,"json"),t()),n&2){A();let l=_(25);p(),N(y(2,1,l))}}function q(n,U){n&1&&(e(0,"p",22),i(1," Your data will be shown here once it's available "),t())}var pe=(()=>{class n{constructor(){this.httpService=E(j),this.selectedChannel=w(null),this.orderNumber=w(null)}initEscrowLog(){this.escrowLog$=this.httpService.post(F.GetEscrowDetail,{ChannelID:this.selectedChannel(),OrderNumber:this.orderNumber()}).pipe(v(1))}copyToClipboard(l){if(!l)return;let c=typeof l=="string"?l:JSON.stringify(l,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||n)}}static{this.\u0275cmp=S({type:n,selectors:[["app-escrow-api"]],decls:40,vars:10,consts:[["headerTitle","Origin Escrow Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel","onlyInputTypeID"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Order Number or Invoice Number",1,"form-control",3,"ngModelChange","ngModel"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","escrowLogText"],[1,"text-center","my-12","text-muted"]],template:function(c,o){if(c&1){let a=T();e(0,"mainpanel",0)(1,"actions")(2,"button",1),h("click",function(){return d(a),s(o.initEscrowLog())}),L(3,"i",2),i(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),i(12,"Channel"),t(),e(13,"p",8),i(14," View logs related to Escrow API "),t()(),e(15,"div",9)(16,"channel-select-options",10),C("ngModelChange",function(r){return d(a),f(o.selectedChannel,r)||(o.selectedChannel=r),s(r)}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),i(20,"Order Number"),t(),e(21,"p",8),i(22," Order or Invoice number from Channel. "),t()(),e(23,"div",9)(24,"input",12),C("ngModelChange",function(r){return d(a),f(o.orderNumber,r)||(o.orderNumber=r),s(r)}),t()()()()(),O(25),b(26,"async"),e(27,"div",13)(28,"div",14)(29,"div",15)(30,"div",16)(31,"h5"),i(32,"Response"),t(),e(33,"button",17),h("click",function(){d(a);let r=_(25);return s(o.copyToClipboard(r))}),i(34," Copy "),t()(),e(35,"div",18)(36,"div",19)(37,"div",20),x(38,Y,3,3,"pre",21)(39,q,2,0,"p",22),t()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),p(16),g("ngModel",o.selectedChannel),m("onlyInputTypeID",5),p(8),g("ngModel",o.orderNumber),p();let a=V(y(26,7,o.escrowLog$));p(8),m("disabled",!a),p(5),M(a?38:39)}},dependencies:[P,D,I,R,k,B,W,J,H,G],styles:[".container-fluid[_ngcontent-%COMP%]{padding-bottom:1rem}#escrowLogText[_ngcontent-%COMP%]{white-space:pre-wrap;word-break:break-word}"]})}}return n})();export{pe as EscrowApiComponent};
@@ -1 +1 @@
1
- import{a as Y}from"./chunk-KIPJJIYU.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-GRIUDEPO.js";import{e as F}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as J,n as G}from"./chunk-UGVEAL7H.js";import{A as j,c as K,h as R,m as N,p as O}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{g as T,j as W,l as D,n as U}from"./chunk-M2FCTYGU.js";import{$c as P,Gb as I,Gc as a,Hc as E,Kc as h,Lc as g,Mb as w,Mc as f,Nc as V,Oc as L,Pc as x,Ra as C,Yb as m,Z as b,ad as v,dc as k,ic as n,jc as i,kc as A,oc as _,pa as B,rb as d,tc as M,uc as u,ya as p,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function q(o,S){if(o&1){let t=_();n(0,"input",30),f("ngModelChange",function(e){p(t);let r=u();return g(r.sku,e)||(r.sku=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.sku)}}function z(o,S){if(o&1){let t=_();n(0,"input",31),f("ngModelChange",function(e){p(t);let r=u();return g(r.itemId,e)||(r.itemId=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.itemId)}}function Q(o,S){if(o&1&&(n(0,"pre",28),a(1),P(2,"json"),i()),o&2){u();let t=x(35);d(),E(v(2,1,t))}}function X(o,S){o&1&&(n(0,"p",29),a(1," Your data will be shown here once it's available "),i())}var me=(()=>{class o{constructor(){this.httpService=B(F),this.selectedChannel=C(null),this.sku=C(null),this.itemId=C(null),this.searchBy="sku"}initProductLog(){let t={ChannelID:this.selectedChannel()};this.searchBy==="sku"?t.SKU=this.sku():t.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,t).pipe(b(1))}copyToClipboard(t){if(!t)return;let c=typeof t=="string"?t:JSON.stringify(t,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||o)}}static{this.\u0275cmp=I({type:o,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","class","form-control","placeholder","Product Code / SKU",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","class","form-control","placeholder","ItemID is Product id from seller center",3,"ngModel","ngModelChange",4,"ngIf"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control",3,"ngModelChange","ngModel"]],template:function(c,e){if(c&1){let r=_();n(0,"mainpanel",0)(1,"actions")(2,"button",1),M("click",function(){return p(r),s(e.initProductLog())}),A(3,"i",2),a(4," Search "),i()(),n(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),a(12,"Channel"),i(),n(13,"p",8),a(14," View logs related to Product API Detail "),i()(),n(15,"div",9)(16,"channel-select-options",10),f("ngModelChange",function(l){return p(r),g(e.selectedChannel,l)||(e.selectedChannel=l),s(l)}),i()()(),n(17,"div",11)(18,"div",7)(19,"h6"),a(20,"Product Code / SKU"),i(),n(21,"p",8),a(22," Product SKU or Code from Channel Product "),i()(),n(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(27,"label",15),a(28,"Search by SKU"),i()(),n(29,"div",13)(30,"input",16),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(31,"label",17),a(32,"Search by ItemID"),i()()(),w(33,q,1,1,"input",18)(34,z,1,1,"input",19),i()()()(),V(35),P(36,"async"),n(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),a(42,"Response"),i(),n(43,"button",24),M("click",function(){p(r);let l=x(35);return s(e.copyToClipboard(l))}),a(44," Copy "),i()(),n(45,"div",25)(46,"div",26)(47,"div",27),w(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),i()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),h("ngModel",e.selectedChannel),d(10),h("ngModel",e.searchBy),m("value","sku"),d(4),h("ngModel",e.searchBy),m("value","itemid"),d(3),m("ngIf",e.searchBy==="sku"),d(),m("ngIf",e.searchBy==="itemid"),d();let r=L(v(36,11,e.productLog$));d(8),m("disabled",!r),d(5),k(r?48:49)}},dependencies:[U,T,W,D,j,K,O,R,N,G,J,Y],encapsulation:2})}}return o})();export{me as ProductApiComponent};
1
+ import{a as Y}from"./chunk-WMFWJNS5.js";import"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as H}from"./chunk-OWQ3RWNF.js";import{e as F}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as J,n as G}from"./chunk-UGVEAL7H.js";import{A as j,c as K,h as R,m as N,p as O}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{g as T,j as W,l as D,n as U}from"./chunk-M2FCTYGU.js";import{$c as P,Gb as I,Gc as a,Hc as E,Kc as h,Lc as g,Mb as w,Mc as f,Nc as V,Oc as L,Pc as x,Ra as C,Yb as m,Z as b,ad as v,dc as k,ic as n,jc as i,kc as A,oc as _,pa as B,rb as d,tc as M,uc as u,ya as p,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";function q(o,S){if(o&1){let t=_();n(0,"input",30),f("ngModelChange",function(e){p(t);let r=u();return g(r.sku,e)||(r.sku=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.sku)}}function z(o,S){if(o&1){let t=_();n(0,"input",31),f("ngModelChange",function(e){p(t);let r=u();return g(r.itemId,e)||(r.itemId=e),s(e)}),i()}if(o&2){let t=u();h("ngModel",t.itemId)}}function Q(o,S){if(o&1&&(n(0,"pre",28),a(1),P(2,"json"),i()),o&2){u();let t=x(35);d(),E(v(2,1,t))}}function X(o,S){o&1&&(n(0,"p",29),a(1," Your data will be shown here once it's available "),i())}var me=(()=>{class o{constructor(){this.httpService=B(F),this.selectedChannel=C(null),this.sku=C(null),this.itemId=C(null),this.searchBy="sku"}initProductLog(){let t={ChannelID:this.selectedChannel()};this.searchBy==="sku"?t.SKU=this.sku():t.ItemID=this.itemId(),this.productLog$=this.httpService.post(H.GetProductApiLog,t).pipe(b(1))}copyToClipboard(t){if(!t)return;let c=typeof t=="string"?t:JSON.stringify(t,null,2);navigator.clipboard.writeText(c),alert("Copied to clipboard!")}static{this.\u0275fac=function(c){return new(c||o)}}static{this.\u0275cmp=I({type:o,selectors:[["app-product-api"]],decls:50,vars:14,consts:[["headerTitle","Origin Product Api",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],[1,"mb-2"],[1,"form-check","form-check-inline"],["type","radio","name","searchBy","id","searchBySku",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchBySku",1,"form-check-label"],["type","radio","name","searchBy","id","searchByItemId",1,"form-check-input",3,"ngModelChange","ngModel","value"],["for","searchByItemId",1,"form-check-label"],["type","text","class","form-control","placeholder","Product Code / SKU",3,"ngModel","ngModelChange",4,"ngIf"],["type","text","class","form-control","placeholder","ItemID is Product id from seller center",3,"ngModel","ngModelChange",4,"ngIf"],[1,"row","mt-6"],[1,"col-12"],[1,"card"],[1,"card-header","d-flex","justify-content-between","align-items-center"],["type","button",1,"btn","btn-sm","btn-outline-primary",3,"click","disabled"],[1,"card-body"],[1,"col-sm-12"],[1,"form-group","position-relative"],["id","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control",3,"ngModelChange","ngModel"]],template:function(c,e){if(c&1){let r=_();n(0,"mainpanel",0)(1,"actions")(2,"button",1),M("click",function(){return p(r),s(e.initProductLog())}),A(3,"i",2),a(4," Search "),i()(),n(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),a(12,"Channel"),i(),n(13,"p",8),a(14," View logs related to Product API Detail "),i()(),n(15,"div",9)(16,"channel-select-options",10),f("ngModelChange",function(l){return p(r),g(e.selectedChannel,l)||(e.selectedChannel=l),s(l)}),i()()(),n(17,"div",11)(18,"div",7)(19,"h6"),a(20,"Product Code / SKU"),i(),n(21,"p",8),a(22," Product SKU or Code from Channel Product "),i()(),n(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(27,"label",15),a(28,"Search by SKU"),i()(),n(29,"div",13)(30,"input",16),f("ngModelChange",function(l){return p(r),g(e.searchBy,l)||(e.searchBy=l),s(l)}),i(),n(31,"label",17),a(32,"Search by ItemID"),i()()(),w(33,q,1,1,"input",18)(34,z,1,1,"input",19),i()()()(),V(35),P(36,"async"),n(37,"div",20)(38,"div",21)(39,"div",22)(40,"div",23)(41,"h5"),a(42,"Response"),i(),n(43,"button",24),M("click",function(){p(r);let l=x(35);return s(e.copyToClipboard(l))}),a(44," Copy "),i()(),n(45,"div",25)(46,"div",26)(47,"div",27),w(48,Q,3,3,"pre",28)(49,X,2,0,"p",29),i()()()()()()()()()}if(c&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),d(16),h("ngModel",e.selectedChannel),d(10),h("ngModel",e.searchBy),m("value","sku"),d(4),h("ngModel",e.searchBy),m("value","itemid"),d(3),m("ngIf",e.searchBy==="sku"),d(),m("ngIf",e.searchBy==="itemid"),d();let r=L(v(36,11,e.productLog$));d(8),m("disabled",!r),d(5),k(r?48:49)}},dependencies:[U,T,W,D,j,K,O,R,N,G,J,Y],encapsulation:2})}}return o})();export{me as ProductApiComponent};
@@ -1 +1 @@
1
- import{a as ae,b as M}from"./chunk-ZMEMG7ZN.js";import{a as oe}from"./chunk-2ODVHD2K.js";import{a as re}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as te,b as ie}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{a as le}from"./chunk-KIPJJIYU.js";import{a as ne}from"./chunk-D6URDVES.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as $,n as ee}from"./chunk-UGVEAL7H.js";import{A as X,c as J,h as K,m as Q,o as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as Y,s as Z}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as R,k as j,m as q,n as G}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as W,Gc as o,Hc as h,Kc as c,Lc as u,Mb as L,Mc as C,Nc as I,Oc as k,Pc as A,Qc as z,Ra as O,Yb as g,Z as P,ad as x,bd as H,dc as N,ec as D,gc as F,hc as B,ic as e,jc as t,kc as _,oc as b,pa as V,rb as l,tc as v,uc as y,ya as p,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as E,b as T}from"./chunk-66YHNWRR.js";function me(m,S){if(m&1&&(e(0,"tr")(1,"td"),o(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),o(6),t(),e(7,"td"),o(8),w(9,"number"),t(),e(10,"td"),o(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),m&2){let r=S.$implicit;l(2),h(r.Outlet),l(2),g("order",r),l(2),h(r.Customer),l(2),h(x(9,6,r.Amount)),l(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),l(3),g("typeId",r==null?null:r.TypeID)}}function de(m,S){if(m&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),o(5,"Outlet"),t(),e(6,"th",21),o(7,"Order number"),t(),e(8,"th"),o(9,"Customer"),t(),e(10,"th",22),o(11,"Amount"),t(),e(12,"th",23),o(13," Created On "),t(),e(14,"th",24),o(15,"Channel"),t()()(),e(16,"tbody"),F(17,me,15,11,"tr",null,D),t()(),e(19,"app-custom-paginator",25),v("next",function(){p(r);let i=y();return s(i.initCancelledOrders())})("previous",function(){p(r);let i=y();return s(i.initCancelledOrders())}),t()()}if(m&2){let r=y(),a=A(0);l(17),B(a),l(2),g("filter",r.filter())("totaldata",a==null?null:a.length)("paginationTotal",a==null?null:a.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function pe(m,S){m&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Le=(()=>{class m{constructor(){this.orderService=V(M),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let r=this.orderService.getOrderDefaultValue();this.filter.update(a=>T(E({},a),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}static{this.\u0275fac=function(a){return new(a||m)}}static{this.\u0275cmp=W({type:m,selectors:[["app-cancelled"]],features:[z([M])],decls:34,vars:11,consts:[["headerTitle","Cancelled","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(a,i){if(a&1){let d=b();I(0),w(1,"async"),e(2,"mainpanel",0),v("onSubmit",function(){return p(d),s(i.initCancelledOrders())}),C("textChange",function(n){return p(d),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),o(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),o(11,"From/To"),t(),e(12,"channel-select-options",4),C("ngModelChange",function(n){return p(d),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),o(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(d),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(d),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),o(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(d),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),o(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(d),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),L(32,de,20,5,"div",15)(33,pe,2,0,"div",16),t()()()()()}if(a&2){let d=k(x(1,8,i.cancelledOrders$));l(2),c("text",i.filter().Number),l(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),l(5),c("date",i.filter().From),l(2),c("date",i.filter().To),l(4),c("ngModel",i.filter().PageNumber),l(4),c("ngModel",i.filter().PageSize),l(5),N((d==null?null:d.length)>0?32:33)}},dependencies:[G,R,q,j,ee,$,re,ne,X,J,U,K,Q,oe,le,Z,Y,ae,ie,te],encapsulation:2})}}return m})();export{Le as CancelledComponent};
1
+ import{a as ae,b as M}from"./chunk-7YA3MQOI.js";import{a as oe}from"./chunk-2ODVHD2K.js";import{a as re}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as te,b as ie}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{a as le}from"./chunk-WMFWJNS5.js";import{a as ne}from"./chunk-D6URDVES.js";import"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-OWQ3RWNF.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as $,n as ee}from"./chunk-UGVEAL7H.js";import{A as X,c as J,h as K,m as Q,o as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as Y,s as Z}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as R,k as j,m as q,n as G}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as W,Gc as o,Hc as h,Kc as c,Lc as u,Mb as L,Mc as C,Nc as I,Oc as k,Pc as A,Qc as z,Ra as O,Yb as g,Z as P,ad as x,bd as H,dc as N,ec as D,gc as F,hc as B,ic as e,jc as t,kc as _,oc as b,pa as V,rb as l,tc as v,uc as y,ya as p,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as E,b as T}from"./chunk-66YHNWRR.js";function me(m,S){if(m&1&&(e(0,"tr")(1,"td"),o(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),o(6),t(),e(7,"td"),o(8),w(9,"number"),t(),e(10,"td"),o(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),m&2){let r=S.$implicit;l(2),h(r.Outlet),l(2),g("order",r),l(2),h(r.Customer),l(2),h(x(9,6,r.Amount)),l(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),l(3),g("typeId",r==null?null:r.TypeID)}}function de(m,S){if(m&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),o(5,"Outlet"),t(),e(6,"th",21),o(7,"Order number"),t(),e(8,"th"),o(9,"Customer"),t(),e(10,"th",22),o(11,"Amount"),t(),e(12,"th",23),o(13," Created On "),t(),e(14,"th",24),o(15,"Channel"),t()()(),e(16,"tbody"),F(17,me,15,11,"tr",null,D),t()(),e(19,"app-custom-paginator",25),v("next",function(){p(r);let i=y();return s(i.initCancelledOrders())})("previous",function(){p(r);let i=y();return s(i.initCancelledOrders())}),t()()}if(m&2){let r=y(),a=A(0);l(17),B(a),l(2),g("filter",r.filter())("totaldata",a==null?null:a.length)("paginationTotal",a==null?null:a.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function pe(m,S){m&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Le=(()=>{class m{constructor(){this.orderService=V(M),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let r=this.orderService.getOrderDefaultValue();this.filter.update(a=>T(E({},a),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}static{this.\u0275fac=function(a){return new(a||m)}}static{this.\u0275cmp=W({type:m,selectors:[["app-cancelled"]],features:[z([M])],decls:34,vars:11,consts:[["headerTitle","Cancelled","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(a,i){if(a&1){let d=b();I(0),w(1,"async"),e(2,"mainpanel",0),v("onSubmit",function(){return p(d),s(i.initCancelledOrders())}),C("textChange",function(n){return p(d),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),o(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),o(11,"From/To"),t(),e(12,"channel-select-options",4),C("ngModelChange",function(n){return p(d),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),o(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(d),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(d),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),o(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(d),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),o(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(d),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),L(32,de,20,5,"div",15)(33,pe,2,0,"div",16),t()()()()()}if(a&2){let d=k(x(1,8,i.cancelledOrders$));l(2),c("text",i.filter().Number),l(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),l(5),c("date",i.filter().From),l(2),c("date",i.filter().To),l(4),c("ngModel",i.filter().PageNumber),l(4),c("ngModel",i.filter().PageSize),l(5),N((d==null?null:d.length)>0?32:33)}},dependencies:[G,R,q,j,ee,$,re,ne,X,J,U,K,Q,oe,le,Z,Y,ae,ie,te],encapsulation:2})}}return m})();export{Le as CancelledComponent};
@@ -1 +1 @@
1
- import{a as C}from"./chunk-X67M7TFE.js";import{a as X,b as Y,c as Z}from"./chunk-K5GEJ2GZ.js";import"./chunk-3LRWABHB.js";import"./chunk-GIRXMYNI.js";import"./chunk-5OHRA4AS.js";import"./chunk-MH4SJTQX.js";import"./chunk-CMTBBXR5.js";import"./chunk-GRIUDEPO.js";import{b as $}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as Q,n as U}from"./chunk-UGVEAL7H.js";import{A as K,h as G,m as H}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as q,s as J}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{G as W,H as I,J as j,d as D,j as O,n as N}from"./chunk-M2FCTYGU.js";import{$c as P,Gb as _,Gc as m,Ic as T,Kc as A,Lc as R,Mb as M,Mc as L,Nc as E,Oc as V,Pc as u,Qc as k,Sc as z,Yb as l,Z as S,ad as B,dc as y,ec as x,gc as F,hc as b,ic as i,jc as n,oc as f,pa as p,rb as s,tc as w,uc as g,ya as d,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ee=t=>({empty:t});function te(t,h){if(t&1&&(i(0,"mat-radio-button",14),m(1),n()),t&2){let e=h.$implicit;l("value",e.Key)("matTooltip",e.Value==="Legacy"?"Authentication and role assignments are inherited from POS":"Authentication and role assignments are managed directly from Omni.dealpos.app"),s(),T(" ",e.Value," ")}}function oe(t,h){if(t&1){let e=f();i(0,"div",10)(1,"label",11),m(2," Authorization Mode "),n(),i(3,"div",12)(4,"mat-radio-group",13),L("ngModelChange",function(r){d(e),g();let a=u(0);return R(a.Form.AuthorizationMode,r)||(a.Form.AuthorizationMode=r),c(r)}),F(5,te,2,3,"mat-radio-button",14,x),n()()()}if(t&2){g();let e=u(0);l("ngClass",z(2,ee,e==null||e.Form==null?null:e.Form.AuthorizationMode)),s(4),A("ngModel",e.Form.AuthorizationMode),s(),b(e.Options.AuthorizationMode)}}var xe=(()=>{class t{constructor(){this.setupService=p(C),this.toastr=p($),this.route=p(W),this.setupData$=this.setupService.getConfig().pipe(S(1))}onSaveConfig(e){this.setupService.saveConfig(e).subscribe({next:o=>{console.log("Configuration saved successfully",o),this.toastr.success("Configuration saved successfully","Success"),this.route.navigate(["/menu/users/setup"])}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=_({type:t,selectors:[["app-setup-form"]],features:[k([C])],decls:17,vars:6,consts:[["headerTitle","Setup Form",3,"hideSearchBox","hideSearchDropdown"],["routerLink","/menu/users/setup",1,"btn","btn-secondary","me-3"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5"],[1,"row","mt-4"],[1,"col-12"],[1,"card"],[1,"card-body","mt-8"],[1,"row"],[1,"col-6"],[1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],[1,"mt-3"],["name","AuthorizationMode",3,"ngModelChange","ngModel"],["matTooltipPosition","above",1,"me-5",3,"value","matTooltip"]],template:function(o,r){if(o&1){let a=f();E(0),P(1,"async"),i(2,"mainpanel",0)(3,"actions")(4,"a",1),m(5," Cancel "),n(),i(6,"button",2),w("click",function(){d(a);let v=u(0);return c(r.onSaveConfig(v==null?null:v.Form))}),m(7," Save "),n()(),i(8,"content")(9,"div",3)(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9),M(16,oe,7,4,"div",10),n()()()()()()()()()}if(o&2){let a=V(B(1,3,r.setupData$));s(2),l("hideSearchBox",!0)("hideSearchDropdown",!0),s(14),y(a?16:-1)}},dependencies:[N,D,O,U,Q,J,q,j,I,Z,X,Y,K,G,H],encapsulation:2})}}return t})();export{xe as SetupFormComponent};
1
+ import{a as C}from"./chunk-5SYAYUVP.js";import{a as X,b as Y,c as Z}from"./chunk-K5GEJ2GZ.js";import"./chunk-3LRWABHB.js";import"./chunk-GIRXMYNI.js";import"./chunk-5OHRA4AS.js";import"./chunk-MH4SJTQX.js";import"./chunk-CMTBBXR5.js";import"./chunk-OWQ3RWNF.js";import{b as $}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{m as Q,n as U}from"./chunk-UGVEAL7H.js";import{A as K,h as G,m as H}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{r as q,s as J}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{G as W,H as I,J as j,d as D,j as O,n as N}from"./chunk-M2FCTYGU.js";import{$c as P,Gb as _,Gc as m,Ic as T,Kc as A,Lc as R,Mb as M,Mc as L,Nc as E,Oc as V,Pc as u,Qc as k,Sc as z,Yb as l,Z as S,ad as B,dc as y,ec as x,gc as F,hc as b,ic as i,jc as n,oc as f,pa as p,rb as s,tc as w,uc as g,ya as d,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var ee=t=>({empty:t});function te(t,h){if(t&1&&(i(0,"mat-radio-button",14),m(1),n()),t&2){let e=h.$implicit;l("value",e.Key)("matTooltip",e.Value==="Legacy"?"Authentication and role assignments are inherited from POS":"Authentication and role assignments are managed directly from Omni.dealpos.app"),s(),T(" ",e.Value," ")}}function oe(t,h){if(t&1){let e=f();i(0,"div",10)(1,"label",11),m(2," Authorization Mode "),n(),i(3,"div",12)(4,"mat-radio-group",13),L("ngModelChange",function(r){d(e),g();let a=u(0);return R(a.Form.AuthorizationMode,r)||(a.Form.AuthorizationMode=r),c(r)}),F(5,te,2,3,"mat-radio-button",14,x),n()()()}if(t&2){g();let e=u(0);l("ngClass",z(2,ee,e==null||e.Form==null?null:e.Form.AuthorizationMode)),s(4),A("ngModel",e.Form.AuthorizationMode),s(),b(e.Options.AuthorizationMode)}}var xe=(()=>{class t{constructor(){this.setupService=p(C),this.toastr=p($),this.route=p(W),this.setupData$=this.setupService.getConfig().pipe(S(1))}onSaveConfig(e){this.setupService.saveConfig(e).subscribe({next:o=>{console.log("Configuration saved successfully",o),this.toastr.success("Configuration saved successfully","Success"),this.route.navigate(["/menu/users/setup"])}})}static{this.\u0275fac=function(o){return new(o||t)}}static{this.\u0275cmp=_({type:t,selectors:[["app-setup-form"]],features:[k([C])],decls:17,vars:6,consts:[["headerTitle","Setup Form",3,"hideSearchBox","hideSearchDropdown"],["routerLink","/menu/users/setup",1,"btn","btn-secondary","me-3"],[1,"btn","btn-success",3,"click"],[1,"container-fluid","py-5"],[1,"row","mt-4"],[1,"col-12"],[1,"card"],[1,"card-body","mt-8"],[1,"row"],[1,"col-6"],[1,"form-label-group","radio",3,"ngClass"],[2,"top","-11px","background","white"],[1,"mt-3"],["name","AuthorizationMode",3,"ngModelChange","ngModel"],["matTooltipPosition","above",1,"me-5",3,"value","matTooltip"]],template:function(o,r){if(o&1){let a=f();E(0),P(1,"async"),i(2,"mainpanel",0)(3,"actions")(4,"a",1),m(5," Cancel "),n(),i(6,"button",2),w("click",function(){d(a);let v=u(0);return c(r.onSaveConfig(v==null?null:v.Form))}),m(7," Save "),n()(),i(8,"content")(9,"div",3)(10,"div",4)(11,"div",5)(12,"div",6)(13,"div",7)(14,"div",8)(15,"div",9),M(16,oe,7,4,"div",10),n()()()()()()()()()}if(o&2){let a=V(B(1,3,r.setupData$));s(2),l("hideSearchBox",!0)("hideSearchDropdown",!0),s(14),y(a?16:-1)}},dependencies:[N,D,O,U,Q,J,q,j,I,Z,X,Y,K,G,H],encapsulation:2})}}return t})();export{xe as SetupFormComponent};
@@ -1 +1 @@
1
- import{a as Ve,b as Re,c as Ne}from"./chunk-V5BKQSAT.js";import{a as Le,b as se}from"./chunk-ZMEMG7ZN.js";import{a as Ie}from"./chunk-2ODVHD2K.js";import{a as Fe}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as Ee}from"./chunk-KIPJJIYU.js";import{a as Pe}from"./chunk-D6URDVES.js";import"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as I}from"./chunk-GRIUDEPO.js";import{b as Te,e as X}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{c as Z,d as $,e as ee}from"./chunk-5JVEEL2T.js";import{b as C,c as U}from"./chunk-PW42BQIY.js";import{b as te,c as ie,d as xe,e as ne,f as oe,g as be,h as re,m as Oe,n as Me}from"./chunk-UGVEAL7H.js";import{A as E,c as ve,h as z,m as H,o as ke}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as we,s as De}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Ce,k as j,m as ye,n as M}from"./chunk-M2FCTYGU.js";import{$c as b,G as ae,Gb as w,Gc as a,Hc as y,Ic as B,Kc as v,Lc as k,Mb as P,Mc as T,Na as Y,Nc as ue,Oa as q,Oc as he,Pc as ge,Qc as fe,Ra as S,Rc as _e,Sc as Se,Yb as g,Z as me,_b as le,aa as pe,ac as de,ad as J,bd as F,dc as D,ec as V,gc as R,hc as N,ic as o,ja as A,jc as r,kc as x,oc as O,pa as h,pb as ce,rb as p,rd as Q,tc as c,uc as d,v as G,ya as f,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as W,b as K}from"./chunk-66YHNWRR.js";function qe(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("DROP_OFF"))}),o(1,"div",11),x(2,"i",12),o(3,"h3",13),a(4,"Drop off"),r()(),o(5,"p",14),a(6," You can drop off your package at the nearest shipping counter in your city. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function Je(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("PICK_UP"))}),o(1,"div",11),x(2,"i",15),o(3,"h3",16),a(4,"Pick up"),r()(),o(5,"p",17),a(6," The courier will collect the package from your address. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var We=(()=>{class n{constructor(){this.data=h(ie),this.dialogRef=h(te),this.selectedDelivery=S("DROP_OFF"),this.showPickup=S(!0),this.showDropOff=S(!0),this.initOptionsCondition()}onSelectDelivery(e){this.selectedDelivery.set(e)}initOptionsCondition(){switch(this.data.channelType){case C.Shopee:break;case C.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"text-muted","selected"],[1,"d-flex","justify-content-end",2,"margin-top","1.5rem"],[1,"btn","btn-light-blue","me-3","text-primary","btn-lg","fw-bold","mx-3","py-6",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4","titlew"],[1,"text-center","mt-4","lh-sm","subtitlew"],[1,"fa-solid","fa-hand-holding-box","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),a(4,"Delivery Order"),r(),o(5,"div",3),a(6,"Your selected order(s) will be set to"),r()(),o(7,"div")(8,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(9,"mat-dialog-content",5)(10,"div",6),P(11,qe,7,4,"div",7)(12,Je,7,4,"div",7),r(),o(13,"div",8)(14,"button",9),c("click",function(){return i.onConfirm()}),a(15," OK "),r()()()),t&2&&(p(11),D(i.showPickup()?11:-1),p(),D(i.showDropOff()?12:-1))},dependencies:[M,re,ne,oe],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{border-color:#000;color:#000}.delivery-option.selected[_ngcontent-%COMP%]{color:#5e9708;border-color:#5e9708}.delivery-option.selected[_ngcontent-%COMP%] .titlew[_ngcontent-%COMP%]{color:#5e9708;font-weight:700}.delivery-option.selected[_ngcontent-%COMP%] .subtitlew[_ngcontent-%COMP%]{color:#5e9708}"]})}}return n})();function Xe(n,u){if(n&1&&(o(0,"ng-option",3),a(1),r()),n&2){let e=u.$implicit;g("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),y(e==null?null:e.address)}}function Ze(n,u){if(n&1&&(o(0,"ng-option",6)(1,"span",7),a(2),b(3,"date"),r(),o(4,"span"),a(5),r()()),n&2){let e=u.$implicit;g("value",e==null?null:e.pickup_time_id),p(2),y(F(3,3,e==null?null:e.date,"d MMMM")),p(3),y(e==null?null:e.time_text)}}var je=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.addressList=Q(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=S(null),this.timeOptions=S(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=S(null)}onAddressChange(e){let t=this.addressList().find(i=>i.address_id===e);this.timeOptions.set(this.convertTimestampToDate(t?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(e){return e.map(t=>{let i=new Date(t.date*1e3);return K(W({},t),{date:i})})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Address"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedShipping,s)||(i.selectedShipping=s),s}),c("ngModelChange",function(s){return i.onAddressChange(s),i.onValueChanges()}),R(4,Xe,2,3,"ng-option",3,V),r()(),o(6,"div",0)(7,"label",4),a(8,"Date"),r(),o(9,"ng-select",5),T("ngModelChange",function(s){return k(i.pickupTime,s)||(i.pickupTime=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(10,Ze,6,6,"ng-option",6,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedShipping),p(),N(i.addressList()),p(5),g("clearable",!1),v("ngModel",i.pickupTime),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H,De,we],encapsulation:2})}}return n})();function $e(n,u){if(n&1&&(o(0,"ng-option",3)(1,"span",4),a(2),b(3,"date"),r(),o(4,"span"),a(5),b(6,"date"),r(),o(7,"span",5),a(8,"-"),r(),o(9,"span"),a(10),b(11,"date"),r()()),n&2){let e=u.$implicit,t=u.$index;g("value",t),p(2),y(F(3,4,e==null?null:e.start_date,"d MMMM")),p(3),y(F(6,7,e==null?null:e.start_date,"HH:mm")),p(5),y(F(11,10,e==null?null:e.end_date,"HH:mm"))}}var ze=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.timeOptions=Q(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=S(null)}onValueChanges(){let e=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:e?.start_time,end_time:e?.end_time})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Time"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedTimeIndex,s)||(i.selectedTimeIndex=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(4,$e,12,13,"ng-option",3,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedTimeIndex),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H],encapsulation:2})}}return n})();function et(n,u){if(n&1){let e=O();o(0,"shopee-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}function tt(n,u){if(n&1){let e=O();o(0,"tiktok-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}var He=(()=>{class n{constructor(){this.dialogRef=h(te),this.dialogData=h(ie),this.shippingOptions=S(this.dialogData.shippingOptions),this.channelType=S(this.dialogData.channelType),this.order=S(this.dialogData.order),this.channelTypeEnum=C,this.pickupData=S(null)}onFormChanges(e){this.pickupData.set(e)}onClose(){this.dialogRef.close()}onSave(){let e=this.generatePickupData();this.dialogRef.close(e)}generatePickupData(){switch(this.channelType()){case C.Shopee:return{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case C.Tiktok:return{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(t,i){if(t&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Set Pickup"),r(),o(5,"div",2)(6,"div",3),a(7,"Shipping Method"),r(),o(8,"div",3),a(9),r()()(),o(10,"div")(11,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(12,"mat-dialog-content",5),P(13,et,1,1,"shopee-pickup",6)(14,tt,1,1,"tiktok-pickup",6),r(),o(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),c("click",function(){return i.onClose()}),a(18," Cancel "),r(),o(19,"button",9),c("click",function(){return i.onSave()}),a(20," Ok "),r()()()),t&2){let l,s;p(9),B(" ",!((l=i.order())==null||l.LogisticService==null)&&l.LogisticService.Name?(l=i.order())==null||l.LogisticService==null?null:l.LogisticService.Name:"-"," "),p(4),D((s=i.channelType())===i.channelTypeEnum.Shopee?13:s===i.channelTypeEnum.Tiktok?14:-1)}},dependencies:[M,re,ne,be,oe,E,je,ze],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']})}}return n})();var Ue=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetTiktokShippingOptions,{OrderNumber:e,ShopID:t}).pipe(G(i=>this.formatDatePickUpOptions(i)))}pickupOrder(e){return this.httpService.post(I.TiktokSelectShipping,e)}dropOffOrder(e,t){let i={handover_method:"DROP_OFF",PackageID:e,ShopID:t};return this.httpService.post(I.TiktokSelectShipping,i)}formatDatePickUpOptions(e){return e?.Options?.pickup_slots&&(e.Options.pickup_slots=e?.Options?.pickup_slots.map(t=>{let i=U.convertTimestampToDate(t.start_time),l=U.convertTimestampToDate(t.end_time);return t.start_date=i,t.end_date=l,t})),e}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ke=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetShopeeShippingOptions,{OrderNumber:e,ShopID:t})}pickupOrder(e){return this.httpService.post(I.ShopeeSelectShipping,e)}dropOffOrder(e,t){let i={OrderNumber:e,ShopID:t,dropoff:{}};return this.httpService.post(I.ShopeeSelectShipping,i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ge=(()=>{class n{constructor(){this.shopeeShippingService=h(Ke),this.tiktokShippingService=h(Ue)}getShippingOptions(e,t,i){switch(i){case C.Shopee:return this.getShopeeShippingOptions(e,t);case C.Tiktok:return this.getTiktokShippingOptions(e,t)}}pickupOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.pickupOrder(t);case C.Tiktok:return this.tiktokShippingService.pickupOrder(t)}}dropOffOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.dropOffOrder(e.Number,e.ShopID);case C.Tiktok:let i=t?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(i,e.ShopID)}}getShopeeShippingOptions(e,t){return this.shopeeShippingService.getShippingOptions(e,t)}getTiktokShippingOptions(e,t){return this.tiktokShippingService.getShippingOptions(e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var it=()=>[],nt=n=>({"td-cell-hover":n});function ot(n,u){if(n&1&&x(0,"variants-dropdown",30),n&2){let e=d().$implicit;g("variants",e==null?null:e.Variants)}}function rt(n,u){if(n&1&&x(0,"variant-with-image",31),n&2){let e=d().$implicit;g("variant",e==null?null:e.Variants[0])}}function at(n,u){if(n&1&&(o(0,"span"),a(1),r()),n&2){let e=d().$implicit;p(),B("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function pt(n,u){if(n&1){let e=O();o(0,"button",35),c("click",function(){f(e);let i=d().$implicit,l=d(2);return _(l.onSetFulfillment(i))}),a(1," Set Fulfillment "),r()}}function lt(n,u){if(n&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"div",26)(5,"div",27)(6,"div"),x(7,"img",28),b(8,"channelImage"),r(),o(9,"div"),x(10,"order-link",29),r()(),o(11,"small"),a(12),b(13,"date"),r()()(),o(14,"td"),a(15),r(),o(16,"td"),P(17,ot,1,1,"variants-dropdown",30)(18,rt,1,1,"variant-with-image",31),r(),o(19,"td",32),a(20),b(21,"number"),r(),o(22,"td")(23,"div",26)(24,"div",27)(25,"span"),a(26),r(),P(27,at,2,1,"span"),r(),o(28,"small"),a(29),r()()(),o(30,"td",33),P(31,pt,2,0,"button",34),r()()),n&2){let e=u.$implicit,t=d(2);p(2),y(e.Outlet),p(5),g("src",J(8,14,e==null?null:e.MarketType),ce)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(3),g("order",e),p(2),B(" ",F(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),y(e.Customer),p(),de(Se(21,nt,(e.Variants==null?null:e.Variants.length)>1)),p(),D((e.Variants==null?null:e.Variants.length)>1?17:18),p(3),y(J(21,19,e.Amount)),p(6),y(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),D(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),p(2),B(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),D((e==null?null:e.MarketType)!=t.channelType.WooCommerce?31:-1)}}function st(n,u){if(n&1){let e=O();o(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),r(),o(6,"th",21),a(7,"Number"),r(),o(8,"th",21),a(9,"Customer"),r(),o(10,"th"),a(11,"Items"),r(),o(12,"th",22),a(13,"Amount"),r(),o(14,"th",23),a(15,"Shipping"),r(),x(16,"th",24),r()(),o(17,"tbody"),R(18,lt,32,23,"tr",null,V),r()(),o(20,"app-custom-paginator",25),c("next",function(){f(e);let i=d();return _(i.initReadyToShip())})("previous",function(){f(e);let i=d();return _(i.initReadyToShip())}),r()()}if(n&2){let e=d(),t=ge(0);p(18),N(t),p(2),g("filter",e.filter())("totaldata",t==null?null:t.length)}}function mt(n,u){n&1&&(o(0,"div",16),x(1,"app-empty-state"),r())}var Mi=(()=>{class n{constructor(){this.dialog=h(xe),this.pickupService=h(Ge),this.toastr=h(Te),this.orderService=h(se),this.channelType=C,this.filter=S({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(t=>K(W({},t),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(me(1))}onFilterChange(e){this.filter.update(t=>W(W({},t),e))}onSetFulfillment(e){this.pickupService.getShippingOptions(e.Number,e.ShopID,e.MarketType).pipe(pe(t=>this.dialog.open(We,{height:"400px",width:"530px",data:{options:t,channelType:e.MarketType}}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),G(i=>({type:i,order:e,options:t}))))).subscribe(t=>{t.type=="PICK_UP"?this.onSelectPickup(t.order,t.options):this.onSelectDropOff(t.order,t.options)})}onSelectPickup(e,t){this.dialog.open(He,{width:"530px",data:{order:e,shippingOptions:t,channelType:e.MarketType},disableClose:!0}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),pe(i=>this.pickupService.pickupOrder(e,i))).subscribe(()=>{this.toastr.success("Pickup order created successfully","Success"),this.initReadyToShip()})}onSelectDropOff(e,t){this.pickupService.dropOffOrder(e,t).subscribe(()=>{this.toastr.success("Drop-off order created successfully","Success"),this.initReadyToShip()})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-ready-to-ship"]],features:[fe([se])],decls:34,vars:12,consts:[["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","160px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[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"],[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(t,i){if(t&1){let l=O();ue(0),b(1,"async"),o(2,"mainpanel",0),c("onSubmit",function(){return f(l),_(i.initReadyToShip())}),T("textChange",function(m){return f(l),k(i.filter().Number,m)||(i.filter().Number=m),_(m)}),o(3,"actions")(4,"a",1),x(5,"i",2),o(6,"span"),a(7,"Order Fulfillment Display"),r()()(),o(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),r(),o(12,"channel-select-options",4),T("ngModelChange",function(m){return f(l),k(i.filter().ListChannelID,m)||(i.filter().ListChannelID=m),_(m)}),r()(),o(13,"div",5)(14,"label",3),a(15,"From/To"),r(),o(16,"div",6)(17,"datepicker",7),T("dateChange",function(m){return f(l),k(i.filter().From,m)||(i.filter().From=m),_(m)}),r()(),o(18,"div")(19,"datepicker",8),T("dateChange",function(m){return f(l),k(i.filter().To,m)||(i.filter().To=m),_(m)}),r()()(),o(20,"div",5)(21,"label",9),a(22,"Page Number"),r(),o(23,"input",10),T("ngModelChange",function(m){return f(l),k(i.filter().PageNumber,m)||(i.filter().PageNumber=m),_(m)}),r()(),o(24,"div",5)(25,"label",9),a(26,"Page Size"),r(),o(27,"input",11),T("ngModelChange",function(m){return f(l),k(i.filter().PageSize,m)||(i.filter().PageSize=m),_(m)}),r()()(),o(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),P(32,st,21,2,"div",15)(33,mt,2,0,"div",16),r()()()()()}if(t&2){let l=he(J(1,8,i.readyToShip$)||_e(11,it));p(2),v("text",i.filter().Number),p(10),g("multiple",!0),v("ngModel",i.filter().ListChannelID),p(5),v("date",i.filter().From),p(2),v("date",i.filter().To),p(4),v("ngModel",i.filter().PageNumber),p(4),v("ngModel",i.filter().PageSize),p(5),D(l.length>0?32:33)}},dependencies:[M,Ce,ye,j,Me,Oe,Fe,Pe,E,ve,ke,z,H,Ve,Re,Ne,Ie,Ee,Le],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%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return n})();export{Mi as ReadyToShipComponent};
1
+ import{a as Ve,b as Re,c as Ne}from"./chunk-V5BKQSAT.js";import{a as Le,b as se}from"./chunk-7YA3MQOI.js";import{a as Ie}from"./chunk-2ODVHD2K.js";import{a as Fe}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as Ee}from"./chunk-WMFWJNS5.js";import{a as Pe}from"./chunk-D6URDVES.js";import"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as I}from"./chunk-OWQ3RWNF.js";import{b as Te,e as X}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{c as Z,d as $,e as ee}from"./chunk-5JVEEL2T.js";import{b as C,c as U}from"./chunk-PW42BQIY.js";import{b as te,c as ie,d as xe,e as ne,f as oe,g as be,h as re,m as Oe,n as Me}from"./chunk-UGVEAL7H.js";import{A as E,c as ve,h as z,m as H,o as ke}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as we,s as De}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Ce,k as j,m as ye,n as M}from"./chunk-M2FCTYGU.js";import{$c as b,G as ae,Gb as w,Gc as a,Hc as y,Ic as B,Kc as v,Lc as k,Mb as P,Mc as T,Na as Y,Nc as ue,Oa as q,Oc as he,Pc as ge,Qc as fe,Ra as S,Rc as _e,Sc as Se,Yb as g,Z as me,_b as le,aa as pe,ac as de,ad as J,bd as F,dc as D,ec as V,gc as R,hc as N,ic as o,ja as A,jc as r,kc as x,oc as O,pa as h,pb as ce,rb as p,rd as Q,tc as c,uc as d,v as G,ya as f,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as W,b as K}from"./chunk-66YHNWRR.js";function qe(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("DROP_OFF"))}),o(1,"div",11),x(2,"i",12),o(3,"h3",13),a(4,"Drop off"),r()(),o(5,"p",14),a(6," You can drop off your package at the nearest shipping counter in your city. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function Je(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("PICK_UP"))}),o(1,"div",11),x(2,"i",15),o(3,"h3",16),a(4,"Pick up"),r()(),o(5,"p",17),a(6," The courier will collect the package from your address. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var We=(()=>{class n{constructor(){this.data=h(ie),this.dialogRef=h(te),this.selectedDelivery=S("DROP_OFF"),this.showPickup=S(!0),this.showDropOff=S(!0),this.initOptionsCondition()}onSelectDelivery(e){this.selectedDelivery.set(e)}initOptionsCondition(){switch(this.data.channelType){case C.Shopee:break;case C.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"text-muted","selected"],[1,"d-flex","justify-content-end",2,"margin-top","1.5rem"],[1,"btn","btn-light-blue","me-3","text-primary","btn-lg","fw-bold","mx-3","py-6",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4","titlew"],[1,"text-center","mt-4","lh-sm","subtitlew"],[1,"fa-solid","fa-hand-holding-box","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),a(4,"Delivery Order"),r(),o(5,"div",3),a(6,"Your selected order(s) will be set to"),r()(),o(7,"div")(8,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(9,"mat-dialog-content",5)(10,"div",6),P(11,qe,7,4,"div",7)(12,Je,7,4,"div",7),r(),o(13,"div",8)(14,"button",9),c("click",function(){return i.onConfirm()}),a(15," OK "),r()()()),t&2&&(p(11),D(i.showPickup()?11:-1),p(),D(i.showDropOff()?12:-1))},dependencies:[M,re,ne,oe],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{border-color:#000;color:#000}.delivery-option.selected[_ngcontent-%COMP%]{color:#5e9708;border-color:#5e9708}.delivery-option.selected[_ngcontent-%COMP%] .titlew[_ngcontent-%COMP%]{color:#5e9708;font-weight:700}.delivery-option.selected[_ngcontent-%COMP%] .subtitlew[_ngcontent-%COMP%]{color:#5e9708}"]})}}return n})();function Xe(n,u){if(n&1&&(o(0,"ng-option",3),a(1),r()),n&2){let e=u.$implicit;g("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),y(e==null?null:e.address)}}function Ze(n,u){if(n&1&&(o(0,"ng-option",6)(1,"span",7),a(2),b(3,"date"),r(),o(4,"span"),a(5),r()()),n&2){let e=u.$implicit;g("value",e==null?null:e.pickup_time_id),p(2),y(F(3,3,e==null?null:e.date,"d MMMM")),p(3),y(e==null?null:e.time_text)}}var je=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.addressList=Q(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=S(null),this.timeOptions=S(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=S(null)}onAddressChange(e){let t=this.addressList().find(i=>i.address_id===e);this.timeOptions.set(this.convertTimestampToDate(t?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(e){return e.map(t=>{let i=new Date(t.date*1e3);return K(W({},t),{date:i})})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Address"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedShipping,s)||(i.selectedShipping=s),s}),c("ngModelChange",function(s){return i.onAddressChange(s),i.onValueChanges()}),R(4,Xe,2,3,"ng-option",3,V),r()(),o(6,"div",0)(7,"label",4),a(8,"Date"),r(),o(9,"ng-select",5),T("ngModelChange",function(s){return k(i.pickupTime,s)||(i.pickupTime=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(10,Ze,6,6,"ng-option",6,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedShipping),p(),N(i.addressList()),p(5),g("clearable",!1),v("ngModel",i.pickupTime),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H,De,we],encapsulation:2})}}return n})();function $e(n,u){if(n&1&&(o(0,"ng-option",3)(1,"span",4),a(2),b(3,"date"),r(),o(4,"span"),a(5),b(6,"date"),r(),o(7,"span",5),a(8,"-"),r(),o(9,"span"),a(10),b(11,"date"),r()()),n&2){let e=u.$implicit,t=u.$index;g("value",t),p(2),y(F(3,4,e==null?null:e.start_date,"d MMMM")),p(3),y(F(6,7,e==null?null:e.start_date,"HH:mm")),p(5),y(F(11,10,e==null?null:e.end_date,"HH:mm"))}}var ze=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.timeOptions=Q(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=S(null)}onValueChanges(){let e=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:e?.start_time,end_time:e?.end_time})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Time"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedTimeIndex,s)||(i.selectedTimeIndex=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(4,$e,12,13,"ng-option",3,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedTimeIndex),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H],encapsulation:2})}}return n})();function et(n,u){if(n&1){let e=O();o(0,"shopee-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}function tt(n,u){if(n&1){let e=O();o(0,"tiktok-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}var He=(()=>{class n{constructor(){this.dialogRef=h(te),this.dialogData=h(ie),this.shippingOptions=S(this.dialogData.shippingOptions),this.channelType=S(this.dialogData.channelType),this.order=S(this.dialogData.order),this.channelTypeEnum=C,this.pickupData=S(null)}onFormChanges(e){this.pickupData.set(e)}onClose(){this.dialogRef.close()}onSave(){let e=this.generatePickupData();this.dialogRef.close(e)}generatePickupData(){switch(this.channelType()){case C.Shopee:return{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case C.Tiktok:return{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(t,i){if(t&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Set Pickup"),r(),o(5,"div",2)(6,"div",3),a(7,"Shipping Method"),r(),o(8,"div",3),a(9),r()()(),o(10,"div")(11,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(12,"mat-dialog-content",5),P(13,et,1,1,"shopee-pickup",6)(14,tt,1,1,"tiktok-pickup",6),r(),o(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),c("click",function(){return i.onClose()}),a(18," Cancel "),r(),o(19,"button",9),c("click",function(){return i.onSave()}),a(20," Ok "),r()()()),t&2){let l,s;p(9),B(" ",!((l=i.order())==null||l.LogisticService==null)&&l.LogisticService.Name?(l=i.order())==null||l.LogisticService==null?null:l.LogisticService.Name:"-"," "),p(4),D((s=i.channelType())===i.channelTypeEnum.Shopee?13:s===i.channelTypeEnum.Tiktok?14:-1)}},dependencies:[M,re,ne,be,oe,E,je,ze],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']})}}return n})();var Ue=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetTiktokShippingOptions,{OrderNumber:e,ShopID:t}).pipe(G(i=>this.formatDatePickUpOptions(i)))}pickupOrder(e){return this.httpService.post(I.TiktokSelectShipping,e)}dropOffOrder(e,t){let i={handover_method:"DROP_OFF",PackageID:e,ShopID:t};return this.httpService.post(I.TiktokSelectShipping,i)}formatDatePickUpOptions(e){return e?.Options?.pickup_slots&&(e.Options.pickup_slots=e?.Options?.pickup_slots.map(t=>{let i=U.convertTimestampToDate(t.start_time),l=U.convertTimestampToDate(t.end_time);return t.start_date=i,t.end_date=l,t})),e}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ke=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetShopeeShippingOptions,{OrderNumber:e,ShopID:t})}pickupOrder(e){return this.httpService.post(I.ShopeeSelectShipping,e)}dropOffOrder(e,t){let i={OrderNumber:e,ShopID:t,dropoff:{}};return this.httpService.post(I.ShopeeSelectShipping,i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ge=(()=>{class n{constructor(){this.shopeeShippingService=h(Ke),this.tiktokShippingService=h(Ue)}getShippingOptions(e,t,i){switch(i){case C.Shopee:return this.getShopeeShippingOptions(e,t);case C.Tiktok:return this.getTiktokShippingOptions(e,t)}}pickupOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.pickupOrder(t);case C.Tiktok:return this.tiktokShippingService.pickupOrder(t)}}dropOffOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.dropOffOrder(e.Number,e.ShopID);case C.Tiktok:let i=t?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(i,e.ShopID)}}getShopeeShippingOptions(e,t){return this.shopeeShippingService.getShippingOptions(e,t)}getTiktokShippingOptions(e,t){return this.tiktokShippingService.getShippingOptions(e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var it=()=>[],nt=n=>({"td-cell-hover":n});function ot(n,u){if(n&1&&x(0,"variants-dropdown",30),n&2){let e=d().$implicit;g("variants",e==null?null:e.Variants)}}function rt(n,u){if(n&1&&x(0,"variant-with-image",31),n&2){let e=d().$implicit;g("variant",e==null?null:e.Variants[0])}}function at(n,u){if(n&1&&(o(0,"span"),a(1),r()),n&2){let e=d().$implicit;p(),B("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function pt(n,u){if(n&1){let e=O();o(0,"button",35),c("click",function(){f(e);let i=d().$implicit,l=d(2);return _(l.onSetFulfillment(i))}),a(1," Set Fulfillment "),r()}}function lt(n,u){if(n&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"div",26)(5,"div",27)(6,"div"),x(7,"img",28),b(8,"channelImage"),r(),o(9,"div"),x(10,"order-link",29),r()(),o(11,"small"),a(12),b(13,"date"),r()()(),o(14,"td"),a(15),r(),o(16,"td"),P(17,ot,1,1,"variants-dropdown",30)(18,rt,1,1,"variant-with-image",31),r(),o(19,"td",32),a(20),b(21,"number"),r(),o(22,"td")(23,"div",26)(24,"div",27)(25,"span"),a(26),r(),P(27,at,2,1,"span"),r(),o(28,"small"),a(29),r()()(),o(30,"td",33),P(31,pt,2,0,"button",34),r()()),n&2){let e=u.$implicit,t=d(2);p(2),y(e.Outlet),p(5),g("src",J(8,14,e==null?null:e.MarketType),ce)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(3),g("order",e),p(2),B(" ",F(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),y(e.Customer),p(),de(Se(21,nt,(e.Variants==null?null:e.Variants.length)>1)),p(),D((e.Variants==null?null:e.Variants.length)>1?17:18),p(3),y(J(21,19,e.Amount)),p(6),y(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),D(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),p(2),B(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),D((e==null?null:e.MarketType)!=t.channelType.WooCommerce?31:-1)}}function st(n,u){if(n&1){let e=O();o(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),r(),o(6,"th",21),a(7,"Number"),r(),o(8,"th",21),a(9,"Customer"),r(),o(10,"th"),a(11,"Items"),r(),o(12,"th",22),a(13,"Amount"),r(),o(14,"th",23),a(15,"Shipping"),r(),x(16,"th",24),r()(),o(17,"tbody"),R(18,lt,32,23,"tr",null,V),r()(),o(20,"app-custom-paginator",25),c("next",function(){f(e);let i=d();return _(i.initReadyToShip())})("previous",function(){f(e);let i=d();return _(i.initReadyToShip())}),r()()}if(n&2){let e=d(),t=ge(0);p(18),N(t),p(2),g("filter",e.filter())("totaldata",t==null?null:t.length)}}function mt(n,u){n&1&&(o(0,"div",16),x(1,"app-empty-state"),r())}var Mi=(()=>{class n{constructor(){this.dialog=h(xe),this.pickupService=h(Ge),this.toastr=h(Te),this.orderService=h(se),this.channelType=C,this.filter=S({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(t=>K(W({},t),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(me(1))}onFilterChange(e){this.filter.update(t=>W(W({},t),e))}onSetFulfillment(e){this.pickupService.getShippingOptions(e.Number,e.ShopID,e.MarketType).pipe(pe(t=>this.dialog.open(We,{height:"400px",width:"530px",data:{options:t,channelType:e.MarketType}}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),G(i=>({type:i,order:e,options:t}))))).subscribe(t=>{t.type=="PICK_UP"?this.onSelectPickup(t.order,t.options):this.onSelectDropOff(t.order,t.options)})}onSelectPickup(e,t){this.dialog.open(He,{width:"530px",data:{order:e,shippingOptions:t,channelType:e.MarketType},disableClose:!0}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),pe(i=>this.pickupService.pickupOrder(e,i))).subscribe(()=>{this.toastr.success("Pickup order created successfully","Success"),this.initReadyToShip()})}onSelectDropOff(e,t){this.pickupService.dropOffOrder(e,t).subscribe(()=>{this.toastr.success("Drop-off order created successfully","Success"),this.initReadyToShip()})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-ready-to-ship"]],features:[fe([se])],decls:34,vars:12,consts:[["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","160px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[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"],[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(t,i){if(t&1){let l=O();ue(0),b(1,"async"),o(2,"mainpanel",0),c("onSubmit",function(){return f(l),_(i.initReadyToShip())}),T("textChange",function(m){return f(l),k(i.filter().Number,m)||(i.filter().Number=m),_(m)}),o(3,"actions")(4,"a",1),x(5,"i",2),o(6,"span"),a(7,"Order Fulfillment Display"),r()()(),o(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),r(),o(12,"channel-select-options",4),T("ngModelChange",function(m){return f(l),k(i.filter().ListChannelID,m)||(i.filter().ListChannelID=m),_(m)}),r()(),o(13,"div",5)(14,"label",3),a(15,"From/To"),r(),o(16,"div",6)(17,"datepicker",7),T("dateChange",function(m){return f(l),k(i.filter().From,m)||(i.filter().From=m),_(m)}),r()(),o(18,"div")(19,"datepicker",8),T("dateChange",function(m){return f(l),k(i.filter().To,m)||(i.filter().To=m),_(m)}),r()()(),o(20,"div",5)(21,"label",9),a(22,"Page Number"),r(),o(23,"input",10),T("ngModelChange",function(m){return f(l),k(i.filter().PageNumber,m)||(i.filter().PageNumber=m),_(m)}),r()(),o(24,"div",5)(25,"label",9),a(26,"Page Size"),r(),o(27,"input",11),T("ngModelChange",function(m){return f(l),k(i.filter().PageSize,m)||(i.filter().PageSize=m),_(m)}),r()()(),o(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),P(32,st,21,2,"div",15)(33,mt,2,0,"div",16),r()()()()()}if(t&2){let l=he(J(1,8,i.readyToShip$)||_e(11,it));p(2),v("text",i.filter().Number),p(10),g("multiple",!0),v("ngModel",i.filter().ListChannelID),p(5),v("date",i.filter().From),p(2),v("date",i.filter().To),p(4),v("ngModel",i.filter().PageNumber),p(4),v("ngModel",i.filter().PageSize),p(5),D(l.length>0?32:33)}},dependencies:[M,Ce,ye,j,Me,Oe,Fe,Pe,E,ve,ke,z,H,Ve,Re,Ne,Ie,Ee,Le],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%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return n})();export{Mi as ReadyToShipComponent};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-GRIUDEPO.js";import{e as c}from"./chunk-JXSBFTQM.js";import{ja as i,pa as o}from"./chunk-B7KTCPKC.js";var h=(()=>{class t{constructor(){this.httpService=o(c)}getConfig(){return this.httpService.post(r.PosAccountGetConfig,{})}saveConfig(e){return this.httpService.post(r.SubmitConfig,e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{h as a};
1
+ import{a as r}from"./chunk-OWQ3RWNF.js";import{e as c}from"./chunk-JXSBFTQM.js";import{ja as i,pa as o}from"./chunk-B7KTCPKC.js";var h=(()=>{class t{constructor(){this.httpService=o(c)}getConfig(){return this.httpService.post(r.PosAccountGetConfig,{})}saveConfig(e){return this.httpService.post(r.SubmitConfig,e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=i({token:t,factory:t.\u0275fac})}}return t})();export{h as a};
@@ -1 +1 @@
1
- import{a as Be}from"./chunk-SLI26GUH.js";import{a as De}from"./chunk-LDHQNVI5.js";import"./chunk-K5GEJ2GZ.js";import{a as Ne}from"./chunk-P7NATRFC.js";import"./chunk-YM4TJJMM.js";import{b as Ve}from"./chunk-ZQ5EGXEB.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import{a as L}from"./chunk-XHAXYWZ7.js";import{a as ke,b as Oe,c as Le,d as W}from"./chunk-3OIE7ARG.js";import"./chunk-YPWHTELF.js";import"./chunk-M5XGP4SG.js";import{a as Fe}from"./chunk-TPW56VWM.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import{a as Te}from"./chunk-SYUFPF3D.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as he}from"./chunk-UMP6ZMEJ.js";import"./chunk-CMTBBXR5.js";import{a as Ee}from"./chunk-7KG3DC5J.js";import"./chunk-3VUDKIND.js";import{a as Me}from"./chunk-KIPJJIYU.js";import{h as Se}from"./chunk-WY4BY2ID.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-GRIUDEPO.js";import{b as ge,e as Ce}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import{c as O}from"./chunk-PW42BQIY.js";import{d as Ie,m as ve,n as ye}from"./chunk-UGVEAL7H.js";import{A as ue,b as me,h as de,m as _e}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as fe,b as xe,c as Pe}from"./chunk-SWQXSJ7O.js";import{r as be,s as we}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{d as re,f as ae,g as le,j as ce,m as se,n as pe}from"./chunk-M2FCTYGU.js";import{$c as f,Fc as U,G as B,Gb as Z,Gc as m,Hc as Y,Ic as y,Kc as D,Lc as M,Mb as g,Mc as N,Nc as ee,Oc as te,Pc as A,Qc as ne,Ra as X,Sc as k,Tc as ie,Yb as p,Z as R,ad as I,bd as oe,cd as j,dc as q,ea as J,ec as F,gc as T,hc as V,ic as o,jc as a,kc as P,lc as w,mc as v,oc as S,p as K,pa as $,pb as E,rb as r,tc as C,uc as s,v as H,xb as x,xc as Q,ya as _,za as u}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as G,b as z}from"./chunk-66YHNWRR.js";var Re=n=>[n],$e=n=>({"text-decoration-line-through":n}),Ue=n=>({"border-bottom":n}),Ae=(n,c)=>({"bg-gradient-warning":n,"border pointer cell-hover":c});function je(n,c){if(n&1){let e=S();w(0),o(1,"div")(2,"label",21),m(3,"Channel"),a(),o(4,"channel-select-options",22),N("ngModelChange",function(t){_(e);let l=s();return M(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),u(t)}),a()(),o(5,"div",23)(6,"label",24),m(7,"Filter by"),a(),o(8,"lib-radio-options",25),N("modelChange",function(t){_(e);let l=s();return M(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),u(t)}),a()(),v()}if(n&2){let e=s();r(4),p("multiple",!0),D("ngModel",e.searchFilter.ListChannelID),r(4),D("model",e.searchFilter.filterModel),p("options",e.filterTypeOptions)}}function We(n,c){if(n&1){let e=S();o(0,"button",27),C("click",function(){_(e);let t=s().ngIf,l=s();return u(l.onUpdateItems(t))}),P(1,"i",28),m(2," Update "),a()}}function Ge(n,c){if(n&1&&(w(0),o(1,"div",4),g(2,We,3,0,"button",26),a(),v()),n&2){let e=c.ngIf,i=s();r(2),p("ngIf",i.productService.hasSelectionVariant(e))}}function ze(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),P(2,"img",30),o(3,"div",31),m(4),f(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),p("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),p("src",e==null?null:e.Img,E),r(2),y(" ",oe(5,3,e.Name,20)," ")}}function Ke(n,c){if(n&1){let e=S();o(0,"th")(1,"input",32),N("ngModelChange",function(t){_(e);let l=s();return M(l.checkboxState,t)||(l.checkboxState=t),u(t)}),C("ngModelChange",function(){_(e);let t=s();return u(t.onSelectAllData())}),a()()}if(n&2){let e=s();r(),D("ngModel",e.checkboxState)}}function He(n,c){n&1&&(o(0,"th",33)(1,"span"),m(2,"Expected"),a(),o(3,"span",34),m(4,"(POS)"),a()(),o(5,"th",33),m(6,"Channel"),a())}function Je(n,c){if(n&1){let e=S();o(0,"img",47),C("click",function(t){_(e);let l=s(3).$implicit,d=s(2);return u(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=s(3).$implicit;Q("src",e==null?null:e.ImageUrl,E)}}function Xe(n,c){n&1&&P(0,"img",48)}function Ze(n,c){if(n&1&&(o(0,"small",46),m(1),a()),n&2){let e=s(3).$implicit;r(),y("(",e==null?null:e.Category,")")}}function qe(n,c){if(n&1&&(w(0),o(1,"td",42),g(2,Je,1,1,"img",43)(3,Xe,1,0,"ng-template",null,0,j),a(),o(5,"td",44)(6,"h5",45),m(7),a(),g(8,Ze,2,1,"small",46),a(),v()),n&2){let e=U(4),i=s().$index,t=s().$implicit,l=s().ngIf;r(),p("rowSpan",t==null?null:t.Variants.length)("ngClass",k(7,Ue,i+1==l.length)),r(),p("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),p("rowSpan",t==null?null:t.Variants.length),r(2),Y(t==null?null:t.Name),r(),q(t!=null&&t.Category?8:-1)}}function Qe(n,c){if(n&1){let e=S();o(0,"td",49)(1,"input",32),N("ngModelChange",function(t){_(e);let l=s().$implicit;return M(l.selected,t)||(l.selected=t),u(t)}),a()()}if(n&2){let e=s().$implicit;r(),D("ngModel",e.selected)}}function Ye(n,c){if(n&1){let e=S();w(0),o(1,"td",51),m(2),f(3,"number"),a(),o(4,"td",52),C("click",function(){let t=_(e).$implicit,l=s(2).$implicit,d=s().$implicit,h=s(2),b=A(0);return u(h.openTableDialog(l,d,t,b))}),o(5,"div",53)(6,"div",54),m(7),f(8,"number"),a(),o(9,"a",55),C("click",function(t){return _(e),u(t==null?null:t.stopPropagation())}),P(10,"i",40),a()()(),v()}if(n&2){let e=c.$implicit;s(5);let i=A(0);r(2),y(" ",I(3,4,e.PriceExpected)," "),r(2),p("ngClass",ie(8,Ae,e.Price!=e.PriceExpected,i)),r(3),y(" ",I(8,6,e.Price)," "),r(2),p("href",e.Url,E)}}function et(n,c){n&1&&(o(0,"td",56),m(1," X "),a(),o(2,"td",56),m(3," X "),a())}function tt(n,c){if(n&1&&(w(0),g(1,Ye,11,11,"ng-container",50)(2,et,4,0,"ng-template",null,1,j),v()),n&2){let e=c.$implicit,i=U(3),t=s().$implicit,l=s(3);r(),p("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function nt(n,c){if(n&1&&(o(0,"tr"),g(1,qe,9,9,"ng-container",3),o(2,"td",35),m(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),m(7),a(),o(8,"div",31)(9,"a",39),P(10,"i",40),a()()()(),g(11,Qe,2,1,"ng-template",19)(12,tt,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=s(3);r(),p("ngIf",i==0),r(2),y(" ",e==null?null:e.Model," "),r(),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),p("ngClass",k(8,$e,e.Discontinued)),r(),y(" ",e==null?null:e.Code," "),r(2),p("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),E),r(2),p("ngxPermissionsOnly",k(10,Re,t.rolePriceEdit)),r(),p("ngForOf",t.channels())}}function it(n,c){if(n&1&&(o(0,"tbody"),T(1,nt,13,12,"tr",null,F),a()),n&2){let e=c.$implicit;r(),V(e.Variants)}}function ot(n,c){if(n&1&&(w(0),T(1,it,3,0,"tbody",null,F),v()),n&2){let e=c.ngIf;r(),V(e)}}var Ut=(()=>{class n{constructor(e,i,t,l,d,h,b){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=h,this.paginationService=b,this.infinitePagination=$(W),this.permissionService=$(fe),this.searchFilter=new Ee,this.checkboxState=!1,this.rolePriceEdit=he.PriceUpdate,this.hasRolePriceEdit=K(this.permissionService.hasPermission(this.rolePriceEdit)),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.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=X([]),this.filterTypeOptions=[{Key:L.ALL,Value:"All"},{Key:L.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];O.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(R(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(J(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=L.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),R(1))}onSelectAllData(){this.data$=this.data$.pipe(H(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=z(G({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(h=>h.ID),d={ListChannelID:this.channelOptions.filter(h=>h.selected).map(h=>h.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:h=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:h=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(Ne,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(B(t=>O.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t,l){if(l){let d=JSON.parse(JSON.stringify(e));this.dialog.open(ke,{data:{Name:i.Name,Variant:d,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(B(b=>O.IsNotEmpty(b))).subscribe(b=>{this.updateProductPrice(b,t)})}}updateProductPrice(e,i){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(x(Ce),x(ge),x(Ie),x(Fe),x(Se),x(Te),x(De))}}static{this.\u0275cmp=Z({type:n,selectors:[["app-custom-channel-price"]],features:[ne([W])],decls:40,vars:26,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){if(i&1){let l=S();ee(0),f(1,"async"),o(2,"mainpanel",2),C("onSubmit",function(h){return _(l),u(t.onFilter(h))}),o(3,"filters"),g(4,je,9,4,"ng-container",3),f(5,"async"),a(),o(6,"actions")(7,"div",4),g(8,Ge,3,1,"ng-container",3),f(9,"async"),o(10,"button",5),C("click",function(){return _(l),u(t.openExportDialog())}),P(11,"i",6),o(12,"span"),m(13,"Export"),a()()()(),o(14,"content")(15,"div",7)(16,"div",8)(17,"div",9)(18,"div",10)(19,"table",11)(20,"thead",12)(21,"tr",13),P(22,"th",14),T(23,ze,6,6,"th",15,F),a(),o(25,"tr")(26,"th",16)(27,"span"),m(28," Product "),a()(),o(29,"th",17),m(30,"Variant"),a(),o(31,"th",18),m(32,"SKU"),a(),g(33,Ke,2,1,"ng-template",19),T(34,He,7,0,null,null,F),a()(),g(36,ot,3,0,"ng-container",3),f(37,"async"),a(),o(38,"infinite-paginator",20),f(39,"async"),C("onNextPage",function(){return _(l),u(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){return _(l),u(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){return _(l),u(t.infinitePagination.getRowCount(t.searchFilter))}),a()()()()()()()}i&2&&(te(I(1,13,t.hasRolePriceEdit)),r(2),p("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),p("ngIf",I(5,16,t.loader$)),r(4),p("ngIf",I(9,18,t.data$)),r(15),V(t.channels()),r(10),p("ngxPermissionsOnly",k(24,Re,t.rolePriceEdit)),r(),V(t.channels()),r(2),p("ngIf",I(37,20,t.data$)),r(2),p("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",I(39,22,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[pe,re,ae,le,ce,se,ye,ve,ue,me,de,_e,Le,Be,we,be,Oe,Pe,xe,Me],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{Ut as CustomChannelPriceComponent};
1
+ import{a as Be}from"./chunk-SLI26GUH.js";import{a as De}from"./chunk-LDHQNVI5.js";import"./chunk-K5GEJ2GZ.js";import{a as Ne}from"./chunk-P7NATRFC.js";import"./chunk-YM4TJJMM.js";import{b as Ve}from"./chunk-ZQ5EGXEB.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import{a as L}from"./chunk-XHAXYWZ7.js";import{a as ke,b as Oe,c as Le,d as W}from"./chunk-3OIE7ARG.js";import"./chunk-YPWHTELF.js";import"./chunk-M5XGP4SG.js";import{a as Fe}from"./chunk-YTL4RBBS.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import{a as Te}from"./chunk-SYUFPF3D.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as he}from"./chunk-UMP6ZMEJ.js";import"./chunk-CMTBBXR5.js";import{a as Ee}from"./chunk-7KG3DC5J.js";import"./chunk-ZOKAF4JQ.js";import{a as Me}from"./chunk-WMFWJNS5.js";import{h as Se}from"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-OWQ3RWNF.js";import{b as ge,e as Ce}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import{c as O}from"./chunk-PW42BQIY.js";import{d as Ie,m as ve,n as ye}from"./chunk-UGVEAL7H.js";import{A as ue,b as me,h as de,m as _e}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as fe,b as xe,c as Pe}from"./chunk-SWQXSJ7O.js";import{r as be,s as we}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{d as re,f as ae,g as le,j as ce,m as se,n as pe}from"./chunk-M2FCTYGU.js";import{$c as f,Fc as U,G as B,Gb as Z,Gc as m,Hc as Y,Ic as y,Kc as D,Lc as M,Mb as g,Mc as N,Nc as ee,Oc as te,Pc as A,Qc as ne,Ra as X,Sc as k,Tc as ie,Yb as p,Z as R,ad as I,bd as oe,cd as j,dc as q,ea as J,ec as F,gc as T,hc as V,ic as o,jc as a,kc as P,lc as w,mc as v,oc as S,p as K,pa as $,pb as E,rb as r,tc as C,uc as s,v as H,xb as x,xc as Q,ya as _,za as u}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as G,b as z}from"./chunk-66YHNWRR.js";var Re=n=>[n],$e=n=>({"text-decoration-line-through":n}),Ue=n=>({"border-bottom":n}),Ae=(n,c)=>({"bg-gradient-warning":n,"border pointer cell-hover":c});function je(n,c){if(n&1){let e=S();w(0),o(1,"div")(2,"label",21),m(3,"Channel"),a(),o(4,"channel-select-options",22),N("ngModelChange",function(t){_(e);let l=s();return M(l.searchFilter.ListChannelID,t)||(l.searchFilter.ListChannelID=t),u(t)}),a()(),o(5,"div",23)(6,"label",24),m(7,"Filter by"),a(),o(8,"lib-radio-options",25),N("modelChange",function(t){_(e);let l=s();return M(l.searchFilter.filterModel,t)||(l.searchFilter.filterModel=t),u(t)}),a()(),v()}if(n&2){let e=s();r(4),p("multiple",!0),D("ngModel",e.searchFilter.ListChannelID),r(4),D("model",e.searchFilter.filterModel),p("options",e.filterTypeOptions)}}function We(n,c){if(n&1){let e=S();o(0,"button",27),C("click",function(){_(e);let t=s().ngIf,l=s();return u(l.onUpdateItems(t))}),P(1,"i",28),m(2," Update "),a()}}function Ge(n,c){if(n&1&&(w(0),o(1,"div",4),g(2,We,3,0,"button",26),a(),v()),n&2){let e=c.ngIf,i=s();r(2),p("ngIf",i.productService.hasSelectionVariant(e))}}function ze(n,c){if(n&1&&(o(0,"th",15)(1,"div",29),P(2,"img",30),o(3,"div",31),m(4),f(5,"stringLimit"),a()()()),n&2){let e=c.$implicit;r(),p("matTooltip",(e.Name==null?null:e.Name.length)>20?e.Name:""),r(),p("src",e==null?null:e.Img,E),r(2),y(" ",oe(5,3,e.Name,20)," ")}}function Ke(n,c){if(n&1){let e=S();o(0,"th")(1,"input",32),N("ngModelChange",function(t){_(e);let l=s();return M(l.checkboxState,t)||(l.checkboxState=t),u(t)}),C("ngModelChange",function(){_(e);let t=s();return u(t.onSelectAllData())}),a()()}if(n&2){let e=s();r(),D("ngModel",e.checkboxState)}}function He(n,c){n&1&&(o(0,"th",33)(1,"span"),m(2,"Expected"),a(),o(3,"span",34),m(4,"(POS)"),a()(),o(5,"th",33),m(6,"Channel"),a())}function Je(n,c){if(n&1){let e=S();o(0,"img",47),C("click",function(t){_(e);let l=s(3).$implicit,d=s(2);return u(d.onZoomImage(t,l==null?null:l.ImageUrl))}),a()}if(n&2){let e=s(3).$implicit;Q("src",e==null?null:e.ImageUrl,E)}}function Xe(n,c){n&1&&P(0,"img",48)}function Ze(n,c){if(n&1&&(o(0,"small",46),m(1),a()),n&2){let e=s(3).$implicit;r(),y("(",e==null?null:e.Category,")")}}function qe(n,c){if(n&1&&(w(0),o(1,"td",42),g(2,Je,1,1,"img",43)(3,Xe,1,0,"ng-template",null,0,j),a(),o(5,"td",44)(6,"h5",45),m(7),a(),g(8,Ze,2,1,"small",46),a(),v()),n&2){let e=U(4),i=s().$index,t=s().$implicit,l=s().ngIf;r(),p("rowSpan",t==null?null:t.Variants.length)("ngClass",k(7,Ue,i+1==l.length)),r(),p("ngIf",t==null?null:t.ImageUrl)("ngIfElse",e),r(3),p("rowSpan",t==null?null:t.Variants.length),r(2),Y(t==null?null:t.Name),r(),q(t!=null&&t.Category?8:-1)}}function Qe(n,c){if(n&1){let e=S();o(0,"td",49)(1,"input",32),N("ngModelChange",function(t){_(e);let l=s().$implicit;return M(l.selected,t)||(l.selected=t),u(t)}),a()()}if(n&2){let e=s().$implicit;r(),D("ngModel",e.selected)}}function Ye(n,c){if(n&1){let e=S();w(0),o(1,"td",51),m(2),f(3,"number"),a(),o(4,"td",52),C("click",function(){let t=_(e).$implicit,l=s(2).$implicit,d=s().$implicit,h=s(2),b=A(0);return u(h.openTableDialog(l,d,t,b))}),o(5,"div",53)(6,"div",54),m(7),f(8,"number"),a(),o(9,"a",55),C("click",function(t){return _(e),u(t==null?null:t.stopPropagation())}),P(10,"i",40),a()()(),v()}if(n&2){let e=c.$implicit;s(5);let i=A(0);r(2),y(" ",I(3,4,e.PriceExpected)," "),r(2),p("ngClass",ie(8,Ae,e.Price!=e.PriceExpected,i)),r(3),y(" ",I(8,6,e.Price)," "),r(2),p("href",e.Url,E)}}function et(n,c){n&1&&(o(0,"td",56),m(1," X "),a(),o(2,"td",56),m(3," X "),a())}function tt(n,c){if(n&1&&(w(0),g(1,Ye,11,11,"ng-container",50)(2,et,4,0,"ng-template",null,1,j),v()),n&2){let e=c.$implicit,i=U(3),t=s().$implicit,l=s(3);r(),p("ngIf",l.getItemFromChannel(t,e.ID))("ngIfElse",i)}}function nt(n,c){if(n&1&&(o(0,"tr"),g(1,qe,9,9,"ng-container",3),o(2,"td",35),m(3),a(),o(4,"td",36)(5,"div",37)(6,"div",38),m(7),a(),o(8,"div",31)(9,"a",39),P(10,"i",40),a()()()(),g(11,Qe,2,1,"ng-template",19)(12,tt,4,2,"ng-container",41),a()),n&2){let e=c.$implicit,i=c.$index,t=s(3);r(),p("ngIf",i==0),r(2),y(" ",e==null?null:e.Model," "),r(),p("matTooltip",e.Discontinued?t.discontinuedVariantMsg:""),r(2),p("ngClass",k(8,$e,e.Discontinued)),r(),y(" ",e==null?null:e.Code," "),r(2),p("href",t.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),E),r(2),p("ngxPermissionsOnly",k(10,Re,t.rolePriceEdit)),r(),p("ngForOf",t.channels())}}function it(n,c){if(n&1&&(o(0,"tbody"),T(1,nt,13,12,"tr",null,F),a()),n&2){let e=c.$implicit;r(),V(e.Variants)}}function ot(n,c){if(n&1&&(w(0),T(1,it,3,0,"tbody",null,F),v()),n&2){let e=c.ngIf;r(),V(e)}}var Ut=(()=>{class n{constructor(e,i,t,l,d,h,b){this.http=e,this.toastr=i,this.dialog=t,this.productService=l,this.authService=d,this.biggerPictureService=h,this.paginationService=b,this.infinitePagination=$(W),this.permissionService=$(fe),this.searchFilter=new Ee,this.checkboxState=!1,this.rolePriceEdit=he.PriceUpdate,this.hasRolePriceEdit=K(this.permissionService.hasPermission(this.rolePriceEdit)),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.rowCountAPI="Inventory/GetMultipleChannelComparisonRowCount",this.channels=X([]),this.filterTypeOptions=[{Key:L.ALL,Value:"All"},{Key:L.DIFFERENCE,Value:"Difference"}],this.pageData={Title:"Price Realtime",Nav:[{Title:"Price Cache",Url:"/menu/price",Active:!1}]},this.channelOptions=this.authService.getChannels(),this.hostName=this.authService.getDomain(),this.initPagination(),this.initChannelTable()}initChannelTable(){let e=this.searchFilter.ListChannelID,i=[];O.IsEmpty(e)||e?.length==0?i=this.channelOptions:i=this.channelOptions.filter(t=>e.findIndex(l=>l==t.ID)>-1),this.channels.update(()=>i)}initPagination(){this.infinitePagination.fetchDataEndpoint="Price/GetOutletPrice",this.infinitePagination.fethRowCountEndpoint=this.rowCountAPI,this.initProduct(),this.initPageLoader()}initProduct(){this.data$=this.infinitePagination.data$.pipe(R(1))}initPageLoader(){this.loader$=this.http.post("/api/PriceLoader/LoadMultiple",{}).pipe(J(e=>{this.searchFilter=e.Filter,this.searchFilter.filterModel=L.ALL,this.infinitePagination.reloadPagination(this.searchFilter)}),R(1))}onSelectAllData(){this.data$=this.data$.pipe(H(e=>(e.map(i=>(i.Variants&&(i.Variants=i.Variants.map(t=>(t.selected=this.checkboxState,t))),i)),e)))}onFilter(e){this.searchFilter.text=e;let i=z(G({},this.searchFilter),{text:e,PageNumber:this.searchFilter.PageNumber,RowCount:this.searchFilter.RowCount});this.initChannelTable(),this.infinitePagination.reloadPagination(i)}updatePrice(e){let i=this.productService.selectedVariantProduct(e);if(i.length>0){let t=i.map(h=>h.ID),d={ListChannelID:this.channelOptions.filter(h=>h.selected).map(h=>h.ID),ListID:t};this.http.post("/api/Price/UpdateChannelOutletPrice",d).subscribe({next:h=>{this.resetSelectedChannel(),this.onFilter(),this.toastr.success("Successfully updated "+d.ListID.length+" items in "+d.ListChannelID.length+" channels","Success")},error:h=>{this.resetSelectedChannel()}})}}resetSelectedChannel(){this.channelOptions=this.channelOptions.map(e=>(e.selected=!1,e))}getItemFromChannel(e,i){return e.Channel.find(t=>t.ChannelID==i)}onUpdateItems(e){let i=this.productService.selectedVariantProduct(e);this.dialog.open(Ne,{data:{title:"Updating Price",selectedItems:i,channels:this.channelOptions},width:"400px"}).afterClosed().pipe(B(t=>O.IsNotEmpty(t))).subscribe(t=>{this.channelOptions=t,this.updatePrice(e)})}openTableDialog(e,i,t,l){if(l){let d=JSON.parse(JSON.stringify(e));this.dialog.open(ke,{data:{Name:i.Name,Variant:d,ChannelID:t?.ChannelID,Table:"price",ChannelItemID:t?.ChannelItemID}}).afterClosed().pipe(B(b=>O.IsNotEmpty(b))).subscribe(b=>{this.updateProductPrice(b,t)})}}updateProductPrice(e,i){let t={ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,Price:parseFloat(e.Price),VariantID:e.ID,SKU:e.Sku};this.http.post("/api/Price/UpdatePriceByID",t).subscribe(l=>{i.Price=t.Price;let d=this.productService.findChannelById(t.ID,this.channelOptions);this.toastr.success(`Successfully updated ${e.ItemName} (${e.VarName}) inventory in ${d.Name} to ${t.Price}`,"Success")})}openExportDialog(){this.dialog.open(Ve,{data:{title:"Export Custom Channel Price",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountAPI,exportApi:"price/GetExportOutletPrice"}}).afterClosed().subscribe()}onZoomImage(e,i){this.biggerPictureService.openBiggerPicture(e,i)}static{this.\u0275fac=function(i){return new(i||n)(x(Ce),x(ge),x(Ie),x(Fe),x(Se),x(Te),x(De))}}static{this.\u0275cmp=Z({type:n,selectors:[["app-custom-channel-price"]],features:[ne([W])],decls:40,vars:26,consts:[["elsePic",""],["elseCol",""],["headerTitle","Price Comparison",3,"onSubmit","hideSearchBox","hideSearchDropdown","textButton"],[4,"ngIf"],[1,"d-flex"],[1,"btn","btn-outline-secondary","shadow","rounded","ms-2",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table"],[1,"thead-light","sticky-top-thead"],[1,"channel-column"],["colspan","5"],["scope","col","colspan","2",1,"text-center","border-bottom-0","border","text-uppercase"],["scope","col","colspan","2",1,"text-center","w-25"],["scope","col",1,"text-start","w-20"],["scope","col",1,"text-end","w-10"],[3,"ngxPermissionsOnly"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5",2,"height","46px"],[1,"fw-bold","mb-2","d-block"],["name","filterModel",3,"modelChange","model","options"],["type","button","class","btn btn-success shadow rounded","data-toggle","modal",3,"click",4,"ngIf"],["type","button","data-toggle","modal",1,"btn","btn-success","shadow","rounded",3,"click"],[1,"fas","fa-chevron-circle-up"],["matTooltipPosition","above",1,"d-flex","align-items-center","justify-content-center",2,"width","180px",3,"matTooltip"],[2,"width","16px","height","16px",3,"src"],[1,"ms-2"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-end","border-top-0","border","w-10"],[1,"ms-1"],[1,"text-start","border-bottom"],["matTooltipPosition","above",1,"text-end","border-bottom",3,"matTooltip"],[1,"d-flex","align-items-center","justify-content-end"],[3,"ngClass"],["target","_blank",3,"href"],[1,"fas","fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[4,"ngFor","ngForOf"],[1,"text-center",3,"rowSpan","ngClass"],["class","border rounded w-img cursor-pointer",3,"src","click",4,"ngIf","ngIfElse"],[1,"text-start","border-bottom",2,"padding-left","0px",3,"rowSpan"],[1,"mb-0","item-name"],[1,"mt-1"],[1,"border","rounded","w-img","cursor-pointer",3,"click","src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img"],[1,"align-middle"],[4,"ngIf","ngIfElse"],[1,"text-end","border"],[1,"text-center",3,"click","ngClass"],[1,"d-flex","align-items-center","justify-content-center"],[1,"me-2"],["target","_blank",3,"click","href"],[1,"table-white","border","text-end",2,"color","red"]],template:function(i,t){if(i&1){let l=S();ee(0),f(1,"async"),o(2,"mainpanel",2),C("onSubmit",function(h){return _(l),u(t.onFilter(h))}),o(3,"filters"),g(4,je,9,4,"ng-container",3),f(5,"async"),a(),o(6,"actions")(7,"div",4),g(8,Ge,3,1,"ng-container",3),f(9,"async"),o(10,"button",5),C("click",function(){return _(l),u(t.openExportDialog())}),P(11,"i",6),o(12,"span"),m(13,"Export"),a()()()(),o(14,"content")(15,"div",7)(16,"div",8)(17,"div",9)(18,"div",10)(19,"table",11)(20,"thead",12)(21,"tr",13),P(22,"th",14),T(23,ze,6,6,"th",15,F),a(),o(25,"tr")(26,"th",16)(27,"span"),m(28," Product "),a()(),o(29,"th",17),m(30,"Variant"),a(),o(31,"th",18),m(32,"SKU"),a(),g(33,Ke,2,1,"ng-template",19),T(34,He,7,0,null,null,F),a()(),g(36,ot,3,0,"ng-container",3),f(37,"async"),a(),o(38,"infinite-paginator",20),f(39,"async"),C("onNextPage",function(){return _(l),u(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){return _(l),u(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){return _(l),u(t.infinitePagination.getRowCount(t.searchFilter))}),a()()()()()()()}i&2&&(te(I(1,13,t.hasRolePriceEdit)),r(2),p("hideSearchBox",!1)("hideSearchDropdown",!1)("textButton","Search"),r(2),p("ngIf",I(5,16,t.loader$)),r(4),p("ngIf",I(9,18,t.data$)),r(15),V(t.channels()),r(10),p("ngxPermissionsOnly",k(24,Re,t.rolePriceEdit)),r(),V(t.channels()),r(2),p("ngIf",I(37,20,t.data$)),r(2),p("totalData",t.infinitePagination.totalData())("hideCount",t.infinitePagination.hideCount())("rowCount",I(39,22,t.infinitePagination.totalRowCount$))("pageNumber",t.infinitePagination.pageNumber())("disableNextButton",t.infinitePagination.disableNextButton())("goToLastPage",t.infinitePagination.isLastPage()))},dependencies:[pe,re,ae,le,ce,se,ye,ve,ue,me,de,_e,Le,Be,we,be,Oe,Pe,xe,Me],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-20[_ngcontent-%COMP%]{width:20%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{font-weight:400;font-size:larger}.cell-hover[_ngcontent-%COMP%]:hover{background-color:#c9c9c9!important}"]})}}return n})();export{Ut as CustomChannelPriceComponent};
@@ -0,0 +1 @@
1
+ import{a as at}from"./chunk-WMFWJNS5.js";import{a as x}from"./chunk-6EH5RQIV.js";import"./chunk-YERZ6W22.js";import{a as ot}from"./chunk-D6URDVES.js";import"./chunk-ZKZ5DIIR.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-OWQ3RWNF.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{e as et}from"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as it,n as nt}from"./chunk-UGVEAL7H.js";import{A as tt,h as Y,m as Z}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{H as Q,J as X,d as $,f as j,g as z,j as U,k as G,m as J,n as K}from"./chunk-M2FCTYGU.js";import{$c as u,Fc as F,Gb as M,Gc as n,Hc as f,Ic as N,Kc as T,Lc as L,Mb as C,Mc as k,Nc as R,Qc as B,Ra as I,Rc as O,Sc as A,Tc as H,Yb as m,Z as b,ad as W,bd as y,cd as q,ic as t,jc as e,kc as w,lc as S,mc as h,oc as D,pa as E,pb as V,rb as o,tc as v,uc as P,ya as s,za as d}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var rt=(i,p)=>({"bg-gradient-danger":i,"bg-gradient-warning":p}),lt=()=>["/menu/products/status/notification/detailV2"],mt=i=>({ID:i});function ct(i,p){if(i&1&&(S(0),n(1),u(2,"number"),t(3,"span"),n(4,"s"),e(),h()),i&2){let a=P().$implicit;o(),N(" ",y(2,1,a.DurationInSecond,"1.1-1")," ")}}function pt(i,p){i&1&&n(0," - ")}function st(i,p){if(i&1&&(S(0),t(1,"tr",15)(2,"td")(3,"a",16),w(4,"img",17),t(5,"span"),n(6),e()()(),t(7,"td")(8,"div",18),n(9),e(),t(10,"div"),n(11),e()(),t(12,"td"),C(13,ct,5,4,"ng-container",19)(14,pt,1,0,"ng-template",null,0,q),e(),t(16,"td"),n(17),e(),t(18,"td"),n(19),u(20,"date"),e()(),h()),i&2){let a=p.$implicit,c=F(15);o(),m("ngClass",H(14,rt,a.Status==1,a.Status==0)),o(2),m("routerLink",O(17,lt))("queryParams",A(18,mt,a.ID)),o(),m("src",a.Img,V),o(2),f(a.ChannelName),o(3),f(a.ProcessLabel),o(2),f(a.ProcessDescription),o(2),m("ngIf",a.DurationInSecond)("ngIfElse",c),o(4),f(a.StatusLabel),o(2),N(" ",y(20,11,a.Created,"dd MMM yyyy HH:mm")," ")}}var wt=(()=>{class i{constructor(){this.notificationService=E(x),this.filter=I({RowCount:20,PageNumber:1,ChannelID:null}),this.initNotifications()}initNotifications(){this.notifications$=this.notificationService.getNotificationList(this.filter()).pipe(b(1))}onFilter(){this.initNotifications()}static{this.\u0275fac=function(c){return new(c||i)}}static{this.\u0275cmp=M({type:i,selectors:[["app-notificationV2"]],features:[B([x])],decls:34,vars:9,consts:[["timeNotAvailable",""],["headerTitle","Notification",3,"onSubmit","hideSearchBox"],["routerLink","/menu/products/status/notification",1,"btn","btn-outline-secondary","btn-lg"],[1,"fw-bold","mb-2"],[3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[4,"ngFor","ngForOf"],[1,"col-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked"],[3,"ngClass"],[3,"routerLink","queryParams"],[1,"channelLogo-md","me-4",3,"src","alt"],[1,"fw-bold"],[4,"ngIf","ngIfElse"]],template:function(c,l){if(c&1){let r=D();R(0),u(1,"async"),t(2,"mainpanel",1),v("onSubmit",function(){return s(r),d(l.onFilter())}),t(3,"actions")(4,"a",2),n(5," Back "),e()(),t(6,"filters")(7,"div")(8,"label",3),n(9,"Channel"),e(),t(10,"channel-select-options",4),k("ngModelChange",function(_){return s(r),L(l.filter().ChannelID,_)||(l.filter().ChannelID=_),d(_)}),e()()(),t(11,"content")(12,"div",5)(13,"div",6)(14,"div",7)(15,"div",8)(16,"table",9)(17,"thead",10)(18,"tr",11)(19,"th"),n(20,"Channel"),e(),t(21,"th"),n(22,"Process"),e(),t(23,"th"),n(24,"Duration"),e(),t(25,"th"),n(26,"Status"),e(),t(27,"th"),n(28,"Created"),e()()(),t(29,"tbody"),C(30,st,21,20,"ng-container",12),e()()()()(),t(31,"div",6)(32,"div",13)(33,"app-custom-paginator",14),v("next",function(){return s(r),d(l.initNotifications())})("previous",function(){return s(r),d(l.initNotifications())}),e()()()()()()}if(c&2){let r=W(1,7,l.notifications$);o(2),m("hideSearchBox",!0),o(8),T("ngModel",l.filter().ChannelID),o(20),m("ngForOf",r==null?null:r.Data),o(3),m("filter",l.filter())("totaldata",r==null||r.Data==null?null:r.Data.length)("paginationTotal",r==null?null:r.Count)("hasClicked",!0)}},dependencies:[K,$,j,z,U,J,G,tt,Y,Z,nt,it,ot,et,X,Q,at],encapsulation:2})}}return i})();export{wt as NotificationV2Component};
@@ -0,0 +1 @@
1
+ import{a as o}from"./chunk-YERZ6W22.js";import{a as c}from"./chunk-OWQ3RWNF.js";import{e as u}from"./chunk-JXSBFTQM.js";import{c as p}from"./chunk-PW42BQIY.js";import{ja as s,pa as l,v as i}from"./chunk-B7KTCPKC.js";var m=(()=>{class a{constructor(){this.httpService=l(u)}getNotificationDetail(e){return this.httpService.post(c.GetJobScanDetail,{ID:e}).pipe(i(r=>{let t=r.Data;return t.DurationInSecond=t.Duration?t.Duration/1e3:0,t.ProcessLabel=this.generateLabel(t),t.ProcessDescription=this.generateDescription(t),t}))}getNotificationList(e){return this.httpService.post(c.GetJobScanList,e).pipe(i(r=>{let t=r.Data;return t=t.map(n=>(n.Img=p.getChannelLogoByTypeId(n.TypeID),n.DurationInSecond=n.Duration?n.Duration/1e3:0,n.ProcessLabel=this.generateLabel(n),n.ProcessDescription=this.generateDescription(n),n)),{Data:t,Count:r.Count}}))}generateLabel(e){let r=null;switch(e.ScanTypeID){case o.Active:r="Active";break;case o.Sellable:r="Sellable";break;case o.All:r="All";break}return`Asynchronous Scan - ${r}`}generateDescription(e){return`${e.OriginGetCount} found in ${e.ChannelName} ( ${e.SkuFoundCount} Sold In Channel + ${e.SkuNotFoundCount} Not In POS)`}static{this.\u0275fac=function(r){return new(r||a)}}static{this.\u0275prov=s({token:a,factory:a.\u0275fac})}}return a})();export{m as a};