dealpos 25.47.0 → 25.47.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/browser/{chunk-K4LLK7O5.js → chunk-2B5OZGVM.js} +1 -1
  2. package/browser/{chunk-2RERZJD4.js → chunk-2MCEIRJY.js} +1 -1
  3. package/browser/{chunk-HV4KV3DJ.js → chunk-3FYNWZYY.js} +1 -1
  4. package/browser/{chunk-E2DUJTA4.js → chunk-3OHHXDTW.js} +1 -1
  5. package/browser/{chunk-FR66DARJ.js → chunk-3YOY54TO.js} +1 -1
  6. package/browser/{chunk-FY2ZQK3Q.js → chunk-3ZL5OQ6Y.js} +1 -1
  7. package/browser/{chunk-647PQZMJ.js → chunk-44RMDJGQ.js} +1 -1
  8. package/browser/{chunk-2LSFBE4Q.js → chunk-4CKBIRQ2.js} +1 -1
  9. package/browser/{chunk-5OKSTEWQ.js → chunk-4U2TXFUV.js} +1 -1
  10. package/browser/{chunk-KTPMM54V.js → chunk-4Y2FYXDF.js} +1 -1
  11. package/browser/{chunk-C5S5BG57.js → chunk-54OUVAKK.js} +1 -1
  12. package/browser/{chunk-2HOSLZ77.js → chunk-5BH2H4V6.js} +1 -1
  13. package/browser/{chunk-BATVMTNZ.js → chunk-5BLWYLXP.js} +1 -1
  14. package/browser/{chunk-RF5WGONA.js → chunk-5DQ4MJJT.js} +1 -1
  15. package/browser/{chunk-QIFQFG3V.js → chunk-5MJHW4YM.js} +1 -1
  16. package/browser/{chunk-HLML4BKF.js → chunk-5MWGLO24.js} +1 -1
  17. package/browser/{chunk-WDD7INF4.js → chunk-5QUOXOR7.js} +11 -11
  18. package/browser/{chunk-WBO7PC7R.js → chunk-5SJK4QC2.js} +1 -1
  19. package/browser/{chunk-LLEPB2B6.js → chunk-64RUCACD.js} +1 -1
  20. package/browser/{chunk-BYO7FJ4O.js → chunk-6GLKD66N.js} +1 -1
  21. package/browser/{chunk-XE46ZDV6.js → chunk-6PX2PA2J.js} +1 -1
  22. package/browser/{chunk-CAGQRIPG.js → chunk-6UMKFILJ.js} +1 -1
  23. package/browser/{chunk-NN2EFVJK.js → chunk-7GQF6UNI.js} +1 -1
  24. package/browser/{chunk-ROLAW5XO.js → chunk-7KAETFNH.js} +1 -1
  25. package/browser/{chunk-EZ5EW4QK.js → chunk-7SJB3DEF.js} +1 -1
  26. package/browser/{chunk-KBISFX5T.js → chunk-7WXQYKCT.js} +1 -1
  27. package/browser/chunk-A243LOWU.js +1 -0
  28. package/browser/{chunk-ZSW24KNO.js → chunk-A5MP4QMZ.js} +1 -1
  29. package/browser/{chunk-DWZLJMWC.js → chunk-ABNUBGXO.js} +1 -1
  30. package/browser/{chunk-APOV2ZYY.js → chunk-AEXXXOEQ.js} +1 -1
  31. package/browser/{chunk-ABO3BJKM.js → chunk-AMONIKLC.js} +1 -1
  32. package/browser/{chunk-INHUUGSI.js → chunk-AUBQH6JY.js} +1 -1
  33. package/browser/chunk-AVTYR2I6.js +1 -0
  34. package/browser/{chunk-DM4PGQEH.js → chunk-AZBA2YOQ.js} +2 -2
  35. package/browser/{chunk-QDE5Y76C.js → chunk-B3STLAM7.js} +1 -1
  36. package/browser/{chunk-QZMZBCE7.js → chunk-BA3BDB5Y.js} +1 -1
  37. package/browser/chunk-BCUIYEEN.js +1 -0
  38. package/browser/{chunk-OFTORAX4.js → chunk-BK4CA5K2.js} +1 -1
  39. package/browser/{chunk-H4DUHWPT.js → chunk-BVZ7ACQM.js} +1 -1
  40. package/browser/{chunk-EKORPCX3.js → chunk-BWXXYBLG.js} +1 -1
  41. package/browser/{chunk-ON47ICI3.js → chunk-C6YPXBIP.js} +1 -1
  42. package/browser/chunk-CLBQLTFG.js +4 -0
  43. package/browser/{chunk-PECGNYTX.js → chunk-CSFFF2YO.js} +1 -1
  44. package/browser/{chunk-P632SS2L.js → chunk-CUULWZUF.js} +1 -1
  45. package/browser/{chunk-QQ4DCXLE.js → chunk-D6HRDYFW.js} +1 -1
  46. package/browser/{chunk-HQ4NLUV6.js → chunk-DEGB7PBB.js} +1 -1
  47. package/browser/chunk-DPGY5YXC.js +1 -0
  48. package/browser/{chunk-NRF37QSD.js → chunk-E5XIALIA.js} +1 -1
  49. package/browser/chunk-EANAFODJ.js +1 -0
  50. package/browser/{chunk-IGNVHAO2.js → chunk-EQR3RN5K.js} +1 -1
  51. package/browser/{chunk-UBCB4G4S.js → chunk-F652VZDD.js} +1 -1
  52. package/browser/{chunk-EAFSL5ZF.js → chunk-FE5USLDO.js} +1 -1
  53. package/browser/{chunk-BCD363QF.js → chunk-FFNEDDOO.js} +1 -1
  54. package/browser/{chunk-ME5KGPYC.js → chunk-FFW4SP7H.js} +1 -1
  55. package/browser/{chunk-JVEVLEGH.js → chunk-FG3HLE5U.js} +1 -1
  56. package/browser/{chunk-DSQH2UQV.js → chunk-FHPFRT4L.js} +1 -1
  57. package/browser/{chunk-474F5EIO.js → chunk-FJC7EOO5.js} +1 -1
  58. package/browser/{chunk-ZXSVZL53.js → chunk-FNH6K4S4.js} +1 -1
  59. package/browser/chunk-FSBKLNRT.js +4 -0
  60. package/browser/{chunk-BKBSPC2U.js → chunk-G2VAG4V3.js} +1 -1
  61. package/browser/{chunk-5PUIMWNW.js → chunk-G5VELV3S.js} +1 -1
  62. package/browser/{chunk-6WEGHV7F.js → chunk-GN3HVOCN.js} +1 -1
  63. package/browser/{chunk-JWH2AZ3Z.js → chunk-GXVEYJWC.js} +1 -1
  64. package/browser/{chunk-L32BGRA6.js → chunk-GYNJFQPE.js} +1 -1
  65. package/browser/{chunk-UBXEYFKJ.js → chunk-H2SA27YZ.js} +1 -1
  66. package/browser/{chunk-BY57IAJ7.js → chunk-HD2QU6GJ.js} +1 -1
  67. package/browser/{chunk-27Y3MQJV.js → chunk-HVJHE6PQ.js} +1 -1
  68. package/browser/{chunk-P53EATPC.js → chunk-I2SL4ZPJ.js} +1 -1
  69. package/browser/{chunk-KEAT6AT3.js → chunk-I5W4NCFM.js} +1 -1
  70. package/browser/{chunk-EX4TE4E5.js → chunk-IDOZYC3I.js} +1 -1
  71. package/browser/chunk-IFOBYW26.js +1 -0
  72. package/browser/chunk-IVQ42QHP.js +5 -0
  73. package/browser/{chunk-MA6NB2EZ.js → chunk-JIPNMAEP.js} +1 -1
  74. package/browser/{chunk-GK4I3EKQ.js → chunk-JNORDOWT.js} +1 -1
  75. package/browser/{chunk-POJQGU7L.js → chunk-JR5LAUIS.js} +1 -1
  76. package/browser/{chunk-HTJJDQ3V.js → chunk-JYA7PGNK.js} +1 -1
  77. package/browser/{chunk-TH7SO4LD.js → chunk-L2V3KTC6.js} +1 -1
  78. package/browser/{chunk-ORQ3JDJE.js → chunk-LBZL2R6L.js} +1 -1
  79. package/browser/{chunk-Z7IU5JLK.js → chunk-LDTRYGRE.js} +1 -1
  80. package/browser/{chunk-DC426G2P.js → chunk-LOD3JYZW.js} +1 -1
  81. package/browser/{chunk-T5FBPKPS.js → chunk-LRXTFWOZ.js} +1 -1
  82. package/browser/{chunk-LWA7CCEY.js → chunk-M47WPS54.js} +3 -3
  83. package/browser/{chunk-WA4WWHYW.js → chunk-M4EGMZWI.js} +1 -1
  84. package/browser/{chunk-3HS4V7LK.js → chunk-MH7N5XSV.js} +3 -3
  85. package/browser/{chunk-IUDUQNN7.js → chunk-MUM4RT2P.js} +1 -1
  86. package/browser/{chunk-WH2BY5K4.js → chunk-MVUVDYGQ.js} +1 -1
  87. package/browser/chunk-NBMH5YL2.css +1 -0
  88. package/browser/{chunk-UE2HBW5H.js → chunk-NVCUDJUL.js} +1 -1
  89. package/browser/{chunk-PLWCVGTF.js → chunk-O2LFJOK7.js} +1 -1
  90. package/browser/{chunk-IT6GHGT4.js → chunk-OINIYEKP.js} +1 -1
  91. package/browser/{chunk-CX7CJIXK.js → chunk-OJM2IYYY.js} +2 -2
  92. package/browser/chunk-P3SYBLK4.js +21 -0
  93. package/browser/{chunk-MHVF2KXK.js → chunk-PACJK6XZ.js} +1 -1
  94. package/browser/{chunk-Q473GHR5.js → chunk-PEIXGMKS.js} +1 -1
  95. package/browser/{chunk-NX6ACGTN.js → chunk-PIZRVCBM.js} +1 -1
  96. package/browser/{chunk-GNODCFOP.js → chunk-PJCGIZLH.js} +1 -1
  97. package/browser/{chunk-BALKIB67.js → chunk-PKS7H624.js} +1 -1
  98. package/browser/{chunk-4JAEMXSQ.js → chunk-PSJRHKCL.js} +1 -1
  99. package/browser/{chunk-MSW23AJV.js → chunk-QDHSPK4B.js} +1 -1
  100. package/browser/{chunk-DGF2U27C.js → chunk-QGBQPCW2.js} +2 -2
  101. package/browser/{chunk-AIM6VG2H.js → chunk-QJD336PR.js} +1 -1
  102. package/browser/chunk-QLAA4AMU.js +1 -0
  103. package/browser/{chunk-SO4GMA3Y.js → chunk-QPOOLLKY.js} +1 -1
  104. package/browser/{chunk-HU3YNBXW.js → chunk-QVCQODGZ.js} +1 -1
  105. package/browser/chunk-QXWCGE56.js +1 -0
  106. package/browser/{chunk-WMUZZ5XX.js → chunk-RAQ5KDLF.js} +1 -1
  107. package/browser/{chunk-QVJJGWXC.js → chunk-RB6A4M7Y.js} +14 -14
  108. package/browser/{chunk-SGSO4UVM.js → chunk-RCW2TTR7.js} +1 -1
  109. package/browser/{chunk-ULYBLEXA.js → chunk-RJJYGGF6.js} +1 -1
  110. package/browser/{chunk-3YKXHA6Q.js → chunk-RMB6IO7X.js} +1 -1
  111. package/browser/{chunk-YG6ODXQF.js → chunk-RMU3G7EK.js} +1 -1
  112. package/browser/{chunk-FQSAJFS6.js → chunk-RNYFGIMB.js} +1 -1
  113. package/browser/{chunk-JKMJAL6Y.js → chunk-SIS55WCN.js} +2 -2
  114. package/browser/{chunk-RSN23KAR.js → chunk-SKDXVP3A.js} +1 -1
  115. package/browser/{chunk-IQDT5K5I.js → chunk-SQ3QIOE4.js} +1 -1
  116. package/browser/{chunk-RYTM3LHN.js → chunk-SUKZF5RZ.js} +1 -1
  117. package/browser/{chunk-XIXDLSA2.js → chunk-SVUUS5JD.js} +1 -1
  118. package/browser/{chunk-7EQG6N5Y.js → chunk-SWPKQM2X.js} +1 -1
  119. package/browser/{chunk-NZYZO47Z.js → chunk-T25N3EEG.js} +1 -1
  120. package/browser/{chunk-KD7WBOUR.js → chunk-T2H2XAEJ.js} +1 -1
  121. package/browser/{chunk-W3EZ4JHD.js → chunk-T4XIWNFQ.js} +1 -1
  122. package/browser/{chunk-GDS3XQ5F.js → chunk-T7DUQW7O.js} +1 -1
  123. package/browser/{chunk-7P3E5NJO.js → chunk-TEV65D26.js} +1 -1
  124. package/browser/{chunk-JEFUIFY4.js → chunk-TOUJ6K3E.js} +1 -1
  125. package/browser/{chunk-E3LGKC33.js → chunk-TUM5HKY7.js} +1 -1
  126. package/browser/{chunk-SKE3MW2D.js → chunk-TYX5PWAF.js} +1 -1
  127. package/browser/{chunk-P7UMAIIW.js → chunk-UTTEBWDI.js} +1 -1
  128. package/browser/{chunk-WBMSB25X.js → chunk-UTTKPBED.js} +1 -1
  129. package/browser/{chunk-MPAFCKH7.js → chunk-VAPCHGLS.js} +1 -1
  130. package/browser/{chunk-2JZS4BMV.js → chunk-VLHLS6LD.js} +1 -1
  131. package/browser/{chunk-YRGHPSPV.js → chunk-VX5HH3BW.js} +1 -1
  132. package/browser/{chunk-5L54U63F.js → chunk-W4W2KCYV.js} +1 -1
  133. package/browser/{chunk-SARJJ3AZ.js → chunk-WNZKCNMC.js} +1 -1
  134. package/browser/{chunk-MPE7Q4VX.js → chunk-XL7XI3DY.js} +1 -1
  135. package/browser/{chunk-QRTOTG7S.js → chunk-XNJ2P2ZO.js} +1 -1
  136. package/browser/{chunk-6TGKH2KC.js → chunk-XORANKYI.js} +1 -1
  137. package/browser/{chunk-O5IZN23R.js → chunk-XVAFOEWU.js} +2 -2
  138. package/browser/{chunk-3XKRDZSE.js → chunk-YQUQYWX3.js} +1 -1
  139. package/browser/{chunk-YMLCHH2G.js → chunk-ZEGLCDLU.js} +1 -1
  140. package/browser/{chunk-P6NP3EAO.js → chunk-ZJDY54VM.js} +1 -1
  141. package/browser/{chunk-M5KE2CW7.js → chunk-ZQHJ2WC2.js} +1 -1
  142. package/browser/chunk-ZVOEO2AC.js +3 -0
  143. package/browser/index.html +2 -2
  144. package/browser/main-WPNH2WGQ.css +1 -0
  145. package/browser/{main-VVZRGXWB.js → main-Z44VJHQT.js} +2 -2
  146. package/package.json +1 -1
  147. package/browser/chunk-4ZXLS56M.js +0 -4
  148. package/browser/chunk-5ZFCEP2C.css +0 -1
  149. package/browser/chunk-6SC4T77S.js +0 -1
  150. package/browser/chunk-D6Y2NJT7.js +0 -1
  151. package/browser/chunk-FIMFYHCK.js +0 -4
  152. package/browser/chunk-G5QWJMKY.js +0 -1
  153. package/browser/chunk-GI7KMXBX.js +0 -21
  154. package/browser/chunk-I2P6B3IK.js +0 -1
  155. package/browser/chunk-IR2QPNXA.js +0 -5
  156. package/browser/chunk-KUYGPZRD.js +0 -1
  157. package/browser/chunk-LEGL2HWF.js +0 -1
  158. package/browser/chunk-MMP7HKXF.js +0 -1
  159. package/browser/chunk-WY6RTBDA.js +0 -3
  160. package/browser/main-5IXVIJ7Z.css +0 -1
