marketplacepos 5.44.1 → 5.45.0

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 (190) hide show
  1. package/Marketplace/3rdpartylicenses.txt +31 -31
  2. package/Marketplace/{chunk-IA6KOBDJ.js → chunk-2HNZ6XV3.js} +1 -1
  3. package/Marketplace/chunk-2I7ZZ3F2.js +1 -0
  4. package/Marketplace/chunk-2LK24YA5.js +1 -0
  5. package/Marketplace/chunk-2TN45S53.js +1 -0
  6. package/Marketplace/{chunk-2XV6YOOU.js → chunk-37L3YDKT.js} +1 -1
  7. package/Marketplace/chunk-3E7JHNVC.js +5 -0
  8. package/Marketplace/{chunk-F63CEOOT.js → chunk-3FPEQHTI.js} +1 -1
  9. package/Marketplace/{chunk-SJU6ZU2K.js → chunk-3LN6RMRN.js} +1 -1
  10. package/Marketplace/{chunk-5JQJRPL3.js → chunk-3TYYN7ZX.js} +1 -1
  11. package/Marketplace/{chunk-CUB2QFUO.js → chunk-3UN6FPMN.js} +1 -1
  12. package/Marketplace/{chunk-SYUFPF3D.js → chunk-3YP6ORBR.js} +1 -1
  13. package/Marketplace/chunk-42MFOGHP.js +5 -0
  14. package/Marketplace/{chunk-E4Z7OR75.js → chunk-4KHHGHFJ.js} +1 -1
  15. package/Marketplace/chunk-4Q5ZSKVO.js +1 -0
  16. package/Marketplace/{chunk-MS3ZBCON.js → chunk-4VITMSIA.js} +1 -1
  17. package/Marketplace/{chunk-VWNEJWLI.js → chunk-4ZQCJGTZ.js} +1 -1
  18. package/Marketplace/{chunk-IIZDEGGW.js → chunk-5LQRO4AI.js} +1 -1
  19. package/Marketplace/{chunk-6QYD6NIJ.js → chunk-5PS6ZS3N.js} +1 -1
  20. package/Marketplace/{chunk-35XX6SQT.js → chunk-6KBMGQMI.js} +1 -1
  21. package/Marketplace/{chunk-IL5JIRWJ.js → chunk-6L7TD5DW.js} +1 -1
  22. package/Marketplace/{chunk-SDVWA7KM.js → chunk-6NUQGKRV.js} +1 -1
  23. package/Marketplace/{chunk-PNITO7BE.js → chunk-6RLISMEX.js} +1 -1
  24. package/Marketplace/{chunk-EGFBMQKW.js → chunk-6V4LFY52.js} +1 -1
  25. package/Marketplace/chunk-6VDV7CA2.js +2 -0
  26. package/Marketplace/chunk-6VHVQEVM.js +3 -0
  27. package/Marketplace/chunk-6WCXK7FR.js +2 -0
  28. package/Marketplace/chunk-6ZOHSFR5.js +1 -0
  29. package/Marketplace/{chunk-G7R7LUW4.js → chunk-74ELVGDK.js} +1 -1
  30. package/Marketplace/{chunk-LZCEM2PC.js → chunk-7AE3725T.js} +1 -1
  31. package/Marketplace/{chunk-H3IVI3LN.js → chunk-A44LN77B.js} +1 -1
  32. package/Marketplace/{chunk-IMK2JGZA.js → chunk-A64VIOKR.js} +1 -1
  33. package/Marketplace/{chunk-L3FX4O3H.js → chunk-B67DSLBY.js} +1 -1
  34. package/Marketplace/chunk-B7JSVIVV.js +1 -0
  35. package/Marketplace/{chunk-PFIBU2IX.js → chunk-BBQGPXDH.js} +1 -1
  36. package/Marketplace/{chunk-E66C2WAS.js → chunk-BERZDE6Y.js} +1 -1
  37. package/Marketplace/{chunk-WVQIS27J.js → chunk-BFPMFJI7.js} +1 -1
  38. package/Marketplace/{chunk-EQIFZBRG.js → chunk-BJUPMCEP.js} +2 -2
  39. package/Marketplace/{chunk-DL66NZ2A.js → chunk-BQIB3N6V.js} +1 -1
  40. package/Marketplace/chunk-BYSLV4DQ.js +2 -0
  41. package/Marketplace/chunk-BZBQHO76.js +1 -0
  42. package/Marketplace/{chunk-LA6B2JGP.js → chunk-CHWXOJDB.js} +1 -1
  43. package/Marketplace/chunk-CNJDARBM.js +1 -0
  44. package/Marketplace/{chunk-SBZNADRN.js → chunk-D5YID4W4.js} +1 -1
  45. package/Marketplace/{chunk-KWX3WSCT.js → chunk-DDVDUCPY.js} +1 -1
  46. package/Marketplace/{chunk-SM3P57SO.js → chunk-DFGZ4L65.js} +1 -1
  47. package/Marketplace/chunk-DSQSL5VX.js +15 -0
  48. package/Marketplace/{chunk-YM4TJJMM.js → chunk-DZYBXWL2.js} +1 -1
  49. package/Marketplace/{chunk-RZZKFTCX.js → chunk-ELSSXU6Y.js} +1 -1
  50. package/Marketplace/{chunk-SWQXSJ7O.js → chunk-ERXVXBTU.js} +1 -1
  51. package/Marketplace/chunk-EVQLTXB7.js +1 -0
  52. package/Marketplace/{chunk-IM4DS3UA.js → chunk-FAMP5PPX.js} +1 -1
  53. package/Marketplace/{chunk-NOP5P5R5.js → chunk-FESS3PG3.js} +1 -1
  54. package/Marketplace/{chunk-WW22F76D.js → chunk-FFCWYWBW.js} +1 -1
  55. package/Marketplace/{chunk-J5OHT4GM.js → chunk-FJ455ZYZ.js} +1 -1
  56. package/Marketplace/{chunk-UGVEAL7H.js → chunk-FO7G4GMY.js} +1 -1
  57. package/Marketplace/{chunk-XMIUIAY2.js → chunk-FOFXARTB.js} +1 -1
  58. package/Marketplace/{chunk-OC2FBL33.js → chunk-FPYZBABH.js} +1 -1
  59. package/Marketplace/{chunk-Z5GRNGHJ.js → chunk-FVORY74O.js} +1 -1
  60. package/Marketplace/{chunk-M2FCTYGU.js → chunk-FXQKRJWU.js} +1 -1
  61. package/Marketplace/{chunk-B5VBBEEN.js → chunk-G7T42LFR.js} +1 -1
  62. package/Marketplace/{chunk-AJL3CYNX.js → chunk-GH5FTODR.js} +1 -1
  63. package/Marketplace/{chunk-JUL73DOX.js → chunk-GLVYOZA4.js} +1 -1
  64. package/Marketplace/chunk-H46SHHXR.js +1 -0
  65. package/Marketplace/{chunk-B5V5KFQU.js → chunk-HFCAD7GH.js} +1 -1
  66. package/Marketplace/{chunk-KIIVJXDR.js → chunk-HPFBJL3A.js} +1 -1
  67. package/Marketplace/{chunk-3LRWABHB.js → chunk-HVCIQI7B.js} +1 -1
  68. package/Marketplace/{chunk-GCDQNJQN.js → chunk-ID2YZPRH.js} +1 -1
  69. package/Marketplace/{chunk-6ZVBRMK4.js → chunk-IML3KYQE.js} +1 -1
  70. package/Marketplace/{chunk-CIAZIJGR.js → chunk-IQ4AFE6X.js} +1 -1
  71. package/Marketplace/{chunk-AEOSNAHH.js → chunk-J53BPEDH.js} +1 -1
  72. package/Marketplace/{chunk-F7QBIR6G.js → chunk-JBNND5FL.js} +1 -1
  73. package/Marketplace/chunk-JFS634DA.js +1 -0
  74. package/Marketplace/{chunk-JPYSXZZO.js → chunk-JJKMVDXR.js} +1 -1
  75. package/Marketplace/{chunk-CMTBBXR5.js → chunk-JVNHFIYT.js} +1 -1
  76. package/Marketplace/{chunk-6INFVQEU.js → chunk-KUUDZPGN.js} +1 -1
  77. package/Marketplace/{chunk-OAOQONOA.js → chunk-KXEADFBM.js} +1 -1
  78. package/Marketplace/{chunk-ZXQNMGQG.js → chunk-L7EQZACZ.js} +1 -1
  79. package/Marketplace/{chunk-4KKT6FMN.js → chunk-L7KCZLIM.js} +1 -1
  80. package/Marketplace/chunk-LBXSZJDS.js +1 -0
  81. package/Marketplace/{chunk-CSP6M3TO.js → chunk-LCRPUAWG.js} +1 -1
  82. package/Marketplace/{chunk-OLOIQI4D.js → chunk-LDD4NVMB.js} +1 -1
  83. package/Marketplace/{chunk-KALG6D6L.js → chunk-LDPDLCRL.js} +1 -1
  84. package/Marketplace/{chunk-HFKZOM4I.js → chunk-LF6HWNC2.js} +1 -1
  85. package/Marketplace/chunk-LHX4ZOLA.js +2 -0
  86. package/Marketplace/chunk-LK2PMDRL.js +1 -0
  87. package/Marketplace/chunk-LQ2NLQKV.js +1 -0
  88. package/Marketplace/{chunk-E3ROEHBW.js → chunk-LRUVI2Z3.js} +1 -1
  89. package/Marketplace/{chunk-SB7NWPDS.js → chunk-M7V7A7Z6.js} +1 -1
  90. package/Marketplace/{chunk-WHDFRUFN.js → chunk-MBBQZFI4.js} +1 -1
  91. package/Marketplace/{chunk-2SCXTEPT.js → chunk-MMUSTFHH.js} +1 -1
  92. package/Marketplace/chunk-MO53T3IK.js +1 -0
  93. package/Marketplace/chunk-MWTFYMKY.js +1 -0
  94. package/Marketplace/{chunk-PAEIUO2F.js → chunk-N2SPK2VI.js} +1 -1
  95. package/Marketplace/{chunk-IHNN4Q2N.js → chunk-NNRBGHXB.js} +1 -1
  96. package/Marketplace/{chunk-W6FZQ6XT.js → chunk-OFZOAEW5.js} +1 -1
  97. package/Marketplace/{chunk-B7KTCPKC.js → chunk-OJMQBH6T.js} +3 -3
  98. package/Marketplace/{chunk-K5GEJ2GZ.js → chunk-OK3LLCAK.js} +1 -1
  99. package/Marketplace/{chunk-EPVCMYCI.js → chunk-OLANEXLB.js} +1 -1
  100. package/Marketplace/{chunk-E2SXYIML.js → chunk-ORDCBJ4G.js} +1 -1
  101. package/Marketplace/{chunk-2ODVHD2K.js → chunk-PFXOFSJG.js} +1 -1
  102. package/Marketplace/{chunk-YPWHTELF.js → chunk-PPHTN2H6.js} +1 -1
  103. package/Marketplace/{chunk-YXGO35YT.js → chunk-PQGPOOCK.js} +1 -1
  104. package/Marketplace/{chunk-5JVEEL2T.js → chunk-PYXL7UF7.js} +1 -1
  105. package/Marketplace/{chunk-AYPY47VM.js → chunk-QBL6V7QF.js} +1 -1
  106. package/Marketplace/{chunk-4WI2DOJ7.js → chunk-QE3IIBDW.js} +1 -1
  107. package/Marketplace/{chunk-CCWNSX4Y.js → chunk-QHE3PKRD.js} +1 -1
  108. package/Marketplace/{chunk-AO46RPZ4.js → chunk-QK4BGDSS.js} +1 -1
  109. package/Marketplace/chunk-QP4C4R4W.js +1 -0
  110. package/Marketplace/{chunk-74IXJYWO.js → chunk-QS22J2SC.js} +1 -1
  111. package/Marketplace/chunk-QUKRHI5J.js +1 -0
  112. package/Marketplace/{chunk-OTDC2LYA.js → chunk-R7INAZCD.js} +1 -1
  113. package/Marketplace/{chunk-KMJM6UVY.js → chunk-RDRNWLJI.js} +1 -1
  114. package/Marketplace/chunk-RHF7TPRF.js +1 -0
  115. package/Marketplace/{chunk-M5XGP4SG.js → chunk-RHHHL4OR.js} +1 -1
  116. package/Marketplace/{chunk-6IYLH3EV.js → chunk-RLBTXXCD.js} +1 -1
  117. package/Marketplace/{chunk-6BIM4KEI.js → chunk-RNTPX24O.js} +1 -1
  118. package/Marketplace/{chunk-Z5OLAUH6.js → chunk-RQEQPIMI.js} +1 -1
  119. package/Marketplace/{chunk-M7NQID2Z.js → chunk-RTT3JVJM.js} +1 -1
  120. package/Marketplace/chunk-SHRLQGK3.js +1 -0
  121. package/Marketplace/{chunk-Y42GRQNF.js → chunk-TC4JRJQL.js} +1 -1
  122. package/Marketplace/{chunk-E4KNET2R.js → chunk-TH6VZX34.js} +1 -1
  123. package/Marketplace/{chunk-WUHNNJ2C.js → chunk-TYG67JH3.js} +1 -1
  124. package/Marketplace/{chunk-YZLHRAEO.js → chunk-TZEINVZY.js} +1 -1
  125. package/Marketplace/chunk-UHJEXTOG.js +1 -0
  126. package/Marketplace/{chunk-ECRWEMEV.js → chunk-UHTMVOX6.js} +1 -1
  127. package/Marketplace/{chunk-UEPQYAWE.js → chunk-UIFPDTMW.js} +1 -1
  128. package/Marketplace/{chunk-NXI7PMGL.js → chunk-UML74HNB.js} +1 -1
  129. package/Marketplace/{chunk-D6URDVES.js → chunk-UXPULNCR.js} +1 -1
  130. package/Marketplace/{chunk-SN4AOGQK.js → chunk-UYLSZYOD.js} +1 -1
  131. package/Marketplace/{chunk-ATZ475FN.js → chunk-V3USB3ZU.js} +1 -1
  132. package/Marketplace/{chunk-77JJJNRM.js → chunk-V5KHEF77.js} +1 -1
  133. package/Marketplace/chunk-VVX6LRMW.js +1 -0
  134. package/Marketplace/{chunk-5OHRA4AS.js → chunk-W3JTS22H.js} +1 -1
  135. package/Marketplace/{chunk-JXSBFTQM.js → chunk-W5L6FMO3.js} +1 -1
  136. package/Marketplace/{chunk-EH6HWI3G.js → chunk-WFT47MCY.js} +1 -1
  137. package/Marketplace/{chunk-NS46QSCM.js → chunk-WJAE4LW2.js} +1 -1
  138. package/Marketplace/{chunk-MH4SJTQX.js → chunk-WLRPCY65.js} +1 -1
  139. package/Marketplace/{chunk-VIMB2VWB.js → chunk-WPELZYFP.js} +1 -1
  140. package/Marketplace/{chunk-RECNBAEB.js → chunk-WWISWZF5.js} +1 -1
  141. package/Marketplace/{chunk-57UYCHCW.js → chunk-XNVULGQ3.js} +1 -1
  142. package/Marketplace/{chunk-OA5PCIIS.js → chunk-XP6R2ZYJ.js} +1 -1
  143. package/Marketplace/{chunk-5KS4WK6H.js → chunk-XXWBR6S5.js} +1 -1
  144. package/Marketplace/{chunk-ZQ5EGXEB.js → chunk-YIXZLIPA.js} +1 -1
  145. package/Marketplace/{chunk-KAQL5LN5.js → chunk-YNJPF4PB.js} +1 -1
  146. package/Marketplace/{chunk-QIALMLQK.js → chunk-YWSUS64O.js} +1 -1
  147. package/Marketplace/{chunk-QJJ2WFVX.js → chunk-Z3ZYINRX.js} +1 -1
  148. package/Marketplace/chunk-ZBKUZ4CN.js +1 -0
  149. package/Marketplace/{chunk-NZUPRMOX.js → chunk-ZKXPDUO4.js} +1 -1
  150. package/Marketplace/index.html +2 -2
  151. package/Marketplace/{main-AS37EDUH.js → main-ZZ76NVAH.js} +1 -1
  152. package/Marketplace/{styles-X3FXEB7T.css → styles-EW2SXTVD.css} +1 -1
  153. package/package.json +1 -1
  154. package/Marketplace/chunk-3OIE7ARG.js +0 -1
  155. package/Marketplace/chunk-3ONIF6WO.js +0 -1
  156. package/Marketplace/chunk-4JS5MYC3.js +0 -1
  157. package/Marketplace/chunk-5TKBTQTA.js +0 -2
  158. package/Marketplace/chunk-6RKA4STM.js +0 -1
  159. package/Marketplace/chunk-7PSP3KRN.js +0 -1
  160. package/Marketplace/chunk-7T2AVFH5.js +0 -2
  161. package/Marketplace/chunk-AQTXFEBA.js +0 -1
  162. package/Marketplace/chunk-B5BDARIM.js +0 -1
  163. package/Marketplace/chunk-BOGJ2QV5.js +0 -4
  164. package/Marketplace/chunk-BU5LUO3S.js +0 -1
  165. package/Marketplace/chunk-C5JZPXEW.js +0 -1
  166. package/Marketplace/chunk-DAVYBR3Z.js +0 -5
  167. package/Marketplace/chunk-DHOJLUJI.js +0 -1
  168. package/Marketplace/chunk-DRTTCT2P.js +0 -1
  169. package/Marketplace/chunk-EJG33GYS.js +0 -15
  170. package/Marketplace/chunk-ETOKAGEB.js +0 -2
  171. package/Marketplace/chunk-EWYAB244.js +0 -1
  172. package/Marketplace/chunk-G6VH553U.js +0 -1
  173. package/Marketplace/chunk-GIRXMYNI.js +0 -1
  174. package/Marketplace/chunk-I6VSPSNT.js +0 -1
  175. package/Marketplace/chunk-K5VFEHP7.js +0 -1
  176. package/Marketplace/chunk-K77RTNG2.js +0 -1
  177. package/Marketplace/chunk-K7ZFPSOU.js +0 -1
  178. package/Marketplace/chunk-LDHQNVI5.js +0 -1
  179. package/Marketplace/chunk-MS4AQ6UA.js +0 -0
  180. package/Marketplace/chunk-MSQ7Z3W2.js +0 -1
  181. package/Marketplace/chunk-OPFENZ3W.js +0 -1
  182. package/Marketplace/chunk-OPYO4NH2.js +0 -5
  183. package/Marketplace/chunk-P7NATRFC.js +0 -1
  184. package/Marketplace/chunk-SLI26GUH.js +0 -1
  185. package/Marketplace/chunk-UBXKO4QI.js +0 -1
  186. package/Marketplace/chunk-V2SXQQLG.js +0 -1
  187. package/Marketplace/chunk-V5BKQSAT.js +0 -1
  188. package/Marketplace/chunk-WMYSG6O7.js +0 -1
  189. package/Marketplace/chunk-XHYJOIC5.js +0 -3
  190. package/Marketplace/chunk-YZKPQRLO.js +0 -2
