marketplacepos 6.40.2 → 6.40.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/Marketplace/{chunk-NXS7JQPY.js → chunk-24SW3YEI.js} +1 -1
  2. package/Marketplace/{chunk-MZU7P2T5.js → chunk-2LAMUGLH.js} +1 -1
  3. package/Marketplace/{chunk-YU2EK4WR.js → chunk-2XSHDDPR.js} +1 -1
  4. package/Marketplace/{chunk-IT4SNYQK.js → chunk-3IS2DQPU.js} +1 -1
  5. package/Marketplace/{chunk-P4PGUHI5.js → chunk-3LOH5KGZ.js} +1 -1
  6. package/Marketplace/{chunk-VH4YX2BF.js → chunk-3NDTATAF.js} +1 -1
  7. package/Marketplace/{chunk-WVJMN3F2.js → chunk-3PHI6CX3.js} +1 -1
  8. package/Marketplace/{chunk-2EBT5M4I.js → chunk-47G4FBTY.js} +1 -1
  9. package/Marketplace/{chunk-TR7UPFQS.js → chunk-4AS2XNXT.js} +1 -1
  10. package/Marketplace/{chunk-7X3KALOK.js → chunk-4B3WJSEV.js} +1 -1
  11. package/Marketplace/{chunk-K3MEX6GQ.js → chunk-4JPEQFRW.js} +1 -1
  12. package/Marketplace/{chunk-CRBJDNL7.js → chunk-5GGSP5QE.js} +1 -1
  13. package/Marketplace/{chunk-4WT2Y6TT.js → chunk-5YRNWUJB.js} +1 -1
  14. package/Marketplace/{chunk-OCGSMJT2.js → chunk-6O4AIKY4.js} +1 -1
  15. package/Marketplace/{chunk-52PEZEAZ.js → chunk-6S6YYCUI.js} +1 -1
  16. package/Marketplace/{chunk-CXQB3FE2.js → chunk-76KUZPVN.js} +1 -1
  17. package/Marketplace/{chunk-WTTWRCNO.js → chunk-7D3XPYCI.js} +1 -1
  18. package/Marketplace/{chunk-SF34YBS7.js → chunk-7ESO7UQ7.js} +1 -1
  19. package/Marketplace/{chunk-OTMZGSFO.js → chunk-AUUMJDHO.js} +1 -1
  20. package/Marketplace/{chunk-RSR5AZTI.js → chunk-BHV3WNGU.js} +1 -1
  21. package/Marketplace/{chunk-GSRXREXU.js → chunk-BQO5O3U7.js} +1 -1
  22. package/Marketplace/{chunk-546FKO4L.js → chunk-BURCBMNA.js} +1 -1
  23. package/Marketplace/{chunk-FKVH6CLY.js → chunk-CG6RBDBY.js} +1 -1
  24. package/Marketplace/{chunk-PB3JMCII.js → chunk-CRCOWD4O.js} +1 -1
  25. package/Marketplace/{chunk-6NML7F6L.js → chunk-CVLH5ITF.js} +1 -1
  26. package/Marketplace/{chunk-AKL56CT3.js → chunk-DXA7DKSR.js} +1 -1
  27. package/Marketplace/{chunk-AZLIWO5Y.js → chunk-EXAKI6AZ.js} +2 -2
  28. package/Marketplace/{chunk-RCFVKK5D.js → chunk-EZ7EVZMN.js} +1 -1
  29. package/Marketplace/{chunk-JOU7HLA4.js → chunk-FECZRA3W.js} +1 -1
  30. package/Marketplace/{chunk-XK4J4PVA.js → chunk-FUH2CIW6.js} +1 -1
  31. package/Marketplace/{chunk-H43OTNIB.js → chunk-H6KKQB4S.js} +1 -1
  32. package/Marketplace/{chunk-LUWEYZ6D.js → chunk-HETRXWY4.js} +1 -1
  33. package/Marketplace/{chunk-37G3PDXN.js → chunk-HMEYWPET.js} +1 -1
  34. package/Marketplace/{chunk-2YIHYSPU.js → chunk-I4DMM2GA.js} +1 -1
  35. package/Marketplace/{chunk-L3MO3ZCZ.js → chunk-JWHT7LUS.js} +1 -1
  36. package/Marketplace/{chunk-BJSFGAT5.js → chunk-KBICIMAX.js} +1 -1
  37. package/Marketplace/{chunk-NP3B3XBB.js → chunk-KUWYSSJD.js} +1 -1
  38. package/Marketplace/{chunk-SDVM2OGI.js → chunk-KXEHK3MB.js} +1 -1
  39. package/Marketplace/{chunk-NDDUXXJF.js → chunk-L4NODYLI.js} +1 -1
  40. package/Marketplace/{chunk-4DQBPYFS.js → chunk-LMP2KHLR.js} +1 -1
  41. package/Marketplace/{chunk-ZSG2EXIR.js → chunk-MD4EAOUZ.js} +1 -1
  42. package/Marketplace/{chunk-K6PWLV74.js → chunk-MGIEBZGR.js} +1 -1
  43. package/Marketplace/{chunk-YHCPLYK6.js → chunk-MUY3PTJM.js} +1 -1
  44. package/Marketplace/{chunk-4QV2PDMF.js → chunk-NQWKWVWW.js} +1 -1
  45. package/Marketplace/{chunk-A4TBJ6UZ.js → chunk-NVFDCME2.js} +1 -1
  46. package/Marketplace/{chunk-TFDDAGWF.js → chunk-OQVRPQNT.js} +1 -1
  47. package/Marketplace/{chunk-E53SRMQZ.js → chunk-PHE4QRUC.js} +1 -1
  48. package/Marketplace/{chunk-6B7FZZSK.js → chunk-QNZIV2ZR.js} +1 -1
  49. package/Marketplace/{chunk-JEFVOPGN.js → chunk-R7T4RHGT.js} +1 -1
  50. package/Marketplace/{chunk-QQFM2BFS.js → chunk-RGJY6HFO.js} +1 -1
  51. package/Marketplace/{chunk-GSYHZ24Q.js → chunk-S5JU3KZ7.js} +1 -1
  52. package/Marketplace/{chunk-C5O6VJ2D.js → chunk-SBU2S3NF.js} +1 -1
  53. package/Marketplace/{chunk-TU34BDDQ.js → chunk-SIRLG5JS.js} +1 -1
  54. package/Marketplace/{chunk-OX2QJCC3.js → chunk-TDZOSERR.js} +1 -1
  55. package/Marketplace/{chunk-DO2G52AO.js → chunk-UYKURPIN.js} +1 -1
  56. package/Marketplace/{chunk-6BLHGE4W.js → chunk-WM4MVHSL.js} +1 -1
  57. package/Marketplace/{chunk-7WMEMBD2.js → chunk-WUNWEZOW.js} +1 -1
  58. package/Marketplace/{chunk-755EU56E.js → chunk-YSBYFJIN.js} +1 -1
  59. package/Marketplace/chunk-Z7IOWYX7.js +3 -0
  60. package/Marketplace/{chunk-DVEXD44H.js → chunk-ZDTPTY6Y.js} +1 -1
  61. package/Marketplace/{chunk-X3C5DFLO.js → chunk-ZP7UHH6K.js} +1 -1
  62. package/Marketplace/index.html +2 -2
  63. package/Marketplace/{main-NQGKSBMZ.js → main-4J4GR4GU.js} +2 -2
  64. package/package.json +1 -1
  65. package/Marketplace/chunk-EHVBVNXC.js +0 -3