@@ -1 +1 @@
1
- import{a as I}from"./chunk-DLNZDHGS.js";import{u as S,v as T,w as E}from"./chunk-QZMZBCE7.js";import{e as H,f as D}from"./chunk-A45GTZVV.js";import{Ab as M,Bb as u,Bc as d,Cb as g,Db as i,Dc as p,Eb as n,Fb as h,Ob as x,Qb as P,Xa as l,db as c,dc as o,ec as m,fc as v,hb as f,md as b,pa as s,vb as C,xb as y,yb as _}from"./chunk-JYZTRN6N.js";function R(t,a){if(t&1&&(i(0,"tr")(1,"td",5),o(2),n(),i(3,"td",6),o(4),d(5,"date"),n(),i(6,"td",6),o(7),d(8,"date"),n()()),t&2){let e=a.$implicit;l(2),m(e.CreatorName),l(2),v(" ",p(5,3,e.PrintDate,"dd MMM yyyy")," "),l(3),m(p(8,6,e.PrintDate,"HH:mm"))}}function j(t,a){if(t&1&&M(0,R,9,9,"tr",null,_),t&2){let e=P();u(e.data)}}function w(t,a){t&1&&(i(0,"tr")(1,"td",7),h(2,"app-empty-state",8),n()())}var N=class t{constructor(a){this.data=a;this.config.title="Last Print History",this.config.hideOk=!0,this.config.cancelText="Close"}config=new S;dialogRef=s(H);static \u0275fac=function(e){return new(e||t)(c(D))};static \u0275cmp=f({type:t,selectors:[["POS-modal-print-history"]],decls:16,vars:2,consts:[[3,"onCancel","onClose","config"],[1,"container-fluid"],[1,"table-responsive",2,"max-height","300px","width","400px"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light"],[1,"text-start"],[1,"text-end"],["colspan","3"],["title","No print history","message","No print history available for this invoice"]],template:function(e,r){e&1&&(i(0,"modal-material",0),x("onCancel",function(){return r.dialogRef.close()})("onClose",function(){return r.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"table",3)(5,"thead",4)(6,"tr")(7,"th",5),o(8,"Users"),n(),i(9,"th",6),o(10,"Date"),n(),i(11,"th",6),o(12,"Time"),n()()(),i(13,"tbody"),C(14,j,2,0)(15,w,3,0,"tr"),n()()()()()()),e&2&&(g("config",r.config),l(14),y(r.data&&r.data.length>0?14:15))},dependencies:[E,T,I,b],encapsulation:2})};export{N as a};
1
+ import{a as I}from"./chunk-DLNZDHGS.js";import{u as S,v as T,w as E}from"./chunk-BA3BDB5Y.js";import{e as H,f as D}from"./chunk-A45GTZVV.js";import{Ab as M,Bb as u,Bc as d,Cb as g,Db as i,Dc as p,Eb as n,Fb as h,Ob as x,Qb as P,Xa as l,db as c,dc as o,ec as m,fc as v,hb as f,md as b,pa as s,vb as C,xb as y,yb as _}from"./chunk-JYZTRN6N.js";function R(t,a){if(t&1&&(i(0,"tr")(1,"td",5),o(2),n(),i(3,"td",6),o(4),d(5,"date"),n(),i(6,"td",6),o(7),d(8,"date"),n()()),t&2){let e=a.$implicit;l(2),m(e.CreatorName),l(2),v(" ",p(5,3,e.PrintDate,"dd MMM yyyy")," "),l(3),m(p(8,6,e.PrintDate,"HH:mm"))}}function j(t,a){if(t&1&&M(0,R,9,9,"tr",null,_),t&2){let e=P();u(e.data)}}function w(t,a){t&1&&(i(0,"tr")(1,"td",7),h(2,"app-empty-state",8),n()())}var N=class t{constructor(a){this.data=a;this.config.title="Last Print History",this.config.hideOk=!0,this.config.cancelText="Close"}config=new S;dialogRef=s(H);static \u0275fac=function(e){return new(e||t)(c(D))};static \u0275cmp=f({type:t,selectors:[["POS-modal-print-history"]],decls:16,vars:2,consts:[[3,"onCancel","onClose","config"],[1,"container-fluid"],[1,"table-responsive",2,"max-height","300px","width","400px"],["id","tableGrid",1,"table","border-bottom"],[1,"thead-light"],[1,"text-start"],[1,"text-end"],["colspan","3"],["title","No print history","message","No print history available for this invoice"]],template:function(e,r){e&1&&(i(0,"modal-material",0),x("onCancel",function(){return r.dialogRef.close()})("onClose",function(){return r.dialogRef.close()}),i(1,"content")(2,"div",1)(3,"div",2)(4,"table",3)(5,"thead",4)(6,"tr")(7,"th",5),o(8,"Users"),n(),i(9,"th",6),o(10,"Date"),n(),i(11,"th",6),o(12,"Time"),n()()(),i(13,"tbody"),C(14,j,2,0)(15,w,3,0,"tr"),n()()()()()()),e&2&&(g("config",r.config),l(14),y(r.data&&r.data.length>0?14:15))},dependencies:[E,T,I,b],encapsulation:2})};export{N as a};
@@ -1,4 +1,4 @@
1
- import{a as ne,c as Ft,d as It}from"./chunk-5OKSTEWQ.js";import{d as ie}from"./chunk-CS6HBROS.js";import{a as bt}from"./chunk-JUS6LLVX.js";import{F as Pt,G as Et,u as Vt,v as Tt,w as kt}from"./chunk-QZMZBCE7.js";import{b as vt,c as yt}from"./chunk-C4WJKF7R.js";import{N as Dt,n as Mt}from"./chunk-NZYZO47Z.js";import{a as ot,e as xt,f as wt,g as St}from"./chunk-A45GTZVV.js";import{s as Ct}from"./chunk-NWSIPELM.js";import{c as gt,d as _t,h as ht,k as j}from"./chunk-L76WVZW6.js";import{G as Ce,M as ct,N as dt,b as at,k as rt,la as pt,oa as ut,p as lt,pa as te,ua as mt,w as st,xa as ft}from"./chunk-O5SLP4JK.js";import{F as tt,c as $e,h as Ye,i as Ge,k as Xe,o as Je,p as et}from"./chunk-RNLSEEMX.js";import{a as qe,c as it}from"./chunk-H4DUHWPT.js";import{a as nt}from"./chunk-ROLAW5XO.js";import{a as N}from"./chunk-USJ6ILEE.js";import{$d as Ue,Ab as V,Bb as T,Bc as Z,Cb as u,Cc as fe,Db as a,Dc as Oe,Eb as l,Fb as _,Ia as de,Id as We,Jd as he,Lb as Be,Lc as ge,Ld as J,Mb as b,Md as ee,N as Ve,Ob as g,Od as be,Pc as _e,Qb as c,Qc as $,Rb as z,Sb as k,Tb as E,Vb as F,Wa as Me,Wb as I,Wc as Le,Xa as s,Xc as Y,Ya as y,Yb as U,Yc as Re,Za as De,Zb as Ke,Zd as Qe,_d as ze,aa as Te,ac as pe,be as Ze,cc as ue,cd as Ne,d as we,db as v,dc as h,ec as A,fc as O,fd as je,hb as B,ib as Q,ic as M,id as He,jc as D,jd as G,kb as Pe,kc as P,la as H,lb as Ee,ma as W,mb as Fe,na as ke,nb as K,oc as L,pa as w,rd as R,sc as Ae,sd as X,t as Se,ta as d,tb as Ie,tc as q,ua as p,uc as x,vb as m,vc as me,xb as f,zb as S}from"./chunk-JYZTRN6N.js";import{a as ce,b as xe}from"./chunk-SNAKHGZS.js";var oe=class t{_openDialog=new we;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ht=["content"],Wt=["*"],Qt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),zt=(t,o)=>({value:t,params:o}),Ut=t=>({closeCallback:t});function qt(t,o){}function Zt(t,o){t&1&&K(0,qt,0,0,"ng-template")}function $t(t,o){if(t&1){let e=b();a(0,"div",1),g("click",function(i){d(e);let r=c();return p(r.onOverlayClick(i))})("@animation.start",function(i){d(e);let r=c();return p(r.onAnimationStart(i))})("@animation.done",function(i){d(e);let r=c();return p(r.onAnimationEnd(i))}),a(1,"div",2),g("click",function(i){d(e);let r=c();return p(r.onContentClick(i))})("mousedown",function(i){d(e);let r=c();return p(r.onContentClick(i))}),k(2),K(3,Zt,1,0,null,3),l()()}if(t&2){let e=c();ue(e.cn(e.cx("root"),e.styleClass)),u("pBind",e.ptm("root"))("ngStyle",e.style)("@animation",me(16,zt,e.overlayVisible?"open":"close",me(13,Qt,e.showTransitionOptions,e.hideTransitionOptions))),Ie("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),s(),ue(e.cx("content")),u("pBind",e.ptm("content")),s(2),u("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",x(19,Ut,e.onCloseClick.bind(e)))}}var Yt=`
1
+ import{a as ne,c as Ft,d as It}from"./chunk-4U2TXFUV.js";import{d as ie}from"./chunk-CS6HBROS.js";import{a as bt}from"./chunk-JUS6LLVX.js";import{F as Pt,G as Et,u as Vt,v as Tt,w as kt}from"./chunk-BA3BDB5Y.js";import{b as vt,c as yt}from"./chunk-C4WJKF7R.js";import{N as Dt,n as Mt}from"./chunk-T25N3EEG.js";import{a as ot,e as xt,f as wt,g as St}from"./chunk-A45GTZVV.js";import{s as Ct}from"./chunk-NWSIPELM.js";import{c as gt,d as _t,h as ht,k as j}from"./chunk-L76WVZW6.js";import{G as Ce,M as ct,N as dt,b as at,k as rt,la as pt,oa as ut,p as lt,pa as te,ua as mt,w as st,xa as ft}from"./chunk-O5SLP4JK.js";import{F as tt,c as $e,h as Ye,i as Ge,k as Xe,o as Je,p as et}from"./chunk-RNLSEEMX.js";import{a as qe,c as it}from"./chunk-BVZ7ACQM.js";import{a as nt}from"./chunk-7KAETFNH.js";import{a as N}from"./chunk-USJ6ILEE.js";import{$d as Ue,Ab as V,Bb as T,Bc as Z,Cb as u,Cc as fe,Db as a,Dc as Oe,Eb as l,Fb as _,Ia as de,Id as We,Jd as he,Lb as Be,Lc as ge,Ld as J,Mb as b,Md as ee,N as Ve,Ob as g,Od as be,Pc as _e,Qb as c,Qc as $,Rb as z,Sb as k,Tb as E,Vb as F,Wa as Me,Wb as I,Wc as Le,Xa as s,Xc as Y,Ya as y,Yb as U,Yc as Re,Za as De,Zb as Ke,Zd as Qe,_d as ze,aa as Te,ac as pe,be as Ze,cc as ue,cd as Ne,d as we,db as v,dc as h,ec as A,fc as O,fd as je,hb as B,ib as Q,ic as M,id as He,jc as D,jd as G,kb as Pe,kc as P,la as H,lb as Ee,ma as W,mb as Fe,na as ke,nb as K,oc as L,pa as w,rd as R,sc as Ae,sd as X,t as Se,ta as d,tb as Ie,tc as q,ua as p,uc as x,vb as m,vc as me,xb as f,zb as S}from"./chunk-JYZTRN6N.js";import{a as ce,b as xe}from"./chunk-SNAKHGZS.js";var oe=class t{_openDialog=new we;openDialog$=this._openDialog.asObservable();openDialog(){this._openDialog.next()}static \u0275fac=function(e){return new(e||t)};static \u0275prov=H({token:t,factory:t.\u0275fac,providedIn:"root"})};var Ht=["content"],Wt=["*"],Qt=(t,o)=>({showTransitionParams:t,hideTransitionParams:o}),zt=(t,o)=>({value:t,params:o}),Ut=t=>({closeCallback:t});function qt(t,o){}function Zt(t,o){t&1&&K(0,qt,0,0,"ng-template")}function $t(t,o){if(t&1){let e=b();a(0,"div",1),g("click",function(i){d(e);let r=c();return p(r.onOverlayClick(i))})("@animation.start",function(i){d(e);let r=c();return p(r.onAnimationStart(i))})("@animation.done",function(i){d(e);let r=c();return p(r.onAnimationEnd(i))}),a(1,"div",2),g("click",function(i){d(e);let r=c();return p(r.onContentClick(i))})("mousedown",function(i){d(e);let r=c();return p(r.onContentClick(i))}),k(2),K(3,Zt,1,0,null,3),l()()}if(t&2){let e=c();ue(e.cn(e.cx("root"),e.styleClass)),u("pBind",e.ptm("root"))("ngStyle",e.style)("@animation",me(16,zt,e.overlayVisible?"open":"close",me(13,Qt,e.showTransitionOptions,e.hideTransitionOptions))),Ie("aria-modal",e.overlayVisible)("aria-label",e.ariaLabel)("aria-labelledBy",e.ariaLabelledBy),s(),ue(e.cx("content")),u("pBind",e.ptm("content")),s(2),u("ngTemplateOutlet",e.contentTemplate||e._contentTemplate)("ngTemplateOutletContext",x(19,Ut,e.onCloseClick.bind(e)))}}var Yt=`
2
2
  .p-popover {
3
3
  margin-top: dt('popover.gutter');
4
4
  background: dt('popover.background');
@@ -1 +1 @@
1
- import{a as Ne}from"./chunk-LEGL2HWF.js";import{d as Se,e as xe}from"./chunk-SO4GMA3Y.js";import{B as V,D as L,u as Me,v as ye,w as ve}from"./chunk-QZMZBCE7.js";import{N as we,O as q}from"./chunk-NZYZO47Z.js";import{d as R}from"./chunk-7TBS7SPQ.js";import{e as be,f as he}from"./chunk-A45GTZVV.js";import{A as pe,B as ge,F as Ce,G as fe,c as re,h as ae,i as le,k as de,o as se,p as ce,x as me,y as ue}from"./chunk-RNLSEEMX.js";import{a as ne}from"./chunk-USJ6ILEE.js";import{$ as K,A as k,Ab as Z,Bb as $,Ca as J,Cb as c,D as U,Db as d,Eb as l,Fb as ee,Mb as v,Ob as O,Qb as g,Xa as a,_b as M,be as oe,cd as te,db as P,dc as m,e as j,ee as _e,fc as x,hb as Q,ib as X,ic as _,jc as b,kc as h,la as E,ma as z,oa as S,pc as B,q as A,rd as ie,t as w,ta as u,u as H,ua as p,uc as y,vb as C,xb as f,zb as Y}from"./chunk-JYZTRN6N.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(oe))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new Ne;addCustomer(n,e){let t=[];n.Group&&t.push(n.Group),e&&(n.DebtLimit=e);let r={contact:n,groups:t};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",r)).catch(s=>Promise.reject(s))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(q.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(q.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(_e),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Ve=i=>({"border border-danger":i}),I=i=>({"is-invalid":i}),Le=i=>({"is-invalid border border-danger":i}),Fe=i=>({"has-error":i});function We(i,n){if(i&1){let e=v();d(0,"a",12),O("click",function(){u(e);let r=g();return p(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",y(1,T,e.tabState=="id"))}}function ke(i,n){if(i&1&&ee(0,"option",21),i&2){let e=n.$implicit;c("value",e.Name)}}function Be(i,n){if(i&1&&(d(0,"div",24)(1,"i",47),m(2," Name is mandatory."),l()()),i&2){g();let e=M(26);c("ngClass",y(1,Fe,e.touched&&e.invalid))}}function Re(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=M(38);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&(C(0,Re,2,0,"div",40),C(1,qe,2,1,"div",40)),i&2){g();let e=M(38);f(e.getError("required")&&!e.getError("minLength")?0:-1),a(),f(e.getError("minLength")?1:-1)}}function je(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function Ae(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function He(i,n){if(i&1&&(C(0,je,2,0,"div",40),C(1,Ae,2,0,"div",40)),i&2){g();let e=M(45);f(e.errors!=null&&e.errors.email?0:-1),a(),f(e.errors!=null&&e.errors.required?1:-1)}}function Ue(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ke(i,n){if(i&1&&C(0,Ue,2,0,"div",40),i&2){g();let e=M(3);f(e.invalid?0:-1)}}function ze(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"datepicker",48,6),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Birthdate,r)||(s.customer.Birthdate=r),p(r)}),l(),C(4,Ke,1,1),l()()}if(i&2){let e=M(3),t=g();a(2),_("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",y(4,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.dirty||e.touched?4:-1)}}function Je(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Qe(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Je,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Xe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Xe,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ze(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",52),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Group,r)||(s.customer.Group=r),p(r)}),l(),d(3,"label",53),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.Group))),a(),_("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function $e(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",54),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.City,r)||(s.customer.City=r),p(r)}),l(),d(3,"label",55),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.City))),a(),_("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function et(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function tt(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=M(68);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ie=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new Me,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new G,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ne.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(be),P(he),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:81,vars:55,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"btn","btn-link",3,"ngClass"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],[1,"col-4","mt-4"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"control-label","text-danger"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["for","code"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),O("onOk",function(){u(r);let o=M(4);return p(t.onOk(o))})("onCancel",function(){return u(r),p(t.dialogRef.close())})("onClose",function(){return u(r),p(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("detail"))}),m(10," Detail "),l(),C(11,We,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),h("ngModelChange",function(o){return u(r),b(t.customer.Title,o)||(t.customer.Title=o),p(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),Z(21,ke,1,1,"option",21,Y),l()()(),d(23,"div",22)(24,"div",17)(25,"input",23,1),h("ngModelChange",function(o){return u(r),b(t.customer.FirstName,o)||(t.customer.FirstName=o),p(o)}),l(),C(27,Be,3,3,"div",24),d(28,"label",25),m(29,"First Name"),l()()(),d(30,"div",22)(31,"div",17)(32,"input",26),h("ngModelChange",function(o){return u(r),b(t.customer.LastName,o)||(t.customer.LastName=o),p(o)}),l(),d(33,"label",27),m(34,"Last Name"),l()()(),d(35,"div",28)(36,"div",17)(37,"input",29,2),h("ngModelChange",function(o){return u(r),b(t.customer.Mobile,o)||(t.customer.Mobile=o),p(o)}),l(),C(39,Ge,2,2),d(40,"label",30),m(41,"Mobile"),l()()(),d(42,"div",28)(43,"div",17)(44,"input",31,3),h("ngModelChange",function(o){return u(r),b(t.customer.Email,o)||(t.customer.Email=o),p(o)}),l(),C(46,He,2,2),d(47,"label",32),m(48,"Email"),l()()(),C(49,ze,5,6,"div",33),C(50,Qe,7,9,"div",33),d(51,"div",28)(52,"ng-select",34),h("ngModelChange",function(o){return u(r),b(t.customer.Gender,o)||(t.customer.Gender=o),p(o)}),l()()(),d(53,"div",35),C(54,Ye,7,9,"div",36),C(55,Ze,5,5,"div",36),C(56,$e,5,5,"div",36),d(57,"div",37)(58,"div",17)(59,"textarea",38,4),h("ngModelChange",function(o){return u(r),b(t.customer.Address,o)||(t.customer.Address=o),p(o)}),l(),d(61,"label",39),m(62,"Address"),l(),C(63,et,2,0,"div",40),l()()(),d(64,"div",35)(65,"div",28)(66,"div",17)(67,"input",41,5),h("ngModelChange",function(o){return u(r),b(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),p(o)}),l(),C(69,tt,2,1,"div",40),d(70,"label",42),m(71,"National ID"),l()()(),d(72,"div",28)(73,"div",17)(74,"input",43),h("ngModelChange",function(o){return u(r),b(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),p(o)}),l(),d(75,"label",44),m(76,"Tax ID"),l()()(),d(77,"div",28)(78,"ng-select",45),h("ngModelChange",function(o){return u(r),b(t.customer.NationalityID,o)||(t.customer.NationalityID=o),p(o)}),l()(),d(79,"div",33)(80,"ng-select",46),h("ngModelChange",function(o){return u(r),b(t.customer.RaceID,o)||(t.customer.RaceID=o),p(o)}),l()()()()()()()()()}if(e&2){let r=M(26),s=M(38),o=M(45),N=M(60),D=M(68);c("config",t.modalConfig),a(7),c("ngClass",y(41,T,t.tabState=="general")),a(2),c("ngClass",y(43,T,t.tabState=="detail")),a(2),f(t.type!="supplier"?11:-1),a(3),c("hidden",t.tabState!="general"),a(3),_("ngModel",t.customer.Title),a(4),$(t.options==null?null:t.options.Titles),a(4),c("ngClass",y(45,Ve,r.touched&&r.invalid)),_("ngModel",t.customer.FirstName),c("required",!0),a(2),f(r.touched&&r.invalid?27:-1),a(5),_("ngModel",t.customer.LastName),a(5),_("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",y(47,I,s.invalid&&(s.dirty||s.touched))),a(2),f(s.invalid&&(s.dirty||s.touched)?39:-1),a(5),c("ngClass",y(49,Le,o.invalid&&(o.dirty||o.touched))),_("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),f(o.invalid&&(o.dirty||o.touched)?46:-1),a(3),f(t.type!="supplier"?49:-1),a(),f(t.type=="supplier"?50:-1),a(2),_("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),f(t.type!="supplier"?54:-1),a(),f(t.type!="supplier"?55:-1),a(),f(t.type!="supplier"?56:-1),a(3),c("rows",t.type!="supplier"?6:9),_("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",y(51,I,N.invalid&&(N.dirty||N.touched))),a(4),f(N.invalid&&(N.dirty||N.touched)?63:-1),a(),c("hidden",t.tabState!="id"),a(3),_("ngModel",t.customer.NationalIDNumber),c("ngClass",y(53,I,D.invalid&&(D.dirty||D.touched))),a(2),f(D.invalid&&(D.dirty||D.touched)?69:-1),a(5),_("ngModel",t.customer.TaxIDNumber),a(4),_("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),_("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[te,ye,ce,me,ue,re,ae,le,pe,ge,se,de,Se,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[ie,we,ve,Ce,fe,xe,R]})},G=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ie as c,Oe as d,G as e};
1
+ import{a as Ne}from"./chunk-IFOBYW26.js";import{d as Se,e as xe}from"./chunk-QPOOLLKY.js";import{B as V,D as L,u as Me,v as ye,w as ve}from"./chunk-BA3BDB5Y.js";import{N as we,O as q}from"./chunk-T25N3EEG.js";import{d as R}from"./chunk-7TBS7SPQ.js";import{e as be,f as he}from"./chunk-A45GTZVV.js";import{A as pe,B as ge,F as Ce,G as fe,c as re,h as ae,i as le,k as de,o as se,p as ce,x as me,y as ue}from"./chunk-RNLSEEMX.js";import{a as ne}from"./chunk-USJ6ILEE.js";import{$ as K,A as k,Ab as Z,Bb as $,Ca as J,Cb as c,D as U,Db as d,Eb as l,Fb as ee,Mb as v,Ob as O,Qb as g,Xa as a,_b as M,be as oe,cd as te,db as P,dc as m,e as j,ee as _e,fc as x,hb as Q,ib as X,ic as _,jc as b,kc as h,la as E,ma as z,oa as S,pc as B,q as A,rd as ie,t as w,ta as u,u as H,ua as p,uc as y,vb as C,xb as f,zb as Y}from"./chunk-JYZTRN6N.js";var F=class i{constructor(n,e){this.localDataService=n;this.toastr=e;this.initLocalDataConfig()}localConfig=new V;_offlineConfigSubject=new j(this.localConfig);offlineConfig$=this._offlineConfigSubject.asObservable();online$=U(k(window,"offline").pipe(w(()=>!1)),k(window,"online").pipe(w(()=>!0))).pipe(K(navigator.onLine));get isOnline(){return navigator.onLine}initLocalDataConfig(){this.localDataService.getOfflineConfig().subscribe({next:n=>{let e=new V(n.configUsingLocal,n.productUsingLocal,n.orderUsingLocal);this.pushNewValue(e),this.localConfig=e,this.updateOfflineConfigDB(n)},error:n=>{this.onErrorInitConfig()}})}onErrorInitConfig(){let n=new V;this.pushNewValue(n),this.localConfig=n,this.updateOfflineConfigDB(n)}getOnlineStatus$(){return H([this.offlineConfig$.pipe(w(n=>n.configUsingLocal)),this.online$]).pipe(w(n=>{let e=n[0],t=n[1],r;return e===!0?r=!1:r=t&&this.isOnline,r}))}pushNewValue(n){this._offlineConfigSubject.next(n)}updateOfflineConfigDB(n){this.localDataService.updateOfflineConfig(n).subscribe({next:e=>{this.pushNewValue(n)}})}static \u0275fac=function(e){return new(e||i)(S(L),S(oe))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var W=class i{constructor(n,e,t){this.httpService=n;this.LocalData=e;this._onlineStatusService=t}Data=new Ne;addCustomer(n,e){let t=[];n.Group&&t.push(n.Group),e&&(n.DebtLimit=e);let r={contact:n,groups:t};if(this._onlineStatusService.isOnline)return A(this.httpService.post("/API/Contact/Customer/Create",r)).catch(s=>Promise.reject(s))}findCustomerByCode(n){let e={Code:n};return this.httpService.post("/API/Contact/GetByCode",e)}GetPrivilegeByID(n,e){return this.httpService.get(q.GetCustomerPrivilegeByID,[{key:"ID",value:n},{key:"EntityID",value:e}],!0)}getCustomerSuggestionCode(){return this.httpService.get(q.GetCustomerSuggestionCode).pipe(w(n=>n.Code))}static \u0275fac=function(e){return new(e||i)(S(_e),S(L),S(F))};static \u0275prov=E({token:i,factory:i.\u0275fac,providedIn:"root"})};var T=i=>({selected:i}),Ve=i=>({"border border-danger":i}),I=i=>({"is-invalid":i}),Le=i=>({"is-invalid border border-danger":i}),Fe=i=>({"has-error":i});function We(i,n){if(i&1){let e=v();d(0,"a",12),O("click",function(){u(e);let r=g();return p(r.chooiceDetail("id"))}),m(1," ID "),l()}if(i&2){let e=g();c("ngClass",y(1,T,e.tabState=="id"))}}function ke(i,n){if(i&1&&ee(0,"option",21),i&2){let e=n.$implicit;c("value",e.Name)}}function Be(i,n){if(i&1&&(d(0,"div",24)(1,"i",47),m(2," Name is mandatory."),l()()),i&2){g();let e=M(26);c("ngClass",y(1,Fe,e.touched&&e.invalid))}}function Re(i,n){i&1&&(d(0,"div",40),m(1," Mobile Phone is mandatory "),l())}function qe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g(2);let e=M(38);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}function Ge(i,n){if(i&1&&(C(0,Re,2,0,"div",40),C(1,qe,2,1,"div",40)),i&2){g();let e=M(38);f(e.getError("required")&&!e.getError("minLength")?0:-1),a(),f(e.getError("minLength")?1:-1)}}function je(i,n){i&1&&(d(0,"div",40),m(1," Email must be a valid email address "),l())}function Ae(i,n){i&1&&(d(0,"div",40),m(1,"Email is mandatory"),l())}function He(i,n){if(i&1&&(C(0,je,2,0,"div",40),C(1,Ae,2,0,"div",40)),i&2){g();let e=M(45);f(e.errors!=null&&e.errors.email?0:-1),a(),f(e.errors!=null&&e.errors.required?1:-1)}}function Ue(i,n){i&1&&(d(0,"div",40),m(1,"Birthdate is mandatory"),l())}function Ke(i,n){if(i&1&&C(0,Ue,2,0,"div",40),i&2){g();let e=M(3);f(e.invalid?0:-1)}}function ze(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"datepicker",48,6),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Birthdate,r)||(s.customer.Birthdate=r),p(r)}),l(),C(4,Ke,1,1),l()()}if(i&2){let e=M(3),t=g();a(2),_("ngModel",t.customer.Birthdate),c("required",t.requiredField().Birthdate)("ngClass",y(4,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.dirty||e.touched?4:-1)}}function Je(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Qe(i,n){if(i&1){let e=v();d(0,"div",33)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Je,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Xe(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){let e=g(2);a(),x(" ",e.type=="supplier"?"Supplier":"Customer"," code is mandatory. ")}}function Ye(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",17)(2,"input",49,7),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Code,r)||(s.customer.Code=r),p(r)}),l(),C(4,Xe,2,1,"div",40),d(5,"label",50),m(6),l()()()}if(i&2){let e=M(3),t=g();a(2),c("placeholder",B("",t.type=="supplier"?"Supplier":"Member"," code")),_("ngModel",t.customer.Code),c("required",t.requiredField().Code)("ngClass",y(7,I,e.invalid&&(e.dirty||e.touched))),a(2),f(e.invalid&&(e.dirty||e.touched)?4:-1),a(2),x("",t.type=="supplier"?"Supplier":"Member"," Code")}}function Ze(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",52),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.Group,r)||(s.customer.Group=r),p(r)}),l(),d(3,"label",53),m(4,"Group"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.Group))),a(),_("ngModel",e.customer.Group),c("items",e.options==null?null:e.options.Groups)}}function $e(i,n){if(i&1){let e=v();d(0,"div",36)(1,"div",51)(2,"ng-select",54),h("ngModelChange",function(r){u(e);let s=g();return b(s.customer.City,r)||(s.customer.City=r),p(r)}),l(),d(3,"label",55),m(4,"City"),l()()()}if(i&2){let e=g();a(),c("ngClass",y(3,T,e.isNotEmpty(e.customer.City))),a(),_("ngModel",e.customer.City),c("items",e.options==null?null:e.options.Cities)}}function et(i,n){i&1&&(d(0,"div",40),m(1,"Address is mandatory."),l())}function tt(i,n){if(i&1&&(d(0,"div",40),m(1),l()),i&2){g();let e=M(68);a(),x(" ",e.errors==null||e.errors.minLength==null?null:e.errors.minLength.message," ")}}var Ie=class i{constructor(n,e,t){this.dialogRef=n;this.data=e;this._CustomerHttpService=t;this.modalConfig=new Me,this.modalConfig.title=this.data.title,this.modalConfig.customWidth="650px",this.options=this.data.options,this.options?.Genders||(this.options.Genders=[{Key:0,Value:"Male"},{Key:1,Value:"Female"}]),this.config=this.data.config,this.type=this.data.type}customer;options;type;config;more;modalConfig;detailVisible;tabState="general";requiredField=J({Mobile:!1,Email:!1,Code:!1,Address:!1,SignUpOutlet:!1,Birthdate:!1});ngOnInit(){this.customer=new G,this.initFirstName(),this.customer.Gender=this.config.DefaultValue.Gender,this.more=!1,this.initRequiredField()}initRequiredField(){let n=this.config.Advance?.RequiredFields;n&&this.type!="supplier"&&n.forEach(e=>{this.requiredField.update(t=>(t[e]=!0,t))})}initFirstName(){this.data&&this.data.inputTextName&&(this.customer.FirstName=this.data.inputTextName)}onOk(n){if(n.form?.markAllAsTouched(),n.form.invalid)return;let e=this.customer.Title?this.customer.Title:"";e+=" "+this.customer.FirstName,e+=" "+(this.customer.LastName?this.customer.LastName:""),e=e.trim(),this.customer.Name=e,this.type=="customer"?this._CustomerHttpService.addCustomer(this.customer).then(t=>{this.dialogRef.close({ContactName:e,CustomerID:t.ID})}).catch(t=>{this.dialogRef.close({Error:t})}):this.type=="supplier"&&this.dialogRef.close({supplier:this.customer})}chooiceDetail(n){this.tabState=n}isNotEmpty(n){return ne.IsNotEmpty(n)||n==0}static \u0275fac=function(e){return new(e||i)(P(be),P(he),P(W))};static \u0275cmp=Q({type:i,selectors:[["POS-modal-customer"]],standalone:!1,decls:81,vars:55,consts:[["f","ngForm"],["FirstName","ngModel"],["phoneNumber","ngModel"],["Email","ngModel"],["addressCtrl","ngModel"],["nationalId","ngModel"],["birthdateCtrl","ngModel"],["codeCtrl","ngModel"],[3,"onOk","onCancel","onClose","config"],[1,"container",2,"height","270px"],["name","form"],[1,"row","align-items-center","border-bottom"],[1,"btn","btn-link",3,"click","ngClass"],[1,"btn","btn-link",3,"ngClass"],[1,"mt-6"],[1,"row","g-4",3,"hidden"],[1,"col-md-2","mt-4"],[1,"form-floating-outline"],["list","cust-title","id","Title","name","Title","placeholder","Title",1,"form-control",3,"ngModelChange","ngModel"],["for","Title"],["id","cust-title"],[3,"value"],[1,"col-md-5","mt-4"],["type","text","id","FirstName","name","FirstName","placeholder","First Name",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],[3,"ngClass"],["for","FirstName"],["type","text","id","LastName","name","LastName","placeholder","Last Name",1,"form-control",3,"ngModelChange","ngModel"],["for","LastName"],[1,"col-md-6","mt-4"],["type","text","name","Phone","placeholder","Mobile",1,"form-control",3,"ngModelChange","ngModel","required","ngClass"],["for","Phone"],["type","email","name","Email","placeholder","Email","email","",1,"form-control",3,"ngModelChange","ngClass","ngModel","required"],["for","email"],[1,"col-6","mt-4"],["name","gender","bindLabel","Value","bindValue","Key","placeholder","Gender","dropdownPosition","buttom",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"row","g-4","mt-2",3,"hidden"],[1,"col-4","mt-4"],[1,"col-md-12","mt-4"],["id","address","name","address","placeholder","Address",1,"form-control","h-100",3,"ngModelChange","rows","ngModel","required","ngClass"],["for","address"],[1,"invalid-feedback"],["type","text","id","Identification","name","Identification","placeholder","NationalID","numericInputOnly","nationalId",1,"form-control",3,"ngModelChange","ngModel","ngClass"],["for","Identification"],["type","text","id","TaxId","name","TaxId","placeholder","TaxID",1,"form-control",3,"ngModelChange","ngModel"],["for","TaxId"],["name","NationalityID","bindLabel","Name","bindValue","ID","placeholder","Nationality","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],["name","race","bindLabel","Name","bindValue","ID","placeholder","Race","appendTo","body",1,"tall","outlet","auto-grow",3,"ngModelChange","ngModel","items"],[1,"control-label","text-danger"],["placeholder","Birthdate","name","birthDate",3,"ngModelChange","ngModel","required","ngClass"],["type","text","name","code","id","code",1,"form-control",3,"ngModelChange","ngModel","placeholder","required","ngClass"],["for","code"],[1,"form-floating-outline","flexRow",3,"ngClass"],["id","customerGroup","bindLabel","Name","bindValue","ID","name","customerGroup","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","customerGroup",1,"ng-select"],["id","city","bindLabel","Name","bindValue","ID","name","city","appendTo","body",1,"productform","tall",3,"ngModelChange","ngModel","items"],["for","city",1,"ng-select"]],template:function(e,t){if(e&1){let r=v();d(0,"modal-material",8),O("onOk",function(){u(r);let o=M(4);return p(t.onOk(o))})("onCancel",function(){return u(r),p(t.dialogRef.close())})("onClose",function(){return u(r),p(t.dialogRef.close())}),d(1,"content")(2,"div",9)(3,"form",10,0)(5,"div",11)(6,"div")(7,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("general"))}),m(8," General "),l(),d(9,"a",12),O("click",function(){return u(r),p(t.chooiceDetail("detail"))}),m(10," Detail "),l(),C(11,We,2,3,"a",13),l()(),d(12,"div")(13,"div",14)(14,"div",15)(15,"div",16)(16,"div",17)(17,"input",18),h("ngModelChange",function(o){return u(r),b(t.customer.Title,o)||(t.customer.Title=o),p(o)}),l(),d(18,"label",19),m(19,"Title"),l(),d(20,"datalist",20),Z(21,ke,1,1,"option",21,Y),l()()(),d(23,"div",22)(24,"div",17)(25,"input",23,1),h("ngModelChange",function(o){return u(r),b(t.customer.FirstName,o)||(t.customer.FirstName=o),p(o)}),l(),C(27,Be,3,3,"div",24),d(28,"label",25),m(29,"First Name"),l()()(),d(30,"div",22)(31,"div",17)(32,"input",26),h("ngModelChange",function(o){return u(r),b(t.customer.LastName,o)||(t.customer.LastName=o),p(o)}),l(),d(33,"label",27),m(34,"Last Name"),l()()(),d(35,"div",28)(36,"div",17)(37,"input",29,2),h("ngModelChange",function(o){return u(r),b(t.customer.Mobile,o)||(t.customer.Mobile=o),p(o)}),l(),C(39,Ge,2,2),d(40,"label",30),m(41,"Mobile"),l()()(),d(42,"div",28)(43,"div",17)(44,"input",31,3),h("ngModelChange",function(o){return u(r),b(t.customer.Email,o)||(t.customer.Email=o),p(o)}),l(),C(46,He,2,2),d(47,"label",32),m(48,"Email"),l()()(),C(49,ze,5,6,"div",33),C(50,Qe,7,9,"div",33),d(51,"div",28)(52,"ng-select",34),h("ngModelChange",function(o){return u(r),b(t.customer.Gender,o)||(t.customer.Gender=o),p(o)}),l()()(),d(53,"div",35),C(54,Ye,7,9,"div",36),C(55,Ze,5,5,"div",36),C(56,$e,5,5,"div",36),d(57,"div",37)(58,"div",17)(59,"textarea",38,4),h("ngModelChange",function(o){return u(r),b(t.customer.Address,o)||(t.customer.Address=o),p(o)}),l(),d(61,"label",39),m(62,"Address"),l(),C(63,et,2,0,"div",40),l()()(),d(64,"div",35)(65,"div",28)(66,"div",17)(67,"input",41,5),h("ngModelChange",function(o){return u(r),b(t.customer.NationalIDNumber,o)||(t.customer.NationalIDNumber=o),p(o)}),l(),C(69,tt,2,1,"div",40),d(70,"label",42),m(71,"National ID"),l()()(),d(72,"div",28)(73,"div",17)(74,"input",43),h("ngModelChange",function(o){return u(r),b(t.customer.TaxIDNumber,o)||(t.customer.TaxIDNumber=o),p(o)}),l(),d(75,"label",44),m(76,"Tax ID"),l()()(),d(77,"div",28)(78,"ng-select",45),h("ngModelChange",function(o){return u(r),b(t.customer.NationalityID,o)||(t.customer.NationalityID=o),p(o)}),l()(),d(79,"div",33)(80,"ng-select",46),h("ngModelChange",function(o){return u(r),b(t.customer.RaceID,o)||(t.customer.RaceID=o),p(o)}),l()()()()()()()()()}if(e&2){let r=M(26),s=M(38),o=M(45),N=M(60),D=M(68);c("config",t.modalConfig),a(7),c("ngClass",y(41,T,t.tabState=="general")),a(2),c("ngClass",y(43,T,t.tabState=="detail")),a(2),f(t.type!="supplier"?11:-1),a(3),c("hidden",t.tabState!="general"),a(3),_("ngModel",t.customer.Title),a(4),$(t.options==null?null:t.options.Titles),a(4),c("ngClass",y(45,Ve,r.touched&&r.invalid)),_("ngModel",t.customer.FirstName),c("required",!0),a(2),f(r.touched&&r.invalid?27:-1),a(5),_("ngModel",t.customer.LastName),a(5),_("ngModel",t.customer.Mobile),c("required",t.requiredField().Mobile)("ngClass",y(47,I,s.invalid&&(s.dirty||s.touched))),a(2),f(s.invalid&&(s.dirty||s.touched)?39:-1),a(5),c("ngClass",y(49,Le,o.invalid&&(o.dirty||o.touched))),_("ngModel",t.customer.Email),c("required",t.requiredField().Email),a(2),f(o.invalid&&(o.dirty||o.touched)?46:-1),a(3),f(t.type!="supplier"?49:-1),a(),f(t.type=="supplier"?50:-1),a(2),_("ngModel",t.customer.Gender),c("items",t.options==null?null:t.options.Genders),a(),c("hidden",t.tabState!="detail"),a(),f(t.type!="supplier"?54:-1),a(),f(t.type!="supplier"?55:-1),a(),f(t.type!="supplier"?56:-1),a(3),c("rows",t.type!="supplier"?6:9),_("ngModel",t.customer.Address),c("required",t.requiredField().Address)("ngClass",y(51,I,N.invalid&&(N.dirty||N.touched))),a(4),f(N.invalid&&(N.dirty||N.touched)?63:-1),a(),c("hidden",t.tabState!="id"),a(3),_("ngModel",t.customer.NationalIDNumber),c("ngClass",y(53,I,D.invalid&&(D.dirty||D.touched))),a(2),f(D.invalid&&(D.dirty||D.touched)?69:-1),a(5),_("ngModel",t.customer.TaxIDNumber),a(4),_("ngModel",t.customer.NationalityID),c("items",t.options==null?null:t.options.Nationalities),a(2),_("ngModel",t.customer.RaceID),c("items",t.options==null?null:t.options.Races)}},dependencies:()=>[te,ye,ce,me,ue,re,ae,le,pe,ge,se,de,Se,R],styles:[".text-warning[_ngcontent-%COMP%]{color:var(--bs-warning)!important}.bg-light-gray[_ngcontent-%COMP%]{background-color:var(--bs-light-gray);--bs-bg-opacity: .15 !important}.bg-gradient-danger[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#f8d7da,#f8d7da 15px,#f5c6cb 15px 30px)!important}.bg-gradient-success[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#beeebb,#beeebb 15px,#afeba8 15px 30px)!important}.bg-gradient-warning[_ngcontent-%COMP%]{background:repeating-linear-gradient(-60deg,#fcf3cf,#fcf3cf 15px,#f9e79f 15px 30px)!important}.bg-light-orange[_ngcontent-%COMP%]{background-color:var(--bs-light-orange);--bs-bg-opacity: .15 !important}.text-danger[_ngcontent-%COMP%]{color:#fb404b!important}.text-dark[_ngcontent-%COMP%]{color:#5e5e5e!important}.text-success[_ngcontent-%COMP%]{color:#87cb16!important}.text-black[_ngcontent-%COMP%]{color:#000!important}.text-white[_ngcontent-%COMP%]{color:var(--bs-white)!important}.btn-light-blue[_ngcontent-%COMP%]{color:#212529;background-color:#dfeffc!important;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:hover{color:#212529;background-color:#bcdef9;border-color:#b0d8f8}.btn-light-blue[_ngcontent-%COMP%]:focus, .btn-light-blue.focus[_ngcontent-%COMP%]{color:#212529;background-color:#bcdef9;border-color:#b0d8f8;box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-blue.disabled[_ngcontent-%COMP%], .btn-light-blue[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#dfeffc;border-color:#dfeffc}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#b0d8f8;border-color:#a5d2f7}.btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-blue[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-blue.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #c3d1dc80}.btn-light-danger[_ngcontent-%COMP%]{color:#212529;background-color:#f8d7da!important;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:hover{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5}.btn-light-danger[_ngcontent-%COMP%]:focus, .btn-light-danger.focus[_ngcontent-%COMP%]{color:#212529;background-color:#f5c2c7;border-color:#f1aeb5;box-shadow:0 0 0 .2rem #dc354540}.btn-light-danger.disabled[_ngcontent-%COMP%], .btn-light-danger[_ngcontent-%COMP%]:disabled{color:#212529;background-color:#f8d7da;border-color:#f8d7da}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]{color:#212529;background-color:#f1aeb5;border-color:#ea868f}.btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled):active:focus, .btn-light-danger[_ngcontent-%COMP%]:not(:disabled):not(.disabled).active:focus, .show[_ngcontent-%COMP%] > .btn-light-danger.dropdown-toggle[_ngcontent-%COMP%]:focus{box-shadow:0 0 0 .2rem #dc354540}.btn-link[_ngcontent-%COMP%]{padding-top:0;color:#868686;padding-bottom:8px;border-radius:unset;font-family:Roboto Slab,serif}.btn-link.selected[_ngcontent-%COMP%]{color:#3b3b3b;border-bottom:2px solid #07a519}.form-floating-outline[_ngcontent-%COMP%]{margin-bottom:.2rem!important}"]})},Oe=class i{static \u0275fac=function(e){return new(e||i)};static \u0275mod=X({type:i});static \u0275inj=z({imports:[ie,we,ve,Ce,fe,xe,R]})},G=class{Title;FirstName;LastName;Name;Gender;Mobile;Email;TaxIDNumber;TaxID;Group;Code;City;Address;Birthdate;MemberIdentification;NationalIDNumber;NationalityID;RaceID;CreatorEntityID};export{F as a,W as b,Ie as c,Oe as d,G as e};
@@ -1 +1 @@
1
- import{c as W,d as X}from"./chunk-BCD363QF.js";import{a as Y,b as Z}from"./chunk-QFON23YX.js";import{b as Q,c as U}from"./chunk-C4WJKF7R.js";import{a as B}from"./chunk-RLQLFW36.js";import{oa as K}from"./chunk-O5SLP4JK.js";import{F as J,h as q,o as G}from"./chunk-RNLSEEMX.js";import{a as d}from"./chunk-USJ6ILEE.js";import{Bc as k,Cb as l,Cc as F,Db as c,Eb as m,Hc as N,Lb as L,Mb as j,Ob as E,Qb as n,Xa as _,Y as f,Ya as M,_b as I,ca as S,d as x,db as b,dc as v,ee as C,fa as T,fc as R,ga as u,hb as $,jd as P,kd as z,la as w,nb as a,o as h,oa as O,pa as D,rd as A,ta as p,ua as g,vb as H,xb as V}from"./chunk-JYZTRN6N.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(d.IsEmpty(this.selectedCategoryID)&&d.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel=this.placeholder}findSelectedCategory(t,e){if(d.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{ee as a};
1
+ import{c as W,d as X}from"./chunk-FFNEDDOO.js";import{a as Y,b as Z}from"./chunk-QFON23YX.js";import{b as Q,c as U}from"./chunk-C4WJKF7R.js";import{a as B}from"./chunk-RLQLFW36.js";import{oa as K}from"./chunk-O5SLP4JK.js";import{F as J,h as q,o as G}from"./chunk-RNLSEEMX.js";import{a as d}from"./chunk-USJ6ILEE.js";import{Bc as k,Cb as l,Cc as F,Db as c,Eb as m,Hc as N,Lb as L,Mb as j,Ob as E,Qb as n,Xa as _,Y as f,Ya as M,_b as I,ca as S,d as x,db as b,dc as v,ee as C,fa as T,fc as R,ga as u,hb as $,jd as P,kd as z,la as w,nb as a,o as h,oa as O,pa as D,rd as A,ta as p,ua as g,vb as H,xb as V}from"./chunk-JYZTRN6N.js";var y=class o{signalRClient=D(B);continuedCategories$;allCategories$;_onOpenTreeSelector=new x;onOpenTreeSelector$=this._onOpenTreeSelector.asObservable();constructor(t){this.continuedCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?(this.signalRClient.resetCategoryCache(),t.post("/api/catalog/product/GetProductStorageOptions")):h(e),[]),f(1)),this.allCategories$=this.onOpenTreeSelector$.pipe(u(this.signalRClient.recacheCategory$),S((e,[i,r])=>r||!e.length?t.get("/API/catalog/category/SelectOptions"):h(e),[]),f(1))}onOpenTreeSelector(){this._onOpenTreeSelector.next(!0)}forceLoadCategories(){this._onOpenTreeSelector.next(!0)}static \u0275fac=function(e){return new(e||o)(O(C))};static \u0275prov=w({token:o,factory:o.\u0275fac,providedIn:"root"})};function re(o,t){o&1&&L(0)}function ne(o,t){if(o&1&&(c(0,"p-floatLabel",1),a(1,re,1,0,"ng-container",2),c(2,"label",3),v(3,"Category"),m()()),o&2){n();let e=I(3);_(),l("ngTemplateOutlet",e)}}function ae(o,t){o&1&&L(0)}function le(o,t){if(o&1&&a(0,ae,1,0,"ng-container",2),o&2){n();let e=I(3);l("ngTemplateOutlet",e)}}function ce(o,t){if(o&1&&(c(0,"div",6),v(1),m()),o&2){let e=n(2);l("matTooltip",e.selectedCategoryLabel),_(),R(" ",e.selectedCategoryLabel," ")}}function se(o,t){if(o&1){let e=j();c(0,"p-treeSelect",4),k(1,"async"),E("click",function(){p(e);let r=n();return g(r.loadCategories())})("ngModelChange",function(r){p(e);let s=n();return g(s.onSelectCategory(r))})("onClear",function(){p(e);let r=n();return g(r.onClear())}),a(2,ce,2,2,"ng-template",5),m()}if(o&2){let e=n();l("options",F(1,4,e.categories$))("ngModel",e.selectedCategory)("showClear",e.showClear)("placeholder",e.placeholder)}}var ee=class o{constructor(t,e){this.http=t;this.treeSelector=e}continuedCategoriesOnly=!0;categories=[];showClear=!1;showLabel=!1;isInitializedCategoryLabel=!1;placeholder="Select Storage Location";selectedCategory;selectedCategoryID;selectedCategoryIDChange=new M;selectedCategoryLabel;top=0;isLoadCategories=!1;categories$;ngAfterViewInit(){let t=document.querySelector("body");this.top=t.getBoundingClientRect().top*-1}ngOnInit(){this.isInitializedCategoryLabel&&(d.IsEmpty(this.selectedCategoryID)&&d.IsNotEmpty(this.categories)&&(this.selectedCategoryID=this.categories[0]?.key),this.selectedCategory=this.findSelectedCategory(this.categories,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)),this.categories$=this.continuedCategoriesOnly?this.treeSelector.continuedCategories$:this.treeSelector.allCategories$,this.categories$=this.categories$.pipe(T(t=>{this.selectedCategory=this.findSelectedCategory(t,this.selectedCategoryID),this.generateLabelSelectedCategory(this.selectedCategory)}))}onSelectCategory(t){this.selectedCategory=t,this.generateLabelSelectedCategory(this.selectedCategory),this.selectedCategoryID=t?.key,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}generateLabelSelectedCategory(t){if(t){let e=[];this.selectedCategoryLabel="";do e=[...e,t.label],t=t.parent;while(t!==void 0);this.selectedCategoryLabel=e.reverse().join("/")}else this.selectedCategoryLabel=this.placeholder}findSelectedCategory(t,e){if(d.IsNotEmpty(e))for(let i of t){if(i.key===e)return i;{i.children=i.children?i.children:[],i.children=i.children.map(s=>(s.parent=i,s));let r=this.findSelectedCategory(i.children,e);if(r)return r}}else return null}loadCategories(){this.treeSelector.onOpenTreeSelector()}onClear(){this.selectedCategoryID=null,this.selectedCategoryIDChange.emit(this.selectedCategoryID)}static \u0275fac=function(e){return new(e||o)(b(C),b(y))};static \u0275cmp=$({type:o,selectors:[["POS-storage-location-select"]],inputs:{continuedCategoriesOnly:"continuedCategoriesOnly",categories:"categories",showClear:"showClear",showLabel:"showLabel",isInitializedCategoryLabel:"isInitializedCategoryLabel",placeholder:"placeholder",selectedCategoryID:"selectedCategoryID"},outputs:{selectedCategoryIDChange:"selectedCategoryIDChange"},decls:4,vars:1,consts:[["categorySelectTemplate",""],["variant","on",1,"w-100"],[4,"ngTemplateOutlet"],["for","selectCategory",1,"tree-category-label"],["appendTo","body","selectionMode","single","filter","true","filterInputAutoFocus","true","scrollHeight","250px","inputId","selectCategory",3,"click","ngModelChange","onClear","options","ngModel","showClear","placeholder"],["pTemplate","value"],["matTooltipPosition","above",3,"matTooltip"]],template:function(e,i){e&1&&(H(0,ne,4,1,"p-floatLabel",1)(1,le,1,1,"ng-container"),a(2,se,3,6,"ng-template",null,0,N)),e&2&&V(i.showLabel?0:1)},dependencies:[A,P,U,Q,X,W,K,J,q,G,Z,Y,z],styles:[".p-popover.p-component{z-index:10000000000000000000000!important} .p-treeselect-panel .p-treeselect-items-wrapper .p-tree{padding-left:4px!important} .p-float-label .p-inputwrapper-filled~label.tree-category-label{left:.5rem!important}"]})};export{ee as a};