package/package.json CHANGED
@@ -1 +1 @@
1
- {"name":"marketplacepos","version":"5.44.1"}
1
+ {"name":"marketplacepos","version":"5.45.0"}
@@ -1 +0,0 @@
1
- import{a as bt}from"./chunk-M5XGP4SG.js";import{b as xt}from"./chunk-IIZDEGGW.js";import{a as Ct}from"./chunk-CUB2QFUO.js";import{a as rt}from"./chunk-UMP6ZMEJ.js";import{e as st}from"./chunk-JXSBFTQM.js";import{b as lt}from"./chunk-PW42BQIY.js";import{b as pt,c as dt,h as ut,j as gt,k as ht}from"./chunk-UGVEAL7H.js";import{A as at,c as it,h as nt,m as ot}from"./chunk-6QYD6NIJ.js";import{a as mt,c as ct}from"./chunk-SWQXSJ7O.js";import{r as ft,s as _t}from"./chunk-IHNN4Q2N.js";import{g as V,i as et,m as L,n as R}from"./chunk-M2FCTYGU.js";import{$c as I,Fc as S,G as U,Gb as M,Gc as m,Hc as w,Ic as k,Jb as K,K as G,Ka as D,Kc as X,Lc as Z,Mb as u,Mc as tt,Oa as h,Ra as _,X as z,Yb as g,Z as J,ad as y,ca as W,cd as $,dc as P,ea as O,f as j,fa as Y,g as A,ic as r,ja as H,jc as l,kc as B,lc as T,mc as v,nc as Q,oa as q,oc as f,rb as a,rd as N,tc as C,uc as s,v as b,xb as E,ya as p,za as d}from"./chunk-B7KTCPKC.js";function Tt(e,c){e&1&&Q(0)}function vt(e,c){if(e&1&&(T(0),u(1,Tt,1,0,"ng-container",5),v()),e&2){s(2);let t=S(4);a(),g("ngTemplateOutlet",t)}}function wt(e,c){if(e&1&&(r(0,"div",6)(1,"label"),m(2,"Editing Data"),l(),r(3,"div")(4,"span"),m(5),I(6,"number"),l()()()),e&2){let t=s(2);a(5),w(y(6,1,t.value))}}function It(e,c){if(e&1&&(T(0),u(1,vt,2,1,"ng-container",4)(2,wt,7,3,"ng-template",null,1,$),v()),e&2){let t=S(3),i=s();a(),g("ngIf",i.hasPriceEdit)("ngIfElse",t)}}function yt(e,c){if(e&1){let t=f();r(0,"div",7)(1,"input",8),tt("ngModelChange",function(n){p(t);let o=s();return Z(o.value,n)||(o.value=n),d(n)}),l(),r(2,"label",9),m(3),l()()}if(e&2){let t=s();a(),X("ngModel",t.value),g("max",t.maxEditInventory),a(2),w(t.item.Table)}}var Ht=(()=>{class e{constructor(t,i,n){this.dialogRef=t,this.item=i,this.permissionService=n,this.maxEditInventory=1e5,this.permissionService.hasPermission(rt.PriceUpdate).then(o=>this.hasPriceEdit=o)}ngOnInit(){this.selectedChannel=this.item.Variant.Channel.find(t=>t.ChannelID==this.item.ChannelID),this.selectedChannel.ID=this.item.Variant.ID,this.selectedChannel.Sku=this.item.Variant.Code,this.item.Table=="inventory"?(this.value=this.selectedChannel.Inventory,this.maxEditInventory=this.selectedChannel?.TypeID==lt.Tokopedia?1e5:null):this.item.Table=="price"&&(this.value=this.selectedChannel.Price,this.maxEditInventory=null),this.selectedChannel.ItemName=this.item.Name,this.selectedChannel.VarName=this.item.Variant.Model,this.initModalConfig()}initModalConfig(){let t=this.item.Table=="inventory"?"Update Inventory":"Update Price";this.modalConfig=new gt,this.modalConfig.title=`${t} ${this.item?.Name} in ${this.selectedChannel?.Title}`}onSubmit(){this.item.Table=="inventory"?this.selectedChannel.Inventory=this.value:this.item.Table=="price"&&(this.selectedChannel.Price=this.value),this.dialogRef.close(this.selectedChannel)}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(i){return new(i||e)(E(pt),E(dt),E(mt))}}static{this.\u0275cmp=M({type:e,selectors:[["app-table-dialog"]],decls:5,vars:4,consts:[["INVENTORY",""],["DISABLED",""],[3,"onClose","onCancel","onOk","dynamicValidated","config"],["content",""],[4,"ngIf","ngIfElse"],[4,"ngTemplateOutlet"],["matTooltipPosition","above","matTooltip","Cannot edit Unit Price because you dont have access ProductEditor role",1,"info-label-group","mt-3",2,"background","#e9ecef","opacity","1"],[1,"form-label-group","mt-3"],["type","text","name","edit","autoNum","",1,"form-control",3,"ngModelChange","ngModel","max"],["for","edit",1,"text-capitalize"]],template:function(i,n){if(i&1){let o=f();r(0,"modal-material",2),C("onClose",function(){return p(o),d(n.onClose())})("onCancel",function(){return p(o),d(n.onClose())})("onOk",function(){return p(o),d(n.onSubmit())}),r(1,"div",3),u(2,It,4,2,"ng-container",4)(3,yt,4,3,"ng-template",null,0,$),l()()}if(i&2){let o=S(4);g("dynamicValidated",n.value)("config",n.modalConfig),a(2),g("ngIf",n.item.Table=="price")("ngIfElse",o)}},dependencies:[R,V,et,L,ut,Ct,xt,bt,ht,at,it,nt,ot,ct,_t,ft],styles:["mat-form-field[_ngcontent-%COMP%]{width:100%;height:100%}.mat-dialog-title[_ngcontent-%COMP%]{margin-left:1rem;margin-right:1rem}.mat-dialog-content[_ngcontent-%COMP%]{padding-left:.5rem;padding-right:.5rem;margin-left:.5rem;margin-right:.5rem}.font-lg[_ngcontent-%COMP%]{font-size:large}.font-lgr[_ngcontent-%COMP%]{font-size:larger}"]})}}return e})();var Kt=(()=>{class e{transform(t,i,n=0){if(!t)return t;let o=i?parseInt(i,10):10;return t.length>o?t.substring(n,o)+"...":t}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275pipe=K({name:"stringLimit",type:e,pure:!0})}}return e})();function Nt(e,c){if(e&1){let t=f();r(0,"span",6),C("click",function(){p(t);let n=s();return d(n.onGetRowCount())}),r(1,"i",7),m(2,"?"),l()()}}function Dt(e,c){if(e&1&&(T(0),r(1,"span"),m(2),I(3,"number"),l(),v()),e&2){let t=s();a(2),w(y(3,1,t.rowCount()))}}function Et(e,c){if(e&1){let t=f();r(0,"a",10),C("click",function(){p(t);let n=s(2);return d(n.onNextPage())}),B(1,"i",11),m(2," Next"),l()}}function Mt(e,c){if(e&1){let t=f();r(0,"a",12),C("click",function(){p(t);let n=s(2);return d(n.onLastPage())}),B(1,"i",13),m(2," Last"),l()}}function St(e,c){if(e&1&&(r(0,"div",5),u(1,Et,3,0,"a",8)(2,Mt,3,0,"a",9),l()),e&2){let t=s();a(),P(t.disableNextButton()&&!t.goToLastPage()?1:-1),a(),P(t.disableNextButton()&&!t.goToLastPage()?2:-1)}}var ie=(()=>{class e{constructor(){this.totalData=h(0),this.rowCount=h(),this.pageNumber=h(),this.disableNextButton=h(),this.goToLastPage=h(),this.hideCount=h(),this.nextPage=new D,this.lastPage=new D,this.getRowCount=new D}onNextPage(){this.nextPage.emit()}onLastPage(){this.lastPage.emit()}onGetRowCount(){this.getRowCount.emit()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=M({type:e,selectors:[["infinite-paginator"]],inputs:{totalData:[1,"totalData"],rowCount:[1,"rowCount"],pageNumber:[1,"pageNumber"],disableNextButton:[1,"disableNextButton"],goToLastPage:[1,"goToLastPage"],hideCount:[1,"hideCount"]},outputs:{nextPage:"onNextPage",lastPage:"onLastPage",getRowCount:"onGetRowCount"},decls:9,vars:7,consts:[[1,"d-flex","justify-content-between","mt-5"],[1,"me-auto","d-sm-block","collapse","mt-3"],[1,"font-weight-bold","font-italic","hidden-xxs"],[2,"cursor","pointer"],[4,"ngIf"],[1,"btn-group"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0"],["role","button","title","Load more for 20 products",1,"btn","btn-outline-secondary","btn-sm","text-primary",3,"click"],[1,"fas","fa-arrow-right"],["role","button","title","Load all products",1,"btn","btn-outline-secondary","btn-sm","text-primary","border-start-0",3,"click"],[1,"fas","fa-share"]],template:function(i,n){i&1&&(r(0,"div",0)(1,"div",1)(2,"div",2),m(3),I(4,"number"),u(5,Nt,3,0,"span",3)(6,Dt,4,3,"ng-container",4),m(7),l()(),u(8,St,3,2,"div",5),l()),i&2&&(a(3),k(" Showing 1 - ",y(4,5,n.totalData())," of "),a(2),P(n.hideCount()?5:-1),a(),g("ngIf",!n.hideCount()&&n.rowCount()),a(),k(" records ~ ",n.pageNumber()," Page "),a(),P(n.totalData()>0?8:-1))},dependencies:[R,V,L],encapsulation:2})}}return e})();var se=(()=>{class e{constructor(t){this.http=t,this.pagination$=new A(null),this._pageNumber=_(1),this.pageNumber=N(()=>this._pageNumber()),this._hideCount=_(!0),this.hideCount=N(()=>this._hideCount()),this._disableNextButton=_(!0),this.disableNextButton=N(()=>this._disableNextButton()),this._goToLastPage=_(!1),this.isLastPage=N(()=>this._goToLastPage()),this.totalData=_(0),this.destroy$=new j,this.data$=this.paginationFunction()}onNextPage(t){t.PageNumber+=1,this.pagination$.next(t)}setPageNumberFooter(t){this._pageNumber.set(t.PageNumber)}setPaginationButtonState(t,i){i==0?this._disableNextButton.set(!0):this._disableNextButton.set(!(i<t.RowCount*t.PageNumber))}reloadPagination(t){t.PageNumber=1,this.pagination$.next(t),this._hideCount.set(!0),this._goToLastPage.set(!1)}onLastPage(t={}){let i=JSON.parse(JSON.stringify(t));this.totalRowCount$=this.http.post(`/api/${this.fethRowCountEndpoint}`,i).pipe(b(n=>n.Total),O(n=>{this._hideCount.set(!1),i.RowCount=n,i.PageNumber=1,this.pagination$.next(i),this._goToLastPage.set(!0)}))}paginationFunction(){return this.pagination$.pipe(W(this.destroy$),U(t=>t!=null),G(t=>this.http.post(`/API/${this.fetchDataEndpoint}`,JSON.stringify(t)).pipe(b(i=>i.Data?i.Data:[]))),Y(this.pagination$),z((t,i)=>{let[n,o]=t,[x]=i;return o.PageNumber==1?[x,o]:[n.concat(x),o]}),O(([t,i])=>{this.setPageNumberFooter(i);let n=this.calculateProductLength(t);this.totalData.set(n),this.setPaginationButtonState(i,n)}),b(([t])=>t),J())}getRowCount(t){this._hideCount.set(!1),this.totalRowCount$=this.http.post(`/API/${this.fethRowCountEndpoint}`,t).pipe(b(i=>i.Total))}calculateProductLength(t=[]){return t.reduce((n,o)=>n+(o.Variants?.length?o.Variants?.length:0),0)}static{this.\u0275fac=function(i){return new(i||e)(q(st))}}static{this.\u0275prov=H({token:e,factory:e.\u0275fac})}}return e})();export{Ht as a,Kt as b,ie as c,se as d};
@@ -1 +0,0 @@
1
- import{a as ue}from"./chunk-6RKA4STM.js";import{a as ge,b as _e,c as Ce}from"./chunk-V5BKQSAT.js";import{a as fe,b as P}from"./chunk-K77RTNG2.js";import{a as se}from"./chunk-2ODVHD2K.js";import{a as de}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-YM4TJJMM.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as ce}from"./chunk-NOP5P5R5.js";import{a as me}from"./chunk-D6URDVES.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-KMJM6UVY.js";import{b as oe}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import{b as g}from"./chunk-PW42BQIY.js";import{m as le,n as pe}from"./chunk-UGVEAL7H.js";import{A as ne,c as $,h as ee,m as te,o as ie}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as re,s as ae}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Q,k as X,m as Y,n as Z}from"./chunk-M2FCTYGU.js";import{$c as T,Gb as O,Gc as l,Hc as x,Ic as V,Kc as f,Lc as h,Mb as v,Mc as S,Nc as H,Oc as U,Pc as q,Qc as G,Ra as D,Sc as J,Yb as C,Z as I,ac as B,ad as M,bd as K,dc as y,ec as z,gc as R,hc as j,ic as t,ja as F,jc as i,kc as u,oc as L,pa as b,pb as W,rb as a,tc as E,uc as s,ya as d,za as c}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as k,b as N}from"./chunk-66YHNWRR.js";var A=(()=>{class n{constructor(){this.shippingLabelService=b(ue),this.toastrService=b(oe)}printShippingLabel(e){switch(e?.MarketType){case g.Shopee:this.shippingLabelService.printShippingLabelShopee(e.Number,e.ShopID);break;case g.Tiktok:this.shippingLabelService.printShippingLabelTiktok(e.Number,e.ShopID);break;case g.Tokopedia:this.shippingLabelService.printShippingLabelTokopedia(e.Number);break;case g.Lazada:this.shippingLabelService.printShippingLabelLazada(e.Number,e.ShopID);break;case g.Shopify:this.toastrService.error("Shopify not supported","Error Not supported");break}}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275prov=F({token:n,factory:n.\u0275fac})}}return n})();var Se=n=>({"td-cell-hover":n});function we(n,_){if(n&1&&u(0,"variants-dropdown",30),n&2){let e=s().$implicit;C("variants",e==null?null:e.Variants)}}function be(n,_){if(n&1&&u(0,"variant-with-image",31),n&2){let e=s().$implicit;C("variant",e==null?null:e.Variants[0])}}function ve(n,_){if(n&1&&(t(0,"span"),l(1),i()),n&2){let e=s().$implicit;a(),V("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function ye(n,_){if(n&1){let e=L();t(0,"button",35),E("click",function(){d(e);let o=s().$implicit,m=s(2);return c(m.onPrintShippingLabel(o))}),u(1,"i",36),i()}}function xe(n,_){if(n&1&&(t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",26)(5,"div",27)(6,"div"),u(7,"img",28),T(8,"channelImage"),i(),t(9,"div"),u(10,"order-link",29),i()(),t(11,"small"),l(12),T(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),v(17,we,1,1,"variants-dropdown",30)(18,be,1,1,"variant-with-image",31),i(),t(19,"td",32),l(20),T(21,"number"),i(),t(22,"td")(23,"div",26)(24,"div",27)(25,"span"),l(26),i(),v(27,ve,2,1,"span"),i(),t(28,"small"),l(29),i()()(),t(30,"td",33),v(31,ye,2,0,"button",34),i()()),n&2){let e=_.$implicit,p=s(2);a(2),x(e.Outlet),a(5),C("src",M(8,14,e==null?null:e.MarketType),W)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),C("order",e),a(2),V(" ",K(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),x(e.Customer),a(),B(J(21,Se,(e.Variants==null?null:e.Variants.length)>1)),a(),y((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),x(M(21,19,e.Amount)),a(6),x(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),y(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),a(2),V(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),a(2),y((e==null?null:e.MarketType)!=p.channelType.WooCommerce?31:-1)}}function Te(n,_){if(n&1){let e=L();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i(),u(16,"th",24),i()(),t(17,"tbody"),R(18,xe,32,23,"tr",null,z),i()(),t(20,"app-custom-paginator",25),E("next",function(){d(e);let o=s();return c(o.initAwaitingCollection())})("previous",function(){d(e);let o=s();return c(o.initAwaitingCollection())}),i()()}if(n&2){let e=s(),p=q(0);a(18),j(p),a(2),C("filter",e.filter())("totaldata",p==null?null:p.length)}}function Le(n,_){n&1&&(t(0,"div",16),u(1,"app-empty-state"),i())}var it=(()=>{class n{constructor(){this.printShippingService=b(A),this.orderService=b(P),this.channelType=g,this.filter=D({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(p=>N(k({},p),{From:e})),this.initAwaitingCollection()}initAwaitingCollection(){this.awaitingCollections$=this.orderService.getAwaitingCollectionOrders(this.filter()).pipe(I(1))}onPrintShippingLabel(e){this.printShippingService.printShippingLabel(e)}static{this.\u0275fac=function(p){return new(p||n)}}static{this.\u0275cmp=O({type:n,selectors:[["app-awaiting-collection"]],features:[G([P,A])],decls:34,vars:11,consts:[["headerTitle","Awaiting Collection","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","10px"],["rowCountApi","/api/orders/awaitingcollectioncount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"text-end","td-cell-hover"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent"],["type","button","aria-label","Print order","title","Print","matTooltip","Download shipping label",1,"btn","p-0","border-0","bg-transparent",3,"click"],["aria-hidden","true",1,"fa-solid","fa-arrow-down-to-line"]],template:function(p,o){if(p&1){let m=L();H(0),T(1,"async"),t(2,"mainpanel",0),E("onSubmit",function(){return d(m),c(o.initAwaitingCollection())}),S("textChange",function(r){return d(m),h(o.filter().Number,r)||(o.filter().Number=r),c(r)}),t(3,"actions")(4,"a",1),u(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),S("ngModelChange",function(r){return d(m),h(o.filter().ListChannelID,r)||(o.filter().ListChannelID=r),c(r)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),S("dateChange",function(r){return d(m),h(o.filter().From,r)||(o.filter().From=r),c(r)}),i()(),t(18,"div")(19,"datepicker",8),S("dateChange",function(r){return d(m),h(o.filter().To,r)||(o.filter().To=r),c(r)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),S("ngModelChange",function(r){return d(m),h(o.filter().PageNumber,r)||(o.filter().PageNumber=r),c(r)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),S("ngModelChange",function(r){return d(m),h(o.filter().PageSize,r)||(o.filter().PageSize=r),c(r)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),v(32,Te,21,2,"div",15)(33,Le,2,0,"div",16),i()()()()()}if(p&2){let m=U(M(1,8,o.awaitingCollections$));a(2),f("text",o.filter().Number),a(10),C("multiple",!0),f("ngModel",o.filter().ListChannelID),a(5),f("date",o.filter().From),a(2),f("date",o.filter().To),a(4),f("ngModel",o.filter().PageNumber),a(4),f("ngModel",o.filter().PageSize),a(5),y((m==null?null:m.length)>0?32:33)}},dependencies:[Z,Q,Y,X,pe,le,de,me,ne,$,ie,ee,te,ge,_e,Ce,se,ce,ae,re,fe],encapsulation:2})}}return n})();export{it as AwaitingCollectionComponent};
@@ -1 +0,0 @@
1
- import{a as Ve,b as Re,c as Ne}from"./chunk-V5BKQSAT.js";import{a as Le,b as se}from"./chunk-K77RTNG2.js";import{a as Ie}from"./chunk-2ODVHD2K.js";import{a as Fe}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as Ee}from"./chunk-NOP5P5R5.js";import{a as Pe}from"./chunk-D6URDVES.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as I}from"./chunk-KMJM6UVY.js";import{b as Te,e as X}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{c as Z,d as $,e as ee}from"./chunk-5JVEEL2T.js";import{b as C,c as U}from"./chunk-PW42BQIY.js";import{b as te,c as ie,d as xe,e as ne,f as oe,g as be,h as re,m as Oe,n as Me}from"./chunk-UGVEAL7H.js";import{A as E,c as ve,h as z,m as H,o as ke}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as we,s as De}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as Ce,k as j,m as ye,n as M}from"./chunk-M2FCTYGU.js";import{$c as b,G as ae,Gb as w,Gc as a,Hc as y,Ic as B,Kc as v,Lc as k,Mb as P,Mc as T,Na as Y,Nc as ue,Oa as q,Oc as he,Pc as ge,Qc as fe,Ra as S,Rc as _e,Sc as Se,Yb as g,Z as me,_b as le,aa as pe,ac as de,ad as J,bd as F,dc as D,ec as V,gc as R,hc as N,ic as o,ja as A,jc as r,kc as x,oc as O,pa as h,pb as ce,rb as p,rd as Q,tc as c,uc as d,v as G,ya as f,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as W,b as K}from"./chunk-66YHNWRR.js";function qe(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("DROP_OFF"))}),o(1,"div",11),x(2,"i",12),o(3,"h3",13),a(4,"Drop off"),r()(),o(5,"p",14),a(6," You can drop off your package at the nearest shipping counter in your city. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="PICK_UP")("selected",e.selectedDelivery()==="DROP_OFF")}}function Je(n,u){if(n&1){let e=O();o(0,"div",10),c("click",function(){f(e);let i=d();return _(i.onSelectDelivery("PICK_UP"))}),o(1,"div",11),x(2,"i",15),o(3,"h3",16),a(4,"Pick up"),r()(),o(5,"p",17),a(6," The courier will collect the package from your address. "),r()()}if(n&2){let e=d();le("text-muted",e.selectedDelivery()&&e.selectedDelivery()==="DROP_OFF")("selected",e.selectedDelivery()==="PICK_UP")}}var We=(()=>{class n{constructor(){this.data=h(ie),this.dialogRef=h(te),this.selectedDelivery=S("DROP_OFF"),this.showPickup=S(!0),this.showDropOff=S(!0),this.initOptionsCondition()}onSelectDelivery(e){this.selectedDelivery.set(e)}initOptionsCondition(){switch(this.data.channelType){case C.Shopee:break;case C.Tiktok:this.showPickup.set(this.data.options?.Form?.information?.can_pickup),this.showDropOff.set(this.data.options?.Form?.information?.can_drop_off);break}}onConfirm(){this.dialogRef.close(this.selectedDelivery())}onClose(){this.dialogRef.close()}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-delivery-dialog"]],decls:16,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-8"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"ms-2"],[1,"text-secondary-emphasis"],[1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[1,"pb-0"],[1,"d-flex","align-items-center","justify-content-center","gap-12"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"text-muted","selected"],[1,"d-flex","justify-content-end",2,"margin-top","1.5rem"],[1,"btn","btn-light-blue","me-3","text-primary","btn-lg","fw-bold","mx-3","py-6",2,"width","70px",3,"click"],["role","button",1,"delivery-option","d-flex","flex-column","align-items-center","justify-content-center","p-4","cursor-pointer",3,"click"],[1,"text-center"],[1,"fa-solid","fa-cart-shopping-fast","fa-4x"],[1,"mt-4","titlew"],[1,"text-center","mt-4","lh-sm","subtitlew"],[1,"fa-solid","fa-hand-holding-box","fa-4x"],[1,"mt-4"],[1,"text-center","mt-4","lh-sm"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"div",1)(2,"div",2)(3,"h2"),a(4,"Delivery Order"),r(),o(5,"div",3),a(6,"Your selected order(s) will be set to"),r()(),o(7,"div")(8,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(9,"mat-dialog-content",5)(10,"div",6),P(11,qe,7,4,"div",7)(12,Je,7,4,"div",7),r(),o(13,"div",8)(14,"button",9),c("click",function(){return i.onConfirm()}),a(15," OK "),r()()()),t&2&&(p(11),D(i.showPickup()?11:-1),p(),D(i.showDropOff()?12:-1))},dependencies:[M,re,ne,oe],styles:[".delivery-option[_ngcontent-%COMP%]{width:14rem;height:12rem;border:1px solid #656565}.delivery-option[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{margin-bottom:0}.delivery-option.text-muted[_ngcontent-%COMP%]{border-color:#000;color:#000}.delivery-option.selected[_ngcontent-%COMP%]{color:#5e9708;border-color:#5e9708}.delivery-option.selected[_ngcontent-%COMP%] .titlew[_ngcontent-%COMP%]{color:#5e9708;font-weight:700}.delivery-option.selected[_ngcontent-%COMP%] .subtitlew[_ngcontent-%COMP%]{color:#5e9708}"]})}}return n})();function Xe(n,u){if(n&1&&(o(0,"ng-option",3),a(1),r()),n&2){let e=u.$implicit;g("value",e==null?null:e.address_id)("matTooltip",e==null?null:e.address),p(),y(e==null?null:e.address)}}function Ze(n,u){if(n&1&&(o(0,"ng-option",6)(1,"span",7),a(2),b(3,"date"),r(),o(4,"span"),a(5),r()()),n&2){let e=u.$implicit;g("value",e==null?null:e.pickup_time_id),p(2),y(F(3,3,e==null?null:e.date,"d MMMM")),p(3),y(e==null?null:e.time_text)}}var je=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.addressList=Q(()=>this.shippingOptions()?.response?.pickup?.address_list||[]),this.selectedShipping=S(null),this.timeOptions=S(this.convertTimestampToDate(this.addressList()[0]?.time_slot_list||[])),this.pickupTime=S(null)}onAddressChange(e){let t=this.addressList().find(i=>i.address_id===e);this.timeOptions.set(this.convertTimestampToDate(t?.time_slot_list||[])),this.pickupTime.set(null)}onValueChanges(){this.onFormChanges.emit({address_id:this.selectedShipping(),pickup_time_id:this.pickupTime()})}convertTimestampToDate(e){return e.map(t=>{let i=new Date(t.date*1e3);return K(W({},t),{date:i})})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["shopee-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:12,vars:4,consts:[[1,"mb-6"],["for","address",1,"mb-2","text-muted"],["id","address","placeholder","Select Address to Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value","matTooltip"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Date Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Address"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedShipping,s)||(i.selectedShipping=s),s}),c("ngModelChange",function(s){return i.onAddressChange(s),i.onValueChanges()}),R(4,Xe,2,3,"ng-option",3,V),r()(),o(6,"div",0)(7,"label",4),a(8,"Date"),r(),o(9,"ng-select",5),T("ngModelChange",function(s){return k(i.pickupTime,s)||(i.pickupTime=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(10,Ze,6,6,"ng-option",6,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedShipping),p(),N(i.addressList()),p(5),g("clearable",!1),v("ngModel",i.pickupTime),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H,De,we],encapsulation:2})}}return n})();function $e(n,u){if(n&1&&(o(0,"ng-option",3)(1,"span",4),a(2),b(3,"date"),r(),o(4,"span"),a(5),b(6,"date"),r(),o(7,"span",5),a(8,"-"),r(),o(9,"span"),a(10),b(11,"date"),r()()),n&2){let e=u.$implicit,t=u.$index;g("value",t),p(2),y(F(3,4,e==null?null:e.start_date,"d MMMM")),p(3),y(F(6,7,e==null?null:e.start_date,"HH:mm")),p(5),y(F(11,10,e==null?null:e.end_date,"HH:mm"))}}var ze=(()=>{class n{constructor(){this.shippingOptions=q(),this.onFormChanges=Y(),this.timeOptions=Q(()=>this.shippingOptions()?.Options?.pickup_slots),this.selectedTimeIndex=S(null)}onValueChanges(){let e=this.timeOptions()[this.selectedTimeIndex()];this.onFormChanges.emit({start_time:e?.start_time,end_time:e?.end_time})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["tiktok-pickup"]],inputs:{shippingOptions:[1,"shippingOptions"]},outputs:{onFormChanges:"onFormChanges"},decls:6,vars:2,consts:[[1,"mb-6"],["for","timepicker",1,"mb-2","text-muted"],["id","timepicker","placeholder","Select Time Pickup","appendTo","body",1,"shipping-timepicker",3,"ngModelChange","clearable","ngModel"],[3,"value"],[1,"me-2"],[1,"mx-1"]],template:function(t,i){t&1&&(o(0,"div",0)(1,"label",1),a(2,"Time"),r(),o(3,"ng-select",2),T("ngModelChange",function(s){return k(i.selectedTimeIndex,s)||(i.selectedTimeIndex=s),s}),c("ngModelChange",function(){return i.onValueChanges()}),R(4,$e,12,13,"ng-option",3,V),r()()),t&2&&(p(3),g("clearable",!1),v("ngModel",i.selectedTimeIndex),p(),N(i.timeOptions()))},dependencies:[M,j,ee,$,Z,E,z,H],encapsulation:2})}}return n})();function et(n,u){if(n&1){let e=O();o(0,"shopee-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}function tt(n,u){if(n&1){let e=O();o(0,"tiktok-pickup",10),c("onFormChanges",function(i){f(e);let l=d();return _(l.onFormChanges(i))}),r()}if(n&2){let e=d();g("shippingOptions",e.dialogData.shippingOptions)}}var He=(()=>{class n{constructor(){this.dialogRef=h(te),this.dialogData=h(ie),this.shippingOptions=S(this.dialogData.shippingOptions),this.channelType=S(this.dialogData.channelType),this.order=S(this.dialogData.order),this.channelTypeEnum=C,this.pickupData=S(null)}onFormChanges(e){this.pickupData.set(e)}onClose(){this.dialogRef.close()}onSave(){let e=this.generatePickupData();this.dialogRef.close(e)}generatePickupData(){switch(this.channelType()){case C.Shopee:return{OrderNumber:this.order().Number,ShopID:this.order().ShopID,pickup:this.pickupData()};case C.Tiktok:return{handover_method:"PICKUP",PackageID:this.shippingOptions().Form?.information?.PackageID,ShopID:this.order().ShopID,pickup_slot:this.pickupData()}}}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-pickup-dialog"]],decls:21,vars:2,consts:[["mat-dialog-title","",1,"mt-12","mb-6"],[1,"d-flex","justify-content-between","align-items-start","lh-lg"],[1,"lh-base","mt-6"],[1,"text-muted","fs-6"],["role","button",1,"fa-solid","fa-xmark","text-muted","cursor-pointer","fs-3",3,"click"],[2,"padding-bottom","10px"],[3,"shippingOptions"],[1,"d-flex","justify-content-end","align-items-center","w-100","pe-8","mb-4"],[1,"btn","btn-outline-secondary","me-4",2,"width","70px",3,"click"],[1,"btn","btn-success",2,"width","70px",3,"click"],[3,"onFormChanges","shippingOptions"]],template:function(t,i){if(t&1&&(o(0,"div",0)(1,"div",1)(2,"div")(3,"h3"),a(4,"Set Pickup"),r(),o(5,"div",2)(6,"div",3),a(7,"Shipping Method"),r(),o(8,"div",3),a(9),r()()(),o(10,"div")(11,"i",4),c("click",function(){return i.onClose()}),r()()()(),o(12,"mat-dialog-content",5),P(13,et,1,1,"shopee-pickup",6)(14,tt,1,1,"tiktok-pickup",6),r(),o(15,"mat-dialog-actions")(16,"div",7)(17,"button",8),c("click",function(){return i.onClose()}),a(18," Cancel "),r(),o(19,"button",9),c("click",function(){return i.onSave()}),a(20," Ok "),r()()()),t&2){let l,s;p(9),B(" ",!((l=i.order())==null||l.LogisticService==null)&&l.LogisticService.Name?(l=i.order())==null||l.LogisticService==null?null:l.LogisticService.Name:"-"," "),p(4),D((s=i.channelType())===i.channelTypeEnum.Shopee?13:s===i.channelTypeEnum.Tiktok?14:-1)}},dependencies:[M,re,ne,be,oe,E,je,ze],styles:['ng-select.shipping-timepicker .ng-arrow{border:none!important;width:0;height:0} ng-select.shipping-timepicker .ng-arrow-wrapper{width:28px;display:flex;align-items:center;justify-content:center} ng-select.shipping-timepicker .ng-arrow-wrapper:after{content:"\\f107";font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-style:normal;font-weight:400!important;font-size:16px;line-height:1;display:inline-block;color:#6b7280;pointer-events:none;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:auto}.label-opacity[_ngcontent-%COMP%]{opacity:.7}']})}}return n})();var Ue=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetTiktokShippingOptions,{OrderNumber:e,ShopID:t}).pipe(G(i=>this.formatDatePickUpOptions(i)))}pickupOrder(e){return this.httpService.post(I.TiktokSelectShipping,e)}dropOffOrder(e,t){let i={handover_method:"DROP_OFF",PackageID:e,ShopID:t};return this.httpService.post(I.TiktokSelectShipping,i)}formatDatePickUpOptions(e){return e?.Options?.pickup_slots&&(e.Options.pickup_slots=e?.Options?.pickup_slots.map(t=>{let i=U.convertTimestampToDate(t.start_time),l=U.convertTimestampToDate(t.end_time);return t.start_date=i,t.end_date=l,t})),e}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ke=(()=>{class n{constructor(){this.httpService=h(X)}getShippingOptions(e,t){return this.httpService.post(I.GetShopeeShippingOptions,{OrderNumber:e,ShopID:t})}pickupOrder(e){return this.httpService.post(I.ShopeeSelectShipping,e)}dropOffOrder(e,t){let i={OrderNumber:e,ShopID:t,dropoff:{}};return this.httpService.post(I.ShopeeSelectShipping,i)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Ge=(()=>{class n{constructor(){this.shopeeShippingService=h(Ke),this.tiktokShippingService=h(Ue)}getShippingOptions(e,t,i){switch(i){case C.Shopee:return this.getShopeeShippingOptions(e,t);case C.Tiktok:return this.getTiktokShippingOptions(e,t)}}pickupOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.pickupOrder(t);case C.Tiktok:return this.tiktokShippingService.pickupOrder(t)}}dropOffOrder(e,t){switch(e.MarketType){case C.Shopee:return this.shopeeShippingService.dropOffOrder(e.Number,e.ShopID);case C.Tiktok:let i=t?.Form?.information?.PackageID;return this.tiktokShippingService.dropOffOrder(i,e.ShopID)}}getShopeeShippingOptions(e,t){return this.shopeeShippingService.getShippingOptions(e,t)}getTiktokShippingOptions(e,t){return this.tiktokShippingService.getShippingOptions(e,t)}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275prov=A({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var it=()=>[],nt=n=>({"td-cell-hover":n});function ot(n,u){if(n&1&&x(0,"variants-dropdown",30),n&2){let e=d().$implicit;g("variants",e==null?null:e.Variants)}}function rt(n,u){if(n&1&&x(0,"variant-with-image",31),n&2){let e=d().$implicit;g("variant",e==null?null:e.Variants[0])}}function at(n,u){if(n&1&&(o(0,"span"),a(1),r()),n&2){let e=d().$implicit;p(),B("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function pt(n,u){if(n&1){let e=O();o(0,"button",35),c("click",function(){f(e);let i=d().$implicit,l=d(2);return _(l.onSetFulfillment(i))}),a(1," Set Fulfillment "),r()}}function lt(n,u){if(n&1&&(o(0,"tr")(1,"td"),a(2),r(),o(3,"td")(4,"div",26)(5,"div",27)(6,"div"),x(7,"img",28),b(8,"channelImage"),r(),o(9,"div"),x(10,"order-link",29),r()(),o(11,"small"),a(12),b(13,"date"),r()()(),o(14,"td"),a(15),r(),o(16,"td"),P(17,ot,1,1,"variants-dropdown",30)(18,rt,1,1,"variant-with-image",31),r(),o(19,"td",32),a(20),b(21,"number"),r(),o(22,"td")(23,"div",26)(24,"div",27)(25,"span"),a(26),r(),P(27,at,2,1,"span"),r(),o(28,"small"),a(29),r()()(),o(30,"td",33),P(31,pt,2,0,"button",34),r()()),n&2){let e=u.$implicit,t=d(2);p(2),y(e.Outlet),p(5),g("src",J(8,14,e==null?null:e.MarketType),ce)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),p(3),g("order",e),p(2),B(" ",F(13,16,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),p(3),y(e.Customer),p(),de(Se(21,nt,(e.Variants==null?null:e.Variants.length)>1)),p(),D((e.Variants==null?null:e.Variants.length)>1?17:18),p(3),y(J(21,19,e.Amount)),p(6),y(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),p(),D(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),p(2),B(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," "),p(2),D((e==null?null:e.MarketType)!=t.channelType.WooCommerce?31:-1)}}function st(n,u){if(n&1){let e=O();o(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),a(5,"Outlet"),r(),o(6,"th",21),a(7,"Number"),r(),o(8,"th",21),a(9,"Customer"),r(),o(10,"th"),a(11,"Items"),r(),o(12,"th",22),a(13,"Amount"),r(),o(14,"th",23),a(15,"Shipping"),r(),x(16,"th",24),r()(),o(17,"tbody"),R(18,lt,32,23,"tr",null,V),r()(),o(20,"app-custom-paginator",25),c("next",function(){f(e);let i=d();return _(i.initReadyToShip())})("previous",function(){f(e);let i=d();return _(i.initReadyToShip())}),r()()}if(n&2){let e=d(),t=ge(0);p(18),N(t),p(2),g("filter",e.filter())("totaldata",t==null?null:t.length)}}function mt(n,u){n&1&&(o(0,"div",16),x(1,"app-empty-state"),r())}var Mi=(()=>{class n{constructor(){this.dialog=h(xe),this.pickupService=h(Ge),this.toastr=h(Te),this.orderService=h(se),this.channelType=C,this.filter=S({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(t=>K(W({},t),{From:e})),this.initReadyToShip()}initReadyToShip(){this.readyToShip$=this.orderService.getReadyToShipOrders(this.filter()).pipe(me(1))}onFilterChange(e){this.filter.update(t=>W(W({},t),e))}onSetFulfillment(e){this.pickupService.getShippingOptions(e.Number,e.ShopID,e.MarketType).pipe(pe(t=>this.dialog.open(We,{height:"400px",width:"530px",data:{options:t,channelType:e.MarketType}}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),G(i=>({type:i,order:e,options:t}))))).subscribe(t=>{t.type=="PICK_UP"?this.onSelectPickup(t.order,t.options):this.onSelectDropOff(t.order,t.options)})}onSelectPickup(e,t){this.dialog.open(He,{width:"530px",data:{order:e,shippingOptions:t,channelType:e.MarketType},disableClose:!0}).afterClosed().pipe(ae(i=>U.IsNotEmpty(i)),pe(i=>this.pickupService.pickupOrder(e,i))).subscribe(()=>{this.toastr.success("Pickup order created successfully","Success"),this.initReadyToShip()})}onSelectDropOff(e,t){this.pickupService.dropOffOrder(e,t).subscribe(()=>{this.toastr.success("Drop-off order created successfully","Success"),this.initReadyToShip()})}static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=w({type:n,selectors:[["app-ready-to-ship"]],features:[fe([se])],decls:34,vars:12,consts:[["headerTitle","To Ship","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],[2,"width","160px"],["rowCountApi","/api/orders/toshipcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","14px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"],[1,"actions-cell"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem"],[1,"btn","btn-success","btn-sm",2,"--bs-btn-padding-y","0.25rem","--bs-btn-padding-x","0.5rem","--bs-btn-font-size","0.75rem",3,"click"]],template:function(t,i){if(t&1){let l=O();ue(0),b(1,"async"),o(2,"mainpanel",0),c("onSubmit",function(){return f(l),_(i.initReadyToShip())}),T("textChange",function(m){return f(l),k(i.filter().Number,m)||(i.filter().Number=m),_(m)}),o(3,"actions")(4,"a",1),x(5,"i",2),o(6,"span"),a(7,"Order Fulfillment Display"),r()()(),o(8,"filters")(9,"div")(10,"label",3),a(11,"From/To"),r(),o(12,"channel-select-options",4),T("ngModelChange",function(m){return f(l),k(i.filter().ListChannelID,m)||(i.filter().ListChannelID=m),_(m)}),r()(),o(13,"div",5)(14,"label",3),a(15,"From/To"),r(),o(16,"div",6)(17,"datepicker",7),T("dateChange",function(m){return f(l),k(i.filter().From,m)||(i.filter().From=m),_(m)}),r()(),o(18,"div")(19,"datepicker",8),T("dateChange",function(m){return f(l),k(i.filter().To,m)||(i.filter().To=m),_(m)}),r()()(),o(20,"div",5)(21,"label",9),a(22,"Page Number"),r(),o(23,"input",10),T("ngModelChange",function(m){return f(l),k(i.filter().PageNumber,m)||(i.filter().PageNumber=m),_(m)}),r()(),o(24,"div",5)(25,"label",9),a(26,"Page Size"),r(),o(27,"input",11),T("ngModelChange",function(m){return f(l),k(i.filter().PageSize,m)||(i.filter().PageSize=m),_(m)}),r()()(),o(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),P(32,st,21,2,"div",15)(33,mt,2,0,"div",16),r()()()()()}if(t&2){let l=he(J(1,8,i.readyToShip$)||_e(11,it));p(2),v("text",i.filter().Number),p(10),g("multiple",!0),v("ngModel",i.filter().ListChannelID),p(5),v("date",i.filter().From),p(2),v("date",i.filter().To),p(4),v("ngModel",i.filter().PageNumber),p(4),v("ngModel",i.filter().PageSize),p(5),D(l.length>0?32:33)}},dependencies:[M,Ce,ye,j,Me,Oe,Fe,Pe,E,ve,ke,z,H,Ve,Re,Ne,Ie,Ee,Le],styles:[".actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]{opacity:0;visibility:hidden;transition:opacity .12s ease-in-out}tr[_ngcontent-%COMP%]:hover .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:hover .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%]:focus-within .btn[_ngcontent-%COMP%], .actions-cell[_ngcontent-%COMP%] .btn[_ngcontent-%COMP%]:focus{opacity:1;visibility:visible}"]})}}return n})();export{Mi as ReadyToShipComponent};
@@ -1,2 +0,0 @@
1
- import{a as V}from"./chunk-OPYO4NH2.js";import{b as ze}from"./chunk-ZQ5EGXEB.js";import"./chunk-3LRWABHB.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import{a as Ke}from"./chunk-AO46RPZ4.js";import"./chunk-5KS4WK6H.js";import{a as ee}from"./chunk-XHAXYWZ7.js";import{a as He,b as Ge,c as Ye,d as J}from"./chunk-3OIE7ARG.js";import{a as je,b as Qe}from"./chunk-YPWHTELF.js";import"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-RECNBAEB.js";import"./chunk-IA6KOBDJ.js";import"./chunk-M5XGP4SG.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import{a as $e}from"./chunk-F63CEOOT.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import{a as We}from"./chunk-SYUFPF3D.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as X}from"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as Oe,b as Ue,c as Be}from"./chunk-E2SXYIML.js";import"./chunk-CMTBBXR5.js";import"./chunk-J5OHT4GM.js";import{h as Fe}from"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import{a as be}from"./chunk-KMJM6UVY.js";import{b as Se,e as ye}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{e as Te}from"./chunk-5JVEEL2T.js";import{c as f}from"./chunk-PW42BQIY.js";import{b as De,c as Pe,d as Ee,j as Me,k as Ve,l as Le,m as Ne,n as Ae}from"./chunk-UGVEAL7H.js";import{A as xe,b as ue,c as he,h as Ce,m as ge,o as fe}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import{a as ve,b as Ie,c as we}from"./chunk-SWQXSJ7O.js";import{r as ke,s as Re}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{H as de,J as _e,d as ce,g as pe,j as $,k as W,m as me,n as j}from"./chunk-M2FCTYGU.js";import{$c as g,Fc as Z,G as z,Gb as U,Gc as c,Hc as O,Ic as I,Kc as b,Lc as F,Mb as h,Mc as T,Nc as ae,Oc as le,Pc as re,Qc as B,Ra as k,Rc as se,Sc as E,Yb as m,Z as N,ac as ie,ad as y,bd as R,cd as q,dc as v,ea as H,ec as G,gc as Y,hc as K,ic as a,jc as l,kc as x,lc as D,mc as P,oc as S,pa as M,pb as A,rb as s,tc as C,uc as r,v as L,xb as w,xc as oe,ya as d,za as _}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as Q}from"./chunk-66YHNWRR.js";var tt=()=>["/menu/orderV2/download"];function nt(n,p){if(n&1&&(a(0,"li",4)(1,"div"),c(2," The last time you manually download your order is on "),a(3,"span",8),c(4),g(5,"date"),l()(),a(6,"div",9),c(7),l()()),n&2){r();let e=re(0);s(4),I(" ",R(5,2,e==null?null:e.OrderDownloadLatestOn,"dd MMM yyyy HH:mm")," "),s(3),I("(",e==null?null:e.calculatedDate,")")}}function it(n,p){n&1&&(a(0,"li",4),c(1," The last time you manually download your order is on (-) "),l())}var Ze=(()=>{class n{constructor(){this.dialogRef=M(De),this.data=M(Pe),this.modalConfig=new Me,this.inventoryService=M(V),this.lastDownloadInfo$=this.inventoryService.getLastInfoDownloadInventory(this.data.channelId).pipe(L(e=>{let o=e.OrderDownloadLatestOn!=f.MinDate,t=null,i=null;return o&&(t=new Date(e.OrderDownloadLatestOn),i=f.convertToReadableDate(t)),{OrderDownloadLatestOn:t,calculatedDate:i}}),N(1)),this.selectedProducts=k(this.data.selectedProducts||[]),this.modalConfig.title="Manual Inventory Sync",this.modalConfig.customWidth="500px",this.modalConfig.bodyScrollable=!0,this.modalConfig.hideOk=!0,this.modalConfig.hideCancel=!0}onUpdate(){this.dialogRef.close(!0)}onCancel(){this.dialogRef.close(!1)}static{this.\u0275fac=function(o){return new(o||n)}}static{this.\u0275cmp=U({type:n,selectors:[["app-dialog-update-product-info"]],features:[B([V])],decls:16,vars:8,consts:[[3,"onCancel","config"],["content",""],[1,"container"],[1,"mt-8"],[1,"lh-base"],["footer",""],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","routerLink"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3","py-8",3,"click","keyup.F2"],[1,"fw-bold","me-1"],[1,"fw-bold"]],template:function(o,t){if(o&1){let i=S();ae(0),g(1,"async"),a(2,"modal-material",0),C("onCancel",function(){return d(i),_(t.onCancel())}),a(3,"div",1)(4,"div",2)(5,"h4"),c(6),l(),a(7,"div",3)(8,"ul"),h(9,nt,8,5,"li",4)(10,it,2,0,"li",4),l()()()(),a(11,"div",5)(12,"a",6),C("click",function(){return d(i),_(t.onCancel())}),c(13," Download "),l(),a(14,"button",7),C("click",function(){return d(i),_(t.onUpdate())})("keyup.F2",function(){return d(i),_(t.onUpdate())}),c(15," Update Anyway "),l()()()}if(o&2){let i=le(y(1,4,t.lastDownloadInfo$));s(2),m("config",t.modalConfig),s(4),I("",t.selectedProducts().length," Product(s) will be updated."),s(3),v(i!=null&&i.OrderDownloadLatestOn?9:10),s(3),m("routerLink",se(7,tt))}},dependencies:[Ve,j,$,W,_e,de],encapsulation:2})}}return n})();var te=n=>[n],ot=n=>({"text-decoration-line-through":n}),at=n=>({"me-10":n}),lt=n=>({"bg-gradient-warning":n}),rt=n=>({cursor:n});function st(n,p){if(n&1){let e=S();a(0,"button",39),C("click",function(){d(e);let t=r().ngIf,i=r(2);return _(i.onScanInventory(t))}),x(1,"i",40),c(2,"Refresh "),l()}}function ct(n,p){if(n&1){let e=S();a(0,"div",37)(1,"button",41),C("click",function(){d(e);let t=r().ngIf,i=r(2);return _(i.onOpenDialogUpdateStockInfo(t))}),x(2,"i",42),c(3," Update "),l(),x(4,"button",43),a(5,"ul",44)(6,"a",45),C("click",function(){d(e);let t=r(3);return _(t.openExportDialog())}),x(7,"i",46),a(8,"span"),c(9,"Export"),l()()()()}}function pt(n,p){if(n&1){let e=S();a(0,"button",47),C("click",function(){d(e);let t=r(3);return _(t.openExportDialog())}),x(1,"i",46),a(2,"span"),c(3,"Export"),l()()}}function mt(n,p){if(n&1&&(a(0,"div"),h(1,st,3,0,"button",36)(2,ct,10,0,"div",37)(3,pt,4,0,"button",38),l()),n&2){let e=p.ngIf,o=r(2);s(),m("ngIf",o.productService.hasSelectionVariant(e)),s(),v(o.productService.hasSelectionVariant(e)?2:3)}}function dt(n,p){n&1&&(a(0,"div",48)(1,"span"),c(2," showing only different stock, please press next to populate more data "),l()())}function _t(n,p){if(n&1){let e=S();a(0,"th")(1,"input",49),T("ngModelChange",function(t){d(e);let i=r(3);return F(i.checkboxState,t)||(i.checkboxState=t),_(t)}),C("ngModelChange",function(){let t=d(e).ngIf,i=r(3);return _(i.onCheckboxStateChange(t))}),l()()}if(n&2){let e=r(3);s(),b("ngModel",e.checkboxState)}}function ut(n,p){if(n&1&&(D(0),h(1,_t,2,1,"th",5),g(2,"async"),P()),n&2){let e=r(2);s(),m("ngIf",y(2,1,e.products$))}}function ht(n,p){n&1&&(a(0,"th",33),c(1," Reserved "),l())}function Ct(n,p){if(n&1){let e=S();a(0,"input",65),T("ngModelChange",function(t){d(e);let i=r(4).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),C("ngModelChange",function(){d(e);let t=r(4).$implicit,i=r(2);return _(i.onCheckboxStateProduct(t))}),l()}if(n&2){let e=r(4).$implicit;b("ngModel",e.selected)}}function gt(n,p){if(n&1&&(D(0),a(1,"div",63),h(2,Ct,1,1,"input",64),l(),P()),n&2){let e=r(3).$implicit;s(),m("ngClass",E(2,at,e.Variants.length<=1)),s(),v(e.Variants.length>1?2:-1)}}function ft(n,p){if(n&1){let e=S();a(0,"img",66),C("click",function(t){d(e);let i=r(3).$implicit,u=r(2);return _(u.onZoomImage(t,i==null?null:i.ImageUrl))}),l()}if(n&2){let e=r(3).$implicit;oe("src",e==null?null:e.ThumbnailUrl,A)}}function xt(n,p){n&1&&x(0,"img",60)}function St(n,p){if(n&1&&(x(0,"br"),a(1,"div",67),x(2,"i",68),a(3,"small"),c(4),l()()),n&2){let e=r(3).$implicit;s(4),I("(",e==null?null:e.Category,")")}}function yt(n,p){if(n&1&&(a(0,"td",58)(1,"div",14),h(2,gt,3,4,"ng-container",27),a(3,"div"),h(4,ft,1,1,"img",59)(5,xt,1,0,"img",60),l()()(),a(6,"td",61)(7,"span",62),c(8),l(),h(9,St,5,1),l()),n&2){let e=r(2).$implicit,o=r(2);m("rowSpan",e==null?null:e.Variants.length),s(2),m("ngxPermissionsOnly",E(6,te,o.inventoryUpdateRole)),s(2),v(e!=null&&e.ThumbnailUrl?4:5),s(2),m("rowSpan",e==null?null:e.Variants.length),s(2),O(e==null?null:e.Name),s(),v(e.CategoryID!==null&&e.CategoryID!=o.guidEmpty?9:-1)}}function vt(n,p){if(n&1){let e=S();a(0,"input",49),T("ngModelChange",function(t){d(e);let i=r(3).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),l()}if(n&2){let e=r(3).$implicit;b("ngModel",e.selected)}}function It(n,p){if(n&1&&h(0,vt,1,1,"input",70),n&2){let e=r(2).$implicit;v((e==null?null:e.Inventory)<=1e5?0:-1)}}function wt(n,p){if(n&1){let e=S();a(0,"input",49),T("ngModelChange",function(t){d(e);let i=r(2).$implicit;return F(i.selected,t)||(i.selected=t),_(t)}),l()}if(n&2){let e=r(2).$implicit;b("ngModel",e.selected)}}function bt(n,p){if(n&1&&(D(0),a(1,"td",69),h(2,It,1,1)(3,wt,1,1,"input",70),l(),P()),n&2){let e=r().$implicit;s(2),v((e==null?null:e.Channel[0].TypeID)==1?2:(e==null?null:e.Inventory)>=0?3:-1)}}function Ft(n,p){n&1&&(a(0,"div",71),c(1," Not Found "),l())}function Tt(n,p){if(n&1&&(a(0,"div")(1,"span",72),c(2),g(3,"number"),l(),c(4," => "),a(5,"span",73),c(6),g(7,"number"),l()()),n&2){let e=r().$implicit;s(2),I(" ",y(3,2,e==null||e.I==null?null:e.I.Available),""),s(4),O(y(7,4,e==null?null:e.Inventory))}}function Dt(n,p){if(n&1&&(c(0),g(1,"number")),n&2){let e=r().$implicit;I(" ",y(1,1,e==null?null:e.Inventory)," ")}}function Pt(n,p){if(n&1&&(D(0),a(1,"div",74)(2,"a",75),x(3,"i",76),l()(),P()),n&2){let e=r().$implicit,o=r(3);s(2),m("href",o.hostName+"/menu/Products/Catalog/Variants/Info?ID="+(e==null?null:e.ID),A)}}function Et(n,p){if(n&1){let e=S();a(0,"span",81),C("click",function(){d(e);let t=r(2).$implicit,i=r().$implicit,u=r(2);return _(u.openTableDialog(i,t))}),c(1),g(2,"number"),l()}if(n&2){let e=r(2).$implicit,o=r(3);ie(E(5,rt,o.hasInventoryEdit())),s(),I(" ",y(2,3,e==null||e.Channel[0]==null?null:e.Channel[0].Inventory)," ")}}function Mt(n,p){if(n&1){let e=S();a(0,"td",77)(1,"div",53)(2,"div"),h(3,Et,3,7,"span",78),g(4,"async"),l(),a(5,"div",74)(6,"a",75),x(7,"i",76),l()(),a(8,"div",74)(9,"span",79),C("click",function(){d(e);let t=r().$implicit,i=r(3);return _(i.refreshInventory(t==null||t.Channel[0]==null?null:t.Channel[0].ChannelItemID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelVariationID,t==null||t.Channel[0]==null?null:t.Channel[0].ChannelID,t==null?null:t.ID))}),x(10,"i",80),l()()()()}if(n&2){let e=r().$implicit,o=r(3);m("ngClass",E(5,lt,(e==null?null:e.Inventory)!=(e==null||e.Channel[0]==null?null:e.Channel[0].Inventory))),s(3),m("ngIf",y(4,3,o.products$)),s(3),m("href",e==null||e.Channel[0]==null?null:e.Channel[0].Url,A)}}function Vt(n,p){if(n&1&&(D(0),a(1,"span",82),c(2),g(3,"number"),l(),P()),n&2){let e=r(2).$implicit;s(2),I(" (",y(3,1,e==null||e.Channel[0]==null?null:e.Channel[0].InventoryReserved),") ")}}function kt(n,p){n&1&&c(0," - ")}function Rt(n,p){if(n&1&&(D(0),a(1,"td",51),h(2,Vt,4,3,"ng-container",57)(3,kt,1,0,"ng-template",null,1,q),l(),P()),n&2){let e=Z(4),o=r().$implicit;s(2),m("ngIf",o==null||o.Channel[0]==null?null:o.Channel[0].InventoryReserved)("ngIfElse",e)}}function Lt(n,p){n&1&&(D(0),c(1," - "),P())}function Nt(n,p){if(n&1&&(a(0,"span",83),g(1,"date"),c(2),g(3,"date"),l()),n&2){let e=r().$implicit;m("matTooltip",R(1,2,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMMM yyyy HH:mm:ss")),s(2),I(" ",R(3,5,e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync,"dd MMM yy HH:mm")," ")}}function At(n,p){if(n&1&&(a(0,"tr"),h(1,yt,10,8),a(2,"td",50),c(3),l(),a(4,"td",51)(5,"span",52),c(6),l()(),h(7,bt,4,1,"ng-container",27),a(8,"td")(9,"div",53),h(10,Ft,2,0,"div",54)(11,Tt,8,6,"div")(12,Dt,2,3)(13,Pt,4,1,"ng-container",5),l()(),h(14,Mt,11,7,"td",55)(15,Rt,5,2,"ng-container",5),a(16,"td",56),h(17,Lt,2,0,"ng-container",57)(18,Nt,4,8,"ng-template",null,0,q),l()()),n&2){let e=p.$implicit,o=p.$index,t=Z(19),i=r(3);s(),v(o==0?1:-1),s(2),O(e==null?null:e.Model),s(2),m("matTooltip",e.Discontinued?i.discontinuedVariantMsg:"")("ngClass",E(14,ot,e.Discontinued)),s(),O(e==null?null:e.Code),s(),m("ngxPermissionsOnly",E(16,te,i.inventoryUpdateRole)),s(3),m("ngIf",(e==null?null:e.I)==null),s(),v((e==null?null:e.I)!=null&&(e==null?null:e.Inventory)!=(e==null||e.I==null?null:e.I.Available)?11:-1),s(),v((e==null?null:e.Inventory)==(e==null||e.I==null?null:e.I.Available)?12:-1),s(),m("ngIf",(e==null?null:e.I)!=null),s(),m("ngIf",e==null?null:e.Channel),s(),m("ngIf",i.isShowReservedColumn),s(2),m("ngIf",(e==null||e.Channel[0]==null?null:e.Channel[0].LastInventorySync)==i.minDate)("ngIfElse",t)}}function Ot(n,p){if(n&1&&(a(0,"tbody"),Y(1,At,20,18,"tr",null,G),l()),n&2){let e=p.$implicit;s(),K(e.Variants)}}function Ut(n,p){if(n&1){let e=S();a(0,"mainpanel",3),C("onSubmit",function(t){d(e);let i=r();return _(i.onSearch(t))}),a(1,"actions")(2,"div",4),h(3,mt,4,2,"div",5),g(4,"async"),l()(),a(5,"filters")(6,"div")(7,"label",6),c(8,"Channel"),l(),a(9,"multiwarehouse-tree-select",7),C("onChannelChange",function(t){d(e);let i=r();return _(i.onChannelChange(t))}),l()(),a(10,"div",8)(11,"label",9),c(12,"PageNumber"),l(),a(13,"input",10),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.PageNumber,t)||(i.searchFilter.PageNumber=t),_(t)}),l()(),a(14,"div",8)(15,"label",11),c(16,"Page Size"),l(),a(17,"input",12),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.RowCount,t)||(i.searchFilter.RowCount=t),_(t)}),l()(),a(18,"div",8)(19,"label",13),c(20,"Quantity From - To"),l(),a(21,"div",14)(22,"input",15),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.QuantityFrom,t)||(i.searchFilter.QuantityFrom=t),_(t)}),l(),c(23," - "),a(24,"input",16),T("ngModelChange",function(t){d(e);let i=r();return F(i.searchFilter.QuantityTo,t)||(i.searchFilter.QuantityTo=t),_(t)}),l()()()(),a(25,"content")(26,"div",17)(27,"div",18)(28,"div",19),h(29,dt,3,0,"div",20),a(30,"table",21),C("matSortChange",function(t){d(e);let i=r();return _(i.onSortVariant(t))}),a(31,"thead",22)(32,"tr")(33,"th",23),c(34," Product "),x(35,"br"),a(36,"mat-slide-toggle",24),C("toggleChange",function(){d(e);let t=r();return t.showDifferenceStock=!t.showDifferenceStock,_(t.onShowDifferenceStock())}),a(37,"small",13),c(38,"FILTER DIFFERENT INVENTORY"),l()()(),a(39,"th",25),c(40,"Variant"),l(),a(41,"th",26),c(42,"SKU"),l(),h(43,ut,3,3,"ng-container",27),a(44,"th",28),c(45," POS "),l(),a(46,"th",29)(47,"div",30),C("click",function(){d(e);let t=r();return _(t.openModalFilter())}),x(48,"img",31),a(49,"span",32),c(50),g(51,"stringLimit"),l()()(),h(52,ht,2,0,"th",33),a(53,"th",34),c(54,"Last Sync"),l()()(),Y(55,Ot,3,0,"tbody",null,G),g(57,"async"),l(),a(58,"infinite-paginator",35),g(59,"async"),C("onNextPage",function(){d(e);let t=r();return _(t.infinitePagination.onNextPage(t.searchFilter))})("onLastPage",function(){d(e);let t=r();return _(t.infinitePagination.onLastPage(t.searchFilter))})("onGetRowCount",function(){d(e);let t=r();return _(t.infinitePagination.getRowCount(t.searchFilter))}),l()()()()()()}if(n&2){let e,o,t,i=r();m("headerTitle","Inventory Comparison")("pageData",i.pageData)("hideSearchBox",!1),s(3),m("ngIf",y(4,21,i.products$)),s(6),m("ngModel",(i.searchFilter==null?null:i.searchFilter.LocationID)||(i.searchFilter==null?null:i.searchFilter.ChannelID)),s(4),b("ngModel",i.searchFilter.PageNumber),s(4),b("ngModel",i.searchFilter.RowCount),s(5),b("ngModel",i.searchFilter.QuantityFrom),s(2),b("ngModel",i.searchFilter.QuantityTo),s(5),m("ngIf",(i.searchFilter==null?null:i.searchFilter.filterModel)==3),s(14),m("ngxPermissionsOnly",E(30,te,i.inventoryUpdateRole)),s(4),m("matTooltip",((e=i.channelIdentity())==null||e.label==null?null:e.label.length)>13?(e=i.channelIdentity())==null?null:e.label:""),s(),m("src",(o=i.channelIdentity())==null?null:o.img,A),s(2),I(" ",R(51,23,(t=i.channelIdentity())==null?null:t.label,13)," "),s(2),v(i.isShowReservedColumn?52:-1),s(3),K(y(57,26,i.products$)),s(3),m("totalData",i.infinitePagination.totalData())("hideCount",i.infinitePagination.hideCount())("rowCount",y(59,28,i.infinitePagination.totalRowCount$))("pageNumber",i.infinitePagination.pageNumber())("disableNextButton",i.infinitePagination.disableNextButton())("goToLastPage",i.infinitePagination.isLastPage())}}var An=(()=>{class n{constructor(e,o,t,i,u,ne,qe,Xe){this.http=e,this.toastr=o,this.dialog=t,this.productService=i,this.authService=u,this.biggerPictureService=ne,this.inventoryService=qe,this.mainPanelService=Xe,this.infinitePagination=M(J),this.ngxPermissionsService=M(ve),this.checkboxState=!1,this.showDifferenceStock=!1,this.loaderApi="InventoryLoader/Load",this.fetchApi="Inventory/GetSingleChannelComparison",this.rowCountApi="Inventory/GetInventoryByChannelRowCount",this.minDate=f.MinDate,this.isShowReservedColumn=!0,this.discontinuedVariantMsg="This Variant is discontinued from POS, you must Non Active manually at the seller center so that it is not sold again on the channel.",this.guidEmpty=f.GuidEMpty,this.selectedChannel=k(null),this.channelIdentity=k({img:null,label:null}),this.inventoryUpdateRole=X.InventoryUpdate,this.hasInventoryEdit=k(!0),this.pageData={Title:"Inventory Realtime",Nav:[{Title:"Inventory Cache",Url:"/menu/inventory",Active:!1},{Title:"Inventory Realtime",Url:"/menu/inventory/realtime",Active:!0}]}}ngOnInit(){this.initRoles(),this.hostName=this.authService.getDomain(),this.initPageLoader(),this.sourceObs$=this.infinitePagination.data$.pipe(H(e=>{this.checkShowReservedColumn(e)}),L(e=>(e=this.calculateAvailableStock(e),e)),N(1)),this.products$=this.sourceObs$}initRoles(){this.ngxPermissionsService.hasPermission(X.InventoryUpdate).then(e=>this.hasInventoryEdit.set(e))}calculateAvailableStock(e){return e.map(t=>(t.totalAvailable=t.Variants.reduce((i,u)=>(i+=u.I?.Available||0,i),0),t))}checkShowReservedColumn(e){let o=0,t;e.forEach(i=>{t=i.Variants.find(u=>f.IsNotEmpty(u?.Channel[0]?.InventoryReserved)),t&&(o+=1)}),this.isShowReservedColumn=o>0}initPageLoader(){this.infinitePagination.fetchDataEndpoint=this.fetchApi,this.infinitePagination.fethRowCountEndpoint=this.rowCountApi,this.loader$=this.http.post(`/api/${this.loaderApi}`,{}).pipe(N(1),H(e=>{this.searchFilter={RowCount:e.Filter.PageSize,filterModel:1,PageNumber:1,ChannelID:e.Filter.ChannelID,LocationID:e.Filter.LocationID},this.initReloadData(),this.showToastrMarketplaceInactive(!e.Filter.IsMarketplaceAppActive)}))}onChannelChange(e){let o=Object.assign({},e);this.selectedChannel.set(o),f.IsEmpty(this.channelIdentity()?.label)&&this.setChannelFilter()}setChannelFilter(){if(this.selectedChannel()){let e=Object.assign({},this.selectedChannel());f.IsNotEmpty(e.parent)?(this.searchFilter.LocationID=e.id,this.searchFilter.ChannelID=e?.parent?.id,e.label=e?.parent?.label+" - "+e?.label,e.img=f.getChannelLogoByTypeId(e?.parent?.typeid)):(this.searchFilter.LocationID=null,e.img=f.getChannelLogoByTypeId(e?.typeid),this.searchFilter.ChannelID=e?.id,this.selectedChannel.set(e)),this.channelIdentity.update(()=>({img:e.img,label:e.label}))}}initReloadData(){this.infinitePagination.reloadPagination(this.searchFilter)}showToastrMarketplaceInactive(e){e&&this.toastr.warning(`Automatic inventory sync disabled.
2
- Please enable Dealpos X Marketplace Apps integration in POS Configuration`,"Warning")}onSearch(e){this.searchFilter.text=e,this.setChannelFilter(),this.initReloadData()}openModalFilter(){this.mainPanelService.openModalFilter()}onOpenDialogUpdateStockInfo(e){let o=this.productService.selectedVariantProduct(e);this.dialog.open(Ze,{data:{channelId:o[0]?.Channel[0]?.ChannelID,selectedProducts:o}}).afterClosed().pipe(z(t=>t===!0)).subscribe(()=>{this.updateStock(o)})}updateStock(e){if(e.length>0){let o=this.searchFilter.LocationID,t=e.map(u=>Q({ChannelItemID:u?.Channel[0]?.ChannelItemID,ChannelVariationID:u?.Channel[0]?.ChannelVariationID,Inventory:u.Inventory},f.IsNotEmpty(o)&&{LocationID:o})),i={ListChannelID:[this.searchFilter.ChannelID],List:t};this.http.post(be.UpdateInventoryChannel,i).subscribe(u=>{this.initReloadData(),this.checkboxState=!1,this.handlingUpdateStock(u)})}}handlingUpdateStock(e){if(e[0]?.Response){let o=e[0]?.Response?.Fail_list,t=e[0]?.Response?.Success_list;this.inventoryService.showToastrUpdateInventory("Stock",t,o)}else this.toastr.error(e[0]?.Exception,"Error")}refreshInventory(e,o,t,i){let u={ChannelItemID:e,ChannelVariationID:o,ChannelID:t,VariantID:i};this.http.post("/api/Inventory/RefreshInventoryChannel",u).subscribe(ne=>{this.toastr.success("Successfully updated","Success"),this.initReloadData()})}onCheckboxStateProduct(e){e.Variants=e.Variants.map(o=>(o.Inventory>=0&&(o.selected=e.selected),o))}onCheckboxStateChange(e){e=e.map(o=>(o.Variants=o.Variants.map(t=>(t.selected=this.checkboxState,t)),o))}openTableDialog(e,o){this.hasInventoryEdit()&&this.dialog.open(He,{data:{Name:e.Name,Variant:o,ChannelID:o?.Channel[0].ChannelID,Table:"inventory",ChannelItemID:e.ChannelItemID}}).afterClosed().pipe(z(i=>f.IsNotEmpty(i))).subscribe(i=>{this.updateItemAfterDialog(i)})}updateItemAfterDialog(e){let o=this.searchFilter.LocationID,t=Q({ID:e.ChannelID,ChannelItemID:e.ChannelItemID,ChannelVariantID:e.ChannelVariationID,NewQuantity:parseFloat(e.Inventory),VariantID:e.ID,SKU:e.Sku},f.IsNotEmpty(o)&&{LocationID:o});this.http.post("/api/Inventory/UpdateQuantityByItem",t).subscribe(i=>{this.searchFilter.PageNumber=1,this.initReloadData(),this.handlingUpdateStock([i])})}onScanInventory(e){let o=this.productService.selectedVariantProduct(e);this.inventoryService.refreshInventory(o).subscribe(()=>{this.initReloadData(),this.toastr.success("Inventory refreshed successfully","Success")})}openExportDialog(){this.dialog.open(ze,{data:{title:"Export Inventory Single Channel Comparison",pageNumber:this.searchFilter.PageNumber,rowCount:this.searchFilter.RowCount,filterExport:this.searchFilter,getRowCountApi:this.rowCountApi,QuantityFrom:this.searchFilter.QuantityFrom,QuantityTo:this.searchFilter.QuantityTo,exportApi:"Inventory/GetExportSingleChannelComparison"}}).afterClosed().subscribe()}onShowDifferenceStock(){this.showDifferenceStock?this.searchFilter.filterModel=ee.DIFFERENCE:this.searchFilter.filterModel=ee.ALL,this.initReloadData()}onZoomImage(e,o){this.biggerPictureService.openBiggerPicture(e,o)}onSortVariant(e){if(e.direction==""){this.products$=this.sourceObs$;return}this.products$=this.products$.pipe(L(o=>o.map(t=>(t.Variants=t.Variants.sort((i,u)=>f.compare(i.I?.Available,u.I?.Available,e.direction==="asc")),t)).sort((t,i)=>f.compare(t.totalAvailable,i.totalAvailable,e.direction==="asc"))))}static{this.\u0275fac=function(o){return new(o||n)(w(ye),w(Se),w(Ee),w($e),w(Fe),w(We),w(V),w(Le))}}static{this.\u0275cmp=U({type:n,selectors:[["app-single-channel-comparison"]],features:[B([J,V])],decls:2,vars:3,consts:[["SYNCDATE",""],["EMPTY_RESERVED",""],["textButton","Search",3,"headerTitle","pageData","hideSearchBox","onSubmit",4,"ngIf"],["textButton","Search",3,"onSubmit","headerTitle","pageData","hideSearchBox"],[1,"d-flex"],[4,"ngIf"],["for","channelOptions",1,"fw-bold","mb-2"],["id","channelOptions",3,"onChannelChange","ngModel"],[1,"mt-5"],["for","PageNumber",1,"fw-bold"],["type","number","id","PageNumber","placeholder","PageNumber","name","PageNumber","data-toggle","tooltip","matTooltip","Page Number",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],["for","RowCount",1,"fw-bold"],["type","number","id","RowCount","placeholder","Page Size","name","RowCount","data-toggle","tooltip","matTooltip","Page Size",1,"mat-mdc-tooltip-trigger","form-control","ng-pristine","ng-valid","ng-touched","mt-3",3,"ngModelChange","ngModel"],[1,"fw-bold"],[1,"d-flex","align-items-center","justify-content-start"],["type","number","name","QuantityFrom",1,"w-25","me-2","mt-3","form-control",3,"ngModelChange","ngModel"],["type","number","name","QuantityTo",1,"w-25","ms-2","form-control","mt-2",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],["class","alert alert-warning d-flex justify-content-between text-dark","role","alert",4,"ngIf"],["matSort","",1,"table","border-bottom",3,"matSortChange"],[1,"thead-light","sticky-top-thead"],["scope","col","colspan","2",1,"text-center","ps-12",2,"width","25%"],[3,"toggleChange"],["scope","col",1,"text-start"],["scope","col",1,"text-end",2,"width","10%"],[4,"ngxPermissionsOnly"],["scope","col","mat-sort-header","Available","arrowPosition","before",1,"text-end","w-10",2,"width","8%"],[1,"text-end",2,"width","150px"],["role","button","matTooltipPosition","above",1,"d-inline-block",3,"click","matTooltip"],[2,"width","16px",3,"src"],[1,"ms-1"],["matTooltip","Reserved Stock","matTooltipPosition","above",1,"text-end",2,"width","80px"],[1,"text-center",2,"width","145px"],[3,"onNextPage","onLastPage","onGetRowCount","totalData","hideCount","rowCount","pageNumber","disableNextButton","goToLastPage"],["class","btn btn-outline-dark me-3","matTooltip","Fetch the latest stock directly from the channel",3,"click",4,"ngIf"],[1,"btn-group"],[1,"btn","btn-outline-secondary","shadow","rounded"],["matTooltip","Fetch the latest stock directly from the channel",1,"btn","btn-outline-dark","me-3",3,"click"],[1,"fa-solid","fa-arrows-rotate","me-3"],[1,"btn","btn-success",3,"click"],[1,"fas","fa-chevron-circle-up"],["data-bs-toggle","dropdown","aria-expanded","false",1,"btn","btn-success","btn-sm","dropdown-toggle","border-start"],[1,"dropdown-menu","dropdown-menu-end","pointer"],["role","button",1,"dropdown-item","cursor-pointer","fs-5",3,"click"],[1,"fa-solid","fa-print","me-3"],[1,"btn","btn-outline-secondary","shadow","rounded",3,"click"],["role","alert",1,"alert","alert-warning","d-flex","justify-content-between","text-dark"],["type","checkbox",3,"ngModelChange","ngModel"],[1,"text-start"],[1,"text-end"],["matTooltipPosition","above",3,"matTooltip","ngClass"],[1,"d-flex","align-items-center","justify-content-end"],["class","text-danger","matTooltip","This product is no longer available in POS","matTooltipPosition","above",4,"ngIf"],["class","text-end",3,"ngClass",4,"ngIf"],[1,"text-center"],[4,"ngIf","ngIfElse"],[1,"text-start",2,"width","0%",3,"rowSpan"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"src"],["src","//res.cloudinary.com/pos/image/upload/w_40/POS/Images/Icon/products_thumb.png",1,"border","rounded","w-img",2,"margin-left","20px"],[1,"text-start",3,"rowSpan"],[1,"item-name","mb-0"],[3,"ngClass"],["type","checkbox",1,"me-3",3,"ngModel"],["type","checkbox",1,"me-3",3,"ngModelChange","ngModel"],[1,"border","rounded","w-img","cursor-pointer",2,"margin-left","20px",3,"click","src"],[1,"d-flex","align-items-center"],["title","Category",1,"fa-solid","fa-tags","me-2",2,"opacity","60%"],[1,"align-middle"],["type","checkbox",3,"ngModel"],["matTooltip","This product is no longer available in POS","matTooltipPosition","above",1,"text-danger"],["title","Stock Available"],["title","Inventory below minimum inventory"],[1,"ms-3"],["target","_blank",3,"href"],[1,"fa-solid","fa-arrow-up-right-from-square","external-link-custom"],[1,"text-end",3,"ngClass"],[3,"class","click",4,"ngIf"],["matTooltip","Refresh stock according to seller center",1,"pl-5","cursor-pointer",2,"color","var(--bs-link-color)",3,"click"],[1,"fas","fa-sync","fa-lg","external-link-custom","pt-1"],[3,"click"],[1,"text-danger"],["matTooltipShowDelay","500",3,"matTooltip"]],template:function(o,t){o&1&&(h(0,Ut,60,32,"mainpanel",2),g(1,"async")),o&2&&m("ngIf",y(1,1,t.loader$))},dependencies:[j,ce,pe,$,me,W,Ae,Ne,Te,xe,he,fe,ue,Ce,ge,Ge,Ye,we,Ie,Qe,je,Re,ke,Be,Oe,Ue,Ke],styles:[".w-10[_ngcontent-%COMP%]{width:10%}.w-img[_ngcontent-%COMP%]{width:40px;height:40px}.item-name[_ngcontent-%COMP%]{margin-bottom:-14px!important;font-size:larger}input[type=checkbox][_ngcontent-%COMP%]{width:15px;height:15px}"]})}}return n})();export{An as SingleChannelComparisonComponent};
@@ -1 +0,0 @@
1
- import{a as j}from"./chunk-YM4TJJMM.js";import{b as _,e as D}from"./chunk-JXSBFTQM.js";import{b as d,c as y}from"./chunk-PW42BQIY.js";import{b as M,d as P,f as x,g as L}from"./chunk-UGVEAL7H.js";import{h as v,m as w}from"./chunk-6QYD6NIJ.js";import{G as h,Gb as k,Gc as p,Kc as S,Lc as C,Mc as T,aa as u,ic as o,ja as b,jc as r,oa as c,rb as g,tc as m,v as s,xb as f}from"./chunk-B7KTCPKC.js";var I=(()=>{class a{constructor(i){this.dialogRef=i,this.tandaiSudahDicetak=!1}onCancel(){this.dialogRef.close()}onPrint(){this.dialogRef.close(this.tandaiSudahDicetak?1:0)}static{this.\u0275fac=function(t){return new(t||a)(f(M))}}static{this.\u0275cmp=k({type:a,selectors:[["app-print-tokopedia"]],standalone:!1,decls:17,vars:1,consts:[[1,"container-fluid"],[1,"text-center","mb-4","fw-bold","mt-6"],[1,"row"],[1,"col-12"],[1,"fs-5"],[1,"d-flex","align-items-center","text-center","justify-content-center","mb-8"],[1,"me-2",3,"ngModelChange","ngModel"],[1,"fs-5","pt-1"],[1,"d-flex","align-items-center","justify-content-center"],[1,"btn","btn-light-blue","text-primary","btn-lg","fw-bold","mx-3",3,"click"],[1,"btn","btn-light-blue","me-6","text-primary","btn-lg","fw-bold","mx-3",3,"click"]],template:function(t,e){t&1&&(o(0,"div",0)(1,"h2",1),p(2,"Cetak label pesanan"),r(),o(3,"mat-dialog-content")(4,"div",2)(5,"div",3)(6,"p",4),p(7,"Kamu akan mencetak label yang berisi detail pesanan"),r(),o(8,"div",5)(9,"mat-checkbox",6),T("ngModelChange",function(l){return C(e.tandaiSudahDicetak,l)||(e.tandaiSudahDicetak=l),l}),r(),o(10,"span",7),p(11,'Pesanan telah ditandai sebagai "Sudah Dicetak"'),r()()()()(),o(12,"mat-dialog-actions",8)(13,"button",9),m("click",function(){return e.onCancel()}),p(14,"Cancel"),r(),o(15,"button",10),m("click",function(){return e.onPrint()}),p(16,"Cetak Pesanan"),r()()()),t&2&&(g(9),S("ngModel",e.tandaiSudahDicetak))},dependencies:[v,w,j,L,x],encapsulation:2})}}return a})();var G=(()=>{class a{constructor(i,t,e){this.http=i,this.toastr=t,this.dialog=e}getTokopediaShippingLabel(i){return this.http.post("/api/v1/Shippinglabel/Tokopedia/Multiple",{Orders:i}).pipe(s(t=>(t=t.map(e=>(e.ChannelType=d.Tokopedia,e)),t)))}getTiktokShippingLabel(i){return this.http.post("/api/v1/Shippinglabel/TIktok/Multiple",{Orders:i}).pipe(s(t=>(t=t.map(e=>(e.ChannelType=d.Tiktok,e)),t)))}getShopeeShippingLabel(i){return this.http.post("/api/v1/Shippinglabel/shopee/Multiple",{Orders:i}).pipe(s(t=>(t=t.map(e=>(e.ChannelType=d.Shopee,e)),t)))}getLazadaShippingLabel(i){return this.http.post("/api/v1/Shippinglabel/lazada/Multiple",{Orders:i}).pipe(s(t=>(t=t.map(e=>(e.ChannelType=d.Lazada,e)),t)))}printShippingLabelTokopedia(i){let t={OrderNumber:i,Printed:!0};this.dialog.open(I).afterClosed().pipe(h(e=>e!==void 0),u(e=>(t.Printed=e,this.http.post("api/v1/Shippinglabel/Tokopedia",t)))).subscribe(e=>{let n=window.open("about:blank","_blank");n.document.write(e.File),n.document.close()})}printShippingLabelTiktok(i,t){let e={ShopID:t,OrderNumber:i};this.http.post("api/v1/Shippinglabel/Tiktok",e).subscribe(n=>{n.data!=null?window.open(n.data.doc_url,"_blank"):this.toastr.error("Cannot Print the Shipping Label,The invoice Number is not set to Pickup","Cannot Print")})}printShippingLabelShopee(i,t){let e={ShopID:t,OrderNumber:i};this.http.post("api/v1/Shippinglabel/shopee/DownloadShipping",e).subscribe(n=>{var l=Uint8Array.from(atob(n.File),N=>N.charCodeAt(0)),O=new Blob([l],{type:"octet/stream"});y.openDownloadFile(O,`${i}.pdf`)})}printShippingLabelLazada(i,t){let e={ShopID:t,OrderNumber:i};this.http.post("api/v1/Shippinglabel/Lazada/DownloadShipping",e).subscribe(n=>{n.result.data!=null?window.open(n.result.data.pdf_url,"_blank"):this.toastr.error(n.message,"Cannot Print")})}static{this.\u0275fac=function(t){return new(t||a)(c(D),c(_),c(P))}}static{this.\u0275prov=b({token:a,factory:a.\u0275fac,providedIn:"root"})}}return a})();export{G as a};
@@ -1 +0,0 @@
1
- import{a as me,b as de,c as se}from"./chunk-V5BKQSAT.js";import{a as ue,b as T}from"./chunk-K77RTNG2.js";import{a as pe}from"./chunk-2ODVHD2K.js";import{a as ae}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import"./chunk-CMTBBXR5.js";import{a as le}from"./chunk-NOP5P5R5.js";import{a as oe}from"./chunk-D6URDVES.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-KMJM6UVY.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as ne,n as re}from"./chunk-UGVEAL7H.js";import{A as ee,c as X,h as Y,m as Z,o as $}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as te,s as ie}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as G,k as J,m as K,n as Q}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as W,Gc as l,Hc as v,Ic as b,Kc as h,Lc as f,Mb as y,Mc as g,Nc as z,Oc as A,Pc as R,Qc as H,Ra as N,Rc as j,Sc as U,Yb as u,ac as I,ad as E,bd as q,dc as x,ec as D,gc as B,hc as k,ic as t,jc as i,kc as c,oc as V,pa as O,pb as F,rb as a,tc as M,uc as _,ya as m,za as d}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as P,b as L}from"./chunk-66YHNWRR.js";var ce=()=>[],_e=r=>({"td-cell-hover":r});function he(r,S){if(r&1&&c(0,"variants-dropdown",29),r&2){let e=_().$implicit;u("variants",e==null?null:e.Variants)}}function fe(r,S){if(r&1&&c(0,"variant-with-image",30),r&2){let e=_().$implicit;u("variant",e==null?null:e.Variants[0])}}function ge(r,S){if(r&1&&(t(0,"span"),l(1),i()),r&2){let e=_().$implicit;a(),b("(",e.LogisticService==null?null:e.LogisticService.Option,")")}}function Se(r,S){if(r&1&&(t(0,"tr")(1,"td"),l(2),i(),t(3,"td")(4,"div",25)(5,"div",26)(6,"div"),c(7,"img",27),w(8,"channelImage"),i(),t(9,"div"),c(10,"order-link",28),i()(),t(11,"small"),l(12),w(13,"date"),i()()(),t(14,"td"),l(15),i(),t(16,"td"),y(17,he,1,1,"variants-dropdown",29)(18,fe,1,1,"variant-with-image",30),i(),t(19,"td",31),l(20),w(21,"number"),i(),t(22,"td")(23,"div",25)(24,"div",26)(25,"span"),l(26),i(),y(27,ge,2,1,"span"),i(),t(28,"small"),l(29),i()()()()),r&2){let e=S.$implicit;a(2),v(e.Outlet),a(5),u("src",E(8,13,e==null?null:e.MarketType),F)("alt",e==null||e.Variants[0]==null?null:e.Variants[0].Name),a(3),u("order",e),a(2),b(" ",q(13,15,e==null?null:e.Created,"dd/MM/yyyy HH:mm:ss")," "),a(3),v(e.Customer),a(),I(U(20,_e,(e.Variants==null?null:e.Variants.length)>1)),a(),x((e.Variants==null?null:e.Variants.length)>1?17:18),a(3),v(E(21,18,e.Amount)),a(6),v(e.LogisticService!=null&&e.LogisticService.Name?e.LogisticService==null?null:e.LogisticService.Name:"-"),a(),x(e.LogisticService!=null&&e.LogisticService.Option&&(e.LogisticService==null?null:e.LogisticService.Option)!="Default"?27:-1),a(2),b(" ",e.ReferenceNumber?e.ReferenceNumber:"-"," ")}}function Ce(r,S){if(r&1){let e=V();t(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),l(5,"Outlet"),i(),t(6,"th",21),l(7,"Number"),i(),t(8,"th",21),l(9,"Customer"),i(),t(10,"th"),l(11,"Items"),i(),t(12,"th",22),l(13,"Amount"),i(),t(14,"th",23),l(15,"Shipping"),i()()(),t(16,"tbody"),B(17,Se,30,22,"tr",null,D),i()(),t(19,"app-custom-paginator",24),M("next",function(){m(e);let n=_();return d(n.initShippedOrders())})("previous",function(){m(e);let n=_();return d(n.initShippedOrders())}),i()()}if(r&2){let e=_(),p=R(0);a(17),k(p),a(2),u("filter",e.filter())("totaldata",p==null?null:p.length)}}function ve(r,S){r&1&&(t(0,"div",16),c(1,"app-empty-state"),i())}var He=(()=>{class r{constructor(){this.orderService=O(T),this.filter=N({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let e=this.orderService.getOrderDefaultValue();this.filter.update(p=>L(P({},p),{From:e})),this.initShippedOrders()}initShippedOrders(){this.shippedOrders$=this.orderService.getShippedOrders(this.filter())}static{this.\u0275fac=function(p){return new(p||r)}}static{this.\u0275cmp=W({type:r,selectors:[["app-shipped"]],features:[H([T])],decls:34,vars:12,consts:[["headerTitle","Shipped","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","100px"],[2,"width","250px"],[1,"text-end",2,"width","150px"],[2,"width","150px"],["rowCountApi","/api/orders/shippedcount",3,"next","previous","filter","totaldata"],[1,"lh-sm"],[1,"d-flex","align-items-end","gap-2"],[2,"width","12px","padding-bottom","2.5px",3,"src","alt"],[2,"font-size","14px",3,"order"],[3,"variants"],[3,"variant"],[1,"text-end"]],template:function(p,n){if(p&1){let s=V();z(0),w(1,"async"),t(2,"mainpanel",0),M("onSubmit",function(){return m(s),d(n.initShippedOrders())}),g("textChange",function(o){return m(s),f(n.filter().Number,o)||(n.filter().Number=o),d(o)}),t(3,"actions")(4,"a",1),c(5,"i",2),t(6,"span"),l(7,"Order Fulfillment Display"),i()()(),t(8,"filters")(9,"div")(10,"label",3),l(11,"From/To"),i(),t(12,"channel-select-options",4),g("ngModelChange",function(o){return m(s),f(n.filter().ListChannelID,o)||(n.filter().ListChannelID=o),d(o)}),i()(),t(13,"div",5)(14,"label",3),l(15,"From/To"),i(),t(16,"div",6)(17,"datepicker",7),g("dateChange",function(o){return m(s),f(n.filter().From,o)||(n.filter().From=o),d(o)}),i()(),t(18,"div")(19,"datepicker",8),g("dateChange",function(o){return m(s),f(n.filter().To,o)||(n.filter().To=o),d(o)}),i()()(),t(20,"div",5)(21,"label",9),l(22,"Page Number"),i(),t(23,"input",10),g("ngModelChange",function(o){return m(s),f(n.filter().PageNumber,o)||(n.filter().PageNumber=o),d(o)}),i()(),t(24,"div",5)(25,"label",9),l(26,"Page Size"),i(),t(27,"input",11),g("ngModelChange",function(o){return m(s),f(n.filter().PageSize,o)||(n.filter().PageSize=o),d(o)}),i()()(),t(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),y(32,Ce,20,2,"div",15)(33,ve,2,0,"div",16),i()()()()()}if(p&2){let s=A(E(1,8,n.shippedOrders$)||j(11,ce));a(2),h("text",n.filter().Number),a(10),u("multiple",!0),h("ngModel",n.filter().ListChannelID),a(5),h("date",n.filter().From),a(2),h("date",n.filter().To),a(4),h("ngModel",n.filter().PageNumber),a(4),h("ngModel",n.filter().PageSize),a(5),x(s.length>0?32:33)}},dependencies:[Q,G,K,J,re,ne,ae,oe,ee,X,$,Y,Z,me,de,se,pe,le,ie,te,ue],encapsulation:2})}}return r})();export{He as ShippedComponent};
@@ -1,2 +0,0 @@
1
- import{b as Ft}from"./chunk-QJJ2WFVX.js";import"./chunk-UEPQYAWE.js";import{a as St}from"./chunk-DL66NZ2A.js";import{a as be,b as ut,c as _t,d as ye,e as ve}from"./chunk-K5VFEHP7.js";import"./chunk-35XX6SQT.js";import{a as st,b as he,c as mt,d as ge,f as gt,g as Ct,h as Te,i as bt,o as re}from"./chunk-L3FX4O3H.js";import{b as vt}from"./chunk-G7R7LUW4.js";import{a as ft}from"./chunk-CCWNSX4Y.js";import"./chunk-PNITO7BE.js";import{b as ht,d as xe}from"./chunk-E4KNET2R.js";import{a as Tt,b as It}from"./chunk-YM4TJJMM.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import{b as xt}from"./chunk-OC2FBL33.js";import"./chunk-NS46QSCM.js";import"./chunk-EH6HWI3G.js";import"./chunk-E3ROEHBW.js";import"./chunk-OLOIQI4D.js";import"./chunk-RECNBAEB.js";import"./chunk-IA6KOBDJ.js";import{a as yt}from"./chunk-M5XGP4SG.js";import"./chunk-SN4AOGQK.js";import"./chunk-SB7NWPDS.js";import"./chunk-AYPY47VM.js";import"./chunk-SM3P57SO.js";import"./chunk-F63CEOOT.js";import{a as dt,b as Ce}from"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SYUFPF3D.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import{a as fe}from"./chunk-CUB2QFUO.js";import{a as lt,b as ct,f as pt}from"./chunk-KALG6D6L.js";import"./chunk-UMP6ZMEJ.js";import"./chunk-OZ7LWNOK.js";import"./chunk-ECRWEMEV.js";import"./chunk-LZCEM2PC.js";import{a as rt,b as at}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import"./chunk-J5OHT4GM.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-KMJM6UVY.js";import{e as oe}from"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import{d as Y,e as j}from"./chunk-5JVEEL2T.js";import{b as et,c as h}from"./chunk-PW42BQIY.js";import{m as nt,n as ot}from"./chunk-UGVEAL7H.js";import{A as ne,B as G,a as Je,c as ie,e as ue,h as $,i as W,l as _e,m as ze,n as X,q as J,r as Qe,s as z,t as qe,u as Ze,v as Ke,z as Q}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as tt,s as it}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{g as F,j as A,n as x}from"./chunk-M2FCTYGU.js";import{$c as T,Fc as me,Gb as v,Gc as f,Hb as se,Hc as te,Ic as Z,K as Be,Ka as P,Kc as je,Lc as He,M as Re,Mb as _,Mc as We,Oa as ke,Qc as S,Rc as de,Xb as Ge,Yb as c,Z as ee,Zb as Ee,ad as I,ca as $e,dc as k,ea as U,ec as L,f as Ue,g as Le,gc as B,hc as R,ic as p,ja as D,jc as r,jd as Xe,ka as pe,kc as d,lc as w,mc as O,oc as E,pa as u,rb as m,tc as y,uc as a,v as V,xa as N,xb as H,xc as Ye,ya as C,za as b}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import"./chunk-66YHNWRR.js";var q=function(t){return t[t.SINGLE_DROP_DOWN=1]="SINGLE_DROP_DOWN",t[t.SINGLE_COMBO_BOX=2]="SINGLE_COMBO_BOX",t[t.FREE_TEXT_FILED=3]="FREE_TEXT_FILED",t[t.MULTI_DROP_DOWN=4]="MULTI_DROP_DOWN",t[t.MULTI_COMBO_BOX=5]="MULTI_COMBO_BOX",t}(q||{});var ae=function(t){return t[t.FORMAT_NORMAL=1]="FORMAT_NORMAL",t[t.FORMAT_QUANTITATIVE_WITH_UNIT=2]="FORMAT_QUANTITATIVE_WITH_UNIT",t}(ae||{});var le=function(t){return t[t.VALIDATOR_NO_VALIDATE_TYPE=0]="VALIDATOR_NO_VALIDATE_TYPE",t[t.VALIDATOR_INT_TYPE=1]="VALIDATOR_INT_TYPE",t[t.VALIDATOR_STRING_TYPE=2]="VALIDATOR_STRING_TYPE",t[t.VALIDATOR_FLOAT_TYPE=3]="VALIDATOR_FLOAT_TYPE",t[t.VALIDATOR_DATE_TYPE=4]="VALIDATOR_DATE_TYPE",t}(le||{});var Me=class extends _e{setValue(s,e){if(s instanceof Date){let i=Math.floor(s.getTime()/1e3);super.setValue(i,e)}else super.setValue(s,e)}},De=(()=>{class t{constructor(){this.shopeeUploadService=u(be),this.formBuilder=u(Q)}getAttributes(e){return this.shopeeUploadService.getAttributes(e.channelId,e.categoryId).pipe(V(i=>this.setLabelToIndonesian(i)))}setLabelToIndonesian(e=[]){let i,o;return e=e.map(n=>(i=n?.multi_lang?.find(l=>l.language=="id"),n.attribute_value_list=n?.attribute_value_list?.map(l=>(o=l?.multi_lang?.find(g=>g.language=="id"),l.name=o?.value,l)),n.name=i?.value?i?.value:n.name,n)),e}createFormGroup(e){let i=this.formBuilder.group({}),o=[];return e.forEach(n=>{if(o=[],n.mandatory&&o.push(ue.required),n?.attribute_info?.format_type==ae.FORMAT_QUANTITATIVE_WITH_UNIT&&n?.attribute_info?.input_type==q.FREE_TEXT_FILED){let l=this.formBuilder.group({unit:new _e(null),value:new _e(null,o)});i.addControl(JSON.stringify(n.attribute_id),l)}else n?.attribute_info?.input_type==q.FREE_TEXT_FILED&&n?.attribute_info?.input_validation_type==le.VALIDATOR_DATE_TYPE?i.addControl(JSON.stringify(n.attribute_id),new Me(null,o)):i.addControl(JSON.stringify(n.attribute_id),this.formBuilder.control(null,o))}),i}getFilteredAttributes(e,i){let o=JSON.parse(JSON.stringify(e)),n=Object.keys(i),l=o.filter(g=>n.findIndex(Ae=>parseInt(Ae)==g.attribute_id||g.mandatory)!=-1);return l=this.filterSelectedAttributes(l,i),l}filterSelectedAttributes(e,i){return e.map(n=>{switch(n.attribute_info.input_type){case q.MULTI_COMBO_BOX:h.IsNotEmpty(i[n.attribute_id])?n.attribute_value_list=n.attribute_value_list.filter(l=>i[n.attribute_id]?.findIndex(g=>g==l.value_id)!=-1):n.attribute_value_list=[];break;case q.FREE_TEXT_FILED:n.attribute_info.format_type==ae.FORMAT_QUANTITATIVE_WITH_UNIT?n.attribute_value_list=this.setSelectedQuantitativeAttr(i[n.attribute_id]?.value,i[n.attribute_id]?.unit):n.attribute_info.input_validation_type==le.VALIDATOR_DATE_TYPE?n.attribute_value_list=this.setSelectedDateAttr(i[n.attribute_id]):n.attribute_value_list=this.setSelectedQuantitativeAttr(i[n.attribute_id]);break;default:n.attribute_value_list=n.attribute_value_list.filter(l=>l.value_id==i[n.attribute_id])}return n}).filter(n=>n?.attribute_value_list?.length>0)}setSelectedQuantitativeAttr(e,i){let o=[];if(h.IsNotEmpty(e)){let n={value_id:0,original_value_name:JSON.stringify(e)};h.IsNotEmpty(i)&&(n.value_unit=i),o=[n]}return o}setSelectedDateAttr(e){let i=[];return h.IsNotEmpty(e)&&(i=[{value_id:0,original_value_name:JSON.stringify(e)}]),i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac})}}return t})();var Ie=(()=>{class t{constructor(){this._calendarHeaderConfig=new Le({hideBtnClear:!1,hideBtnToday:!1}),this.calendarConfig=this._calendarHeaderConfig.value}setHeaderConfig(e){this._calendarHeaderConfig.next(e)}getHeaderConfig$(){return this._calendarHeaderConfig.asObservable()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Lt=["class","component ts"];function Bt(t,s){if(t&1){let e=E();p(0,"button",3),y("click",function(){C(e);let o=a(2);return b(o.todayClicked())}),d(1,"i",4),r()}}function Rt(t,s){if(t&1){let e=E();p(0,"button",5),y("click",function(){C(e);let o=a(2);return b(o.clearClicked())}),d(1,"i",6),r()}}function $t(t,s){if(t&1&&(w(0),_(1,Bt,2,0,"button",1)(2,Rt,2,0,"button",2),O()),t&2){let e=s.ngIf;m(),c("ngIf",!e.hideBtnToday),m(),c("ngIf",!e.hideBtnClear)}}var kt=(()=>{class t{constructor(e,i,o,n,l){this._datePicker=e,this._calendar=i,this._dateAdapter=o,this.calendarService=n,this._destroyed=new Ue,i.stateChanges.pipe($e(this._destroyed)).subscribe(g=>l.markForCheck()),this.calendarConfig$=this.calendarService.getHeaderConfig$()}todayClicked(){this._calendar.activeDate=this._dateAdapter.today(),this._datePicker.select(this._dateAdapter.today()),this._datePicker.close()}clearClicked(){this._datePicker.select(null),this._datePicker.close()}ngOnChanges(e){this._calendar.ngOnChanges(e)}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}static{this.\u0275fac=function(i){return new(i||t)(H(Te),H(Ct),H(he),H(Ie),H(Xe))}}static{this.\u0275cmp=v({type:t,selectors:[["POS-DatepickerHeader",8,"component","ts"]],standalone:!1,features:[N],attrs:Lt,decls:3,vars:3,consts:[[4,"ngIf"],["mat-icon-button","","title","Today",3,"click",4,"ngIf"],["mat-icon-button","","title","Clear",3,"click",4,"ngIf"],["mat-icon-button","","title","Today",3,"click"],[1,"far","fa-clock",2,"font-size","18px"],["mat-icon-button","","title","Clear",3,"click"],[1,"far","fa-xmark-circle",2,"font-size","18px"]],template:function(i,o){i&1&&(p(0,"mat-calendar-header"),_(1,$t,3,2,"ng-container",0),T(2,"async"),r()),i&2&&(m(),c("ngIf",I(2,1,o.calendarConfig$)))},dependencies:[F,ht,gt,A],encapsulation:2})}}return t})(),Et=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=se({type:t})}static{this.\u0275inj=pe({providers:[re],imports:[x,xe,ge,re,fe,Ce]})}}return t})();function Gt(t,s){if(t&1&&(p(0,"mat-label",7)(1,"span"),f(2),r()()),t&2){let e=a();c("show",e.placeholder),m(2),te(e.placeholder)}}var Yt={parse:{dateInput:"DD MMM YYYY"},display:{dateInput:"dddd, D MMMM YYYY",monthYearLabel:"MMM YYYY",dateA11yLabel:"dddd, D MMMM YYYY",monthYearA11yLabel:"MMMM YYYY"}},Mt=(()=>{class t{set hidelClearBtn(e){this.calendarService.setHeaderConfig({hideBtnClear:e,hideBtnToday:this.calendarService.calendarConfig.hideBtnToday})}change(e){let i=null;e&&(i=e.toDate(),i.setHours(0,0,0,0)),this.onChange(i),this.dateChange.emit(i)}constructor(e){this.calendarService=e,this.headerComponent=kt,this.appearance="outline",this.isFloatingLabel=!0,this.disabled=!1,this.readOnly=!1,this.dateChange=new P,this.minDate=h.MinDate,this.onChange=i=>{},this.displayToggle=!0}writeValue(e){this.date=e}registerOnChange(e){this.onChange=e}registerOnTouched(e){}setDisabledState(e){this.disabled=e}onOpenDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="inside")}}onCloseDatepicker(){let e=document.getElementById("dropdown-filter");if(e){var i=new bootstrap.Dropdown(e);i&&(i._config.autoClose="outside")}}ngOnDestroy(){this.calendarService.setHeaderConfig({hideBtnClear:!1,hideBtnToday:!1})}static{this.\u0275fac=function(i){return new(i||t)(H(Ie))}}static{this.\u0275cmp=v({type:t,selectors:[["datepicker"]],inputs:{data_cy:"data_cy",placeholder:"placeholder",displayToggle:"displayToggle",appearance:"appearance",width:"width",isFloatingLabel:"isFloatingLabel",date:"date",disabled:"disabled",readOnly:"readOnly",minDateValidation:"minDateValidation",maxDateValidation:"maxDateValidation",hidelClearBtn:"hidelClearBtn"},outputs:{dateChange:"dateChange"},standalone:!1,features:[S([{provide:he,useClass:St,deps:[st]},{provide:mt,useValue:Yt},{provide:Je,multi:!0,useExisting:t}])],decls:7,vars:16,consts:[["picker1",""],[1,"datepicker",3,"disabled","appearance"],[3,"show",4,"ngIf"],["matInput","",3,"dateChange","click","matDatepicker","min","max","placeholder","value","disabled","readonly"],["matSuffix","","aria-hidden","true",1,"datepicker-toggle-icon",3,"click"],[1,"fa-regular","fa-angle-down"],[3,"opened","closed","calendarHeaderComponent"],[3,"show"]],template:function(i,o){if(i&1){let n=E();p(0,"mat-form-field",1),_(1,Gt,3,2,"mat-label",2),p(2,"input",3),y("dateChange",function(g){return C(n),b(o.change(g.value))})("click",function(){C(n);let g=me(6);return b(g.open())}),r(),p(3,"span",4),y("click",function(){C(n);let g=me(6);return b(g.open())}),d(4,"i",5),r(),p(5,"mat-datepicker",6,0),y("opened",function(){return C(n),b(o.onOpenDatepicker())})("closed",function(){return C(n),b(o.onCloseDatepicker())}),r()()}if(i&2){let n=me(6);Ee("width",o.width||100,"%"),c("disabled",o.disabled)("appearance",o.appearance),m(),c("ngIf",o.isFloatingLabel&&o.placeholder),m(),Ye("placeholder",o.placeholder||""),c("matDatepicker",n)("min",o.minDateValidation)("max",o.maxDateValidation)("value",o.date==o.minDate?null:o.date)("disabled",o.disabled)("readonly",o.readOnly),Ge("data-cy",o.data_cy),m(),Ee("display",o.displayToggle?"unset":"none"),m(2),c("calendarHeaderComponent",o.headerComponent)}},dependencies:[F,Te,bt,pt,lt,ct,dt],styles:[`.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline{background-color:#e9ecef!important;opacity:1!important}.mat-mdc-form-field-disabled ::ng-deep .mat-form-field-appearance-outline input{color:#00000061!important}.datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{min-height:3px;padding-top:18px;padding-bottom:13px}.datepicker .mat-mdc-icon-button.mat-mdc-button-base{padding:0}.datepicker .mat-mdc-form-field-subscript-wrapper{display:none}.mat-calendar-controls .mat-mdc-icon-button.mat-mdc-button-base{padding:0!important}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{top:28px!important;font-size:16px;color:#9da2a6}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:23px!important;font-size:.875rem;color:#ccc}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:#fff}.datepicker .datepicker-toggle-icon{width:28px;height:36px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;margin-right:6px}.datepicker .datepicker-toggle-icon i{font-family:"Font Awesome 6 Pro","Font Awesome 6 Free","Font Awesome 5 Pro","Font Awesome 5 Free";font-weight:400;font-size:16px;line-height:1;color:#6b7280}
2
- `],encapsulation:2})}}return t})(),Dt=(()=>{class t{static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275mod=se({type:t})}static{this.\u0275inj=pe({providers:[re],imports:[x,xe,ge,re,fe,Ce,Et,vt]})}}return t})();var Ne=()=>[];function Ht(t,s){t&1&&(p(0,"span",5),f(1,"*"),r())}function Wt(t,s){if(t&1&&d(0,"ng-select",6),t&2){let e=a().$implicit;c("multiple",!0)("formControlName",e.attribute_id)("items",e.attribute_value_list?e.attribute_value_list:de(4,Ne))("placeholder","Pilih "+(e==null?null:e.name))}}function Xt(t,s){if(t&1&&d(0,"input",8),t&2){let e=a(2).$implicit;c("formControlName",e.attribute_id)("placeholder","Isi "+(e==null?null:e.name))}}function Jt(t,s){if(t&1&&(p(0,"option",15),f(1),r()),t&2){let e=s.$implicit;c("value",e),m(),te(e)}}function zt(t,s){if(t&1&&(p(0,"div",10),d(1,"input",12),p(2,"select",13)(3,"option",14),f(4,"Unit"),r(),B(5,Jt,2,2,"option",15,L),r()()),t&2){let e=a(3).$implicit;c("formGroupName",e.attribute_id),m(),c("placeholder","Isi "+(e==null?null:e.name)),m(2),c("value",null),m(2),R(e==null||e.attribute_info==null?null:e.attribute_info.attribute_unit_list)}}function Qt(t,s){if(t&1&&d(0,"input",11),t&2){let e=a(3).$implicit;c("formControlName",e.attribute_id)("placeholder","Isi "+(e==null?null:e.name))}}function qt(t,s){if(t&1&&_(0,zt,7,3,"div",10)(1,Qt,1,2,"input",11),t&2){let e=a(2).$implicit,i=a(2);k((e==null||e.attribute_info==null?null:e.attribute_info.format_type)==i.formatType.FORMAT_QUANTITATIVE_WITH_UNIT?0:1)}}function Zt(t,s){if(t&1&&d(0,"datepicker",9),t&2){let e=a(2).$implicit;c("formControlName",e.attribute_id)}}function Kt(t,s){if(t&1&&_(0,Xt,1,2,"input",8)(1,qt,2,1)(2,Zt,1,1,"datepicker",9),t&2){let e,i=a().$implicit,o=a(2);k((e=i==null||i.attribute_info==null?null:i.attribute_info.input_validation_type)===o.validationType.VALIDATOR_STRING_TYPE?0:e===o.validationType.VALIDATOR_FLOAT_TYPE?1:e===o.validationType.VALIDATOR_DATE_TYPE?2:-1)}}function ei(t,s){if(t&1&&d(0,"ng-select",7),t&2){let e=a().$implicit;c("formControlName",e.attribute_id)("items",e.attribute_value_list?e.attribute_value_list:de(3,Ne))("placeholder","Pilih "+(e==null?null:e.name))}}function ti(t,s){if(t&1&&d(0,"ng-select",7),t&2){let e=a().$implicit;c("formControlName",e.attribute_id)("items",e.attribute_value_list?e.attribute_value_list:de(3,Ne))("placeholder","Pilih "+(e==null?null:e.name))}}function ii(t,s){if(t&1&&(p(0,"div",3)(1,"div",4),_(2,Ht,2,0,"span",5),p(3,"span"),f(4),r()(),_(5,Wt,1,5,"ng-select",6)(6,Kt,3,1)(7,ei,1,4,"ng-select",7)(8,ti,1,4,"ng-select",7),r()),t&2){let e,i=s.$implicit,o=a(2);m(2),k(i.mandatory?2:-1),m(2),Z(" ",i==null?null:i.name," "),m(),k((e=i==null||i.attribute_info==null?null:i.attribute_info.input_type)===o.inputType.MULTI_COMBO_BOX?5:e===o.inputType.FREE_TEXT_FILED?6:e===o.inputType.SINGLE_COMBO_BOX?7:8)}}function ni(t,s){if(t&1&&(w(0),p(1,"form",1)(2,"div",2),B(3,ii,9,3,"div",3,L),r()(),O()),t&2){let e=s.ngIf,i=a();m(),c("formGroup",i.form),m(2),R(e)}}var Nt=(()=>{class t{constructor(){this.formCategoryService=u(De),this.attributesChanges=new P,this.inputType=q,this.formatType=ae,this.validationType=le}ngOnChanges(){h.IsNotEmpty(this.categoryId)&&h.IsNotEmpty(this.channelId)&&(this.attributes$=this.formCategoryService.getAttributes({categoryId:this.categoryId,channelId:this.channelId,channelType:this.channelType}).pipe(U(e=>{this.form=this.formCategoryService.createFormGroup(e),this.listenToFormChange(e)}),ee(1)))}listenToFormChange(e){let i=[];this.formSubscription=this.form.valueChanges.subscribe(o=>{i=this.formCategoryService.getFilteredAttributes(e,o),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["shopee-attribute-form"]],inputs:{channelType:"channelType",categoryId:"categoryId",channelId:"channelId",channelProductUpload:"channelProductUpload"},outputs:{attributesChanges:"attributesChanges"},features:[S([De]),N],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","value_id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","value_id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"],[1,"attribute-datepicker",3,"formControlName"],[1,"d-flex","align-items-center",3,"formGroupName"],["type","text","autoNum","",1,"form-control",3,"formControlName","placeholder"],["formControlName","value","type","text","autoNum","",1,"form-control","me-1",2,"width","200px",3,"placeholder"],["name","unit","id","unit","formControlName","unit",1,"form-control"],["disabled","","selected","",3,"value"],[3,"value"]],template:function(i,o){i&1&&(_(0,ni,5,1,"ng-container",0),T(1,"async")),i&2&&c("ngIf",I(1,1,o.attributes$))},dependencies:[x,F,A,j,Y,G,X,Ze,Ke,ie,qe,$,W,J,z,Qe,yt,Dt,Mt],styles:["input[_ngcontent-%COMP%], select[_ngcontent-%COMP%]{height:36px;border-radius:4px} datepicker.attribute-datepicker>mat-form-field.mat-mdc-form-field>.mat-mdc-text-field-wrapper{height:36px} datepicker.attribute-datepicker .mat-mdc-text-field-wrapper.mdc-text-field--outlined .mat-mdc-form-field-infix{padding-top:11px!important;padding-bottom:11px!important;height:36px;min-height:36px!important} datepicker.attribute-datepicker mat-datepicker-toggle>button.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 36px}"]})}}return t})();var Pe=(()=>{class t{constructor(){this.httpService=u(oe),this.formBuilder=u(Q),this.uploadProductService=u(ve)}getAttributes(e,i){return this.httpService.get("api/product/tiktok/GetAttributes",[{key:"ID",value:e},{key:"CategoryID",value:i}]).pipe(Be(n=>this.uploadProductService.selectedProduct$.pipe(V(l=>(n=this.mappingAttributeSalesProperty(n,l),n)))))}mappingAttributeSalesProperty(e,i){let o=0;return e.filter(n=>(n.type=="SALES_PROPERTY"&&(o+=1),o>1?(o=0,!1):!0)).map(n=>(n.type=="SALES_PROPERTY"&&(n.name="Jenis Variant",n.is_multiple_selection=!1,n.is_required=this.isProductHasMoreVariant(i),n.values=[{id:"Warna",name:"Warna"},{id:"Ukuran",name:"Ukuran"}]),n))}isProductHasMoreVariant(e){let i=!1,o=[];return e.forEach(n=>{n.Variants&&o.push(n.Variants.length)}),i=o.some(n=>n>1),i}createFormGroup(e){let i=this.formBuilder.group({}),o=[];return e.forEach(n=>{o=[],n.is_required&&o.push(ue.required),i.addControl(n.id,this.formBuilder.control(null,o))}),i}getFilteredAttributes(e,i){let o=JSON.parse(JSON.stringify(e)),n=Object.keys(i),l=o.filter(g=>n.findIndex(Ae=>parseInt(Ae)==g.id)!=-1);return l=this.filterSelectedAttributes(l,i),l}filterSelectedAttributes(e,i){return e.map(n=>(h.IsNotEmpty(n.values)?n.is_multiple_selection?n.values=n.values.filter(l=>i[n.id]?.includes(l.id)):n.values=n.values.filter(l=>l.id==i[n.id]):i[n.id]&&(n.values=[{id:null,name:i[n.id]}]),n)).filter(n=>n?.values?.length>0)}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac})}}return t})();function oi(t,s){t&1&&(p(0,"span",5),f(1,"*"),r())}function ri(t,s){if(t&1&&d(0,"ng-select",6),t&2){let e=a().$implicit;c("multiple",!0)("formControlName",e.id)("items",e.values)("placeholder","Pilih "+(e==null?null:e.name))}}function ai(t,s){if(t&1&&d(0,"ng-select",7),t&2){let e=a().$implicit;c("formControlName",e.id)("items",e.values)("placeholder","Pilih "+(e==null?null:e.name))}}function li(t,s){if(t&1&&d(0,"input",8),t&2){let e=a().$implicit;c("formControlName",e.id)("placeholder",e==null?null:e.name)}}function ci(t,s){if(t&1&&(p(0,"small",5),f(1),r()),t&2){let e=a().$implicit;m(),Z(" ",e==null?null:e.name," is mandatory ")}}function pi(t,s){if(t&1&&(p(0,"div",3)(1,"div",4),_(2,oi,2,0,"span",5),p(3,"span"),f(4),r()(),_(5,ri,1,4,"ng-select",6)(6,ai,1,3,"ng-select",7)(7,li,1,2,"input",8)(8,ci,2,1,"small",5),r()),t&2){let e=s.$implicit;m(2),k(e.is_required?2:-1),m(2),Z(" ",e==null?null:e.name," "),m(),k(e.is_multiple_selection?5:e.values!==null&&e.values.length>0?6:7),m(3),k(e.is_required?8:-1)}}function si(t,s){if(t&1&&(w(0),p(1,"form",1)(2,"div",2),B(3,pi,9,4,"div",3,L),r()(),O()),t&2){let e=s.ngIf,i=a();m(),c("formGroup",i.form),m(2),R(e)}}var Pt=(()=>{class t{constructor(){this.tiktokAttributeFormService=u(Pe),this.attributesChanges=new P}ngOnChanges(){h.IsNotEmpty(this.categoryId)&&h.IsNotEmpty(this.channelId)&&(this.attributes$=this.tiktokAttributeFormService.getAttributes(this.channelId,this.categoryId).pipe(V(e=>e.filter(i=>!(i.type=="PRODUCT_PROPERTY"&&(h.IsEmpty(i.values)||i.values?.length==0)&&i.is_customizable==!1))),U(e=>{this.form=this.tiktokAttributeFormService.createFormGroup(e),this.listenToFormChange(e)}),ee(1)))}listenToFormChange(e){let i=[];this.formSubscription=this.form.valueChanges.subscribe(o=>{i=this.tiktokAttributeFormService.getFilteredAttributes(e,o),this.attributesChanges.emit(i)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["tiktok-attribute-form"]],inputs:{channelId:"channelId",categoryId:"categoryId"},outputs:{attributesChanges:"attributesChanges"},features:[S([Pe]),N],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],[1,"text-danger"],["bindLabel","name","bindValue","id",3,"multiple","formControlName","items","placeholder"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"],["type","text",1,"form-control",3,"formControlName","placeholder"]],template:function(i,o){i&1&&(_(0,si,5,1,"ng-container",0),T(1,"async")),i&2&&c("ngIf",I(1,1,o.attributes$))},dependencies:[x,F,A,j,Y,G,X,ie,$,W,J,z,ne],encapsulation:2})}}return t})();var we=(()=>{class t{constructor(){this.woocommerceUploadService=u(ye)}getAttributes(e,i){return this.woocommerceUploadService.getAttributes(e,i).pipe(V(o=>o.map(n=>({key:n.name,label:n.name}))))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac})}}return t})();var wt=(()=>{class t{constructor(){this.wooAttributeFormService=u(we),this.channelId=ke(),this.categoryId=ke(),this.attributesChanges=new P}ngOnChanges(){h.IsNotEmpty(this.categoryId())&&h.IsNotEmpty(this.channelId())&&(this.attributes$=this.wooAttributeFormService.getAttributes(this.channelId(),this.categoryId()))}onSelectAttribute(e){this.attributesChanges.emit([e.key])}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["wooocommerce-attribute-form"]],inputs:{channelId:[1,"channelId"],categoryId:[1,"categoryId"]},outputs:{attributesChanges:"attributesChanges"},features:[S([we]),N],decls:6,vars:3,consts:[[1,"row"],[1,"col-6"],[1,"mb-1"],["bindLabel","label","bindValue","id","placeholder","Pilih Atribut",3,"change","items"]],template:function(i,o){i&1&&(p(0,"div",0)(1,"div",1)(2,"div",2),f(3,"Atribut"),r(),p(4,"ng-select",3),T(5,"async"),y("change",function(l){return o.onSelectAttribute(l)}),r()()()),i&2&&(m(4),c("items",I(5,1,o.attributes$)))},dependencies:[x,A,ne,j,Y,G],encapsulation:2})}}return t})();var Oe=(()=>{class t{constructor(){this.httpService=u(oe),this.formBuilder=u(Q)}getAttributes(e,i){return this.httpService.get("api/product/tokopedia/GetAttributes",[{key:"ID",value:e},{key:"CategoryID",value:i}]).pipe(V(n=>n))}createFormGroup(e){let i=this.formBuilder.group({});return e.forEach(o=>{i.addControl(o.variant,this.formBuilder.control(null))}),i}convertAttributes(e={}){return Object.values(e).filter(o=>o!==null).map(o=>JSON.stringify(o))}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac})}}return t})();function mi(t,s){if(t&1&&(p(0,"div",3)(1,"div",4),f(2),r(),d(3,"ng-select",5),r()),t&2){let e=s.$implicit;m(2),Z(" ",e==null?null:e.variant," "),m(),c("formControlName",e.variant)("items",e.values)("placeholder","Pilih "+(e==null?null:e.variant))}}function di(t,s){if(t&1&&(w(0),p(1,"form",1)(2,"div",2),B(3,mi,4,4,"div",3,L),r()(),O()),t&2){let e=s.ngIf,i=a();m(),c("formGroup",i.form),m(2),R(e)}}var Ot=(()=>{class t{constructor(){this.tokpedAttrFormService=u(Oe),this.attributesChanges=new P}ngOnInit(){}ngOnChanges(e){h.IsNotEmpty(this.categoryId)&&h.IsNotEmpty(this.channelId)&&(this.attributes$=this.tokpedAttrFormService.getAttributes(this.channelId,this.categoryId).pipe(U(i=>{this.form=this.tokpedAttrFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){let e=[];this.formSubscription=this.form.valueChanges.subscribe(i=>{e=this.tokpedAttrFormService.convertAttributes(i),this.attributesChanges.emit(e)})}ngOnDestroy(){this.formSubscription&&this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["tokopedia-attribute-form"]],inputs:{channelId:"channelId",categoryId:"categoryId"},outputs:{attributesChanges:"attributesChanges"},features:[S([Oe]),N],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["bindLabel","name","bindValue","id",3,"formControlName","items","placeholder"]],template:function(i,o){i&1&&(_(0,di,5,1,"ng-container",0),T(1,"async")),i&2&&c("ngIf",I(1,1,o.attributes$))},dependencies:[x,F,A,j,Y,G,X,$,W,J,z],encapsulation:2})}}return t})();var Ve=(()=>{class t{constructor(){this.httpService=u(oe),this.formBuilder=u(Q)}getAttributes(e){return this.httpService.get("api/product/shopify/GetAttributes",[{key:"ID",value:e}]).pipe(U(o=>(o.Options.StatusOptions=o.Options.Status.map(n=>({id:n,name:n})),o)))}createFormGroup(e){let i=this.formBuilder.group({});return Object.keys(e.Attribute).forEach(n=>{i.addControl(n,this.formBuilder.control(null))}),i}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275prov=D({token:t,factory:t.\u0275fac})}}return t})();function ui(t,s){if(t&1&&(w(0),p(1,"form",1)(2,"div",2)(3,"div",3)(4,"div",4),f(5," Brand "),r(),d(6,"input",5),r(),p(7,"div",6)(8,"div",4),f(9," Product Type "),r(),d(10,"input",7),r(),p(11,"div",6)(12,"div",4),f(13," Status "),r(),d(14,"ng-select",8),r()()(),O()),t&2){let e=s.ngIf,i=a();m(),c("formGroup",i.form),m(13),c("items",e.Options.StatusOptions)}}var Vt=(()=>{class t{constructor(){this.attributesChanges=new P,this.shopifyFormService=u(Ve)}ngOnChanges(e){e.channelId&&(this.attributes$=this.shopifyFormService.getAttributes(this.channelId).pipe(U(i=>{this.form=this.shopifyFormService.createFormGroup(i),this.listenToFormChange()})))}listenToFormChange(){this.formSubscription=this.form.valueChanges.pipe(Re(500)).subscribe(e=>{this.attributesChanges.emit([e])})}ngOnDestroy(){this.formSubscription.unsubscribe()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["shopify-attribute-form"]],inputs:{channelId:"channelId"},outputs:{attributesChanges:"attributesChanges"},features:[S([Ve]),N],decls:2,vars:3,consts:[[4,"ngIf"],[3,"formGroup"],[1,"row"],[1,"col-6","mb-3"],[1,"mb-1"],["formControlName","Brand","type","text","placeholder","brand",1,"form-control"],[1,"col-6"],["formControlName","ProductType","type","text","placeholder","Product Type",1,"form-control"],["formControlName","Status","bindLabel","name","bindValue","id","placeholder","Status",3,"items"]],template:function(i,o){i&1&&(_(0,ui,15,2,"ng-container",0),T(1,"async")),i&2&&c("ngIf",I(1,1,o.attributes$))},dependencies:[x,F,A,G,X,ie,$,W,J,z,j,Y],encapsulation:2})}}return t})();function _i(t,s){if(t&1&&(p(0,"div",6),d(1,"app-product-card",9),r()),t&2){let e=s.$implicit;m(),c("productId",e==null?null:e.ID)("title",e==null?null:e.Name)("image",e==null?null:e.ThumbnailUrl)("description",(e==null||e.Variants==null?null:e.Variants.length)>1?(e==null||e.Variants==null?null:e.Variants.length)+" Variants":null)("imageForZoom",e==null?null:e.ImageUrl)("code",e==null||e.Variants[0]==null?null:e.Variants[0].Code)("showFooter",!1)}}function fi(t,s){if(t&1){let e=E();w(0),p(1,"mat-checkbox",21),We("ngModelChange",function(o){C(e);let n=a().$implicit;return He(n.selected,o)||(n.selected=o),b(o)}),y("ngModelChange",function(){let o=C(e).ngIf,n=a(),l=n.$implicit,g=n.$index,ce=a();return b(ce.onSelectChannel(l,g,o))}),r(),O()}if(t&2){let e=a().$implicit;m(),je("ngModel",e.selected)}}function hi(t,s){if(t&1&&(p(0,"div",18),d(1,"input",22),r()),t&2){let e=a().$implicit,i=a();c("matTooltip",e.type==i.channelType.Shopify?"Cannot change category, please change category in admin.shopify.com":e.type==i.channelType.Plugo?"You can change the category after the product has been uploaded to the Plugo Dashboard.":"")}}function gi(t,s){if(t&1){let e=E();p(0,"app-channel-category-select",23),y("selectedCategory",function(o){C(e);let n=a().$index,l=a();return b(l.onCategoryChange(n,o))}),r()}if(t&2){let e=a().$implicit,i=a();c("disabled",!e.selected||e.selected&&e.type==i.channelType.Lazada)("channelId",e.id)("channelType",e.type)("categoryId",e.categoryId)}}function Ci(t,s){if(t&1){let e=E();p(0,"shopee-attribute-form",27),y("attributesChanges",function(o){C(e);let n=a(2).$index,l=a();return b(l.onAttributesChange(n,o))}),r()}if(t&2){let e=a(2).$implicit;c("categoryId",e.categoryId)("channelId",e.id)("channelType",e.type)}}function bi(t,s){if(t&1){let e=E();p(0,"tiktok-attribute-form",28),y("attributesChanges",function(o){C(e);let n=a(2).$index,l=a();return b(l.onAttributesChange(n,o))}),r()}if(t&2){let e=a(2).$implicit;c("categoryId",e.categoryId)("channelId",e.id)}}function yi(t,s){if(t&1){let e=E();p(0,"wooocommerce-attribute-form",28),y("attributesChanges",function(o){C(e);let n=a(2).$index,l=a();return b(l.onAttributesChange(n,o))}),r()}if(t&2){let e=a(2).$implicit;c("categoryId",e.categoryId)("channelId",e.id)}}function vi(t,s){if(t&1){let e=E();p(0,"tokopedia-attribute-form",28),y("attributesChanges",function(o){C(e);let n=a(2).$index,l=a();return b(l.onAttributesChange(n,o))}),r()}if(t&2){let e=a(2).$implicit;c("categoryId",e.categoryId)("channelId",e.id)}}function xi(t,s){if(t&1&&(p(0,"div",20)(1,"div",24),_(2,Ci,1,3,"shopee-attribute-form",25)(3,bi,1,2,"tiktok-attribute-form",26)(4,yi,1,2,"wooocommerce-attribute-form",26)(5,vi,1,2,"tokopedia-attribute-form",26),r()()),t&2){let e,i=a().$implicit,o=a();m(2),k((e=i.type)===o.channelType.Shopee?2:e===o.channelType.Tiktok?3:e===o.channelType.WooCommerce?4:e===o.channelType.Tokopedia?5:-1)}}function Ti(t,s){if(t&1){let e=E();p(0,"div",20)(1,"div",24)(2,"shopify-attribute-form",29),y("attributesChanges",function(o){C(e);let n=a().$index,l=a();return b(l.onAttributesChange(n,o))}),r()()()}if(t&2){let e=a().$implicit;m(2),c("channelId",e.id)}}function Ii(t,s){if(t&1&&(p(0,"div",8)(1,"div",10)(2,"div",11)(3,"div",12)(4,"div",13)(5,"div"),_(6,fi,2,1,"ng-container",14),T(7,"async"),r(),p(8,"div"),d(9,"app-channel-logo",15),r(),p(10,"div",16)(11,"span"),f(12),r()()()(),p(13,"div",12)(14,"div",17),_(15,hi,2,1,"div",18)(16,gi,1,4,"app-channel-category-select",19),r()()(),_(17,xi,6,1,"div",20)(18,Ti,3,1,"div",20),r()()),t&2){let e=s.$implicit,i=a();m(6),c("ngIf",I(7,8,i.defaultCategories$)),m(3),c("typeId",e.type)("showChannelName",!1),m(),c("matTooltip",e.name)("matTooltipShowDelay",2500),m(2),te(e.name),m(3),k(e.type==i.channelType.Shopify||e.type==i.channelType.Plugo?15:16),m(2),k(e.categoryId&&i.channelType.Lazada!=e.type&&e.selected?17:i.channelType.Shopify==e.type&&e.selected?18:-1)}}var br=(()=>{class t{constructor(){this.uploadProductService=u(ve),this.selectedProducts$=this.uploadProductService.selectedProduct$,this.channelProductUploads=this.uploadProductService.channelProductUpload,this.channelType=et,this.defaultCategories$=this.uploadProductService.getDefaultCategory().pipe(ee(1))}onCategoryChange(e,i){this.channelProductUploads.update(o=>o.map((n,l)=>(l==e&&(n.categoryId=i,n.attributes=[]),n)))}onAttributesChange(e,i){this.channelProductUploads.update(o=>o.map((n,l)=>(l==e&&(n.attributes=i),n)))}onSelectChannel(e,i,o){this.channelProductUploads.update(n=>n.map((l,g)=>{if(g==i&&e.selected){let ce=this.findCategoryByChannelId(e.id,o);l.categoryId=ce?.DefaultCategoryID}return g==i&&!e.selected&&(l.categoryId=null),l}))}findCategoryByChannelId(e,i){return i.find(o=>o.ID===e)}onUploadProduct(){this.uploadProductService.onUploadProduct(this.channelProductUploads())}ngOnDestroy(){this.uploadProductService.clearSelectedProduct()}static{this.\u0275fac=function(i){return new(i||t)}}static{this.\u0275cmp=v({type:t,selectors:[["app-product-upload"]],features:[S([be,ut,_t,ye])],decls:17,vars:5,consts:[["headerTitle","Upload Product To Channel",3,"hideSearchBox","hideSearchDropdown"],[1,"btn","btn-light","shadow","rounded","ms-2",3,"click","disabled"],["aria-hidden","true",1,"fa","fa-upload"],[1,"container-fluid","mt-6"],[1,"ps-3","mt-8","pb-5","fw-medium"],[1,"row","mb-10","ps-3"],[1,"col-12","col-md-6","col-xl-4","px-3","my-3"],[1,"ps-3","mb-8","border-bottom","pb-5","fw-medium"],[1,"row","mb-6"],[3,"productId","title","image","description","imageForZoom","code","showFooter"],[1,"col-12"],[1,"row"],[1,"col-3"],[1,"d-flex","align-items-center"],[4,"ngIf"],[3,"typeId","showChannelName"],[2,"overflow","hidden","text-overflow","ellipsis","white-space","nowrap",3,"matTooltip","matTooltipShowDelay"],[1,"w-100"],["matTooltipPosition","above",3,"matTooltip"],[3,"disabled","channelId","channelType","categoryId"],[1,"row","my-3"],["color","primary",1,"example-margin",3,"ngModelChange","ngModel"],["disabled","","type","text","placeholder","Category Unavailable",1,"form-control","rounded-1",2,"height","35px"],[3,"selectedCategory","disabled","channelId","channelType","categoryId"],[1,"col-12","ps-11"],[3,"categoryId","channelId","channelType"],[3,"categoryId","channelId"],[3,"attributesChanges","categoryId","channelId","channelType"],[3,"attributesChanges","categoryId","channelId"],[3,"attributesChanges","channelId"]],template:function(i,o){if(i&1&&(p(0,"mainpanel",0)(1,"actions")(2,"button",1),y("click",function(){return o.onUploadProduct()}),d(3,"i",2),f(4," Upload "),r()(),p(5,"content")(6,"div",3)(7,"h3",4),f(8,"Product To Upload"),r(),p(9,"div",5),B(10,_i,2,7,"div",6,L),T(12,"async"),r(),p(13,"h3",7),f(14,"Channel To Upload"),r(),B(15,Ii,19,10,"div",8,L),r()()()),i&2){let n;c("hideSearchBox",!0)("hideSearchDropdown",!0),m(2),c("disabled",((n=o.channelProductUploads())==null?null:n.length)==0),m(8),R(I(12,3,o.selectedProducts$)),m(5),R(o.channelProductUploads())}},dependencies:[x,F,A,xt,ot,nt,It,Tt,at,rt,ne,$,ze,it,tt,Pt,wt,Ot,Vt,ft,Ft,Nt],encapsulation:2})}}return t})();export{br as ProductUploadComponent};
@@ -1 +0,0 @@
1
- import{ma as o}from"./chunk-B7KTCPKC.js";var _=new o("MAT_INPUT_VALUE_ACCESSOR");export{_ as a};
@@ -1 +0,0 @@
1
- import{a as ae,b as M}from"./chunk-K77RTNG2.js";import{a as oe}from"./chunk-2ODVHD2K.js";import{a as re}from"./chunk-EPVCMYCI.js";import"./chunk-DL66NZ2A.js";import"./chunk-L3FX4O3H.js";import"./chunk-PNITO7BE.js";import"./chunk-E4KNET2R.js";import"./chunk-74IXJYWO.js";import"./chunk-GIRXMYNI.js";import"./chunk-IIZDEGGW.js";import"./chunk-AQTXFEBA.js";import"./chunk-SDUUFQUI.js";import"./chunk-5OHRA4AS.js";import"./chunk-IL5JIRWJ.js";import"./chunk-MH4SJTQX.js";import"./chunk-3RK6DDJD.js";import"./chunk-CUB2QFUO.js";import"./chunk-KALG6D6L.js";import{a as te,b as ie}from"./chunk-M7NQID2Z.js";import"./chunk-CMTBBXR5.js";import{a as le}from"./chunk-NOP5P5R5.js";import{a as ne}from"./chunk-D6URDVES.js";import"./chunk-XHYJOIC5.js";import"./chunk-Z3ITXK3D.js";import"./chunk-ACIMXBIC.js";import"./chunk-AEOSNAHH.js";import"./chunk-TGMCGROM.js";import"./chunk-KMJM6UVY.js";import"./chunk-JXSBFTQM.js";import"./chunk-K5XRGNWG.js";import"./chunk-5JVEEL2T.js";import"./chunk-PW42BQIY.js";import{m as $,n as ee}from"./chunk-UGVEAL7H.js";import{A as X,c as J,h as K,m as Q,o as U}from"./chunk-6QYD6NIJ.js";import"./chunk-ATZ475FN.js";import"./chunk-SWQXSJ7O.js";import{r as Y,s as Z}from"./chunk-IHNN4Q2N.js";import"./chunk-EQIFZBRG.js";import{j as R,k as j,m as q,n as G}from"./chunk-M2FCTYGU.js";import{$c as w,Gb as W,Gc as o,Hc as h,Kc as c,Lc as u,Mb as L,Mc as C,Nc as I,Oc as k,Pc as A,Qc as z,Ra as O,Yb as g,Z as P,ad as x,bd as H,dc as N,ec as D,gc as F,hc as B,ic as e,jc as t,kc as _,oc as b,pa as V,rb as l,tc as v,uc as y,ya as p,za as s}from"./chunk-B7KTCPKC.js";import"./chunk-EU2KAMEK.js";import{a as E,b as T}from"./chunk-66YHNWRR.js";function me(m,S){if(m&1&&(e(0,"tr")(1,"td"),o(2),t(),e(3,"td"),_(4,"order-link",26),t(),e(5,"td"),o(6),t(),e(7,"td"),o(8),w(9,"number"),t(),e(10,"td"),o(11),w(12,"date"),t(),e(13,"td"),_(14,"app-channel-logo",27),t()()),m&2){let r=S.$implicit;l(2),h(r.Outlet),l(2),g("order",r),l(2),h(r.Customer),l(2),h(x(9,6,r.Amount)),l(3),h(H(12,8,r.Created,"dd MMM yyyy HH:mm")),l(3),g("typeId",r==null?null:r.TypeID)}}function de(m,S){if(m&1){let r=b();e(0,"div",15)(1,"table",17)(2,"thead",18)(3,"tr",19)(4,"th",20),o(5,"Outlet"),t(),e(6,"th",21),o(7,"Order number"),t(),e(8,"th"),o(9,"Customer"),t(),e(10,"th",22),o(11,"Amount"),t(),e(12,"th",23),o(13," Created On "),t(),e(14,"th",24),o(15,"Channel"),t()()(),e(16,"tbody"),F(17,me,15,11,"tr",null,D),t()(),e(19,"app-custom-paginator",25),v("next",function(){p(r);let i=y();return s(i.initCancelledOrders())})("previous",function(){p(r);let i=y();return s(i.initCancelledOrders())}),t()()}if(m&2){let r=y(),a=A(0);l(17),B(a),l(2),g("filter",r.filter())("totaldata",a==null?null:a.length)("paginationTotal",a==null?null:a.length)("hasClicked",!0)("nextButtonAlwaysVisible",!0)}}function pe(m,S){m&1&&(e(0,"div",16),_(1,"app-empty-state"),t())}var Le=(()=>{class m{constructor(){this.orderService=V(M),this.filter=O({PageNumber:1,PageSize:20,ListChannelID:[],From:null,To:null,Number:null})}ngOnInit(){let r=this.orderService.getOrderDefaultValue();this.filter.update(a=>T(E({},a),{From:r})),this.initCancelledOrders()}initCancelledOrders(){this.cancelledOrders$=this.orderService.getCancelledOrders(this.filter()).pipe(P(1))}static{this.\u0275fac=function(a){return new(a||m)}}static{this.\u0275cmp=W({type:m,selectors:[["app-cancelled"]],features:[z([M])],decls:34,vars:11,consts:[["headerTitle","Cancelled","searchBoxPlaceHolder","Order Number...",3,"onSubmit","textChange","text"],["href","https://ods.dealpos.app","target","_blank","matTooltip","Monitor your Order & Fulfillment in real-time from TV!",1,"btn","btn-outline-secondary","shadow","rounded","ms-2"],[1,"fa-regular","fa-tv","me-3"],[1,"fw-bold","mb-2"],[3,"ngModelChange","multiple","ngModel"],[1,"mt-5"],[1,"mb-4"],["name","From",3,"dateChange","date"],["name","To",3,"dateChange","date"],[1,"fw-bold"],["type","number","name","PageNumber",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],["type","number","name","PageSize",1,"w-100","mt-2","form-control",3,"ngModelChange","ngModel"],[1,"container-fluid","mt-3"],[1,"row"],[1,"col-md-12"],[1,"table-responsive"],[1,"d-flex","flex-column","justify-content-center","align-items-center",2,"margin-top","26vh"],[1,"table","table-hover"],[1,"sticky-top-thead"],[1,"table-light"],[2,"width","120px"],[2,"width","220px"],[2,"width","100px"],["mat-sort-header","created",2,"width","130px"],[2,"width","130px"],[3,"next","previous","filter","totaldata","paginationTotal","hasClicked","nextButtonAlwaysVisible"],[3,"order"],[3,"typeId"]],template:function(a,i){if(a&1){let d=b();I(0),w(1,"async"),e(2,"mainpanel",0),v("onSubmit",function(){return p(d),s(i.initCancelledOrders())}),C("textChange",function(n){return p(d),u(i.filter().Number,n)||(i.filter().Number=n),s(n)}),e(3,"actions")(4,"a",1),_(5,"i",2),e(6,"span"),o(7,"Order Fulfillment Display"),t()()(),e(8,"filters")(9,"div")(10,"label",3),o(11,"From/To"),t(),e(12,"channel-select-options",4),C("ngModelChange",function(n){return p(d),u(i.filter().ListChannelID,n)||(i.filter().ListChannelID=n),s(n)}),t()(),e(13,"div",5)(14,"label",3),o(15,"From/To"),t(),e(16,"div",6)(17,"datepicker",7),C("dateChange",function(n){return p(d),u(i.filter().From,n)||(i.filter().From=n),s(n)}),t()(),e(18,"div")(19,"datepicker",8),C("dateChange",function(n){return p(d),u(i.filter().To,n)||(i.filter().To=n),s(n)}),t()()(),e(20,"div",5)(21,"label",9),o(22,"Page Number"),t(),e(23,"input",10),C("ngModelChange",function(n){return p(d),u(i.filter().PageNumber,n)||(i.filter().PageNumber=n),s(n)}),t()(),e(24,"div",5)(25,"label",9),o(26,"Page Size"),t(),e(27,"input",11),C("ngModelChange",function(n){return p(d),u(i.filter().PageSize,n)||(i.filter().PageSize=n),s(n)}),t()()(),e(28,"content")(29,"div",12)(30,"div",13)(31,"div",14),L(32,de,20,5,"div",15)(33,pe,2,0,"div",16),t()()()()()}if(a&2){let d=k(x(1,8,i.cancelledOrders$));l(2),c("text",i.filter().Number),l(10),g("multiple",!0),c("ngModel",i.filter().ListChannelID),l(5),c("date",i.filter().From),l(2),c("date",i.filter().To),l(4),c("ngModel",i.filter().PageNumber),l(4),c("ngModel",i.filter().PageSize),l(5),N((d==null?null:d.length)>0?32:33)}},dependencies:[G,R,q,j,ee,$,re,ne,X,J,U,K,Q,oe,le,Z,Y,ae,ie,te],encapsulation:2})}}return m})();export{Le as CancelledComponent};