@@ -1 +1 @@
1
- import{a as F}from"./chunk-ZSG2EXIR.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{e as $}from"./chunk-474G6BPL.js";import{b as B}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import{a as j}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as V}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as I,h as R,m as O,z as P}from"./chunk-7HUEGPJN.js";import{b as L,e as A}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as E}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as h,Ic as n,Jc as y,Pc as w,Qc as M,Rc as b,Xb as S,Zb as C,cc as m,dc as e,ec as t,ed as D,fc as _,fd as N,gb as c,ha as u,mc as x,oa as p,pa as s,rc as g,tc as T,ua as k,yb as v}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function J(r,H){if(r&1&&(e(0,"pre",21),n(1),D(2,"json"),t()),r&2){T();let i=b(25);c(),y(N(2,1,i))}}function U(r,H){r&1&&(e(0,"p",22),n(1," Your data will be shown here once it's available "),t())}var ae=(()=>{class r{constructor(){this.httpService=u(A),this.toastr=u(L),this.destroyRef=u(k),this.selectedShopId=h(null),this.trackingNumber=h(null),this.trackingLogData=h(null)}fetchLog(){if(!this.selectedShopId()||!this.trackingNumber()){this.toastr.warning("Please select a channel and enter a tracking number","Warning");return}this.httpService.get(`${V.GetTrackingNumber}?ChannelID=${this.selectedShopId()}&Number=${this.trackingNumber()}`).pipe(j(this.destroyRef)).subscribe(i=>this.trackingLogData.set(i))}copyToClipboard(i){if(!i)return;let l=typeof i=="string"?i:JSON.stringify(i,null,2);navigator.clipboard.writeText(l),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(l){return new(l||r)}}static{this.\u0275cmp=v({type:r,selectors:[["app-tracking-api"]],decls:39,vars:7,consts:[["headerTitle","Tracking API",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Enter tracking number",1,"form-control","rounded-1",2,"height","40px",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","trackingLogText"],[1,"text-center","my-12","text-muted"]],template:function(l,o){if(l&1){let a=x();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return p(a),s(o.fetchLog())}),_(3,"i",2),n(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),n(12,"Channel"),t(),e(13,"p",8),n(14," Select Shopee channel for tracking number lookup. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),g("ngModelChange",function(d){return p(a),s(o.selectedShopId.set(d))}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),n(20,"Tracking Number"),t(),e(21,"p",8),n(22," Enter the tracking number to search. "),t()(),e(23,"div",9)(24,"input",12),g("ngModelChange",function(d){return p(a),s(o.trackingNumber.set(d))}),t()()()()(),w(25),e(26,"div",13)(27,"div",14)(28,"div",15)(29,"div",16)(30,"h5"),n(31,"Response"),t(),e(32,"button",17),g("click",function(){p(a);let d=b(25);return s(o.copyToClipboard(d))}),n(33," Copy "),t()(),e(34,"div",18)(35,"div",19)(36,"div",20),S(37,J,3,3,"pre",21)(38,U,2,0,"p",22),t()()()()()()()()()}if(l&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),m("ngModel",o.selectedShopId()),c(8),m("ngModel",o.trackingNumber()),c();let a=M(o.trackingLogData());c(7),m("disabled",!a),c(5),C(a?37:38)}},dependencies:[B,$,P,I,R,O,F,E],encapsulation:2,changeDetection:0})}}return r})();export{ae as TrackingApiComponent};
1
+ import{a as F}from"./chunk-MD4EAOUZ.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{e as $}from"./chunk-474G6BPL.js";import{b as B}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import{a as j}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as V}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as I,h as R,m as O,z as P}from"./chunk-7HUEGPJN.js";import{b as L,e as A}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as E}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as h,Ic as n,Jc as y,Pc as w,Qc as M,Rc as b,Xb as S,Zb as C,cc as m,dc as e,ec as t,ed as D,fc as _,fd as N,gb as c,ha as u,mc as x,oa as p,pa as s,rc as g,tc as T,ua as k,yb as v}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function J(r,H){if(r&1&&(e(0,"pre",21),n(1),D(2,"json"),t()),r&2){T();let i=b(25);c(),y(N(2,1,i))}}function U(r,H){r&1&&(e(0,"p",22),n(1," Your data will be shown here once it's available "),t())}var ae=(()=>{class r{constructor(){this.httpService=u(A),this.toastr=u(L),this.destroyRef=u(k),this.selectedShopId=h(null),this.trackingNumber=h(null),this.trackingLogData=h(null)}fetchLog(){if(!this.selectedShopId()||!this.trackingNumber()){this.toastr.warning("Please select a channel and enter a tracking number","Warning");return}this.httpService.get(`${V.GetTrackingNumber}?ChannelID=${this.selectedShopId()}&Number=${this.trackingNumber()}`).pipe(j(this.destroyRef)).subscribe(i=>this.trackingLogData.set(i))}copyToClipboard(i){if(!i)return;let l=typeof i=="string"?i:JSON.stringify(i,null,2);navigator.clipboard.writeText(l),this.toastr.success("Copied to clipboard!","Success")}static{this.\u0275fac=function(l){return new(l||r)}}static{this.\u0275cmp=v({type:r,selectors:[["app-tracking-api"]],decls:39,vars:7,consts:[["headerTitle","Tracking API",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-success","btn-fill","me-3",3,"click"],[1,"fa","fa-search"],[1,"container-fluid","mt-8","px-10"],[1,"row"],[1,"col-7"],[1,"d-flex","align-items-center"],[1,"w-75"],[1,"mb-0","text-muted","fst-italic"],[1,"w-100"],[3,"ngModelChange","ngModel"],[1,"d-flex","align-items-center","mt-3"],["type","text","placeholder","Enter tracking number",1,"form-control","rounded-1",2,"height","40px",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","trackingLogText"],[1,"text-center","my-12","text-muted"]],template:function(l,o){if(l&1){let a=x();e(0,"mainpanel",0)(1,"actions")(2,"button",1),g("click",function(){return p(a),s(o.fetchLog())}),_(3,"i",2),n(4," Search "),t()(),e(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),n(12,"Channel"),t(),e(13,"p",8),n(14," Select Shopee channel for tracking number lookup. "),t()(),e(15,"div",9)(16,"app-channel-options-v2",10),g("ngModelChange",function(d){return p(a),s(o.selectedShopId.set(d))}),t()()(),e(17,"div",11)(18,"div",7)(19,"h6"),n(20,"Tracking Number"),t(),e(21,"p",8),n(22," Enter the tracking number to search. "),t()(),e(23,"div",9)(24,"input",12),g("ngModelChange",function(d){return p(a),s(o.trackingNumber.set(d))}),t()()()()(),w(25),e(26,"div",13)(27,"div",14)(28,"div",15)(29,"div",16)(30,"h5"),n(31,"Response"),t(),e(32,"button",17),g("click",function(){p(a);let d=b(25);return s(o.copyToClipboard(d))}),n(33," Copy "),t()(),e(34,"div",18)(35,"div",19)(36,"div",20),S(37,J,3,3,"pre",21)(38,U,2,0,"p",22),t()()()()()()()()()}if(l&2){m("hideSearchBox",!0)("hideSearchDropdown",!0),c(16),m("ngModel",o.selectedShopId()),c(8),m("ngModel",o.trackingNumber()),c();let a=M(o.trackingLogData());c(7),m("disabled",!a),c(5),C(a?37:38)}},dependencies:[B,$,P,I,R,O,F,E],encapsulation:2,changeDetection:0})}}return r})();export{ae as TrackingApiComponent};
@@ -1 +1 @@
1
- import{b as P}from"./chunk-A4TBJ6UZ.js";import"./chunk-BGFEVOPZ.js";import{b as R}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import{b as I,e as M,g as T}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as g,D as y,z as b}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Ic as n,Jc as d,Kc as _,V as h,Xb as c,Zb as m,cc as D,dc as i,ec as t,ed as p,fd as E,gb as o,gd as f,ha as s,r as x,tc as u,yb as C}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function w(a,v){if(a&1&&(i(0,"div",9)(1,"div",12)(2,"div",6)(3,"h5"),n(4,"Perflog"),t()(),i(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),n(9),t()()()()()()),a&2){let e=u();o(9),d(e.Perflog)}}function k(a,v){if(a&1&&(i(0,"div",15)(1,"div",12)(2,"div",6)(3,"h5"),n(4,"StackTrace"),t()(),i(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),n(9),t()()()()()()),a&2){let e=u();o(9),d(e==null?null:e.StackTrace)}}function B(a,v){if(a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),t()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),n(11,"General"),t()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),n(17,"Created Date"),t(),i(18,"div")(19,"span"),n(20),p(21,"date"),t()()()(),i(22,"div",9)(23,"div",10)(24,"label"),n(25,"Status"),t(),i(26,"div")(27,"span"),n(28),t()()()()(),i(29,"div",11)(30,"div",9)(31,"div",10)(32,"label"),n(33,"Duration"),t(),i(34,"div")(35,"span"),n(36),p(37,"number"),t()()()(),i(38,"div",9)(39,"div",10)(40,"label"),n(41,"Label"),t(),i(42,"div")(43,"span"),n(44),t()()()()()()()()(),i(45,"div",3)(46,"div",9)(47,"div",12)(48,"div",6)(49,"h5"),n(50,"Message"),t()(),i(51,"div",7)(52,"div",13)(53,"div",14)(54,"pre"),n(55),t()()()()()(),c(56,w,10,1,"div",9),c(57,k,10,1,"div",15),t()()()()),a&2){let e=v;D("headerTitle","Notification "+e.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),o(20),d(f(21,10,e.Created,"dd MMM yyyy HH:mm:ss")),o(8),d(e.StatusLabel),o(8),_("",f(37,13,e.DurationInSecond,"1.1-1")," s"),o(8),d(e.Label),o(11),d(e.Message),o(),m(e!=null&&e.Perflog?56:-1),o(),m(e!=null&&e.StackTrace?57:-1)}}var J=(()=>{class a{constructor(){this.activatedRoute=s(I),this.notificationService=s(P)}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(h(e=>{let l=e.ID;return this.notificationService.getNotificationDetail(l).pipe(x(r=>(r.DurationInSecond=parseInt(r.Duration)/1e3,r)))}))}static{this.\u0275fac=function(l){return new(l||a)}}static{this.\u0275cmp=C({type:a,selectors:[["app-detail"]],decls:2,vars:3,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],[1,"col-sm-12"]],template:function(l,r){if(l&1&&(c(0,B,58,16,"mainpanel",0),p(1,"async")),l&2){let S;m((S=E(1,1,r.notification$))?0:-1,S)}},dependencies:[R,T,M,b,g,y],encapsulation:2,changeDetection:0})}}return a})();export{J as DetailComponent};
1
+ import{b as P}from"./chunk-NVFDCME2.js";import"./chunk-BGFEVOPZ.js";import{b as R}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import{b as I,e as M,g as T}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as g,D as y,z as b}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Ic as n,Jc as d,Kc as _,V as h,Xb as c,Zb as m,cc as D,dc as i,ec as t,ed as p,fd as E,gb as o,gd as f,ha as s,r as x,tc as u,yb as C}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function w(a,v){if(a&1&&(i(0,"div",9)(1,"div",12)(2,"div",6)(3,"h5"),n(4,"Perflog"),t()(),i(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),n(9),t()()()()()()),a&2){let e=u();o(9),d(e.Perflog)}}function k(a,v){if(a&1&&(i(0,"div",15)(1,"div",12)(2,"div",6)(3,"h5"),n(4,"StackTrace"),t()(),i(5,"div",7)(6,"div",13)(7,"div",14)(8,"pre"),n(9),t()()()()()()),a&2){let e=u();o(9),d(e==null?null:e.StackTrace)}}function B(a,v){if(a&1&&(i(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),t()(),i(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"h5"),n(11,"General"),t()(),i(12,"div",7)(13,"div",8)(14,"div",9)(15,"div",10)(16,"label"),n(17,"Created Date"),t(),i(18,"div")(19,"span"),n(20),p(21,"date"),t()()()(),i(22,"div",9)(23,"div",10)(24,"label"),n(25,"Status"),t(),i(26,"div")(27,"span"),n(28),t()()()()(),i(29,"div",11)(30,"div",9)(31,"div",10)(32,"label"),n(33,"Duration"),t(),i(34,"div")(35,"span"),n(36),p(37,"number"),t()()()(),i(38,"div",9)(39,"div",10)(40,"label"),n(41,"Label"),t(),i(42,"div")(43,"span"),n(44),t()()()()()()()()(),i(45,"div",3)(46,"div",9)(47,"div",12)(48,"div",6)(49,"h5"),n(50,"Message"),t()(),i(51,"div",7)(52,"div",13)(53,"div",14)(54,"pre"),n(55),t()()()()()(),c(56,w,10,1,"div",9),c(57,k,10,1,"div",15),t()()()()),a&2){let e=v;D("headerTitle","Notification "+e.Name)("hideSearchBox",!0)("hideSearchDropdown",!0),o(20),d(f(21,10,e.Created,"dd MMM yyyy HH:mm:ss")),o(8),d(e.StatusLabel),o(8),_("",f(37,13,e.DurationInSecond,"1.1-1")," s"),o(8),d(e.Label),o(11),d(e.Message),o(),m(e!=null&&e.Perflog?56:-1),o(),m(e!=null&&e.StackTrace?57:-1)}}var J=(()=>{class a{constructor(){this.activatedRoute=s(I),this.notificationService=s(P)}ngOnInit(){this.notification$=this.activatedRoute.queryParams.pipe(h(e=>{let l=e.ID;return this.notificationService.getNotificationDetail(l).pipe(x(r=>(r.DurationInSecond=parseInt(r.Duration)/1e3,r)))}))}static{this.\u0275fac=function(l){return new(l||a)}}static{this.\u0275cmp=C({type:a,selectors:[["app-detail"]],decls:2,vars:3,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/products/status/notification",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container-fluid","mt-8"],[1,"row"],[1,"col-12"],[1,"card","mb-8"],[1,"card-header"],[1,"card-body"],[1,"row","mt-6"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-4"],[1,"card"],[1,"col-sm-12","mt-2"],[1,"form-group"],[1,"col-sm-12"]],template:function(l,r){if(l&1&&(c(0,B,58,16,"mainpanel",0),p(1,"async")),l&2){let S;m((S=E(1,1,r.notification$))?0:-1,S)}},dependencies:[R,T,M,b,g,y],encapsulation:2,changeDetection:0})}}return a})();export{J as DetailComponent};
@@ -1 +1 @@
1
- import{a as X}from"./chunk-ZSUWHVKX.js";import{f as J}from"./chunk-C5O6VJ2D.js";import{a as G}from"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import{a as Y}from"./chunk-MDHMVGYC.js";import{a as b,c as W}from"./chunk-NNVT5X6O.js";import{c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de,z as le}from"./chunk-7HUEGPJN.js";import{b as Q}from"./chunk-ZE4OOGMT.js";import{d as K}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as H}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as O,Aa as f,Dc as S,Hc as T,Ic as s,Jc as N,Kc as R,Lc as j,S as I,Xb as _,Yc as z,Zb as h,ac as P,bc as E,ca as D,cc as x,db as C,dc as o,ec as r,ed as $,fc as m,fd as q,gb as a,gc as v,hc as M,ic as V,mc as k,nc as L,oa as p,pa as g,rb as w,rc as u,sd as B,tc as d,xc as A,yb as y,yc as U,zc as F}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
1
+ import{a as X}from"./chunk-ZSUWHVKX.js";import{f as J}from"./chunk-SBU2S3NF.js";import{a as G}from"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import{a as Y}from"./chunk-MDHMVGYC.js";import{a as b,c as W}from"./chunk-NNVT5X6O.js";import{c as Z,h as ee,i as te,k as ne,m as ie,n as oe,t as re,u as ae,v as se,w as de,z as le}from"./chunk-7HUEGPJN.js";import{b as Q}from"./chunk-ZE4OOGMT.js";import{d as K}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{z as H}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as O,Aa as f,Dc as S,Hc as T,Ic as s,Jc as N,Kc as R,Lc as j,S as I,Xb as _,Yc as z,Zb as h,ac as P,bc as E,ca as D,cc as x,db as C,dc as o,ec as r,ed as $,fc as m,fd as q,gb as a,gc as v,hc as M,ic as V,mc as k,nc as L,oa as p,pa as g,rb as w,rc as u,sd as B,tc as d,xc as A,yb as y,yc as U,zc as F}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function ue(t,c){if(t&1&&(v(0,"swiper-slide")(1,"div")(2,"a",1),V(3,"img",2),M()(),v(4,"a",3),s(5),M(),v(6,"p",4),s(7),M()()),t&2){let e=c.$implicit;a(2),L("href",e.href,C),a(),L("src",e.imgSrc,C),a(),L("href",e.href,C),a(),N(e.title),a(2),N(e.description)}}var me=(()=>{class t{constructor(){this.newsList=B([])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=y({type:t,selectors:[["POS-news-swiper"]],inputs:{newsList:[1,"newsList"]},decls:3,vars:0,consts:[["pagination","true","pagination-clickable","true","autoplay-delay","5000","autoplay-disable-on-interaction","false",2,"margin-top","30px"],["target","_blank",3,"href"],[1,"border-0","rounded-1","mb-8",2,"width","252px","height","152px",3,"src"],["target","_blank",1,"fw-bold","h5","text-success","header-title","fs-4",3,"href"],[2,"margin-bottom","3rem"]],template:function(n,i){n&1&&(v(0,"swiper-container",0),P(1,ue,8,5,"swiper-slide",null,O),M()),n&2&&(a(),E(i.newsList()))},styles:["swiper-container[_ngcontent-%COMP%]{--swiper-pagination-bullet-inactive-color: #89b03e;--swiper-pagination-color: #89b03e}"],changeDetection:0})}}return t})();var pe=(()=>{class t{constructor(){}getBrowserName(){let e=window.navigator.userAgent.toLowerCase();switch(!0){case(e.indexOf("edge")>-1||e.indexOf("edg")>-1):return"edge";case e.indexOf("opr")>-1:return"opera";case e.indexOf("chrome")>-1:return"chrome";case e.indexOf("trident")>-1:return"ie";case e.indexOf("firefox")>-1:return"firefox";case e.indexOf("safari")>-1:return"safari";default:return"other"}}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var _e=["subdomainEl"],he=(t,c)=>({"rounded-end":t,"border-end-0":c});function xe(t,c){if(t&1&&(o(0,"div",33),m(1,"img",34),r()),t&2){let e=c.$implicit;a(),x("src",e.img,C)("title",e.title)("alt",e.title)}}function be(t,c){if(t&1){let e=k();o(0,"div",15)(1,"h3",16),s(2,"DealPOS Omnichannel"),r(),o(3,"small",17),s(4," Multichannel Inventory Management Software "),r()(),o(5,"form",18)(6,"div",19)(7,"div",20)(8,"div",21)(9,"span"),m(10,"i",22),r()(),o(11,"input",23,0),u("ngModelChange",function(i){p(e);let l=d();return g(l.subdomain.set(i))}),r(),o(13,"div")(14,"select",24),u("ngModelChange",function(i){p(e);let l=d();return g(l.domain.set(i))}),o(15,"option",25),s(16," .dealpos.co.id "),r(),o(17,"option",26),s(18,".dealpos.net"),r(),o(19,"option",27),s(20,".dealpos.com"),r(),o(21,"option",28),s(22,".dealpos.app"),r()()()(),o(23,"div",29)(24,"button",30),u("click",function(){p(e);let i=d();return g(i.onNextState())}),s(25," Next "),r()(),o(26,"div",31)(27,"div",32),P(28,xe,2,3,"div",33,O),r()()()()}if(t&2){let e=d();a(11),x("ngModel",e.subdomain()),a(3),x("ngModel",e.domain()),a(14),E(e.channels)}}function Ce(t,c){t&1&&(o(0,"p"),s(1,"Username is required"),r())}function we(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Ce,2,0,"p"),r()()),t&2){d();let e=S(14);a(3),h(e.errors.required?3:-1)}}function ve(t,c){if(t&1){let e=k();o(0,"i",57),u("click",function(){p(e);let i=d(3);return g(i.hideShowPassword())}),r()}if(t&2){let e=d(3);T("fa "+e.passwordIcon())}}function Me(t,c){if(t&1&&(o(0,"span",47),_(1,ve,1,2,"i",56),r()),t&2){let e=d(2);a(),h(e.password()?1:-1)}}function Se(t,c){t&1&&(o(0,"p"),s(1,"Password is required"),r())}function ye(t,c){if(t&1&&(o(0,"div",44),m(1,"div",54),o(2,"div",55),_(3,Se,2,0,"p"),r()()),t&2){d();let e=S(21);a(3),h(e.errors.required?3:-1)}}function Oe(t,c){if(t&1){let e=k();o(0,"div",35)(1,"h3",36),s(2,"Sign in"),r(),o(3,"h3",37),s(4," to "),o(5,"h6",38),s(6),r(),o(7,"i",39),u("click",function(){p(e);let i=d();return g(i.onEditDomain())}),r()()(),o(8,"form",40)(9,"div",41)(10,"div",21)(11,"span"),m(12,"i",42),r()(),o(13,"input",43,1),u("ngModelChange",function(i){p(e);let l=d();return g(l.username.set(i))}),r()(),_(15,we,4,1,"div",44),o(16,"div",20)(17,"div",21)(18,"span"),m(19,"i",45),r()(),o(20,"input",46,2),u("ngModelChange",function(i){p(e);let l=d();return g(l.password.set(i))}),r(),_(22,Me,2,1,"span",47),r(),_(23,ye,4,1,"div",44),o(24,"div",48)(25,"button",49),u("click",function(){p(e);let i=d();return g(i.onLogin())}),s(26," Log in "),r()(),o(27,"div",50),m(28,"hr"),o(29,"span",51),s(30,"or"),r(),m(31,"hr"),r(),o(32,"div")(33,"button",52),u("click",function(i){p(e);let l=d();return g(l.onLoginByGoogle(i))}),m(34,"i",53),s(35," Sign In with Google "),r()()()}if(t&2){let e=S(14),n=S(21),i=d();a(6),j(" (",i.subdomain(),"",i.domain(),") "),a(7),x("ngModel",i.username()),a(2),h(e.invalid&&(e.dirty||e.touched)?15:-1),a(5),T(z(10,he,i.browser()=="edge",i.browser()!="edge")),x("type",i.passwordType())("ngModel",i.password()),a(2),h(i.browser()!="edge"?22:-1),a(),h(n.invalid&&(n.dirty||n.touched)?23:-1)}}var He=(()=>{class t{constructor(e,n,i,l,ge){this._router=e,this.toastr=n,this.checkBrowser=i,this.authService=l,this.ngxPermission=ge,this.username=f(""),this.password=f(""),this.subdomain=f(""),this.domain=f(".dealpos.co.id"),this.loginState=f("FORM_DOMAIN"),this.passwordType=f("password"),this.passwordIcon=f("fa-eye"),this.browser=f(""),this.channels=[{title:"Shopee",img:b.SHOOPE},{title:"Tokopedia",img:b.TOKOPEDIA},{title:"Tiktok",img:b.TIKTOK},{title:"Woocommerce",img:b.WOOCOMMERCE},{title:"Lazada",img:b.LAZADA},{title:"Shopify",img:b.SHOPIFY},{title:"Plugo",img:b.PLUGONEW}],this.version=G.version,this.news$=l.getNews().pipe(I(1))}ngOnInit(){this.initLogin(),this.browser.set(this.checkBrowser.getBrowserName()),document.body.classList.add("login-body"),this.initChangeLogUrl()}initChangeLogUrl(){let e=`https://changelog.dealpos.com/?categories=cat_nILYcoEQzgGWX&view=complete&v=${this.version}`;this.changelogUrl=e}ngAfterViewInit(){this.setAutoFocusDomain()}initLogin(){let e=JSON.parse(localStorage.getItem("Authorization"));if(e){this.username.set(e?.username||""),this.subdomain.set(e?.Host?.split(".")[0]||"");let n=e?.Host?.split("dealpos");this.domain.set(`.dealpos${n[1]}`),this.authService.isActiveToken()&&this._router.navigate(["menu"])}}onNextState(){if(W.IsEmpty(this.subdomain())){this.toastr.warning("Account Domain is required","Warning");return}this.parseSubdomain(),this.loginState.set("FORM_AUTH")}parseSubdomain(){let e=this.subdomain(),n=e.indexOf(".dealpos");n!=-1&&this.subdomain.set(e.substring(0,n))}onEditDomain(){this.loginState.set("FORM_DOMAIN")}onLogin(){let e={Host:`${this.subdomain()}${this.domain()}`,Username:this.username(),Password:this.password()};this.authService.login(e).subscribe(n=>{this.onSuccessLogin(n)})}onLoginByGoogle(e){let n=`${this.subdomain()}${this.domain()}`;this.authService.loginWithGoogle(e,n).subscribe(i=>{this.onSuccessLogin(i)})}onSuccessLogin(e){this.ngxPermission.hasPermission([X.DashboardView]).then(n=>{n?this._router.navigate(["menu/dashboard"]):e?.TotalChannel<1?this._router.navigate(["menu/channel"]):this._router.navigate(["menu/products"])})}setAutoFocusDomain(){this.subdomainEl.nativeElement.focus()}hideShowPassword(){this.passwordType.set(this.passwordType()==="text"?"password":"text"),this.passwordIcon.set(this.passwordIcon()==="fa-eye"?"fa-eye-slash":"fa-eye")}ngOnDestroy(){document.body.classList.remove("login-body")}static{this.\u0275fac=function(n){return new(n||t)(w(K),w(Q),w(pe),w(J),w(Y))}}static{this.\u0275cmp=y({type:t,selectors:[["app-login"]],viewQuery:function(n,i){if(n&1&&A(_e,5),n&2){let l;U(l=F())&&(i.subdomainEl=l.first)}},decls:18,vars:6,consts:[["subdomainEl",""],["usernameCtrl","ngModel"],["passwordCtrl","ngModel"],[1,"container-fluid"],[1,"row","mx-auto","bg-white","login-pane"],[1,"col-md-5","order-md-first","order-last","border-end","features-pane","pt-12","pb-9"],[1,"fw-normal","fs-2","header-title","text-center"],[3,"newsList"],[1,"col-md-7","order-md-last","order-first","py-12","sign-in-pane"],[1,"d-flex","copyright",2,"margin-left","20px"],[1,"align-self-center","me-5"],["target","_blank","href","http://www.dealpos.com"],[1,"version",2,"margin-right","18px"],["target","_blank",1,"text-dark","fst-italic",3,"href"],[1,"fa-solid","fa-circle-exclamation","ms-2",2,"font-size","16px"],[1,"text-md-start","text-center"],[1,"fs-2","header-title","me-2","fw-normal"],[1,"text-secondary-emphasis","fst-italic",2,"font-size","11px"],[2,"margin-top","38px"],[1,"form-block","mt-5"],[1,"input-group","input-group-lg","mt-8"],[1,"input-group-text","rounded-start","border-end-0",2,"width","52px"],[1,"fa-solid","fa-cloud"],["placeholder","Store Address","aria-label","Store Address","aria-describedby","basic-addon1","autofocus","","name","Store Address",1,"form-control","form-control-lg","rounded-end-0","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],["name","domainOption",1,"form-select","form-control","form-control-lg","border-start-0","border-start","rounded-end","rounded-start-0","domain-option",2,"height","58px",3,"ngModelChange","ngModel"],["selected","","value",".dealpos.co.id"],["value",".dealpos.net"],["value",".dealpos.com"],["value",".dealpos.app"],[1,"w-100",2,"margin-top","1.8rem"],["name","next","data-cy","next","type","submit",1,"btn","btn-xl","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"d-flex","align-items-center","justify-content-center",2,"margin-top","2.1rem"],[1,"d-flex","align-items-center","justify-content-between","w-100"],[1,""],[1,"border-0",2,"width","34px","height","34px",3,"src","title","alt"],[1,"d-flex","align-items-center","justify-content-start","mb-2"],[1,"robotoslab","fw-normal"],[1,"ms-2","fw-normal"],[1,"me-2","robotoslab","d-inline-block","text-success"],["title","Edit Store Address",1,"fa-solid","fa-edit","link-success","fs-5","pointer",3,"click"],[2,"margin-top","29px"],[1,"input-group","input-group-lg"],[1,"fas","fa-user","fa-lg"],["id","txtUsername","type","text","data-cy","username","required","","placeholder","Username","aria-label","Username","aria-describedby","basic-addon1","autofocus","","name","username",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","ngModel"],[1,"d-flex","justify-content-start","w-50","mb-4",2,"height","16px"],[1,"fas","fa-key","fa-lg"],["id","txtPassword","data-cy","password","placeholder","Password","aria-label","Password","aria-describedby","basic-addon1","autofocus","","name","password","required","",1,"form-control","form-control-lg","rounded-end","border-start-0","ps-1",2,"height","58px",3,"ngModelChange","type","ngModel"],[1,"input-group-text","border-start-0","rounded-end"],[1,"w-100","mt-8"],["data-cy","login","type","submit",1,"btn","btn-lg","btn-success","btn-block","font125rem","robotoslab","w-100",3,"click"],[1,"divider","d-flex","align-items-center","justify-content-center"],[1,"mx-4","text-muted"],[1,"btn","btn-social-login","text-success","w-100","fw-bold",3,"click"],[1,"fa-brands","fa-google"],[2,"width","52px"],[1,"text-danger","ps-1"],[3,"class"],[3,"click"]],template:function(n,i){n&1&&(o(0,"div",3)(1,"div",4)(2,"div",5)(3,"h3",6),s(4,"New Features"),r(),m(5,"POS-news-swiper",7),$(6,"async"),r(),o(7,"div",8),_(8,be,30,2)(9,Oe,36,13),r()(),o(10,"div",9)(11,"span",10),s(12,"powered by :"),r(),m(13,"a",11),r(),o(14,"div",12)(15,"a",13),s(16),m(17,"i",14),r()()()),n&2&&(a(5),x("newsList",q(6,4,i.news$)),a(3),h(i.loginState()=="FORM_DOMAIN"?8:9),a(7),x("href",i.changelogUrl,C),a(),R("version ",i.version))},dependencies:[me,le,oe,ae,se,Z,re,ee,te,de,ie,ne,H],styles:[".login-pane[_ngcontent-%COMP%]{max-width:57rem;height:max-content;margin-top:115px}@media(max-width:768px){.login-pane[_ngcontent-%COMP%]{margin-top:0}}@media only screen and (max-width:1300px)and (min-width:1024px){.login-pane[_ngcontent-%COMP%]{margin-top:30px}}.header-title[_ngcontent-%COMP%]{font-family:Roboto Slab}.carousel-inner[_ngcontent-%COMP%]{height:310px}.carousel-inner[_ngcontent-%COMP%] div.carousel-item[_ngcontent-%COMP%]{top:28px}@media(max-width:820px){.carousel-indicators[_ngcontent-%COMP%]{bottom:-8px}}.carousel-indicators[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{background-color:#ddd;width:1.25rem;height:.375rem;transition:.3s}.carousel-indicators[_ngcontent-%COMP%] button.active[_ngcontent-%COMP%]{background-color:var(--bs-success)}.sign-in-pane[_ngcontent-%COMP%]{padding:0 3rem 0 3.5rem}@media(max-width:768px){.sign-in-pane[_ngcontent-%COMP%]{padding:24px 12px}.sign-in-pane[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{padding-left:8px!important}}@media(min-width:1200px){.sign-in-pane[_ngcontent-%COMP%]{border-bottom:1px solid #89b03e;border-right:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:0 10px 10px 0}}.subscription.danger[_ngcontent-%COMP%]{background-color:#f2dede;border-color:#eb415d;color:#a94442}.subscription.warning[_ngcontent-%COMP%]{background-color:#fcf8e3;border-color:#faebcc;color:#8a6d3b}@media(max-width:768px){.features-pane[_ngcontent-%COMP%]{border-right:0px!important}}@media(min-width:1200px){.features-pane[_ngcontent-%COMP%]{border-left:1px solid #89b03e;border-bottom:1px solid #89b03e;border-top:1px solid #89b03e;border-radius:10px 0 0 10px}}.copyright[_ngcontent-%COMP%]{position:absolute;bottom:1.25rem;left:1.25rem}.copyright[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{width:8.125rem;height:2.5rem;background-image:url(//res.cloudinary.com/pos/image/upload/POS/Images/Login/dealpos.png);background-position:left top;background-repeat:no-repeat;background-size:contain}.version[_ngcontent-%COMP%]{bottom:1.25rem;right:1.25rem;position:absolute}@media(max-width:768px){.copyright[_ngcontent-%COMP%], .version[_ngcontent-%COMP%]{position:static;margin-top:10px}.copyright[_ngcontent-%COMP%]{justify-content:center}}div.divider[_ngcontent-%COMP%] > hr[_ngcontent-%COMP%]{margin-top:1.2rem;margin-bottom:1.2rem;border-top:1px solid rgba(0,0,0,.855);width:20%}button.btn-social-login[_ngcontent-%COMP%], .btn-login[_ngcontent-%COMP%]{border:1px solid var(--bs-success)}.fa-google[_ngcontent-%COMP%]{background:conic-gradient(from -45deg,#ea4335 110deg,#4285f4 90deg 180deg,#34a853 180deg 270deg,#fbbc05 270deg) 73% 55%/150% 150% no-repeat;-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{color:#fe3a00!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited i[_ngcontent-%COMP%]{color:#f4f4f4!important}.version[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{margin-left:-10px}.domain-option[_ngcontent-%COMP%]{padding:.75rem;color:#343434;font-size:.875rem;width:8.5rem}"],changeDetection:0})}}return t})();export{He as LoginComponent};
@@ -1 +1 @@
1
- import{a as e}from"./chunk-TFDDAGWF.js";import{a as s}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-ZE4OOGMT.js";import{c as d,g as l}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as a,cc as p,dc as c,ec as m,fc as o,gb as r,yb as i}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var u=(()=>{class t{constructor(){this.tabs=a([{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"},{Title:"Tracking API",Url:"/menu/json-api/tracking-api"},{Title:"Return API",Url:"/menu/json-api/return-api"}])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=i({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,h){n&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),n&2&&(r(3),p("Tabs",h.tabs()))},dependencies:[s,l,d],encapsulation:2,changeDetection:0})}}return t})();var w=[{path:"",component:u,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-BJSFGAT5.js").then(t=>t.OrderApiComponent)},canActivate:[e],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-2EBT5M4I.js").then(t=>t.ProductApiComponent)},canActivate:[e],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-6BLHGE4W.js").then(t=>t.EscrowApiComponent)},canActivate:[e],data:{title:"Escrow API"}},{path:"tracking-api",loadComponent(){return import("./chunk-NXS7JQPY.js").then(t=>t.TrackingApiComponent)},canActivate:[e],data:{title:"Tracking API"}},{path:"return-api",loadComponent(){return import("./chunk-GSYHZ24Q.js").then(t=>t.ReturnApiComponent)},canActivate:[e],data:{title:"Return API"}}]}];export{w as routes};
1
+ import{a as e}from"./chunk-OQVRPQNT.js";import{a as s}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-ZE4OOGMT.js";import{c as d,g as l}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as a,cc as p,dc as c,ec as m,fc as o,gb as r,yb as i}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var u=(()=>{class t{constructor(){this.tabs=a([{Title:"Origin Order API",Url:"/menu/json-api/order-api"},{Title:"Origin Product API",Url:"/menu/json-api/product-api"},{Title:"Origin Escrow API",Url:"/menu/json-api/escrow-api"},{Title:"Tracking API",Url:"/menu/json-api/tracking-api"},{Title:"Return API",Url:"/menu/json-api/return-api"}])}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=i({type:t,selectors:[["app-json-api"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(n,h){n&1&&(c(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),n&2&&(r(3),p("Tabs",h.tabs()))},dependencies:[s,l,d],encapsulation:2,changeDetection:0})}}return t})();var w=[{path:"",component:u,children:[{path:"",redirectTo:"order-api",pathMatch:"full"},{path:"order-api",loadComponent(){return import("./chunk-KBICIMAX.js").then(t=>t.OrderApiComponent)},canActivate:[e],data:{title:"Order API"}},{path:"product-api",loadComponent(){return import("./chunk-47G4FBTY.js").then(t=>t.ProductApiComponent)},canActivate:[e],data:{title:"Product API"}},{path:"escrow-api",loadComponent(){return import("./chunk-WM4MVHSL.js").then(t=>t.EscrowApiComponent)},canActivate:[e],data:{title:"Escrow API"}},{path:"tracking-api",loadComponent(){return import("./chunk-24SW3YEI.js").then(t=>t.TrackingApiComponent)},canActivate:[e],data:{title:"Tracking API"}},{path:"return-api",loadComponent(){return import("./chunk-S5JU3KZ7.js").then(t=>t.ReturnApiComponent)},canActivate:[e],data:{title:"Return API"}}]}];export{w as routes};
@@ -1 +1 @@
1
- import{a as pe}from"./chunk-DJ6VZBCD.js";import{a as se}from"./chunk-RLLQHRSD.js";import{a as de}from"./chunk-ZLMUYIKY.js";import"./chunk-QK2JCSM3.js";import"./chunk-ON5KFKHE.js";import{a as le}from"./chunk-EYHQ2ZKL.js";import"./chunk-BGFEVOPZ.js";import{a as oe,b as ae,d as re}from"./chunk-474G6BPL.js";import{b as ie}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7RKWOSCN.js";import"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-3OTK6GG2.js";import{b as ne,c as T}from"./chunk-KFJBIBDQ.js";import{b as te}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as K}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as U,h as J,m as Q,o as X,u as Y,v as Z,z as ee}from"./chunk-7HUEGPJN.js";import{e as H}from"./chunk-ZE4OOGMT.js";import{b as $,e as j}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as G}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as P,Aa as g,Da as E,Ea as O,Eb as w,Fc as F,Hc as A,Ic as l,Jc as b,Kc as v,Wc as L,Xb as h,Xc as V,Y as M,Zb as _,ac as B,bc as I,cc as p,db as R,dc as n,ec as t,ed as k,fc as S,gb as o,gd as z,ha as f,mc as W,md as q,oa as x,pa as N,rc as m,tc as C,yb as D}from"./chunk-5VYDZBNH.js";import{a as c,b as y}from"./chunk-QWWW7GFA.js";var ge=()=>["/menu/log/order/detail-user"],ue=a=>({ID:a});function ce(a,u){if(a&1&&(n(0,"span",22),S(1,"img",23),t(),l(2)),a&2){let e=u.item;o(),p("src",e.Img,R)("alt",e.Name),o(),v(" ",e.Name," ")}}function he(a,u){a&1&&(n(0,"th")(1,"span",29),l(2," Response Body Warning "),t()())}function _e(a,u){a&1&&(n(0,"th")(1,"span",29),l(2," Number Override "),t()())}function Ce(a,u){if(a&1&&(n(0,"td",26)(1,"span",31),l(2),t()()),a&2){let e=C().$implicit;o(),F("bg-warning",e.responseBodyWarning!=null),o(),b(e.responseBodyWarning)}}function fe(a,u){if(a&1&&(n(0,"td"),l(1),t()),a&2){let e=C().$implicit;o(),v(" ",e.ResponseBodyWarningReference," ")}}function be(a,u){if(a&1&&(n(0,"tr")(1,"td")(2,"a",30),l(3),k(4,"date"),t()(),n(5,"td"),l(6),t(),n(7,"td"),l(8),t(),n(9,"td"),l(10),t(),n(11,"td",26)(12,"span",31),l(13),t()(),h(14,Ce,3,3,"td",26),h(15,fe,2,1,"td"),t()),a&2){let e=u.$implicit,d=C(2);o(2),p("routerLink",L(14,ge))("queryParams",V(15,ue,e.ID)),o(),v(" ",z(4,11,e.Created,"dd MMM yyyy HH:mm:ss")," "),o(3),b(e.ChannelName),o(2),b(e.POSActionTypeString),o(2),b(e.Number),o(2),A(e.ResponseCode===200||e.ResponseCode===202?"bg-success":"bg-warning"),o(),v(" ",e.ResponseCode," "),o(),_(d.responseBodyWarningVisible()?14:-1),o(),_(d.responseBodyWarningVisible()?15:-1)}}function ve(a,u){if(a&1){let e=W();n(0,"div",20)(1,"table",24)(2,"thead")(3,"tr",25)(4,"th"),l(5,"Date"),t(),n(6,"th"),l(7,"Channel"),t(),n(8,"th"),l(9,"Actions"),t(),n(10,"th"),l(11,"Number"),t(),n(12,"th",26)(13,"span",27),l(14," Response Code "),t()(),h(15,he,3,0,"th"),h(16,_e,3,0,"th"),t()(),n(17,"tbody"),B(18,be,16,17,"tr",null,P),t()(),n(20,"mat-paginator",28),m("page",function(i){x(e);let r=C();return N(r.changePage(i))}),t()()}if(a&2){let e=C();o(15),_(e.responseBodyWarningVisible()?15:-1),o(),_(e.responseBodyWarningVisible()?16:-1),o(2),I(e.Result()),o(2),p("length",e.paginationTotal())("pageSize",e.paginationPageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function ye(a,u){a&1&&(n(0,"div",21),S(1,"app-empty-state"),t())}var qe=(()=>{class a{constructor(){this.http=f(H),this._RawLogService=f(pe),this.route=f($),this.authService=f(K),this.queryParams=ne(this.route.queryParams,{initialValue:{}}),this.responseCode=q(()=>this.queryParams()?.responseCode),this.Result=g([]),this.filter=g({RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""}),this.paginationTotal=g(0),this.paginationPageSize=g(0),this.Number=g(null),this.channelOptions=g(this.authService.getChannels()),this.ActionTypeList=g(null),this.responseBodyWarningVisible=g(!1),this.loader=T({params:()=>this.queryParams(),stream:({params:e})=>this.http.post("/api/OrdersLoader/Get",this.responseCode()!==void 0?e:{})}),this.reloadToken=g(0),this.resource=T({params:()=>this.reloadToken(),stream:()=>{let e=c(c({},this.filter()),this.responseCode()!==void 0?{responseCode:this.responseCode()}:{});return this.http.post("/api/Orders/Get",e).pipe(M(d=>{this._RawLogService.Data=d.hits;let i=[];for(let r of d.hits){r._source.log.responseBodyWarning!=null&&this.responseBodyWarningVisible.set(!0);let s={ID:r._id,Created:r._source["@timestamp_received"],shopId:r._source.shopId,MarketTypeString:r._source.log.type,ChannelName:r._source?.channelId!=null?this.channelOptions().find(me=>me.ID===r._source?.channelId)?.Name:"",POSActionTypeString:r._source.message,Number:r._source.log.number,ResponseCode:r._source.log.responseCode,responseBodyWarning:r._source.log.responseBodyWarning,ResponseBodyWarningReference:r._source.log.ResponseBodyWarningReference};i.push(s)}this.Result.set(i),this.paginationTotal.set(d.total.value),this.paginationPageSize.set(this.filter().RowCount>this.paginationTotal()?this.paginationTotal():this.filter().RowCount)}))}}),E(()=>{let e=this.loader.value();e&&(this.filter.update(d=>c(c({},d),e.Filter)),this.ActionTypeList.set(e.Options.ActionTypeList),O(()=>this.Get()))})}Get(e){this.filter.update(d=>y(c({},d),{Number:e})),this.reloadToken.update(d=>d+1)}changePage(e){this.filter.update(d=>y(c({},d),{PageNumber:e.pageIndex+1})),this.Get()}updateFilter(e,d){this.filter.update(i=>y(c({},i),{[e]:d}))}static{this.\u0275fac=function(d){return new(d||a)}}static{this.\u0275cmp=D({type:a,selectors:[["app-order"]],decls:42,vars:14,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(d,i){if(d&1&&(n(0,"mainpanel",0),m("textChange",function(s){return i.Number.set(s)})("onSubmit",function(s){return i.Get(s)}),n(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),t(),n(5,"ng-select",2),m("ngModelChange",function(s){return i.updateFilter("ChannelID",s)}),w(6,ce,3,3,"ng-template",3),t()(),n(7,"div",4)(8,"label",1),l(9,"Action"),t(),n(10,"ng-select",5),m("ngModelChange",function(s){return i.updateFilter("ActionType",s)}),t()(),n(11,"div",4)(12,"label",6),l(13,"From/To"),t(),n(14,"div",7)(15,"datepicker",8),m("dateChange",function(s){return i.updateFilter("From",s)}),t()(),n(16,"div")(17,"datepicker",9),m("dateChange",function(s){return i.updateFilter("To",s)}),t()()(),n(18,"div",4)(19,"label",10),l(20,"Response Code"),t(),n(21,"input",11),m("ngModelChange",function(s){return i.updateFilter("StatusCode",s)}),t()(),n(22,"div",4)(23,"label",10),l(24,"Response Body Warning"),t(),n(25,"input",12),m("ngModelChange",function(s){return i.updateFilter("responseBodyWarning",s)}),t(),n(26,"datalist",13),S(27,"option",14),t()(),n(28,"div",4)(29,"label",10),l(30,"Page Number"),t(),n(31,"input",15),m("ngModelChange",function(s){return i.updateFilter("PageNumber",s)}),t()(),n(32,"div",4)(33,"label",10),l(34,"Page Size"),t(),n(35,"input",16),m("ngModelChange",function(s){return i.updateFilter("RowCount",s)}),t()()(),n(36,"content")(37,"div",17)(38,"div",18)(39,"div",19),h(40,ve,21,5,"div",20)(41,ye,2,0,"div",21),t()()()()()),d&2){let r;p("text",i.Number()),o(5),p("clearable",!0)("items",i.channelOptions())("ngModel",i.filter().ChannelID),o(5),p("clearable",!0)("items",i.ActionTypeList())("ngModel",i.filter().ActionType),o(5),p("date",i.filter().From),o(2),p("date",i.filter().To),o(4),p("ngModel",i.filter().StatusCode),o(4),p("ngModel",i.filter().responseBodyWarning),o(6),p("ngModel",i.filter().PageNumber),o(4),p("ngModel",i.filter().RowCount),o(5),_(((r=i.Result())==null?null:r.length)>0?40:41)}},dependencies:[ie,re,ee,Y,Z,U,X,J,Q,oe,ae,de,te,j,se,le,G],encapsulation:2,changeDetection:0})}}return a})();export{qe as OrderComponent};
1
+ import{a as pe}from"./chunk-DJ6VZBCD.js";import{a as se}from"./chunk-RLLQHRSD.js";import{a as de}from"./chunk-ZLMUYIKY.js";import"./chunk-QK2JCSM3.js";import"./chunk-ON5KFKHE.js";import{a as le}from"./chunk-EYHQ2ZKL.js";import"./chunk-BGFEVOPZ.js";import{a as oe,b as ae,d as re}from"./chunk-474G6BPL.js";import{b as ie}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7RKWOSCN.js";import"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-3OTK6GG2.js";import{b as ne,c as T}from"./chunk-KFJBIBDQ.js";import{b as te}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as K}from"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as U,h as J,m as Q,o as X,u as Y,v as Z,z as ee}from"./chunk-7HUEGPJN.js";import{e as H}from"./chunk-ZE4OOGMT.js";import{b as $,e as j}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as G}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as P,Aa as g,Da as E,Ea as O,Eb as w,Fc as F,Hc as A,Ic as l,Jc as b,Kc as v,Wc as L,Xb as h,Xc as V,Y as M,Zb as _,ac as B,bc as I,cc as p,db as R,dc as n,ec as t,ed as k,fc as S,gb as o,gd as z,ha as f,mc as W,md as q,oa as x,pa as N,rc as m,tc as C,yb as D}from"./chunk-5VYDZBNH.js";import{a as c,b as y}from"./chunk-QWWW7GFA.js";var ge=()=>["/menu/log/order/detail-user"],ue=a=>({ID:a});function ce(a,u){if(a&1&&(n(0,"span",22),S(1,"img",23),t(),l(2)),a&2){let e=u.item;o(),p("src",e.Img,R)("alt",e.Name),o(),v(" ",e.Name," ")}}function he(a,u){a&1&&(n(0,"th")(1,"span",29),l(2," Response Body Warning "),t()())}function _e(a,u){a&1&&(n(0,"th")(1,"span",29),l(2," Number Override "),t()())}function Ce(a,u){if(a&1&&(n(0,"td",26)(1,"span",31),l(2),t()()),a&2){let e=C().$implicit;o(),F("bg-warning",e.responseBodyWarning!=null),o(),b(e.responseBodyWarning)}}function fe(a,u){if(a&1&&(n(0,"td"),l(1),t()),a&2){let e=C().$implicit;o(),v(" ",e.ResponseBodyWarningReference," ")}}function be(a,u){if(a&1&&(n(0,"tr")(1,"td")(2,"a",30),l(3),k(4,"date"),t()(),n(5,"td"),l(6),t(),n(7,"td"),l(8),t(),n(9,"td"),l(10),t(),n(11,"td",26)(12,"span",31),l(13),t()(),h(14,Ce,3,3,"td",26),h(15,fe,2,1,"td"),t()),a&2){let e=u.$implicit,d=C(2);o(2),p("routerLink",L(14,ge))("queryParams",V(15,ue,e.ID)),o(),v(" ",z(4,11,e.Created,"dd MMM yyyy HH:mm:ss")," "),o(3),b(e.ChannelName),o(2),b(e.POSActionTypeString),o(2),b(e.Number),o(2),A(e.ResponseCode===200||e.ResponseCode===202?"bg-success":"bg-warning"),o(),v(" ",e.ResponseCode," "),o(),_(d.responseBodyWarningVisible()?14:-1),o(),_(d.responseBodyWarningVisible()?15:-1)}}function ve(a,u){if(a&1){let e=W();n(0,"div",20)(1,"table",24)(2,"thead")(3,"tr",25)(4,"th"),l(5,"Date"),t(),n(6,"th"),l(7,"Channel"),t(),n(8,"th"),l(9,"Actions"),t(),n(10,"th"),l(11,"Number"),t(),n(12,"th",26)(13,"span",27),l(14," Response Code "),t()(),h(15,he,3,0,"th"),h(16,_e,3,0,"th"),t()(),n(17,"tbody"),B(18,be,16,17,"tr",null,P),t()(),n(20,"mat-paginator",28),m("page",function(i){x(e);let r=C();return N(r.changePage(i))}),t()()}if(a&2){let e=C();o(15),_(e.responseBodyWarningVisible()?15:-1),o(),_(e.responseBodyWarningVisible()?16:-1),o(2),I(e.Result()),o(2),p("length",e.paginationTotal())("pageSize",e.paginationPageSize())("pageIndex",e.filter().PageNumber==0?0:e.filter().PageNumber-1)}}function ye(a,u){a&1&&(n(0,"div",21),S(1,"app-empty-state"),t())}var qe=(()=>{class a{constructor(){this.http=f(H),this._RawLogService=f(pe),this.route=f($),this.authService=f(K),this.queryParams=ne(this.route.queryParams,{initialValue:{}}),this.responseCode=q(()=>this.queryParams()?.responseCode),this.Result=g([]),this.filter=g({RowCount:20,Number:"",PageNumber:1,ActionType:"",ChannelID:"",StatusCode:"",From:"",To:"",responseBodyWarning:""}),this.paginationTotal=g(0),this.paginationPageSize=g(0),this.Number=g(null),this.channelOptions=g(this.authService.getChannels()),this.ActionTypeList=g(null),this.responseBodyWarningVisible=g(!1),this.loader=T({params:()=>this.queryParams(),stream:({params:e})=>this.http.post("/api/OrdersLoader/Get",this.responseCode()!==void 0?e:{})}),this.reloadToken=g(0),this.resource=T({params:()=>this.reloadToken(),stream:()=>{let e=c(c({},this.filter()),this.responseCode()!==void 0?{responseCode:this.responseCode()}:{});return this.http.post("/api/Orders/Get",e).pipe(M(d=>{this._RawLogService.Data=d.hits;let i=[];for(let r of d.hits){r._source.log.responseBodyWarning!=null&&this.responseBodyWarningVisible.set(!0);let s={ID:r._id,Created:r._source["@timestamp_received"],shopId:r._source.shopId,MarketTypeString:r._source.log.type,ChannelName:r._source?.channelId!=null?this.channelOptions().find(me=>me.ID===r._source?.channelId)?.Name:"",POSActionTypeString:r._source.message,Number:r._source.log.number,ResponseCode:r._source.log.responseCode,responseBodyWarning:r._source.log.responseBodyWarning,ResponseBodyWarningReference:r._source.log.ResponseBodyWarningReference};i.push(s)}this.Result.set(i),this.paginationTotal.set(d.total.value),this.paginationPageSize.set(this.filter().RowCount>this.paginationTotal()?this.paginationTotal():this.filter().RowCount)}))}}),E(()=>{let e=this.loader.value();e&&(this.filter.update(d=>c(c({},d),e.Filter)),this.ActionTypeList.set(e.Options.ActionTypeList),O(()=>this.Get()))})}Get(e){this.filter.update(d=>y(c({},d),{Number:e})),this.reloadToken.update(d=>d+1)}changePage(e){this.filter.update(d=>y(c({},d),{PageNumber:e.pageIndex+1})),this.Get()}updateFilter(e,d){this.filter.update(i=>y(c({},i),{[e]:d}))}static{this.\u0275fac=function(d){return new(d||a)}}static{this.\u0275cmp=D({type:a,selectors:[["app-order"]],decls:42,vars:14,consts:[["headerTitle","Order Log","searchBoxPlaceHolder","Invoice Number..",3,"textChange","onSubmit","text"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","channelid","bindValue","ID","placeholder","Select Channel",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],["ng-option-tmp","","ng-label-tmp",""],[1,"mt-5"],["bindLabel","Value","name","ActionType","bindValue","Key","placeholder","Action Type",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","text","name","StatusCode",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","text","name","responseBodyWarning","list","listresponseBodyWarning",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["id","listresponseBodyWarning"],["value","number-override"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","RowCount",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"me-2"],[2,"width","18px",3,"src","alt"],[1,"table","table-hover"],[1,"table-light"],[1,"text-center"],["matTooltip","Http Status Code from developer.dealpos.com."],[3,"page","length","pageSize","pageIndex"],["matTooltip","ex: when payload.Number != response.Number value will be number-override"],[3,"routerLink","queryParams"],[1,"text-white","p-2","rounded","response-desc"]],template:function(d,i){if(d&1&&(n(0,"mainpanel",0),m("textChange",function(s){return i.Number.set(s)})("onSubmit",function(s){return i.Get(s)}),n(1,"filters")(2,"div")(3,"label",1),l(4,"Channel"),t(),n(5,"ng-select",2),m("ngModelChange",function(s){return i.updateFilter("ChannelID",s)}),w(6,ce,3,3,"ng-template",3),t()(),n(7,"div",4)(8,"label",1),l(9,"Action"),t(),n(10,"ng-select",5),m("ngModelChange",function(s){return i.updateFilter("ActionType",s)}),t()(),n(11,"div",4)(12,"label",6),l(13,"From/To"),t(),n(14,"div",7)(15,"datepicker",8),m("dateChange",function(s){return i.updateFilter("From",s)}),t()(),n(16,"div")(17,"datepicker",9),m("dateChange",function(s){return i.updateFilter("To",s)}),t()()(),n(18,"div",4)(19,"label",10),l(20,"Response Code"),t(),n(21,"input",11),m("ngModelChange",function(s){return i.updateFilter("StatusCode",s)}),t()(),n(22,"div",4)(23,"label",10),l(24,"Response Body Warning"),t(),n(25,"input",12),m("ngModelChange",function(s){return i.updateFilter("responseBodyWarning",s)}),t(),n(26,"datalist",13),S(27,"option",14),t()(),n(28,"div",4)(29,"label",10),l(30,"Page Number"),t(),n(31,"input",15),m("ngModelChange",function(s){return i.updateFilter("PageNumber",s)}),t()(),n(32,"div",4)(33,"label",10),l(34,"Page Size"),t(),n(35,"input",16),m("ngModelChange",function(s){return i.updateFilter("RowCount",s)}),t()()(),n(36,"content")(37,"div",17)(38,"div",18)(39,"div",19),h(40,ve,21,5,"div",20)(41,ye,2,0,"div",21),t()()()()()),d&2){let r;p("text",i.Number()),o(5),p("clearable",!0)("items",i.channelOptions())("ngModel",i.filter().ChannelID),o(5),p("clearable",!0)("items",i.ActionTypeList())("ngModel",i.filter().ActionType),o(5),p("date",i.filter().From),o(2),p("date",i.filter().To),o(4),p("ngModel",i.filter().StatusCode),o(4),p("ngModel",i.filter().responseBodyWarning),o(6),p("ngModel",i.filter().PageNumber),o(4),p("ngModel",i.filter().RowCount),o(5),_(((r=i.Result())==null?null:r.length)>0?40:41)}},dependencies:[ie,re,ee,Y,Z,U,X,J,Q,oe,ae,de,te,j,se,le,G],encapsulation:2,changeDetection:0})}}return a})();export{qe as OrderComponent};
@@ -1 +1 @@
1
- import{b as w}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{b as N}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as M}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import{e as C}from"./chunk-ZE4OOGMT.js";import{b as T}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as b,C as y}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as x,Ic as r,Jc as l,Xb as f,Zb as E,ca as h,cc as s,dc as i,ec as n,ed as c,fc as D,fd as u,gb as o,gd as g,ha as p,md as I,r as m,yb as S}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var O=(()=>{class a{constructor(){this.httpService=p(C)}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(m(d=>d?.hits[0]?._source))}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=h({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();function k(a,j){if(a&1&&(i(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),n()(),i(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),c(16,"date"),n()()()(),i(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()(),i(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),n(),i(42,"div")(43,"span"),r(44),n()()()()()()()()(),i(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),n()(),i(51,"div",6)(52,"pre"),r(53),c(54,"json"),n()()()(),i(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),r(59,"Stack Trace"),n()(),i(60,"div",6),D(61,"pre",12),n()(),i(62,"div",13)(63,"div",5)(64,"h5"),r(65,"Exception Message"),n()(),i(66,"div",6)(67,"pre"),r(68),c(69,"json"),n()()()()()()),a&2){let e=j;o(15),l(g(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),l(e==null||e.error==null?null:e.error.number),o(7),l(e==null?null:e.channelName),o(7),l(e==null?null:e.shopId),o(7),l(e==null?null:e.message),o(9),l(u(54,11,e==null||e.error==null?null:e.error.request)),o(8),s("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),l(u(69,13,e==null||e.error==null?null:e.error.response))}}var W=(()=>{class a{constructor(){this.activatedRoute=p(T),this.exceptionService=p(O),this.authService=p(M),this.channelOptions=x(this.authService.getChannels()),this.exceptionDetail=N(this.exceptionService.getExceptionDetail(this.activatedRoute.snapshot.queryParams?.ID).pipe(m(e=>{let t=e;return{"@timestamp":t["@timestamp"]||t["@timestamp_received"],error:{number:t?.error?.number,stackTrace:t?.error?.stackTrace,request:this.parseJsonSafe(t?.error?.request),response:this.parseJsonSafe(t?.error?.response)},channelName:t?.channelId!=null?this.channelOptions().find(d=>d.ID===t?.channelId)?.Name:t?.shopId,shopId:t?.shopId,message:t?.message}})),{initialValue:null}),this.headerTitle=I(()=>{let e=this.exceptionDetail();return e?.error?.number?"Order #"+e.error.number:"Order"})}parseJsonSafe(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=S({type:a,selectors:[["app-exception-detail"]],decls:3,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(t,d){if(t&1&&(i(0,"mainpanel",0)(1,"content"),f(2,k,70,15,"div",1),n()()),t&2){let v;s("headerTitle",d.headerTitle())("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),E((v=d.exceptionDetail())?2:-1,v)}},dependencies:[w,y,b],encapsulation:2,changeDetection:0})}}return a})();export{W as ExceptionDetailComponent};
1
+ import{b as w}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{b as N}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as M}from"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import{e as C}from"./chunk-ZE4OOGMT.js";import{b as T}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as b,C as y}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as x,Ic as r,Jc as l,Xb as f,Zb as E,ca as h,cc as s,dc as i,ec as n,ed as c,fc as D,fd as u,gb as o,gd as g,ha as p,md as I,r as m,yb as S}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var O=(()=>{class a{constructor(){this.httpService=p(C)}getExceptionDetail(e){return this.httpService.post("/api/Orders/GetDetailException",{ID:e}).pipe(m(d=>d?.hits[0]?._source))}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275prov=h({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();function k(a,j){if(a&1&&(i(0,"div",1)(1,"div",2)(2,"div",3)(3,"div",4)(4,"div",5)(5,"h5"),r(6,"General"),n()(),i(7,"div",6)(8,"div",7)(9,"div",8)(10,"div",9)(11,"label"),r(12,"Date"),n(),i(13,"div")(14,"span"),r(15),c(16,"date"),n()()()(),i(17,"div",8)(18,"div",9)(19,"label"),r(20,"Number"),n(),i(21,"div")(22,"span"),r(23),n()()()(),i(24,"div",8)(25,"div",9)(26,"label"),r(27,"Channel Name"),n(),i(28,"div")(29,"span"),r(30),n()()()(),i(31,"div",8)(32,"div",9)(33,"label"),r(34,"ShopID"),n(),i(35,"div")(36,"span"),r(37),n()()()(),i(38,"div",8)(39,"div",9)(40,"label"),r(41,"Channel ID"),n(),i(42,"div")(43,"span"),r(44),n()()()()()()()()(),i(45,"div",10)(46,"div",8)(47,"div",4)(48,"div",5)(49,"h5"),r(50,"Request"),n()(),i(51,"div",6)(52,"pre"),r(53),c(54,"json"),n()()()(),i(55,"div",8)(56,"div",11)(57,"div",5)(58,"h5"),r(59,"Stack Trace"),n()(),i(60,"div",6),D(61,"pre",12),n()(),i(62,"div",13)(63,"div",5)(64,"h5"),r(65,"Exception Message"),n()(),i(66,"div",6)(67,"pre"),r(68),c(69,"json"),n()()()()()()),a&2){let e=j;o(15),l(g(16,8,e["@timestamp"],"dd MMM yyyy HH:mm:ss")),o(8),l(e==null||e.error==null?null:e.error.number),o(7),l(e==null?null:e.channelName),o(7),l(e==null?null:e.shopId),o(7),l(e==null?null:e.message),o(9),l(u(54,11,e==null||e.error==null?null:e.error.request)),o(8),s("textContent",e==null||e.error==null?null:e.error.stackTrace),o(7),l(u(69,13,e==null||e.error==null?null:e.error.response))}}var W=(()=>{class a{constructor(){this.activatedRoute=p(T),this.exceptionService=p(O),this.authService=p(M),this.channelOptions=x(this.authService.getChannels()),this.exceptionDetail=N(this.exceptionService.getExceptionDetail(this.activatedRoute.snapshot.queryParams?.ID).pipe(m(e=>{let t=e;return{"@timestamp":t["@timestamp"]||t["@timestamp_received"],error:{number:t?.error?.number,stackTrace:t?.error?.stackTrace,request:this.parseJsonSafe(t?.error?.request),response:this.parseJsonSafe(t?.error?.response)},channelName:t?.channelId!=null?this.channelOptions().find(d=>d.ID===t?.channelId)?.Name:t?.shopId,shopId:t?.shopId,message:t?.message}})),{initialValue:null}),this.headerTitle=I(()=>{let e=this.exceptionDetail();return e?.error?.number?"Order #"+e.error.number:"Order"})}parseJsonSafe(e){if(typeof e=="string")try{return JSON.parse(e)}catch{return e}return e}static{this.\u0275fac=function(t){return new(t||a)}}static{this.\u0275cmp=S({type:a,selectors:[["app-exception-detail"]],decls:3,vars:4,consts:[[3,"headerTitle","hideSearchBox","hideSearchDropdown"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],[1,"card"],[1,"card-header"],[1,"card-body"],[1,"row","mt-7"],[1,"col-sm-6"],[1,"info-label-group"],[1,"row","mt-2"],[1,"card","mb-2"],[3,"textContent"],[1,"card","mt-7"]],template:function(t,d){if(t&1&&(i(0,"mainpanel",0)(1,"content"),f(2,k,70,15,"div",1),n()()),t&2){let v;s("headerTitle",d.headerTitle())("hideSearchBox",!0)("hideSearchDropdown",!0),o(2),E((v=d.exceptionDetail())?2:-1,v)}},dependencies:[w,y,b],encapsulation:2,changeDetection:0})}}return a})();export{W as ExceptionDetailComponent};
@@ -1 +1 @@
1
- import{a as y}from"./chunk-TFDDAGWF.js";import{a as g}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-ZE4OOGMT.js";import{c as h,e as w}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as m,Aa as d,Ic as f,Kc as v,Xc as b,ac as s,bc as c,cc as l,dc as t,ec as n,fc as i,gb as r,yb as u}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var M=e=>[e];function S(e,C){if(e&1&&(t(0,"a",8),f(1),n()),e&2){let o=C.$implicit;l("routerLink",b(2,M,o.url)),r(),v(" ",o.title," ")}}var D=(()=>{class e{constructor(){this.tabs=d([{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}]),this.moreMenu=d([{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}])}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=u({type:e,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,p){a&1&&(t(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),n()(),t(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),n(),t(8,"div",6)(9,"div",7),s(10,S,2,4,"a",8,m),n()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",p.tabs()),r(7),c(p.moreMenu()))},dependencies:[g,w,h],encapsulation:2,changeDetection:0})}}return e})();var N=[{path:"",component:D,children:[{path:"by-url",loadComponent(){return import("./chunk-546FKO4L.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[y]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{N as routes};
1
+ import{a as y}from"./chunk-OQVRPQNT.js";import{a as g}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import"./chunk-ZE4OOGMT.js";import{c as h,e as w}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as m,Aa as d,Ic as f,Kc as v,Xc as b,ac as s,bc as c,cc as l,dc as t,ec as n,fc as i,gb as r,yb as u}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var M=e=>[e];function S(e,C){if(e&1&&(t(0,"a",8),f(1),n()),e&2){let o=C.$implicit;l("routerLink",b(2,M,o.url)),r(),v(" ",o.title," ")}}var D=(()=>{class e{constructor(){this.tabs=d([{Title:"Download By Url",Url:"/menu/products/download/by-url",Description:"Download products information by product URL as a parameter"}]),this.moreMenu=d([{title:"Sold In Channel",url:"/menu/products/status/sold-in-channel"},{title:"In POS",url:"/menu/products/status/in-pos"},{title:"Not In Channel",url:"/menu/products/status/not-in-channel"},{title:"Duplicate SKU",url:"/menu/products/status/duplicate-sku"}])}static{this.\u0275fac=function(a){return new(a||e)}}static{this.\u0275cmp=u({type:e,selectors:[["app-download"]],decls:13,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid","d-flex","align-items-center","justify-content-between"],[3,"Tabs"],[1,"dropdown","me-6"],["role","button","data-bs-toggle","dropdown","aria-expanded","false",1,"text-dark"],[1,"fa-solid","fa-bars","fa-lg"],[1,"dropdown-menu","dropdown-menu-end","row"],[1,"d-block"],[1,"dropdown-item",3,"routerLink"]],template:function(a,p){a&1&&(t(0,"nav",0)(1,"div",1)(2,"div"),i(3,"nav-tab",2),n()(),t(4,"div")(5,"div",3)(6,"a",4),i(7,"i",5),n(),t(8,"div",6)(9,"div",7),s(10,S,2,4,"a",8,m),n()()()()(),i(12,"router-outlet")),a&2&&(r(3),l("Tabs",p.tabs()),r(7),c(p.moreMenu()))},dependencies:[g,w,h],encapsulation:2,changeDetection:0})}}return e})();var N=[{path:"",component:D,children:[{path:"by-url",loadComponent(){return import("./chunk-BURCBMNA.js").then(e=>e.ByUrlComponent)},data:{title:"Download Product By Url"},canActivate:[y]},{pathMatch:"full",path:"",redirectTo:"by-url"}]}];export{N as routes};
@@ -1 +1 @@
1
- import{a as j}from"./chunk-ZSG2EXIR.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as O}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import{a as K}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as B}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as T,h as L,m as N,p as R,z as U}from"./chunk-7HUEGPJN.js";import{e as I}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as E}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as h,Ic as l,Jc as P,Pc as k,Qc as D,Rc as S,Xb as _,Zb as f,cc as s,dc as i,ec as t,ed as V,fc as w,fd as A,gb as a,ha as x,mc as v,oa as c,pa as p,rc as m,tc as g,ua as M,yb as b}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function F(n,y){if(n&1){let e=v();i(0,"input",30),m("ngModelChange",function(o){c(e);let r=g();return p(r.sku.set(o))}),t()}if(n&2){let e=g();s("ngModel",e.sku())}}function H(n,y){if(n&1){let e=v();i(0,"input",31),m("ngModelChange",function(o){c(e);let r=g();return p(r.itemId.set(o))}),t()}if(n&2){let e=g();s("ngModel",e.itemId())}}function J(n,y){if(n&1&&(i(0,"pre",28),l(1),V(2,"json"),t()),n&2){g();let e=S(35);a(),P(A(2,1,e))}}function G(n,y){n&1&&(i(0,"p",29),l(1," Your data will be shown here once it's available "),t())}var re=(()=>{class n{constructor(){this.httpService=x(I),this.destroyRef=x(M),this.productLogData=h(null),this.selectedChannel=h(null),this.sku=h(null),this.itemId=h(null),this.searchBy=h("sku")}initProductLog(){let e={ChannelID:this.selectedChannel()};this.searchBy()==="sku"?e.SKU=this.sku():e.ItemID=this.itemId(),this.httpService.post(B.GetProductApiLog,e).pipe(K(this.destroyRef)).subscribe(d=>this.productLogData.set(d))}copyToClipboard(e){if(!e)return;let d=typeof e=="string"?e:JSON.stringify(e,null,2);navigator.clipboard.writeText(d),alert("Copied to clipboard!")}static{this.\u0275fac=function(d){return new(d||n)}}static{this.\u0275cmp=b({type:n,selectors:[["app-product-api"]],decls:49,vars:12,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","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"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","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(d,o){if(d&1){let r=v();i(0,"mainpanel",0)(1,"actions")(2,"button",1),m("click",function(){return c(r),p(o.initProductLog())}),w(3,"i",2),l(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),l(12,"Channel"),t(),i(13,"p",8),l(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),m("ngModelChange",function(u){return c(r),p(o.selectedChannel.set(u))}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),l(20,"Product Code / SKU"),t(),i(21,"p",8),l(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(27,"label",15),l(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(31,"label",17),l(32,"Search by ItemID"),t()()(),_(33,F,1,1,"input",18),_(34,H,1,1,"input",19),t()()()(),k(35),i(36,"div",20)(37,"div",21)(38,"div",22)(39,"div",23)(40,"h5"),l(41,"Response"),t(),i(42,"button",24),m("click",function(){c(r);let u=S(35);return p(o.copyToClipboard(u))}),l(43," Copy "),t()(),i(44,"div",25)(45,"div",26)(46,"div",27),_(47,J,3,3,"pre",28)(48,G,2,0,"p",29),t()()()()()()()()()}if(d&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),s("ngModel",o.selectedChannel()),a(10),s("ngModel",o.searchBy())("value","sku"),a(4),s("ngModel",o.searchBy())("value","itemid"),a(3),f(o.searchBy()==="sku"?33:-1),a(),f(o.searchBy()==="itemid"?34:-1),a();let r=D(o.productLogData());a(7),s("disabled",!r),a(5),f(r?47:48)}},dependencies:[U,T,R,L,N,O,j,E],encapsulation:2,changeDetection:0})}}return n})();export{re as ProductApiComponent};
1
+ import{a as j}from"./chunk-MD4EAOUZ.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as O}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import{a as K}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import{a as B}from"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as T,h as L,m as N,p as R,z as U}from"./chunk-7HUEGPJN.js";import{e as I}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{C as E}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as h,Ic as l,Jc as P,Pc as k,Qc as D,Rc as S,Xb as _,Zb as f,cc as s,dc as i,ec as t,ed as V,fc as w,fd as A,gb as a,ha as x,mc as v,oa as c,pa as p,rc as m,tc as g,ua as M,yb as b}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function F(n,y){if(n&1){let e=v();i(0,"input",30),m("ngModelChange",function(o){c(e);let r=g();return p(r.sku.set(o))}),t()}if(n&2){let e=g();s("ngModel",e.sku())}}function H(n,y){if(n&1){let e=v();i(0,"input",31),m("ngModelChange",function(o){c(e);let r=g();return p(r.itemId.set(o))}),t()}if(n&2){let e=g();s("ngModel",e.itemId())}}function J(n,y){if(n&1&&(i(0,"pre",28),l(1),V(2,"json"),t()),n&2){g();let e=S(35);a(),P(A(2,1,e))}}function G(n,y){n&1&&(i(0,"p",29),l(1," Your data will be shown here once it's available "),t())}var re=(()=>{class n{constructor(){this.httpService=x(I),this.destroyRef=x(M),this.productLogData=h(null),this.selectedChannel=h(null),this.sku=h(null),this.itemId=h(null),this.searchBy=h("sku")}initProductLog(){let e={ChannelID:this.selectedChannel()};this.searchBy()==="sku"?e.SKU=this.sku():e.ItemID=this.itemId(),this.httpService.post(B.GetProductApiLog,e).pipe(K(this.destroyRef)).subscribe(d=>this.productLogData.set(d))}copyToClipboard(e){if(!e)return;let d=typeof e=="string"?e:JSON.stringify(e,null,2);navigator.clipboard.writeText(d),alert("Copied to clipboard!")}static{this.\u0275fac=function(d){return new(d||n)}}static{this.\u0275cmp=b({type:n,selectors:[["app-product-api"]],decls:49,vars:12,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","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"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","productLogText"],[1,"text-center","my-12","text-muted"],["type","text","placeholder","Product Code / SKU",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"],["type","text","placeholder","ItemID is Product id from seller center",1,"form-control","rounded-1",2,"height","40px",3,"ngModelChange","ngModel"]],template:function(d,o){if(d&1){let r=v();i(0,"mainpanel",0)(1,"actions")(2,"button",1),m("click",function(){return c(r),p(o.initProductLog())}),w(3,"i",2),l(4," Search "),t()(),i(5,"content")(6,"div",3)(7,"div",4)(8,"div",5)(9,"div",6)(10,"div",7)(11,"h6"),l(12,"Channel"),t(),i(13,"p",8),l(14," View logs related to Product API Detail "),t()(),i(15,"div",9)(16,"app-channel-options-v2",10),m("ngModelChange",function(u){return c(r),p(o.selectedChannel.set(u))}),t()()(),i(17,"div",11)(18,"div",7)(19,"h6"),l(20,"Product Code / SKU"),t(),i(21,"p",8),l(22," Product SKU or Code from Channel Product "),t()(),i(23,"div",9)(24,"div",12)(25,"div",13)(26,"input",14),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(27,"label",15),l(28,"Search by SKU"),t()(),i(29,"div",13)(30,"input",16),m("ngModelChange",function(u){return c(r),p(o.searchBy.set(u))}),t(),i(31,"label",17),l(32,"Search by ItemID"),t()()(),_(33,F,1,1,"input",18),_(34,H,1,1,"input",19),t()()()(),k(35),i(36,"div",20)(37,"div",21)(38,"div",22)(39,"div",23)(40,"h5"),l(41,"Response"),t(),i(42,"button",24),m("click",function(){c(r);let u=S(35);return p(o.copyToClipboard(u))}),l(43," Copy "),t()(),i(44,"div",25)(45,"div",26)(46,"div",27),_(47,J,3,3,"pre",28)(48,G,2,0,"p",29),t()()()()()()()()()}if(d&2){s("hideSearchBox",!0)("hideSearchDropdown",!0),a(16),s("ngModel",o.selectedChannel()),a(10),s("ngModel",o.searchBy())("value","sku"),a(4),s("ngModel",o.searchBy())("value","itemid"),a(3),f(o.searchBy()==="sku"?33:-1),a(),f(o.searchBy()==="itemid"?34:-1),a();let r=D(o.productLogData());a(7),s("disabled",!r),a(5),f(r?47:48)}},dependencies:[U,T,R,L,N,O,j,E],encapsulation:2,changeDetection:0})}}return n})();export{re as ProductApiComponent};
@@ -1 +1 @@
1
- import{a as ae,b as de}from"./chunk-5WAEN7KH.js";import"./chunk-QK2JCSM3.js";import{e as ce}from"./chunk-6NML7F6L.js";import"./chunk-QNSVLW6H.js";import{a as ge}from"./chunk-STIM35MJ.js";import{a as se}from"./chunk-7KG3DC5J.js";import{a as Ce}from"./chunk-PGDBJOSL.js";import"./chunk-VYXSV6K4.js";import{a as k}from"./chunk-HV46UVNS.js";import"./chunk-REDMZUTI.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as _e}from"./chunk-EYHQ2ZKL.js";import{a as le}from"./chunk-7X3KALOK.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BKR7YPEW.js";import"./chunk-A4TBJ6UZ.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as re}from"./chunk-474G6BPL.js";import{b as oe}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{c as ne,h as ie}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{f as pe,g as ue,h as he,i as me}from"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as T}from"./chunk-ZSUWHVKX.js";import{f as K}from"./chunk-C5O6VJ2D.js";import"./chunk-TU34BDDQ.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import{b as Y,c as q}from"./chunk-MDHMVGYC.js";import{b as M,c as h}from"./chunk-NNVT5X6O.js";import{c as Q,h as X,m as ee,z as te}from"./chunk-7HUEGPJN.js";import{b as j,e as z}from"./chunk-ZE4OOGMT.js";import{d as Z}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as W,Aa as _,C as w,Dc as O,Eb as J,Ic as y,Kc as F,Mc as B,Nc as U,Oc as A,V as R,Xb as S,Xc as V,Zb as x,ac as H,bc as $,cc as C,dc as u,ec as d,fc as b,gb as r,ha as P,jc as I,kc as v,mc as f,oa as c,pa as s,rc as m,tc as a,yb as G}from"./chunk-5VYDZBNH.js";import{a as E,b as N}from"./chunk-QWWW7GFA.js";var L=o=>[o];function Pe(o,g){if(o&1){let e=f();u(0,"button",15),m("click",function(){c(e);let t=a(2);return s(t.onDetachMultipleProduct())}),b(1,"i",16),y(2),d()}if(o&2){let e,n=a(2);r(2),F("Detach (",(e=n.productService.selectedProduct(n.products()))==null?null:e.length,") ")}}function fe(o,g){if(o&1&&(I(0),S(1,Pe,3,1,"button",14),v()),o&2){let e=a();r(),x(e.productService.hasSelection(e.products())?1:-1)}}function Se(o,g){if(o&1){let e=f();u(0,"button",18),m("click",function(){c(e);let t=a(2);return s(t.onScanMultipleProduct())}),b(1,"i",19),y(2),d()}if(o&2){let e,n=a(2);r(2),F(" Scan (",(e=n.productService.selectedProduct(n.products()))==null?null:e.length,") ")}}function xe(o,g){if(o&1&&(I(0),S(1,Se,3,1,"button",17),v()),o&2){let e=a();r(),x(e.productService.hasSelection(e.products())&&e.multipeScanChannels().length>0?1:-1)}}function be(o,g){if(o&1){let e=f();u(0,"button",21),m("click",function(){c(e);let t=a(2);return s(t.onUploadMultipleProduct())}),b(1,"i",22),y(2),d()}if(o&2){let e,n=a(2);r(2),F(" Upload (",(e=n.productService.selectedProduct(n.products()))==null?null:e.length,") ")}}function we(o,g){if(o&1&&(I(0),S(1,be,3,1,"button",20),v()),o&2){let e=a();r(),x(e.productService.hasSelection(e.products())?1:-1)}}function ye(o,g){if(o&1){let e=f();u(0,"div",11)(1,"app-product-card",23),m("onUpload",function(){let t=c(e).$implicit,i=a();return s(i.onUploadToMultipleChannel(t))})("onScan",function(){let t=c(e).$implicit,i=a();return s(i.onScanSingleProduct(t))})("onDescEvent",function(){let t=c(e).$index,i=a();return s(i.onOpenDialogVariant(t))})("onCheckBoxChange",function(t){let i=c(e).$implicit;return s(i.selected=t)})("onDetach",function(){let t=c(e).$implicit,i=a();return s(i.onDetachProduct([t]))}),d()()}if(o&2){let e=g.$implicit,n=a();r(),C("productId",e.ID)("title",e==null?null:e.Name)("image",e==null?null:e.ThumbnailUrl)("description",(e==null||e.Variants==null?null:e.Variants.length)>1?(e==null||e.Variants==null?null:e.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(e))("code",n.getVariantCode(e==null?null:e.Variants))("showCheckBox",(e==null?null:e.Channel.length)<n.channelOptions().length)("scanButton",!0)("uploadButton",e==null?null:e.hasUpload)("imageForZoom",e==null?null:e.ImageUrl)("detachButton",(e==null||e.Channel==null?null:e.Channel.length)>0)}}function Me(o,g){o&1&&(u(0,"div",12),b(1,"app-empty-state"),d())}function De(o,g){if(o&1){let e=f();u(0,"div",13)(1,"div",24)(2,"app-custom-paginator",25),m("next",function(){c(e);let t=a();return s(t.getProducts())})("previous",function(){c(e);let t=a();return s(t.getProducts())}),d()()()}if(o&2){let e,n=a();r(2),C("filter",n.searchFilter())("totaldata",(e=n.products())==null?null:e.length)("paginationTotal",n.rowCount())("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var ot=(()=>{class o{constructor(){this.http=P(z),this.toastr=P(j),this.dialog=P(ne),this.productService=P(le),this.authService=P(K),this.uploadProductService=P(ce),this.route=P(Z),this.channelOptions=_([]),this.Categories=_([]),this.searchFilter=_(new se),this.products=_([]),this.rowCount=_(0),this.startDate=_(void 0),this.endDate=_(void 0),this.multipeScanChannels=_([]),this.scanProductRole=T.ProductScan,this.uploadProductRole=T.ProductUpload,this.detachProductRole=T.ProductDetach,this.getLoaderPage(),this.channelOptions.set(this.authService.getChannels()),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories.set(e.Options.Categories),this.searchFilter.update(n=>(n.PageNumber=e.Filter.PageNumber,n.RowCount=e.Filter.RowCount,n.ChannelID=null,n.Category=e.Filter.Category,n.PageSize=100,n)),this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels.set(this.productService.filterChannelByTypeId(this.channelOptions(),[M.Tokopedia,M.Tiktok]))}getProducts(){let e={PageNumber:this.searchFilter().PageNumber,RowCount:this.searchFilter().RowCount,text:this.searchFilter().text,Category:this.searchFilter().Category,From:this.startDate(),To:this.endDate()};this.http.post("/api/product/GetInPOS",e).subscribe(n=>{this.products.set(n.Data),this.rowCount.set(n.Total==null?this.searchFilter().RowCount:n.Total.toString()),this.products.set(this.productService.checkProductHasUploadBtn(this.products(),this.channelOptions()))})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter()));e.ChannelID=h.GuidEMpty,this.dialog.open(k,{data:{filter:e,channelOptions:this.channelOptions()},width:"600px"}).afterClosed().pipe(w(t=>h.IsNotEmpty(t))).subscribe(t=>{this.searchFilter.update(i=>(i.ChannelID=t.ChannelID,i.ScanFull=t.ScanFull,i.UpdatedProduct=t.UpdatedProduct,i.Async=t.Async,i)),this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter().ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter().ChannelID,this.searchFilter().ScanFull,this.searchFilter().UpdatedProduct,this.searchFilter().Async).subscribe(e=>{if(this.searchFilter().Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter().ChannelID,this.channelOptions());this.productService.successToastrScanAllProduct(e,n,!this.searchFilter().UpdatedProduct)}})}onOpenDialogVariant(e){let n=this.products()[e];this.productService.getSoldInChannelDetail(n.ID,this.searchFilter().ListChannelID).pipe(R(t=>this.dialog.open(ae,{data:{variants:t,title:n.Name}}).afterClosed())).subscribe()}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products());this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.update(n=>(n.text=e,n)),this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter()));e.ChannelID=h.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions(),[M.Tokopedia,M.Tiktok]);this.dialog.open(k,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(w(i=>h.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.update(D=>(D.ChannelID=i.ChannelID,D.ScanFull=i.ScanFull,D.UpdatedProduct=i.UpdatedProduct,D));let p=this.productService.selectedProduct(this.products()),l=this.productService.getVariantCodesProducts(p);this.scanSingleProduct(l)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter()));n.ChannelID=h.GuidEMpty,this.dialog.open(k,{data:{filter:n,channelOptions:this.channelOptions(),isSingleChannel:!0},width:"600px"}).afterClosed().pipe(w(t=>h.IsNotEmpty(t))).subscribe(t=>{this.searchFilter.update(p=>(p.ChannelID=t.ChannelID,p));let i=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(i)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter().ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let t=this.productService.findChannelById(this.searchFilter().ChannelID,this.channelOptions());this.toastr.error(`This product is not existed in ${t?.Name} `,"Error")}this.searchFilter.update(t=>(t.ChannelID=h.GuidEMpty,t)),n&&this.getProducts()},error:n=>{this.searchFilter.update(t=>(t.ChannelID=h.GuidEMpty,t))}})}getVariantCode(e=[]){let n;return e?.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(n=e[0].Code),n}onDetachProduct(e){let n=[];e.forEach(t=>{t.Channel=h.assignChannelLogo(t.Channel),n.push(...t.Channel)}),this.dialog.open(de,{width:"600px",data:[...n]}).afterClosed().pipe(w(t=>h.IsNotEmpty(t)),R(t=>{let i=t.map(p=>N(E({},p),{POSProductID:e[0]?.ID}));return this.productService.detachProduct(i)})).subscribe(t=>{this.toastr.success(t.Message,ie.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products());this.onDetachProduct(e)}updateFilter(e,n){this.searchFilter.update(t=>N(E({},t),{[e]:n}))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=G({type:o,selectors:[["app-in-pos"]],decls:23,vars:18,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,t){if(n&1){let i=f();u(0,"mainpanel",1),m("onSubmit",function(l){return c(i),s(t.searchProduct(l))}),u(1,"actions"),J(2,fe,2,1,"ng-container",2)(3,xe,2,1,"ng-container",2)(4,we,2,1,"ng-container",2),d(),u(5,"filters")(6,"div")(7,"label",3),y(8,"Category"),d(),u(9,"ng-select",4),m("ngModelChange",function(l){return c(i),s(t.updateFilter("Category",l))}),d()(),u(10,"div",5)(11,"mat-date-range-input",6)(12,"input",7),A("ngModelChange",function(l){return c(i),U(t.startDate,l)||(t.startDate=l),s(l)}),m("click",function(){c(i);let l=O(15);return s(l.open())}),d(),u(13,"input",8),A("ngModelChange",function(l){return c(i),U(t.endDate,l)||(t.endDate=l),s(l)}),m("click",function(){c(i);let l=O(15);return s(l.open())}),d()(),b(14,"mat-date-range-picker",null,0),d()(),u(16,"content")(17,"div",9)(18,"div",10),H(19,ye,2,11,"div",11,W),S(21,Me,2,0,"div",12),d(),S(22,De,3,5,"div",13),d()()()}if(n&2){let i,p=O(15);C("headerTitle","In POS ("+t.rowCount()+")"),r(2),C("ngxPermissionsOnly",V(12,L,t.detachProductRole)),r(),C("ngxPermissionsOnly",V(14,L,t.scanProductRole)),r(),C("ngxPermissionsOnly",V(16,L,t.scanProductRole)),r(5),C("clearable",!0)("items",t.Categories())("ngModel",t.searchFilter().Category),r(2),C("rangePicker",p),r(),B("ngModel",t.startDate),r(),B("ngModel",t.endDate),r(6),$(t.products()),r(2),x(t.products().length==0?21:-1),r(),x(((i=t.products())==null?null:i.length)>0?22:-1)}},dependencies:[oe,te,Q,X,ee,q,Y,re,pe,ue,he,me,ge,_e,Ce],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media(min-width:1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"],changeDetection:0})}}return o})();export{ot as InPosComponent};
1
+ import{a as ae,b as de}from"./chunk-5WAEN7KH.js";import"./chunk-QK2JCSM3.js";import{e as ce}from"./chunk-CVLH5ITF.js";import"./chunk-QNSVLW6H.js";import{a as ge}from"./chunk-STIM35MJ.js";import{a as se}from"./chunk-7KG3DC5J.js";import{a as Ce}from"./chunk-PGDBJOSL.js";import"./chunk-VYXSV6K4.js";import{a as k}from"./chunk-HV46UVNS.js";import"./chunk-REDMZUTI.js";import"./chunk-F4NRX6ZE.js";import"./chunk-ON5KFKHE.js";import"./chunk-62QUGB6I.js";import{a as _e}from"./chunk-EYHQ2ZKL.js";import{a as le}from"./chunk-4B3WJSEV.js";import"./chunk-VGVK74K7.js";import"./chunk-EPY6UT4Z.js";import"./chunk-2KBEFXEF.js";import"./chunk-O476ULLD.js";import"./chunk-HBAHB3P5.js";import"./chunk-5BO5IGZG.js";import"./chunk-CP5ER4QN.js";import"./chunk-TZFPNLRF.js";import"./chunk-BKR7YPEW.js";import"./chunk-NVFDCME2.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{d as re}from"./chunk-474G6BPL.js";import{b as oe}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{c as ne,h as ie}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{f as pe,g as ue,h as he,i as me}from"./chunk-3RA4CRAW.js";import"./chunk-W55ZHKHY.js";import"./chunk-P6EVJYEB.js";import"./chunk-DXXROE3I.js";import"./chunk-3X54ZT7P.js";import"./chunk-GDOAWQKS.js";import"./chunk-TIHANIPI.js";import"./chunk-PF3J5XPT.js";import"./chunk-IRNBEBQA.js";import"./chunk-P2HR36CY.js";import"./chunk-NCZ46DU6.js";import"./chunk-OUE6X2ER.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as T}from"./chunk-ZSUWHVKX.js";import{f as K}from"./chunk-SBU2S3NF.js";import"./chunk-SIRLG5JS.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import{b as Y,c as q}from"./chunk-MDHMVGYC.js";import{b as M,c as h}from"./chunk-NNVT5X6O.js";import{c as Q,h as X,m as ee,z as te}from"./chunk-7HUEGPJN.js";import{b as j,e as z}from"./chunk-ZE4OOGMT.js";import{d as Z}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as W,Aa as _,C as w,Dc as O,Eb as J,Ic as y,Kc as F,Mc as B,Nc as U,Oc as A,V as R,Xb as S,Xc as V,Zb as x,ac as H,bc as $,cc as C,dc as u,ec as d,fc as b,gb as r,ha as P,jc as I,kc as v,mc as f,oa as c,pa as s,rc as m,tc as a,yb as G}from"./chunk-5VYDZBNH.js";import{a as E,b as N}from"./chunk-QWWW7GFA.js";var L=o=>[o];function Pe(o,g){if(o&1){let e=f();u(0,"button",15),m("click",function(){c(e);let t=a(2);return s(t.onDetachMultipleProduct())}),b(1,"i",16),y(2),d()}if(o&2){let e,n=a(2);r(2),F("Detach (",(e=n.productService.selectedProduct(n.products()))==null?null:e.length,") ")}}function fe(o,g){if(o&1&&(I(0),S(1,Pe,3,1,"button",14),v()),o&2){let e=a();r(),x(e.productService.hasSelection(e.products())?1:-1)}}function Se(o,g){if(o&1){let e=f();u(0,"button",18),m("click",function(){c(e);let t=a(2);return s(t.onScanMultipleProduct())}),b(1,"i",19),y(2),d()}if(o&2){let e,n=a(2);r(2),F(" Scan (",(e=n.productService.selectedProduct(n.products()))==null?null:e.length,") ")}}function xe(o,g){if(o&1&&(I(0),S(1,Se,3,1,"button",17),v()),o&2){let e=a();r(),x(e.productService.hasSelection(e.products())&&e.multipeScanChannels().length>0?1:-1)}}function be(o,g){if(o&1){let e=f();u(0,"button",21),m("click",function(){c(e);let t=a(2);return s(t.onUploadMultipleProduct())}),b(1,"i",22),y(2),d()}if(o&2){let e,n=a(2);r(2),F(" Upload (",(e=n.productService.selectedProduct(n.products()))==null?null:e.length,") ")}}function we(o,g){if(o&1&&(I(0),S(1,be,3,1,"button",20),v()),o&2){let e=a();r(),x(e.productService.hasSelection(e.products())?1:-1)}}function ye(o,g){if(o&1){let e=f();u(0,"div",11)(1,"app-product-card",23),m("onUpload",function(){let t=c(e).$implicit,i=a();return s(i.onUploadToMultipleChannel(t))})("onScan",function(){let t=c(e).$implicit,i=a();return s(i.onScanSingleProduct(t))})("onDescEvent",function(){let t=c(e).$index,i=a();return s(i.onOpenDialogVariant(t))})("onCheckBoxChange",function(t){let i=c(e).$implicit;return s(i.selected=t)})("onDetach",function(){let t=c(e).$implicit,i=a();return s(i.onDetachProduct([t]))}),d()()}if(o&2){let e=g.$implicit,n=a();r(),C("productId",e.ID)("title",e==null?null:e.Name)("image",e==null?null:e.ThumbnailUrl)("description",(e==null||e.Variants==null?null:e.Variants.length)>1?(e==null||e.Variants==null?null:e.Variants.length)+" Variants":null)("channels",n.productService.getChannelProduct(e))("code",n.getVariantCode(e==null?null:e.Variants))("showCheckBox",(e==null?null:e.Channel.length)<n.channelOptions().length)("scanButton",!0)("uploadButton",e==null?null:e.hasUpload)("imageForZoom",e==null?null:e.ImageUrl)("detachButton",(e==null||e.Channel==null?null:e.Channel.length)>0)}}function Me(o,g){o&1&&(u(0,"div",12),b(1,"app-empty-state"),d())}function De(o,g){if(o&1){let e=f();u(0,"div",13)(1,"div",24)(2,"app-custom-paginator",25),m("next",function(){c(e);let t=a();return s(t.getProducts())})("previous",function(){c(e);let t=a();return s(t.getProducts())}),d()()()}if(o&2){let e,n=a();r(2),C("filter",n.searchFilter())("totaldata",(e=n.products())==null?null:e.length)("paginationTotal",n.rowCount())("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}var ot=(()=>{class o{constructor(){this.http=P(z),this.toastr=P(j),this.dialog=P(ne),this.productService=P(le),this.authService=P(K),this.uploadProductService=P(ce),this.route=P(Z),this.channelOptions=_([]),this.Categories=_([]),this.searchFilter=_(new se),this.products=_([]),this.rowCount=_(0),this.startDate=_(void 0),this.endDate=_(void 0),this.multipeScanChannels=_([]),this.scanProductRole=T.ProductScan,this.uploadProductRole=T.ProductUpload,this.detachProductRole=T.ProductDetach,this.getLoaderPage(),this.channelOptions.set(this.authService.getChannels()),this.initMultiScanChannels()}getLoaderPage(){this.productService.LoadInPOS().subscribe(e=>{this.Categories.set(e.Options.Categories),this.searchFilter.update(n=>(n.PageNumber=e.Filter.PageNumber,n.RowCount=e.Filter.RowCount,n.ChannelID=null,n.Category=e.Filter.Category,n.PageSize=100,n)),this.getProducts()})}initMultiScanChannels(){this.multipeScanChannels.set(this.productService.filterChannelByTypeId(this.channelOptions(),[M.Tokopedia,M.Tiktok]))}getProducts(){let e={PageNumber:this.searchFilter().PageNumber,RowCount:this.searchFilter().RowCount,text:this.searchFilter().text,Category:this.searchFilter().Category,From:this.startDate(),To:this.endDate()};this.http.post("/api/product/GetInPOS",e).subscribe(n=>{this.products.set(n.Data),this.rowCount.set(n.Total==null?this.searchFilter().RowCount:n.Total.toString()),this.products.set(this.productService.checkProductHasUploadBtn(this.products(),this.channelOptions()))})}onOpenScanDialog(){let e=JSON.parse(JSON.stringify(this.searchFilter()));e.ChannelID=h.GuidEMpty,this.dialog.open(k,{data:{filter:e,channelOptions:this.channelOptions()},width:"600px"}).afterClosed().pipe(w(t=>h.IsNotEmpty(t))).subscribe(t=>{this.searchFilter.update(i=>(i.ChannelID=t.ChannelID,i.ScanFull=t.ScanFull,i.UpdatedProduct=t.UpdatedProduct,i.Async=t.Async,i)),this.scanAllProduct()})}scanAllProduct(){if(this.searchFilter().ChannelID==null){this.toastr.error("Please Select Channel","Error");return}this.productService.scanAll(this.searchFilter().ChannelID,this.searchFilter().ScanFull,this.searchFilter().UpdatedProduct,this.searchFilter().Async).subscribe(e=>{if(this.searchFilter().Async)this.toastr.warning("You will be notified when the scan is completed.","Scan In Progress",{toastClass:"ngx-toastr toast-waiting"});else{this.getLoaderPage();let n=this.productService.findChannelById(this.searchFilter().ChannelID,this.channelOptions());this.productService.successToastrScanAllProduct(e,n,!this.searchFilter().UpdatedProduct)}})}onOpenDialogVariant(e){let n=this.products()[e];this.productService.getSoldInChannelDetail(n.ID,this.searchFilter().ListChannelID).pipe(R(t=>this.dialog.open(ae,{data:{variants:t,title:n.Name}}).afterClosed())).subscribe()}onUploadMultipleProduct(){let e=this.productService.selectedProduct(this.products());this.uploadProductService.setSelectedProduct(e),this.route.navigate(["/menu/products/upload"])}onUploadToMultipleChannel(e){this.uploadProductService.setSelectedProduct([e]),this.route.navigate(["/menu/products/upload"])}searchProduct(e){this.searchFilter.update(n=>(n.text=e,n)),this.getProducts()}onScanMultipleProduct(){let e=JSON.parse(JSON.stringify(this.searchFilter()));e.ChannelID=h.GuidEMpty;let n=this.productService.filterChannelByTypeId(this.channelOptions(),[M.Tokopedia,M.Tiktok]);this.dialog.open(k,{data:{filter:e,channelOptions:n,isSingleChannel:!0},width:"600px"}).afterClosed().pipe(w(i=>h.IsNotEmpty(i))).subscribe(i=>{this.searchFilter.update(D=>(D.ChannelID=i.ChannelID,D.ScanFull=i.ScanFull,D.UpdatedProduct=i.UpdatedProduct,D));let p=this.productService.selectedProduct(this.products()),l=this.productService.getVariantCodesProducts(p);this.scanSingleProduct(l)})}onScanSingleProduct(e){let n=JSON.parse(JSON.stringify(this.searchFilter()));n.ChannelID=h.GuidEMpty,this.dialog.open(k,{data:{filter:n,channelOptions:this.channelOptions(),isSingleChannel:!0},width:"600px"}).afterClosed().pipe(w(t=>h.IsNotEmpty(t))).subscribe(t=>{this.searchFilter.update(p=>(p.ChannelID=t.ChannelID,p));let i=this.productService.getVariantCodesProduct(e);this.scanSingleProduct(i)})}scanSingleProduct(e){this.productService.scanSingle(this.searchFilter().ChannelID,e).subscribe({next:n=>{if(n)this.toastr.success("Successfully Scan ","Success");else{let t=this.productService.findChannelById(this.searchFilter().ChannelID,this.channelOptions());this.toastr.error(`This product is not existed in ${t?.Name} `,"Error")}this.searchFilter.update(t=>(t.ChannelID=h.GuidEMpty,t)),n&&this.getProducts()},error:n=>{this.searchFilter.update(t=>(t.ChannelID=h.GuidEMpty,t))}})}getVariantCode(e=[]){let n;return e?.length>1&&(n=(e[0].model?e[0].model:"")+e[0].Code),e?.length==1&&(n=e[0].Code),n}onDetachProduct(e){let n=[];e.forEach(t=>{t.Channel=h.assignChannelLogo(t.Channel),n.push(...t.Channel)}),this.dialog.open(de,{width:"600px",data:[...n]}).afterClosed().pipe(w(t=>h.IsNotEmpty(t)),R(t=>{let i=t.map(p=>N(E({},p),{POSProductID:e[0]?.ID}));return this.productService.detachProduct(i)})).subscribe(t=>{this.toastr.success(t.Message,ie.Success),this.getProducts()})}onDetachMultipleProduct(){let e=this.productService.selectedProduct(this.products());this.onDetachProduct(e)}updateFilter(e,n){this.searchFilter.update(t=>N(E({},t),{[e]:n}))}static{this.\u0275fac=function(n){return new(n||o)}}static{this.\u0275cmp=G({type:o,selectors:[["app-in-pos"]],decls:23,vars:18,consts:[["picker",""],["description","All products which is already available in POS",3,"onSubmit","headerTitle"],[4,"ngxPermissionsOnly"],[1,"fw-bold","mb-2"],["appendTo","body","bindLabel","Name","name","Name","bindValue","Name","placeholder","Select Category",1,"center-text",3,"ngModelChange","clearable","items","ngModel"],[1,"mt-5"],["id","dates",1,"form-control","rounded","dateRange",3,"rangePicker"],["matStartDate","","placeholder","Start date",3,"ngModelChange","click","ngModel"],["matEndDate","","placeholder","End date",3,"ngModelChange","click","ngModel"],[1,"container-fluid"],[1,"row","mt-8"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"row","mt-2","justify-content-end"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fa-sharp","fa-link-slash","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2"],["type","button","data-cy","scanInPos",1,"btn","btn-outline-secondary","shadow","rounded","me-2",3,"click"],[1,"fas","fa-lg","fa-crosshairs"],[1,"btn","btn-light","shadow","rounded","ms-2"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click"],["aria-hidden","true",1,"fa","fa-upload"],[3,"onUpload","onScan","onDescEvent","onCheckBoxChange","onDetach","productId","title","image","description","channels","code","showCheckBox","scanButton","uploadButton","imageForZoom","detachButton"],[1,"col-md-12"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"]],template:function(n,t){if(n&1){let i=f();u(0,"mainpanel",1),m("onSubmit",function(l){return c(i),s(t.searchProduct(l))}),u(1,"actions"),J(2,fe,2,1,"ng-container",2)(3,xe,2,1,"ng-container",2)(4,we,2,1,"ng-container",2),d(),u(5,"filters")(6,"div")(7,"label",3),y(8,"Category"),d(),u(9,"ng-select",4),m("ngModelChange",function(l){return c(i),s(t.updateFilter("Category",l))}),d()(),u(10,"div",5)(11,"mat-date-range-input",6)(12,"input",7),A("ngModelChange",function(l){return c(i),U(t.startDate,l)||(t.startDate=l),s(l)}),m("click",function(){c(i);let l=O(15);return s(l.open())}),d(),u(13,"input",8),A("ngModelChange",function(l){return c(i),U(t.endDate,l)||(t.endDate=l),s(l)}),m("click",function(){c(i);let l=O(15);return s(l.open())}),d()(),b(14,"mat-date-range-picker",null,0),d()(),u(16,"content")(17,"div",9)(18,"div",10),H(19,ye,2,11,"div",11,W),S(21,Me,2,0,"div",12),d(),S(22,De,3,5,"div",13),d()()()}if(n&2){let i,p=O(15);C("headerTitle","In POS ("+t.rowCount()+")"),r(2),C("ngxPermissionsOnly",V(12,L,t.detachProductRole)),r(),C("ngxPermissionsOnly",V(14,L,t.scanProductRole)),r(),C("ngxPermissionsOnly",V(16,L,t.scanProductRole)),r(5),C("clearable",!0)("items",t.Categories())("ngModel",t.searchFilter().Category),r(2),C("rangePicker",p),r(),B("ngModel",t.startDate),r(),B("ngModel",t.endDate),r(6),$(t.products()),r(2),x(t.products().length==0?21:-1),r(),x(((i=t.products())==null?null:i.length)>0?22:-1)}},dependencies:[oe,te,Q,X,ee,q,Y,re,pe,ue,he,me,ge,_e,Ce],styles:[".badge-pill[_ngcontent-%COMP%]{padding-bottom:16px!important}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]:checked + label[_ngcontent-%COMP%]{background:#dfeffc;border:1px solid #dfeffc}.rad-btn[_ngcontent-%COMP%] input[type=radio][_ngcontent-%COMP%]{visibility:hidden;position:absolute;left:0;top:0}.rad-btn[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{border:1px solid #ddd;border-radius:3px;margin-right:10px;cursor:pointer;padding:10px;margin-bottom:10px;color:#000;width:80px;text-align:center}.modal-dialog[_ngcontent-%COMP%]{max-width:30%!important}.product[_ngcontent-%COMP%]{height:100%!important}.row[_ngcontent-%COMP%]{margin-left:0;margin-right:0}ul[_ngcontent-%COMP%]{list-style-type:none}.link[_ngcontent-%COMP%]{color:#0202ab;cursor:pointer}.px-1[_ngcontent-%COMP%]{padding-left:5px!important}.sku[_ngcontent-%COMP%]{color:#696969;font-style:italic}.badge-pill[_ngcontent-%COMP%]{height:16px}.itemTitle[_ngcontent-%COMP%]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.no-title[_ngcontent-%COMP%]{margin-top:.33em;margin-bottom:.33rem}.mb-upload[_ngcontent-%COMP%]{padding-bottom:.625rem}.my-1rem[_ngcontent-%COMP%]{margin-bottom:1rem!important;margin-top:1rem!important}.pr-rem[_ngcontent-%COMP%]{padding-right:.6rem}.text-larger[_ngcontent-%COMP%]{font-size:larger}.bg-lightpink[_ngcontent-%COMP%]{background-color:#f9dede}.bottom-buttons[_ngcontent-%COMP%]{margin-left:97px}@media(min-width:1200px){.max-w-xl[_ngcontent-%COMP%]{max-width:205px}}.navbar-toggler[_ngcontent-%COMP%]:focus{box-shadow:none!important}.img-logo[_ngcontent-%COMP%]{height:24px;width:24px}.dateRange[_ngcontent-%COMP%]{padding-top:.8rem;padding-bottom:.8rem}"],changeDetection:0})}}return o})();export{ot as InPosComponent};
@@ -1,4 +1,4 @@
1
- import{a as y,b as T}from"./chunk-A4TBJ6UZ.js";import{f as P}from"./chunk-C5O6VJ2D.js";import{a as i}from"./chunk-63X2BBS4.js";import{c as l}from"./chunk-NNVT5X6O.js";import{b as I,e as C}from"./chunk-ZE4OOGMT.js";import{F as h,Y as o,ca as g,ga as d,ha as f,m as c,r as m}from"./chunk-5VYDZBNH.js";var H=(()=>{class u{constructor(e,t,n){this.httpService=e,this.toastrService=t,this.notificationService=n,this.authService=f(P),this.scanChannelToastr=f(y)}loader(e=l.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=l.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,t){return e.filter(n=>t.findIndex(r=>n.TypeID==r)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){let t={ID:e};return this.httpService.post("/api/product/TotalProductLive",t)}getTotalProductV2(e,t){let n={ID:e,ProductType:t};return this.httpService.post(i.TotalProductV2,n)}clearCacheChannel(e){let t={ID:e};return this.httpService.post("/api/Channel/ClearCacheChannel",t)}detachProduct(e){return this.httpService.post("/api/product/Detach",e)}uploadSingleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(o(r=>{this.showToastrSuccessUploadSingle(r,e[0])}),h(r=>(this.showToastErrorUploadSingle(r,e[0]),c(()=>new Error(r)))))}uploadMultipleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r.Message)}),h(r=>(this.showToastrUploadMultiple(r.error?.Message),c(()=>new Error(r)))))}uploadNotInChannel(e,t){let n={Products:e,Channel:t};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r)}),h(r=>(this.showToastrUploadMultiple(r.error?.Message),c(()=>new Error(r)))))}scanSingle(e,t){let n={ID:e,SKU:t};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(e){let t={ID:e};return this.httpService.post("/api/product/ScanNotinChannel",t)}findAllSoldInChannel(e){return this.httpService.post(i.GetSoldInChannel,e)}getSoldInChannelDetail(e,t){let n={ID:e,ListChannelID:t};return this.httpService.post(`${i.GetSoldInChannelDetail}`,n).pipe(m(r=>r?.Variants))}scanAll(e,t,n,r=!1){let a={ID:e,ScanFull:t,UpdatedProduct:n,Async:r};return this.httpService.post("/api/product/ScanOptimized",a)}scanAsyncProductV2(e,t,n,r,a,s){let p={ID:e,ProductType:t,TimeRange:n,Async:!0,LastSyncUpdate:r,Update_time_from:a,Update_time_to:s};return this.httpService.post(i.ScanAsyncProductV2,p).pipe(o(S=>{this.notificationService.subscribeToJobGroup(S.JobID)}))}scanSyncProductV2(e,t,n,r,a){let s={ID:e,ProductType:t,TimeRange:n,Async:!1,Update_time_from:r,Update_time_to:a};return this.httpService.post(i.ScanSyncProductV2,s)}scanProductV2(e){let t=this.authService.getChannels(),n=this.findChannelById(e.ID,t);return e.Async?this.scanAsyncProductV2(e.ID,e.ProductType,e.TimeRange,e.LastSyncUpdate,e.Update_time_from,e.Update_time_to).pipe(o(r=>{this.scanChannelToastr.showToast({text:"Scan Job Started",detail:`JobID: ${r.JobID}`,severity:"info",data:{channelName:n.Name,channelTypeId:n.TypeID,jobId:r.JobID}})}),h(r=>(this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:this.extractScanErrorMessage(r),severity:"error",data:{channelName:n?.Name,channelTypeId:n?.TypeID,jobId:null}}),c(()=>r)))):this.scanSyncProductV2(e.ID,e.ProductType,e.TimeRange,e.Update_time_from,e.Update_time_to).pipe(m(r=>r?.Message),o(r=>{this.successToastrScanAllProduct(r,n,!e.TimeRange)}),h(r=>(this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:this.extractScanErrorMessage(r),severity:"error",data:{channelName:n?.Name,channelTypeId:n?.TypeID,jobId:null}}),c(()=>r))))}extractScanErrorMessage(e){let t=e?.error?.Message;return typeof t=="string"&&t!==""?t:typeof e?.error?.message=="string"&&e.error.message!==""?e.error.message:e?.status?`Failed with status ${e.status}`:"An unknown error has occured!"}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return(e.Variants||[]).map(r=>r.Code)}downloadMultipleProduct(e){let t=e.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",t).pipe(o(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){let t={ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",t).pipe(o(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let t=[];return e.forEach(n=>{n.Variants.forEach(r=>{t=[...t,r.Code]})}),t}filterUnselectedChannel(e,t){let n=[];e.forEach(a=>{n=[...n,...a.Channel]});let r;if(!n||n.length==0)r=t;else{let a=[];r=t.filter(s=>(a=n.filter(p=>p.ChannelID==s.ID),a.length!==e.length))}return r}findChannelById(e,t){return t.find(n=>n.ID==e)}sortChannel(e=[]){return e.sort((t,n)=>t.TypeID<n.TypeID?1:t.TypeID===n.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(t=>t.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let t=[];return e.forEach(n=>{t=[...t,...n.Variants!=null?n.Variants.filter(r=>r.selected):""]}),t}getChannelProduct(e){let t=e.Channels||[],n=[];for(let r of t)n.filter(a=>a.ChannelID==r.ChannelID).length==0&&n.push(r);return this.sortChannel(n)}successToastrScanAllProduct(e,t,n){let r=typeof e.InChannel=="number"?e.InChannel:e?.InChannel?.Product?e?.InChannel?.Product:0,a=typeof e?.NotInPOS=="number"?e?.NotInPOS:e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,s=l.IsNotEmpty(e.LastUpdate)?l.convertToReadableDate(e.LastUpdate):null;n?this.toastrService.success(`
1
+ import{a as y,b as T}from"./chunk-NVFDCME2.js";import{f as P}from"./chunk-SBU2S3NF.js";import{a as i}from"./chunk-63X2BBS4.js";import{c as l}from"./chunk-NNVT5X6O.js";import{b as I,e as C}from"./chunk-ZE4OOGMT.js";import{F as h,Y as o,ca as g,ga as d,ha as f,m as c,r as m}from"./chunk-5VYDZBNH.js";var H=(()=>{class u{constructor(e,t,n){this.httpService=e,this.toastrService=t,this.notificationService=n,this.authService=f(P),this.scanChannelToastr=f(y)}loader(e=l.GuidEMpty){return this.httpService.post("/api/product/Load",{ID:e})}LoadInPOS(e=l.GuidEMpty){return this.httpService.post("/api/product/LoadInPOS",{ID:e})}filterChannelByTypeId(e,t){return e.filter(n=>t.findIndex(r=>n.TypeID==r)!==-1)}getProductStatistic(){return this.httpService.post("/api/product/ProductStatistic",{})}getTotalProductLive(e){let t={ID:e};return this.httpService.post("/api/product/TotalProductLive",t)}getTotalProductV2(e,t){let n={ID:e,ProductType:t};return this.httpService.post(i.TotalProductV2,n)}clearCacheChannel(e){let t={ID:e};return this.httpService.post("/api/Channel/ClearCacheChannel",t)}detachProduct(e){return this.httpService.post("/api/product/Detach",e)}uploadSingleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleChannel",n).pipe(o(r=>{this.showToastrSuccessUploadSingle(r,e[0])}),h(r=>(this.showToastErrorUploadSingle(r,e[0]),c(()=>new Error(r)))))}uploadMultipleProduct(e,t){let n={Channel:t,Products:e};return this.httpService.post("api/product/UploadMultipleProductAndMultipleChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r.Message)}),h(r=>(this.showToastrUploadMultiple(r.error?.Message),c(()=>new Error(r)))))}uploadNotInChannel(e,t){let n={Products:e,Channel:t};return this.httpService.post("/api/product/UploadProductNotInChannelToChannel",n).pipe(o(r=>{this.showToastrUploadMultiple(r)}),h(r=>(this.showToastrUploadMultiple(r.error?.Message),c(()=>new Error(r)))))}scanSingle(e,t){let n={ID:e,SKU:t};return this.httpService.post("/api/product/ScanSingle",n)}scanNotInChannel(e){let t={ID:e};return this.httpService.post("/api/product/ScanNotinChannel",t)}findAllSoldInChannel(e){return this.httpService.post(i.GetSoldInChannel,e)}getSoldInChannelDetail(e,t){let n={ID:e,ListChannelID:t};return this.httpService.post(`${i.GetSoldInChannelDetail}`,n).pipe(m(r=>r?.Variants))}scanAll(e,t,n,r=!1){let a={ID:e,ScanFull:t,UpdatedProduct:n,Async:r};return this.httpService.post("/api/product/ScanOptimized",a)}scanAsyncProductV2(e,t,n,r,a,s){let p={ID:e,ProductType:t,TimeRange:n,Async:!0,LastSyncUpdate:r,Update_time_from:a,Update_time_to:s};return this.httpService.post(i.ScanAsyncProductV2,p).pipe(o(S=>{this.notificationService.subscribeToJobGroup(S.JobID)}))}scanSyncProductV2(e,t,n,r,a){let s={ID:e,ProductType:t,TimeRange:n,Async:!1,Update_time_from:r,Update_time_to:a};return this.httpService.post(i.ScanSyncProductV2,s)}scanProductV2(e){let t=this.authService.getChannels(),n=this.findChannelById(e.ID,t);return e.Async?this.scanAsyncProductV2(e.ID,e.ProductType,e.TimeRange,e.LastSyncUpdate,e.Update_time_from,e.Update_time_to).pipe(o(r=>{this.scanChannelToastr.showToast({text:"Scan Job Started",detail:`JobID: ${r.JobID}`,severity:"info",data:{channelName:n.Name,channelTypeId:n.TypeID,jobId:r.JobID}})}),h(r=>(this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:this.extractScanErrorMessage(r),severity:"error",data:{channelName:n?.Name,channelTypeId:n?.TypeID,jobId:null}}),c(()=>r)))):this.scanSyncProductV2(e.ID,e.ProductType,e.TimeRange,e.Update_time_from,e.Update_time_to).pipe(m(r=>r?.Message),o(r=>{this.successToastrScanAllProduct(r,n,!e.TimeRange)}),h(r=>(this.scanChannelToastr.showToast({text:"Scan Job Failed",detail:this.extractScanErrorMessage(r),severity:"error",data:{channelName:n?.Name,channelTypeId:n?.TypeID,jobId:null}}),c(()=>r))))}extractScanErrorMessage(e){let t=e?.error?.Message;return typeof t=="string"&&t!==""?t:typeof e?.error?.message=="string"&&e.error.message!==""?e.error.message:e?.status?`Failed with status ${e.status}`:"An unknown error has occured!"}scanCompareToPos(e){return this.httpService.post("/api/product/CompareMarketplaceToPOS",e)}getVariantCodesProduct(e){return(e.Variants||[]).map(r=>r.Code)}downloadMultipleProduct(e){let t=e.map(n=>({ChannelItemID:n.ChannelItemID,ChannelID:n.ChannelID}));return this.httpService.post("/api/product/DownloadMultipleProductFromChannel",t).pipe(o(n=>{this.toastrService.success(`${n.Count} products downloaded to POS`,"Download Complete")}))}downloadProduct(e){let t={ChannelItemID:e.ChannelItemID,ChannelID:e.ChannelID};return this.httpService.post("/api/product/DownloadProductFromChannel",t).pipe(o(()=>{this.toastrService.success("Product successfully downloaded to POS","Download Complete")}))}getVariantCodesProducts(e=[]){let t=[];return e.forEach(n=>{n.Variants.forEach(r=>{t=[...t,r.Code]})}),t}filterUnselectedChannel(e,t){let n=[];e.forEach(a=>{n=[...n,...a.Channel]});let r;if(!n||n.length==0)r=t;else{let a=[];r=t.filter(s=>(a=n.filter(p=>p.ChannelID==s.ID),a.length!==e.length))}return r}findChannelById(e,t){return t.find(n=>n.ID==e)}sortChannel(e=[]){return e.sort((t,n)=>t.TypeID<n.TypeID?1:t.TypeID===n.TypeID?0:-1)}hasSelection(e=[]){return this.selectedProduct(e).length>0}selectedProduct(e=[]){return e.filter(t=>t.selected)}hasSelectionVariant(e){return this.selectedVariantProduct(e).length>0}selectedVariantProduct(e){let t=[];return e.forEach(n=>{t=[...t,...n.Variants!=null?n.Variants.filter(r=>r.selected):""]}),t}getChannelProduct(e){let t=e.Channels||[],n=[];for(let r of t)n.filter(a=>a.ChannelID==r.ChannelID).length==0&&n.push(r);return this.sortChannel(n)}successToastrScanAllProduct(e,t,n){let r=typeof e.InChannel=="number"?e.InChannel:e?.InChannel?.Product?e?.InChannel?.Product:0,a=typeof e?.NotInPOS=="number"?e?.NotInPOS:e?.NotInPOS?.Product?e?.NotInPOS?.Product:0,s=l.IsNotEmpty(e.LastUpdate)?l.convertToReadableDate(e.LastUpdate):null;n?this.toastrService.success(`
2
2
  ${a+r} product updates in ${t?.Name} </br>
3
3
  (${r} In Channel + ${a} Not In Pos)
4
4
  ${l.IsNotEmpty(s)?"</br>since "+s:""}