marketplacepos 26.40.0 → 26.40.8

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 (117) hide show
  1. package/Marketplace/{chunk-S6BN4V23.js → chunk-2IOW2644.js} +1 -1
  2. package/Marketplace/{chunk-UBELHHG2.js → chunk-2RAY5TJR.js} +1 -1
  3. package/Marketplace/{chunk-W5LP7GFV.js → chunk-3BU5F73V.js} +1 -1
  4. package/Marketplace/{chunk-UAUK3CLI.js → chunk-4DEBQV7M.js} +1 -1
  5. package/Marketplace/{chunk-7CBMERS5.js → chunk-4FOIA62W.js} +1 -1
  6. package/Marketplace/{chunk-2KQBHN4O.js → chunk-4LUKCRLU.js} +1 -1
  7. package/Marketplace/{chunk-DUFVSIR4.js → chunk-4LZULDXE.js} +1 -1
  8. package/Marketplace/chunk-4XNPUIUH.js +1 -0
  9. package/Marketplace/{chunk-7NXX6L4D.js → chunk-5J5ZZDDO.js} +1 -1
  10. package/Marketplace/{chunk-57QKQ3CY.js → chunk-5JYJM2FU.js} +1 -1
  11. package/Marketplace/{chunk-RXW6RTKO.js → chunk-5NVINBUN.js} +1 -1
  12. package/Marketplace/{chunk-RLLQHRSD.js → chunk-5PXKFEXJ.js} +1 -1
  13. package/Marketplace/chunk-636FAHVP.js +2 -0
  14. package/Marketplace/{chunk-2AGW2EQE.js → chunk-6GRJEBZS.js} +1 -1
  15. package/Marketplace/{chunk-QUXL7TBO.js → chunk-6MTRE22X.js} +1 -1
  16. package/Marketplace/{chunk-LUNQSRTL.js → chunk-73GAA2GS.js} +1 -1
  17. package/Marketplace/{chunk-J5MAMRMJ.js → chunk-7ZFJU2UX.js} +1 -1
  18. package/Marketplace/{chunk-7FEQVXWJ.js → chunk-A6XZFX7P.js} +1 -1
  19. package/Marketplace/{chunk-L2SHCOKS.js → chunk-AF2EL3VP.js} +1 -1
  20. package/Marketplace/{chunk-O5V57LBS.js → chunk-AFLAEWB5.js} +1 -1
  21. package/Marketplace/{chunk-I5T32MVQ.js → chunk-APE7ONZY.js} +1 -1
  22. package/Marketplace/{chunk-4YPGBRLY.js → chunk-AW4UMRM6.js} +1 -1
  23. package/Marketplace/{chunk-X2N2RZJG.js → chunk-AY42YPZT.js} +1 -1
  24. package/Marketplace/{chunk-HNZRUWPT.js → chunk-BAU65KN4.js} +1 -1
  25. package/Marketplace/{chunk-WFPTTA3N.js → chunk-BEXPPIK7.js} +1 -1
  26. package/Marketplace/{chunk-WORPCIYJ.js → chunk-BHGCKC7N.js} +1 -1
  27. package/Marketplace/{chunk-JNBUWJ7G.js → chunk-BY4CLTOZ.js} +1 -1
  28. package/Marketplace/{chunk-J5N7QI4D.js → chunk-CSDB36F5.js} +1 -1
  29. package/Marketplace/{chunk-PUGGZZYP.js → chunk-CTXM5PKJ.js} +1 -1
  30. package/Marketplace/{chunk-GKME5L3N.js → chunk-CWMEJMW4.js} +1 -1
  31. package/Marketplace/{chunk-UW7UVM54.js → chunk-D7RVGS52.js} +1 -1
  32. package/Marketplace/{chunk-FBS5RFXD.js → chunk-DFX6RIJF.js} +1 -1
  33. package/Marketplace/{chunk-KQUROJDM.js → chunk-E3OPTOBL.js} +1 -1
  34. package/Marketplace/{chunk-BSAGM2NY.js → chunk-ELVTO3I5.js} +1 -1
  35. package/Marketplace/{chunk-GEPWSABG.js → chunk-ET5NFU5Z.js} +1 -1
  36. package/Marketplace/chunk-EU7QQ5DB.js +3 -0
  37. package/Marketplace/{chunk-NOCTTHPT.js → chunk-EUQV2MQN.js} +1 -1
  38. package/Marketplace/chunk-EZOJIVRV.js +1 -0
  39. package/Marketplace/{chunk-7RCGNFI3.js → chunk-F32CMMGC.js} +1 -1
  40. package/Marketplace/{chunk-GKUQSFIA.js → chunk-FBKY3A2B.js} +1 -1
  41. package/Marketplace/{chunk-YDFIJNDL.js → chunk-FKNJBXAN.js} +1 -1
  42. package/Marketplace/{chunk-XG7YN5V3.js → chunk-FUE42UF6.js} +1 -1
  43. package/Marketplace/{chunk-QT2VSFMD.js → chunk-HVN7EMNG.js} +1 -1
  44. package/Marketplace/{chunk-FTAI6WPW.js → chunk-I2MBDGML.js} +1 -1
  45. package/Marketplace/{chunk-STIM35MJ.js → chunk-I6GEE3L6.js} +1 -1
  46. package/Marketplace/{chunk-YJXHL4ZG.js → chunk-IEK26S7T.js} +1 -1
  47. package/Marketplace/{chunk-2JUQMSO2.js → chunk-IIOFKX5I.js} +1 -1
  48. package/Marketplace/{chunk-BR3HAKI7.js → chunk-IIZEKHQ3.js} +1 -1
  49. package/Marketplace/{chunk-KMR6VXUE.js → chunk-IYVLYZ7G.js} +1 -1
  50. package/Marketplace/{chunk-D7W7XOX5.js → chunk-K7DN5KFP.js} +1 -1
  51. package/Marketplace/{chunk-KEYLE4FX.js → chunk-K7JKPYCX.js} +1 -1
  52. package/Marketplace/{chunk-3UBPVGDR.js → chunk-KX4MJYTR.js} +1 -1
  53. package/Marketplace/chunk-LNRINQ7X.js +2 -0
  54. package/Marketplace/{chunk-7LTXYSHQ.js → chunk-M4QK2GZ2.js} +1 -1
  55. package/Marketplace/{chunk-4KEGI3EU.js → chunk-MVBKTYGV.js} +1 -1
  56. package/Marketplace/{chunk-OXVG7WJZ.js → chunk-MWWAJD6W.js} +1 -1
  57. package/Marketplace/{chunk-BGZDRKK3.js → chunk-NGOBXPJI.js} +1 -1
  58. package/Marketplace/{chunk-YZ4AYCNT.js → chunk-NTOLBA75.js} +1 -1
  59. package/Marketplace/{chunk-ZM7NWEU6.js → chunk-OGDIHXSS.js} +1 -1
  60. package/Marketplace/{chunk-IXU7KYI7.js → chunk-OTMUN66U.js} +1 -1
  61. package/Marketplace/{chunk-R3PULPBI.js → chunk-P4GP42TS.js} +1 -1
  62. package/Marketplace/{chunk-BJTG2AAY.js → chunk-PCAUPISK.js} +1 -1
  63. package/Marketplace/{chunk-HCXG5A7G.js → chunk-PEBZF2VL.js} +1 -1
  64. package/Marketplace/chunk-PKA5HSWC.js +279 -0
  65. package/Marketplace/{chunk-AJPIWDAI.js → chunk-QCLS2ZGC.js} +1 -1
  66. package/Marketplace/{chunk-YIRUXSDC.js → chunk-QFEBXATF.js} +1 -1
  67. package/Marketplace/{chunk-V42LGBZA.js → chunk-QJMVJ3Z7.js} +1 -1
  68. package/Marketplace/{chunk-LF6LYX25.js → chunk-QN2XB2TS.js} +1 -1
  69. package/Marketplace/{chunk-RACXTNDG.js → chunk-RUFVKPI3.js} +1 -1
  70. package/Marketplace/{chunk-4WJ74M7Q.js → chunk-S3FKNPUT.js} +1 -1
  71. package/Marketplace/chunk-SA4KQTJY.js +5 -0
  72. package/Marketplace/{chunk-Q3MYZYOB.js → chunk-SD2GVUJO.js} +1 -1
  73. package/Marketplace/{chunk-PFBHIA2V.js → chunk-SQAFBHTZ.js} +1 -1
  74. package/Marketplace/chunk-SSUZ7WMI.js +1 -0
  75. package/Marketplace/chunk-SXQNXQPV.js +1 -0
  76. package/Marketplace/{chunk-N4X75XNP.js → chunk-T7XQ4WN5.js} +1 -1
  77. package/Marketplace/{chunk-25QDQ6Y4.js → chunk-TCHZMTTG.js} +1 -1
  78. package/Marketplace/{chunk-4K4VXZOK.js → chunk-TCJ4TP64.js} +1 -1
  79. package/Marketplace/{chunk-IGD3LCUX.js → chunk-TEMYZMY7.js} +1 -1
  80. package/Marketplace/{chunk-3ZSRGFY2.js → chunk-TORGTLNM.js} +1 -1
  81. package/Marketplace/{chunk-R5HFGHLQ.js → chunk-TOUNXTBL.js} +1 -1
  82. package/Marketplace/{chunk-WUOURY7E.js → chunk-UE77KS2V.js} +1 -1
  83. package/Marketplace/{chunk-CMXS4NMD.js → chunk-UH64FDAN.js} +1 -1
  84. package/Marketplace/chunk-URTVCWVT.js +1 -0
  85. package/Marketplace/{chunk-NRKJQ6I2.js → chunk-V5VTTKFF.js} +1 -1
  86. package/Marketplace/{chunk-C7EET3RC.js → chunk-VHYQLZK3.js} +1 -1
  87. package/Marketplace/{chunk-7HVB2TYE.js → chunk-VLMALON7.js} +1 -1
  88. package/Marketplace/chunk-VRZUHCFW.js +2 -0
  89. package/Marketplace/{chunk-CJRFOZOA.js → chunk-VS4EFXCJ.js} +1 -1
  90. package/Marketplace/{chunk-QSY3P3D5.js → chunk-VVTZ4GFI.js} +1 -1
  91. package/Marketplace/chunk-WAEK4HXD.js +5 -0
  92. package/Marketplace/chunk-WM7WOQJI.js +2 -0
  93. package/Marketplace/chunk-WN24A4VJ.js +1 -0
  94. package/Marketplace/{chunk-DSVTKZGJ.js → chunk-XCY4ZMNE.js} +1 -1
  95. package/Marketplace/{chunk-JIASJY4B.js → chunk-XFTWDHBO.js} +1 -1
  96. package/Marketplace/{chunk-GUIB6IFK.js → chunk-XUEJETYQ.js} +1 -1
  97. package/Marketplace/{chunk-4ZDCGZVX.js → chunk-YC4GUJYZ.js} +1 -1
  98. package/Marketplace/{chunk-IDTOK4S2.js → chunk-YCRPKXVR.js} +1 -1
  99. package/Marketplace/{chunk-PPQLKV7F.js → chunk-ZH4MZ5FW.js} +2 -2
  100. package/Marketplace/{chunk-5GK3N4X2.js → chunk-ZHYM7IH4.js} +2 -2
  101. package/Marketplace/index.html +2 -2
  102. package/Marketplace/{main-FQ4J4BKI.js → main-MFBXP6Z7.js} +2 -2
  103. package/package.json +1 -1
  104. package/Marketplace/chunk-2OPP2S34.js +0 -1
  105. package/Marketplace/chunk-5WAEN7KH.js +0 -1
  106. package/Marketplace/chunk-AQFHZIDK.js +0 -5
  107. package/Marketplace/chunk-B3UYXGRX.js +0 -1
  108. package/Marketplace/chunk-KGUGYQ4J.js +0 -1
  109. package/Marketplace/chunk-MBZ6ZLVX.js +0 -1
  110. package/Marketplace/chunk-MFE4K6A4.js +0 -2
  111. package/Marketplace/chunk-PBM5YFOJ.js +0 -5
  112. package/Marketplace/chunk-Q2RCA3VU.js +0 -1
  113. package/Marketplace/chunk-Q5IOYB65.js +0 -3
  114. package/Marketplace/chunk-QK2JCSM3.js +0 -2
  115. package/Marketplace/chunk-XV36IYPC.js +0 -2
  116. package/Marketplace/chunk-Y4C4V6JL.js +0 -2
  117. package/Marketplace/chunk-ZF42HI3V.js +0 -279
@@ -1 +1 @@
1
- import{b as ye}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{a as H,b as fe,c as ge,i as B,j as J}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{a as S}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as k}from"./chunk-63X2BBS4.js";import{b as f,c as K}from"./chunk-NNVT5X6O.js";import{A as q,c as W,e as T,h as Z,i as j,j as V,l as G,n as L,r as F,s as Y,z as he}from"./chunk-7HUEGPJN.js";import{b as ue,e as me}from"./chunk-ZE4OOGMT.js";import{d as se,e as ce}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as E,C as O,Fc as M,Hc as N,I as $,Ic as i,Kc as z,V as I,Xb as m,Yc as re,Zb as s,cc as c,cd as ae,db as ee,dc as n,ec as l,fc as v,gb as a,gc as R,ha as y,hc as D,ic as te,md as pe,nc as oe,rc as C,rd as de,sc as ne,sd as P,tc as Q,ua as U,uc as ie,vc as le,yb as A}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var Ae=(t,d)=>({"is-invalid":t,"input-shopify rounded-start":d});function ve(t,d){t&1&&(n(0,"label",3),i(1,"Shopify URL"),l())}function Me(t,d){t&1&&(n(0,"label",3),i(1,"URL"),l())}function ke(t,d){t&1&&(n(0,"span",6),i(1,"myshopify.com"),l())}function Te(t,d){if(t&1&&(n(0,"div"),i(1),l()),t&2){let o=Q(2);a(),z("",o.data==null?null:o.data.title," url is required")}}function Ge(t,d){if(t&1&&(n(0,"div",7),m(1,Te,2,1,"div"),l()),t&2){let o,r=Q();a(),s(!(r.formGroup==null||(o=r.formGroup.get("URL"))==null)&&o.getError("required")?1:-1)}}function we(t,d){t&1&&(n(0,"small",8),i(1," Your "),n(2,"strong"),i(3,"myshopify.com"),l(),i(4," domain is trimmed automatically. "),l())}function _e(t,d){t&1&&i(0," API Key ")}function Re(t,d){t&1&&i(0," Consumer Key ")}function Ee(t,d){t&1&&(i(0," ("),n(1,"a",11),i(2,"help center article"),l(),i(3,") "))}function De(t,d){t&1&&(n(0,"div",7),i(1,"API Key is required"),l())}function Pe(t,d){t&1&&i(0," Admin API Access Token ")}function Oe(t,d){t&1&&i(0," Consumer Secret ")}function Ie(t,d){t&1&&(n(0,"div",7),i(1,"Consumer Secret is required"),l())}var x=(()=>{class t{constructor(){this.dialogRef=y(H),this.data=y(fe),this.destroyRef=y(U),this.config=E(new B),this.channelType=f,this.wasTrimmed=E(!1)}ngOnInit(){this.initModalConfig(),this.initFormGroup(),this.initUrlAutotrim()}initFormGroup(){let o=[T.required];this.formGroup=new V({URL:new G(null,o),ConsumerKey:new G(null,[T.required]),ConsumerSecret:new G(null,[T.required])})}initUrlAutotrim(){this.data?.channelType==this.channelType.Shopify&&this.formGroup.get("URL")?.valueChanges.pipe($(5e3),S(this.destroyRef)).subscribe(o=>{let r=this.trimShopifySubdomain(o);r!==o&&(this.formGroup.get("URL")?.setValue(r,{emitEvent:!1}),this.wasTrimmed.set(!0))})}trimShopifySubdomain(o){return o.trim().replace(/^https?:\/\//i,"").replace(/\.myshopify\.com.*$/i,"")}initModalConfig(){this.config.update(o=>Object.assign({},o,{title:this.data.title,okText:"SAVE"}))}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let o=this.formGroup?.get("URL")?.getError("pattern"),r=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||o&&r&&e){let u=this.formGroup.value;u=this.trimShopifyUrl(u),this.dialogRef.close(u)}}trimShopifyUrl(o){if(this.data?.channelType==this.channelType.Shopify){let r=o.URL?.trim()||"";r=r.replace(/^https?:\/\//,""),r.includes(".myshopify.com")||(r=`${r}.myshopify.com`),o.URL=r}return o}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-modal-register-channel"]],decls:24,vars:26,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded","rounded-end-0",3,"placeholder"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-primary","fw-bold"],[1,"invalid-feedback"],[1,"text-warning","d-block","mb-8","mt-n2"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(r,e){if(r&1&&(n(0,"modal-material",0),C("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),n(1,"div",1)(2,"form",2),m(3,ve,2,0,"label",3),n(4,"div",4),m(5,Me,2,0,"label",3),v(6,"input",5),m(7,ke,2,0,"span",6),m(8,Ge,2,1,"div",7),l(),m(9,we,5,0,"small",8),n(10,"div",4)(11,"label",3)(12,"span"),m(13,_e,1,0)(14,Re,1,0),l(),m(15,Ee,4,0),l(),v(16,"input",9),m(17,De,2,0,"div",7),l(),n(18,"div",4)(19,"label",3),m(20,Pe,1,0)(21,Oe,1,0),l(),v(22,"input",10),m(23,Ie,2,0,"div",7),l()()()()),r&2){let p,u,h,g,w,_;c("config",e.config()),a(2),c("formGroup",e.formGroup),a(),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),a(),M("input-group",(e.data==null?null:e.data.channelType)==e.channelType.Shopify),a(),s((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),a(),N(re(23,Ae,(e.formGroup==null||(p=e.formGroup.get("URL"))==null?null:p.invalid)&&((e.formGroup==null||(p=e.formGroup.get("URL"))==null?null:p.dirty)||(e.formGroup==null||(p=e.formGroup.get("URL"))==null?null:p.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),c("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/"),a(),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),a(),s(!(e.formGroup==null||(u=e.formGroup.get("URL"))==null)&&u.invalid&&(!(e.formGroup==null||(u=e.formGroup.get("URL"))==null)&&u.dirty||!(e.formGroup==null||(u=e.formGroup.get("URL"))==null)&&u.touched)?8:-1),a(),s(e.wasTrimmed()?9:-1),a(4),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?13:14),a(2),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?15:-1),a(),M("is-invalid",(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.touched))),c("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]"),a(),s(!(e.formGroup==null||(g=e.formGroup.get("ConsumerKey"))==null)&&g.getError("required")&&(!(e.formGroup==null||(g=e.formGroup.get("ConsumerKey"))==null)&&g.dirty||!(e.formGroup==null||(g=e.formGroup.get("ConsumerKey"))==null)&&g.touched)?17:-1),a(3),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?20:21),a(2),M("is-invalid",(e.formGroup==null||(w=e.formGroup.get("ConsumerSecret"))==null?null:w.invalid)&&((e.formGroup==null||(w=e.formGroup.get("ConsumerSecret"))==null?null:w.dirty)||(e.formGroup==null||(w=e.formGroup.get("ConsumerSecret"))==null?null:w.touched))),c("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************"),a(),s(!(e.formGroup==null||(_=e.formGroup.get("ConsumerSecret"))==null)&&_.getError("required")&&(!(e.formGroup==null||(_=e.formGroup.get("ConsumerSecret"))==null)&&_.dirty||!(e.formGroup==null||(_=e.formGroup.get("ConsumerSecret"))==null)&&_.touched)?23:-1)}},dependencies:[J,he,L,W,Z,j,q,Y,F],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"],changeDetection:0})}}return t})();function Ue(t,d){t&1&&(n(0,"div",6),i(1,"Api Key is required"),l())}function Ne(t,d){t&1&&(n(0,"div",6),i(1,"Vendor ID is required"),l())}var Ce=(()=>{class t{constructor(){this.dialogRef=y(H),this.config=E(new B),this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config.update(o=>Object.assign({},o,{title:"Register Plugo",okText:"SAVE"}))}initFormGroup(){this.formGroup=new V({ApiKey:new G(null,[T.required]),VendorID:new G(null,[T.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let o=this.formGroup.value;this.dialogRef.close(o)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-modal-register-plugo"]],decls:13,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control"],["for","VendorID"]],template:function(r,e){if(r&1&&(n(0,"modal-material",0),C("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onOk()}),n(1,"div",1)(2,"form",2)(3,"div",3),v(4,"input",4),n(5,"label",5),i(6,"Api Key"),l(),m(7,Ue,2,0,"div",6),l(),n(8,"div",3),v(9,"input",7),n(10,"label",8),i(11,"Vendor ID"),l(),m(12,Ne,2,0,"div",6),l()()()()),r&2){let p,u,h,g;c("config",e.config()),a(2),c("formGroup",e.formGroup),a(2),M("is-invalid",(e.formGroup==null||(p=e.formGroup.get("ApiKey"))==null?null:p.invalid)&&((e.formGroup==null||(p=e.formGroup.get("ApiKey"))==null?null:p.dirty)||(e.formGroup==null||(p=e.formGroup.get("ApiKey"))==null?null:p.touched))),a(3),s(!(e.formGroup==null||(u=e.formGroup.get("ApiKey"))==null)&&u.getError("required")&&(!(e.formGroup==null||(u=e.formGroup.get("ApiKey"))==null)&&u.dirty||!(e.formGroup==null||(u=e.formGroup.get("ApiKey"))==null)&&u.touched)?7:-1),a(2),M("is-invalid",(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.touched))),a(3),s(!(e.formGroup==null||(g=e.formGroup.get("VendorID"))==null)&&g.getError("required")&&(!(e.formGroup==null||(g=e.formGroup.get("VendorID"))==null)&&g.dirty||!(e.formGroup==null||(g=e.formGroup.get("VendorID"))==null)&&g.touched)?12:-1)}},dependencies:[J,q,L,W,Z,j,Y,F],encapsulation:2,changeDetection:0})}}return t})();var b=(function(t){return t.SHOPEE="https://resc.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",t.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",t.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPB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YDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",t.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",t.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",t.TIKTOK="https://resc.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",t.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",t.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",t})(b||{});var ze=["*"],Ke=(t,d,o,r,e,p,u,h)=>({"btn-shopee":t,"btn-lazada":d,"btn-tiktok":o,"btn-woocommerce":r,"btn-tokopedia":e,"btn-shopify":p,"btn-kalcare":u,"btn-plugo":h});function We(t,d){t&1&&(R(0,"div",1)(1,"span"),i(2,"BETA"),D()())}var be=(()=>{class t{constructor(){this.disabled=P(!1),this.type=P(void 0),this.isBeta=P(!1),this.authorize=de({alias:"onAuthorize"}),this.channelType=f,this.image=pe(()=>{switch(this.type()){case f.Tokopedia:return b.TOKOPEDIA;case f.WooCommerce:return b.WOOCOMMERCE;case f.Shopee:return b.SHOPEE;case f.Tiktok:return b.TIKTOK;case f.Lazada:return b.LAZADA;case f.Shopify:return b.SHOPIFY;case f.Plugo:return b.PLUGO;default:return b.SHOPEE}}),this.buttonName=P("Authorize Account")}onAuthorize(){this.authorize.emit()}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-channel-widget"]],inputs:{disabled:[1,"disabled"],type:[1,"type"],isBeta:[1,"isBeta"],buttonName:[1,"buttonName"]},outputs:{authorize:"onAuthorize"},ngContentSelectors:ze,decls:10,vars:14,consts:[[1,"card","h-100","ribbon-box"],[1,"ribbon","ribbon-top-right"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click"]],template:function(r,e){r&1&&(ie(),R(0,"div",0),m(1,We,3,0,"div",1),R(2,"div",2),te(3,"img",3),D(),R(4,"div",4)(5,"div"),le(6),D()(),R(7,"div",5)(8,"a",6),ne("click",function(){return e.onAuthorize()}),i(9),D()()()),r&2&&(a(),s(e.isBeta()?1:-1),a(2),oe("src",e.image(),ee),a(5),N(ae(5,Ke,e.type()==e.channelType.Shopee,e.type()==e.channelType.Lazada,e.type()==e.channelType.Tiktok,e.type()==e.channelType.WooCommerce,e.type()==e.channelType.Tokopedia,e.type()==e.channelType.Shopify,e.type()==e.channelType.KalCare,e.type()==e.channelType.Plugo)),a(),z(" ",e.buttonName()," "))},styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}'],changeDetection:0})}}return t})();var _t=(()=>{class t{constructor(){this.http=y(me),this.router=y(se),this.destroyRef=y(U),this.dialog=y(ge),this.toastr=y(ue),this.channelType=f}shopeeAuthorize(){this.http.post(k.ShopeeV2_URL).pipe(S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}tiktokAuthorize(){this.http.post(k.Tiktok_URL).pipe(S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}lazadaAuthorize(){this.http.post(k.Lazada_URL).pipe(S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}openShopifyDialog(){this.dialog.open(x,{data:{title:"Shopify",channelType:f.Shopify},width:"30%"}).afterClosed().pipe(O(o=>K.IsNotEmpty(o)),I(o=>this.http.post(k.AddShopify,o)),S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}openWooCommerceDialog(){this.dialog.open(x,{data:{title:"WooCommerce",channelType:f.WooCommerce},width:"30%"}).afterClosed().pipe(O(o=>K.IsNotEmpty(o)),I(o=>this.http.post(k.AddWoocommerce,o)),S(this.destroyRef)).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ce,{width:"30%"}).afterClosed().pipe(O(o=>K.IsNotEmpty(o)),I(o=>this.http.post(k.AddPlugo,o)),S(this.destroyRef)).subscribe(()=>{this.onSuccessAddChannel()})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-marketplace-add"]],decls:50,vars:8,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Register",3,"onAuthorize","type"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(r,e){r&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Cancel"),l()(),n(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),C("onAuthorize",function(){return e.shopeeAuthorize()}),n(9,"p"),i(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),l(),n(11,"p"),i(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),l()()(),n(13,"div",6)(14,"app-channel-widget",5),C("onAuthorize",function(){return e.tiktokAuthorize()}),n(15,"p"),i(16," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),l(),n(17,"p"),i(18," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),l()()(),n(19,"div",4)(20,"app-channel-widget",7),C("onAuthorize",function(){return e.openPlugoDialog()}),n(21,"p"),i(22,"Authorize DEALPOS to manage your Plugo Store."),l(),n(23,"p"),i(24," Configure Plugo x DealPOS integration by visiting this "),n(25,"a",8),i(26," article. "),l()()()()(),n(27,"div",3)(28,"div",6)(29,"app-channel-widget",7),C("onAuthorize",function(){return e.openWooCommerceDialog()}),n(30,"p"),i(31,"Authorize DEALPOS to manage your Personal Website."),l(),n(32,"p"),i(33," Configure woocommerce integration by visiting "),n(34,"a",9),i(35,"this article."),l()()()(),n(36,"div",6)(37,"app-channel-widget",5),C("onAuthorize",function(){return e.lazadaAuthorize()}),n(38,"p"),i(39," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),l(),n(40,"p"),i(41," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),l()()(),n(42,"div",4)(43,"app-channel-widget",7),C("onAuthorize",function(){return e.openShopifyDialog()}),n(44,"p"),i(45,"Authorize DEALPOS to manage your Personal Website."),l(),n(46,"p"),i(47," Configure Shopify integration by visiting "),n(48,"a",10),i(49,"this article."),l()()()()()()()()),r&2&&(c("hideSearchBox",!0)("hideSearchDropdown",!0),a(8),c("type",e.channelType.Shopee),a(6),c("type",e.channelType.Tiktok),a(6),c("type",e.channelType.Plugo),a(9),c("type",e.channelType.WooCommerce),a(8),c("type",e.channelType.Lazada),a(6),c("type",e.channelType.Shopify))},dependencies:[ye,ce,be],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"],changeDetection:0})}}return t})();export{_t as MarketplaceAddComponent};
1
+ import{b as ye}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import{a as H,b as fe,c as ge,i as B,j as J}from"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{a as S}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{a as k}from"./chunk-63X2BBS4.js";import{b as f,c as K}from"./chunk-NNVT5X6O.js";import{A as q,c as W,e as T,h as Z,i as j,j as V,l as G,n as L,r as F,s as Y,z as he}from"./chunk-7HUEGPJN.js";import{b as ue,e as me}from"./chunk-ZE4OOGMT.js";import{d as se,e as ce}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as E,C as O,Fc as M,Hc as N,I as $,Ic as i,Kc as z,V as I,Xb as m,Yc as re,Zb as s,cc as c,cd as ae,db as ee,dc as n,ec as l,fc as v,gb as a,gc as R,ha as y,hc as D,ic as te,md as pe,nc as oe,rc as C,rd as de,sc as ne,sd as P,tc as Q,ua as U,uc as ie,vc as le,yb as A}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var Ae=(t,d)=>({"is-invalid":t,"input-shopify rounded-start":d});function ve(t,d){t&1&&(n(0,"label",3),i(1,"Shopify URL"),l())}function Me(t,d){t&1&&(n(0,"label",3),i(1,"URL"),l())}function ke(t,d){t&1&&(n(0,"span",6),i(1,"myshopify.com"),l())}function Te(t,d){if(t&1&&(n(0,"div"),i(1),l()),t&2){let o=Q(2);a(),z("",o.data==null?null:o.data.title," url is required")}}function Ge(t,d){if(t&1&&(n(0,"div",7),m(1,Te,2,1,"div"),l()),t&2){let o,r=Q();a(),s(!(r.formGroup==null||(o=r.formGroup.get("URL"))==null)&&o.getError("required")?1:-1)}}function we(t,d){t&1&&(n(0,"small",8),i(1," Your "),n(2,"strong"),i(3,"myshopify.com"),l(),i(4," domain is trimmed automatically. "),l())}function _e(t,d){t&1&&i(0," API Key ")}function Re(t,d){t&1&&i(0," Consumer Key ")}function Ee(t,d){t&1&&(i(0," ("),n(1,"a",11),i(2,"help center article"),l(),i(3,") "))}function De(t,d){t&1&&(n(0,"div",7),i(1,"API Key is required"),l())}function Pe(t,d){t&1&&i(0," Admin API Access Token ")}function Oe(t,d){t&1&&i(0," Consumer Secret ")}function Ie(t,d){t&1&&(n(0,"div",7),i(1,"Consumer Secret is required"),l())}var x=(()=>{class t{constructor(){this.dialogRef=y(H),this.data=y(fe),this.destroyRef=y(U),this.config=E(new B),this.channelType=f,this.wasTrimmed=E(!1)}ngOnInit(){this.initModalConfig(),this.initFormGroup(),this.initUrlAutotrim()}initFormGroup(){let o=[T.required];this.formGroup=new V({URL:new G(null,o),ConsumerKey:new G(null,[T.required]),ConsumerSecret:new G(null,[T.required])})}initUrlAutotrim(){this.data?.channelType==this.channelType.Shopify&&this.formGroup.get("URL")?.valueChanges.pipe($(5e3),S(this.destroyRef)).subscribe(o=>{let r=this.trimShopifySubdomain(o);r!==o&&(this.formGroup.get("URL")?.setValue(r,{emitEvent:!1}),this.wasTrimmed.set(!0))})}trimShopifySubdomain(o){return o.trim().replace(/^https?:\/\//i,"").replace(/\.myshopify\.com.*$/i,"")}initModalConfig(){this.config.update(o=>Object.assign({},o,{title:this.data.title,okText:"SAVE"}))}onClose(){this.dialogRef.close()}onSubmit(){this.formGroup.markAllAsTouched();let o=this.formGroup?.get("URL")?.getError("pattern"),r=this.formGroup?.get("ConsumerKey")?.valid,e=this.formGroup?.get("ConsumerSecret")?.valid;if(this.formGroup?.valid||o&&r&&e){let u=this.formGroup.value;u=this.trimShopifyUrl(u),this.dialogRef.close(u)}}trimShopifyUrl(o){if(this.data?.channelType==this.channelType.Shopify){let r=o.URL?.trim()||"";r=r.replace(/^https?:\/\//,""),r.includes(".myshopify.com")||(r=`${r}.myshopify.com`),o.URL=r}return o}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-modal-register-channel"]],decls:24,vars:26,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],["for","shopid",1,"form-label","fw-bold","mb-2"],[1,"mb-8","has-validation"],["type","text","id","shopid","name","URL","title","URL","formControlName","URL",1,"form-control","form-input","rounded","rounded-end-0",3,"placeholder"],["id","basic-addon2",1,"input-group-text","rounded-end","form-input","text-primary","fw-bold"],[1,"invalid-feedback"],[1,"text-warning","d-block","mb-8","mt-n2"],["type","text","id","ConsumerKey","name","ConsumerKey","title","ConsumerKey","formControlName","ConsumerKey",1,"form-control","rounded","form-input",3,"placeholder"],["type","text","id","ConsumerSecret","name","ConsumerSecret","title","ConsumerSecret","formControlName","ConsumerSecret",1,"form-control","rounded","form-input",3,"placeholder"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(r,e){if(r&1&&(n(0,"modal-material",0),C("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onSubmit()}),n(1,"div",1)(2,"form",2),m(3,ve,2,0,"label",3),n(4,"div",4),m(5,Me,2,0,"label",3),v(6,"input",5),m(7,ke,2,0,"span",6),m(8,Ge,2,1,"div",7),l(),m(9,we,5,0,"small",8),n(10,"div",4)(11,"label",3)(12,"span"),m(13,_e,1,0)(14,Re,1,0),l(),m(15,Ee,4,0),l(),v(16,"input",9),m(17,De,2,0,"div",7),l(),n(18,"div",4)(19,"label",3),m(20,Pe,1,0)(21,Oe,1,0),l(),v(22,"input",10),m(23,Ie,2,0,"div",7),l()()()()),r&2){let p,u,h,g,w,_;c("config",e.config()),a(2),c("formGroup",e.formGroup),a(),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?3:-1),a(),M("input-group",(e.data==null?null:e.data.channelType)==e.channelType.Shopify),a(),s((e.data==null?null:e.data.channelType)!=e.channelType.Shopify?5:-1),a(),N(re(23,Ae,(e.formGroup==null||(p=e.formGroup.get("URL"))==null?null:p.invalid)&&((e.formGroup==null||(p=e.formGroup.get("URL"))==null?null:p.dirty)||(e.formGroup==null||(p=e.formGroup.get("URL"))==null?null:p.touched)),(e.data==null?null:e.data.channelType)==e.channelType.Shopify)),c("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[ex: brand.myshopify.com]":"https://mydomain.com/"),a(),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?7:-1),a(),s(!(e.formGroup==null||(u=e.formGroup.get("URL"))==null)&&u.invalid&&(!(e.formGroup==null||(u=e.formGroup.get("URL"))==null)&&u.dirty||!(e.formGroup==null||(u=e.formGroup.get("URL"))==null)&&u.touched)?8:-1),a(),s(e.wasTrimmed()?9:-1),a(4),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?13:14),a(2),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?15:-1),a(),M("is-invalid",(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("ConsumerKey"))==null?null:h.touched))),c("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[Create an app and copy the API Key]":"[Create an app and copy the Consumer Key]"),a(),s(!(e.formGroup==null||(g=e.formGroup.get("ConsumerKey"))==null)&&g.getError("required")&&(!(e.formGroup==null||(g=e.formGroup.get("ConsumerKey"))==null)&&g.dirty||!(e.formGroup==null||(g=e.formGroup.get("ConsumerKey"))==null)&&g.touched)?17:-1),a(3),s((e.data==null?null:e.data.channelType)==e.channelType.Shopify?20:21),a(2),M("is-invalid",(e.formGroup==null||(w=e.formGroup.get("ConsumerSecret"))==null?null:w.invalid)&&((e.formGroup==null||(w=e.formGroup.get("ConsumerSecret"))==null?null:w.dirty)||(e.formGroup==null||(w=e.formGroup.get("ConsumerSecret"))==null?null:w.touched))),c("placeholder",(e.data==null?null:e.data.channelType)==e.channelType.Shopify?"[shpat***************************]":"cs_***************"),a(),s(!(e.formGroup==null||(_=e.formGroup.get("ConsumerSecret"))==null)&&_.getError("required")&&(!(e.formGroup==null||(_=e.formGroup.get("ConsumerSecret"))==null)&&_.dirty||!(e.formGroup==null||(_=e.formGroup.get("ConsumerSecret"))==null)&&_.touched)?23:-1)}},dependencies:[J,he,L,W,Z,j,q,Y,F],styles:[".input-shopify[_ngcontent-%COMP%]{border-top-right-radius:0!important;border-bottom-right-radius:0!important}.form-input[_ngcontent-%COMP%]{min-height:3.625rem}"],changeDetection:0})}}return t})();function Ue(t,d){t&1&&(n(0,"div",6),i(1,"Api Key is required"),l())}function Ne(t,d){t&1&&(n(0,"div",6),i(1,"Vendor ID is required"),l())}var Ce=(()=>{class t{constructor(){this.dialogRef=y(H),this.config=E(new B),this.initModalConfig(),this.initFormGroup()}initModalConfig(){this.config.update(o=>Object.assign({},o,{title:"Register Plugo",okText:"SAVE"}))}initFormGroup(){this.formGroup=new V({ApiKey:new G(null,[T.required]),VendorID:new G(null,[T.required])})}onClose(){this.dialogRef.close()}onOk(){if(this.formGroup.markAllAsTouched(),this.formGroup.invalid)return;let o=this.formGroup.value;this.dialogRef.close(o)}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-modal-register-plugo"]],decls:13,vars:8,consts:[[3,"onClose","onCancel","onOk","config"],["content",""],[3,"formGroup"],[1,"form-label-group","has-validation"],["type","text","id","ApiKey","placeholder","Api Key","name","ApiKey","title","Api Key","formControlName","ApiKey",1,"form-control"],["for","ApiKey"],[1,"invalid-feedback"],["type","text","id","VendorID","placeholder","Vendor ID","name","VendorID","title","Vendor ID","formControlName","VendorID",1,"form-control"],["for","VendorID"]],template:function(r,e){if(r&1&&(n(0,"modal-material",0),C("onClose",function(){return e.onClose()})("onCancel",function(){return e.onClose()})("onOk",function(){return e.onOk()}),n(1,"div",1)(2,"form",2)(3,"div",3),v(4,"input",4),n(5,"label",5),i(6,"Api Key"),l(),m(7,Ue,2,0,"div",6),l(),n(8,"div",3),v(9,"input",7),n(10,"label",8),i(11,"Vendor ID"),l(),m(12,Ne,2,0,"div",6),l()()()()),r&2){let p,u,h,g;c("config",e.config()),a(2),c("formGroup",e.formGroup),a(2),M("is-invalid",(e.formGroup==null||(p=e.formGroup.get("ApiKey"))==null?null:p.invalid)&&((e.formGroup==null||(p=e.formGroup.get("ApiKey"))==null?null:p.dirty)||(e.formGroup==null||(p=e.formGroup.get("ApiKey"))==null?null:p.touched))),a(3),s(!(e.formGroup==null||(u=e.formGroup.get("ApiKey"))==null)&&u.getError("required")&&(!(e.formGroup==null||(u=e.formGroup.get("ApiKey"))==null)&&u.dirty||!(e.formGroup==null||(u=e.formGroup.get("ApiKey"))==null)&&u.touched)?7:-1),a(2),M("is-invalid",(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.invalid)&&((e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.dirty)||(e.formGroup==null||(h=e.formGroup.get("VendorID"))==null?null:h.touched))),a(3),s(!(e.formGroup==null||(g=e.formGroup.get("VendorID"))==null)&&g.getError("required")&&(!(e.formGroup==null||(g=e.formGroup.get("VendorID"))==null)&&g.dirty||!(e.formGroup==null||(g=e.formGroup.get("VendorID"))==null)&&g.touched)?12:-1)}},dependencies:[J,q,L,W,Z,j,Y,F],encapsulation:2,changeDetection:0})}}return t})();var b=(function(t){return t.SHOPEE="https://resc.cloudinary.com/pos/image/upload/v1605249851/icons/Marketplace%20logo/shopee-logo.png",t.TOKOPEDIA="https://resc.cloudinary.com/pos/image/upload/v1605249861/icons/Marketplace%20logo/download_tkpd.png",t.KAL_CARE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAYwAAAB/CAMAAADLlgV7AAABIFBMVEX///8jHyCAvAAAZUgAAACdyUTD3YwAYEEAY0V6uQAAXT0AWzoAWDUVDxCAfn94uAC7urulpKUMAAQZFBUPBwnf6+ecu7Cjw7jf39/3+vmZmZnn8e4pdl5om4oGblIZblOpvrZNi3draWnc7LxOS0w7gmy/19AAYEhaj3zK3NbW5N+Twk272Immy32Ih4cydFwrdlGgzFE+hEZvnY30+em+2Z4ATiW4ycLI4ZzD27Pu9t2izUTn8tJ9qJrv7+8/PD3U09NZV1gtKSqPxCTP5ar3+vDCwcG42X+kzl3R48TW6bWw1HLk7uLE35aRunidvrMxe00ufDoBakBjYWF/sISWvKdsp0Glz1et0nVvqFFWlzQAUTV8rmlbmUeLr6IARhVkELW6AAAVU0lEQVR4nO1dj3/aOJYnONTGdkqbBKgL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hZ5fOOz5IS5Ljoh4b9/MTEaVagJ535EfMPd1ZNA6h+H3I4aMCbU87fthdTjwZQLjAyma4k89srW+gmhrMmx41QmMNZby7Pl36vnKw7UpmmnOCl5H2Mg+jRgaChmQ1ljtKqWPuck1yAAbaxkzWsxlj1CjN223TSszGYUlldaZzVpNGq3BaLL2ljMY3NaeQgYdfpbR7jXiySjMqFO2yYwAa1V3kcxOiAwPVj7MZms56rSxmIZBwoq2AWf9esuEPToMR1ZUR2TMQkooNGhIaLSbEhmsO+1Z0wwqB2uQUai5cD9yves7yQZdx7FMEzjvZCPDa1Fppm0yu+JBKGnZtrMHk0AhgzwHvVM7iQzCMVsVoubTa9pcJhuLEhmFoQ3noQtSWYV6dhrU89rXjD86O4LIqFpMCVbT4tHDiM5kNqYEGVSKRaWwwZyRjJ7rukc8ch804Wcc3D1eFx3skQNue1A7cl32sPA5RAY5e8TIIH+5wU0nTfajEC6rthB24Ich6hPS5g9Kxh+k8Z7f+N6CszRv3Sd/0T61yfk/1ByvOtpzoSlt0YC2rjVZEpkW75/wE42RQ/vgHmFr1acSHNccCeF99uhtnzTPIvdmyXBhYFChQglU7XCMlgdsWL5t4Ed2m75Gq/QckEH+dROXKaoAlMM1+vW69PgD+tmDZrST8OMOoRyYC6HtRNwC0uq8ZF5okA+ekFUYEgivMiSSq8Ef9CK1c1zOoN8feEKm2j+pYDKALgwUKd4guBlShfToVdw3RQlcAps5+DCVIhoF5xS95MiRI8ejxf8CaCHBz1xZMMgAAAAASUVORK5CYII=",t.LAZADA="https://resc.cloudinary.com/pos/image/upload/v1641528116/icons/Marketplace%20logo/lazada.png",t.WOOCOMMERCE="https://resc.cloudinary.com/pos/image/upload/v1739236630/icons/marketplace_icons/woo.png",t.TIKTOK="https://resc.cloudinary.com/pos/image/upload/v1645761565/icons/Marketplace%20logo/tiktok-logo.png",t.SHOPIFY="https://resc.cloudinary.com/pos/image/upload/v1710725872/icons/marketplace_icons/Shopify_with_text.png",t.PLUGO="https://resc.cloudinary.com/pos/image/upload/v1739236577/icons/marketplace_icons/plugo_biglogo.png",t})(b||{});var ze=["*"],Ke=(t,d,o,r,e,p,u,h)=>({"btn-shopee":t,"btn-lazada":d,"btn-tiktok":o,"btn-woocommerce":r,"btn-tokopedia":e,"btn-shopify":p,"btn-kalcare":u,"btn-plugo":h});function We(t,d){t&1&&(R(0,"div",1)(1,"span"),i(2,"BETA"),D()())}var be=(()=>{class t{constructor(){this.disabled=P(!1),this.type=P(void 0),this.isBeta=P(!1),this.authorize=de({alias:"onAuthorize"}),this.channelType=f,this.image=pe(()=>{switch(this.type()){case f.Tokopedia:return b.TOKOPEDIA;case f.WooCommerce:return b.WOOCOMMERCE;case f.Shopee:return b.SHOPEE;case f.Tiktok:return b.TIKTOK;case f.Lazada:return b.LAZADA;case f.Shopify:return b.SHOPIFY;case f.Plugo:return b.PLUGO;default:return b.SHOPEE}}),this.buttonName=P("Authorize Account")}onAuthorize(){this.authorize.emit()}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-channel-widget"]],inputs:{disabled:[1,"disabled"],type:[1,"type"],isBeta:[1,"isBeta"],buttonName:[1,"buttonName"]},outputs:{authorize:"onAuthorize"},ngContentSelectors:ze,decls:10,vars:14,consts:[[1,"card","h-100","ribbon-box"],[1,"ribbon","ribbon-top-right"],[1,"card-header","d-flex","align-items-center","justify-content-center",2,"height","120px","padding","0px"],[1,"w-50",3,"src"],[1,"card-body",2,"min-height","134px"],[1,"card-footer","p-4"],[1,"h4","fw-bold","btn","text-white","w-100","border-0",3,"click"]],template:function(r,e){r&1&&(ie(),R(0,"div",0),m(1,We,3,0,"div",1),R(2,"div",2),te(3,"img",3),D(),R(4,"div",4)(5,"div"),le(6),D()(),R(7,"div",5)(8,"a",6),ne("click",function(){return e.onAuthorize()}),i(9),D()()()),r&2&&(a(),s(e.isBeta()?1:-1),a(2),oe("src",e.image(),ee),a(5),N(ae(5,Ke,e.type()==e.channelType.Shopee,e.type()==e.channelType.Lazada,e.type()==e.channelType.Tiktok,e.type()==e.channelType.WooCommerce,e.type()==e.channelType.Tokopedia,e.type()==e.channelType.Shopify,e.type()==e.channelType.KalCare,e.type()==e.channelType.Plugo)),a(),z(" ",e.buttonName()," "))},styles:['.bg-shopee[_ngcontent-%COMP%], .btn-shopee[_ngcontent-%COMP%]{background:linear-gradient(-180deg,#f53d2d,#f63)!important}.bg-tiktok[_ngcontent-%COMP%], .btn-tiktok[_ngcontent-%COMP%]{background:linear-gradient(-173deg,#ee1d52,#69c9d0)!important}.bg-woocommerce[_ngcontent-%COMP%], .btn-woocommerce[_ngcontent-%COMP%]{background:#8053b4!important}.pointer-help[_ngcontent-%COMP%]{cursor:help}.btn-bottom[_ngcontent-%COMP%]{position:absolute;bottom:.5rem;left:.5rem;width:96%}.ribbon-box[_ngcontent-%COMP%]{position:relative}.ribbon[_ngcontent-%COMP%]{width:150px;height:150px;overflow:hidden;position:absolute}.ribbon[_ngcontent-%COMP%]:before, .ribbon[_ngcontent-%COMP%]:after{position:absolute;z-index:1;content:"";display:block;border:5px solid #78c424}.ribbon[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{position:absolute;display:block;width:225px;padding:15px 0;background-color:#78c424;box-shadow:0 5px 10px #0000001a;color:#fff;font:700 18px/1 Lato,sans-serif;text-shadow:0 1px 1px rgba(0,0,0,.2);text-transform:uppercase;text-align:center}.ribbon-top-right[_ngcontent-%COMP%]{top:-10px;right:-10px}.ribbon-top-right[_ngcontent-%COMP%]:before, .ribbon-top-right[_ngcontent-%COMP%]:after{border-top-color:transparent;border-right-color:transparent}.ribbon-top-right[_ngcontent-%COMP%]:before{top:0;left:0}.ribbon-top-right[_ngcontent-%COMP%]:after{bottom:0;right:0}.ribbon-top-right[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{left:-25px;top:30px;transform:rotate(45deg)}.btn-shopify[_ngcontent-%COMP%]{background-color:#96bf48}.btn-tokopedia[_ngcontent-%COMP%]{background-color:#7f7f7f}.btn-lazada[_ngcontent-%COMP%]{background:linear-gradient(90deg,#ff7e5f,#fd04e3)!important}.btn-plugo[_ngcontent-%COMP%]{background-color:#f2a954}'],changeDetection:0})}}return t})();var _t=(()=>{class t{constructor(){this.http=y(me),this.router=y(se),this.destroyRef=y(U),this.dialog=y(ge),this.toastr=y(ue),this.channelType=f}shopeeAuthorize(){this.http.post(k.ShopeeV2_URL).pipe(S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}tiktokAuthorize(){this.http.post(k.Tiktok_URL).pipe(S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}lazadaAuthorize(){this.http.post(k.Lazada_URL).pipe(S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}openShopifyDialog(){this.dialog.open(x,{data:{title:"Shopify",channelType:f.Shopify},width:"30%"}).afterClosed().pipe(O(o=>K.IsNotEmpty(o)),I(o=>this.http.post(k.AddShopify,o)),S(this.destroyRef)).subscribe(o=>{window.open(o.Url,"_blank")})}openWooCommerceDialog(){this.dialog.open(x,{data:{title:"WooCommerce",channelType:f.WooCommerce},width:"30%"}).afterClosed().pipe(O(o=>K.IsNotEmpty(o)),I(o=>this.http.post(k.AddWoocommerce,o)),S(this.destroyRef)).subscribe(()=>{this.onSuccessAddChannel()})}openPlugoDialog(){this.dialog.open(Ce,{width:"30%"}).afterClosed().pipe(O(o=>K.IsNotEmpty(o)),I(o=>this.http.post(k.AddPlugo,o)),S(this.destroyRef)).subscribe(()=>{this.onSuccessAddChannel()})}onSuccessAddChannel(){this.router.navigate(["/menu/channel"]),this.toastr.success("Channel has been added successfully","Success")}static{this.\u0275fac=function(r){return new(r||t)}}static{this.\u0275cmp=A({type:t,selectors:[["app-marketplace-add"]],decls:50,vars:8,consts:[["headerTitle","Add New Channel",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/channel",1,"btn","btn-secondary","btn-fill","btn-lg","me-3"],[1,"container"],[1,"row","mt-12"],[1,"col-md-4","ps-md-0"],[3,"onAuthorize","type"],[1,"col-md-4","pe-md-0"],["buttonName","Register",3,"onAuthorize","type"],["href","https://support.dealpos.com/en/articles/10568056-plugo-authorization-in-dealpos-omnichannel-apps","target","_blank",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/5733019-woocommerce-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"],["target","_blank","href","https://support.dealpos.com/en/articles/9525716-shopify-authorization-at-dealpos-apps",1,"button","text-primary","fw-bold"]],template:function(r,e){r&1&&(n(0,"mainpanel",0)(1,"actions")(2,"a",1),i(3,"Cancel"),l()(),n(4,"content")(5,"div",2)(6,"div",3)(7,"div",4)(8,"app-channel-widget",5),C("onAuthorize",function(){return e.shopeeAuthorize()}),n(9,"p"),i(10," Authorize DEALPOS versi V2 to manage your shopee, you will be redirected to shopee website to complete this process. "),l(),n(11,"p"),i(12," You will need to sign in to Shopee using your Seller account and confirm the authorization. "),l()()(),n(13,"div",6)(14,"app-channel-widget",5),C("onAuthorize",function(){return e.tiktokAuthorize()}),n(15,"p"),i(16," Authorize DEALPOS to manage your Tiktok Seller, you will be redirected to Tiktok website to complete this process. "),l(),n(17,"p"),i(18," You will need to sign in to Tiktok using your Seller account and confirm the authorization. "),l()()(),n(19,"div",4)(20,"app-channel-widget",7),C("onAuthorize",function(){return e.openPlugoDialog()}),n(21,"p"),i(22,"Authorize DEALPOS to manage your Plugo Store."),l(),n(23,"p"),i(24," Configure Plugo x DealPOS integration by visiting this "),n(25,"a",8),i(26," article. "),l()()()()(),n(27,"div",3)(28,"div",6)(29,"app-channel-widget",7),C("onAuthorize",function(){return e.openWooCommerceDialog()}),n(30,"p"),i(31,"Authorize DEALPOS to manage your Personal Website."),l(),n(32,"p"),i(33," Configure woocommerce integration by visiting "),n(34,"a",9),i(35,"this article."),l()()()(),n(36,"div",6)(37,"app-channel-widget",5),C("onAuthorize",function(){return e.lazadaAuthorize()}),n(38,"p"),i(39," Authorize DEALPOS versi V2 to manage your lazada, you will be redirected to lazada website to complete this process. "),l(),n(40,"p"),i(41," You will need to sign in to Lazada using your Seller account and confirm the authorization. "),l()()(),n(42,"div",4)(43,"app-channel-widget",7),C("onAuthorize",function(){return e.openShopifyDialog()}),n(44,"p"),i(45,"Authorize DEALPOS to manage your Personal Website."),l(),n(46,"p"),i(47," Configure Shopify integration by visiting "),n(48,"a",10),i(49,"this article."),l()()()()()()()()),r&2&&(c("hideSearchBox",!0)("hideSearchDropdown",!0),a(8),c("type",e.channelType.Shopee),a(6),c("type",e.channelType.Tiktok),a(6),c("type",e.channelType.Plugo),a(9),c("type",e.channelType.WooCommerce),a(8),c("type",e.channelType.Lazada),a(6),c("type",e.channelType.Shopify))},dependencies:[ye,ce,be],styles:["p[_ngcontent-%COMP%]{font-size:14px;font-weight:400;line-height:24.48px}"],changeDetection:0})}}return t})();export{_t as MarketplaceAddComponent};
@@ -1 +1 @@
1
- import{a as W,b as k,c as B}from"./chunk-44GXCX6B.js";import{a as N}from"./chunk-ZLMUYIKY.js";import"./chunk-BGFEVOPZ.js";import{b as E}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"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{c as T}from"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as x}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as m,Ic as L,Mc as y,Nc as C,Oc as _,Pc as M,Qc as V,Rc as u,Xb as S,Zb as v,cc as f,dc as r,ec as d,fc as w,gb as l,ha as g,mc as D,oa as c,pa as h,rc as b,tc as F,yb as P}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function R(n,O){if(n&1&&(r(0,"div",6)(1,"div",7),w(2,"app-table-report",8),d()()),n&2){let e=F(),t=u(0);l(2),f("result",e.result())("header",e.header())("from",t.From)("to",t.To)("type",4)}}var Y=(()=>{class n{constructor(){this.http=g(k),this.datePipe=g(x),this.filter=m(new W),this.minDate=m(null),this.result=m([]),this.header=m([]),this.PageTitle=m("Completed");let e=new Date;this.minDate.set(T.addDays(e,6)),this.filter.update(t=>(t.From=e,t.To=e,t)),this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=this.filter(),t=T.formatTitleFromDate(e.From,e.To),a=this.datePipe.transform(e.From,t),i=this.datePipe.transform(e.To,"dd MMM yyyy");this.PageTitle.set(`Completed (${t==null?"":a+"-"} ${i})`)}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter.set(e),this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter()).then(e=>{this.header.set(e.Header),this.result.set(e.Body)})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-payment"]],decls:13,vars:6,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,a){if(t&1){let i=D();M(0),r(1,"mainpanel",0),b("onSubmit",function(){return c(i),h(a.onFilter())}),r(2,"filters")(3,"div")(4,"label",1),L(5,"From/To"),d(),r(6,"div",2)(7,"datepicker",3),_("dateChange",function(o){c(i);let p=u(0);return C(p.From,o)||(p.From=o),h(o)}),d()(),r(8,"div")(9,"datepicker",4),_("dateChange",function(o){c(i);let p=u(0);return C(p.To,o)||(p.To=o),h(o)}),d()()()(),r(10,"content")(11,"div",5),S(12,R,3,5,"div",6),d()()()}if(t&2){let i,s=V(a.filter());l(),f("headerTitle",a.PageTitle())("hideSearchBox",!0),l(6),y("date",s.From),l(2),y("date",s.To),l(3),v((i=a.result())!=null&&i.length?12:-1)}},dependencies:[E,N,B],encapsulation:2,changeDetection:0})}}return n})();export{Y as PaymentComponent};
1
+ import{a as W,b as k,c as B}from"./chunk-44GXCX6B.js";import{a as N}from"./chunk-ZLMUYIKY.js";import"./chunk-BGFEVOPZ.js";import{b as E}from"./chunk-636FAHVP.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"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{c as T}from"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as x}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as m,Ic as L,Mc as y,Nc as C,Oc as _,Pc as M,Qc as V,Rc as u,Xb as S,Zb as v,cc as f,dc as r,ec as d,fc as w,gb as l,ha as g,mc as D,oa as c,pa as h,rc as b,tc as F,yb as P}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function R(n,O){if(n&1&&(r(0,"div",6)(1,"div",7),w(2,"app-table-report",8),d()()),n&2){let e=F(),t=u(0);l(2),f("result",e.result())("header",e.header())("from",t.From)("to",t.To)("type",4)}}var Y=(()=>{class n{constructor(){this.http=g(k),this.datePipe=g(x),this.filter=m(new W),this.minDate=m(null),this.result=m([]),this.header=m([]),this.PageTitle=m("Completed");let e=new Date;this.minDate.set(T.addDays(e,6)),this.filter.update(t=>(t.From=e,t.To=e,t)),this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=this.filter(),t=T.formatTitleFromDate(e.From,e.To),a=this.datePipe.transform(e.From,t),i=this.datePipe.transform(e.To,"dd MMM yyyy");this.PageTitle.set(`Completed (${t==null?"":a+"-"} ${i})`)}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter.set(e),this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncPayment(this.filter()).then(e=>{this.header.set(e.Header),this.result.set(e.Body)})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=P({type:n,selectors:[["app-payment"]],decls:13,vars:6,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,a){if(t&1){let i=D();M(0),r(1,"mainpanel",0),b("onSubmit",function(){return c(i),h(a.onFilter())}),r(2,"filters")(3,"div")(4,"label",1),L(5,"From/To"),d(),r(6,"div",2)(7,"datepicker",3),_("dateChange",function(o){c(i);let p=u(0);return C(p.From,o)||(p.From=o),h(o)}),d()(),r(8,"div")(9,"datepicker",4),_("dateChange",function(o){c(i);let p=u(0);return C(p.To,o)||(p.To=o),h(o)}),d()()()(),r(10,"content")(11,"div",5),S(12,R,3,5,"div",6),d()()()}if(t&2){let i,s=V(a.filter());l(),f("headerTitle",a.PageTitle())("hideSearchBox",!0),l(6),y("date",s.From),l(2),y("date",s.To),l(3),v((i=a.result())!=null&&i.length?12:-1)}},dependencies:[E,N,B],encapsulation:2,changeDetection:0})}}return n})();export{Y as PaymentComponent};
@@ -1,3 +1,3 @@
1
- import{a as z,b as q,c as J,d as K,e as Q,f as X}from"./chunk-UASBQJZD.js";import{b as G}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-GAI4CMX3.js";import"./chunk-NCZ46DU6.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as F}from"./chunk-GUIB6IFK.js";import"./chunk-Q3MYZYOB.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as H,h as $,m as W,z as j}from"./chunk-7HUEGPJN.js";import{e as A}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as E,Aa as g,Dc as w,Eb as x,Ec as P,Ic as l,Jc as R,Vc as V,Xb as y,Zb as v,ac as N,bc as T,ca as I,cb as B,cc as m,dc as o,ec as r,fc as h,gb as p,gc as C,ha as b,hc as S,ic as M,mc as _,nc as L,oa as d,pa as u,rc as f,rd as O,sd as U,tc as c,yb as D}from"./chunk-5VYDZBNH.js";import{a as k}from"./chunk-QWWW7GFA.js";var Z=(()=>{class e{constructor(){this.httpService=b(A)}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ne(e,s){if(e&1&&(C(0,"th"),l(1),S()),e&2){let t=s.$implicit;p(),R(t.column)}}function ie(e,s){if(e&1&&(C(0,"td"),M(1,"span",4),S()),e&2){let t=s.$implicit,n=c().$implicit;p(),L("innerHTML",n[t.prop],B)}}function oe(e,s){if(e&1&&(C(0,"tr"),N(1,ie,2,1,"td",null,E),S()),e&2){let t=s.$implicit,n=c();P("background-color",t.Status>200?"#F4D6D5":"#DEE9C9"),p(),T(n.configs())}}var ee=(()=>{class e{constructor(){this.configs=U([]),this.data=U([]),this.status=U(void 0),this.eventClose=O({alias:"onClose"})}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"background-color"],[3,"innerHTML"]],template:function(n,i){n&1&&(C(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),N(4,ne,2,1,"th",null,E),S()(),C(6,"tbody"),N(7,oe,3,2,"tr",3,E),S()()()),n&2&&(p(4),T(i.configs()),p(3),T(i.data()))},encapsulation:2,changeDetection:0})}}return e})();function re(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onNewStepperState(a))}),h(1,"i",18),l(2," New "),r()}}function ae(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t),c();let i=w(11);return u(i.previous())}),l(1," Back "),r()}}function le(e,s){if(e&1){let t=_();o(0,"button",19),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onStepperNext(a))}),l(1," Next "),r()}}function se(e,s){if(e&1){let t=_();o(0,"button",20),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onSubmit(a))}),l(1," Download "),r()}if(e&2){let t=c();m("disabled",!t.urls)}}function pe(e,s){e&1&&(h(0,"i",21),o(1,"span"),l(2,"Instruction"),r())}function ce(e,s){e&1&&(o(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),l(4,"Note"),r()(),o(5,"div",26)(6,"ol",27)(7,"li"),l(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),l(10," Copy Product URL from "),o(11,"a",28),l(12,"https://seller.tokopedia.com/ "),r(),l(13," and paste in this form "),r(),o(14,"li"),l(15," Use New Line when you want to input several product URLs "),r()()()()())}function me(e,s){e&1&&(h(0,"i",29),o(1,"span"),l(2,"Download"),r())}function de(e,s){if(e&1){let t=_();o(0,"div",22)(1,"textarea",30),f("ngModelChange",function(i){d(t);let a=c();return u(a.urls.set(i))}),r()()}if(e&2){let t=c();p(),m("placeholder",t.urlPlaceholder())("ngModel",t.urls())}}function ue(e,s){e&1&&(h(0,"i",31),o(1,"span"),l(2,"Finish"),r())}function _e(e,s){if(e&1&&(o(0,"div",22),h(1,"app-response-api-list",32),r()),e&2){let t=c();p(),m("data",t.downloadResponses())("configs",t.configs)}}function fe(e,s){e&1&&(o(0,"h6"),l(1,"1"),r())}function ge(e,s){e&1&&(o(0,"h6"),l(1,"2"),r())}function he(e,s){e&1&&(o(0,"h6"),l(1,"3"),r())}var Fe=(()=>{class e{constructor(){this.downloadService=b(Z),this.authService=b(F),this.urls=g(null),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=g([]),this.stepperState=g("DOWNLOAD"),this.urlPlaceholder=g(`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
1
+ import{a as z,b as q,c as J,d as K,e as Q,f as X}from"./chunk-UASBQJZD.js";import{b as G}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import"./chunk-GAI4CMX3.js";import"./chunk-NCZ46DU6.js";import"./chunk-JYH45M2L.js";import"./chunk-SOTWA42R.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{f as F}from"./chunk-XUEJETYQ.js";import"./chunk-SD2GVUJO.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import"./chunk-NNVT5X6O.js";import{c as H,h as $,m as W,z as j}from"./chunk-7HUEGPJN.js";import{e as A}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as E,Aa as g,Dc as w,Eb as x,Ec as P,Ic as l,Jc as R,Vc as V,Xb as y,Zb as v,ac as N,bc as T,ca as I,cb as B,cc as m,dc as o,ec as r,fc as h,gb as p,gc as C,ha as b,hc as S,ic as M,mc as _,nc as L,oa as d,pa as u,rc as f,rd as O,sd as U,tc as c,yb as D}from"./chunk-5VYDZBNH.js";import{a as k}from"./chunk-QWWW7GFA.js";var Z=(()=>{class e{constructor(){this.httpService=b(A)}download(t){return this.httpService.post("/api/Product/downloadurl",t)}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275prov=I({token:e,factory:e.\u0275fac,providedIn:"root"})}}return e})();function ne(e,s){if(e&1&&(C(0,"th"),l(1),S()),e&2){let t=s.$implicit;p(),R(t.column)}}function ie(e,s){if(e&1&&(C(0,"td"),M(1,"span",4),S()),e&2){let t=s.$implicit,n=c().$implicit;p(),L("innerHTML",n[t.prop],B)}}function oe(e,s){if(e&1&&(C(0,"tr"),N(1,ie,2,1,"td",null,E),S()),e&2){let t=s.$implicit,n=c();P("background-color",t.Status>200?"#F4D6D5":"#DEE9C9"),p(),T(n.configs())}}var ee=(()=>{class e{constructor(){this.configs=U([]),this.data=U([]),this.status=U(void 0),this.eventClose=O({alias:"onClose"})}onClose(){this.eventClose.emit()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["app-response-api-list"]],inputs:{configs:[1,"configs"],data:[1,"data"],status:[1,"status"]},outputs:{eventClose:"onClose"},decls:9,vars:0,consts:[[1,"table-responsive"],[1,"table"],[1,"thead-light"],[3,"background-color"],[3,"innerHTML"]],template:function(n,i){n&1&&(C(0,"div",0)(1,"table",1)(2,"thead",2)(3,"tr"),N(4,ne,2,1,"th",null,E),S()(),C(6,"tbody"),N(7,oe,3,2,"tr",3,E),S()()()),n&2&&(p(4),T(i.configs()),p(3),T(i.data()))},encapsulation:2,changeDetection:0})}}return e})();function re(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onNewStepperState(a))}),h(1,"i",18),l(2," New "),r()}}function ae(e,s){if(e&1){let t=_();o(0,"button",17),f("click",function(){d(t),c();let i=w(11);return u(i.previous())}),l(1," Back "),r()}}function le(e,s){if(e&1){let t=_();o(0,"button",19),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onStepperNext(a))}),l(1," Next "),r()}}function se(e,s){if(e&1){let t=_();o(0,"button",20),f("click",function(){d(t);let i=c(),a=w(11);return u(i.onSubmit(a))}),l(1," Download "),r()}if(e&2){let t=c();m("disabled",!t.urls)}}function pe(e,s){e&1&&(h(0,"i",21),o(1,"span"),l(2,"Instruction"),r())}function ce(e,s){e&1&&(o(0,"div",22)(1,"div",23)(2,"div",24)(3,"h4",25),l(4,"Note"),r()(),o(5,"div",26)(6,"ol",27)(7,"li"),l(8," Use this form to Download Products from Tokopedia using product URL "),r(),o(9,"li"),l(10," Copy Product URL from "),o(11,"a",28),l(12,"https://seller.tokopedia.com/ "),r(),l(13," and paste in this form "),r(),o(14,"li"),l(15," Use New Line when you want to input several product URLs "),r()()()()())}function me(e,s){e&1&&(h(0,"i",29),o(1,"span"),l(2,"Download"),r())}function de(e,s){if(e&1){let t=_();o(0,"div",22)(1,"textarea",30),f("ngModelChange",function(i){d(t);let a=c();return u(a.urls.set(i))}),r()()}if(e&2){let t=c();p(),m("placeholder",t.urlPlaceholder())("ngModel",t.urls())}}function ue(e,s){e&1&&(h(0,"i",31),o(1,"span"),l(2,"Finish"),r())}function _e(e,s){if(e&1&&(o(0,"div",22),h(1,"app-response-api-list",32),r()),e&2){let t=c();p(),m("data",t.downloadResponses())("configs",t.configs)}}function fe(e,s){e&1&&(o(0,"h6"),l(1,"1"),r())}function ge(e,s){e&1&&(o(0,"h6"),l(1,"2"),r())}function he(e,s){e&1&&(o(0,"h6"),l(1,"3"),r())}var Fe=(()=>{class e{constructor(){this.downloadService=b(Z),this.authService=b(F),this.urls=g(null),this.configs=[{column:"Url",prop:"URL"},{column:"POS",prop:"Name"},{column:"Exception",prop:"Message"}],this.downloadResponses=g([]),this.stepperState=g("DOWNLOAD"),this.urlPlaceholder=g(`https://tokopedia.com/tokoriyanadi/kaos-polos-biru
2
2
  https://tokopedia.com/tokoriyanadi/Celana-Chinos-Coklat`),this.currentDomain=g(this.authService.getDomain())}onStepperChange(t){this.stepperState.set(t.selectedStep.state)}onSubmit(t){let i=(this.urls()??"").split(/\r?\n/).filter(a=>a.trim());this.downloadService.download(i).subscribe(a=>{this.downloadResponses.set(a),this.mappingLinkToProduct(),this.onStepperNext(t)})}mappingLinkToProduct(){let t=this.currentDomain(),n=this.downloadResponses().map(i=>{let a=k({},i);return a.Name=a?.Name?`<a href="${t}/menu/Products/Catalog/Products/Info?ID=${a.ID}" target="_blank">${a?.Name}</a>`:"-",a});this.downloadResponses.set(n)}onNewStepperState(t){this.downloadResponses.set([]),this.urls.set(null),this.stepperState.set("DOWNLOAD"),t.reset(),this.onStepperNext(t)}onStepperNext(t){t.selected.completed=!0,t.next()}static{this.\u0275fac=function(n){return new(n||e)}}static{this.\u0275cmp=D({type:e,selectors:[["app-by-url"]],features:[V([{provide:z,useValue:{displayDefaultIndicatorType:!1}}])],decls:24,vars:11,consts:[["stepper",""],["headerTitle","Tokopedia - Product Download By Url",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"disabled"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-12"],["linear","",1,"stepper-downloadByUrl",3,"selectionChange","selectedIndex"],["state","GUIDE",3,"editable","completed"],["matStepLabel",""],["matStepContent",""],["state","DOWNLOAD",3,"editable","completed"],["state","FINISH"],["matStepperIcon","GUIDE"],["matStepperIcon","DOWNLOAD"],["matStepperIcon","FINISH"],[1,"btn","btn-outline-secondary","btn-fill","btn-lg",3,"click"],["aria-hidden","true",1,"fa","fa-file-alt","me-2"],["type","button",1,"btn","btn-outline-secondary","btn-fill","btn-lg","ms-3",3,"click"],["role","button",1,"btn","btn-success","btn-fill","btn-lg","text-white","ms-3",3,"click","disabled"],[1,"fa-solid","fa-info","me-3"],[1,"mt-8"],[1,"card","border","w-50"],[1,"card-header","py-6"],[1,"text-primary"],[1,"card-body",2,"padding-left","0px"],[1,"mt-6"],["href","https://seller.tokopedia.com","target","_blank"],[1,"fa-solid","fa-download","me-3"],["name","url","cols","30","rows","25",1,"form-control",3,"ngModelChange","placeholder","ngModel"],[1,"fa-sharp","fa-solid","fa-flag","me-3"],["status","error",3,"data","configs"]],template:function(n,i){if(n&1){let a=_();o(0,"mainpanel",1)(1,"actions"),y(2,re,3,0,"button",2),y(3,ae,2,0,"button",2),y(4,le,2,0,"button",3),y(5,se,2,1,"button",4),r(),o(6,"content")(7,"div",5)(8,"div",6)(9,"div",7)(10,"mat-stepper",8,0),f("selectionChange",function(te){return d(a),u(i.onStepperChange(te))}),o(12,"mat-step",9),x(13,pe,3,0,"ng-template",10)(14,ce,16,0,"ng-template",11),r(),o(15,"mat-step",12),x(16,me,3,0,"ng-template",10)(17,de,2,2,"ng-template",11),r(),o(18,"mat-step",13),x(19,ue,3,0,"ng-template",10)(20,_e,2,2,"ng-template",11),r(),x(21,fe,2,0,"ng-template",14)(22,ge,2,0,"ng-template",15)(23,he,2,0,"ng-template",16),r()()()()()()}n&2&&(m("hideSearchBox",!0)("hideSearchDropdown",!0),p(2),v(i.stepperState()=="FINISH"?2:-1),p(),v(i.stepperState()=="DOWNLOAD"?3:-1),p(),v(i.stepperState()=="GUIDE"?4:-1),p(),v(i.stepperState()=="DOWNLOAD"?5:-1),p(5),m("selectedIndex",1),p(2),m("editable",i.stepperState()!="FINISH")("completed",!0),p(3),m("editable",i.stepperState()!="FINISH")("completed",!1))},dependencies:[G,X,Q,q,K,j,H,$,W,ee,J],styles:[`@import"https://fonts.googleapis.com/icon?family=Material+Icons";.card-header{background-color:#00000008}mat-stepper.stepper-downloadByUrl>div.mat-horizontal-stepper-wrapper>div.mat-horizontal-stepper-header-container{position:relative;width:60%;left:18%}
3
3
  `],encapsulation:2,changeDetection:0})}}return e})();export{Fe as ByUrlComponent};
@@ -1 +1 @@
1
- import{a as _}from"./chunk-NCFITFP7.js";import{b as R}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{b}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import{b as C,e as E,g as I}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as x,C as g,D}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Ic as n,Jc as l,Kc as f,Xb as y,Zb as h,cc as S,dc as t,ec as i,ed as d,fd as m,gb as a,gd as s,ha as p,r as v,yb as u}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function M(r,A){if(r&1&&(t(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),n(6,"General"),i()(),t(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),n(12,"Created"),i(),t(13,"div")(14,"span"),n(15),d(16,"date"),i()()()(),t(17,"div",9)(18,"div",10)(19,"label"),n(20,"Duration"),i(),t(21,"div")(22,"span"),n(23),d(24,"number"),i()()()(),t(25,"div",9)(26,"div",10)(27,"label"),n(28,"Response Code"),i(),t(29,"div")(30,"span"),n(31),i()()()()()()()()(),t(32,"div",3)(33,"div",9)(34,"div",5)(35,"div",6)(36,"h5"),n(37,"Request"),i()(),t(38,"div",7)(39,"div",11)(40,"div",12)(41,"pre"),n(42),d(43,"json"),i()()()()()(),t(44,"div",9)(45,"div",5)(46,"div",6)(47,"h5"),n(48,"Response"),i()(),t(49,"div",7)(50,"div",13)(51,"div",12)(52,"pre"),n(53),d(54,"json"),i()()()()()()()()),r&2){let e=A;a(15),l(s(16,5,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),a(8),f("",s(24,8,e==null?null:e.DurationInSecond,"1.1-1")," s"),a(8),l(e==null?null:e.respCode),a(11),l(m(43,11,e==null?null:e.req)),a(11),l(m(54,13,e==null?null:e.res))}}var G=(()=>{class r{constructor(){this.inventoryAsyncServiceLog=p(_),this.activatedRoute=p(C),this.inventoryLog=b(this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(this.activatedRoute.snapshot.queryParams?.ID).pipe(v(e=>{let o=JSON.parse(e.hits[0]._source?.log?.response);return e.hits[0].DurationInSecond=parseInt(o.Duration)/1e3,e.hits[0].respCode=o?.StatusCode,e.hits[0].req=JSON.parse(e.hits[0]._source?.log?.request),e.hits[0].res=o,e?.hits[0]})),{initialValue:null})}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=u({type:r,selectors:[["app-inventory-async-detail"]],decls:6,vars:3,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[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,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(o,L){if(o&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content"),y(5,M,55,15,"div",2),i()()),o&2){let c;S("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),h((c=L.inventoryLog())?5:-1,c)}},dependencies:[R,I,E,x,D,g],encapsulation:2,changeDetection:0})}}return r})();export{G as InventoryAsyncDetailComponent};
1
+ import{a as _}from"./chunk-NCFITFP7.js";import{b as R}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import"./chunk-CBPURQKN.js";import{b}from"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import{b as C,e as E,g as I}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as x,C as g,D}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Ic as n,Jc as l,Kc as f,Xb as y,Zb as h,cc as S,dc as t,ec as i,ed as d,fd as m,gb as a,gd as s,ha as p,r as v,yb as u}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function M(r,A){if(r&1&&(t(0,"div",2)(1,"div",3)(2,"div",4)(3,"div",5)(4,"div",6)(5,"h5"),n(6,"General"),i()(),t(7,"div",7)(8,"div",8)(9,"div",9)(10,"div",10)(11,"label"),n(12,"Created"),i(),t(13,"div")(14,"span"),n(15),d(16,"date"),i()()()(),t(17,"div",9)(18,"div",10)(19,"label"),n(20,"Duration"),i(),t(21,"div")(22,"span"),n(23),d(24,"number"),i()()()(),t(25,"div",9)(26,"div",10)(27,"label"),n(28,"Response Code"),i(),t(29,"div")(30,"span"),n(31),i()()()()()()()()(),t(32,"div",3)(33,"div",9)(34,"div",5)(35,"div",6)(36,"h5"),n(37,"Request"),i()(),t(38,"div",7)(39,"div",11)(40,"div",12)(41,"pre"),n(42),d(43,"json"),i()()()()()(),t(44,"div",9)(45,"div",5)(46,"div",6)(47,"h5"),n(48,"Response"),i()(),t(49,"div",7)(50,"div",13)(51,"div",12)(52,"pre"),n(53),d(54,"json"),i()()()()()()()()),r&2){let e=A;a(15),l(s(16,5,e==null?null:e._source["@timestamp"],"dd MMM yyyy HH:mm:ss")),a(8),f("",s(24,8,e==null?null:e.DurationInSecond,"1.1-1")," s"),a(8),l(e==null?null:e.respCode),a(11),l(m(43,11,e==null?null:e.req)),a(11),l(m(54,13,e==null?null:e.res))}}var G=(()=>{class r{constructor(){this.inventoryAsyncServiceLog=p(_),this.activatedRoute=p(C),this.inventoryLog=b(this.inventoryAsyncServiceLog.getInventoryAsyncLogDetail(this.activatedRoute.snapshot.queryParams?.ID).pipe(v(e=>{let o=JSON.parse(e.hits[0]._source?.log?.response);return e.hits[0].DurationInSecond=parseInt(o.Duration)/1e3,e.hits[0].respCode=o?.StatusCode,e.hits[0].req=JSON.parse(e.hits[0]._source?.log?.request),e.hits[0].res=o,e?.hits[0]})),{initialValue:null})}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=u({type:r,selectors:[["app-inventory-async-detail"]],decls:6,vars:3,consts:[["headerTitle","Product Inventory Sync Detail",3,"hideSearchBox","hideSearchDropdown"],["role","button","routerLink","/menu/log/inventory",1,"btn","btn-secondary","btn-fill","btn-lg","me-2"],[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,"col-sm-12"],[1,"form-group"],[1,"col-sm-12","mt-2"]],template:function(o,L){if(o&1&&(t(0,"mainpanel",0)(1,"actions")(2,"a",1),n(3,"Back"),i()(),t(4,"content"),y(5,M,55,15,"div",2),i()()),o&2){let c;S("hideSearchBox",!0)("hideSearchDropdown",!0),a(5),h((c=L.inventoryLog())?5:-1,c)}},dependencies:[R,I,E,x,D,g],encapsulation:2,changeDetection:0})}}return r})();export{G as InventoryAsyncDetailComponent};
@@ -1 +1 @@
1
- import{a as E}from"./chunk-QNSVLW6H.js";import{a as F}from"./chunk-HCXG5A7G.js";import{f as T}from"./chunk-GUIB6IFK.js";import{a as w}from"./chunk-63X2BBS4.js";import{b as i,c as m}from"./chunk-NNVT5X6O.js";import{b as j,e as s}from"./chunk-ZE4OOGMT.js";import{d as D}from"./chunk-56N77BXA.js";import{Aa as C,C as I,F as u,ca as c,e as b,ha as a,l as d,r as A,x as U}from"./chunk-5VYDZBNH.js";var x=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({name:e.name,options:e.options}))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var R=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var S=class{};var V=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/ShopifyV2/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var N=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(w.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Mt=(()=>{class r{constructor(){this.authService=a(T),this.productService=a(F),this.shoppeUploadService=a(x),this.tiktokUploadService=a(H),this.lazadaUploadService=a(z),this.tokopediaUploadService=a(V),this.wooUploadService=a(R),this.shopifyUploadService=a(G),this.plugoUploadService=a(N),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(D),this.httpService=a(s),this._selectedProduct=new b(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(I(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return C(t.map(o=>{let p=new g;return p.id=o.ID,p.name=o.Name,p.type=o.TypeID,p.categoryId=null,p.attributes=[],p.selected=!1,p}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.ShopifyV2||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);U(e).pipe(A(o=>{let p=[];return o.filter(h=>m.IsNotEmpty(h)).forEach(h=>{p=[...p,...h]}),p})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],p=[],h=[],v=[],y=[],P=[],k=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:p.push(l);break;case i.Tokopedia:h.push(l);break;case i.WooCommerce:v.push(l);break;case i.Shopify:y.push(l);break;case i.ShopifyV2:P.push(l);break;case i.Plugo:k.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:p},{type:i.Tokopedia,data:h},{type:i.WooCommerce,data:v},{type:i.Shopify,data:y},{type:i.ShopifyV2,data:P},{type:i.Plugo,data:k}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(p));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(h));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(v));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.ShopifyV2:n.push(this.shopifyUploadService.uploadProduct(P));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(k));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let p=new S;p.ChannelID=o.id,p.ChannelType=o.type,p.Products=this._selectedProduct.getValue(),o.type==i.Shopify||o.type==i.ShopifyV2?delete p.CategoryID:p.CategoryID=o.categoryId,p=this.generateAttributeHttpRequest(o,p),e.push(p)}),e}generateAttributeHttpRequest(t,e){return t.type==i.WooCommerce||t.type==i.Shopify||t.type==i.ShopifyV2?e.Attribute=t.attributes[0]:t.type==i.Tiktok?(e.Attributes=this.formatAttributes(t.type,t.attributes),e.listing_platforms=t.listing_platforms):e.Attributes=this.formatAttributes(t.type,t.attributes),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Lazada:o=this.lazadaUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;case i.ShopifyV2:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{x as a,H as b,z as c,R as d,Mt as e};
1
+ import{a as E}from"./chunk-QNSVLW6H.js";import{a as F}from"./chunk-PEBZF2VL.js";import{f as T}from"./chunk-XUEJETYQ.js";import{a as w}from"./chunk-63X2BBS4.js";import{b as i,c as m}from"./chunk-NNVT5X6O.js";import{b as j,e as s}from"./chunk-ZE4OOGMT.js";import{d as D}from"./chunk-56N77BXA.js";import{Aa as C,C as I,F as u,ca as c,e as b,ha as a,l as d,r as A,x as U}from"./chunk-5VYDZBNH.js";var x=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/shopee/GetAttributesTree",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/shopee/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/shopee/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({attribute_id:e.attribute_id,attribute_value_list:e.attribute_value_list.map(o=>({value_id:o.value_id,name:o.name}))})),t}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var H=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tiktok/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tiktok/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){let e;return t.map(o=>(o.type=="PRODUCT_PROPERTY"?e={id:o.id,name:o.name,type:o.type,values:o.values}:e={id:o.id,name:o.values[0].id,type:o.type},e))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var z=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/lazada/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/lazada/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/lazada/AddProduct",t).pipe(u(o=>d(null)))}generateAttribute(t){return t.map(e=>({name:e.name,options:e.options}))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var R=(()=>{class r{constructor(){this.httpService=a(s)}getAttributes(t,e){return this.httpService.get("api/product/woo/GetAttributes",[{key:"ID",value:t},{key:"CategoryID",value:e}])}getCategories(t){return this.httpService.get("api/product/woo/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/woo/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var g=class{};var S=class{};var V=(()=>{class r{constructor(){this.httpService=a(s)}getCategories(t){return this.httpService.get("api/product/tokopedia/GetCategories",[{key:"ID",value:t}])}uploadProduct(t){return this.httpService.post("api/product/tokopedia/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var G=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post("api/product/ShopifyV2/AddProduct",t).pipe(u(o=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var N=(()=>{class r{constructor(){this.httpService=a(s)}uploadProduct(t){return this.httpService.post(w.UploadPlugoProduct,t).pipe(u(e=>d(null)))}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();var Mt=(()=>{class r{constructor(){this.authService=a(T),this.productService=a(F),this.shoppeUploadService=a(x),this.tiktokUploadService=a(H),this.lazadaUploadService=a(z),this.tokopediaUploadService=a(V),this.wooUploadService=a(R),this.shopifyUploadService=a(G),this.plugoUploadService=a(N),this.toastrHandlingService=a(E),this.toastr=a(j),this.router=a(D),this.httpService=a(s),this._selectedProduct=new b(this.getStoredProducts()),this.selectedProduct$=this._selectedProduct.asObservable().pipe(I(t=>t&&t.length>0))}getStoredProducts(){let t=localStorage.getItem("productsUpload");if(t){let e=JSON.parse(t);return e&&e.length>0?e:[]}else return[]}setSelectedProduct(t){localStorage.setItem("productsUpload",JSON.stringify(t)),this._selectedProduct.next(t)}clearSelectedProduct(){localStorage.removeItem("productsUpload"),this._selectedProduct.next([])}getUnselectedChannels(){let t=this.authService.getChannels(),e=this._selectedProduct.getValue();return this.productService.filterUnselectedChannel(e,t)}getDefaultCategory(){return this.httpService.get("api/v1/Channel/ProductCategory/Default")}get channelProductUpload(){let t=this.getUnselectedChannels();return C(t.map(o=>{let p=new g;return p.id=o.ID,p.name=o.Name,p.type=o.TypeID,p.categoryId=null,p.attributes=[],p.selected=!1,p}))}onUploadProduct(t){let e=t.filter(o=>o.selected&&m.IsNotEmpty(o.categoryId)||o.selected&&(o.type==i.Shopify||o.type==i.ShopifyV2||o.type==i.Plugo));if(e.length>0){let o=this.generateDataForUpload(e);this.uploadProduct(o)}else this.toastr.warning("Please select a channel and category to upload the product.","Warning!")}uploadProduct(t){let e=this.generateObservableForUpload(t);U(e).pipe(A(o=>{let p=[];return o.filter(h=>m.IsNotEmpty(h)).forEach(h=>{p=[...p,...h]}),p})).subscribe({next:(o=[])=>{m.IsNotEmpty(o)&&this.toastrHandlingService.showToastrUploadMultiple(o),this.hasSuccessRes(o)&&this.onSuccessUpload()}})}hasSuccessRes(t){let e=!1;return t.forEach(o=>{o?.Response.Success_list?.length>0&&m.IsNotEmpty(o)&&(e=!0)}),e}onSuccessUpload(){this.router.navigate(["/menu/products/status/sold-in-channel"]),this.clearSelectedProduct()}generateObservableForUpload(t){let e=[],o=[],p=[],h=[],v=[],y=[],P=[],k=[];t.forEach(l=>{switch(l.ChannelType){case i.Shopee:o.push(l);break;case i.Tiktok:e.push(l);break;case i.Lazada:p.push(l);break;case i.Tokopedia:h.push(l);break;case i.WooCommerce:v.push(l);break;case i.Shopify:y.push(l);break;case i.ShopifyV2:P.push(l);break;case i.Plugo:k.push(l);break}});let n=[];return[{type:i.Shopee,data:o},{type:i.Tiktok,data:e},{type:i.Lazada,data:p},{type:i.Tokopedia,data:h},{type:i.WooCommerce,data:v},{type:i.Shopify,data:y},{type:i.ShopifyV2,data:P},{type:i.Plugo,data:k}].filter(l=>l.data.length>0).forEach(l=>{switch(l.type){case i.Shopee:n.push(this.shoppeUploadService.uploadProduct(o));break;case i.Tiktok:n.push(this.tiktokUploadService.uploadProduct(e));break;case i.Lazada:n.push(this.lazadaUploadService.uploadProduct(p));break;case i.Tokopedia:n.push(this.tokopediaUploadService.uploadProduct(h));break;case i.WooCommerce:n.push(this.wooUploadService.uploadProduct(v));break;case i.Shopify:n.push(this.shopifyUploadService.uploadProduct(y));break;case i.ShopifyV2:n.push(this.shopifyUploadService.uploadProduct(P));break;case i.Plugo:n.push(this.plugoUploadService.uploadProduct(k));break}}),n}generateDataForUpload(t){let e=[];return t.forEach(o=>{let p=new S;p.ChannelID=o.id,p.ChannelType=o.type,p.Products=this._selectedProduct.getValue(),o.type==i.Shopify||o.type==i.ShopifyV2?delete p.CategoryID:p.CategoryID=o.categoryId,p=this.generateAttributeHttpRequest(o,p),e.push(p)}),e}generateAttributeHttpRequest(t,e){return t.type==i.WooCommerce||t.type==i.Shopify||t.type==i.ShopifyV2?e.Attribute=t.attributes[0]:t.type==i.Tiktok?(e.Attributes=this.formatAttributes(t.type,t.attributes),e.listing_platforms=t.listing_platforms):e.Attributes=this.formatAttributes(t.type,t.attributes),e}formatAttributes(t,e){let o;switch(t){case i.Shopee:o=this.shoppeUploadService.generateAttribute(e);break;case i.Tiktok:o=this.tiktokUploadService.generateAttribute(e);break;case i.WooCommerce:o=this.tiktokUploadService.generateAttribute(e);break;case i.Lazada:o=this.lazadaUploadService.generateAttribute(e);break;case i.Tokopedia:o=e;break;case i.Shopify:o=e;break;case i.ShopifyV2:o=e;break;default:o=[];break}return o}static{this.\u0275fac=function(e){return new(e||r)}}static{this.\u0275prov=c({token:r,factory:r.\u0275fac,providedIn:"root"})}}return r})();export{x as a,H as b,z as c,R as d,Mt as e};
@@ -1 +1 @@
1
- import{a as ge}from"./chunk-QUXL7TBO.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{a as me}from"./chunk-7KG3DC5J.js";import{a as ue}from"./chunk-PGDBJOSL.js";import{a as pe}from"./chunk-VYXSV6K4.js";import{a as se}from"./chunk-EYHQ2ZKL.js";import{a as E}from"./chunk-HCXG5A7G.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-LF6LYX25.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as ce}from"./chunk-XV36IYPC.js";import"./chunk-7BDGR7WQ.js";import{a as oe,b as ae,c as re,g as I,h as le,i as B,j as de}from"./chunk-TFTF5VH3.js";import{a as ie}from"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import"./chunk-KFJBIBDQ.js";import{b as ne}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-GUIB6IFK.js";import"./chunk-Q3MYZYOB.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{c as P}from"./chunk-NNVT5X6O.js";import{h as ee,m as te,z as F}from"./chunk-7HUEGPJN.js";import{b as Q,e as X}from"./chunk-ZE4OOGMT.js";import{e as Y}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{D as q,F as K,L as J}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as T,Aa as x,Fc as V,Ic as d,Jc as D,Kc as k,Lc as j,Mc as $,Nc as Z,Oc as z,Pc as A,Qc as G,Rb as N,Rc as W,Xb as g,Zb as h,_b as U,ac as y,bc as w,cc as m,db as L,dc as a,ec as r,ed as R,fc as u,fd as O,gb as o,ha as s,mc as M,oa as _,pa as v,rc as C,sd as S,tc as p,yb as b,yd as H}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var Ce=(()=>{class i{constructor(){this.data=s(ae),this.dialogRef=s(oe),this.modalConfig=x(new B)}ngOnInit(){let e=new B;e.title="Delete Variant",e.okText="Delete",e.cancelText="Cancel",e.headerType=le.Error,e.customWidth="450px",this.modalConfig.set(e)}onConfirm(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-modal-confirm-delete"]],decls:10,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],["content","",1,"p-3"]],template:function(t,n){t&1&&(a(0,"modal-material",0),C("onOk",function(){return n.onConfirm()})("onCancel",function(){return n.onCancel()})("onClose",function(){return n.onCancel()}),a(1,"div",1)(2,"p"),d(3,"Are you sure to delete Variant "),a(4,"strong"),d(5),r(),d(6," from Product "),a(7,"strong"),d(8),r(),d(9,"?"),r()()()),t&2&&(m("config",n.modalConfig()),o(5),D(n.data==null?null:n.data.variantName),o(3),D(n.data==null?null:n.data.productName))},dependencies:[K,I,de],styles:[".modal-material mat-dialog-actions{margin-top:0!important}"]})}}return i})();function _e(i,c){if(i&1){let e=M();a(0,"img",15),C("click",function(n){_(e);let l=p();return v(l.onZoomImage(n))}),r()}if(i&2){let e=p();m("ngSrc",e.image)("fill",!0)}}function ve(i,c){i&1&&u(0,"img",7),i&2&&m("fill",!0)}function xe(i,c){if(i&1&&(a(0,"div",10),u(1,"i",16),a(2,"span"),d(3),r()()),i&2){let e=p();o(3),D(e.code)}}function be(i,c){if(i&1&&(a(0,"div",11),d(1),R(2,"number"),r()),i&2){let e=p();o(),k("",O(2,1,e.totalChannel())," Listing")}}function De(i,c){if(i&1&&(a(0,"div",23),d(1),R(2,"number"),r()),i&2){p();let e=W(7);o(),k(" (",O(2,1,e)," Listing) ")}}function Se(i,c){if(i&1){let e=M();a(0,"div",27)(1,"div",28),d(2),r(),a(3,"div",29)(4,"a",30),u(5,"i",31),r(),a(6,"a",32),C("click",function(){let n=_(e).$implicit,l=p(2);return v(l.onDeleteVariant(n.ID,n.Name))}),u(7,"i",33),r()()()}if(i&2){let e=c.$implicit,t=c.$index,n=p().$implicit;V("border-bottom",t!==(n==null?null:n.Variants.length)-1),o(2),j(" ",e.ProductName," - ",e.Name," "),o(2),m("href",e.URL,L)}}function ye(i,c){if(i&1&&(a(0,"div",17)(1,"h2",18)(2,"button",19)(3,"div",20),u(4,"img",21),a(5,"span",22),d(6),r(),A(7),g(8,De,3,3,"div",23),r()()(),a(9,"div",24)(10,"div",25),y(11,Se,8,5,"div",26,U),r()()()),i&2){let e,t=c.$implicit,n=c.$index,l=p();V("border-bottom-0",l.channels().length-1==n),o(),m("id","heading"+n+l.id()),o(),N("data-bs-target","#collapse"+n+l.id())("aria-controls","#collapse"+n+l.id()),o(2),m("src",l.getChannelLogo(t.TypeID),L),o(),m("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),o(),D(t==null?null:t.ChannelName),o();let f=G(t==null||t.Variants==null?null:t.Variants.length);o(),h(f>1&&((e=l.channels())==null?null:e.length)>1?8:-1),o(),m("id","collapse"+n+l.id()),N("aria-labelledby","heading"+n+l.id()),o(2),w(t==null?null:t.Variants)}}var fe=(()=>{class i{constructor(){this.biggerPictureService=s(pe),this.productService=s(E),this.cdr=s(H),this.toastr=s(Q),this.dialog=s(re),this.totalChannel=S(0),this.imageForZoom=S(void 0),this.title=S(void 0),this.channels=S(void 0),this.id=S(void 0)}getChannelLogo(e){return P.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom())}onDeleteVariant(e,t){this.dialog.open(Ce,{data:{variantName:t,productName:this.title()}}).afterClosed().subscribe(l=>{l&&this.productService.deleteSingleVariantID(e).subscribe({next:()=>{this.toastr.success(`Variant "${t}" has been deleted successfully.`,"Deleted"),setTimeout(()=>window.location.reload(),1500)},error:()=>{this.toastr.error(`Failed to delete variant "${t}". Please try again.`,"Error")}})})}updateTotalChannel(){this.cdr.markForCheck()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"border-bottom-0"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"border-bottom"],[1,"d-flex","justify-content-between","align-items-center","py-4"],[1,"text-ellipsis"],[1,"d-flex","align-items-center","gap-3"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],["href","javascript:void(0)","title","Delete variant",1,"text-danger",3,"click"],[1,"fa-solid","fa-trash-can"]],template:function(t,n){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),g(6,_e,1,2,"img",6)(7,ve,1,1,"img",7),r()()(),a(8,"div",8)(9,"h4",9),d(10),r(),g(11,xe,4,1,"div",10),g(12,be,3,3,"div",11),r()()(),a(13,"div",12)(14,"div",13),y(15,ye,13,12,"div",14,T),r()()()),t&2&&(o(6),h(n.image?6:7),o(4),k(" ",n.title()," "),o(),h(n.code?11:-1),o(),h(n.totalChannel()?12:-1),o(3),w(n.channels()))},dependencies:[F,ie,ne,I,J,q],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`],changeDetection:0})}}return i})();function we(i,c){if(i&1&&(a(0,"div",8),u(1,"app-duplicate-product-card",11),r()),i&2){let e=c.$implicit,t=c.$index;o(),m("imageForZoom",e.ImageUrl)("title",e.Name)("code",e.Code)("id",t)("image",e.ThumbnailURL)("channels",e.Channels)("totalChannel",e.Total)}}function Me(i,c){i&1&&(a(0,"div",9),u(1,"app-empty-state"),r())}function Pe(i,c){if(i&1){let e=M();a(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),C("next",function(){_(e);let n=p();return v(n.getProducts())})("previous",function(){_(e);let n=p();return v(n.getProducts())})("total",function(){_(e);let n=p();return v(n.getRowCount())}),r()()()}if(i&2){let e,t=p();o(2),m("filter",t.searchFilter())("totaldata",(e=t.products())==null?null:e.length)("paginationTotal",t.rowCount())("hasClicked",t.hasClickedRowCount())}}var ut=(()=>{class i{constructor(){this.httpService=s(X),this.productService=s(E),this.searchFilter=x(new me),this.products=x([]),this.rowCount=x(0),this.hasClickedRowCount=x(!1),this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(t=>(t.PageSize=e.Filter.RowCount,t)),this.getProducts()})}getProducts(){let e={ListChannelID:this.searchFilter().ListChannelID,RowCount:this.searchFilter().RowCount,PageNumber:this.searchFilter().PageNumber,text:this.searchFilter().text};this.httpService.post("/api/product/GetDuplicateInChannel",e).subscribe(t=>{this.products.set(t.Data)})}onSearch(e){this.searchFilter.update(t=>(t.text=e,t)),this.hasClickedRowCount.set(!1),this.getProducts()}onClearFilter(){this.searchFilter.update(e=>(e.ChannelID=P.GuidEMpty,e))}getChannelLogo(e){return P.getChannelLogoByTypeId(e)}getRowCount(){let e={text:this.searchFilter().text,ChannelID:this.searchFilter().ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",e).subscribe(t=>{this.hasClickedRowCount.set(!0),this.rowCount.set(t.Total)})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[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"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,n){if(t&1&&(a(0,"mainpanel",0),C("onSubmit",function(f){return n.onSearch(f)}),a(1,"actions")(2,"a",1),u(3,"i",2),a(4,"span"),d(5,"Table View"),r()()(),a(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),d(10,"Channel"),r(),a(11,"app-channel-options-v2",5),z("ngModelChange",function(f){return Z(n.searchFilter().ListChannelID,f)||(n.searchFilter().ListChannelID=f),f}),r()()()(),a(12,"content")(13,"div",6)(14,"div",7),y(15,we,2,7,"div",8,T),g(17,Me,2,0,"div",9),r(),g(18,Pe,3,4,"div",10),r()()()),t&2){let l;o(11),m("multiple",!0),$("ngModel",n.searchFilter().ListChannelID),o(4),w(n.products()),o(2),h(n.products().length==0?17:-1),o(),h(((l=n.products())==null?null:l.length)>0?18:-1)}},dependencies:[ce,Y,ge,F,ee,te,fe,se,ue],encapsulation:2,changeDetection:0})}}return i})();export{ut as DuplicateSkuComponent};
1
+ import{a as ge}from"./chunk-6MTRE22X.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{a as me}from"./chunk-7KG3DC5J.js";import{a as ue}from"./chunk-PGDBJOSL.js";import{a as pe}from"./chunk-VYXSV6K4.js";import{a as se}from"./chunk-EYHQ2ZKL.js";import{a as E}from"./chunk-PEBZF2VL.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-QN2XB2TS.js";import"./chunk-BGFEVOPZ.js";import"./chunk-HY5QRLIV.js";import"./chunk-AWU3GJLO.js";import"./chunk-KRIYDIQQ.js";import{b as ce}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import{a as oe,b as ae,c as re,g as I,h as le,i as B,j as de}from"./chunk-TFTF5VH3.js";import{a as ie}from"./chunk-CBPURQKN.js";import"./chunk-7LEHDN2Q.js";import"./chunk-KFJBIBDQ.js";import{b as ne}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-XUEJETYQ.js";import"./chunk-SD2GVUJO.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{c as P}from"./chunk-NNVT5X6O.js";import{h as ee,m as te,z as F}from"./chunk-7HUEGPJN.js";import{b as Q,e as X}from"./chunk-ZE4OOGMT.js";import{e as Y}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{D as q,F as K,L as J}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{$b as T,Aa as x,Fc as V,Ic as d,Jc as D,Kc as k,Lc as j,Mc as $,Nc as Z,Oc as z,Pc as A,Qc as G,Rb as N,Rc as W,Xb as g,Zb as h,_b as U,ac as y,bc as w,cc as m,db as L,dc as a,ec as r,ed as R,fc as u,fd as O,gb as o,ha as s,mc as M,oa as _,pa as v,rc as C,sd as S,tc as p,yb as b,yd as H}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var Ce=(()=>{class i{constructor(){this.data=s(ae),this.dialogRef=s(oe),this.modalConfig=x(new B)}ngOnInit(){let e=new B;e.title="Delete Variant",e.okText="Delete",e.cancelText="Cancel",e.headerType=le.Error,e.customWidth="450px",this.modalConfig.set(e)}onConfirm(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-modal-confirm-delete"]],decls:10,vars:3,consts:[[3,"onOk","onCancel","onClose","config"],["content","",1,"p-3"]],template:function(t,n){t&1&&(a(0,"modal-material",0),C("onOk",function(){return n.onConfirm()})("onCancel",function(){return n.onCancel()})("onClose",function(){return n.onCancel()}),a(1,"div",1)(2,"p"),d(3,"Are you sure to delete Variant "),a(4,"strong"),d(5),r(),d(6," from Product "),a(7,"strong"),d(8),r(),d(9,"?"),r()()()),t&2&&(m("config",n.modalConfig()),o(5),D(n.data==null?null:n.data.variantName),o(3),D(n.data==null?null:n.data.productName))},dependencies:[K,I,de],styles:[".modal-material mat-dialog-actions{margin-top:0!important}"]})}}return i})();function _e(i,c){if(i&1){let e=M();a(0,"img",15),C("click",function(n){_(e);let l=p();return v(l.onZoomImage(n))}),r()}if(i&2){let e=p();m("ngSrc",e.image)("fill",!0)}}function ve(i,c){i&1&&u(0,"img",7),i&2&&m("fill",!0)}function xe(i,c){if(i&1&&(a(0,"div",10),u(1,"i",16),a(2,"span"),d(3),r()()),i&2){let e=p();o(3),D(e.code)}}function be(i,c){if(i&1&&(a(0,"div",11),d(1),R(2,"number"),r()),i&2){let e=p();o(),k("",O(2,1,e.totalChannel())," Listing")}}function De(i,c){if(i&1&&(a(0,"div",23),d(1),R(2,"number"),r()),i&2){p();let e=W(7);o(),k(" (",O(2,1,e)," Listing) ")}}function Se(i,c){if(i&1){let e=M();a(0,"div",27)(1,"div",28),d(2),r(),a(3,"div",29)(4,"a",30),u(5,"i",31),r(),a(6,"a",32),C("click",function(){let n=_(e).$implicit,l=p(2);return v(l.onDeleteVariant(n.ID,n.Name))}),u(7,"i",33),r()()()}if(i&2){let e=c.$implicit,t=c.$index,n=p().$implicit;V("border-bottom",t!==(n==null?null:n.Variants.length)-1),o(2),j(" ",e.ProductName," - ",e.Name," "),o(2),m("href",e.URL,L)}}function ye(i,c){if(i&1&&(a(0,"div",17)(1,"h2",18)(2,"button",19)(3,"div",20),u(4,"img",21),a(5,"span",22),d(6),r(),A(7),g(8,De,3,3,"div",23),r()()(),a(9,"div",24)(10,"div",25),y(11,Se,8,5,"div",26,U),r()()()),i&2){let e,t=c.$implicit,n=c.$index,l=p();V("border-bottom-0",l.channels().length-1==n),o(),m("id","heading"+n+l.id()),o(),N("data-bs-target","#collapse"+n+l.id())("aria-controls","#collapse"+n+l.id()),o(2),m("src",l.getChannelLogo(t.TypeID),L),o(),m("matTooltip",(t==null||t.ChannelName==null?null:t.ChannelName.length)>30?t==null?null:t.ChannelName:""),o(),D(t==null?null:t.ChannelName),o();let f=G(t==null||t.Variants==null?null:t.Variants.length);o(),h(f>1&&((e=l.channels())==null?null:e.length)>1?8:-1),o(),m("id","collapse"+n+l.id()),N("aria-labelledby","heading"+n+l.id()),o(2),w(t==null?null:t.Variants)}}var fe=(()=>{class i{constructor(){this.biggerPictureService=s(pe),this.productService=s(E),this.cdr=s(H),this.toastr=s(Q),this.dialog=s(re),this.totalChannel=S(0),this.imageForZoom=S(void 0),this.title=S(void 0),this.channels=S(void 0),this.id=S(void 0)}getChannelLogo(e){return P.getChannelLogoByTypeId(e)}onZoomImage(e){this.biggerPictureService.openBiggerPicture(e,this.imageForZoom())}onDeleteVariant(e,t){this.dialog.open(Ce,{data:{variantName:t,productName:this.title()}}).afterClosed().subscribe(l=>{l&&this.productService.deleteSingleVariantID(e).subscribe({next:()=>{this.toastr.success(`Variant "${t}" has been deleted successfully.`,"Deleted"),setTimeout(()=>window.location.reload(),1500)},error:()=>{this.toastr.error(`Failed to delete variant "${t}". Please try again.`,"Error")}})})}updateTotalChannel(){this.cdr.markForCheck()}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-duplicate-product-card"]],inputs:{image:"image",code:"code",totalChannel:[1,"totalChannel"],imageForZoom:[1,"imageForZoom"],title:[1,"title"],channels:[1,"channels"],id:[1,"id"]},decls:17,vars:4,consts:[[1,"card"],[1,"card-body","py-6"],[1,"row"],[1,"col-4"],[1,"productUpload_defaultSize","me-2","image-upload"],[1,"imgContainer"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"ngSrc","fill"],["ngSrc","//res.cloudinary.com/pos/image/upload/w_110/POS/Images/Icon/products_thumb.png",1,"rounded","float-left","imgUpload",3,"fill"],[1,"col-8","d-inline-block","justify-content-between","gx-0",2,"padding-left","0px"],[1,"itemTitle"],[1,"description"],[1,"fs-5"],[1,"card-footer",2,"padding-left","0px","padding-right","0px"],["id","accordionParent",1,"accordion","accordion-flush"],[1,"accordion-item","border-start-0","border-end-0",3,"border-bottom-0"],[1,"rounded","imgUpload","float-left","cursor-pointer",3,"click","ngSrc","fill"],[1,"fa","fa-barcode","me-2"],[1,"accordion-item","border-start-0","border-end-0"],[1,"accordion-header",3,"id"],["type","button","data-bs-toggle","collapse","aria-expanded","true",1,"accordion-button","collapsed",2,"height","40px"],[1,"d-flex","align-items-center","justify-content-start","w-100"],["alt","",1,"channel-logo",3,"src"],[1,"fs-4","ps-4","text-ellipsis",2,"max-width","13vw",3,"matTooltip"],[1,"fs-4","ms-2"],["data-bs-parent","#accordionParent",1,"accordion-collapse","collapse",3,"id"],[1,"accordion-body",2,"padding-top","0px","padding-bottom","0px"],[1,"d-flex","justify-content-between","align-items-center","py-4",3,"border-bottom"],[1,"d-flex","justify-content-between","align-items-center","py-4"],[1,"text-ellipsis"],[1,"d-flex","align-items-center","gap-3"],["target","_blank",1,"text-secondary",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],["href","javascript:void(0)","title","Delete variant",1,"text-danger",3,"click"],[1,"fa-solid","fa-trash-can"]],template:function(t,n){t&1&&(a(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3)(4,"div",4)(5,"div",5),g(6,_e,1,2,"img",6)(7,ve,1,1,"img",7),r()()(),a(8,"div",8)(9,"h4",9),d(10),r(),g(11,xe,4,1,"div",10),g(12,be,3,3,"div",11),r()()(),a(13,"div",12)(14,"div",13),y(15,ye,13,12,"div",14,T),r()()()),t&2&&(o(6),h(n.image?6:7),o(4),k(" ",n.title()," "),o(),h(n.code?11:-1),o(),h(n.totalChannel()?12:-1),o(3),w(n.channels()))},dependencies:[F,ie,ne,I,J,q],styles:[`.productUpload_defaultSize[_ngcontent-%COMP%]{max-width:100px!important;max-height:100px!important;width:auto!important;height:auto!important}.image-upload[_ngcontent-%COMP%]{position:relative}.imgContainer[_ngcontent-%COMP%]{width:100%;height:100px}.imgUpload[_ngcontent-%COMP%]{width:100%;height:100%;object-fit:scale-down}.channel-logo[_ngcontent-%COMP%]{width:18px;height:18px}.accordion-button[_ngcontent-%COMP%]{background-color:#ededed69!important}.accordion-button[_ngcontent-%COMP%]:not(.collapsed){background-color:#ededed69!important;color:#333}.accordion-button[_ngcontent-%COMP%]:after{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23333333'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e")}.accordion-button[_ngcontent-%COMP%]:focus{box-shadow:none!important}.card[_ngcontent-%COMP%]{margin-bottom:0!important}`],changeDetection:0})}}return i})();function we(i,c){if(i&1&&(a(0,"div",8),u(1,"app-duplicate-product-card",11),r()),i&2){let e=c.$implicit,t=c.$index;o(),m("imageForZoom",e.ImageUrl)("title",e.Name)("code",e.Code)("id",t)("image",e.ThumbnailURL)("channels",e.Channels)("totalChannel",e.Total)}}function Me(i,c){i&1&&(a(0,"div",9),u(1,"app-empty-state"),r())}function Pe(i,c){if(i&1){let e=M();a(0,"div",10)(1,"div",12)(2,"app-custom-paginator",13),C("next",function(){_(e);let n=p();return v(n.getProducts())})("previous",function(){_(e);let n=p();return v(n.getProducts())})("total",function(){_(e);let n=p();return v(n.getRowCount())}),r()()()}if(i&2){let e,t=p();o(2),m("filter",t.searchFilter())("totaldata",(e=t.products())==null?null:e.length)("paginationTotal",t.rowCount())("hasClicked",t.hasClickedRowCount())}}var ut=(()=>{class i{constructor(){this.httpService=s(X),this.productService=s(E),this.searchFilter=x(new me),this.products=x([]),this.rowCount=x(0),this.hasClickedRowCount=x(!1),this.getPageLoader()}getPageLoader(){this.productService.loader().subscribe(e=>{this.searchFilter.set(e.Filter),this.searchFilter.update(t=>(t.PageSize=e.Filter.RowCount,t)),this.getProducts()})}getProducts(){let e={ListChannelID:this.searchFilter().ListChannelID,RowCount:this.searchFilter().RowCount,PageNumber:this.searchFilter().PageNumber,text:this.searchFilter().text};this.httpService.post("/api/product/GetDuplicateInChannel",e).subscribe(t=>{this.products.set(t.Data)})}onSearch(e){this.searchFilter.update(t=>(t.text=e,t)),this.hasClickedRowCount.set(!1),this.getProducts()}onClearFilter(){this.searchFilter.update(e=>(e.ChannelID=P.GuidEMpty,e))}getChannelLogo(e){return P.getChannelLogoByTypeId(e)}getRowCount(){let e={text:this.searchFilter().text,ChannelID:this.searchFilter().ChannelID};this.httpService.post("/api/product/GetDuplicateInChannelRowCount",e).subscribe(t=>{this.hasClickedRowCount.set(!0),this.rowCount.set(t.Total)})}static{this.\u0275fac=function(t){return new(t||i)}}static{this.\u0275cmp=b({type:i,selectors:[["app-duplicate-sku"]],decls:19,vars:4,consts:[["headerTitle","Multiple Listing","textButton"," Search","description","SKU(s) which is listed more than one time (one to many)",3,"onSubmit"],["routerLink","/menu/products/status/duplicate-sku/table",1,"btn","btn-outline-secondary","btn-lg","d-flex","align-items-center","gap-2"],[1,"fa-solid","fa-table"],["container",""],[1,"mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"container-fluid"],[1,"row","mt-8","mx-1"],[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"],[3,"imageForZoom","title","code","id","image","channels","totalChannel"],[1,"col-md-12"],[3,"next","previous","total","filter","totaldata","paginationTotal","hasClicked"]],template:function(t,n){if(t&1&&(a(0,"mainpanel",0),C("onSubmit",function(f){return n.onSearch(f)}),a(1,"actions")(2,"a",1),u(3,"i",2),a(4,"span"),d(5,"Table View"),r()()(),a(6,"filters")(7,"div",3)(8,"div")(9,"h6",4),d(10,"Channel"),r(),a(11,"app-channel-options-v2",5),z("ngModelChange",function(f){return Z(n.searchFilter().ListChannelID,f)||(n.searchFilter().ListChannelID=f),f}),r()()()(),a(12,"content")(13,"div",6)(14,"div",7),y(15,we,2,7,"div",8,T),g(17,Me,2,0,"div",9),r(),g(18,Pe,3,4,"div",10),r()()()),t&2){let l;o(11),m("multiple",!0),$("ngModel",n.searchFilter().ListChannelID),o(4),w(n.products()),o(2),h(n.products().length==0?17:-1),o(),h(((l=n.products())==null?null:l.length)>0?18:-1)}},dependencies:[ce,Y,ge,F,ee,te,fe,se,ue],encapsulation:2,changeDetection:0})}}return i})();export{ut as DuplicateSkuComponent};
@@ -1 +1 @@
1
- import{a as l}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-MDHMVGYC.js";import{c as u,g as m}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import{Aa as n,cc as s,dc as a,ec as i,fc as o,gb as r,yb as p}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var h=(()=>{class e{constructor(){this.tabs=n([{Title:"Users",Url:"/menu/users/users",Description:""},{Title:"Groups",Url:"/menu/users/groups",Description:""},{Title:"Setup",Url:"/menu/users/setup",Description:""}])}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-user-menu"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,c){t&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),i()()(),o(4,"router-outlet")),t&2&&(r(3),s("Tabs",c.tabs())("usePermissions",!0))},dependencies:[l,m,u],encapsulation:2,changeDetection:0})}}return e})(),D=[{path:"",component:h,children:[{path:"users",loadComponent(){return import("./chunk-GEPWSABG.js").then(e=>e.UsersComponent)},data:{title:"Users"}},{path:"users/form",loadComponent(){return import("./chunk-XG7YN5V3.js").then(e=>e.UserFormComponent)},data:{title:"Users Form"}},{path:"users/info",loadComponent(){return import("./chunk-V42LGBZA.js").then(e=>e.UserInfoComponent)},data:{title:"Users Info"}},{path:"groups",loadComponent(){return import("./chunk-D7W7XOX5.js").then(e=>e.GroupsComponent)},data:{title:"Groups"}},{path:"setup",loadComponent(){return import("./chunk-CMXS4NMD.js").then(e=>e.SetupInfoComponent)},data:{title:"Setup Info"}},{path:"setup/form",loadComponent(){return import("./chunk-PUGGZZYP.js").then(e=>e.SetupFormComponent)},data:{title:"Setup Form"}},{path:"groups/form",loadComponent(){return import("./chunk-AJPIWDAI.js").then(e=>e.GroupsFormComponent)},data:{title:"Groups Form"}},{path:"groups/info",loadComponent(){return import("./chunk-7LTXYSHQ.js").then(e=>e.GroupInfoComponent)},data:{title:"Groups Info"}},{path:"**",redirectTo:"users",pathMatch:"full"},{path:"",pathMatch:"full",redirectTo:"users"}]}];export{h as UserMenuComponent,D as userRoutes};
1
+ import{a as l}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-MDHMVGYC.js";import{c as u,g as m}from"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import"./chunk-QEN2WRFO.js";import{Aa as n,cc as s,dc as a,ec as i,fc as o,gb as r,yb as p}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var h=(()=>{class e{constructor(){this.tabs=n([{Title:"Users",Url:"/menu/users/users",Description:""},{Title:"Groups",Url:"/menu/users/groups",Description:""},{Title:"Setup",Url:"/menu/users/setup",Description:""}])}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=p({type:e,selectors:[["app-user-menu"]],decls:5,vars:2,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs","usePermissions"]],template:function(t,c){t&1&&(a(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),i()()(),o(4,"router-outlet")),t&2&&(r(3),s("Tabs",c.tabs())("usePermissions",!0))},dependencies:[l,m,u],encapsulation:2,changeDetection:0})}}return e})(),D=[{path:"",component:h,children:[{path:"users",loadComponent(){return import("./chunk-ET5NFU5Z.js").then(e=>e.UsersComponent)},data:{title:"Users"}},{path:"users/form",loadComponent(){return import("./chunk-FUE42UF6.js").then(e=>e.UserFormComponent)},data:{title:"Users Form"}},{path:"users/info",loadComponent(){return import("./chunk-QJMVJ3Z7.js").then(e=>e.UserInfoComponent)},data:{title:"Users Info"}},{path:"groups",loadComponent(){return import("./chunk-K7DN5KFP.js").then(e=>e.GroupsComponent)},data:{title:"Groups"}},{path:"setup",loadComponent(){return import("./chunk-UH64FDAN.js").then(e=>e.SetupInfoComponent)},data:{title:"Setup Info"}},{path:"setup/form",loadComponent(){return import("./chunk-CTXM5PKJ.js").then(e=>e.SetupFormComponent)},data:{title:"Setup Form"}},{path:"groups/form",loadComponent(){return import("./chunk-QCLS2ZGC.js").then(e=>e.GroupsFormComponent)},data:{title:"Groups Form"}},{path:"groups/info",loadComponent(){return import("./chunk-M4QK2GZ2.js").then(e=>e.GroupInfoComponent)},data:{title:"Groups Info"}},{path:"**",redirectTo:"users",pathMatch:"full"},{path:"",pathMatch:"full",redirectTo:"users"}]}];export{h as UserMenuComponent,D as userRoutes};
@@ -0,0 +1 @@
1
+ import{a as _e,b as P}from"./chunk-Z55UMNTS.js";import{a as se,b as ge,c as ue}from"./chunk-DSBGQ5B7.js";import{a as fe}from"./chunk-73GAA2GS.js";import{a as R}from"./chunk-CLX6T6AB.js";import{a as he}from"./chunk-ZLMUYIKY.js";import"./chunk-DCGQK4V6.js";import"./chunk-H276HPOG.js";import{a as me}from"./chunk-6MTRE22X.js";import"./chunk-P2ISUSTI.js";import"./chunk-W3ZGCYFJ.js";import"./chunk-IO5P3Z5D.js";import"./chunk-FBOJCUGO.js";import{a as pe}from"./chunk-PGDBJOSL.js";import"./chunk-VYXSV6K4.js";import{a as ce}from"./chunk-EYHQ2ZKL.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"./chunk-474G6BPL.js";import{b as de}from"./chunk-636FAHVP.js";import"./chunk-7BDGR7WQ.js";import"./chunk-TFTF5VH3.js";import{a as ae}from"./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-7LEHDN2Q.js";import"./chunk-3OTK6GG2.js";import"./chunk-KFJBIBDQ.js";import{b as le}from"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-XUEJETYQ.js";import"./chunk-SD2GVUJO.js";import"./chunk-HQPDTUOR.js";import"./chunk-QXRG5XYP.js";import"./chunk-63X2BBS4.js";import"./chunk-MDHMVGYC.js";import{b as Y}from"./chunk-NNVT5X6O.js";import{b as ee,c as te,h as ie,m as ne,o as oe,z as re}from"./chunk-7HUEGPJN.js";import{b as Z}from"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as K,D as X}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as b,Bc as L,Cc as z,Hc as A,Ic as a,Jc as v,Kc as M,Mc as B,Nc as W,Oc as H,Pc as $,Qc as j,Rc as V,Vc as Q,Xb as C,Xc as U,Zb as S,_b as N,ac as D,bc as I,cc as m,db as F,dc as t,ec as i,ed as O,fc as s,fd as E,gb as l,gd as q,ha as y,mc as x,md as G,oa as c,pa as p,rc as h,tc as g,td as J,yb as k}from"./chunk-5VYDZBNH.js";import{a as T,b as w}from"./chunk-QWWW7GFA.js";var Ce=r=>({"td-cell-hover":r});function Se(r,f){if(r&1){let e=x();t(0,"button",19),h("click",function(){c(e);let n=g();return p(n.setMultipleFulfillment())}),a(1," Set Fulfillment "),i()}}function xe(r,f){if(r&1&&s(0,"variants-dropdown",37),r&2){let e=g().$implicit;m("variants",e==null?null:e.Variants)}}function ve(r,f){if(r&1&&s(0,"variant-with-image",38),r&2){let e=g().$implicit;m("variant",e==null?null:e.Variants[0])}}function Me(r,f){if(r&1&&(t(0,"span"),a(1),i()),r&2){let e=g().$implicit;l(),M("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ye(r,f){if(r&1){let e=x();t(0,"div",43)(1,"button",44),h("click",function(){c(e);let n=g().$implicit,d=g(2);return p(d.onSetFulfillment(n))}),s(2,"i",45),a(3,"Set Fulfillment "),i(),t(4,"button",46)(5,"span",47),a(6,"Toggle Dropdown"),i()(),t(7,"ul",48)(8,"li")(9,"a",49),h("click",function(){c(e);let n=g().$implicit,d=g(2);return p(d.refreshShippingAndRefNumber(n))}),s(10,"i",50),a(11,"Refresh Shipping Courier "),i()(),t(12,"li")(13,"a",51),s(14,"i",52),a(15,"Set Picklist (Coming Soon!) "),i()()()()}}function be(r,f){if(r&1){let e=x();t(0,"tr")(1,"td")(2,"input",29),H("ngModelChange",function(n){let d=c(e).$implicit;return W(d.selected,n)||(d.selected=n),p(n)}),h("ngModelChange",function(){c(e);let n=g(2),d=V(0);return p(n.onSelectOrder(d))}),i()(),t(3,"td")(4,"div",30),s(5,"img",31),O(6,"channelImage"),t(7,"div",32)(8,"div"),a(9),i(),t(10,"small",33)(11,"span"),a(12),i()()()()(),t(13,"td")(14,"div",34)(15,"div"),s(16,"order-link",35),i(),t(17,"small"),a(18),O(19,"date"),i(),s(20,"br"),t(21,"small"),s(22,"i",36),a(23),i()()(),t(24,"td"),C(25,xe,1,1,"variants-dropdown",37)(26,ve,1,1,"variant-with-image",38),i(),t(27,"td",39),a(28),O(29,"number"),i(),t(30,"td",40)(31,"div",41)(32,"div",34)(33,"div",42)(34,"span"),a(35),i(),C(36,Me,2,1,"span"),i(),t(37,"small"),a(38),i()()()(),t(39,"td",40),C(40,ye,16,0,"div",43),i()()}if(r&2){let e=f.$implicit,o=g(2);l(2),B("ngModel",e.selected),m("disabled",o.selectedChannelType()!=null&&o.selectedChannelType()!=e.MarketType),l(3),m("src",E(6,17,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),l(4),v(e.Outlet),l(3),v(e.ChannelName),l(4),m("order",e),l(2),M(" ",q(19,19,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),l(5),M(" ",e.Customer," "),l(),A(U(24,Ce,(e.Variants==null?null:e.Variants.length)>1)),l(),S((e.Variants==null?null:e.Variants.length)>1?25:26),l(3),v(E(29,22,e.Amount)),l(7),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),l(),S(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?36:-1),l(2),M(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),l(2),S((e==null?null:e.MarketType)!=o.channelType.WooCommerce?40:-1)}}function Oe(r,f){if(r&1){let e=x();t(0,"div",16)(1,"table",20)(2,"thead",21)(3,"tr",22),s(4,"th",23),t(5,"th",24),a(6,"Outlet"),i(),t(7,"th",24),a(8,"Number"),i(),t(9,"th"),a(10,"Items"),i(),t(11,"th",25),a(12,"Amount"),i(),t(13,"th",26),a(14,"Shipping"),i(),s(15,"th",27),i()(),t(16,"tbody"),D(17,be,41,26,"tr",null,N),i()(),t(19,"app-custom-paginator",28),h("next",function(){c(e);let n=g();return p(n.initReadyToShip())})("previous",function(){c(e);let n=g();return p(n.initReadyToShip())}),i()()}if(r&2){let e=g(),o=V(0);l(17),I(o),l(2),m("filter",e.filter())("totaldata",o==null?null:o.length)}}function Pe(r,f){r&1&&(t(0,"div",17),s(1,"app-empty-state"),i())}var Xe=(()=>{class r{constructor(){this.toastr=y(Z),this.orderService=y(R),this.fulfillmentService=y(_e),this.channelType=Y,this.selectedOrders=b([]),this.selectedChannelType=G(()=>{let e=null;return this.selectedOrders().length>0&&(e=this.selectedOrders()[0].MarketType),e}),this.readyToShip=b([]),this.filter=b({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:void 0}),this.contextMenuEl=J(P),this.contextMenuItems=[{id:"refresh",label:"Refresh Shipping",icon:"fa-solid fa-arrows-rotate"}]}ngOnInit(){this.orderService.getOrderDefaultValue().subscribe({next:e=>{this.initFromDate(e)},error:e=>{console.error("Error fetching default date:",e),this.initFromDate(null)}})}initFromDate(e){this.filter.update(o=>w(T({},o),{From:e})),this.initReadyToShip()}initReadyToShip(){this.orderService.getReadyToShipOrders(this.filter()).subscribe(e=>{this.readyToShip.set(e),this.selectedOrders.set([])})}onFilterPropertyChange(e,o){this.filter.update(n=>w(T({},n),{[e]:o}))}onSetFulfillment(e){this.fulfillmentService.setFulfillmentOrder(e).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}refreshShippingAndRefNumber(e){this.orderService.refreshShippingCourier(e.ShopID,e.Number).subscribe(()=>{this.toastr.success("Shipping courier and reference number refreshed","Success"),this.initReadyToShip()})}setMultipleFulfillment(){this.fulfillmentService.setFulfillmentMultipleOrders(this.selectedOrders()).subscribe(()=>{this.toastr.success("Fulfillment set successfully","Success"),this.initReadyToShip()})}onSelectOrder(e){let o=e.filter(n=>n.selected);this.selectedOrders.set(o)}onMouseHover(e,o){(!o.LogisticService?.Name||!o.ReferenceNumber)&&this.contextMenuEl()?.show(e,o)}onSelectContextItem(e){e.item?.id==="refresh"&&this.refreshShippingAndRefNumber(e.data)}static{this.\u0275fac=function(o){return new(o||r)}}static{this.\u0275cmp=k({type:r,selectors:[["app-ready-to-ship"]],viewQuery:function(o,n){o&1&&L(n.contextMenuEl,P,5),o&2&&z()},features:[Q([R])],decls:38,vars:11,consts:[["contextMenu",""],["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...","filterDialogWidth","625px",3,"onSubmit","textChange","text"],[1,"btn","btn-outline-secondary","shadow","rounded"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"dialog-filter","grid-filter"],[1,"filter-item","full"],[3,"ngModelChange","multiple","ngModel"],[1,"filter-item"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],["type","number","name","PageNumber",1,"form-control","input-filter",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"form-control","input-filter",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[3,"onSelectItem","items"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","5px"],[2,"width","200px"],[1,"text-end",2,"width","100px"],[2,"width","80px"],[2,"width","230px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],["type","checkbox",3,"ngModelChange","ngModel","disabled"],[1,"d-flex","align-items-center","gap-3"],[2,"width","20px","height","20px",3,"src","alt"],[1,"lh-base"],[1,"d-flex","align-items-center","gap-2"],[1,"lh-sm"],[2,"font-size","14px",3,"order"],[1,"fa-solid","fa-user"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"d-flex","align-items-center","gap-6"],[1,"d-flex","align-items-end","gap-2"],[1,"btn-group","btn-split-action"],[1,"btn","btn-success","btn-lg","fw-medium",3,"click"],[1,"fa-solid","fa-dolly","me-2"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-lg","fw-medium","dropdown-toggle","dropdown-toggle-split"],[1,"visually-hidden"],[1,"dropdown-menu"],["href","javascript:void(0)",1,"dropdown-item",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-2"],["href","javascript:void(0)",1,"dropdown-item","disabled"],[1,"fa-solid","fa-list-check","me-2"]],template:function(o,n){if(o&1){let d=x();$(0),t(1,"mainpanel",1),h("onSubmit",function(){return c(d),p(n.initReadyToShip())})("textChange",function(u){return c(d),p(n.onFilterPropertyChange("Number",u))}),t(2,"actions"),C(3,Se,2,0,"button",2),t(4,"a",3),s(5,"i",4),t(6,"span"),a(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div",5)(10,"div",6)(11,"h6"),a(12,"Channel"),i(),t(13,"app-channel-options-v2",7),h("ngModelChange",function(u){return c(d),p(n.onFilterPropertyChange("ListChannelID",u))}),i()(),t(14,"div",8)(15,"h6"),a(16,"From"),i(),t(17,"datepicker",9),h("dateChange",function(u){return c(d),p(n.onFilterPropertyChange("From",u))}),i()(),t(18,"div",8)(19,"h6"),a(20,"To"),i(),t(21,"datepicker",10),h("dateChange",function(u){return c(d),p(n.onFilterPropertyChange("To",u))}),i()(),t(22,"div",8)(23,"h6"),a(24,"Page Number"),i(),t(25,"input",11),h("ngModelChange",function(u){return c(d),p(n.onFilterPropertyChange("PageNumber",+u))}),i()(),t(26,"div",8)(27,"h6"),a(28,"Page Size"),i(),t(29,"input",12),h("ngModelChange",function(u){return c(d),p(n.onFilterPropertyChange("PageSize",+u))}),i()()()(),t(30,"content")(31,"div",13)(32,"div",14)(33,"div",15),C(34,Oe,20,2,"div",16)(35,Pe,2,0,"div",17),i()()()()(),t(36,"app-context-menu",18,0),h("onSelectItem",function(u){return c(d),p(n.onSelectContextItem(u))}),i()}if(o&2){let d=j(n.readyToShip());l(),m("text",n.filter().Number),l(2),S(n.selectedOrders().length>0?3:-1),l(10),m("multiple",!0)("ngModel",n.filter().ListChannelID),l(4),m("date",n.filter().From),l(4),m("date",n.filter().To),l(4),m("ngModel",n.filter().PageNumber),l(4),m("ngModel",n.filter().PageSize),l(5),S(d.length>0?34:35),l(2),m("items",n.contextMenuItems)}},dependencies:[de,ce,pe,re,te,oe,ee,ie,ne,ge,ue,he,fe,ae,le,P,me,se,K,X],styles:['@charset "UTF-8";.actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], div[_ngcontent-%COMP%]:hover.actions-cell .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}.actions-cell[_ngcontent-%COMP%] .btn-group[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn-group[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:1!important;visibility:visible!important}td.actions-cell[_ngcontent-%COMP%]:last-child{text-align:right}.btn-split-action[_ngcontent-%COMP%] .dropdown-menu[_ngcontent-%COMP%]{margin-top:3px!important}.dialog-filter.grid-filter[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px;width:100%}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;min-width:0}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item[_ngcontent-%COMP%] h6[_ngcontent-%COMP%]{margin-bottom:6px}.dialog-filter.grid-filter[_ngcontent-%COMP%] .filter-item.full[_ngcontent-%COMP%]{grid-column:1/-1}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] app-channel-options-v2[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] multiwarehouse-tree-select[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] radio-options[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0!important;width:100%!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] input.input-filter[_ngcontent-%COMP%], .dialog-filter.grid-filter[_ngcontent-%COMP%] input.form-control[_ngcontent-%COMP%]{height:40px;min-height:40px;border:1px solid #ccc;border-radius:4px;font-size:.875rem;padding-left:.75rem;padding-right:.75rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] input.input-filter[_ngcontent-%COMP%]:focus, .dialog-filter.grid-filter[_ngcontent-%COMP%] input.form-control[_ngcontent-%COMP%]:focus{border:1px solid #86b7fe;box-shadow:none;outline:0}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-select-container{height:40px!important;min-height:40px!important;align-items:center;border:1px solid #ccc!important;border-radius:4px!important;font-size:.875rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select.ng-select-focused:not(.ng-select-opened)>.ng-select-container{border-color:#86b7fe!important;box-shadow:none!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-value-container{padding-left:.75rem;padding-right:.75rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-value, .dialog-filter.grid-filter[_ngcontent-%COMP%] ng-select .ng-placeholder{font-size:.875rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] app-channel-options-v2 .p-multiselect{box-sizing:border-box;width:100%!important;height:40px!important;min-height:40px!important;--p-multiselect-padding-y: 8px;border:1px solid #ccc!important;border-radius:4px!important;font-size:.875rem!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] app-channel-options-v2 .p-multiselect:not(.p-disabled):hover{border-color:#ccc}.dialog-filter.grid-filter[_ngcontent-%COMP%] app-channel-options-v2 .p-multiselect-label, .dialog-filter.grid-filter[_ngcontent-%COMP%] app-channel-options-v2 .p-multiselect-chip{font-size:.75rem!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined{height:40px!important;min-height:40px!important;padding-left:.75rem!important;padding-right:.75rem!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .mdc-notched-outline__leading, .dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .mdc-notched-outline__notch, .dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .mdc-notched-outline__trailing{border-color:#ccc!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .mdc-notched-outline__leading, .dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .mdc-notched-outline__trailing{width:.75rem!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .mat-mdc-form-field-infix{display:flex;align-items:center;height:40px;min-height:0!important;padding:0!important}.dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker input.mat-mdc-input-element{font-size:.875rem}.dialog-filter.grid-filter[_ngcontent-%COMP%] datepicker .datepicker-toggle-icon{height:auto;width:auto;margin-right:0}'],changeDetection:0})}}return r})();export{Xe as ReadyToShipComponent};
@@ -1 +1 @@
1
- import{a as n}from"./chunk-4YPGBRLY.js";import{a as d}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-GUIB6IFK.js";import"./chunk-Q3MYZYOB.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,g as s}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 l,ec as m,fc as o,gb as i,yb as r}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var u=(()=>{class e{constructor(){this.priceTabs=a([{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Multi Channel Row Comparison",Url:"/menu/price/update"}])}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=r({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,h){t&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),t&2&&(i(3),p("Tabs",h.priceTabs()))},dependencies:[d,s,c],encapsulation:2,changeDetection:0})}}return e})();var A=[{path:"",component:u,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-UW7UVM54.js").then(e=>e.PricePosChannelComponent)},canActivate:[n],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-YJXHL4ZG.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[n],data:{title:"Price Single Channel Comparison"}},{path:"update",loadComponent(){return import("./chunk-WFPTTA3N.js").then(e=>e.PriceUpdateComponent)},canActivate:[n],data:{title:"Multi Channel Row Comparison"}}]}];export{A as routes};
1
+ import{a as n}from"./chunk-AW4UMRM6.js";import{a as d}from"./chunk-7KBF6RRT.js";import"./chunk-CBPURQKN.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import"./chunk-XUEJETYQ.js";import"./chunk-SD2GVUJO.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,g as s}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 l,ec as m,fc as o,gb as i,yb as r}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";var u=(()=>{class e{constructor(){this.priceTabs=a([{Title:"Single Channel Comparison",Url:"/menu/price/SingleChannel"},{Title:"Multi Channel Comparison",Url:"/menu/price/pos"},{Title:"Multi Channel Row Comparison",Url:"/menu/price/update"}])}static{this.\u0275fac=function(t){return new(t||e)}}static{this.\u0275cmp=r({type:e,selectors:[["app-price"]],decls:5,vars:1,consts:[[1,"navbar","page-nav","navbar-default","py-0","navbar-expand-lg"],[1,"container-fluid"],[3,"Tabs"]],template:function(t,h){t&1&&(l(0,"nav",0)(1,"div",1)(2,"div"),o(3,"nav-tab",2),m()()(),o(4,"router-outlet")),t&2&&(i(3),p("Tabs",h.priceTabs()))},dependencies:[d,s,c],encapsulation:2,changeDetection:0})}}return e})();var A=[{path:"",component:u,children:[{path:"",redirectTo:"SingleChannel",pathMatch:"full"},{path:"pos",loadComponent(){return import("./chunk-D7RVGS52.js").then(e=>e.PricePosChannelComponent)},canActivate:[n],data:{title:"Global Price Comparison"}},{path:"SingleChannel",loadComponent(){return import("./chunk-IEK26S7T.js").then(e=>e.PriceSingleChannelComponent)},canActivate:[n],data:{title:"Price Single Channel Comparison"}},{path:"update",loadComponent(){return import("./chunk-BEXPPIK7.js").then(e=>e.PriceUpdateComponent)},canActivate:[n],data:{title:"Multi Channel Row Comparison"}}]}];export{A as routes};
@@ -1 +1 @@
1
- import{a as N,b as O,c as W}from"./chunk-44GXCX6B.js";import{a as E}from"./chunk-ZLMUYIKY.js";import"./chunk-BGFEVOPZ.js";import{b as I}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"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{c as T}from"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as V}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as r,Ic as L,Mc as v,Nc as C,Oc as _,Pc as M,Qc as x,Rc as u,Xb as D,Zb as S,cc as f,dc as a,ec as s,fc as w,gb as d,ha as g,mc as b,oa as c,pa as h,rc as P,tc as F,yb as y}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function k(n,B){if(n&1&&(a(0,"div",6)(1,"div",7),w(2,"app-table-report",8),s()()),n&2){let e=F(),t=u(0);d(2),f("result",e.result())("header",e.header())("from",t.From)("to",t.To)("type",1)}}var Y=(()=>{class n{constructor(){this.http=g(O),this.datePipe=g(V),this.filter=r(new N),this.maxDate=r(null),this.minDate=r(null),this.result=r([]),this.header=r([]),this.PageTitle=r("Convert Sales Order To Invoice");let e=new Date;this.maxDate.set(e),this.minDate.set(T.addDays(e,6)),this.filter.update(t=>(t.From=e,t.To=e,t)),this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=this.filter(),t=T.formatTitleFromDate(e.From,e.To),l=this.datePipe.transform(e.From,t),i=this.datePipe.transform(e.To,"dd MMM yyyy");this.PageTitle.set(`Convert Sales Order To Invoice (${t==null?"":l+"-"} ${i})`)}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter.set(e),this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter()).then(e=>{this.header.set(e.Header),this.result.set(e.Body)})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=y({type:n,selectors:[["app-convert-invoice"]],decls:13,vars:6,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,l){if(t&1){let i=b();M(0),a(1,"mainpanel",0),P("onSubmit",function(){return c(i),h(l.onFilter())}),a(2,"filters")(3,"div")(4,"label",1),L(5,"From/To"),s(),a(6,"div",2)(7,"datepicker",3),_("dateChange",function(o){c(i);let p=u(0);return C(p.From,o)||(p.From=o),h(o)}),s()(),a(8,"div")(9,"datepicker",4),_("dateChange",function(o){c(i);let p=u(0);return C(p.To,o)||(p.To=o),h(o)}),s()()()(),a(10,"content")(11,"div",5),D(12,k,3,5,"div",6),s()()()}if(t&2){let i,m=x(l.filter());d(),f("headerTitle",l.PageTitle())("hideSearchBox",!0),d(6),v("date",m.From),d(2),v("date",m.To),d(3),S((i=l.result())!=null&&i.length?12:-1)}},dependencies:[I,E,W],encapsulation:2,changeDetection:0})}}return n})();export{Y as ConvertInvoiceComponent};
1
+ import{a as N,b as O,c as W}from"./chunk-44GXCX6B.js";import{a as E}from"./chunk-ZLMUYIKY.js";import"./chunk-BGFEVOPZ.js";import{b as I}from"./chunk-636FAHVP.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"./chunk-KFJBIBDQ.js";import"./chunk-KMY7VNWE.js";import"./chunk-NMXGNJWD.js";import{c as T}from"./chunk-NNVT5X6O.js";import"./chunk-7HUEGPJN.js";import"./chunk-ZE4OOGMT.js";import"./chunk-56N77BXA.js";import"./chunk-I7RVCGXC.js";import{B as V}from"./chunk-QEN2WRFO.js";import"./chunk-ASFPLYOZ.js";import{Aa as r,Ic as L,Mc as v,Nc as C,Oc as _,Pc as M,Qc as x,Rc as u,Xb as D,Zb as S,cc as f,dc as a,ec as s,fc as w,gb as d,ha as g,mc as b,oa as c,pa as h,rc as P,tc as F,yb as y}from"./chunk-5VYDZBNH.js";import"./chunk-QWWW7GFA.js";function k(n,B){if(n&1&&(a(0,"div",6)(1,"div",7),w(2,"app-table-report",8),s()()),n&2){let e=F(),t=u(0);d(2),f("result",e.result())("header",e.header())("from",t.From)("to",t.To)("type",1)}}var Y=(()=>{class n{constructor(){this.http=g(O),this.datePipe=g(V),this.filter=r(new N),this.maxDate=r(null),this.minDate=r(null),this.result=r([]),this.header=r([]),this.PageTitle=r("Convert Sales Order To Invoice");let e=new Date;this.maxDate.set(e),this.minDate.set(T.addDays(e,6)),this.filter.update(t=>(t.From=e,t.To=e,t)),this.updatePageTitle()}ngOnInit(){this.initPageLoader()}updatePageTitle(){let e=this.filter(),t=T.formatTitleFromDate(e.From,e.To),l=this.datePipe.transform(e.From,t),i=this.datePipe.transform(e.To,"dd MMM yyyy");this.PageTitle.set(`Convert Sales Order To Invoice (${t==null?"":l+"-"} ${i})`)}initPageLoader(){this.http.GetLoader().subscribe(e=>{this.filter.set(e),this.getChannelLogs()})}getChannelLogs(){this.updatePageTitle(),this.http.GetSyncInvoice(this.filter()).then(e=>{this.header.set(e.Header),this.result.set(e.Body)})}onFilter(){this.getChannelLogs()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=y({type:n,selectors:[["app-convert-invoice"]],decls:13,vars:6,consts:[[3,"onSubmit","headerTitle","hideSearchBox"],[1,"fw-bold","mb-1"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"container-fluid"],[1,"row","mt-4"],[1,"col-md-12"],[3,"result","header","from","to","type"]],template:function(t,l){if(t&1){let i=b();M(0),a(1,"mainpanel",0),P("onSubmit",function(){return c(i),h(l.onFilter())}),a(2,"filters")(3,"div")(4,"label",1),L(5,"From/To"),s(),a(6,"div",2)(7,"datepicker",3),_("dateChange",function(o){c(i);let p=u(0);return C(p.From,o)||(p.From=o),h(o)}),s()(),a(8,"div")(9,"datepicker",4),_("dateChange",function(o){c(i);let p=u(0);return C(p.To,o)||(p.To=o),h(o)}),s()()()(),a(10,"content")(11,"div",5),D(12,k,3,5,"div",6),s()()()}if(t&2){let i,m=x(l.filter());d(),f("headerTitle",l.PageTitle())("hideSearchBox",!0),d(6),v("date",m.From),d(2),v("date",m.To),d(3),S((i=l.result())!=null&&i.length?12:-1)}},dependencies:[I,E,W],encapsulation:2,changeDetection:0})}}return n})();export{Y as ConvertInvoiceComponent};
@@ -1 +1 @@
1
- import{a as F}from"./chunk-QUXL7TBO.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-GUIB6IFK.js";import"./chunk-Q3MYZYOB.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-6MTRE22X.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-636FAHVP.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-XUEJETYQ.js";import"./chunk-SD2GVUJO.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};